1this["intel"] = this["intel"] || {}; 2this["intel"]["search"] = this["intel"]["search"] || {}; 3this["intel"]["search"]["templates"] = this["intel"]["search"]["templates"] || {};; 4 5/** 6 * Do not Remove this comment. This would be useful during handlebars upgrade. 7 * The Handlebars template that is used to compile is 8 * "<ul>{{#each results}}<li><a href=\"{{url}}\">{{title}}</a></li>{{/each}}</ul>" 9 * The above compiled template is used in Handlebars.template(<<compiled code>>) 10 */ 11this["intel"]["search"]["templates"]["search_typeahead"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 12 var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { 13 if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { 14 return parent[propertyName]; 15 } 16 return undefined 17 }; 18 19 return "<li><a href=\"" 20 + alias4(((helper = (helper = lookupProperty(helpers,"url") || (depth0 != null ? lookupProperty(depth0,"url") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"url","hash":{},"data":data,"loc":{"start":{"line":1,"column":35},"end":{"line":1,"column":42}}}) : helper))) 21 + "\">" 22 + alias4(((helper = (helper = lookupProperty(helpers,"title") || (depth0 != null ? lookupProperty(depth0,"title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data,"loc":{"start":{"line":1,"column":45},"end":{"line":1,"column":54}}}) : helper))) 23 + "</a></li>"; 24 },"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { 25 var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { 26 if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { 27 return parent[propertyName]; 28 } 29 return undefined 30 }; 31 32 return "<ul>" 33 + ((stack1 = lookupProperty(helpers,"each").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"results") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":72}}})) != null ? stack1 : "") 34 + "</ul>"; 35 },"useData":true}); 36'use strict'; 37 38var intel = intel || {}; 39 40intel.navbar = (function ($) { 41 42 var _elements = { 43 body: null, 44 activeControl: null, 45 clickedControl: null, 46 megaMobilePanel: null, 47 megaRightPanels: null, 48 megaMenuControls: null, 49 megaSearchControl: null, 50 megaSearchPanel: null, 51 closePanelControls: null, 52 root: null, 53 searchResults: null, 54 searchRelated: null, 55 searchInput: null, 56 primaryNavbar: null, 57 primaryNavItems: null, 58 moreMenuItem: null, 59 moreMenuListing: null, 60 hamburgerControl: null, 61 moreControl: null 62 }; 63 64 var _classes = { 65 component: "intel-navbar", 66 navbarRight: "navbar-right", 67 primaryNav: "primary-nav", 68 megaPanel: "mega-panel", 69 megaL1MenuPanel: "mega-menu-collapse", 70 megaMenuControls: "[data-mega-control]", 71 closePanelControls: "[data-mega-close]", 72 searchPanel: "mega-search-panel", 73 searchMenuControl: "[data-mega-control='global-search']", 74 moreControl: "[data-mega-control='more-l1']", 75 moreMenuItem: "primary-nav-item-more", 76 moreMenuListing: "mega-navbar-more-list", 77 hamburgerControl: "[data-mega-control='hamburger']", 78 megaMenuOpen: "mega-menu-open", 79 primaryNavbar: "navbar-left", 80 primaryNavItem: "primary-nav-item", 81 navLinkPrimary: "nav-link-primary", 82 hasMoreNav: "has-more-nav", 83 active: "active", 84 loggedIn: "logged-in", 85 open: "open", 86 noTransition: "no-transition" 87 }; 88 89 // navbar controls indicated by [data-mega-control=*] 90 var megaControls = { 91 HAMBURGER: "hamburger", 92 SIGN_IN: "signin", 93 LANGUAGE: "language-selector", 94 SEARCH: "global-search", 95 SEARCH_INPUT: "global-search-input", 96 MORE_L1: "more-l1", 97 L1: "l1" 98 }; 99 100 var windowWidth = 0; 101 102 /** 103 * Init the intel.navbar component 104 */
105 function init() { 106 if(globalHeader.initializeNewGlobalNav) { 107 mapElementsAndEvents(); 108 } 109 else { 110 $(document).on("initializeGlobalNav", function () { 111 mapElementsAndEvents(); 112 }); 113 } 114 } 115 116 function mapElementsAndEvents(){ 117 _elements.body = $("body"); 118 _elements.root = $("." + _classes.component); 119 if (!_elements.root.length) { 120 return; 121 } 122 123 // mega-panels and controls 124 _elements.megaMobilePanel = _elements.root.find("#" + _classes.primaryNav); 125 _elements.megaRightPanels = _elements.root.find("." + _classes.navbarRight + " ." + _classes.megaPanel).not("." + _classes.searchPanel); 126 _elements.megaMenuControls = _elements.root.find(_classes.megaMenuControls); 127 _elements.megaSearchPanel = _elements.root.find("." + _classes.searchPanel); 128 _elements.closePanelControls = _elements.root.find(_classes.closePanelControls); 129 _elements.megaMobileCollapsingPanels = _elements.megaRightPanels.add(_elements.megaMobilePanel); 130 131 // navbar-left 132 _elements.primaryNavbar = _elements.root.find("." + _classes.primaryNavbar); 133 _elements.primaryNavItems = _elements.primaryNavbar.find("." + _classes.primaryNavItem); 134 _elements.moreMenuItem = _elements.primaryNavItems.filter("." + _classes.moreMenuItem); 135 _elements.moreMenuListing = _elements.moreMenuItem.find("." + _classes.moreMenuListing); 136 137 // special menu control 138 _elements.hamburgerControl = _elements.megaMenuControls.filter(_classes.hamburgerControl); 139 _elements.moreControl = _elements.megaMenuControls.filter(_classes.moreControl); 140 _elements.megaSearchControl = _elements.megaMenuControls.filter(_classes.searchMenuControl); 141 142 // global search element 143 _elements.searchResults = _elements.megaSearchPanel.find("[data-igm-search-results]"); 144 _elements.searchRelated = _elements.megaSearchPanel.find("[data-igm-search-related]"); 145 _elements.searchInput = _elements.megaSearchPanel.find("[data-igm-search-input]"); 146 147 _initMegaMenu(); 148 intel?.signinHeaderSimplify?.initialize(); 149 150 //Handle all resize events using the single global performant resize handler. 151 intel.appCore.registerResizeHandler(_resizeHandler); 152 } 153 154 /** 155 * initialize mega menu events 156 * 157 * @private 158 */ 159 function _initMegaMenu() { 160 161 _elements.megaMenuControls.on("click", _handleMenuControlClick); 162 _elements.searchInput.on("focus", _handleSearchFocusState); 163 _elements.closePanelControls.on("click", _closeActiveMegaPanel); 164 165 _elements.megaSearchPanel.on("hide.bs.collapse", {state: "hide"}, _handleSearchPanelHeight); 166 _elements.megaSearchPanel.on("show.bs.collapse", {state: "show"}, _handleSearchPanelHeight); 167 168 _elements.megaSearchPanel.on("show.bs.collapse", {state: "showing"}, _handleMobilePanelCollaping); 169 _elements.megaSearchPanel.on("shown.bs.collapse", {state: "shown"}, _handleMobilePanelCollaping); 170 171 _elements.megaMobileCollapsingPanels.on("hide.bs.collapse", {state: "hiding"}, _handleMobilePanelCollaping); 172 _elements.megaMobileCollapsingPanels.on("hidden.bs.collapse", {state: "hidden"}, _handleMobilePanelCollaping); 173 174 // click outside the mega menu will close 175 $(document).on('click', _handleMenuClickOutside); 176 $(document).on("click", "[data-activate-igm-search-toggle]", _activateOldMegaControl); 177 $(document).on("click", "[data-activate-mega-control]", _activateMegaControl); 178 } 179 180 181 /** 182 * handle resize event 183 * 184 * @private 185 */ 186 function _resizeHandler() { 187 188 if( windowWidth === $(window).width()) { 189 return; 190 } 191 windowWidth = $(window).width(); 192 // handle reszie when menu menu is open and is desktop 193 if (_elements.activeControl ) { 194 _handleViewportChangeActiveControl(); 195 } 196 197 _setPrimaryNavMoreItemsDisplay(); 198 } 199 200 /** 201 * Close the current active L1 menu control 202 */ 203 function _closeCurrentActiveL1Control() { 204 var l1ActiveControl = _elements.megaMenuControls.filter("." + _classes.navLinkPrimary + "." + _classes.active).not(_classes.moreControl); 205 if (l1ActiveControl.length) { 206 _toggleControlState(l1ActiveControl, false); 207 var previousActivePanel = $(l1ActiveControl.data('bs-target')); 208 var show = false;
209 _setPanelState(previousActivePanel, show); 210 } 211 } 212 213 /** 214 * Close and reset Active control due to viewport change 215 */ 216 function _handleViewportChangeActiveControl() { 217 if ( 218 (_elements.activeControl.is(_elements.hamburgerControl) && intel.breakpoints.getBreakpointNumber() > 1) || 219 _elements.activeControl.is(_elements.moreControl) 220 ) { 221 _closeCurrentActiveL1Control(); 222 } 223 _closeActiveMegaPanel(); 224 } 225 226 /** 227 * Setting the "More +" display when viewport change 228 */ 229 function _setPrimaryNavMoreItemsDisplay() { 230 231 // remove more items to restart 232 _removeMoreNavItems(); 233 234 if (intel.breakpoints.getBreakpointNumber() < 2) { 235 return; 236 } 237 238 var navbarWidth = _elements.primaryNavbar.width(); 239 var overflowItemIndex = -1; 240 var navItemWidth = 0; 241 _elements.primaryNavItems.each(function(index, item) { 242 navItemWidth += $(item).outerWidth(true); 243 if (navItemWidth > navbarWidth) { 244 overflowItemIndex = index; 245 navItemWidth = navItemWidth - $(item).outerWidth(true); 246 return false; 247 } 248 }); 249 250 // got overflow item 251 if (overflowItemIndex > -1) { 252 // check if the more + item will overflow 253 _elements.moreMenuItem.addClass("invisible").removeClass("d-none").offsetHeight; 254 navItemWidth += _elements.moreMenuItem.outerWidth(true); 255 if (navItemWidth > navbarWidth) { 256 overflowItemIndex -= 1; 257 } 258 _elements.moreMenuItem.addClass("d-none").removeClass("invisible"); 259 _buildMoreNavItems(overflowItemIndex); 260 } 261 } 262 263 /** 264 * Move the L1 menu items to "More +" control with the index provided 265 * 266 * @param {Integer} moreStartIndex 267 */ 268 function _buildMoreNavItems(moreStartIndex) { 269 var moreItems = _elements.primaryNavItems.filter(function(index, item) { 270 return index >= moreStartIndex && !$(item).hasClass(_classes.moreMenuItem); 271 }); 272 273 if (moreItems.length) { 274 _elements.moreMenuListing.append(moreItems); 275 _elements.moreMenuItem.removeClass("d-none"); 276 _elements.megaMobilePanel.addClass(_classes.hasMoreNav); 277 } 278 } 279 280 /** 281 * remove any items within the "More +" control 282 */ 283 function _removeMoreNavItems() { 284 var moreItems = _elements.moreMenuListing.find("." + _classes.primaryNavItem); 285 if (moreItems.length) { 286 moreItems.insertBefore(_elements.moreMenuItem); 287 } 288 _elements.megaMobilePanel.removeClass(_classes.hasMoreNav); 289 _elements.moreMenuItem.addClass("d-none"); 290 } 291 292 /** 293 * Handle menu click outside to close the mega menu in tablet viewport or higher 294 * 295 * @param {object} evt 296 */ 297 function _handleMenuClickOutside(evt) { 298 299 if ($(evt.target).closest(".intel-navbar").length < 1 && intel.breakpoints.getBreakpointNumber() > 1) { 300 _closeActiveMegaPanel(); 301 } 302 } 303 304 /** 305 * Set the height of the search panel to the document's height 306 * 307 * @param {object} evt 308 */ 309 function _handleSearchPanelHeight(evt) { 310 if (evt.data.state === "show") { 311 _elements.megaSearchPanel.css({minHeight: $(document).innerHeight() + "px"}); 312 } else { 313 _elements.megaSearchPanel.css({minHeight: ""}); 314 } 315 } 316 317 function _handleMobilePanelCollaping(evt) { 318 if (intel.breakpoints.getBreakpointNumber() > 1) { 319 return; 320 } 321 var $thisPanel = $(evt.currentTarget); 322 switch(evt.data.state) { 323 case "hiding": 324 $thisPanel.addClass("hiding"); 325 break; 326 case "showing": 327 window.setTimeout(function(){ 328 $thisPanel.addClass("showing"); 329 }, 50); 330 break; 331 default: 332 $thisPanel.removeClass("hiding showing"); 333 } 334 } 335 336 /** 337 * Handle search input focus on tablet viewport of higher 338 */ 339 function _handleSearchFocusState() { 340 // close any active panel that is not search 341 // set search as active 342 if (intel.breakpoints.getBreakpointNumber() < 2) { 343 return true; 344 } 345 var show = true; 346 _handleCurrentOpenControl(_elements.megaSearchControl); 347 _toggleControlState(_elements.megaSearchControl, show); 348 _setActiveControl(_elements.megaSearchControl); 349 _setPanelState($(_elements.megaSearchControl.data('bs-target')), show); 350 } 351 352 /** 353 * Indicate if the active control is either hamburger control or "More +" control 354 * 355 * @return {boolean} isSpecial 356 */ 357 function _isActiveControlSpecial() { 358 var isSpecial = false;
359 if (_elements.activeControl && 360 ( 361 _elements.activeControl.is(_elements.hamburgerControl) || 362 _elements.activeControl.is(_elements.moreControl) 363 ) 364 ) { 365 isSpecial = true; 366 } 367 return isSpecial; 368 } 369 370 /** 371 * The newly clicked control is inside the special 372 * @param {} $newControl 373 */ 374 function _isNewControlContainsInsideSpecial($newControl) { 375 var isInside = false; 376 377 if (!_isActiveControlSpecial()) { 378 return isInside; 379 } 380 381 if (_elements.activeControl.is(_elements.hamburgerControl)) { 382 isInside = $newControl.data("mega-control") === "l1"; 383 } else if (_elements.activeControl.is(_elements.moreControl)) { 384 isInside = $.contains(_elements.moreMenuItem.get(0), $newControl.get(0)) 385 } 386 return isInside; 387 } 388 389 /** 390 * Handle the current Active Control base on viewport 391 * 392 * @param {object} $newControl 393 */ 394 function _handleCurrentOpenControl($newControl) { 395 if (!_elements.activeControl || $newControl.is(_elements.activeControl)) { 396 return; 397 } 398 399 if (_isNewControlContainsInsideSpecial($newControl)) { 400 var l1ActiveControl = _elements.megaMenuControls.filter("." + _classes.navLinkPrimary + "." + _classes.active).not(_classes.moreControl); 401 if (l1ActiveControl.length && !l1ActiveControl.is($newControl)) { 402 _closeCurrentActiveL1Control(); 403 } 404 } else { 405 _closeActiveMegaPanel(); 406 } 407 } 408 409 /** 410 * Hide the global search results content area 411 */ 412 function _hideSearchResultsPanel() { 413 _elements.searchRelated.removeClass("show"); 414 _elements.searchResults.removeClass("show"); 415 } 416 417 /** 418 * handle the removal of the mega-menu-open class 419 */ 420 function _handleBodyMenuRemoveClass() { 421 // if mobile and is l1 level, don't remove the mega menu 422 if (intel.breakpoints.getBreakpointNumber() < 2 && _elements.clickedControl.data('mega-control') === megaControls.L1) { 423 return; 424 } 425 426 _elements.body.removeClass(_classes.megaMenuOpen); 427 } 428 429 /** 430 * Hide / Show passed in Mega Panel 431 * 432 * @param {object} $panel 433 * @param {boolean} show 434 */ 435 function _setPanelState($panel, show) { 436 if ($panel.length < 1) { 437 return; 438 } 439 440 if (show) { 441 $panel.collapse("show"); 442 _elements.body.addClass(_classes.megaMenuOpen); 443 // if panel is search / mobile / input not focus 444 if ($panel.is(_elements.megaSearchPanel) && intel.breakpoints.getBreakpointNumber() < 2 && !_elements.searchInput.is(":focus")) { 445 window.setTimeout(function() { 446 _elements.searchInput.focus(); 447 }, 35); 448 } 449 } else { 450 $panel.collapse("hide"); 451 if ($panel.is(_elements.megaSearchPanel)) { 452 _hideSearchResultsPanel(); 453 } 454 _handleBodyMenuRemoveClass(); 455 } 456 } 457 458 /** 459 * Return a boolean to indicate if hamburger menu control is active 460 * 461 * @return {boolean} 462 */ 463 function isMobileMegaMenuActive() { 464 var active = false; 465 // if not mobile screen return false 466 if (intel.breakpoints.getBreakpointNumber() > 1) { 467 return active; 468 } 469 470 // mobile screen 471 if (_elements.activeControl && _elements.activeControl.is(_elements.hamburgerControl)) { 472 active = true; 473 } 474 475 return active; 476 } 477 478 /** 479 * Setting the passed control as the current Active L1 control 480 * 481 * @param {object} $newControl 482 */ 483 function _setActiveControl($newControl) { 484 485 _elements.clickedControl = $newControl; 486 487 if ($newControl === null) { 488 _elements.activeControl = null; 489 return; 490 } 491 // if mega menu is open and new control is l1, bail 492 if (isMobileMegaMenuActive() && $newControl.data('mega-control') === megaControls.L1) { 493 return; 494 } 495 496 // if more + control, set it 497 if ($newControl.is(_elements.moreControl)) { 498 _elements.activeControl = $newControl; 499 return; 500 } 501 502 var l1 = _elements.moreMenuItem.get(0); 503 // if L1 within More+, bail 504 if (l1 && $.contains(l1, $newControl.get(0))) { 505 return; 506 } 507 _elements.activeControl = $newControl; 508 509 } 510 511 /** 512 * Setting the aria attribute for the Control toggle function along with proper class 513 * 514 * @param {object} $thisControl 515 * @param {boolean} show 516 */ 517 function _toggleControlState($thisControl, show) { 518 if (show) { 519 $thisControl.removeClass('collapsed').addClass("active"); 520 $thisControl.attr('aria-expanded', true); 521 } else { 522 $thisControl.addClass('collapsed').removeClass("active"); 523 $thisControl.attr('aria-expanded', false); 524 } 525 } 526
527 /** 528 * Handle the control click event on L1 leval of the Mega Menu 529 * 530 * @param {object} evt 531 */ 532 function _handleMenuControlClick(evt) { 533 var $thisControl = $(evt.currentTarget); 534 _handleCurrentOpenControl($thisControl); 535 536 _setActiveControl($thisControl); 537 var show = $thisControl.hasClass('collapsed'); 538 539 _toggleControlState($thisControl, show); 540 541 // show panel 542 if (show) { 543 _setPanelState($($thisControl.data('bs-target')), show); 544 $(document).on("keyup", _escapeKeypress); 545 } else { 546 // hide panel 547 _setPanelState($($thisControl.data('bs-target')), show); 548 $(document).off("keyup", _escapeKeypress); 549 // if the activeControl is more, collapse the open state inside more 550 if (_elements.activeControl.is(_elements.moreControl) || _elements.activeControl.is(_elements.hamburgerControl)) { 551 _closeCurrentActiveL1Control(); 552 } 553 if (_isActiveControlSpecial() && _elements.activeControl.is($thisControl)) { 554 _setActiveControl(null); 555 } 556 } 557 } 558 559 /** 560 * Handle escape keypress to close Megapanel 561 */ 562 function _escapeKeypress(e) { 563 if(e.key === "Escape") { 564 _closeActiveMegaPanel(); 565 } 566 } 567 568 /** 569 * Close the current Active Panel 570 */ 571 function _closeActiveMegaPanel() { 572 if (!_elements.activeControl) { 573 return; 574 } 575 _toggleControlState(_elements.activeControl, false); 576 var previousActivePanel = $(_elements.activeControl.data('bs-target')); 577 var show = false; 578 _setPanelState(previousActivePanel, show); 579 $(document).off("keyup", _escapeKeypress); 580 _elements.body.removeClass("search-overlay-open"); 581 582 // if the activeControl is more, collapse the open state inside more 583 if (_elements.activeControl.is(_elements.moreControl) || _elements.activeControl.is(_elements.hamburgerControl)) { 584 _closeCurrentActiveL1Control(); 585 } 586 } 587 588 /** 589 * Locate the control target of the Mega Control panel and activate it when found 590 * 591 * @param {string} controlTarget 592 */ 593 function _activateTargetedControl(controlTarget) { 594 var $megaControl = _elements.megaMenuControls.filter("[data-mega-control='" + controlTarget + "']"); 595 596 if ($megaControl.length) { 597 $megaControl.click(); 598 } 599 } 600 601 /** 602 * Activate global menu panel with previous global header control with data-activate-igm-search-toggle attribute 603 * with the following class names: 604 * 1) login-toggle, 2) language-selector-toggle, 3) search-button 605 * 606 * @param {object} evt 607 */ 608 function _activateOldMegaControl(evt) { 609 var $thisControl = $(evt.currentTarget); 610 var oldClass = { 611 "login-toggle": megaControls.SIGN_IN, 612 "language-selector-toggle": megaControls.LANGUAGE, 613 "search-button": megaControls.SEARCH 614 }; 615 var controlTarget; 616 $.each(oldClass, function(key, value) { 617 if ($thisControl.hasClass(key)) { 618 controlTarget = value; 619 return false; 620 } 621 }); 622 623 if (controlTarget) { 624 _activateTargetedControl(controlTarget); 625 } 626 } 627 628 /** 629 * Activate the New Mega Panel with data-activate-mega-control="control_value" 630 * control_value are: 1) signin, 2)language-selector, 3) global-search 631 * 632 * @param {object} evt 633 */ 634 function _activateMegaControl(evt) { 635 var $thisControl = $(evt.currentTarget); 636 var controlTarget = $thisControl.data('activate-mega-control'); 637 _activateTargetedControl(controlTarget); 638 } 639 640 641 return { 642 initialize: init 643 }; 644 645})(jQuery); 646 647jQuery(document).ready(intel.navbar.initialize); 648 649'use strict'; 650 651var intel = intel || {}; 652intel.constant2 = { 653 cookie: { 654 SEARCHTERMS: "intel_searchTerms" 655 }, 656 view: { 657 658 }, 659 event: { 660 SEARCHTERMSUPDATED: 'intel.searchTerms.updated', 661 SEARCHTERMANDCATEGORY: "intel.search.searchTermAndCategory", 662 PRODUCT_GALLERY_CLOSED: 'intel.productMasthead.galleryClosed', 663 PRODUCT_MASTHEAD_UPDATED: 'intel.productMasthead.updated', 664 PAGING_PAGE_UPDATED: "intel.paging.updated", 665 PAGING_PAGE_TOGGLED: "intel.paging.toggled" 666 }, 667 misc: { 668 maxSavedSearchTerm: 5, 669 maxSavedSearchPage: 2 670 } 671}; 672// navbar.js 673'use strict'; 674 675var intel = intel || {}; 676intel.searchTermsManager = (function () { 677 678 var searchedTerms = []; 679 680 var _max = { 681 searchedTerms: 5, 682 savedPage: 2 683 }; 684 685 var _searchCookie; 686
687 function init() { 688 _searchCookie = intel.constant2.cookie.SEARCHTERMS; 689 searchedTerms = window.localStorage.getItem(_searchCookie); 690 if (searchedTerms) { 691 searchedTerms = JSON.parse(searchedTerms); 692 } else { 693 searchedTerms = []; 694 } 695 } 696 697 function getTerms() { 698 return searchedTerms; 699 } 700 701 function adjustMaxItems() { 702 searchedTerms.splice(_max.searchedTerms); 703 } 704 705 function findTermIndex(term) { 706 var len = searchedTerms.length; 707 var termIndex = -1; 708 // check if term exists before 709 for (var i = 0; i < len; i++) { 710 var thisTerm = searchedTerms[i]; 711 if (thisTerm.toLowerCase() === term.toLowerCase()) { 712 termIndex = i; 713 break; 714 } 715 } 716 return termIndex; 717 } 718 719 function saveTermToCookie() { 720 window.localStorage.setItem(_searchCookie, JSON.stringify(searchedTerms)); 721 } 722 723 function saveTerm (term) { 724 var termIndex = findTermIndex(term); 725 if (termIndex > -1) { 726 searchedTerms.move(termIndex, 0); 727 } else { 728 searchedTerms.unshift(term); 729 } 730 adjustMaxItems(); 731 saveTermToCookie(); 732 } 733 734 // remove savePage function 735 function savePage() { 736 } 737 738 return { 739 initialize: init, 740 getTerms: getTerms, 741 saveTerm: saveTerm, 742 savePage: savePage 743 }; 744 745})(); 746 747jQuery(document).ready(intel.searchTermsManager.initialize); 748 749// intel.search-dropdown.js 750'use strict'; 751 752var intel = intel || {}; 753intel.searchDropdown2 = (function ($) { 754 755 var _classes = { 756 searchComponent: "search-component", 757 searchInput: "[data-search-input]", 758 resultsTypeahead: "results-typeahead", 759 resultsRecent: "results-recent", 760 resultOverlay: "results-overlay", 761 overlayToggle: "close-result-toggle", 762 searchOverlayOpen: "search-overlay-open", 763 suggestionsContainer: "content-quick-search", 764 searchFocusOn: "focus-on" 765 }; 766 767 var MIN_SEARCH_CHAR = 1; 768 769 var $searchInputs, 770 $activeInput, 771 $activeTypeahead, 772 $activeRecent, 773 $activeComponent, 774 $activeSearchForm, 775 $searchComponent, 776 keypressBuffer, 777 isSearchApp = false; 778 779 780 function init() { 781 $searchComponent = $("." + _classes.searchComponent); 782 $searchInputs = $(_classes.searchInput, $searchComponent); 783 $searchInputs.on('keyup', onKeypressSearchInput); 784 $searchInputs.on("focus", showActiveRecent); 785 $searchInputs.on("blur", searchFocusOff); 786 $searchComponent.on("click", "." + _classes.overlayToggle, closeResultsOverlay); 787 } 788 789 function getActiveComponent(evt) { 790 $activeInput = $(evt.currentTarget); 791 $activeComponent = $activeInput.closest("." + _classes.searchComponent); 792 $activeSearchForm = $activeComponent.find("mobile-search"); 793 $activeTypeahead = $activeComponent.find("." + _classes.resultsTypeahead); 794 $activeRecent = $activeComponent.find("." + _classes.resultsRecent); 795 } 796 797 function onKeypressSearchInput(evt) { 798 getActiveComponent(evt); 799 var searchText = $activeInput.val(); 800 if (searchText.length < MIN_SEARCH_CHAR) { 801 closeTypeaheadDropdown(); 802 } else { 803 clearTimeout(keypressBuffer); 804 // if search app, close all of the overlays and let result handle the case 805 if (evt.which && evt.which === 13) { 806 $activeTypeahead.removeClass("show"); 807 $activeRecent.removeClass("show"); 808 setSearchOverlayBodyClass(); 809 } else { 810 keypressBuffer = setTimeout(intel.searchDropdown.handleSuggestions(searchText, null, null, false, renderSearchResults), 200); 811 } 812 } 813 if (searchText.length) { 814 $activeComponent.find("[data-search-clear]").removeClass("d-none"); 815 } else { 816 $activeComponent.find("[data-search-clear]").addClass("d-none"); 817 } 818 } 819 820 function setSearchOverlayBodyClass() { 821 if (($activeTypeahead && $activeTypeahead.hasClass("show")) || ($activeRecent && $activeRecent.hasClass("show"))) { 822 $("body").addClass(_classes.searchOverlayOpen); 823 } else { 824 $("body").removeClass(_classes.searchOverlayOpen); 825 } 826 } 827 828 function showActiveRecent(evt) { 829 window.setTimeout(function () { 830 getActiveComponent(evt); 831 $activeSearchForm.addClass(_classes.searchFocusOn); 832 var searchText = $activeInput.val(); 833 // if there is pre-existing search string, show recent searches instead of recent searches 834 if (searchText.length > 2 && !isSearchApp) { 835 $activeRecent.removeClass("show"); 836 $activeTypeahead.addClass("show"); 837 } else { 838 $activeTypeahead.removeClass("show"); 839 $activeRecent.addClass("show"); 840 } 841 setSearchOverlayBodyClass(); 842 }, 50); 843 } 844
845 function renderSearchResults(data) { 846 const arkPattern = new RegExp("/content/www/[A-Za-z]{2}/[A-Za-z]{2}/ark((.html)|(/))"); 847 const careSecurePattern = new RegExp("/content/www/[A-Za-z]{2}/[A-Za-z]{2}/secure/care((.html)|(/))"); 848 const markSecurePattern = new RegExp("/content/www/[A-Za-z]{2}/[A-Za-z]{2}/secure/mark((.html)|(/))"); 849 const currentUrl = isDataValid(window.location.pathname); 850 const arkPatternMatch = arkPattern.test(currentUrl); 851 const carePatternMatch = careSecurePattern.test(currentUrl); 852 const markPatternMatch = markSecurePattern.test(currentUrl); 853 const arkCareMarkPatternMatch = arkPatternMatch || carePatternMatch || markPatternMatch; 854 const productsTabFilter = '&f:@tabfilter=[Products]'; 855 if ($activeInput.val()) { 856 openTypeaheadDropdown(); 857 var baseUrl = window.location.protocol + "//" + window.location.host + globalSearch.langRootPath + "/" + globalSearch.defaultPage; 858 if(intel.isIGHFCall) { 859 baseUrl = "https://www.intel.com" + globalSearch.langRootPath + "/" + globalSearch.defaultPage; 860 } 861 var json = {}; 862 var results = []; 863 if (data && data.completions.length > 0) { 864 for (var j = 0; j < data.completions.length; j++) { 865 var element = {}; 866 element.title = data.completions[j].expression.replace(/<\/?[^>]+>/gi, ''); 867 if (arkCareMarkPatternMatch) { 868 element.url = baseUrl + "?ws=typeahead" + "#q=" + data.completions[j].expression + productsTabFilter; 869 } else { 870 element.url = baseUrl + "?ws=typeahead" + "#q=" + data.completions[j].expression + "&t=All"; 871 } 872 results.push(element); 873 } 874 } 875 json.results = results; 876 var $markup = $(intel.search.templates.search_typeahead(json)); 877 $activeTypeahead.find(".content-quick-search").html($markup); 878 } 879 } 880 881 function resetTypeahead() { 882 if ($activeTypeahead) { 883 $activeTypeahead.find(".content-quick-search").html(""); 884 $activeTypeahead.addClass("show"); 885 setSearchOverlayBodyClass(); 886 } 887 } 888 889 function openTypeaheadDropdown() { 890 resetTypeahead(); 891 if ($activeRecent) { 892 $activeRecent.removeClass("show"); 893 setSearchOverlayBodyClass(); 894 } 895 } 896 897 function closeTypeaheadDropdown() { 898 if ($activeTypeahead) { 899 $activeTypeahead.removeClass("show"); 900 } 901 902 if (!isSearchApp && $activeRecent) { 903 $activeRecent.addClass("show"); 904 } 905 setSearchOverlayBodyClass(); 906 } 907 908 function closeResultsOverlay() { 909 $("." + _classes.resultOverlay).removeClass("show"); 910 setSearchOverlayBodyClass(); 911 } 912 913 function searchFocusOff(evt) { 914 getActiveComponent(evt); 915 $activeSearchForm.removeClass(_classes.searchFocusOn); 916 917 } 918 919 return { 920 initialize: init, 921 showActiveRecent: showActiveRecent 922 } 923 924})(jQuery); 925 926jQuery(document).ready(intel.searchDropdown2.initialize); 927 928'use strict'; 929var intel = intel || {}; 930intel.siteSpecifics = (function () { 931 var SUPPORT_BREADCRUMB_QUERYSELECTOR = '.utilityBar #supportUtilityBar-1 #utility-bar'; 932 var NEW_NAV_REF; 933 934 function fixBreadcrumbComponentFor(querySelectorString, initialPosition) { 935 var breadCrumbComponent = document.querySelector(querySelectorString); 936 if(breadCrumbComponent) { 937 fixTopPosition(breadCrumbComponent, initialPosition); 938 window.addEventListener('scroll', function(e) { 939 fixTopPosition(breadCrumbComponent, initialPosition); 940 }); 941 } 942 } 943 944 function fixTopPosition(element, position) { 945 var lastScrollYPosition = window.scrollY; 946 if(document.getElementsByClassName('ie') && document.getElementsByClassName('ie').length > 0) { 947 lastScrollYPosition = window.pageYOffset; 948 } 949 if(lastScrollYPosition <= position) { 950 var topPosition = position - lastScrollYPosition + 'px'; 951 element.style.top = topPosition; 952 } else { 953 element.style.top = '0'; 954 } 955 } 956 957 function fixToTop_NewNav() { 958 var breadCrumbComponent = document.querySelector(SUPPORT_BREADCRUMB_QUERYSELECTOR); 959 960 if (breadCrumbComponent && NEW_NAV_REF) { 961 var offsetGlobal = document.getElementsByClassName("global")[0].getBoundingClientRect().top + document.documentElement.scrollTop;
962 var subNav = document.getElementsByClassName("secondary-nav")[0]; 963 if (subNav) { offsetGlobal += subNav.clientHeight } 964 fixTopPosition(breadCrumbComponent, NEW_NAV_REF.clientHeight + offsetGlobal); 965 } 966 } 967 968 function initialize() { 969 if (globalSearch.newNavRedesign) { 970 NEW_NAV_REF = document.getElementsByClassName("intel-navbar")[0]; 971 972 fixToTop_NewNav(); 973 window.addEventListener('scroll', fixToTop_NewNav); 974 window.addEventListener('resize', fixToTop_NewNav); 975 976 } 977 else { 978 fixBreadcrumbComponentFor(SUPPORT_BREADCRUMB_QUERYSELECTOR, 57); 979 } 980 } 981 982 return { 983 init: initialize 984 }; 985})(); 986window.addEventListener('DOMContentLoaded', function() { 987 intel.siteSpecifics.init(); 988}); 989 990if (globalSearch.advancedSearchFlag == 'true') { 991 992 var toggleSearch = false; 993 var mobileSearchIconClicked = false; 994 var currentWidth = window.innerWidth; 995 var closeClicked = false; 996 997 function clearSelection() { 998 document.querySelectorAll("#simplify-search input[type=checkbox]").forEach((checkBox) => { 999 checkBox.checked = false; 1000 }) 1001 document.querySelectorAll("#simplify-search select").forEach((checkBox) => { 1002 checkBox[0].selected = true; 1003 }) 1004 }; 1005 1006 function clearInput() { 1007 var searchInput = document.getElementById("mobile-search"); 1008 searchInput.value = ""; 1009 } 1010 1011 window.addEventListener('resize', function (event) { 1012 if (currentWidth != window.innerWidth) { 1013 currentWidth = window.innerWidth; 1014 if (window.innerWidth > 768) { 1015 clearInput(); 1016 mobileSearchIconClicked = false; 1017 $("#cls-btn-advanced").addClass("hide-flyout"); 1018 $(".mega-search-panel").removeClass("show"); 1019 } 1020 if (window.innerWidth > 768 && window.innerWidth < 992) { 1021 $(".btn-advance-filter").addClass("hide-flyout"); 1022 } 1023 if (window.innerWidth > 992) { 1024 $(".btn-advance-filter").addClass("hide-flyout"); 1025 } 1026 if (window.innerWidth < 768 && closeClicked == true) { 1027 $(".mega-search-panel").addClass("show"); 1028 } 1029 if (window.innerWidth < 768) { 1030 $("#simplify-search").addClass("hide-flyout"); 1031 } 1032 } 1033 }, true); 1034 1035 $(".mega-search-form").on('focusout', (event) => { 1036 if (!mobileSearchIconClicked) { 1037 $(".mega-search-form").removeClass("focus-on"); 1038 } 1039 }); 1040 1041 window.onload = function () { 1042 clearSelection(); 1043 }; 1044 1045 $(".mega-search-form").on('click', function (e) { 1046 $(".btn-advance-filter").addClass("hide-flyout"); 1047 $(".btn-mega-close").removeClass("mobile-advanced"); 1048 $(".results-typeahead").css({ display: "none" }); 1049 1050 if ((window.innerWidth > 768)) { 1051 $(".btn-advance-filter").removeClass("mobile-advanced"); 1052 $(".search-info").removeClass("mobile-advanced"); 1053 $(".results-overlay").removeClass("mobile-advanced"); 1054 } 1055 let buttonNode = document.querySelector(".results-recent"); 1056 let searchNode = document.querySelector(".results-advanced"); 1057 searchNode.style.display = "none"; 1058 buttonNode.style.display = "block"; 1059 1060 if ($("#mobile-search").val().length) { 1061 $(".results-typeahead").css({ display: "block" }); 1062 $(".results-recent").css({ display: "none" }); 1063 document.querySelector(".btn-mega-close").classList.remove('hide-flyout'); 1064 toggleSearch = false; 1065 $(".btn-advance-filter").removeClass("hide-flyout"); 1066 1067 if (!mobileSearchIconClicked) { 1068 $(".btn-advance-filter").removeClass("mobile-advanced"); 1069 $(".search-info").removeClass("mobile-advanced"); 1070 $(".results-overlay").removeClass("mobile-advanced"); 1071 1072 $(".results-typeahead").addClass("desktop-advanced"); 1073 $(".results-recent").addClass("desktop-advanced"); 1074 $(".results-overlay").addClass("desktop-advanced"); 1075 $(".results-advanced").addClass("desktop-advanced"); 1076 } 1077 } 1078 }); 1079 1080 1081 $(".btn-advance-filter").on('click', function (e) { 1082 e.stopPropagation(); 1083 toggleSearch = !toggleSearch; 1084 // Disabling search button when there is no query. 1085 if ($("#mobile-search").val().length > 0) { 1086 $("#advanced-search-submit").removeClass("search-disabled"); 1087 } else { 1088 $("#advanced-search-submit").addClass("search-disabled"); 1089 } 1090 let buttonNode = document.querySelector(".results-recent"); 1091 let searchNode = document.querySelector(".results-advanced"); 1092 if (toggleSearch == true) { 1093 if(window.wap_tms && window.wap_tms.custom) { 1094 window.wap_tms && window.wap_tms.custom.trackComponentClick('advanced-search-ighf', 'filter-button:expand'); 1095 } 1096 searchNode.style.display = "block"; 1097 buttonNode.style.display = "none"; 1098 $(".results-typeahead").css({ display: "none" }); 1099 } 1100 else { 1101 if(window.wap_tms && window.wap_tms.custom) { 1102 window.wap_tms && window.wap_tms.custom.trackComponentClick('advanced-search-ighf', 'filter-button:collapse'); 1103 } 1104 searchNode.style.display = "none"; 1105 buttonNode.style.display = "block"; 1106 $(".results-typeahead").css({ display: "block" }); 1107 if ($("#mobile-search").val().length) { 1108 $(".results-typeahead").css({ display: "block" }); 1109 $(".results-recent").css({ display: "none" }); 1110 } 1111 else { 1112 $(".results-typeahead").css({ display: "none" }); 1113 $(".results-recent").css({ display: "block" }); 1114 } 1115 } 1116 }); 1117 1118 $(".form-control").on('keyup', function (e) { 1119 if ($("#mobile-search").val().length) { 1120 $(".results-typeahead").css({ display: "block" }); 1121 $(".results-recent").css({ display: "none" }); 1122 document.querySelector(".btn-mega-close").classList.remove('hide-flyout'); 1123 $(".btn-advance-filter").removeClass("hide-flyout"); 1124 } 1125 else { 1126 $(".results-recent").css({ display: "block" }); 1127 $(".results-typeahead").css({ display: "none" }); 1128 $("#cls-btn-advanced").addClass("hide-flyout"); 1129 $(".btn-advance-filter").addClass("hide-flyout"); 1130 } 1131 }); 1132 1133 $("#cls-btn-advanced").on('click', function (e) { 1134 e.stopPropagation(); 1135 clearInput(); 1136 $("#cls-btn-advanced").addClass("hide-flyout"); 1137 $("#advanced-search-submit").addClass("search-disabled"); 1138 $(".btn-advance-filter").addClass("hide-flyout"); 1139 $(".results-recent").css({ display: "block" }); 1140 $(".results-typeahead").css({ display: "none" }); 1141 if (toggleSearch == true) { 1142 $(".results-advanced").css({ display: "none" }); 1143 } 1144 toggleSearch = false;
1145 }); 1146 1147 $(".flyout-close").on('click', function (e) { 1148 e.stopPropagation(); 1149 if(window.wap_tms && window.wap_tms.custom) { 1150 window.wap_tms && window.wap_tms.custom.trackComponentClick('advanced-search-ighf', 'close-button'); 1151 } 1152 closeClicked = true; 1153 $(".mega-search-panel").removeClass("show"); 1154 $("#cls-btn-advanced").addClass("hide-flyout"); 1155 $(".search-info").addClass("mobile-advanced"); 1156 $(".results-typeahead").css({ display: "none" }); 1157 $(".btn-advance-filter").addClass("hide-flyout"); 1158 if (!mobileSearchIconClicked) { 1159 $(".mega-search-panel").removeClass("show"); 1160 } 1161 if (mobileSearchIconClicked) { 1162 $(".mega-search-panel").addClass("collapse"); 1163 } 1164 }); 1165 1166 var searchElement = document.getElementById("simplify-search"); 1167 var headerElement = document.getElementsByTagName('header') && document.getElementsByTagName('header')[0]; 1168 document.addEventListener("click", function (event) { 1169 var isClickInsideHeaderOrSearch = searchElement.contains(event.target) || headerElement.contains(event.target); 1170 if (!isClickInsideHeaderOrSearch && !mobileSearchIconClicked) { 1171 event.stopPropagation(); 1172 $(".btn-advance-filter").addClass("hide-flyout"); 1173 $(".mega-search-panel").removeClass("show"); 1174 $("#cls-btn-advanced").addClass("hide-flyout"); 1175 $(".search-info").addClass("mobile-advanced"); 1176 $(".results-typeahead").css({ display: "none" }); 1177 } 1178 }); 1179 1180 $(".nav-link-icon.toggle-search").on('click', function (e) { 1181 $("#simplify-search").removeClass("hide-flyout"); 1182 toggleSearch = false; 1183 if ($("#mobile-search").val().length > 0) { 1184 $(".btn-advance-filter").addClass("hide-flyout"); 1185 } 1186 clearInput(); 1187 $("#cls-btn-advanced").addClass("hide-flyout"); 1188 $(".search-info").css({ display: "block" }); 1189 $(".results-advanced").css({ display: "none" }); 1190 $(".results-recent").css({ display: "block" }); 1191 $("#hpsform-new").removeClass("hide-flyout"); 1192 mobileSearchIconClicked = true; 1193 document.querySelector(".btn-advance-filter").classList.add('mobile-advanced'); 1194 document.querySelector(".btn-mega-close").classList.add('mobile-advanced'); 1195 $(".search-info").addClass("mobile-advanced"); 1196 $(".results-overlay").addClass("mobile-advanced"); 1197 $(".results-typeahead").css({ display: "none" }); 1198 $(".results-advanced").removeClass("desktop-advanced"); 1199 $(".results-typeahead").removeClass("desktop-advanced"); 1200 $(".results-recent").removeClass("desktop-advanced"); 1201 $(".results-overlay").removeClass("desktop-advanced"); 1202 }); 1203 1204 // Advanced Search - Form Submit Handler 1205 function intelSearchPage() { 1206 var searchPageUrl = window.location.protocol + "//" + window.location.host + globalSearch.langRootPath + "/" + globalSearch.defaultPage; 1207 // var searchPageUrl = 1208 // "https://www.intel.com" + 1209 // globalSearch.langRootPath + 1210 // "/" + 1211 // globalSearch.defaultPage; 1212 if (intel.isIGHFCall) { 1213 searchPageUrl = 1214 "https://www.intel.com" + 1215 globalSearch.langRootPath + 1216 "/" + 1217 globalSearch.defaultPage; 1218 } 1219 return searchPageUrl; 1220 } 1221 1222 function advancedSearch() { 1223 // Checking whether user has typed something 1224 var searchInputValue = $("#mobile-search").val(); 1225 if (searchInputValue) { 1226 // Fetching the selected value in "Find Results" With dropdown 1227 var findResults = $("#find-results").val(); 1228 // Fetching the selected value in "Show Results From" With dropdown 1229 var showResults = $("#show-results-from").val(); 1230 // Fetching status of "title" checkbox 1231 var titleIsChecked = $("#search_title").is(":checked"); 1232 // Fetching status of "description" checkbox 1233 var descriptionIsChecked = $("#search_description").is(":checked"); 1234 // Fetching status of "ID" checkbox 1235 var idIsChecked = $("#search_id").is(":checked"); 1236 1237 var findResultsAnalytics = findResults == "Any of these terms" ? "any" : findResults == "All of these terms" ? "all" : "exact"; 1238 var showResultsAnalytics= showResults.toLowerCase(); 1239 var checkBoxAnalytics = []; 1240 if (titleIsChecked) { 1241 checkBoxAnalytics.push("title"); 1242 } 1243 if (descriptionIsChecked) { 1244 checkBoxAnalytics.push("description"); 1245 } 1246 if (idIsChecked) { 1247 checkBoxAnalytics.push("content-id"); 1248 } 1249 var checkBoxValue = checkBoxAnalytics.join(); 1250 if(window.wap_tms && window.wap_tms.custom) { 1251 window.wap_tms && window.wap_tms.custom.trackComponentClick('advanced-search-ighf', `submit-button::find:${findResultsAnalytics}/show:${showResultsAnalytics}${checkBoxValue && `/only:${checkBoxValue}`}`); 1252 } 1253 // Forming query params 1254 var q = ""; 1255 var tabfilter = ""; 1256 var isAnyOfTheseTerms = false;
1257 var isCheckboxTicked = false; 1258 // Find Results (1st dropdown) 1259 if (findResults === "Any of these terms") { 1260 var words = searchInputValue.split(" "); 1261 var formedQuery = words.join(" OR "); 1262 q += formedQuery; 1263 isAnyOfTheseTerms = true; 1264 } else if (findResults === "All of these terms") { 1265 q += searchInputValue; 1266 } else { 1267 q += '"' + searchInputValue + '"'; 1268 } 1269 // Checkboxes 1270 var tempQ = q; 1271 q = ""; 1272 if (titleIsChecked) { 1273 isCheckboxTicked = true; 1274 if (isAnyOfTheseTerms) { 1275 tempQ = "(" + tempQ + ")"; 1276 } 1277 q = "@title=" + tempQ; 1278 } 1279 if (descriptionIsChecked) { 1280 isCheckboxTicked = true; 1281 if (q) { 1282 q = q + " OR" + " @description=" + tempQ; 1283 } else { 1284 if (isAnyOfTheseTerms) { 1285 tempQ = "(" + tempQ + ")"; 1286 } 1287 q = "@description=" + tempQ; 1288 } 1289 } 1290 if (idIsChecked) { 1291 isCheckboxTicked = true; 1292 if (q) { 1293 q = q + " OR" + " @docuniqueid=" + tempQ; 1294 } else { 1295 if (isAnyOfTheseTerms) { 1296 tempQ = "(" + tempQ + ")"; 1297 } 1298 q = "@docuniqueid=" + tempQ; 1299 } 1300 } 1301 // Show Results (2nd dropdown) 1302 if (showResults !== "allResults") { 1303 tabfilter += "[" + showResults + "]"; 1304 } 1305 var queryParam = "#q="; 1306 if (isCheckboxTicked) queryParam += encodeURIComponent(q); 1307 else queryParam += encodeURIComponent(tempQ); 1308 if (tabfilter) queryParam += "&f:@tabfilter=" + tabfilter; 1309 // Navigate to search page with the params 1310 var textAdd = "?ws=text"; 1311 const arkPattern = new RegExp("/content/www/[A-Za-z]{2}/[A-Za-z]{2}/ark((.html)|(/))"); 1312 const careSecurePattern = new RegExp("/content/www/[A-Za-z]{2}/[A-Za-z]{2}/secure/care((.html)|(/))"); 1313 const markSecurePattern = new RegExp("/content/www/[A-Za-z]{2}/[A-Za-z]{2}/secure/mark((.html)|(/))"); 1314 const currentUrl_pathname = isDataValid(window.location.pathname); 1315 const arkPatternMatch = arkPattern.test(currentUrl_pathname); 1316 const carePatternMatch = careSecurePattern.test(currentUrl_pathname); 1317 const markPatternMatch = markSecurePattern.test(currentUrl_pathname); 1318 const arkCareMarkPatternMatch = arkPatternMatch || carePatternMatch || markPatternMatch; 1319 const productsTabFilter = '&f:@tabfilter=[Products]'; 1320 if (arkCareMarkPatternMatch && showResults !== "Products") { 1321 window.location.href = intelSearchPage() + textAdd + queryParam + productsTabFilter; 1322 } else { 1323 window.location.href = intelSearchPage() + textAdd + queryParam; 1324 } 1325 } 1326 return false; 1327 } 1328 1329 $("#advanced-search-submit").on('click', function (e) { 1330 advancedSearch(); 1331 }); 1332 1333} 1334
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.