1!function(e,t){"function"==typeof define&&define.amd?define(["exports"],t):"undefined"!=typeof exports?t(exports):(t(t={}),e.LinkNav=t)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,function(e){"use strict";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function t(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function r(i){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?t(Object(o),!0).forEach(function(e){var t,n;t=i,n=o[e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))})}return i}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={template:'<div :class="classes" @focusout="handleFocusOut" @keydown="handleKeydown" > <button class="link-nav__toggle" @click="handleToggleClick" :aria-controls="id" aria-haspopup="true" :aria-pressed="active" :aria-describedby="labelId" ref="toggle" > <template> {{ label }} <span v-html="dropdownIcon"></span></template> </button> <ul class="link-nav__options" ref="options" :class="classes" @focusout="handleFocusOut" @keydown="handleKeydown"> <li> <button @click="handleViewAll" :class="{\'active\' : value === null}"> {{ strings.view_all }} <span class="screen-reader-text">({{ label }})</span> </button> </li> <li v-for="option, index in mappedOptions" :key="index"> <button @click="handleOptionClick(option.option)" :class="option.class"> {{ option.name }} </button> </li> </ul> </div>',props:{id:{type:String,required:!0},name:{type:String},labelId:{type:String},label:{type:String,required:!0},dropdownIcon:{type:String},options:{type:Array},value:{type:[Object,Array,null]},strings:{type:Object,default:function(){return{view_all:"View All"}}}},data:function(){return{active:!1}},watch:{active:function(e){var t=this;e&&Vue.nextTick(function(){var e;null!=(e=window.themeUtility.getFocusable(t.$refs.options)[0])&&e.focus()})}},computed:{mappedOptions:function(){var n=this;return this.options.map(function(e,t){return r(r({},e),{},{option:e,id:"".concat(n.id,"-").concat(t),class:n.value&&e.name===(n.value.name||n.value[0].name)?"active":""})})},selectedValueLabel:function(){return this.value?[this.value].map(function(e){return e.name}).join(", "):""},classes:function(){return{"link-nav":!0,"link-nav--active":this.active}}},methods:{valuesEqual:function(e,n){return e===n||!(null===e&&null!==n||null!==e&&null===n)&&e.length===n.length&&e.filter(function(t){return n.find(function(e){return t.id===e.id})}).length===e.length},handleToggleClick:function(){this.active=!this.active},handleFocusOut:function(){var e=this;requestAnimationFrame(function(){!document.activeElement||e.$el===document.activeElement||e.$el.contains(document.activeElement)||document.activeElement.contains(e.$el)||(e.active=!1)})},handleClickOutside:function(e){this.$el.contains(e.target)||(this.active=!1)},handleOptionClick:function(e){this.$emit("input",e),this.active=!1},handleViewAll:function(){this.$emit("input",null),this.active=!1},handleKeydown:function(e){if(this.active)switch(e.code){case"ArrowDown":case"ArrowUp":e.preventDefault();var t=this.$refs.options.querySelectorAll("button, input"),n=function(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t).indexOf(document.activeElement)+("ArrowUp"===e.code?-1:1);return void t[n=(n=n<0?t.length-1:n)>t.length-1?0:n].focus();case"Escape":return this.active=!1,void this.$refs.toggle.focus()}}},mounted:function(){window.addEventListener("click",this.handleClickOutside)},destroyed:function(){window.removeEventListener("click",this.handleClickOutside)}};e.default=n}); 2//# sourceURL=https://2603784.fs1.hubspotusercontent-na1.net/hubfs/2603784/hub_generated/template_assets/1/199078791175/1790208473385/template_LinkNav.js
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.