PageSourceSearch

https://www.asge.org/js/scripts.js?v=7

js asge.org collected 2026-10-02 02:24:42 UTC 72,965 bytes, 1,841 lines download raw bytes

1window.ASGE = window.ASGE || {};
2
3/*! modernizr 3.3.1 (Custom Build) | MIT *
4 * https://modernizr.com/download/?-touchevents !*/
5!(function (e, n, t) {
6    function o(e, n) {
7        return typeof e === n;
8    }
9    function s() {
10        var e, n, t, s, i, a, r;
11        for (var l in f)
12            if (f.hasOwnProperty(l)) {
13                if (
14                    ((e = []),
15                    (n = f[l]),
16                    n.name &&
17                        (e.push(n.name.toLowerCase()),
18                        n.options &&
19                            n.options.aliases &&
20                            n.options.aliases.length))
21                )
22                    for (t = 0; t < n.options.aliases.length; t++)
23                        e.push(n.options.aliases[t].toLowerCase());
24                for (
25                    s = o(n.fn, "function") ? n.fn() : n.fn, i = 0;
26                    i < e.length;
27                    i++
28                )
29                    (a = e[i]),
30                        (r = a.split(".")),
31                        1 === r.length
32                            ? (Modernizr[r[0]] = s)
33                            : (!Modernizr[r[0]] ||
34                                  Modernizr[r[0]] instanceof Boolean ||
35                                  (Modernizr[r[0]] = new Boolean(
36                                      Modernizr[r[0]]
37                                  )),
38                              (Modernizr[r[0]][r[1]] = s)),
39                        d.push((s ? "" : "no-") + r.join("-"));
40            }
41    }
42    function i() {
43        return "function" != typeof n.createElement
44            ? n.createElement(arguments[0])
45            : p
46            ? n.createElementNS.call(
47                  n,
48                  "http://www.w3.org/2000/svg",
49                  arguments[0]
50              )
51            : n.createElement.apply(n, arguments);
52    }
53    function a() {
54        var e = n.body;
55        return e || ((e = i(p ? "svg" : "body")), (e.fake = !0)), e;
56    }
57    function r(e, t, o, s) {
58        var r,
59            f,
60            l,
61            d,
62            u = "modernizr",
63            p = i("div"),
64            h = a();
65        if (parseInt(o, 10))
66            for (; o--; )
67                (l = i("div")),
68                    (l.id = s ? s[o] : u + (o + 1)),
69                    p.appendChild(l);
70        return (
71            (r = i("style")),
72            (r.type = "text/css"),
73            (r.id = "s" + u),
74            (h.fake ? h : p).appendChild(r),
75            h.appendChild(p),
76            r.styleSheet
77                ? (r.styleSheet.cssText = e)
78                : r.appendChild(n.createTextNode(e)),
79            (p.id = u),
80            h.fake &&
81                ((h.style.background = ""),
82                (h.style.overflow = "hidden"),
83                (d = c.style.overflow),
84                (c.style.overflow = "hidden"),
85                c.appendChild(h)),
86            (f = t(p, e)),
87            h.fake
88                ? (h.parentNode.removeChild(h),
89                  (c.style.overflow = d),
90                  c.offsetHeight)
91                : p.parentNode.removeChild(p),
92            !!f
93        );
94    }
95    var f = [],
96        l = {
97            _version: "3.3.1",
98            _config: {
99                classPrefix: "",
100                enableClasses: !0,
101                enableJSClass: !0,
102                usePrefixes: !0
103            },
104            _q: [],
105            on: function (e, n) {
106                var t = this;
107                setTimeout(function () {
108                    n(t[e]);
109                }, 0);
110            },
111            addTest: function (e, n, t) {
112                f.push({ name: e, fn: n, options: t });
113            },
114            addAsyncTest: function (e) {
115                f.push({ name: null, fn: e });
116            }
117        },
118        Modernizr = function () {};
119    (Modernizr.prototype = l), (Modernizr = new Modernizr());
120    var d = [],
121        u = l._config.usePrefixes
122            ? " -webkit- -moz- -o- -ms- ".split(" ")
123            : ["", ""];
124    l._prefixes = u;
125    var c = n.documentElement,
126        p = "svg" === c.nodeName.toLowerCase(),
127        h = (l.testStyles = r);
128    Modernizr.addTest("touchevents", function () {
129        var t;
130        if (
131            "ontouchstart" in e ||
132            (e.DocumentTouch && n instanceof DocumentTouch)
133        )
134            t = !0;
135        else {
136            var o = [
137                "@media (",
138                u.join("touch-enabled),("),
139                "heartz",
140                ")",
141                "{#modernizr{top:9px;position:absolute}}"
142            ].join("");
143            h(o, function (e) {
144                t = 9 === e.offsetTop;
145            });
146        }
147        return t;
148    }),
149        s(),
150        delete l.addTest,
151        delete l.addAsyncTest;
152    for (var m = 0; m < Modernizr._q.length; m++) Modernizr._q[m]();
153    e.Modernizr = Modernizr;
154})(window, document);
155
156try {
157    window.mgClip("Hello", 3);
158} catch (e) {
159    window.mgClip = null;
160    console.log("your browser doesn't support text-clipper.js");
161}
162
163(function (window, document) {
164    "use strict";
165
166    ////////////////////////
167    //  helper functions  //
168    ////////////////////////
169
170    // fast forEach
171    function forEach(collection, fn) {
172        if (!collection) {
173            return false;
174        }
175        var i = 0,
176            limit = collection.length;
177        for (; i < limit; i++) {
178            fn(collection[i], i);
179        }
180    }
181    function forEachReversed(collection, fn) {
182        if (!collection) {
183            return false;
184        }
185        var i = collection.length - 1;
186        for (; i >= 0; i--) {
187            fn(collection[i], i);
188        }
189    }
190
191    // array conversion, faster than [].slice.call()
192    function toArray(collection) {
193        var result = [];
194        forEach(collection, function (item) {
195            result.push(item);
196        });
197        return result;
198    }
199
200    // parent traversal helpers
201    function getParents(el) {
202        var result = [];
203        while (el !== document.documentElement) {
204            result.push(el);
205            el = el.parentNode;
206        }
207        return result;
208    }
209    function getParentsByTagName(el, tag) {
210        tag = tag.toLowerCase();
211        return getParents(el).filter(function (candidate) {
212            return (
213                !!candidate.tagName && candidate.tagName.toLowerCase() === tag
214            );
215        });
216    }
217    function getParentsByClassName(el, cl) {
218        return getParents(el).filter(function (candidate) {
219            return !!candidate.className && candidate.classList.contains(cl);
220        });
221    }
222
223    // return a valid fragment string
224    var fragmentList = [];
225    function createFragment(str, testEl) {
226        var result = str.toLowerCase().replace(/\W/g, "-").replace(/\-+$/, "");
227        result = result || "tab";
228        while (
229            fragmentList.indexOf(result) >= 0 ||
230            (document.getElementById(result) &&
231                document.getElementById(result) !== testEl)
232        ) {
233            var increment = parseInt(result.match(/\d+$/)) || 1;
234            result = result.replace(/\-\d+$/, "") + "-" + ++increment;
235        }
236        return result;
237    }
238
239    // get a timestamp
240    function now() {
241        "use strict";
242        return Date.now || new Date().getTime();
243    }
244
245    // throttle and debounce from underscore.js
246    function throttle(func, wait, options) {
247        "use strict";
248        var context,
249            args,
250            result,
251            timeout = null,
252            previous = 0;
253        if (!options) {
254            options = {};
255        }
256        var later = function () {
257            previous = options.leading === false ? 0 : now();
258            timeout = null;
259            result = func.apply(context, args);
260            if (!timeout) {
261                context = args = null;
262            }
263        };
264        return function () {
265            var now = now();
266            if (!previous && options.leading === false) {
267                previous = now;
268            }
269            var remaining = wait - (now - previous);
270            context = this;
271            args = arguments;
272            if (remaining <= 0 || remaining > wait) {
273                clearTimeout(timeout);
274                timeout = null;
275                previous = now;
276                result = func.apply(context, args);
277                if (!timeout) {
278                    context = args = null;
279                }
280            } else if (!timeout && options.trailing !== false) {
281                timeout = setTimeout(later, remaining);
282            }
283            return result;
284        };
285    }
286    function debounce(func, wait, immediate) {
287        "use strict";
288        var timeout, args, context, timestamp, result;
289        var later = function () {
290            var last = now() - timestamp;
291            if (last < wait && last > 0) {
292                timeout = setTimeout(later, wait - last);
293            } else {
294                timeout = null;
295                if (!immediate) {
296                    result = func.apply(context, args);
297                    if (!timeout) {
298                        context = args = null;
299                    }
300                }
301            }
302        };
303        return function () {
304            context = this;
305            args = arguments;
306            timestamp = now();
307            var callNow = immediate && !timeout;
308            if (!timeout) {
309                timeout = setTimeout(later, wait);
310            }
311            if (callNow) {
312                result = func.apply(context, args);
313                context = args = null;
314            }
315            return result;
316        };
317    }
318
319    window.ASGE = (function (window, document) {
320        ///////////////////////
321        //  generic toggles  //
322        ///////////////////////
323
324        // <el data-toggle-target="[keyword|selector]" />
325
326        var toggles = (function () {
327            // use this module on .toggle elements by default
328            var initEls = document.querySelectorAll("[data-toggle-target]"),
329                toggleList = [],
330                activeClass = "is-active";
331
332            // individual toggle object; stores element and targets
333            function Toggle(el) {
334                var that = this;
335                this.origin = el;
336                this.targets = findTargets(el);
337                el.addEventListener("click", function (ev) {
338                    ev.preventDefault();
339                    that.activate();
340                });
341            }
342
343            // parses a target string and returns a matching array
344            function findTargets(el) {
345                var targetString = el.getAttribute("data-toggle-target");
346                if (!targetString) {
347                    return [];
348                } else if (targetString === "next") {
349                    return [el.nextElementSibling];
350                } else if (targetString === "previous") {
351                    return [el.previousElementSibling];
352                } else if (targetString === "parent") {
353                    return [el.parentNode];
354                } else if (targetString === "parentnext") {
355                    return [el.parentNode.nextElementSibling];
356                } else if (targetString === "parentparentnext") {
357                    return [el.parentNode.parentNode.nextElementSibling];
358                }
359                return toArray(document.querySelectorAll(targetString));
360            }
361
362            // make toggle go
363            Toggle.prototype.activate = function (force) {
364                forEach([this.origin].concat(this.targets), function (el) {
365                    if (typeof force === "boolean") {
366                        el.classList.toggle(activeClass, force);
367                    } else {
368                        el.classList.toggle(activeClass);
369                    }
370                });
371            };
372
373            // public: make node or nodeList toggleable
374            function add(els) {
375                forEach(els, function (el) {
376                    toggleList.push(new Toggle(el));
377                });
378            }
379
380            // public: returns an array of all toggles on the page
381            function list() {
382                return toggleList;
383            }
384
385            // public: initialize by adding default elements
386            function init() {
387                add(initEls);
388            }
389
390            return {
391                add: add,
392                list: list,
393                init: init
394            };
395        })();
396
397        /////////////////////////////
398        //  simple tabs/slideshow  //
399        /////////////////////////////
400
401        // <el class="tabs [is-automated]?">
402        //   <el class="tabs__tab" />
403        //   <el class="tabs__pane" />
404        // </el>
405
406        var tabs = (function () {
407            var initEls = document.getElementsByClassName("tabs"),
408                tabsList = [],
409                defaults = {
410                    tabSelector: ".tabs__tab",
411                    paneSelector: ".tabs__pane",
412                    nextSelector: ".tabs__next",
413                    previousSelector: ".tabs__previous",
414                    pauseSelector: ".tabs__pause",
415                    playSelector: ".tabs__play",
416                    automationClass: "is-automated",
417                    automated: false,
418                    slideDuration: 7000,
419                    fragments: false
420                },
421                activeClass = "is-active",
422                nextClass = "is-next",
423                previousClass = "is-previous";
424
425            function TabGroup(container, options) {
426                var that = this;
427
428                this.container = container;
429                this.automated = options.automated;
430                this.fragments = options.fragments;
431                this.tabs = toArray(
432                    container.querySelectorAll(options.tabSelector)
433                );
434                this.panes = toArray(
435                    container.querySelectorAll(options.paneSelector)
436                );
437                this.nextEls = toArray(
438                    container.querySelectorAll(options.nextSelector)
439                );
440                this.previousEls = toArray(
441                    container.querySelectorAll(options.previousSelector)
442                );
443                this.pauseEls = toArray(
444                    container.querySelectorAll(options.pauseSelector)
445                );
446                this.playEls = toArray(
447                    container.querySelectorAll(options.playSelector)
448                );
449                this.slideDuration = options.slideDuration;
450
451                this.active = 0;
452                this.count = Math.max(this.tabs.length, this.panes.length);
453
454                var defaultTab = parseInt(
455                    this.container.getAttribute("data-default-tab"),
456                    10
457                );
458                if (isNaN(defaultTab)) {
459                    this.changeTo(0, true);
460                } else {
461                    this.changeTo(defaultTab, true);
462                }
463
464                forEach(this.tabs, function (tab, index) {
465                    tab.addEventListener("click", function (ev) {
466                        ev.preventDefault();
467                        if (that.automated) {
468                            that.pause();
469                        }
470                        that.changeTo(index);
471                        if (that.automated) {
472                            that.play();
473                        }
474                    });
475                });
476                forEach(this.nextEls, function (el) {
477                    el.addEventListener("click", function (ev) {
478                        ev.preventDefault();
479                        that.changeTo("next");
480                    });
481                });
482                forEach(this.previousEls, function (el) {
483                    el.addEventListener("click", function (ev) {
484                        ev.preventDefault();
485                        that.changeTo("previous");
486                    });
487                });
488                forEach(this.pauseEls, function (el) {
489                    el.addEventListener("click", function (ev) {
490                        ev.preventDefault();
491                        that.pause();
492                    });
493                });
494                forEach(this.playEls, function (el) {
495                    el.addEventListener("click", function (ev) {
496                        ev.preventDefault();
497                        that.play();
498                    });
499                });
500
501                if (this.fragments) {
502                    this.createFragments();
503                    this.readFragment();
504                }
505
506                if (this.automated) {
507                    this.play();
508                }
509            }
510
511            // switch current tabgroup to specified index
512            TabGroup.prototype.changeTo = function (index, ignoreFragment) {
513                if (index === "next") {
514                    index = this.nextIndex();
515                } else if (index === "previous") {
516                    index = this.prevIndex();
517                } else if (
518                    typeof index !== "number" ||
519                    index < 0 ||
520                    index >= this.count
521                ) {
522                    console.warn("given index not recognized");
523                    return false;
524                }
525
526                forEach(this.tabs.concat(this.panes), function (el) {
527                    el.classList.remove(activeClass);
528                    el.classList.remove(nextClass);
529                    el.classList.remove(previousClass);
530                });
531
532                this.active = index;
533
534                if (this.tabs[index]) {
535                    this.tabs[index].classList.add(activeClass);
536                }
537                if (this.panes[index]) {
538                    this.panes[index].classList.add(activeClass);
539                }
540                if (this.tabs[this.nextIndex()]) {
541                    this.tabs[this.nextIndex()].classList.add(nextClass);
542                }
543                if (this.panes[this.nextIndex()]) {
544                    this.panes[this.nextIndex()].classList.add(nextClass);
545                }
546                if (this.tabs[this.prevIndex()]) {
547                    this.tabs[this.prevIndex()].classList.add(previousClass);
548                }
549                if (this.panes[this.prevIndex()]) {
550                    this.panes[this.prevIndex()].classList.add(previousClass);
551                }
552
553                if (this.fragments && !ignoreFragment) {
554                    this.updateFragment();
555                }
556            };
557
558            // returns index of the next tab; wraps around to 0
559            TabGroup.prototype.nextIndex = function () {
560                return (this.active + 1) % this.count;
561            };
562
563            // returns index of the previous tab; wraps around from 0
564            TabGroup.prototype.prevIndex = function () {
565                return this.active <= 0 ? this.count - 1 : this.active - 1;
566            };
567
568            // start automated slideshow
569            TabGroup.prototype.play = function () {
570                var that = this;
571                that.container.classList.add("is-playing");
572                that.timer = setInterval(function () {
573                    that.changeTo("next", true);
574                }, that.slideDuration);
575            };
576
577            // pause automated slideshow
578            TabGroup.prototype.pause = function () {
579                var that = this;
580                that.container.classList.remove("is-playing");
581                clearInterval(that.timer);
582            };
583
584            TabGroup.prototype.createFragments = function () {
585                forEach(
586                    this.tabs,
587                    function (tab) {
588                        var textContainer = tab;
589                        while (textContainer.children.length > 0) {
590                            textContainer = textContainer.children[0];
591                        }
592                        tab.id =
593                            tab.id || createFragment(textContainer.textContent);
594                    }.bind(this)
595                );
596            };
597
598            TabGroup.prototype.readFragment = function () {
599                var hash = window.location.hash;
600                if (!hash) {
601                    return false;
602                }
603                hash = hash.replace("#", "");
604                forEach(
605                    this.tabs,
606                    function (tab, i) {
607                        if (tab.id === hash) {
608                            this.changeTo(i, true);
609                        }
610                    }.bind(this)
611                );
612            };
613
614            TabGroup.prototype.updateFragment = function () {
615                if (!!window.history) {
616                    history.replaceState(
617                        {},
618                        "",
619                        window.location.href.split("#")[0] +
620                            "#" +
621                            this.tabs[this.active].id
622                    );
623                } else {
624                    window.location.hash = "#" + this.tabs[this.active].id;
625                }
626            };
627
628            // public: add tab functionality to element
629            function add(container, options) {
630                options.automated = options.automated || defaults.automated;
631                options.tabSelector =
632                    options.tabSelector || defaults.tabSelector;
633                options.paneSelector =
634                    options.paneSelector || defaults.paneSelector;
635                options.nextSelector =
636                    options.nextSelector || defaults.nextSelector;
637                options.previousSelector =
638                    options.previousSelector || defaults.previousSelector;
639                options.pauseSelector =
640                    options.pauseSelector || defaults.pauseSelector;
641                options.playSelector =
642                    options.playSelector || defaults.playSelector;
643                options.slideDuration =
644                    options.slideDuration || defaults.slideDuration;
645                options.fragments = options.fragments || defaults.fragments;
646                tabsList.push(new TabGroup(container, options));
647            }
648
649            // public: returns array of all tab groups on the page
650            function list() {
651                return tabsList;
652            }
653
654            // public: returns a single tab group whose container matches a given css selector
655            function find(selector) {
656                var result = null;
657                forEach(tabsList, function (tabs) {
658                    if (tabs.container.matches(selector)) {
659                        result = tabs;
660                    }
661                });
662                return result;
663            }
664
665            // public: initialize by adding default elements
666            function init() {
667                forEach(initEls, function (el) {
668                    add(el, {
669                        automated: el.classList.contains(
670                            defaults.automationClass
671                        ),
672                        fragments: !el.classList.contains(
673                            defaults.automationClass
674                        )
675                    });
676                });
677            }
678
679            return {
680                add: add,
681                list: list,
682                find: find,
683                init: init
684            };
685        })();
686
687        //////////////////////////////
688        //  shared height elements  //
689        //////////////////////////////
690
691        // <el data-height-group="groupname" />
692
693        var sharedHeights = (function () {
694            var initEls = document.querySelectorAll("[data-height-group]"),
695                heightGroups = {};
696
697            // public: update all shared-height elements
698            function update() {
699                var g, thisGroup, heights, maxHeight;
700
701                function resetHeight(el) {
702                    el.style.minHeight = 0;
703                    heights.push(el.offsetHeight);
704                }
705                function applyHeight(el) {
706                    el.style.minHeight = maxHeight + "px";
707                }
708
709                for (g in heightGroups) {
710                    if (heightGroups.hasOwnProperty(g)) {
711                        thisGroup = heightGroups[g];
712                        heights = [];
713                        forEach(thisGroup, resetHeight);
714                        maxHeight = Math.max.apply(null, heights);
715                        forEach(thisGroup, applyHeight);
716                    }
717                }
718            }
719
720            // public: add a shared-height element
721            function add(el, group) {
722                if (!heightGroups[group]) {
723                    heightGroups[group] = [];
724                }
725                heightGroups[group].push(el);
726            }
727
728            // public: return heightGroups object
729            function list() {
730                return heightGroups;
731            }
732
733            // public: initialize with default elements
734            function init() {
735                forEach(initEls, function (el) {
736                    add(el, el.getAttribute("data-height-group"));
737                });
738                update();
739            }
740
741            var debouncedUpdate = debounce(update, 75);
742            window.addEventListener("resize", debouncedUpdate);
743
744            return {
745                add: add,
746                list: list,
747                update: update,
748                init: init
749            };
750        })();
751
752        ///////////////////
753        //  misc tweaks  //
754        ///////////////////
755
756        var misc = (function () {
757            // clean up nav output from sitefinity
758            function tidyNav() {
759                // reverse iteration over live nodelist
760                forEachReversed(
761                    document.getElementsByClassName("page-nav__toggle"),
762                    function (toggle) {
763                        if (!toggle.nextElementSibling) {
764                            toggle.parentNode.removeChild(toggle);
765                        }
766                    }
767                );
768            }
769
770            // fix homepage slideshow due to sitefinity limitations
771            function homepageSlides() {
772                forEach(
773                    document.getElementsByClassName("home-feature"),
774                    function (slideshow) {
775                        var nav = slideshow.querySelector(".home-feature__nav");
776                        if (nav) {
777                            forEach(
778                                slideshow.querySelectorAll(
779                                    ".home-feature__tab"
780                                ),
781                                function (tab) {
782                                    nav.appendChild(tab);
783                                }
784                            );
785                        }
786                    }
787                );
788            }
789
790            // truncate lists with 'more' button
791            // usage: <ul class="item-list" data-limit-to="5"> ... </ul>
792            function limitLists() {
793                var button = document.createElement("button");
794                button.className = "item-list__truncate";
795                button.textContent = "Show more";
796                button.setAttribute("type", "button");
797
798                forEach(
799                    document.querySelectorAll("[data-limit-to]"),
800                    function (list) {
801                        var limit = parseInt(
802                                list.getAttribute("data-limit-to"),
803                                10
804                            ),
805                            items = list.children,
806                            thisButton;
807
808                        function toggleItems() {
809                            for (var i = limit; i < items.length; i++) {
810                                items[i].classList.toggle("is-hidden");
811                            }
812                        }
813
814                        if (limit && items && items.length > limit) {
815                            thisButton = button.cloneNode(true);
816                            thisButton.textContent =
817                                "Show " + (items.length - limit) + " more";
818                            list.parentNode.insertBefore(
819                                thisButton,
820                                list.nextSibling
821                            );
822                            thisButton.addEventListener("click", function (ev) {
823                                ev.preventDefault();
824                                ev.target.classList.toggle("is-active");
825                                if (ev.target.classList.contains("is-active")) {
826                                    ev.target.textContent = "Show less";
827                                } else {
828                                    ev.target.textContent =
829                                        "Show " +
830                                        (items.length - limit) +
831                                        " more";
832                                }
833                                toggleItems();
834                            });
835                            toggleItems();
836                        }
837                    }
838                );
839            }
840
841            // sticky nav
842            function stickyNavigation() {
843                var header = document.querySelector(".page-nav"),
844                    isStuck = false,
845                    cutoff,
846                    difference;
847
848                function setCutoff() {
849                    header.classList.remove("is-stuck");
850                    cutoff = header.offsetTop;
851                    if (isStuck) {
852                        header.classList.add("is-stuck");
853                    }
854                }
855                function setSticky() {
856                    difference = cutoff - window.pageYOffset;
857                    if (!isStuck && difference <= 0) {
858                        header.classList.add("is-stuck");
859                        isStuck = true;
860                    } else if (isStuck && difference > 0) {
861                        header.classList.remove("is-stuck");
862                        isStuck = false;
863                    }
864                }
865
866                if (header) {
867                    setCutoff();
868                    setSticky();
869                    window.addEventListener("resize", function () {
870                        setCutoff();
871                        setSticky();
872                    });
873                    window.addEventListener("scroll", setSticky);
874                }
875            }
876
877            // remove select accordion items
878            function trimAccordions() {
879                function remove(content) {
880                    var title = content.previousElementSibling,
881                        container = content.parentNode;
882
883                    container.removeChild(content);
884                    container.removeChild(title);
885                    if (container.children.length === 0) {
886                        container.parentNode.removeChild(container);
887                    }
888                }
889
890                forEachReversed(
891                    document.getElementsByClassName("accordion__content"),
892                    function (content) {
893                        // remove items with no content whatsoever
894                        var contentArea = toArray(content.children).filter(
895                            function (child) {
896                                return child.classList.contains("sf_colsIn");
897                            }
898                        );
899                        if (
900                            contentArea.length > 0 &&
901                            contentArea[0].children.length === 0
902                        ) {
903                            remove(content);
904                        }
905
906                        // remove items that have lists which are all empty
907                        var lists = content.querySelectorAll(".item-list"),
908                            longest;
909                        if (lists.length > 0) {
910                            longest = toArray(lists)
911                                .map(function (list) {
912                                    return list.children.length;
913                                })
914                                .reduce(Math.max, 0);
915                            if (longest === 0) {
916                                remove(content);
917                            }
918                        }
919                    }
920                );
921            }
922
923            // remove tabs with empty contents
924            function trimTabs() {
925                function remove(content) {
926                    var index,
927                        tab,
928                        parent = content.parentNode,
929                        siblings = parent.querySelectorAll(".tabs__pane"),
930                        tabsCount = siblings.length;
931
932                    // find appropriate tab
933                    index = toArray(siblings).indexOf(content);
934                    tab = parent.querySelectorAll(".tabs__tab")[index];
935
936                    // remove tab and content
937                    parent.removeChild(tab);
938                    parent.removeChild(content);
939
940                    // decrement tab layout
941                    parent.classList.remove("tabs--" + tabsCount);
942                    parent.classList.add("tabs--" + (tabsCount - 1));
943
944                    // if 0 or 1 tabs left, remove tabs functionality
945                    // commented out based on feedback
946                    // if (tabsCount <= 2) {
947                    //     parent.classList.remove('tabs');
948                    // }
949                }
950
951                forEachReversed(
952                    document.getElementsByClassName("tabs__pane"),
953                    function (content) {
954                        // remove items with no content whatsoever
955                        var contentArea = toArray(content.children).filter(
956                            function (child) {
957                                return child.classList.contains("sf_colsIn");
958                            }
959                        );
960                        if (
961                            contentArea.length > 0 &&
962                            contentArea[0].children.length === 0
963                        ) {
964                            remove(content);
965                        }
966
967                        // remove items that have lists which are all empty
968                        var lists = content.querySelectorAll(".item-list"),
969                            longest;
970                        if (lists.length > 0) {
971                            longest = toArray(lists)
972                                .map(function (list) {
973                                    return list.children.length;
974                                })
975                                .reduce(Math.max, 0);
976                            if (longest === 0) {
977                                remove(content);
978                            }
979                        }
980                    }
981                );
982            }
983
984            // highlight the label of a focused form element
985            function enhanceFormAesthetics() {
986                forEach(
987                    document.querySelectorAll("label[for]"),
988                    function (label) {
989                        var input = document.getElementById(
990                            label.getAttribute("for")
991                        );
992                        if (label && input) {
993                            input.addEventListener("focus", function () {
994                                label.classList.add("is-focused");
995                            });
996                            input.addEventListener("blur", function () {
997                                label.classList.remove("is-focused");
998                            });
999                        }
1000                    }
1001                );
1002            }
1003
1004            // clone search bar for alternate mobile placement
1005            function cloneSearch() {
1006                var header = document.querySelector(".header-container"),
1007                    search = header.querySelector(".sf-search"),
1008                    searchClone,
1009                    inputClone;
1010                if (header && search) {
1011                    searchClone = search.cloneNode(true);
1012                    searchClone.classList.add("sf-search--cloned");
1013                    inputClone = searchClone.querySelector("input");
1014                    inputClone.addEventListener(
1015                        "keydown",
1016                        function (ev) {
1017                            if (ev.keyCode === 13) {
1018                                doSearch(ev, this);
1019                            }
1020                        },
1021                        true
1022                    );
1023                    header.appendChild(searchClone);
1024                }
1025            }
1026
1027            // add fragment enhancements to accordions
1028            function addFragmentsToAccordions() {
1029                // create fragment ids for each accordion title
1030                forEach(
1031                    document.getElementsByClassName("accordion"),
1032                    function (container) {
1033                        forEach(
1034                            container.querySelectorAll(".accordion__title"),
1035                            function (trigger) {
1036                                var textContainer = trigger;
1037                                while (textContainer.children.length > 0) {
1038                                    textContainer = textContainer.children[0];
1039                                }
1040                                trigger.id =
1041                                    trigger.id ||
1042                                    createFragment(textContainer.textContent);
1043
1044                                // and add additional click functionality while we're here
1045                                trigger.addEventListener(
1046                                    "click",
1047                                    function (ev) {
1048                                        if (!!window.history) {
1049                                            history.replaceState(
1050                                                {},
1051                                                "",
1052                                                window.location.href.split(
1053                                                    "#"
1054                                                )[0] +
1055                                                    "#" +
1056                                                    trigger.id
1057                                            );
1058                                        } else {
1059                                            window.location.hash =
1060                                                "#" + trigger.id;
1061                                        }
1062                                    }
1063                                );
1064                            }
1065                        );
1066                    }
1067                );
1068                // read url fragment if it exists
1069                var hash = window.location.hash;
1070                if (hash) {
1071                    hash = hash.replace("#", "");
1072                    forEach(toggles.list(), function (toggle) {
1073                        if (toggle.origin.id === hash) {
1074                            forEach(
1075                                document.querySelectorAll(
1076                                    ".accordion__title, .accordion__content"
1077                                ),
1078                                function (el) {
1079                                    el.classList.remove("is-active");
1080                                }
1081                            );
1082                            toggle.activate(true);
1083                        }
1084                    });
1085                }
1086            }
1087
1088            // add show/hide to item descriptions in the tabbed latest content widget
1089            function toggleLatestContentDescriptions() {
1090                var togglePrototype = document.createElement("button");
1091
1092                togglePrototype.className = "item-list__expand-description";
1093                togglePrototype.textContent = "more +";
1094                togglePrototype.setAttribute("type", "button");
1095
1096                forEach(
1097                    document.querySelectorAll(
1098                        ".latest-content-tabs .item-list__description"
1099                    ),
1100                    function (description) {
1101                        var toggle, preview, full;
1102
1103                        if (description.textContent.length > 220) {
1104                            toggle = togglePrototype.cloneNode(true);
1105
1106                            var $htmlParser = $("<div />");
1107                            $htmlParser.html(description.innerHTML);
1108                            preview =
1109                                $htmlParser
1110                                    .text()
1111                                    .split(" ")
1112                                    .splice(0, 50)
1113                                    .join(" ") + " ...";
1114
1115                            full = description.innerHTML;
1116
1117                            description.innerHTML = preview;
1118                            description.appendChild(toggle);
1119
1120                            // description.parentNode.insertBefore(toggle, description.nextSibling);
1121
1122                            toggle.addEventListener("click", function (ev) {
1123                                ev.preventDefault();
1124                                toggle.parentNode.innerHTML = full;
1125                            });
1126                        }
1127                    }
1128                );
1129            }
1130
1131            function handleGieSearchLinks() {
1132                $(".gie-search-link").each(function (i) {
1133                    var href = "",
1134                        category = $(this).data("category"),
1135                        link = this;
1136
1137                    $.ajax({
1138                        url:
1139                            "/api/taxonomy/hierarchy-taxa?$filter=Id eq " +
1140                            category
1141                    }).then(function (response) {
1142                        if (response.value && response.value.length) {
1143                            var categoryName = response.value[0]["Title"];
1144
1145                            // remove last part of Title if it ends with `)`
1146                            if (
1147                                categoryName.substring(
1148                                    categoryName.length - 1
1149                                ) == ")"
1150                            ) {
1151                                var arr = categoryName.split(" ");
1152                                arr.splice(arr.length - 1);
1153                                categoryName = arr.join(" ");
1154                            }
1155
1156                            href =
1157                                "http://www.giejournal.org/action/doSearch?searchType=quick&searchText=" +
1158                                categoryName +
1159                                "&occurrences=articleTitleAbstractKeywords&journalCode=ymge&searchScope=fullSite";
1160
1161                            link.href = href;
1162
1163                            $(link).removeClass("hidden");
1164                        }
1165                    });
1166                });
1167            }
1168
1169            return {
1170                tidyNav: tidyNav,
1171                homepageSlides: homepageSlides,
1172                limitLists: limitLists,
1173                stickyNavigation: stickyNavigation,
1174                trimAccordions: trimAccordions,
1175                trimTabs: trimTabs,
1176                enhanceFormAesthetics: enhanceFormAesthetics,
1177                cloneSearch: cloneSearch,
1178                addFragmentsToAccordions: addFragmentsToAccordions,
1179                toggleLatestContentDescriptions:
1180                    toggleLatestContentDescriptions,
1181                handleGieSearchLinks: handleGieSearchLinks
1182            };
1183        })();
1184
1185        //////////////////////
1186        //  initialization  //
1187        //////////////////////
1188
1189        var init = function () {
1190            // tweaks to run before toggles and tabs initialize
1191            misc.tidyNav();
1192            misc.homepageSlides();
1193            misc.limitLists();
1194            misc.trimAccordions();
1195            misc.trimTabs();
1196
1197            // base modules
1198            toggles.init();
1199            tabs.init();
1200            sharedHeights.init();
1201
1202            // tweaks that can be deferred until after base modules run
1203            // misc.cloneSearch();
1204            if (!Modernizr.touchevents) {
1205                misc.stickyNavigation();
1206            }
1207            misc.enhanceFormAesthetics();
1208            misc.addFragmentsToAccordions();
1209            misc.toggleLatestContentDescriptions();
1210            misc.handleGieSearchLinks();
1211
1212            document.documentElement.classList.remove("no-js");
1213            document.documentElement.classList.add("js");
1214        };
1215
1216        //////////////
1217        //  public  //
1218        //////////////
1219
1220        return {
1221            toggles: toggles,
1222            tabs: tabs,
1223            sharedHeights: sharedHeights,
1224            init: init
1225        };
1226    })(window, document);
1227
1228    ASGE.init();
1229
1230    // add a class to lists that have been indented by thumbnails or dates
1231    forEach(document.getElementsByClassName("item-list"), function (list) {
1232        if (list.querySelector(".item-list__icon, .item-list__date")) {
1233            list.classList.add("item-list--indented");
1234        }
1235    });
1236
1237    // add height sharing functionality to standard tab labels
1238    forEach(
1239        document.getElementsByClassName("tabs--sf"),
1240        function (tabs, index) {
1241            forEach(tabs.querySelectorAll(".tabs__tab"), function (label) {
1242                ASGE.sharedHeights.add(label, "tabs-height-" + index);
1243            });
1244        }
1245    );
1246    ASGE.sharedHeights.update();
1247})(window, document);
1248
1249// concatenate external modules
1250
1251// prism.js: code syntax highlighting for style guide
1252/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
1253var _self =
1254        "undefined" != typeof window
1255            ? window
1256            : "undefined" != typeof WorkerGlobalScope &&
1257              self instanceof WorkerGlobalScope
1258            ? self
1259            : {},
1260    Prism = (function () {
1261        var e = /\blang(?:uage)?-(\w+)\b/i,
1262            t = 0,
1263            n = (_self.Prism = {
1264                util: {
1265                    encode: function (e) {
1266                        return e instanceof a
1267                            ? new a(e.type, n.util.encode(e.content), e.alias)
1268                            : "Array" === n.util.type(e)
1269                            ? e.map(n.util.encode)
1270                            : e
1271                                  .replace(/&/g, "&amp;")
1272                                  .replace(/</g, "&lt;")
1273                                  .replace(/\u00a0/g, " ");
1274                    },
1275                    type: function (e) {
1276                        return Object.prototype.toString
1277                            .call(e)
1278                            .match(/\[object (\w+)\]/)[1];
1279                    },
1280                    objId: function (e) {
1281                        return (
1282                            e.__id ||
1283                                Object.defineProperty(e, "__id", {
1284                                    value: ++t
1285                                }),
1286                            e.__id
1287                        );
1288                    },
1289                    clone: function (e) {
1290                        var t = n.util.type(e);
1291                        switch (t) {
1292                            case "Object":
1293                                var a = {};
1294                                for (var r in e)
1295                                    e.hasOwnProperty(r) &&
1296                                        (a[r] = n.util.clone(e[r]));
1297                                return a;
1298                            case "Array":
1299                                return (
1300                                    e.map &&
1301                                    e.map(function (e) {
1302                                        return n.util.clone(e);
1303                                    })
1304                                );
1305                        }
1306                        return e;
1307                    }
1308                },
1309                languages: {
1310                    extend: function (e, t) {
1311                        var a = n.util.clone(n.languages[e]);
1312                        for (var r in t) a[r] = t[r];
1313                        return a;
1314                    },
1315                    insertBefore: function (e, t, a, r) {
1316                        r = r || n.languages;
1317                        var i = r[e];
1318                        if (2 == arguments.length) {
1319                            a = arguments[1];
1320                            for (var l in a)
1321                                a.hasOwnProperty(l) && (i[l] = a[l]);
1322                            return i;
1323                        }
1324                        var o = {};
1325                        for (var s in i)
1326                            if (i.hasOwnProperty(s)) {
1327                                if (s == t)
1328                                    for (var l in a)
1329                                        a.hasOwnProperty(l) && (o[l] = a[l]);
1330                                o[s] = i[s];
1331                            }
1332                        return (
1333                            n.languages.DFS(n.languages, function (t, n) {
1334                                n === r[e] && t != e && (this[t] = o);
1335                            }),
1336                            (r[e] = o)
1337                        );
1338                    },
1339                    DFS: function (e, t, a, r) {
1340                        r = r || {};
1341                        for (var i in e)
1342                            e.hasOwnProperty(i) &&
1343                                (t.call(e, i, e[i], a || i),
1344                                "Object" !== n.util.type(e[i]) ||
1345                                r[n.util.objId(e[i])]
1346                                    ? "Array" !== n.util.type(e[i]) ||
1347                                      r[n.util.objId(e[i])] ||
1348                                      ((r[n.util.objId(e[i])] = !0),
1349                                      n.languages.DFS(e[i], t, i, r))
1350                                    : ((r[n.util.objId(e[i])] = !0),
1351                                      n.languages.DFS(e[i], t, null, r)));
1352                    }
1353                },
1354                plugins: {},
1355                highlightAll: function (e, t) {
1356                    var a = {
1357                        callback: t,
1358                        selector:
1359                            'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
1360                    };
1361                    n.hooks.run("before-highlightall", a);
1362                    for (
1363                        var r,
1364                            i =
1365                                a.elements ||
1366                                document.querySelectorAll(a.selector),
1367                            l = 0;
1368                        (r = i[l++]);
1369
1370                    )
1371                        n.highlightElement(r, e === !0, a.callback);
1372                },
1373                highlightElement: function (t, a, r) {
1374                    for (var i, l, o = t; o && !e.test(o.className); )
1375                        o = o.parentNode;
1376                    o &&
1377                        ((i = (o.className.match(e) || [
1378                            ,
1379                            ""
1380                        ])[1].toLowerCase()),
1381                        (l = n.languages[i])),
1382                        (t.className =
1383                            t.className.replace(e, "").replace(/\s+/g, " ") +
1384                            " language-" +
1385                            i),
1386                        (o = t.parentNode),
1387                        /pre/i.test(o.nodeName) &&
1388                            (o.className =
1389                                o.className
1390                                    .replace(e, "")
1391                                    .replace(/\s+/g, " ") +
1392                                " language-" +
1393                                i);
1394                    var s = t.textContent,
1395                        u = { element: t, language: i, grammar: l, code: s };
1396                    if (
1397                        (n.hooks.run("before-sanity-check", u),
1398                        !u.code || !u.grammar)
1399                    )
1400                        return (
1401                            u.code && (u.element.textContent = u.code),
1402                            n.hooks.run("complete", u),
1403                            void 0
1404                        );
1405                    if (
1406                        (n.hooks.run("before-highlight", u), a && _self.Worker)
1407                    ) {
1408                        var g = new Worker(n.filename);
1409                        (g.onmessage = function (e) {
1410                            (u.highlightedCode = e.data),
1411                                n.hooks.run("before-insert", u),
1412                                (u.element.innerHTML = u.highlightedCode),
1413                                r && r.call(u.element),
1414                                n.hooks.run("after-highlight", u),
1415                                n.hooks.run("complete", u);
1416                        }),
1417                            g.postMessage(
1418                                JSON.stringify({
1419                                    language: u.language,
1420                                    code: u.code,
1421                                    immediateClose: !0
1422                                })
1423                            );
1424                    } else
1425                        (u.highlightedCode = n.highlight(
1426                            u.code,
1427                            u.grammar,
1428                            u.language
1429                        )),
1430                            n.hooks.run("before-insert", u),
1431                            (u.element.innerHTML = u.highlightedCode),
1432                            r && r.call(t),
1433                            n.hooks.run("after-highlight", u),
1434                            n.hooks.run("complete", u);
1435                },
1436                highlight: function (e, t, r) {
1437                    var i = n.tokenize(e, t);
1438                    return a.stringify(n.util.encode(i), r);
1439                },
1440                tokenize: function (e, t) {
1441                    var a = n.Token,
1442                        r = [e],
1443                        i = t.rest;
1444                    if (i) {
1445                        for (var l in i) t[l] = i[l];
1446                        delete t.rest;
1447                    }
1448                    e: for (var l in t)
1449                        if (t.hasOwnProperty(l) && t[l]) {
1450                            var o = t[l];
1451                            o = "Array" === n.util.type(o) ? o : [o];
1452                            for (var s = 0; s < o.length; ++s) {
1453                                var u = o[s],
1454                                    g = u.inside,
1455                                    c = !!u.lookbehind,
1456                                    h = !!u.greedy,
1457                                    f = 0,
1458                                    d = u.alias;
1459                                if (h && !u.pattern.global) {
1460                                    var p = u.pattern
1461                                        .toString()
1462                                        .match(/[imuy]*$/)[0];
1463                                    u.pattern = RegExp(
1464                                        u.pattern.source,
1465                                        p + "g"
1466                                    );
1467                                }
1468                                u = u.pattern || u;
1469                                for (
1470                                    var m = 0, y = 0;
1471                                    m < r.length;
1472                                    y += r[m].length, ++m
1473                                ) {
1474                                    var v = r[m];
1475                                    if (r.length > e.length) break e;
1476                                    if (!(v instanceof a)) {
1477                                        u.lastIndex = 0;
1478                                        var b = u.exec(v),
1479                                            k = 1;
1480                                        if (!b && h && m != r.length - 1) {
1481                                            if (
1482                                                ((u.lastIndex = y),
1483                                                (b = u.exec(e)),
1484                                                !b)
1485                                            )
1486                                                break;
1487                                            for (
1488                                                var w =
1489                                                        b.index +
1490                                                        (c ? b[1].length : 0),
1491                                                    _ = b.index + b[0].length,
1492                                                    A = m,
1493                                                    P = y,
1494                                                    j = r.length;
1495                                                j > A && _ > P;
1496                                                ++A
1497                                            )
1498                                                (P += r[A].length),
1499                                                    w >= P && (++m, (y = P));
1500                                            if (
1501                                                r[m] instanceof a ||
1502                                                r[A - 1].greedy
1503                                            )
1504                                                continue;
1505                                            (k = A - m),
1506                                                (v = e.slice(y, P)),
1507                                                (b.index -= y);
1508                                        }
1509                                        if (b) {
1510                                            c && (f = b[1].length);
1511                                            var w = b.index + f,
1512                                                b = b[0].slice(f),
1513                                                _ = w + b.length,
1514                                                x = v.slice(0, w),
1515                                                O = v.slice(_),
1516                                                S = [m, k];
1517                                            x && S.push(x);
1518                                            var N = new a(
1519                                                l,
1520                                                g ? n.tokenize(b, g) : b,
1521                                                d,
1522                                                b,
1523                                                h
1524                                            );
1525                                            S.push(N),
1526                                                O && S.push(O),
1527                                                Array.prototype.splice.apply(
1528                                                    r,
1529                                                    S
1530                                                );
1531                                        }
1532                                    }
1533                                }
1534                            }
1535                        }
1536                    return r;
1537                },
1538                hooks: {
1539                    all: {},
1540                    add: function (e, t) {
1541                        var a = n.hooks.all;
1542                        (a[e] = a[e] || []), a[e].push(t);
1543                    },
1544                    run: function (e, t) {
1545                        var a = n.hooks.all[e];
1546                        if (a && a.length)
1547                            for (var r, i = 0; (r = a[i++]); ) r(t);
1548                    }
1549                }
1550            }),
1551            a = (n.Token = function (e, t, n, a, r) {
1552                (this.type = e),
1553                    (this.content = t),
1554                    (this.alias = n),
1555                    (this.length = 0 | (a || "").length),
1556                    (this.greedy = !!r);
1557            });
1558        if (
1559            ((a.stringify = function (e, t, r) {
1560                if ("string" == typeof e) return e;
1561                if ("Array" === n.util.type(e))
1562                    return e
1563                        .map(function (n) {
1564                            return a.stringify(n, t, e);
1565                        })
1566                        .join("");
1567                var i = {
1568                    type: e.type,
1569                    content: a.stringify(e.content, t, r),
1570                    tag: "span",
1571                    classes: ["token", e.type],
1572                    attributes: {},
1573                    language: t,
1574                    parent: r
1575                };
1576                if (
1577                    ("comment" == i.type && (i.attributes.spellcheck = "true"),
1578                    e.alias)
1579                ) {
1580                    var l =
1581                        "Array" === n.util.type(e.alias) ? e.alias : [e.alias];
1582                    Array.prototype.push.apply(i.classes, l);
1583                }
1584                n.hooks.run("wrap", i);
1585                var o = Object.keys(i.attributes)
1586                    .map(function (e) {
1587                        return (
1588                            e +
1589                            '="' +
1590                            (i.attributes[e] || "").replace(/"/g, "&quot;") +
1591                            '"'
1592                        );
1593                    })
1594                    .join(" ");
1595                return (
1596                    "<" +
1597                    i.tag +
1598                    ' class="' +
1599                    i.classes.join(" ") +
1600                    '"' +
1601                    (o ? " " + o : "") +
1602                    ">" +
1603                    i.content +
1604                    "</" +
1605                    i.tag +
1606                    ">"
1607                );
1608            }),
1609            !_self.document)
1610        )
1611            return _self.addEventListener
1612                ? (_self.addEventListener(
1613                      "message",
1614                      function (e) {
1615                          var t = JSON.parse(e.data),
1616                              a = t.language,
1617                              r = t.code,
1618                              i = t.immediateClose;
1619                          _self.postMessage(n.highlight(r, n.languages[a], a)),
1620                              i && _self.close();
1621                      },
1622                      !1
1623                  ),
1624                  _self.Prism)
1625                : _self.Prism;
1626        var r =
1627            document.currentScript ||
1628            [].slice.call(document.getElementsByTagName("script")).pop();
1629        return (
1630            r &&
1631                ((n.filename = r.src),
1632                document.addEventListener &&
1633                    !r.hasAttribute("data-manual") &&
1634                    ("loading" !== document.readyState
1635                        ? window.requestAnimationFrame
1636                            ? window.requestAnimationFrame(n.highlightAll)
1637                            : window.setTimeout(n.highlightAll, 16)
1638                        : document.addEventListener(
1639                              "DOMContentLoaded",
1640                              n.highlightAll
1641                          ))),
1642            _self.Prism
1643        );
1644    })();
1645"undefined" != typeof module && module.exports && (module.exports = Prism),
1646    "undefined" != typeof global && (global.Prism = Prism);
1647(Prism.languages.markup = {
1648    comment: /<!--[\w\W]*?-->/,
1649    prolog: /<\?[\w\W]+?\?>/,
1650    doctype: /<!DOCTYPE[\w\W]+?>/i,
1651    cdata: /<!\[CDATA\[[\w\W]*?]]>/i,
1652    tag: {
1653        pattern:
1654            /<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,
1655        inside: {
1656            tag: {
1657                pattern: /^<\/?[^\s>\/]+/i,
1658                inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ }
1659            },
1660            "attr-value": {
1661                pattern: /=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,
1662                inside: { punctuation: /[=>"']/ }
1663            },
1664            punctuation: /\/?>/,
1665            "attr-name": {
1666                pattern: /[^\s>\/]+/,
1667                inside: { namespace: /^[^\s>\/:]+:/ }
1668            }
1669        }
1670    },
1671    entity: /&#?[\da-z]{1,8};/i
1672}),
1673    Prism.hooks.add("wrap", function (a) {
1674        "entity" === a.type &&
1675            (a.attributes.title = a.content.replace(/&amp;/, "&"));
1676    }),
1677    (Prism.languages.xml = Prism.languages.markup),
1678    (Prism.languages.html = Prism.languages.markup),
1679    (Prism.languages.mathml = Prism.languages.markup),
1680    (Prism.languages.svg = Prism.languages.markup);
1681(Prism.languages.css = {
1682    comment: /\/\*[\w\W]*?\*\//,
1683    atrule: {
1684        pattern: /@[\w-]+?.*?(;|(?=\s*\{))/i,
1685        inside: { rule: /@[\w-]+/ }
1686    },
1687    url: /url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
1688    selector: /[^\{\}\s][^\{\};]*?(?=\s*\{)/,
1689    string: {
1690        pattern: /("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,
1691        greedy: !0
1692    },
1693    property: /(\b|\B)[\w-]+(?=\s*:)/i,
1694    important: /\B!important\b/i,
1695    function: /[-a-z0-9]+(?=\()/i,
1696    punctuation: /[(){};:]/
1697}),
1698    (Prism.languages.css.atrule.inside.rest = Prism.util.clone(
1699        Prism.languages.css
1700    )),
1701    Prism.languages.markup &&
1702        (Prism.languages.insertBefore("markup", "tag", {
1703            style: {
1704                pattern: /(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,
1705                lookbehind: !0,
1706                inside: Prism.languages.css,
1707                alias: "language-css"
1708            }
1709        }),
1710        Prism.languages.insertBefore(
1711            "inside",
1712            "attr-value",
1713            {
1714                "style-attr": {
1715                    pattern: /\s*style=("|').*?\1/i,
1716                    inside: {
1717                        "attr-name": {
1718                            pattern: /^\s*style/i,
1719                            inside: Prism.languages.markup.tag.inside
1720                        },
1721                        punctuation: /^\s*=\s*['"]|['"]\s*$/,
1722                        "attr-value": {
1723                            pattern: /.+/i,
1724                            inside: Prism.languages.css
1725                        }
1726                    },
1727                    alias: "language-css"
1728                }
1729            },
1730            Prism.languages.markup.tag
1731        ));
1732Prism.languages.clike = {
1733    comment: [
1734        { pattern: /(^|[^\\])\/\*[\w\W]*?\*\//, lookbehind: !0 },
1735        { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0 }
1736    ],
1737    string: {
1738        pattern: /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
1739        greedy: !0
1740    },
1741    "class-name": {
1742        pattern:
1743            /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,
1744        lookbehind: !0,
1745        inside: { punctuation: /(\.|\\)/ }
1746    },
1747    keyword:
1748        /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
1749    boolean: /\b(true|false)\b/,
1750    function: /[a-z0-9_]+(?=\()/i,
1751    number: /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,
1752    operator: /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
1753    punctuation: /[{}[\];(),.:]/
1754};
1755(Prism.languages.javascript = Prism.languages.extend("clike", {
1756    keyword:
1757        /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,
1758    number: /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,
1759    function: /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i,
1760    operator: /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*\*?|\/|~|\^|%|\.{3}/
1761})),
1762    Prism.languages.insertBefore("javascript", "keyword", {
1763        regex: {
1764            pattern:
1765                /(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,
1766            lookbehind: !0,
1767            greedy: !0
1768        }
1769    }),
1770    Prism.languages.insertBefore("javascript", "string", {
1771        "template-string": {
1772            pattern: /`(?:\\\\|\\?[^\\])*?`/,
1773            greedy: !0,
1774            inside: {
1775                interpolation: {
1776                    pattern: /\$\{[^}]+\}/,
1777                    inside: {
1778                        "interpolation-punctuation": {
1779                            pattern: /^\$\{|\}$/,
1780                            alias: "punctuation"
1781                        },
1782                        rest: Prism.languages.javascript
1783                    }
1784                },
1785                string: /[\s\S]+/
1786            }
1787        }
1788    }),
1789    Prism.languages.markup &&
1790        Prism.languages.insertBefore("markup", "tag", {
1791            script: {
1792                pattern: /(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,
1793                lookbehind: !0,
1794                inside: Prism.languages.javascript,
1795                alias: "language-javascript"
1796            }
1797        }),
1798    (Prism.languages.js = Prism.languages.javascript);
1799
1800function modifyStoreLinks() {
1801    if (window.mgLoginStatus && window.mgLoginStatus.IsLoggedIn) {
1802        $("a").each(function (i) {
1803            var href = this.href;
1804
1805            if (
1806                href == "http://learn.asge.org/" ||
1807                href == "https://learn.asge.org/"
1808            ) {
1809                this.href = "https://learn.asge.org/Users/Home.aspx";
1810            }
1811
1812            if (
1813                this.hostname == "learn.asge.org" &&
1814                this.pathname.indexOf("/URL/Product/") > -1
1815            ) {
1816                var productCode = this.pathname.split("/").pop();
1817                this.pathname = "/URL/Authenticated/Product/" + productCode;
1818            }
1819
1820            if (
1821                this.hostname == "learn.asge.org" &&
1822                this.pathname.indexOf("/Public/Catalog/Home.aspx") > -1
1823            ) {
1824                this.href =
1825                    this.protocol +
1826                    "//" +
1827                    this.hostname +
1828                    "/Users/Catalog.aspx" +
1829                    this.search;
1830            }
1831        });
1832    }
1833}
1834
1835/**
1836 * The SF login status JS (customized) will call this function after getting the user's login status.
1837 * It will set the result in window.mgLoginStatus.
1838 */
1839window.doActionsAfterLogin = function () {
1840    modifyStoreLinks();
1841};

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.