PageSourceSearch

https://static.lifeincheckebt.com/b2c-lic-theme/2.0.2/b2c-lic-theme.min.js?3

js lifeincheckebt.com collected 2026-10-05 11:29:58 UTC 171,622 bytes, 1,757 lines download raw bytes

1(function (global, factory) {
2    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3    typeof define === 'function' && define.amd ? define(factory) :
4    (global.inm = global.inm || {}, global.inm.theme = global.inm.theme || {}, global.inm.theme.v2 = factory());
5}(this, (function () { 'use strict';
6
7    if (window.NodeList && !NodeList.prototype.forEach) {
8        NodeList.prototype.forEach = function (callback, thisArg) {
9            thisArg = thisArg || window;
10            for (var i = 0; i < this.length; i++) {
11                callback.call(thisArg, this[i], i, this);
12            }
13        };
14    }
15
16    var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
17
18    // selects, checkboxes, and radios do not fire change events if their value properties are updated directly (only if their _options_ change),
19    // unfortunately, js frameworks typically update selects and inputs via direct calls to their JS properties. We need to be able to be able to detect these changes.
20
21    var nativePropertyHooks = {
22      init: function init() {
23        var hooks = [[HTMLSelectElement, 'value'], [HTMLSelectElement, 'selectedIndex'], [HTMLInputElement, 'value'], [HTMLInputElement, 'checked']];
24
25        hooks.forEach(function (_ref) {
26          var _ref2 = _slicedToArray(_ref, 2),
27              htmlClass = _ref2[0],
28              propertyName = _ref2[1];
29
30          var enhancedProp = '__inmHasBeenEnhanced-' + propertyName;
31          if (htmlClass[enhancedProp]) {
32            return;
33          }
34
35          var descriptor = Object.getOwnPropertyDescriptor(htmlClass.prototype, propertyName);
36          Object.defineProperty(htmlClass.prototype, propertyName, {
37            get: function get() {
38              return descriptor.get.call(this);
39            },
40            set: function set(newValue) {
41              descriptor.set.call(this, newValue);
42
43              var event = new CustomEvent("inm-change", { bubbles: true });
44              this.dispatchEvent(event);
45            },
46
47            enumerable: true,
48            configurable: true
49          });
50
51          htmlClass[enhancedProp] = true;
52        });
53      }
54    };
55
56    var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
57
58    function unwrapExports (x) {
59    	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
60    }
61
62    function createCommonjsModule(fn, module) {
63    	return module = { exports: {} }, fn(module, module.exports), module.exports;
64    }
65
66    var choices_min = createCommonjsModule(function (module, exports) {
67    /*! choices.js v3.0.4 | (c) 2018 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ 
68    !function(e,t){module.exports=t();}(commonjsGlobal,function(){return function(e){function t(n){if(i[n])return i[n].exports;var s=i[n]={exports:{},id:n,loaded:!1};return e[n].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var i={};return t.m=e,t.c=i,t.p="/assets/scripts/dist/",t(0)}([function(e,t,i){e.exports=i(1);},function(e,t,i){function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n);}}
68return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),c=i(2),l=n(c),h=i(3),u=n(h),d=i(4),f=n(d),p=i(31),v=i(32);i(33);var m=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-choice]",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r(this,e),(0, v.isType)("String",t)){var n=document.querySelectorAll(t);if(n.length>1)for(var s=1;s<n.length;s++){var o=n[s];new e(o,i);}}var a={silent:!1,items:[],choices:[],renderChoiceLimit:-1,maxItemCount:-1,addItems:!0,removeItems:!0,removeItemButton:!1,editItems:!1,duplicateItems:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,regexFilter:null,shouldSort:!0,shouldSortItems:!1,sortFilter:v.sortByAlpha,placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",addItemText:function(e){return 'Press Enter to add <b>"'+(0, v.stripHTML)(e)+'"</b>'},maxItemText:function(e){return "Only "+e+" values can be added."},itemComparer:function(e,t){return e===t},uniqueItemText:"Only unique values can be added.",classNames:{containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",hiddenState:"is-hidden",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"},fuseOptions:{include:"score"},callbackOnInit:null,callbackOnCreateTemplates:null};if(this.idNames={itemChoice:"item-choice"},this.config=(0, v.extend)(a,i),"auto"!==this.config.renderSelectedChoices&&"always"!==this.config.renderSelectedChoices&&(this.config.silent||console.warn("renderSelectedChoices: Possible values are 'auto' and 'always'. Falling back to 'auto'."),this.config.renderSelectedChoices="auto"),this.store=new f.default(this.render),this.initialised=!1,this.currentState={},this.prevState={},this.currentValue="",this.element=t,this.passedElement=(0, v.isType)("String",t)?document.querySelector(t):t,!this.passedElement)return void(this.config.silent||console.error("Passed element not found"));this.isTextElement="text"===this.passedElement.type,this.isSelectOneElement="select-one"===this.passedElement.type,this.isSelectMultipleElement="select-multiple"===this.passedElement.type,this.isSelectElement=this.isSelectOneElement||this.isSelectMultipleElement,this.isValidElementType=this.isTextElement||this.isSelectElement,this.isIe11=!(!navigator.userAgent.match(/Trident/)||!navigator.userAgent.match(/rv[ :]11/)),this.isScrollingOnIe=!1,this.config.shouldSortItems===!0&&this.isSelectOneElement&&(this.config.silent||console.warn("shouldSortElements: Type of passed element is 'select-one', falling back to fal
68se.")),this.highlightPosition=0,this.canSearch=this.config.searchEnabled,this.placeholder=!1,this.isSelectOneElement||(this.placeholder=!!this.config.placeholder&&(this.config.placeholderValue||this.passedElement.getAttribute("placeholder"))),this.presetChoices=this.config.choices,this.presetItems=this.config.items,this.passedElement.value&&(this.presetItems=this.presetItems.concat(this.passedElement.value.split(this.config.delimiter))),this.baseId=(0, v.generateId)(this.passedElement,"choices-"),this.render=this.render.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onClick=this._onClick.bind(this),this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onMouseDown=this._onMouseDown.bind(this),this._onMouseOver=this._onMouseOver.bind(this),this._onPaste=this._onPaste.bind(this),this._onInput=this._onInput.bind(this),this.wasTap=!0;var c="classList"in document.documentElement;c||this.config.silent||console.error("Choices: Your browser doesn't support Choices");var l=(0, v.isElement)(this.passedElement)&&this.isValidElementType;if(l){if("active"===this.passedElement.getAttribute("data-choice"))return;this.init();}else this.config.silent||console.error("Incompatible input passed");}return a(e,[{key:"init",value:function(){if(this.initialised!==!0){var e=this.config.callbackOnInit;this.initialised=!0,this._createTemplates(),this._createInput(),this.store.subscribe(this.render),this.render(),this._addEventListeners(),e&&(0, v.isType)("Function",e)&&e.call(this);}}},{key:"destroy",value:function(){if(this.initialised!==!1){this._removeEventListeners(),this.passedElement.classList.remove(this.config.classNames.input,this.config.classNames.hiddenState),this.passedElement.removeAttribute("tabindex");var e=this.passedElement.getAttribute("data-choice-orig-style");Boolean(e)?(this.passedElement.removeAttribute("data-choice-orig-style"),this.passedElement.setAttribute("style",e)):this.passedElement.removeAttribute("style"),this.passedElement.removeAttribute("aria-hidden"),this.passedElement.removeAttribute("data-choice"),this.passedElement.value=this.passedElement.value,this.containerOuter.parentNode.insertBefore(this.passedElement,this.containerOuter),this.containerOuter.parentNode.removeChild(this.containerOuter),this.clearStore(),this.config.templates=null,this.initialised=!1;}}},{key:"renderGroups",value:function(e,t,i){var n=this,s=i||document.createDocumentFragment(),o=this.config.sortFilter;return this.config.shouldSort&&e.sort(o),e.forEach(function(e){var i=t.filter(function(t){return n.isSelectOneElement?t.groupId===e.id:t.groupId===e.id&&!t.selected});if(i.length>=1){var o=n._getTemplate("choiceGroup",e);s.appendChild(o),n.renderChoices(i,s,!0);}}),s}},{key:"renderChoices",value:function(e,t){var i=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=t||document.createDocumentFragment(),r=this.config,a=r.renderSelectedChoices,c=r.searchResultLimit,l=r.renderChoiceLimit,h=this.isSearching?v.sortByScore:this.config.sortFilter,u=function(e){var t="auto"!==a||(i.isSelectOneElement||!e.selected);if(t){var n=i._getTemplate("choice",e);s.appendChild(n);}},d=e;"auto"!==a||this.isSelectOneElement||(d=e.filter(function(e){return !e.selected}));var f=d.reduce(function(e,t){return t.placeholder?e.placeholderChoices.push(t):e.normalChoices.push(t),e},{placeholderChoices:[],normalChoices:[]}),p=f.placeholderChoices,m=f.normalChoices;(this.config.shouldSort||this.isSearching)&&m.sort(h);var g=d.length,y=[].concat(o(p),o(m));this.isSearching?g=c:l>0&&!n&&(g=l);for(var b=0;b<g;b++)y[b]&&u(y[b]);return s}},{key:"renderItems",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=i||document.createDocumentFragment();if(this.config.shouldSortItems&&!this.isSelectOneElement&&e.sort(this.config.sortFilter),this.isTextElement){var s=this.store.getItemsReducedToValues(e),o=s.join(this.config.delimiter);this.passedElement.setAttribute("value",o),this.passedElement.value=o;}else{var r=document.createDocumentFragment();e.forEach(function(e){var i=t._getTemplate("option",e);r.appendChild(i);}),this.passedElement.innerHTML="",this.passedElement.appendChild(r);}return e.forEach(function(e){var i=t._getTemplate("item",e);n.appendChild(i);}),n}},{key:"render",value:function(){if(!this.store.isLoading()&&(this.currentState=this.store.getState(),this.currentState!==this.prevState)){if((this.currentState.choices!==this.prevState.choices||this.currentState.groups!==this.prevState.groups||this.currentState.items!==this.prevState.items)&&this.isSelectElement){var e=this.store.getGroupsFilteredByActive(),t=this.store.getChoicesFilteredByActive(),i=document.createDocumentFragment();this.choiceList.innerHTML="",this.config.resetScrollPosition&&(this.choiceList.scrollTop=0),e.length>=1&&this.isSearching!==!0?i=this.renderGroups(e,t,i):t.length>=1&&(i=this.renderChoices(t,i));var n=this.store.getItemsFilteredByActive(),s=this._canAddItem(n,this.input.value);if(i.childNodes&&i.childNodes.length>0)s.response?(this.choiceList.appendChild(i),this._highlightChoice()):this.choiceList.appendChild(this._getTemplate("notice",s.notice));else{var o=void 0,r=void 0;
68this.isSearching?(r=(0, v.isType)("Function",this.config.noResultsText)?this.config.noResultsText():this.config.noResultsText,o=this._getTemplate("notice",r,"no-results")):(r=(0, v.isType)("Function",this.config.noChoicesText)?this.config.noChoicesText():this.config.noChoicesText,o=this._getTemplate("notice",r,"no-choices")),this.choiceList.appendChild(o);}}if(this.currentState.items!==this.prevState.items){var a=this.store.getItemsFilteredByActive();if(this.itemList.innerHTML="",a&&a){var c=this.renderItems(a);c.childNodes&&this.itemList.appendChild(c);}}this.prevState=this.currentState;}}},{key:"highlightItem",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)return this;var i=e.id,n=e.groupId,s=n>=0?this.store.getGroupById(n):null;return this.store.dispatch((0, p.highlightItem)(i,!0)),t&&(s&&s.value?(0, v.triggerEvent)(this.passedElement,"highlightItem",{id:i,value:e.value,label:e.label,groupValue:s.value}):(0, v.triggerEvent)(this.passedElement,"highlightItem",{id:i,value:e.value,label:e.label})),this}},{key:"unhighlightItem",value:function(e){if(!e)return this;var t=e.id,i=e.groupId,n=i>=0?this.store.getGroupById(i):null;return this.store.dispatch((0, p.highlightItem)(t,!1)),n&&n.value?(0, v.triggerEvent)(this.passedElement,"unhighlightItem",{id:t,value:e.value,label:e.label,groupValue:n.value}):(0, v.triggerEvent)(this.passedElement,"unhighlightItem",{id:t,value:e.value,label:e.label}),this}},{key:"highlightAll",value:function(){var e=this,t=this.store.getItems();return t.forEach(function(t){e.highlightItem(t);}),this}},{key:"unhighlightAll",value:function(){var e=this,t=this.store.getItems();return t.forEach(function(t){e.unhighlightItem(t);}),this}},{key:"removeItemsByValue",value:function(e){var t=this;if(!e||!(0, v.isType)("String",e))return this;var i=this.store.getItemsFilteredByActive();return i.forEach(function(i){i.value===e&&t._removeItem(i);}),this}},{key:"removeActiveItems",value:function(e){var t=this,i=this.store.getItemsFilteredByActive();return i.forEach(function(i){i.active&&e!==i.id&&t._removeItem(i);}),this}},{key:"removeHighlightedItems",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.store.getItemsFilteredByActive();return i.forEach(function(i){i.highlighted&&i.active&&(e._removeItem(i),t&&e._triggerChange(i.value));}),this}},{key:"showDropdown",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);this.containerOuter.classList.add(this.config.classNames.openState),this.containerOuter.setAttribute("aria-expanded","true"),this.dropdown.classList.add(this.config.classNames.activeState),this.dropdown.setAttribute("aria-expanded","true");var s=this.dropdown.getBoundingClientRect(),o=Math.ceil(s.top+window.scrollY+this.dropdown.offsetHeight),r=!1;return "auto"===this.config.position?r=o>=n:"top"===this.config.position&&(r=!0),r&&this.containerOuter.classList.add(this.config.classNames.flippedState),e&&this.canSearch&&document.activeElement!==this.input&&this.input.focus(),(0, v.triggerEvent)(this.passedElement,"showDropdown",{}),this}},{key:"hideDropdown",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.containerOuter.classList.contains(this.config.classNames.flippedState);return this.containerOuter.classList.remove(this.config.classNames.openState),this.containerOuter.setAttribute("aria-expanded","false"),this.dropdown.classList.remove(this.config.classNames.activeState),this.dropdown.setAttribute("aria-expanded","false"),t&&this.containerOuter.classList.remove(this.config.classNames.flippedState),e&&this.canSearch&&document.activeElement===this.input&&this.input.blur(),(0, v.triggerEvent)(this.passedElement,"hideDropdown",{}),this}},{key:"toggleDropdown",value:function(){var e=this.dropdown.classList.contains(this.config.classNames.activeState);return e?this.hideDropdown():this.showDropdown(!0),this}},{key:"getValue",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.store.getItemsFilteredByActive(),n=[];
68return i.forEach(function(i){e.isTextElement?n.push(t?i.value:i):i.active&&n.push(t?i.value:i);}),this.isSelectOneElement?n[0]:n}},{key:"setValue",value:function(e){var t=this;if(this.initialised===!0){var i=[].concat(o(e)),n=function(e){var i=(0, v.getType)(e);if("Object"===i){if(!e.value)return;t.isTextElement?t._addItem(e.value,e.label,e.id,void 0,e.customProperties,e.placeholder):t._addChoice(e.value,e.label,!0,!1,-1,e.customProperties,e.placeholder);}else"String"===i&&(t.isTextElement?t._addItem(e):t._addChoice(e,e,!0,!1,-1,null));};i.length>1?i.forEach(function(e){n(e);}):n(i[0]);}return this}},{key:"setValueByChoice",value:function(e){var t=this;if(!this.isTextElement){var i=this.store.getChoices(),n=(0, v.isType)("Array",e)?e:[e];n.forEach(function(e){var n=i.find(function(i){return t.config.itemComparer(i.value,e)});n?n.selected?t.config.silent||console.warn("Attempting to select choice already selected"):t._addItem(n.value,n.label,n.id,n.groupId,n.customProperties,n.placeholder,n.keyCode):t.config.silent||console.warn("Attempting to select choice that does not exist");});}return this}},{key:"setChoices",value:function(e,t,i){var n=this,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.initialised===!0&&this.isSelectElement){if(!(0, v.isType)("Array",e)||!t)return this;s&&this._clearChoices(),this._setLoading(!0),e&&e.length&&(this.containerOuter.classList.remove(this.config.classNames.loadingState),e.forEach(function(e){e.choices?n._addGroup(e,e.id||null,t,i):n._addChoice(e[t],e[i],e.selected,e.disabled,void 0,e.customProperties,e.placeholder);})),this._setLoading(!1);}return this}},{key:"clearStore",value:function(){return this.store.dispatch((0, p.clearAll)()),this}},{key:"clearInput",value:function(){return this.input.value&&(this.input.value=""),this.isSelectOneElement||this._setInputWidth(),!this.isTextElement&&this.config.searchEnabled&&(this.isSearching=!1,this.store.dispatch((0, p.activateChoices)(!0))),this}},{key:"enable",value:function(){if(this.initialised){this.passedElement.disabled=!1;var e=this.containerOuter.classList.contains(this.config.classNames.disabledState);e&&(this._addEventListeners(),this.passedElement.removeAttribute("disabled"),this.input.removeAttribute("disabled"),this.containerOuter.classList.remove(this.config.classNames.disabledState),this.containerOuter.removeAttribute("aria-disabled"),this.isSelectOneElement&&this.containerOuter.setAttribute("tabindex","0"));}return this}},{key:"disable",value:function(){if(this.initialised){this.passedElement.disabled=!0;var e=!this.containerOuter.classList.contains(this.config.classNames.disabledState);e&&(this._removeEventListeners(),this.passedElement.setAttribute("disabled",""),this.input.setAttribute("disabled",""),this.containerOuter.classList.add(this.config.classNames.disabledState),this.containerOuter.setAttribute("aria-disabled","true"),this.isSelectOneElement&&this.containerOuter.setAttribute("tabindex","-1"));}return this}},{key:"ajax",value:function(e){var t=this;return this.initialised===!0&&this.isSelectElement&&(requestAnimationFrame(function(){t._handleLoadingState(!0);}),e(this._ajaxCallback())),this}},{key:"_triggerChange",value:function(e){e&&(0, v.triggerEvent)(this.passedElement,"change",{value:e});}},{key:"_handleButtonAction",value:function(e,t){if(e&&t&&this.config.removeItems&&this.config.removeItemButton){var i=t.parentNode.getAttribute("data-id"),n=e.find(function(e){return e.id===parseInt(i,10)});this._removeItem(n),this._triggerChange(n.value),this.isSelectOneElement&&this._selectPlaceholderChoice();}}},{key:"_selectPlaceholderChoice",value:function(){var e=this.store.getPlaceholderChoice();e&&(this._addItem(e.value,e.label,e.id,e.groupId,null,e.placeholder),this._triggerChange(e.value));}},{key:"_handleItemAction",value:function(e,t){var i=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e&&t&&this.config.removeItems&&!this.isSelectOneElement){var s=t.getAttribute("data-id");e.forEach(function(e){e.id!==parseInt(s,10)||e.highlighted?n||e.highlighted&&i.unhighlightItem(e):i.highlightItem(e);}),document.activeElement!==this.input&&this.input.focus();}}},{key:"_handleChoiceAction",value:function(e,t){if(e&&t){var i=t.getAttribute("data-id"),n=this.store.getChoiceById(i),s=e[0]&&e[0].keyCode?e[0].keyCode:null,o=this.dropdown.classList.contains(this.config.classNames.activeState);if(n.keyCode=s,(0, v.triggerEvent)(this.passedElement,"choice",{choice:n}),n&&!n.selected&&!n.disabled){var r=this._canAddItem(e,n.value);
68r.response&&(this._addItem(n.value,n.label,n.id,n.groupId,n.customProperties,n.placeholder,n.keyCode),this._triggerChange(n.value));}this.clearInput(),o&&this.isSelectOneElement&&(this.hideDropdown(),this.containerOuter.focus());}}},{key:"_handleBackspace",value:function(e){if(this.config.removeItems&&e){var t=e[e.length-1],i=e.some(function(e){return e.highlighted});this.config.editItems&&!i&&t?(this.input.value=t.value,this._setInputWidth(),this._removeItem(t),this._triggerChange(t.value)):(i||this.highlightItem(t,!1),this.removeHighlightedItems(!0));}}},{key:"_canAddItem",value:function(e,t){var i=!0,n=(0, v.isType)("Function",this.config.addItemText)?this.config.addItemText(t):this.config.addItemText;(this.isSelectMultipleElement||this.isTextElement)&&this.config.maxItemCount>0&&this.config.maxItemCount<=e.length&&(i=!1,n=(0, v.isType)("Function",this.config.maxItemText)?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),this.isTextElement&&this.config.addItems&&i&&this.config.regexFilter&&(i=this._regexFilter(t));var s=!e.some(function(e){return (0, v.isType)("String",t)?e.value===t.trim():e.value===t});return s||this.config.duplicateItems||this.isSelectOneElement||!i||(i=!1,n=(0, v.isType)("Function",this.config.uniqueItemText)?this.config.uniqueItemText(t):this.config.uniqueItemText),{response:i,notice:n}}},{key:"_handleLoadingState",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.itemList.querySelector("."+this.config.classNames.placeholder);e?(this.containerOuter.classList.add(this.config.classNames.loadingState),this.containerOuter.setAttribute("aria-busy","true"),this.isSelectOneElement?t?t.innerHTML=this.config.loadingText:(t=this._getTemplate("placeholder",this.config.loadingText),this.itemList.appendChild(t)):this.input.placeholder=this.config.loadingText):(this.containerOuter.classList.remove(this.config.classNames.loadingState),this.isSelectOneElement?t.innerHTML=this.placeholder||"":this.input.placeholder=this.placeholder||"");}},{key:"_ajaxCallback",value:function(){var e=this;return function(t,i,n){if(t&&i){var s=(0, v.isType)("Object",t)?[t]:t;s&&(0, v.isType)("Array",s)&&s.length?(e._handleLoadingState(!1),e._setLoading(!0),s.forEach(function(t){if(t.choices){var s=t.id||null;e._addGroup(t,s,i,n);}else e._addChoice(t[i],t[n],t.selected,t.disabled,void 0,t.customProperties,t.placeholder);}),e._setLoading(!1),e.isSelectOneElement&&e._selectPlaceholderChoice()):e._handleLoadingState(!1),e.containerOuter.removeAttribute("aria-busy");}}}},{key:"_searchChoices",value:function(e){var t=(0, v.isType)("String",e)?e.trim():e,i=(0, v.isType)("String",this.currentValue)?this.currentValue.trim():this.currentValue;if(t.length>=1&&t!==i+" "){var n=this.store.getSearchableChoices(),s=t,o=(0, v.isType)("Array",this.config.searchFields)?this.config.searchFields:[this.config.searchFields],r=Object.assign(this.config.fuseOptions,{keys:o}),a=new l.default(n,r),c=a.search(s);return this.currentValue=t,this.highlightPosition=0,this.isSearching=!0,this.store.dispatch((0, p.filterChoices)(c)),c.length}return 0}},{key:"_handleSearch",value:function(e){if(e){var t=this.store.getChoices(),i=t.some(function(e){return !e.active});if(this.input===document.activeElement)if(e&&e.length>=this.config.searchFloor){var n=0;this.config.searchChoices&&(n=this._searchChoices(e)),(0, v.triggerEvent)(this.passedElement,"search",{value:e,resultCount:n});}else i&&(this.isSearching=!1,this.store.dispatch((0, p.activateChoices)(!0)));}}},{key:"_addEventListeners",value:function(){document.addEventListener("keyup",this._onKeyUp),document.addEventListener("keydown",this._onKeyDown),document.addEventListener("click",this._onClick),document.addEventListener("touchmove",this._onTouchMove),document.addEventListener("touchend",this._onTouchEnd),document.addEventListener("mousedown",this._onMouseDown),document.addEventListener("mouseover",this._onMouseOver),this.isSelectOneElement&&(this.containerOuter.addEventListener("focus",this._onFocus),this.containerOuter.addEventListener("blur",this._onBlur)),this.input.addEventListener("input",this._onInput),this.input.addEventListener("paste",this._onPaste),this.input.addEventListener("focus",this._onFocus),this.input.addEventListener("blur",this._onBlur);}},{key:"_removeEventListeners",value:function(){document.removeEventListener("keyup",this._onKeyUp),document.removeEventListener("keydown",this._onKeyDown),document.removeEventListener("click",this._onClick),document.removeEventListener("touchmove",this._onTouchMove),document.removeEventListener("touchend",this._onTouchEnd),document.removeEventListener("mousedown",this._onMouseDown),document.removeEventListener("mouseover",this._onMouseOver),this.isSelectOneElement&&(this.containerOuter.removeEventListener("focus",this._onFocus),this.containerOuter.removeEventListener("blur",this._onBlur)),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("paste",this._onPaste),this.input.removeEventListener("focus",this._onFocus),this.input.removeEventListener("blur",this._onBlur);}},{key:"_setInputWidth",value:function(){this.placeholder?this.input.value&&this.input.value.length>=this.placeholder.length/1.25&&(this.input.style.width=(0, v.getWidthOfInput)(this.input)):this.input.style.width=(0, v.getWidthOfInput)(this.input);}},{key:"_onKeyDown",value:function(e){var t,i=this;if(e.target===this.input||this.containerOuter.contains(e.target)){var n=e.target,o=this.store.getItemsFilteredByActive(),r=this.input===document.activeElement,a=this.dropdown.classList.contains(this.config.classNames.activeState),c=this.itemList&&this.itemList.children,l=String.fromCharCode(e.keyCode),h=46,u=8,d=13,f=65,p=27,m=38,g=40,y=33,b=34,E=e.ctrlKey||e.metaKey;this.isTextElement||!/[a-zA-Z0-9-_ ]/.test(l)||a||this.showDropdown(!0),this.canSearch=this.config.searchEnabled;
68var _=function(){E&&c&&(i.canSearch=!1,i.config.removeItems&&!i.input.value&&i.input===document.activeElement&&i.highlightAll());},S=function(){if(i.isTextElement&&n.value){var t=i.input.value,s=i._canAddItem(o,t);s.response&&(a&&i.hideDropdown(),i._addItem(t),i._triggerChange(t),i.clearInput());}if(n.hasAttribute("data-button")&&(i._handleButtonAction(o,n),e.preventDefault()),a){e.preventDefault();var r=i.dropdown.querySelector("."+i.config.classNames.highlightedState);r&&(o[0]&&(o[0].keyCode=d),i._handleChoiceAction(o,r));}else i.isSelectOneElement&&(a||(i.showDropdown(!0),e.preventDefault()));},I=function(){a&&(i.toggleDropdown(),i.containerOuter.focus());},w=function(){if(a||i.isSelectOneElement){a||i.showDropdown(!0),i.canSearch=!1;var t=e.keyCode===g||e.keyCode===b?1:-1,n=e.metaKey||e.keyCode===b||e.keyCode===y,s=void 0;if(n)s=t>0?Array.from(i.dropdown.querySelectorAll("[data-choice-selectable]")).pop():i.dropdown.querySelector("[data-choice-selectable]");else{var o=i.dropdown.querySelector("."+i.config.classNames.highlightedState);s=o?(0, v.getAdjacentEl)(o,"[data-choice-selectable]",t):i.dropdown.querySelector("[data-choice-selectable]");}s&&((0, v.isScrolledIntoView)(s,i.choiceList,t)||i._scrollToChoice(s,t),i._highlightChoice(s)),e.preventDefault();}},T=function(){!r||e.target.value||i.isSelectOneElement||(i._handleBackspace(o),e.preventDefault());},C=(t={},s(t,f,_),s(t,d,S),s(t,p,I),s(t,m,w),s(t,y,w),s(t,g,w),s(t,b,w),s(t,u,T),s(t,h,T),t);C[e.keyCode]&&C[e.keyCode]();}}},{key:"_onKeyUp",value:function(e){if(e.target===this.input){var t=this.input.value,i=this.store.getItemsFilteredByActive(),n=this._canAddItem(i,t);if(this.isTextElement){var s=this.dropdown.classList.contains(this.config.classNames.activeState);if(t){if(n.notice){var o=this._getTemplate("notice",n.notice);this.dropdown.innerHTML=o.outerHTML;}n.response===!0?s||this.showDropdown():!n.notice&&s&&this.hideDropdown();}else s&&this.hideDropdown();}else{var r=46,a=8;e.keyCode!==r&&e.keyCode!==a||e.target.value?this.canSearch&&n.response&&this._handleSearch(this.input.value):!this.isTextElement&&this.isSearching&&(this.isSearching=!1,this.store.dispatch((0, p.activateChoices)(!0)));}this.canSearch=this.config.searchEnabled;}}},{key:"_onInput",value:function(){this.isSelectOneElement||this._setInputWidth();}},{key:"_onTouchMove",value:function(){this.wasTap===!0&&(this.wasTap=!1);}},{key:"_onTouchEnd",value:function(e){var t=e.target||e.touches[0].target,i=this.dropdown.classList.contains(this.config.classNames.activeState);this.wasTap===!0&&this.containerOuter.contains(t)&&(t!==this.containerOuter&&t!==this.containerInner||this.isSelectOneElement||(this.isTextElement?document.activeElement!==this.input&&this.input.focus():i||this.showDropdown(!0)),e.stopPropagation()),this.wasTap=!0;}},{key:"_onMouseDown",value:function(e){var t=e.target;if(t===this.choiceList&&this.isIe11&&(this.isScrollingOnIe=!0),this.containerOuter.contains(t)&&t!==this.input){var i=void 0,n=this.store.getItemsFilteredByActive(),s=e.shiftKey;(i=(0, v.findAncestorByAttrName)(t,"data-button"))?this._handleButtonAction(n,i):(i=(0, v.findAncestorByAttrName)(t,"data-item"))?this._handleItemAction(n,i,s):(i=(0, v.findAncestorByAttrName)(t,"data-choice"))&&this._handleChoiceAction(n,i),e.preventDefault();}}},{key:"_onClick",value:function(e){var t=e.target,i=this.dropdown.classList.contains(this.config.classNames.activeState),n=this.store.getItemsFilteredByActive();if(this.containerOuter.contains(t))t.hasAttribute("data-button")&&this._handleButtonAction(n,t),i?this.isSelectOneElement&&t!==this.input&&!this.dropdown.contains(t)&&this.hideDropdown(!0):this.isTextElement?document.activeElement!==this.input&&this.input.focus():this.canSearch?this.showDropdown(!0):(this.showDropdown(),this.containerOuter.focus());else{var s=n.some(function(e){return e.highlighted});s&&this.unhighlightAll(),this.containerOuter.classList.remove(this.config.classNames.focusState),i&&this.hideDropdown();}}},{key:"_onMouseOver",value:function(e){(e.target===this.dropdown||this.dropdown.contains(e.target))&&e.target.hasAttribute("data-choice")&&this._highlightChoice(e.target);}},{key:"_onPaste",value:function(e){e.target!==this.input||this.config.paste||e.preventDefault();}},{key:"_onFocus",value:function(e){var t=this,i=e.target;if(this.containerOuter.contains(i)){var n=this.dropdown.classList.contains(this.config.classNames.activeState),s={text:function(){i===t.input&&t.containerOuter.classList.add(t.config.classNames.focusState);},"select-one":function(){t.containerOuter.classList.add(t.config.classNames.focusState),i===t.input&&(n||t.showDropdown());},"select-multiple":function(){i===t.input&&(t.containerOuter.classList.add(t.config.classNames.focusState),n||t.showDropdown(!0));}};s[this.passedElement.type]();}}},{key:"_onBlur",value:function(e){var t=this,i=e.target;if(this.containerOuter.contains(i)&&!this.isScrollingOnIe){var n=this.store.getItemsFilteredByActive(),s=this.dropdown.classList.contains(this.config.classNames.activeState),o=n.some(function(e){return e.highlighted}),r={text:function(){i===t.input&&(t.containerOuter.classList.remove(t.config.classNames.focusState),o&&t.unhighlightAll(),s&&t.hideDropdown());},"select-one":function(){t.containerOuter.classList.remove(t.config.classNames.focusState),i===t.containerOuter&&s&&!t.canSearch&&t.hideDropdown(),i===t.input&&s&&t.hideDropdown();},"select-multiple":function(){i===t.input&&(t.containerOuter.classList.remove(t.config.classNames.focusState),s&&t.hideDropdown(),o&&t.unhighlightAll());}};r[this.passedElement.type]();}else this.isScrollingOnIe=!1,this.input.focus();}},{key:"_regexFilter",value:function(e){if(!e)return !1;var t=this.config.regexFilter,i=new RegExp(t.source,"i");return i.test(e)}},{key:"_scrollToChoice",value:function(e,t){var i=this;if(e){var n=this.choiceList.offsetHeight,s=e.offsetHeight,o=e.offsetTop+s,r=this.choiceList.scrollTop+n,a=t>0?this.choiceList.scrollTop+o-r:e.offsetTop,c=function e(){var n=4,s=i.choiceList.scrollTop,o=!1,r=void 0,c=void 0;t>0?(r=(a-s)/n,c=r>1?r:1,i.choiceList.scrollTop=s+c,s<a&&(o=!0)):(r=(s-a)/n,c=r>1?r:1,i.choiceList.scrollTop=s-c,s>a&&(o=!0)),o&&requestAnimationFrame(function(i){e(i,a,t);});};requestAnimationFrame(function(e){c(e,a,t);});}}},{key:"_highlightChoice",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=Array.from(this.dropdown.querySelectorAll("[data-choice-selectable]")),n=t;if(i&&i.length){var s=Array.from(this.dropdown.querySelectorAll("."+this.config.classNames.highlightedState));
68s.forEach(function(t){t.classList.remove(e.config.classNames.highlightedState),t.setAttribute("aria-selected","false");}),n?this.highlightPosition=i.indexOf(n):(n=i.length>this.highlightPosition?i[this.highlightPosition]:i[i.length-1],n||(n=i[0])),n.classList.add(this.config.classNames.highlightedState),n.setAttribute("aria-selected","true"),this.containerOuter.setAttribute("aria-activedescendant",n.id);}}},{key:"_addItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,a=(0, v.isType)("String",e)?e.trim():e,c=r,l=this.store.getItems(),h=t||a,u=parseInt(i,10)||-1,d=n>=0?this.store.getGroupById(n):null,f=l?l.length+1:1;return this.config.prependValue&&(a=this.config.prependValue+a.toString()),this.config.appendValue&&(a+=this.config.appendValue.toString()),
69    this.store.dispatch((0, p.addItem)(a,h,f,u,n,s,o,c)),this.isSelectOneElement&&this.removeActiveItems(f),d&&d.value?(0, v.triggerEvent)(this.passedElement,"addItem",{id:f,value:a,label:h,groupValue:d.value,keyCode:c}):(0, v.triggerEvent)(this.passedElement,"addItem",{id:f,value:a,label:h,keyCode:c}),this}},{key:"_removeItem",value:function(e){if(!e||!(0, v.isType)("Object",e))return this;var t=e.id,i=e.value,n=e.label,s=e.choiceId,o=e.groupId,r=o>=0?this.store.getGroupById(o):null;return this.store.dispatch((0, p.removeItem)(t,s)),r&&r.value?(0, v.triggerEvent)(this.passedElement,"removeItem",{id:t,value:i,label:n,groupValue:r.value}):(0, v.triggerEvent)(this.passedElement,"removeItem",{id:t,value:i,label:n}),this}},{key:"_addChoice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;if("undefined"!=typeof e&&null!==e){var c=this.store.getChoices(),l=t||e,h=c?c.length+1:1,u=this.baseId+"-"+this.idNames.itemChoice+"-"+h;this.store.dispatch((0, p.addChoice)(e,l,h,s,n,u,o,r,a)),i&&this._addItem(e,l,h,void 0,o,r,a);}}},{key:"_clearChoices",value:function(){this.store.dispatch((0, p.clearChoices)());}},{key:"_addGroup",value:function(e,t){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"label",o=(0, v.isType)("Object",e)?e.choices:Array.from(e.getElementsByTagName("OPTION")),r=t?t:Math.floor((new Date).valueOf()*Math.random()),a=!!e.disabled&&e.disabled;o?(this.store.dispatch((0, p.addGroup)(e.label,r,!0,a)),o.forEach(function(e){var t=e.disabled||e.parentNode&&e.parentNode.disabled;i._addChoice(e[n],(0, v.isType)("Object",e)?e[s]:e.innerHTML,e.selected,t,r,e.customProperties,e.placeholder);})):this.store.dispatch((0, p.addGroup)(e.label,e.id,!1,e.disabled));}},{key:"_getTemplate",value:function(e){if(!e)return null;for(var t=this.config.templates,i=arguments.length,n=Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];return t[e].apply(t,n)}},{key:"_createTemplates",value:function(){var e=this,t=this.config.classNames,i={containerOuter:function(i){return (0, v.strToEl)('\n          <div\n            class="'+t.containerOuter+'"\n            '+(e.isSelectElement?e.config.searchEnabled?'role="combobox" aria-autocomplete="list"':'role="listbox"':"")+'\n            data-type="'+e.passedElement.type+'"\n            '+(e.isSelectOneElement?'tabindex="0"':"")+'\n            aria-haspopup="true"\n            aria-expanded="false"\n            dir="'+i+'"\n            >\n          </div>\n        ')},containerInner:function(){return (0, v.strToEl)('\n          <div class="'+t.containerInner+'"></div>\n        ')},itemList:function(){var i,n=(0, u.default)(t.list,(i={},s(i,t.listSingle,e.isSelectOneElement),s(i,t.listItems,!e.isSelectOneElement),i));return (0, v.strToEl)('\n          <div class="'+n+'"></div>\n        ')},placeholder:function(e){return (0, v.strToEl)('\n          <div class="'+t.placeholder+'">\n            '+e+"\n          </div>\n        ")},item:function(i){var n,o=(0, u.default)(t.item,(n={},s(n,t.highlightedState,i.highlighted),s(n,t.itemSelectable,!i.highlighted),s(n,t.placeholder,i.placeholder),n));if(e.config.removeItemButton){var r;return o=(0, u.default)(t.item,(r={},s(r,t.highlightedState,i.highlighted),s(r,t.itemSelectable,!i.disabled),s(r,t.placeholder,i.placeholder),r)),(0, v.strToEl)('\n            <div\n              class="'+o+'"\n              data-item\n              data-id="'+i.id+'"\n              data-value="'+i.value+'"\n              data-deletable\n              '+(i.active?'aria-selected="true"':"")+"\n              "+(i.disabled?'aria-disabled="true"':"")+"\n              >\n              "+i.label+'<!--\n           --><button\n                type="button"\n                class="'+t.button+'"\n                data-button\n                aria-label="Remove item: \''+i.value+"'\"\n                >\n                Remove item\n              </button>\n            </div>\n          ")}return (0, v.strToEl)('\n          <div\n            class="'+o+'"\n            data-item\n            data-id="'+i.id+'"\n            data-value="'+i.value+'"\n            '+(i.active?'aria-selected="true"':"")+"\n            "+(i.disabled?'aria-disabled="true"':"")+"\n            >\n            "+i.label+"\n          </div>\n        ")},choiceList:function(){return (0, v.strToEl)('\n          <div\n            class="'+t.list+'"\n            dir="ltr"\n            role="listbox"\n            '+(e.isSelectOneElement?"":'aria-multiselectable="true"')+"\n            >\n          </div>\n        ")},choiceGroup:function(e){var i=(0, u.default)(t.group,s({},t.itemDisabled,e.disabled));return (0, v.strToEl)('\n          <div\n            class="'+i+'"\n            data-group\n            data-id="'+e.id+'"\n            data-value="'+e.value+'"\n            role="group"\n            '+(e.disabled?'aria-disabled="true"':"")+'\n            >\n            <div class="'+t.groupHeading+'">'+e.value+"</div>\n          </div>\n        ")},choice:function(i){var n,o=(0, u.default)(t.item,t.itemChoice,(n={},s(n,t.itemDisabled,i.disabled),s(n,t.itemSelectable,!i.disabled),s(n,t.placeholder,i.placeholder),n));return (0, v.strToEl)('\n          <div\n            class="'+o+'"\n            data-select-text="'+e.config.itemSelectText+'"\n            data-choice\n            data-id="'+i.id+'"\n            data-value="'+i.value+'"\n            '+(i.disabled?'data-choice-disabled aria-disabled="true"':"data-choice-selectable")+'\n            id="'+i.elementId+'"\n            '+(i.groupId>0?'role="treeitem"':'role="option"')+"\n            >\n            "+i.label+"\n          </div>\n        ")}
69,input:function(){var e=(0, u.default)(t.input,t.inputCloned);return (0, v.strToEl)('\n          <input\n            type="text"\n            class="'+e+'"\n            autocomplete="off"\n            autocapitalize="off"\n            spellcheck="false"\n            role="textbox"\n            aria-autocomplete="list"\n            >\n        ')},dropdown:function(){var e=(0, u.default)(t.list,t.listDropdown);return (0, v.strToEl)('\n          <div\n            class="'+e+'"\n            aria-expanded="false"\n            >\n          </div>\n        ')},notice:function(e){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=(0, u.default)(t.item,t.itemChoice,(i={},s(i,t.noResults,"no-results"===n),s(i,t.noChoices,"no-choices"===n),i));return (0, v.strToEl)('\n          <div class="'+o+'">\n            '+e+"\n          </div>\n        ")},option:function(e){return (0, v.strToEl)('\n          <option value="'+e.value+'" selected>'+e.label+"</option>\n        ")}},n=this.config.callbackOnCreateTemplates,o={};n&&(0, v.isType)("Function",n)&&(o=n.call(this,v.strToEl)),this.config.templates=(0, v.extend)(i,o);}},{key:"_setLoading",value:function(e){this.store.dispatch((0, p.setIsLoading)(e));}},{key:"_createInput",value:function(){var e=this,t=this.passedElement.getAttribute("dir")||"ltr",i=this._getTemplate("containerOuter",t),n=this._getTemplate("containerInner"),s=this._getTemplate("itemList"),o=this._getTemplate("choiceList"),r=this._getTemplate("input"),a=this._getTemplate("dropdown");this.containerOuter=i,this.containerInner=n,this.input=r,this.choiceList=o,this.itemList=s,this.dropdown=a,this.passedElement.classList.add(this.config.classNames.input,this.config.classNames.hiddenState),this.passedElement.tabIndex="-1";var c=this.passedElement.getAttribute("style");if(Boolean(c)&&this.passedElement.setAttribute("data-choice-orig-style",c),this.passedElement.setAttribute("style","display:none;"),this.passedElement.setAttribute("aria-hidden","true"),this.passedElement.setAttribute("data-choice","active"),(0, v.wrap)(this.passedElement,n),(0, v.wrap)(n,i),this.isSelectOneElement?r.placeholder=this.config.searchPlaceholderValue||"":this.placeholder&&(r.placeholder=this.placeholder,r.style.width=(0, v.getWidthOfInput)(r)),this.config.addItems||this.disable(),i.appendChild(n),i.appendChild(a),n.appendChild(s),this.isTextElement||a.appendChild(o),this.isSelectMultipleElement||this.isTextElement?n.appendChild(r):this.canSearch&&a.insertBefore(r,a.firstChild),this.isSelectElement){var l=Array.from(this.passedElement.getElementsByTagName("OPTGROUP"));if(this.highlightPosition=0,this.isSearching=!1,this._setLoading(!0),l&&l.length)l.forEach(function(t){e._addGroup(t,t.id||null);});else{var h=Array.from(this.passedElement.options),u=this.config.sortFilter,d=this.presetChoices;h.forEach(function(e){d.push({value:e.value,label:e.innerHTML,selected:e.selected,disabled:e.disabled||e.parentNode.disabled,placeholder:e.hasAttribute("placeholder")});}),this.config.shouldSort&&d.sort(u);var f=d.some(function(e){return e.selected});d.forEach(function(t,i){if(e.isSelectOneElement){var n=f||!f&&i>0;e._addChoice(t.value,t.label,!n||t.selected,!!n&&t.disabled,void 0,t.customProperties,t.placeholder);}else e._addChoice(t.value,t.label,t.selected,t.disabled,void 0,t.customProperties,t.placeholder);});}this._setLoading(!1);}else this.isTextElement&&this.presetItems.forEach(function(t){var i=(0, v.getType)(t);if("Object"===i){if(!t.value)return;e._addItem(t.value,t.label,t.id,void 0,t.customProperties,t.placeholder);}else"String"===i&&e._addItem(t);});}}]),e}();e.exports=m;},function(e,t,i){!function(t){function i(){console.log.apply(console,arguments);}function n(e,t){var i;this.list=e,this.options=t=t||{};for(i in a)a.hasOwnProperty(i)&&("boolean"==typeof a[i]?this.options[i]=i in t?t[i]:a[i]:this.options[i]=t[i]||a[i]);}function s(e,t,i){var n,r,a,c,l,h;if(t){if(a=t.indexOf("."),a!==-1?(n=t.slice(0,a),r=t.slice(a+1)):n=t,c=e[n],null!==c&&void 0!==c)if(r||"string"!=typeof c&&"number"!=typeof c)if(o(c))for(l=0,h=c.length;l<h;l++)s(c[l],r,i);else r&&s(c,r,i);else i.push(c);}else i.push(e);return i}function o(e){return "[object Array]"===Object.prototype.toString.call(e)}function r(e,t){t=t||{},this.options=t,this.options.location=t.location||r.defaultOptions.location,this.options.distance="distance"in t?t.distance:r.defaultOptions.distance,this.options.threshold="threshold"in t?t.threshold:r.defaultOptions.threshold,this.options.maxPatternLength=t.maxPatternLength||r.defaultOptions.maxPatternLength,this.pattern=t.caseSensitive?e:e.toLowerCase(),this.patternLen=e.length,this.patternLen<=this.options.maxPatternLength&&(this.matchmask=1<<this.patternLen-1,this.patternAlphabet=this._calculatePatternAlphabet());}var a={id:null,caseSensitive:!1,include:[],shouldSort:!0,searchFn:r,sortFn:function(e,t){return e.score-t.score}
69,getFn:s,keys:[],verbose:!1,tokenize:!1,matchAllTokens:!1,tokenSeparator:/ +/g,minMatchCharLength:1,findAllMatches:!1};n.VERSION="2.7.3",n.prototype.set=function(e){return this.list=e,e},n.prototype.search=function(e){this.options.verbose&&i("\nSearch term:",e,"\n"),this.pattern=e,this.results=[],this.resultMap={},this._keyMap=null,this._prepareSearchers(),this._startSearch(),this._computeScore(),this._sort();var t=this._format();return t},n.prototype._prepareSearchers=function(){var e=this.options,t=this.pattern,i=e.searchFn,n=t.split(e.tokenSeparator),s=0,o=n.length;if(this.options.tokenize)for(this.tokenSearchers=[];s<o;s++)this.tokenSearchers.push(new i(n[s],e));this.fullSeacher=new i(t,e);},n.prototype._startSearch=function(){var e,t,i,n,s=this.options,o=s.getFn,r=this.list,a=r.length,c=this.options.keys,l=c.length,h=null;if("string"==typeof r[0])for(i=0;i<a;i++)this._analyze("",r[i],i,i);else for(this._keyMap={},i=0;i<a;i++)for(h=r[i],n=0;n<l;n++){if(e=c[n],"string"!=typeof e){if(t=1-e.weight||1,this._keyMap[e.name]={weight:t},e.weight<=0||e.weight>1)throw new Error("Key weight has to be > 0 and <= 1");e=e.name;}else this._keyMap[e]={weight:1};this._analyze(e,o(h,e,[]),h,i);}},n.prototype._analyze=function(e,t,n,s){var r,a,c,l,h,u,d,f,p,v,m,g,y,b,E,_=this.options,S=!1;if(void 0!==t&&null!==t){a=[];var I=0;if("string"==typeof t){if(r=t.split(_.tokenSeparator),_.verbose&&i("---------\nKey:",e),this.options.tokenize){for(b=0;b<this.tokenSearchers.length;b++){for(f=this.tokenSearchers[b],_.verbose&&i("Pattern:",f.pattern),p=[],g=!1,E=0;E<r.length;E++){v=r[E],m=f.search(v);var w={};m.isMatch?(w[v]=m.score,S=!0,g=!0,a.push(m.score)):(w[v]=1,this.options.matchAllTokens||a.push(1)),p.push(w);}g&&I++,_.verbose&&i("Token scores:",p);}for(l=a[0],u=a.length,b=1;b<u;b++)l+=a[b];l/=u,_.verbose&&i("Token score average:",l);}d=this.fullSeacher.search(t),_.verbose&&i("Full text score:",d.score),h=d.score,void 0!==l&&(h=(h+l)/2),_.verbose&&i("Score average:",h),y=!this.options.tokenize||!this.options.matchAllTokens||I>=this.tokenSearchers.length,_.verbose&&i("Check Matches",y),(S||d.isMatch)&&y&&(c=this.resultMap[s],c?c.output.push({key:e,score:h,matchedIndices:d.matchedIndices}):(this.resultMap[s]={item:n,output:[{key:e,score:h,matchedIndices:d.matchedIndices}]},this.results.push(this.resultMap[s])));}else if(o(t))for(b=0;b<t.length;b++)this._analyze(e,t[b],n,s);}},n.prototype._computeScore=function(){var e,t,n,s,o,r,a,c,l,h=this._keyMap,u=this.results;for(this.options.verbose&&i("\n\nComputing score:\n"),e=0;e<u.length;e++){for(n=0,s=u[e].output,o=s.length,c=1,t=0;t<o;t++)r=s[t].score,a=h?h[s[t].key].weight:1,l=r*a,1!==a?c=Math.min(c,l):(n+=l,s[t].nScore=l);1===c?u[e].score=n/o:u[e].score=c,this.options.verbose&&i(u[e]);}},n.prototype._sort=function(){var e=this.options;e.shouldSort&&(e.verbose&&i("\n\nSorting...."),this.results.sort(e.sortFn));},n.prototype._format=function(){var e,t,n,s,o=this.options,r=o.getFn,a=[],c=this.results,l=o.include;for(o.verbose&&i("\n\nOutput:\n\n",c),n=o.id?function(e){c[e].item=r(c[e].item,o.id,[])[0];}:function(){},s=function(e){var t,i,n,s,o,r=c[e];if(l.length>0){if(t={item:r.item},l.indexOf("matches")!==-1)for(n=r.output,t.matches=[],i=0;i<n.length;i++)s=n[i],o={indices:s.matchedIndices},s.key&&(o.key=s.key),t.matches.push(o);l.indexOf("score")!==-1&&(t.score=c[e].score);}else t=r.item;return t},e=0,t=c.length;e<t;e++)n(e),a.push(s(e));return a},r.defaultOptions={location:0,distance:100,threshold:.6,maxPatternLength:32},r.prototype._calculatePatternAlphabet=function(){var e={},t=0;for(t=0;t<this.patternLen;t++)e[this.pattern.charAt(t)]=0;for(t=0;t<this.patternLen;t++)e[this.pattern.charAt(t)]|=1<<this.pattern.length-t-1;return e},r.prototype._bitapScore=function(e,t){var i=e/this.patternLen,n=Math.abs(this.options.location-t);return this.options.distance?i+n/this.options.distance:n?1:i},r.prototype.search=function(e){var t,i,n,s,o,r,a,c,l,h,u,d,f,p,v,m,g,y,b,E,_,S,I,w=this.options;if(e=w.caseSensitive?e:e.toLowerCase(),this.pattern===e)return {isMatch:!0,score:0,matchedIndices:[[0,e.length-1]]};if(this.patternLen>w.maxPatternLength){if(y=e.match(new RegExp(this.pattern.replace(w.tokenSeparator,"|"))),b=!!y)for(_=[],t=0,S=y.length;t<S;
69t++)I=y[t],_.push([e.indexOf(I),I.length-1]);return {isMatch:b,score:b?.5:1,matchedIndices:_}}for(s=w.findAllMatches,o=w.location,n=e.length,r=w.threshold,a=e.indexOf(this.pattern,o),E=[],t=0;t<n;t++)E[t]=0;for(a!=-1&&(r=Math.min(this._bitapScore(0,a),r),a=e.lastIndexOf(this.pattern,o+this.patternLen),a!=-1&&(r=Math.min(this._bitapScore(0,a),r))),a=-1,m=1,g=[],h=this.patternLen+n,t=0;t<this.patternLen;t++){for(c=0,l=h;c<l;)this._bitapScore(t,o+l)<=r?c=l:h=l,l=Math.floor((h-c)/2+c);for(h=l,u=Math.max(1,o-l+1),d=s?n:Math.min(o+l,n)+this.patternLen,f=Array(d+2),f[d+1]=(1<<t)-1,i=d;i>=u;i--)if(v=this.patternAlphabet[e.charAt(i-1)],v&&(E[i-1]=1),f[i]=(f[i+1]<<1|1)&v,0!==t&&(f[i]|=(p[i+1]|p[i])<<1|1|p[i+1]),f[i]&this.matchmask&&(m=this._bitapScore(t,i-1),m<=r)){if(r=m,a=i-1,g.push(a),a<=o)break;u=Math.max(1,2*o-a);}if(this._bitapScore(t+1,o)>r)break;p=f;}return _=this._getMatchedIndices(E),{isMatch:a>=0,score:0===m?.001:m,matchedIndices:_}},r.prototype._getMatchedIndices=function(e){for(var t,i=[],n=-1,s=-1,o=0,r=e.length;o<r;o++)t=e[o],t&&n===-1?n=o:t||n===-1||(s=o-1,s-n+1>=this.options.minMatchCharLength&&i.push([n,s]),n=-1);return e[o-1]&&o-1-n+1>=this.options.minMatchCharLength&&i.push([n,o-1]),i},e.exports=n;}(this);},function(e,t,i){var n,s;!function(){function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n))e.push(i.apply(null,n));else if("object"===s)for(var r in n)o.call(n,r)&&n[r]&&e.push(r);}}return e.join(" ")}var o={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=i:(n=[],s=function(){return i}.apply(t,n),!(void 0!==s&&(e.exports=s)));}();},function(e,t,i){function n(e){return e&&e.__esModule?e:{default:e}}function s(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n);}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),a=i(5),c=i(26),l=n(c),h=function(){function e(){o(this,e),this.store=(0, a.createStore)(l.default,window.devToolsExtension?window.devToolsExtension():void 0);}return r(e,[{key:"getState",value:function(){return this.store.getState()}},{key:"dispatch",value:function(e){this.store.dispatch(e);}},{key:"subscribe",value:function(e){this.store.subscribe(e);}},{key:"isLoading",value:function(){var e=this.store.getState();return e.general.loading}},{key:"getItems",value:function(){var e=this.store.getState();return e.items}},{key:"getItemsFilteredByActive",value:function(){var e=this.getItems(),t=e.filter(function(e){return e.active===!0},[]);return t}},{key:"getItemsReducedToValues",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getItems(),t=e.reduce(function(e,t){return e.push(t.value),e},[]);return t}},{key:"getChoices",value:function(){var e=this.store.getState();return e.choices}},{key:"getChoicesFilteredByActive",value:function(){var e=this.getChoices(),t=e.filter(function(e){return e.active===!0});return t}},{key:"getChoicesFilteredBySelectable",value:function(){var e=this.getChoices(),t=e.filter(function(e){return e.disabled!==!0});return t}},{key:"getSearchableChoices",value:function(){var e=this.getChoicesFilteredBySelectable();return e.filter(function(e){return e.placeholder!==!0})}},{key:"getChoiceById",value:function(e){if(e){var t=this.getChoicesFilteredByActive(),i=t.find(function(t){return t.id===parseInt(e,10)});return i}return !1}},{key:"getGroups",value:function(){var e=this.store.getState();return e.groups}},{key:"getGroupsFilteredByActive",value:function(){var e=this.getGroups(),t=this.getChoices(),i=e.filter(function(e){var i=e.active===!0&&e.disabled===!1,n=t.some(function(e){return e.active===!0&&e.disabled===!1});return i&&n},[]);return i}},{key:"getGroupById",value:function(e){var t=this.getGroups(),i=t.find(function(t){return t.id===e});return i}},{key:"getPlaceholderChoice",value:function(){var e=this.getChoices(),t=[].concat(s(e)).reverse().find(function(e){return e.placeholder===!0});return t}}]),e}();t.default=h,e.exports=h;}
69,function(e,t,i){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var s=i(6),o=n(s),r=i(21),a=n(r),c=i(23),l=n(c),h=i(24),u=n(h),d=i(25),f=n(d),p=i(22);n(p);t.createStore=o.default,t.combineReducers=a.default,t.bindActionCreators=l.default,t.applyMiddleware=u.default,t.compose=f.default;},function(e,t,i){function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t,i){function n(){g===m&&(g=m.slice());}function o(){return v}function a(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return n(),g.push(e),function(){if(t){t=!1,n();var i=g.indexOf(e);g.splice(i,1);}}}function h(e){if(!(0, r.default)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(y)throw new Error("Reducers may not dispatch actions.");try{y=!0,v=p(v,e);}finally{y=!1;}for(var t=m=g,i=0;i<t.length;i++){var n=t[i];n();}return e}function u(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");p=e,h({type:l.INIT});}function d(){var e,t=a;return e={subscribe:function(e){function i(){e.next&&e.next(o());}if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");i();var n=t(i);return {unsubscribe:n}}},e[c.default]=function(){return this},e}var f;if("function"==typeof t&&"undefined"==typeof i&&(i=t,t=void 0),"undefined"!=typeof i){if("function"!=typeof i)throw new Error("Expected the enhancer to be a function.");return i(s)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var p=e,v=t,m=[],g=m,y=!1;return h({type:l.INIT}),f={dispatch:h,subscribe:a,getState:o,replaceReducer:u},f[c.default]=d,f}t.__esModule=!0,t.ActionTypes=void 0,t.default=s;var o=i(7),r=n(o),a=i(17),c=n(a),l=t.ActionTypes={INIT:"@@redux/INIT"};},function(e,t,i){function n(e){if(!r(e)||s(e)!=a)return !1;var t=o(e);if(null===t)return !0;var i=u.call(t,"constructor")&&t.constructor;return "function"==typeof i&&i instanceof i&&h.call(i)==d}var s=i(8),o=i(14),r=i(16),a="[object Object]",c=Function.prototype,l=Object.prototype,h=c.toString,u=l.hasOwnProperty,d=h.call(Object);e.exports=n;},function(e,t,i){function n(e){return null==e?void 0===e?c:a:l&&l in Object(e)?o(e):r(e)}var s=i(9),o=i(12),r=i(13),a="[object Null]",c="[object Undefined]",l=s?s.toStringTag:void 0;e.exports=n;},function(e,t,i){var n=i(10),s=n.Symbol;e.exports=s;},function(e,t,i){var n=i(11),s="object"==typeof self&&self&&self.Object===Object&&self,o=n||s||Function("return this")();e.exports=o;},function(e,t){(function(t){var i="object"==typeof t&&t&&t.Object===Object&&t;e.exports=i;}).call(t,function(){return this}());},function(e,t,i){function n(e){var t=r.call(e,c),i=e[c];try{e[c]=void 0;}catch(e){}var s=a.call(e);return t?e[c]=i:delete e[c],s}var s=i(9),o=Object.prototype,r=o.hasOwnProperty,a=o.toString,c=s?s.toStringTag:void 0;e.exports=n;},function(e,t){function i(e){return s.call(e)}var n=Object.prototype,s=n.toString;e.exports=i;},function(e,t,i){var n=i(15),s=n(Object.getPrototypeOf,Object);e.exports=s;},function(e,t){function i(e,t){return function(i){return e(t(i))}}e.exports=i;},function(e,t){function i(e){return null!=e&&"object"==typeof e}e.exports=i;},function(e,t,i){e.exports=i(18);},function(e,t,i){(function(e,n){function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o,r=i(20),a=s(r);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof e?e:n;var c=(0, a.default)(o);t.default=c;}).call(t,function(){return this}(),i(19)(e));},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e};},function(e,t){function i(e){var t,i=e.Symbol;return "function"==typeof i?i.observable?t=i.observable:(t=i("observable"),i.observable=t):t="@@observable",t}
69Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;},function(e,t,i){function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var i=t&&t.type,n=i&&'"'+i.toString()+'"'||"an action";return "Given action "+n+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function o(e){Object.keys(e).forEach(function(t){var i=e[t],n=i(void 0,{type:a.ActionTypes.INIT});if("undefined"==typeof n)throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");var s="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof i(void 0,{type:s}))throw new Error('Reducer "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle "+a.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")});}function r(e){for(var t=Object.keys(e),i={},n=0;n<t.length;n++){var r=t[n];"function"==typeof e[r]&&(i[r]=e[r]);}var a=Object.keys(i),c=void 0;try{o(i);}catch(e){c=e;}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(c)throw c;for(var n=!1,o={},r=0;r<a.length;r++){var l=a[r],h=i[l],u=e[l],d=h(u,t);if("undefined"==typeof d){var f=s(l,t);throw new Error(f)}o[l]=d,n=n||d!==u;}return n?o:e}}
69t.__esModule=!0,t.default=r;var a=i(6),c=i(7),l=(n(c),i(22));n(l);},function(e,t){function i(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}t.__esModule=!0,t.default=i;},function(e,t){function i(e,t){return function(){return t(e.apply(void 0,arguments))}}function n(e,t){if("function"==typeof e)return i(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(e),s={},o=0;o<n.length;o++){var r=n[o],a=e[r];"function"==typeof a&&(s[r]=i(a,t));}return s}t.__esModule=!0,t.default=n;},function(e,t,i){function n(e){return e&&e.__esModule?e:{default:e}}function s(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e){return function(i,n,s){var r=e(i,n,s),c=r.dispatch,l=[],h={getState:r.getState,dispatch:function(e){return c(e)}};return l=t.map(function(e){return e(h)}),c=a.default.apply(void 0,l)(r.dispatch),o({},r,{dispatch:c})}}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);}return e};t.default=s;var r=i(25),a=n(r);},function(e,t){function i(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}t.__esModule=!0,t.default=i;},function(e,t,i){function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=i(5),o=i(27),r=n(o),a=i(28),c=n(a),l=i(29),h=n(l),u=i(30),d=n(u),f=(0, s.combineReducers)({items:r.default,groups:c.default,choices:h.default,general:d.default}),p=function(e,t){var i=e;return "CLEAR_ALL"===t.type&&(i=void 0),f(i,t)};t.default=p;},function(e,t){function i(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];switch(t.type){case"ADD_ITEM":var n=[].concat(i(e),[{id:t.id,choiceId:t.choiceId,groupId:t.groupId,value:t.value,label:t.label,active:!0,highlighted:!1,customProperties:t.customProperties,placeholder:t.placeholder||!1,keyCode:null}]);return n.map(function(e){return e.highlighted&&(e.highlighted=!1),e});case"REMOVE_ITEM":return e.map(function(e){return e.id===t.id&&(e.active=!1),e});case"HIGHLIGHT_ITEM":return e.map(function(e){return e.id===t.id&&(e.highlighted=t.highlighted),e});default:return e}};t.default=n;},function(e,t){function i(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];switch(t.type){case"ADD_GROUP":return [].concat(i(e),[{id:t.id,value:t.value,active:t.active,disabled:t.disabled}]);case"CLEAR_CHOICES":return e.groups=[];default:return e}};t.default=n;},function(e,t){function i(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];switch(t.type){case"ADD_CHOICE":return [].concat(i(e),[{id:t.id,elementId:t.elementId,groupId:t.groupId,value:t.value,label:t.label||t.value,disabled:t.disabled||!1,selected:!1,active:!0,score:9999,customProperties:t.customProperties,placeholder:t.placeholder||!1,keyCode:null}]);case"ADD_ITEM":var n=e;return t.activateOptions&&(n=e.map(function(e){return e.active=t.active,e})),t.choiceId>-1&&(n=e.map(function(e){return e.id===parseInt(t.choiceId,10)&&(e.selected=!0),e})),n;case"REMOVE_ITEM":return t.choiceId>-1?e.map(function(e){return e.id===parseInt(t.choiceId,10)&&(e.selected=!1),e}):e;case"FILTER_CHOICES":var s=t.results,o=e.map(function(e){return e.active=s.some(function(t){return t.item.id===e.id&&(e.score=t.score,!0)}),e});return o;case"ACTIVATE_CHOICES":return e.map(function(e){return e.active=t.active,e});case"CLEAR_CHOICES":return e.choices=[];default:return e}};t.default=n;}
69,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{loading:!1},t=arguments[1];switch(t.type){case"LOADING":return {loading:t.isLoading};default:return e}};t.default=i;},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.addItem=function(e,t,i,n,s,o,r,a){return {type:"ADD_ITEM",value:e,label:t,id:i,choiceId:n,groupId:s,customProperties:o,placeholder:r,keyCode:a}},t.removeItem=function(e,t){return {type:"REMOVE_ITEM",id:e,choiceId:t}},t.highlightItem=function(e,t){return {type:"HIGHLIGHT_ITEM",id:e,highlighted:t}},t.addChoice=function(e,t,i,n,s,o,r,a,c){return {type:"ADD_CHOICE",value:e,label:t,id:i,groupId:n,disabled:s,elementId:o,customProperties:r,placeholder:a,keyCode:c}},t.filterChoices=function(e){return {type:"FILTER_CHOICES",results:e}},t.activateChoices=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return {type:"ACTIVATE_CHOICES",active:e}},t.clearChoices=function(){return {type:"CLEAR_CHOICES"}},t.addGroup=function(e,t,i,n){return {type:"ADD_GROUP",value:e,id:t,active:i,disabled:n}},t.clearAll=function(){return {type:"CLEAR_ALL"}},t.setIsLoading=function(e){return {type:"LOADING",isLoading:e}};},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=(t.capitalise=function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})},t.generateChars=function(e){for(var t="",i=0;i<e;i++){var n=c(0,36);t+=n.toString(36);}return t}),s=(t.generateId=function(e,t){var i=e.id||e.name&&e.name+"-"+n(2)||n(4);return i=i.replace(/(:|\.|\[|\]|,)/g,""),i=t+i},t.getType=function(e){return Object.prototype.toString.call(e).slice(8,-1);
70    }),o=t.isType=function(e,t){var i=s(t);return void 0!==t&&null!==t&&i===e},r=(t.isNode=function(e){return "object"===("undefined"==typeof Node?"undefined":i(Node))?e instanceof Node:e&&"object"===("undefined"==typeof e?"undefined":i(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},t.isElement=function(e){return "object"===("undefined"==typeof HTMLElement?"undefined":i(HTMLElement))?e instanceof HTMLElement:e&&"object"===("undefined"==typeof e?"undefined":i(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},t.extend=function e(){for(var t={},i=arguments.length,n=function(i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(o("Object",i[n])?t[n]=e(!0,t[n],i[n]):t[n]=i[n]);},s=0;s<i;s++){var r=arguments[s];o("Object",r)&&n(r);}return t},t.whichTransitionEvent=function(){var e,t=document.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in i)if(void 0!==t.style[e])return i[e]},t.whichAnimationEvent=function(){var e,t=document.createElement("fakeelement"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(e in i)if(void 0!==t.style[e])return i[e]}),a=(t.getParentsUntil=function(e,t,i){for(var n=[];e&&e!==document;e=e.parentNode){if(t){var s=t.charAt(0);if("."===s&&e.classList.contains(t.substr(1)))break;if("#"===s&&e.id===t.substr(1))break;if("["===s&&e.hasAttribute(t.substr(1,t.length-1)))break;if(e.tagName.toLowerCase()===t)break}if(i){var o=i.charAt(0);"."===o&&e.classList.contains(i.substr(1))&&n.push(e),"#"===o&&e.id===i.substr(1)&&n.push(e),"["===o&&e.hasAttribute(i.substr(1,i.length-1))&&n.push(e),e.tagName.toLowerCase()===i&&n.push(e);}else n.push(e);}return 0===n.length?null:n},t.wrap=function(e,t){return t=t||document.createElement("div"),e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t.appendChild(e)},t.getSiblings=function(e){for(var t=[],i=e.parentNode.firstChild;i;i=i.nextSibling)1===i.nodeType&&i!==e&&t.push(i);return t},t.findAncestor=function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}
70,t.findAncestorByAttrName=function(e,t){for(var i=e;i;){if(i.hasAttribute(t))return i;i=i.parentElement;}return null},t.debounce=function(e,t,i){var n;return function(){var s=this,o=arguments,r=function(){n=null,i||e.apply(s,o);},a=i&&!n;clearTimeout(n),n=setTimeout(r,t),a&&e.apply(s,o);}},t.getElemDistance=function(e){var t=0;if(e.offsetParent)do t+=e.offsetTop,e=e.offsetParent;while(e);return t>=0?t:0},t.getElementOffset=function(e,t){var i=t;return i>1&&(i=1),i>0&&(i=0),Math.max(e.offsetHeight*i)},t.getAdjacentEl=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e&&t){var n=e.parentNode.parentNode,s=Array.from(n.querySelectorAll(t)),o=s.indexOf(e),r=i>0?1:-1;return s[o+r]}},t.getScrollPosition=function(e){return "bottom"===e?Math.max((window.scrollY||window.pageYOffset)+(window.innerHeight||document.documentElement.clientHeight)):window.scrollY||window.pageYOffset},t.isInView=function(e,t,i){return this.getScrollPosition(t)>this.getElemDistance(e)+this.getElementOffset(e,i)},t.isScrolledIntoView=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e){var n=void 0;return n=i>0?t.scrollTop+t.offsetHeight>=e.offsetTop+e.offsetHeight:e.offsetTop>=t.scrollTop}},t.stripHTML=function(e){return e.replace(/&/g,"&amp;").replace(/>/g,"&rt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}),c=(t.addAnimation=function(e,t){var i=r(),n=function n(){e.classList.remove(t),e.removeEventListener(i,n,!1);};e.classList.add(t),e.addEventListener(i,n,!1);},t.getRandomNumber=function(e,t){return Math.floor(Math.random()*(t-e)+e)}),l=t.strToEl=function(){var e=document.createElement("div");return function(t){var i=t.trim(),n=void 0;for(e.innerHTML=i,n=e.children[0];e.firstChild;)e.removeChild(e.firstChild);return n}}();t.getWidthOfInput=function(e){var t=e.value||e.placeholder,i=e.offsetWidth;if(t){var n=l("<span>"+a(t)+"</span>");if(n.style.position="absolute",n.style.padding="0",n.style.top="-9999px",n.style.left="-9999px",n.style.width="auto",n.style.whiteSpace="pre",document.body.contains(e)&&window.getComputedStyle){var s=window.getComputedStyle(e);s&&(n.style.fontSize=s.fontSize,n.style.fontFamily=s.fontFamily,n.style.fontWeight=s.fontWeight,n.style.fontStyle=s.fontStyle,n.style.letterSpacing=s.letterSpacing,n.style.textTransform=s.textTransform,n.style.padding=s.padding);}document.body.appendChild(n),t&&n.offsetWidth!==e.offsetWidth&&(i=n.offsetWidth+4),document.body.removeChild(n);}return i+"px"},t.sortByAlpha=function(e,t){var i=(e.label||e.value).toLowerCase(),n=(t.label||t.value).toLowerCase();return i<n?-1:i>n?1:0},t.sortByScore=function(e,t){return e.score-t.score},t.triggerEvent=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=new CustomEvent(t,{detail:i,bubbles:!0,cancelable:!0});return e.dispatchEvent(n)};},function(e,t){!function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}Array.from||(Array.from=function(){var e=Object.prototype.toString,t=function(t){return "function"==typeof t||"[object Function]"===e.call(t)},i=function(e){var t=Number(e);return isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t},n=Math.pow(2,53)-1,s=function(e){var t=i(e);return Math.min(Math.max(t,0),n)};return function(e){var i=this,n=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var o,r=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof r){if(!t(r))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(o=arguments[2]);}for(var a,c=s(n.length),l=t(i)?Object(new i(c)):new Array(c),h=0;h<c;)a=n[h],r?l[h]="undefined"==typeof o?r(a,h):r.call(o,a,h):l[h]=a,h+=1;return l.length=c,l}}()),Array.prototype.find||(Array.prototype.find=function(e){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,i=Object(this),n=i.length>>>0,s=arguments[1],o=0;o<n;o++)if(t=i[o],e.call(s,t,o,i))return t}),e.prototype=window.Event.prototype,window.CustomEvent=e;}();}])});
71
72    });
73
74    var Choices = unwrapExports(choices_min);
75    var choices_min_1 = choices_min.Choices;
76
77    var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
78
79    var DEFAULT_OPTIONS = {
80      itemSelectText: '',
81      searchEnabled: false,
82      shouldSort: false
83    };
84
85    var simulate_event = function simulate_event(eventName, el, e) {
86      var val = e.target.value;
87      if (e.target.value === "INM_EMPTY_VALUE_HACK") {
88        val = '';
89      }
90      var idx = el.querySelector('option[value="' + val + '"]');
91      if (idx) {
92        idx.selected = true;
93      }
94      var event = document.createEvent('HTMLEvents');
95      event.initEvent(eventName, true, false);
96      el.dispatchEvent(event);
97    };
98
99    function ChoicesWrapper(el, options) {
100      var _this4 = this;
101
102      this.createClone = function () {
103        var _this = this;
104
105        //Cleanup before creating a new clone
106        this.destroyClonedSelect();
107
108        //Create a clone of the DOM node used by Vue JS so that we don't butcher it
109        // with Choices.js and cause issues when diffs occurr after we call Choices' destroy() function
110        this.clonedElement = this.originalEl.cloneNode(true);
111
112        //Remove the node_insertion css classes so that we don't trigger the Select enhancement system again
113        // when we add the clonsed element into the DOM
114        this.clonedElement.classList.remove('inm-select--js');
115
116        //proxy important events from the clone to the original element
117        this.clonedElement.addEventListener('change', function (event) {
118          return simulate_event('change', _this.originalEl, event);
119        });
120        this.clonedElement.addEventListener('input', function (event) {
121          return simulate_event('input', _this.originalEl, event);
122        });
123
124        // listen for changes on original element to pass to clone
125        this.originalEl.addEventListener('change', function (e) {
126          return _this.setValueToCurrentChoice();
127        });
128        this.originalEl.addEventListener('input', function (e) {
129          return _this.setValueToCurrentChoice();
130        });
131        this.originalEl.addEventListener('inm-change', function (e) {
132          return _this.setValueToCurrentChoice();
133        });
134
135        this.ensureSelectedValue();
136        this.ensurePlaceholder();
137        this.ensureEmptyValuesRegisterCorrectly();
138
139        //Insert the cloned select immediate after our original node and then hide the original
140        this.originalEl.insertAdjacentElement("afterend", this.clonedElement);
141        this.originalEl.style.display = 'none';
142
143        //Provide the clone to Choices.js
144        this.choicesInstance = new Choices(this.clonedElement, this.get
144SelectOptions());
145        if (this.originalEl.disabled) {
146          this.choicesInstance.disable();
147        }
148
149        //Make sure that all aria attributes set on the original element get set onto the Choices enhanced select.
150        var _iteratorNormalCompletion = true;
151        var _didIteratorError = false;
152        var _iteratorError = undefined;
153
154        try {
155          for (var _iterator = this.originalEl.attributes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
156            var _ref = _step.value;
157            var name = _ref.name;
158            var value = _ref.value;
159
160            //IE11 doesn't have String.prototype.startsWith, so just use substring instead of requiring a polyfill.
161            var ariaPrefix = "aria";
162            var beginningOfString = name.substring(0, ariaPrefix.length);
163            if (beginningOfString !== ariaPrefix) {
164              continue;
165            }
166
167            this.choicesInstance.containerOuter.setAttribute(name, value);
168          }
169        } catch (err) {
170          _didIteratorError = true;
171          _iteratorError = err;
172        } finally {
173          try {
174            if (!_iteratorNormalCompletion && _iterator.return) {
175              _iterator.return();
176            }
177          } finally {
178            if (_didIteratorError) {
179              throw _iteratorError;
180            }
181          }
182        }
183      };
184
185      this.setValueToCurrentChoice = function () {
186        var val = this.originalEl.value;
187        if (val === "") {
188          val = 'INM_EMPTY_VALUE_HACK';
189        }
190        if (this.choicesInstance.getValue().value != val) {
191          this.choicesInstance.setValueByChoice(val);
192        }
193      };
194
195      this.destroyClonedSelect = function () {
196        if (this.clonedElement) {
197          this.choicesInstance.destroy();
198          this.clonedElement.parentNode.removeChild(this.clonedElement);
199          this.clonedElement = null;
200
201          this.originalEl.style.display = undefined;
202        }
203      };
204
205      this.ensureSelectedValue = function () {
206        var _this2 = this;
207
208        this.clonedElement.value = this.originalEl.value;
209        //Check if any of the options match the value provided to us via props.
210        this.clonedElement.childNodes.forEach(function (el) {
211          if (el.value === _this2.originalEl.value) {
212            _this2.originalEl.setAttribute('selected', '');
213          }
214        });
215      };
216
217      this.ensurePlaceholder = function () {
218        var _this3 = this;
219
220        //If one of the items is already selected, there is no need to provide a placeholder.
221        if (Array.from(this.clonedElement.childNodes).find(function (el) {
222          return _this3.originalEl.getAttribute && _this3.originalEl.getAttribute('selected') === '';
223        })) {
224          return;
225        }
226
227        //Create an option to act as a placeholder.
228        //Choices.js specifically looks for the attribute 'placeholder' to attach placeholder css classes
229        //Select this option by default
230        var placeholderEl = document.createElement('option');
231        placeholderEl.setAttribute('placeholder', '');
232        placeholderEl.setAttribute('selected', '');
233        placeholderEl.innerText = this.placeholder;
234
235        this.clonedElement.insertAdjacentElement('afterbegin', placeholderEl);
236      };
237
238      // Known choices.js bug- it does not handle empty values. This allows us to manage them for it.
239      this.ensureEmptyValuesRegisterCorrectly = function () {
240        this.clonedElement.childNodes.forEach(function (node) {
241          if (node.value === '') {
242            node.value = "INM_EMPTY_VALUE_HACK";
243          }
244        });
245      };
246
247      this.getSelectOptions = function () {
248        var datasetOptions = {};
249        if (this.originalEl.dataset && this.originalEl.dataset.inmSelect) {
250          datasetOptions = JSON.parse(this.originalEl.dataset.inmSelect);
251        }
252
253        return Object.assign({}, DEFAULT_OPTIONS, this.options, datasetOptions);
254      };
255
256      // ==== Component Init ====
257      this.originalEl = el;
258      this.options = options;
259
260      this.clonedElement = null;
261      this.choicesInstance = null;
262
263      // ==== Component Mount ====
264      this.createClone();
265
266      // ==== Create Update Listener ====
267      this.updateObserver = new MutationObserver(function (mutations) {
268        mutations.forEach(function (mutation) {
269          if (mutation.type === 'attributes') {
270            if (mutation.attributeName === 'disabled') {
271              mutation.target.disabled ? _this4.choicesInstance.disable() : _this4.choicesInstance.enable();
272            } else if (mutation.attributeName === 'data-inm-select') {
273              _this4.createClone();
274            }
275          } else if (mutation.type === 'childList') {
276            _this4.createClone();
277          }
278        });
279      });
280
281      this.updateObserver.observe(this.originalEl, {
282        attributes: true,
283        childList: true,
284        attributeFilter: ['disabled', 'data-inm-select']
285      });
286    }
287
288    var select = function select(el) {
289      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
290
291      var getOuterClassnames = function getOuterClassnames() {
292        var orig = el.className.split(' ');
293        var finals = ['inm-selectjs'];
294        for (var i in orig) {
295          // only add classes to the final list that DON'T start with `inm-select`
296          if (orig[i].indexOf('inm-select') === -1) {
297            finals.push(orig[i]);
298          }
299        }
300        return finals.join(' ');
301      };
302      var default_classNames = {
303        containerOuter: getOuterClassnames(),
304        containerInner: 'inm-selectjs__inner',
305        input: 'inm-selectjs__input',
306        inputCloned: 'inm-selectjs__input--cloned',
307        list: 'inm-selectjs__list',
308        listItems: 'inm-selectjs__list--multiple',
309        listSingle: 'inm-selectjs__list--single',
310        listDropdown: 'inm-selectjs__list--dropdown',
311        item: 'inm-selectjs__item',
312        itemSelectable: 'inm-selectjs__item--selectable',
313        itemDisabled: 'inm-selectjs__item--disabled',
314        itemChoice: 'inm-selectjs__item--choice',
315        placeholder: 'inm-selectjs__placeholder',
316        group: 'inm-selectjs__group',
317        groupHeading: 'inm-selectjs__heading',
318        button: 'inm-selectjs__button',
319        activeState: 'is-active',
320        focusState: 'inm-is-focused',
321        openState: 'is-open',
322        disabledState: 'is-disabled',
323        highlightedState: 'is-highlighted',
324        hiddenState: 'is-hidden',
325        flippedState: 'is-flipped',
326        loadingState: 'is-loading',
327        noResults: 'has-no-results',
328        noChoices: 'has-no-choices'
329      };
330      if (options) {
331        if (options.itemSelectText === '') {
332          default_classNames.itemSelectable = 'inm-selectjs__item--selectable inm-selectjs__item--plain';
333        }
334        // allow overrides of classNames
335        if (options.classNames) {
336          for (var key in options.classNames) {
337            default_classNames[key] = options.classNames[key];
338          }
339        }
340      }
341
342      options.classNames = default_classNames;
343      return new ChoicesWrapper(el, options);
344    };
345
346    var Keys = {
347      SPACE_BAR: 32,
348      ENTER: 13,
349      ESC: 27,
350      DOWN: 40,
351      LEFT: 37,
352      RIGHT: 39,
353      UP: 38
354    };
355
356    var Utils = {
357      Keys: Keys,
358      //Provides an easy way to trigger a callback based on any number of keyboard keys
359      handleKeys: function handleKeys(keys, callback) {
360        return function (event) {
361          if (keys.includes(event.keyCode)) {
362            callback(event);
363          }
364        };
365      },
366
367      // Note: intended to call using `.apply(e.target, [selector])`
368      closest: function closest(class_to_find) {
369        var includeModifiers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
370
371        var elem = this;
372        while (elem) {
373          // loop up the dom looking for the parent
374          if (elem.classList && elem.classList.contains(class_to_find)) {
375            return elem;
376          }
377          // if we want to look for a class including modifiers, do that too.
378          // Note: SVGs do not always have className as a string (it is an object), which is why we look for classname type
379          if (includeModifiers && elem.className && typeof elem.className == "string" && elem.className.indexOf(class_to_find + '--') !== -1) {
380            return elem;
381          }
382          // see if the element is the highest up the chain it can go. if it is, stop processing; we ain't gon' find anything.
383          if (elem.tagName == "HTML") {
384            return false;
385          }
386          elem = elem.parentNode;
387        }
388        return false;
389      },
390      detectIEVersion: function detectIEVersion() {
391        /**
392         * This was taken from:
393         * https://github.com/inmar/eretail_inmart_web/blob/master/src/utils/DetectIEVersion.js
394         */
395        var ua = window.navigator.userAgent;
396
397        // Test values; Uncomment to check result …
398
399        // IE 10
400        // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';
401
402        // IE 11
403        // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';
404
405        // Edge 12 (Spartan)
406        // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';
407
408        // Edge 13
409        // ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';
410
411        var msie = ua.indexOf('MSIE ');
412        if (msie > 0) {
413          // IE 10 or older => return version number
414          return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
415        }
416
417        var trident = ua.indexOf('Trident/');
418        if (trident > 0) {
419          // IE 11 => return version number
420          var rv = ua.indexOf('rv:');
421          return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
422        }
423
424        var edge = ua.indexOf('Edge/');
425        if (edge > 0) {
426          // Edge (IE 12+) => return version number
427          return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
428        }
429
430        // other browser
431        return false;
432      }
433      // this method is for developer use in comparing the css of 2 different elements. it should not be shipped, but
434      // pease leave in place to comment/uncomment as needed
435      // compareCss: function (el1, el2) {
436      //   var getComputed = function (el) {
437      //     var css = window.getComputedStyle(el);
438      //     let vals = {}
439      //     for (var i = 0; i < css.length; i++) {
440      //       vals[css[i]] = css.getPropertyValue("" + css[i])
441      //     }
442      //     return vals
443      //   }
444      //   var vals1 = getComputed(el1)
445      //   var vals2 = getComputed(el2)
446      //   var different = []
447      //   for (let i in vals1) {
448      //     if (vals2[i]) {
449      //       // the item exists, but they're not the same
450      //       if (vals2[i] != vals1[i]) {
451      //         different.push(`${i}: [${vals1[i]} | ${vals2[i]}]`)
452      //       }
453      //     }
454      //     else {
455      //       // the first has it, but not the second
456      //       different.push(`${i}: [${vals1[i]} | _?_ ]`)
457      //     }
458      //   }
459
460      //   for (let i in vals2) {
461      //     if (!vals1[i]) {
462      //       // only the second has it
463      //       different.push(`${i}: [_?_ : ${vals2[i]}]`)
464      //     }
465      //   }
466
467      //   different.forEach(i => console.log(i))
468      //   return different
469      // }
470    };
471
472    var ALL_RIGHTS_RESERVED = "All rights reserved";
473    var SKIP_TO_MAIN_CONTENT = "Skip to Main Content";
474    var PRESS_SPACE_TO_DISPLAY = "press space bar to display contents of this input";
475    var PRESS_SPACE_TO_HIDE = "press space bar to hide contents of this input";
476    var SHOW_INPUT_CONTENTS = "show input contents";
477    var HIDE_INPUT_CONTENTS = "hide input contents";
478    var en = {
479    	ALL_RIGHTS_RESERVED: ALL_RIGHTS_RESERVED,
480    	SKIP_TO_MAIN_CONTENT: SKIP_TO_MAIN_CONTENT,
481    	PRESS_SPACE_TO_DISPLAY: PRESS_SPACE_TO_DISPLAY,
482    	PRESS_SPACE_TO_HIDE: PRESS_SPACE_TO_HIDE,
483    	SHOW_INPUT_CONTENTS: SHOW_INPUT_CONTENTS,
484    	HIDE_INPUT_CONTENTS: HIDE_INPUT_CONTENTS
485    };
486
487    var ALL_RIGHTS_RESERVED$1 = "Todos los derechos reservados";
488    var SKIP_TO_MAIN_CONTENT$1 = "Saltar al contenido principal";
489    var PRESS_SPACE_TO_DISPLAY$1 = "presione la barra espaciadora para mostrar el contenido de esta entrada";
490    var PRESS_SPACE_TO_HIDE$1 = "presione la barra espaciadora para ocultar el contenido de esta entrada";
491    var SHOW_INPUT_CONTENTS$1 = "mostrar contenido de entrada";
492    var HIDE_INPUT_CONTENTS$1 = "ocultar el contenido de entrada";
493    var es = {
494    	ALL_RIGHTS_RESERVED: ALL_RIGHTS_RESERVED$1,
495    	SKIP_TO_MAIN_CONTENT: SKIP_TO_MAIN_CONTENT$1,
496    	PRESS_SPACE_TO_DISPLAY: PRESS_SPACE_TO_DISPLAY$1,
497    	PRESS_SPACE_TO_HIDE: PRESS_SPACE_TO_HIDE$1,
498    	SHOW_INPUT_CONTENTS: SHOW_INPUT_CONTENTS$1,
499    	HIDE_INPUT_CONTENTS: HIDE_INPUT_CONTENTS$1
500    };
501
502    var ALL_RIGHTS_RESERVED$2 = "Tất cả các quyền được bảo lưu";
503    var SKIP_TO_MAIN_CONTENT$2 = "Chuyển đến nội dung chính";
504    var PRESS_SPACE_TO_DISPLAY$2 = "nhấn phím cách để hiển thị nội dung của đầu vào này";
505    var PRESS_SPACE_TO_HIDE$2 = "nhấn phím cách để ẩn nội dung của đầu vào này";
506    var SHOW_INPUT_CONTENTS$2 = "hiển thị nội dung đầu vào";
507    var HIDE_INPUT_CONTENTS$2 = "ẩn nội dung đầu vào";
508    var vi = {
509    	ALL_RIGHTS_RESERVED: ALL_RIGHTS_RESERVED$2,
510    	SKIP_TO_MAIN_CONTENT: SKIP_TO_MAIN_CONTENT$2,
511    	PRESS_SPACE_TO_DISPLAY: PRESS_SPACE_TO_DISPLAY$2,
512    	PRESS_SPACE_TO_HIDE: PRESS_SPACE_TO_HIDE$2,
513    	SHOW_INPUT_CONTENTS: SHOW_INPUT_CONTENTS$2,
514    	HIDE_INPUT_CONTENTS: HIDE_INPUT_CONTENTS$2
515    };
516
517    var i18N = {
518      "EN": en,
519      "ES": es,
520      "VI": vi
521    };
522    var locale = {
523      getLocaleKeyValue: function getLocaleKeyValue(locale) {
524        if (!locale) {
525          locale = localStorage.getItem('inm_locale') || "EN";
526        }
527        if (i18N[locale]) return i18N[locale];
528
529        window.inm.logger.warn('unexpected locale requested: ' + locale);
530        return i18N['EN'];
531      }
532    };
533
534    var Keys$1 = Utils.Keys;
535    var MutationObserver$1 = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
536
537    var change_event_listeners = {
538      checkbox: function checkbox(e) {
539        // add change event to each element as well
540        if (e.target.classList.contains('inm-checkbox__field')) {
541          if (e.target.checked) {
542            e.target.parentNode.classList.add('inm-is-checked');
543            e.target.parentNode.setAttribute('aria-checked', true);
544            return;
545          }
546          e.target.parentNode.classList.remove('inm-is-checked');
547          e.target.parentNode.setAttribute('aria-checked', false);
548        }
549      },
550      radio: function radio(e) {
551        if (e.target.classList.contains('inm-radio__field')) {
552          document.querySelectorAll('input[type=radio][name=\'' + e.target.getAttribute('name') + '\']').forEach(function (el) {
553            // per documentation on w3: https://www.w3.org/TR/2016/WD-wai-aria-practices-1.1-20160317/examples/radio/radio.html
554            if (el.checked) {
555              el.parentNode.classList.add('inm-is-checked');
556              el.parentNode.setAttribute('aria-checked', true);
557              el.parentNode.setAttribute('tabindex', 0);
558            } else {
559              el.parentNode.classList.remove('inm-is-checked');
560              el.parentNode.setAttribute('aria-checked', false);
561              el.parentNode.setAttribute('tabindex', -1);
562            }
563          });
564        }
565      }
566    };
567
568    var checkbox_radio_enhancements = function checkbox_radio_enhancements(e) {
569      if (e.target.classList.contains('inm-checkbox__field')) {
570        observeCheckboxRadioDisabledState(e.target);
571        updateCheckboxRadioDisabledState(e.target);
572        e.target.setAttribute('tabindex', -1); // the actual field is not tabbable, just the label
573
574        // table checkboxes are handled specially, so skip if we know it's a table checkbox
575        if (!e.target.parentNode.classList.contains('js-inm-selectable-table-row')) {
576          // update parent nodes to have the labels on them for the checkbox button for aural browsers
577          e.target.parentNode.setAttribute('aria-label', e.target.parentNode.innerText);
578          e.target.setAttribute('aria-label', e.target.parentNode.innerText); // label the element itself, as some assitive technologies force focus here even when we try to prevent it.
579          e.target.parentNode.setAttribute('role', 'checkbox');
580          // determine initial state of checkbox
581          change_event_listeners.checkbox(e);
582        }
583      } else if (e.target.classList.contains('inm-radio__field')) {
584        observeCheckboxRadioDisabledState(e.target);
585        updateCheckboxRadioDisabledState(e.target);
586
587        e.target.setAttribute('role', 'radio');
588
589        // update parent nodes to have the labels on them for the radio button for aural browsers
590        document.querySelectorAll('input[type=radio][name=\'' + e.target.getAttribute('name') + '\']').forEach(function (el) {
591          el.parentNode.setAttribute('aria-label', el.parentNode.innerText);
592        });
593        // todo: enforce groups with radios
594
595        // determine initial state of radio
596        change_event_listeners.radio(e);
597      }
598    };
599
600    // let the spacebar add checked/not checked to checkboxes
601    var select_checkbox = function select_checkbox(e) {
602      if (is_checkbox(e) && e.keyCode === Keys$1.SPACE_BAR) {
603        var field = e.target.getElementsByClassName('inm-checkbox__field')[0];
604        simulate_selection(field, e);
605      }
606    };
607
608    var simulate_selection = function simulate_selection(field, e) {
609      if (field) {
610        field.checked = !field.checked;
611        var changeEvent = document.createEvent('Events');
612        changeEvent.initEvent("change", true, false);
613        field.dispatchEvent(changeEvent);
614        e.preventDefault();
615      }
616    };
617
618    var is_checkbox = function is_checkbox(e) {
619      return isInClass(e.target, 'inm-checkbox') && !isInClass(e.target, 'inm-checkbox__field');
620    };
621    var is_radio = function is_radio(e) {
622      return isInClass(e.target, 'inm-radio') && !isInClass(e.target, 'inm-radio__field');
623    };
624
625    var isInClass = function isInClass(el, classPiece) {
626      return el.className && typeof el.className == "string" && el.className.indexOf(classPiece) !== -1;
627    };
628
629    // add active classes to checkbox radios when key pressed
630    var keychange_checkboxradio = function keychange_checkboxradio(e, type) {
631      if (e.keyCode === Keys$1.SPACE_BAR && (is_checkbox(e) || is_radio(e))) {
632        if (type === 'keyup') {
633          e.target.classList.remove('inm-is-active');
634        } else {
635          // otherwise keydown
636          e.target.classList.add('inm-is-active');
637        }
638      }
639    };
640
641    var checkboxRadioObserver = new MutationObserver$1(function (mutations) {
642      mutations.forEach(function (mutation) {
643        if (mutation.type == "attributes") {
644          updateCheckboxRadioDisabledState(mutation.target);
645        }
646      });
647    });
648
649    // detect changes to the messaging on 
650    var observeCheckboxRadioDisabledState = function observeCheckboxRadioDisabledState(el) {
651      checkboxRadioObserver.observe(el, {
652        attributeFilter: ['disabled'], // only bother listening for the ones we care about
653        attributes: true //configure it to listen to attribute changes
654      });
655    };
656
657    var updateCheckboxRadioDisabledState = function updateCheckboxRadioDisabledState(el) {
658      var tabindex = el.disabled ? '-1' : '0';
659      el.parentNode.setAttribute('tabindex', tabindex);
660      el.parentNode.classList.toggle('inm-is-disabled', el.disabled);
661    };
662
663    var select_enhancement = function select_enhancement(e) {
664
665      if (e.target.classList.contains('inm-select--js')) {
666        var options = {};
667
668        select(e.target, options);
669      }
670    };
671
672    // detect inputs that start with message attributes, as the mutation observer only gets _changed_ elements
673    var input_with_messaging_enhancement = function input_with_messaging_enhancement(e) {
674      // these could have modifiers, so we use indexOf instead
675      if (isInClass(e.target, 'inm-input') && e.target.getElementsByClassName('inm-input__field').length) {
676        observeInputChanges(e.target);
677        update_validation(e.target);
678      }
679    };
680
681    var update_validation = function update_validation(el) {
682      var msg = '';
683      var type = '';
684      var field = el.getElementsByClassName('inm-input__field')[0]; // there really should only ever be one, and if there's not, sucks to suck
685
686      // use the supplied message, if there is one
687      if (el.dataset && el.dataset.message) {
688        msg = el.dataset.message;
689      }
690
691      // determine the sort of messaging we have
692      if (isInClass(el, '--invalid')) {
693        type = 'Error';
694      } else if (isInClass(el, '--warning')) {
695        type = 'Warning';
696      } else if (isInClass(el, '--valid')) {
697        type = 'Valid';
698      }
699
700      // set up the labelling, if it doesn't exist already
701      // let ariaLabel = field.getAttribute('aria-labelledby')
702      // if(!ariaLabel){
703      //   // generate an id that's unique
704      //   let fieldName = field.getAttribute('name') || 'field'
705      //   ariaLabel = `${fieldName}__${Math.floor(Math.random() * Math.floor(9999999999999))}`
706      //   field.setAttribute('aria-labelledby', ariaLabel)
707      // }
708
709      // let descriptor = document.getElementById(ariaLabel)
710      var parent = Utils.closest.apply(field, ['inm-input', true]);
711      var descriptor = parent ? parent.getElementsByClassName('inm-input__descriptor')[0] : null; // there should only be one
712      if (!descriptor) {
713        // todo:consider aria-hiding this
714        descriptor = document.createElement('span');
715
716        // descriptor.setAttribute('id', ariaLabel)
717        // descriptor.setAttribute('aria-live', 'assertive')
718        descriptor.classList.add('inm-input__descriptor');
719        el.appendChild(descriptor);
720      }
721
722      var currentLabel = field.getAttribute('data-currentlabel');
723      if (!currentLabel) {
724        currentLabel = field.getAttribute('aria-label') || '';
725        field.setAttribute('data-currentlabel', currentLabel);
726      }
727
728      if (msg) {
729        field.setAttribute('aria-label', '' + (currentLabel ? currentLabel + ', ' : '') + (type ? type + ':' : '') + ' ' + msg);
730        descriptor.innerText = msg;
731      } else if (type) {
732        field.setAttribute('aria-label', '' + (currentLabel ? currentLabel + ', ' : '') + type);
733        descriptor.innerText = '' + (currentLabel ? currentLabel + ', ' : '') + type; // this will not be visible as it only happens if there is no message
734      } else {
735        field.removeAttribute('aria-label');
736        descriptor.innerText = "";
737      }
738
739      descriptor.removeAttribute("role");
740      descriptor.setAttribute('aria-label', type || '');
741      var isInvalid = ['Warning', 'Error'].includes(type);
742      if (isInvalid) {
743        descriptor.setAttribute("role", "alert");
744      }
745      field.setAttribute('aria-invalid', isInvalid);
746    };
747
748    var inputObserver = new MutationObserver$1(function (mutations) {
749      mutations.forEach(function (mutation) {
750        if (mutation.type == "attributes") {
751          update_validation(mutation.target);
752        }
753      });
754    });
755
756    // detect changes to the messaging on 
757    var observeInputChanges = function observeInputChanges(el) {
758      inputObserver.observe(el, {
759        attributeFilter: ['data-message', 'class'], // only bother listening for the ones we care about
760        attributes: true //configure it to listen to attribute changes
761      });
762    };
763
764    // enhance toggle-hidden inputs
765    // detect inputs that start with message attributes, as the mutation observer only gets _changed_ elements
766    var input_with_toggle_hidden_enhancement = function input_with_toggle_hidden_enhancement(e) {
767      // these could have modifiers, so we use indexOf instead
768      if (isInClass(e.target, 'inm-input--toggle-hidden')) {
769        createToggleHiddenField(e);
770      }
771    };
772
773    var createToggleHiddenField = function createToggleHiddenField(e) {
774      // because of the way some framworks function, we need to remove the old one and add in a new one for this to work well if one already exists
775      var previousEl = e.target.getElementsByClassName('inm-input__controls')[0];
776      if (previousEl) {
777        e.target.removeChild(previousEl);
778        console.log('remove old');
779      } else {
780        // get the original value of the input field & go on and hide it. (note: this works in old IE because they have a built in show/hide for password fields)
781        var field = e.target.getElementsByClassName('inm-input__field')[0];
782        if (field) {
783          field.dataset.origInputType = field.getAttribute('type');
784          field.setAttribute('type', 'password');
785        }
786      }
787
788      var currentLocale = locale.getLocaleKeyValue();
789      var controls = document.createElement('span');
790      controls.className = "inm-input__controls";
791      controls.innerHTML = '\n    <svg class="inm-icon inm-input__control js-toggle-hidden-field" data-option="show" tabindex="0" title="' + currentLocale.SHOW_INPUT_CONTENTS + '" aria-label="' + currentLocale.PRESS_SPACE_TO_DISPLAY + '"><use xlink:href="#inm-icon__eye" /></svg>\n    <svg class="inm-icon inm-input__control js-toggle-hidden-field" data-option="hide" tabindex="0" style="display: none" title="' + currentLocale.HIDE_INPUT_CONTENTS + '"  aria-label="' + currentLocale.PRESS_SPACE_TO_HIDE + '"><use xlink:href="#inm-icon__eye-slash" /></svg>\n  ';
792      e.target.insertBefore(controls, e.target.childNodes[0]);
793    };
794
795    var handleHiddenFieldToggle = function handleHiddenFieldToggle(el) {
796      var shouldShow = el.getAttribute('data-option') === 'show';
797      // show the field
798      var field = el.parentNode.parentNode.getElementsByClassName('inm-input__field')[0];
799      if (field) {
800        field.setAttribute('type', shouldShow ? field.dataset.origInputType : 'password');
801      }
802      // toggle the eye
803      var nodes = el.parentNode.getElementsByClassName('js-toggle-hidden-field');
804      nodes[0].style.display = shouldShow ? 'none' : 'inherit'; // the show element
805      nodes[1].style.display = shouldShow ? 'inherit' : 'none'; // the hide element
806
807      // ie11 can't manage focusing on an svg, and this is pretty minor anyway
808      var isOldIe = Utils.detectIEVersion() && Utils.detectIEVersion() <= 11;
809      if (!isOldIe) {
810        // fix the focus back to the now showing element
811        nodes[shouldShow ? 1 : 0].focus();
812      }
813    };
814
815    var observeForms = {
816      init: function init() {
817        // attach delegated event listeners first, then work on firing the events.
818        this.attachListeners();
819      },
820      attachListeners: function attachListeners() {
821        // todo: may need to change this logic to look for specific parents
822        document.addEventListener('focusin', function (e) {
823          if (!isInClass(e.target, 'inm-select') && e.target.parentNode && e.target.parentNode.classList) {
824            e.target.parentNode.classList.add('inm-is-focused');
825          }
826        });
827        document.addEventListener('focusout', function (e) {
828          //Sometimes focusout occurrs on navigation, so the element focusout-ing no longer exists, and
829          // this can throw an error if we don't check to make sure the parent node still exists on the page.
830          //In ie11, the parentNode will still exist but the parentNode's classList/className will be undefined in this scenario.
831          if (!isInClass(e.target, 'inm-select') && e.target.parentNode && e.target.parentNode.classList) {
832            e.target.parentNode.classList.remove('inm-is-focused');
833          }
834        });
835
836        document.addEventListener('click', function (e) {
837          var el = Utils.closest.apply(e.target, ['js-toggle-hidden-field']);
838          if (el) {
839            handleHiddenFieldToggle(el);
840          }
841        });
842
843        // treat an "enter" or "space bar" event as a click
844        document.addEventListener("keydown", function (e) {
845          var el = Utils.closest.apply(e.target, ['js-toggle-hidden-field']);
846          if (el && (e.keyCode === Keys$1.ENTER || e.keyCode === Keys$1.SPACE_BAR)) {
847            var clickEvent = document.createEvent('Events');
848            clickEvent.initEvent("click", true, false);
849            e.target.dispatchEvent(clickEvent);
850            e.preventDefault();
851          }
852        });
853
854        document.addEventListener("change", change_event_listeners.checkbox);
855        document.addEventListener("inm-change", change_event_listeners.checkbox);
856
857        document.addEventListener("change", change_event_listeners.radio, false);
858        document.addEventListener("inm-change", change_event_listeners.radio, false);
859
860        document.addEventListener("keydown", select_checkbox);
861        document.addEventListener("keydown", function (e) {
862          return keychange_checkboxradio(e, 'keydown');
863        });
864        document.addEventListener("keyup", function (e) {
865          return keychange_checkboxradio(e, 'keyup');
866        });
867
868        document.addEventListener("inm_node_inserted", checkbox_radio_enhancements);
869        document.addEventListener("inm_node_inserted", select_enhancement);
870        document.addEventListener("inm_node_inserted", input_with_messaging_enhancement);
871        document.addEventListener("inm_node_inserted", input_with_toggle_hidden_enhancement);
872      },
873
874      simulate_selection: simulate_selection
875    };
876
877    var Keys$2 = Utils.Keys;
878
879    var keychange_expandable = function keychange_expandable(e) {
880      var el = Utils.closest.apply(e.target, ['inm-expandable__title--has-contents']);
881      if (el && e.keyCode === Keys$2.SPACE_BAR) {
882        e.preventDefault();
883        simulate_click(e.target);
884      }
885    };
886
887    var simulate_click = function simulate_click(el) {
888      var event = document.createEvent('HTMLEvents');
889      event.initEvent('click', true, false);
890      el.dispatchEvent(event);
891    };
892
893    var subnavs = {
894      init: function init() {
895        var insertListener = function insertListener(event) {
896          var el = Utils.closest.apply(event.target, ['inm-expandable__title--has-contents']);
897          if (el) {
898            event.preventDefault();
899            var container = Utils.closest.apply(el, ['inm-expandable']) || Utils.closest.apply(el, ['inm-expandable--sidebar']);
900            var isActive = el.classList.contains('inm-is-active');
901            if (container) {
902              container.querySelectorAll('.inm-is-active').forEach(function (el) {
903                return el.classList.remove('inm-is-active');
904              });
905            }
906            if (!isActive) {
907              el.classList.add('inm-is-active');
908            }
909            if (el.parentNode.classList.contains('inm-has-open-contents')) {
910              el.parentNode.classList.remove('inm-has-open-contents');
911              return;
912            }
913            el.parentNode.classList.add('inm-has-open-contents');
914            return;
915          } else {
916            el = Utils.closest.apply(event.target, ['inm-expandable__title', true]);
917            if (el) {
918              event.preventDefault();
919              var _container = Utils.closest.apply(el, ['inm-expandable']) || Utils.closest.apply(el, ['inm-expandable--sidebar']);
920              if (_container) {
921                _container.querySelectorAll('.inm-expandable__title--secondary.inm-is-active').forEach(function (el) {
922                  return el.classList.remove('inm-is-active');
923                });
924              }
925              var _isActive = el.classList.contains('inm-is-active');
926              if (!_isActive) {
927                // adding this due to a conflict with using anchors as routes with some js frameworks
928                setTimeout(function () {
929                  el.classList.add('inm-is-active');
930                }, 15);
931              }
932              return;
933            }
934          }
935        };
936
937        document.addEventListener("click", insertListener, false);
938        document.addEventListener("keydown", keychange_expandable, false);
939      }
940    };
941
942    var lastY = window.scrollY;
943    var triggers = null;
944
945    var scroll_listener = function scroll_listener(e) {
946      var newY = window.scrollY;
947      var delta = lastY - newY;
948      var update_positions = function update_positions(newTop) {
949        var currentTop = triggers.header.offsetTop;
950        if (newTop != currentTop) {
951          triggers.header.style.top = newTop + 'px';
952          triggers.header.classList.toggle('not-top', newY > triggers.header.clientHeight && Math.abs(newTop) < triggers.header.clientHeight);
953          var _iteratorNormalCompletion = true;
954          var _didIteratorError = false;
955          var _iteratorError = undefined;
956
957          try {
958            for (var _iterator = triggers.sidebar[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
959              var el = _step.value;
960
961              el.style.top = newTop + triggers.header.clientHeight + 'px'; // todo: suspect this will have to be calc'd different
962              el.style.height = parseInt(el.dataset.sidebarHeight) - newTop + 'px';
963            }
964          } catch (err) {
965            _didIteratorError = true;
966            _iteratorError = err;
967          } finally {
968            try {
969              if (!_iteratorNormalCompletion && _iterator.return) {
970                _iterator.return();
971              }
972            } finally {
973              if (_didIteratorError) {
974                throw _iteratorError;
975              }
976            }
977          }
978        }
979
980        var navOpacity = 1;
981        if (newTop < 0) {
982          navOpacity = (triggers.header.clientHeight + newTop) / triggers.header.clientHeight;
983        }
984        var titleEl = triggers.header.getElementsByClassName('portalnav__title')[0];
985        var contentEl = triggers.header.getElementsByClassName('portalnav__content')[0];
986        if (titleEl) {
987          var _iteratorNormalCompletion2 = true;
988          var _didIteratorError2 = false;
989          var _iteratorError2 = undefined;
990
991          try {
992            for (var _iterator2 = titleEl.children[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
993              var _el = _step2.value;
994
995              _el.style.opacity = navOpacity;
996            }
997          } catch (err) {
998            _didIteratorError2 = true;
999            _iteratorError2 = err;
1000          } finally {
1001            try {
1002              if (!_iteratorNormalCompletion2 && _iterator2.return) {
1003                _iterator2.return();
1004              }
1005            } finally {
1006              if (_didIteratorError2) {
1007                throw _iteratorError2;
1008              }
1009            }
1010          }
1011        }
1012        if (contentEl) {
1013          var _iteratorNormalCompletion3 = true;
1014          var _didIteratorError3 = false;
1015          var _iteratorError3 = undefined;
1016
1017          try {
1018            for (var _iterator3 = contentEl.children[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
1019              var _el2 = _step3.value;
1020
1021              _el2.style.opacity = navOpacity;
1022            }
1023          } catch (err) {
1024            _didIteratorError3 = true;
1025            _iteratorError3 = err;
1026          } finally {
1027            try {
1028              if (!_iteratorNormalCompletion3 && _iterator3.return) {
1029                _iterator3.return();
1030              }
1031            } finally {
1032              if (_didIteratorError3) {
1033                throw _iteratorError3;
1034              }
1035            }
1036          }
1037        }
1038      };
1039
1040      if (triggers == null) {
1041        triggers = {};
1042        triggers.sidebar = document.getElementsByClassName('inm-layout-sidebar__nav') || [];
1043        var head = document.getElementById('portal-navbar');
1044
1045        if (head) {
1046          triggers.header = head;
1047          // add an event listenr that will force show the navbar if any elements within it
1048          // are focused in on, therefore allowing us to provide some accessibility
1049          head.addEventListener('focusin', function (e) {
1050            return update_positions(0);
1051          });
1052        }
1053
1054        var _iteratorNormalCompletion4 = true;
1055        var _didIteratorError4 = false;
1056        var _iteratorError4 = undefined;
1057
1058        try {
1059          for (var _iterator4 = triggers.sidebar[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
1060            var el = _step4.value;
1061
1062            el.dataset.sidebarHeight = el.offsetHeight;
1063          }
1064        } catch (err) {
1065          _didIteratorError4 = true;
1066          _iteratorError4 = err;
1067        } finally {
1068          try {
1069            if (!_iteratorNormalCompletion4 && _iterator4.return) {
1070              _iterator4.return();
1071            }
1072          } finally {
1073            if (_didIteratorError4) {
1074              throw _iteratorError4;
1075            }
1076          }
1077        }
1078      }
1079
1080      // only do the scroll logic if we actually have something to do.
1081      if (triggers.header || triggers.sidebar.length) {
1082        // if we don't have a header, create something so our logic doesn't break below.
1083        if (!triggers.header) {
1084          triggers.header = document.createElement('div');
1085        }
1086
1087        // todo: would be nice if this worked via translate instead of top, as it prevents repaints.
1088        var newTopPos = triggers.header.offsetTop;
1089
1090        if (delta < 0 && newTopPos > triggers.header.clientHeight * -1) {
1091          newTopPos = Math.max(newTopPos + delta, triggers.header.clientHeight * -1);
1092        } else if (delta > 0 && newTopPos < 0) {
1093          newTopPos = Math.min(newTopPos + delta, 0);
1094        }
1095
1096        update_positions(newTopPos);
1097
1098        // remove the shadow when we get to the top of the document always
1099        if (newY === 0) {
1100          triggers.header.classList.remove('not-top');
1101        }
1102      }
1103
1104      lastY = newY;
1105    };
1106
1107    var sticky = {
1108      init: function init() {
1109        window.addEventListener('scroll', scroll_listener);
1110
1111        // on a load new page event in turbolinks, make sure to delete all the triggers.sidebar, 
1112        // or we will have cached ones and not pick up new ones potentially
1113        document.addEventListener("turbolinks:before-render", function (e) {
1114          triggers = null;
1115          lastY = 0;
1116          scroll_listener({}); // reset the navbar
1117        });
1118      }
1119    };
1120
1121    var img = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI8AAACPCAYAAADDY4iTAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb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+4aqNnRfX9K+Hujrgb4e6OuBvh7o64G+HuiNPfD/AUjWEJAJZ4yvAAAAAElFTkSuQmCC';
1122
1123    // even though this is going to be a .ico file, keep as a .png so rollup will base64 enode for us
1124
1125    var favicon = {
1126      init: function init() {
1127        var doc_head = document.getElementsByTagName('head')[0];
1128        var favicon_link = document.createElement('link');
1129        favicon_link.rel = 'shortcut icon';
1130        favicon_link.href = img;
1131        doc_head.appendChild(favicon_link);
1132      }
1133    };
1134
1135    var icon_file = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><symbol id=\"inm-icon__adjust\" viewBox=\"0 0 35 35\">\r\n<path d=\"M28.4,9.8H17.5V12h-2.2V9.8H6.6C6,9.8,5.5,9.4,5.5,8.7c0-0.6,0.5-1.1,1.1-1.1h8.8V5.5h2.2v2.2h10.9\r\n\tc0.6,0,1.1,0.5,1.1,1.1C29.5,9.4,29,9.8,28.4,9.8z M28.4,18.6h-2.2v2.2h-2.2v-2.2H6.6c-0.6,0-1.1-0.5-1.1-1.1c0-0.6,0.5-1.1,1.1-1.1\r\n\th17.5v-2.2h2.2v2.2h2.2c0.6,0,1.1,0.5,1.1,1.1C29.5,18.1,29,18.6,28.4,18.6z M28.4,27.3H10.9v2.2H8.8v-2.2H6.6\r\n\tc-0.6,0-1.1-0.5-1.1-1.1c0-0.6,0.5-1.1,1.1-1.1h2.2V23h2.2v2.2h17.5c0.6,0,1.1,0.5,1.1,1.1C29.5,26.9,29,27.3,28.4,27.3z M31.7,0\r\n\tH3.3C1.5,0,0,1.5,0,3.3v28.4C0,33.5,1.5,35,3.3,35h28.4c1.8,0,3.3-1.5,3.3-3.3V3.3C35,1.5,33.5,0,31.7,0z M32.8,31.7\r\n\tc0,0.6-0.5,1.1-1.1,1.1H3.3c-0.6,0-1.1-0.5-1.1-1.1V3.3c0-0.6,0.5-1.1,1.1-1.1h28.4c0.6,0,1.1,0.5,1.1,1.1V31.7z\"/>\r\n</symbol><symbol id=\"inm-icon__alert\" viewBox=\"0 0 24 24\">\r\n    <path d=\"M14.9302 18.8532C14.9302 21.1434 13.0737 22.9999 10.7835 22.9999C8.49332 22.9999 6.63676 21.1434 6.63676 18.8532C6.63676 16.563 8.49332 14.7065 10.7835 14.7065C13.0737 14.7065 14.9302 16.563 14.9302 18.8532Z\"/>\r\n    <path d=\"M18.3943 8.15738C18.3943 2.82586 14.9464 0.456299 10.6932 0.456299C6.44002 0.456299 2.99213 2.82586 2.99213 8.15738C2.99213 11.8094 1.23034 15.7701 0.120352 17.9031C-0.24251 18.6004 0.258382 19.4784 1.04443 19.4784H20.2599C21.0399 19.4784 21.5406 18.6126 21.1886 17.9165C20.1116 15.7868 18.3943 11.8171 18.3943 8.15738Z\"/>\r\n</symbol><symbol id=\"inm-icon__alpha-asc\" viewBox=\"0 0 21.83 12.09\">\r\n    <path d=\"M11.25,15.72H7.17l-.94,3.15H4.67L8.56,6.78H9.87l3.9,12.09H12.21ZM7.57,14.4h3.29L9.21,8.91Z\" transform=\"translate(-4.67 -6.78)\"/>
1135\r\n    <path d=\"M17.93,14.36H14.5V13.11h3.43Z\" transform=\"translate(-4.67 -6.78)\"/>\r\n    <path d=\"M20.77,17.57H26.5v1.3H19.08V17.68l5.5-9.58H19.14V6.78h7.14V8Z\" transform=\"translate(-4.67 -6.78)\"/>\r\n</symbol><symbol id=\"inm-icon__arrow-down\" viewBox=\"0 0 35 35\">\r\n<path d=\"M0,6.5h35l-17.5,22L0,6.5\"/>\r\n</symbol><symbol id=\"inm-icon__arrow-left\" viewBox=\"0 0 35 35\">\r\n<path d=\"M28.5,0v35l-22-17.5L28.5,0\"/>\r\n</symbol><symbol id=\"inm-icon__arrow-right\" viewBox=\"0 0 35 35\"><path d=\"m6.5 35v-35l22 17.5z\"/></symbol><symbol id=\"inm-icon__arrow-up\" viewBox=\"0 0 35 35\">\r\n<path d=\"M35,28.5H0l17.5-22L35,28.5\"/>\r\n</symbol><symbol id=\"inm-icon__calendar\" viewBox=\"0 0 35 35\">\r\n<path d=\"M7,15.3h4.7v4.4H7V15.3z M7,24.1h4.7v4.4H7V24.1z M15.2,15.3h4.7v4.4h-4.7V15.3z M15.2,24.1h4.7v4.4h-4.7V24.1z\r\n\t M23.3,15.3H28v4.4h-4.7V15.3z M32.7,8.7H2.3v24.1h30.3V8.7z M32.7,2.2H2.3v4.4h30.3V2.2z M33.8,35H1.2C0.5,35,0,34.5,0,33.9V1.1\r\n\tC0,0.5,0.5,0,1.2,0h30.3h2.3C34.5,0,35,0.5,35,1.1v32.8C35,34.5,34.5,35,33.8,35z\"/>\r\n</symbol><symbol id=\"inm-icon__checkbox-checked\" viewBox=\"0 0 45 45\">\r\n<path d=\"M23.297,38.74c-1.17,1.588-2.992,2.564-4.962,2.661c-1.97,0.098-3.878-0.696-5.198-2.162L1.308,26.112\r\n\t\t\tc-1.88-2.085-1.713-5.299,0.372-7.179c2.087-1.88,5.299-1.712,7.179,0.374l8.369,9.288c0.124,0.138,0.304,0.212,0.489,0.203\r\n\t\t\tc0.186-0.009,0.356-0.102,0.467-0.25L35.386,5.217c1.665-2.26,4.847-2.741,7.108-1.075c2.259,1.666,2.739,4.848,1.073,7.107\r\n\t\t\tL23.297,38.74z\"/>\r\n</symbol><symbol id=\"inm-icon__close\" viewBox=\"0 0 35 35\">\r\n<path d=\"M34.7,0.3c-0.5-0.5-1.2-0.5-1.6,0L17.5,15.9L2,0.3c-0.5-0.5-1.2-0.5-1.6,0s-0.5,1.2,0,1.6l15.5,15.5L0.3,33\r\n\tc-0.5,0.5-0.5,1.2,0,1.6C0.6,34.9,0.9,35,1.2,35s0.6-0.1,0.8-0.3l15.5-15.5L33,34.7c0.2,0.2,0.5,0.3,0.8,0.3s0.6-0.1,0.8-0.3\r\n\tc0.5-0.5,0.5-1.2,0-1.6L19.1,17.5L34.7,2C35.1,1.5,35.1,0.8,34.7,0.3z\"/>\r\n</symbol>
1135<symbol id=\"inm-icon__collapse-active\" viewBox=\"0 0 35 35\">\r\n\t<path class=\"st0\" d=\"M17.5,0C7.8,0,0,7.8,0,17.5S7.8,35,17.5,35S35,27.2,35,17.5S27.2,0,17.5,0z M27.1,22.3\r\n\t\tc-0.2,0.1-0.4,0.2-0.7,0.2c-0.3,0-0.6-0.1-0.8-0.3l-8.2-8.8l-8.2,8.8c-0.4,0.4-1,0.4-1.5,0.1C7.4,22,7.4,21.4,7.7,21l9.8-10.5\r\n\t\tL27.3,21C27.6,21.4,27.6,22,27.1,22.3z\"/>\r\n</symbol><symbol id=\"inm-icon__collapse\" viewBox=\"0 0 35 35\">\r\n<path class=\"st1\" d=\"M17.5,0C7.8,0,0,7.8,0,17.5S7.8,35,17.5,35S35,27.2,35,17.5S27.2,0,17.5,0z M17.5,32.7\r\n\tc-8.4,0-15.2-6.8-15.2-15.2S9.1,2.3,17.5,2.3s15.2,6.8,15.2,15.2S25.9,32.7,17.5,32.7z M26.5,22.5c-0.3,0-0.6-0.1-0.8-0.3l-8.2-8.8\r\n\tl-8.2,8.8c-0.4,0.4-1,0.4-1.5,0.1C7.4,22,7.4,21.4,7.7,21l9.8-10.5L27.3,21c0.4,0.4,0.3,1-0.1,1.3C26.9,22.4,26.7,22.5,26.5,22.5z\"/>\r\n</symbol><symbol id=\"inm-icon__danger\" viewBox=\"0 0 35 35\">\r\n<path d=\"M17.5,0C7.8,0,0,7.8,0,17.5S7.8,35,17.5,35S35,27.2,35,17.5S27.2,0,17.5,0z M17.5,32.7\r\n\tc-8.4,0-15.2-6.8-15.2-15.2S9.1,2.3,17.5,2.3s15.2,6.8,15.2,15.2S25.9,32.7,17.5,32.7z M18.7,8.4v13.3c0,0.7-0.6,1.2-1.2,1.2\r\n\ts-1.2-0.6-1.2-1.2V8.4c0-0.7,0.6-1.2,1.2-1.2S18.7,7.7,18.7,8.4z M16,26.4c0,0.8,0.7,1.5,1.5,1.5c0.8,0,1.5-0.7,1.5-1.5\r\n\ts-0.7-1.5-1.5-1.5C16.7,24.9,16,25.5,16,26.4z\"/>\r\n</symbol><symbol id=\"inm-icon__download\" viewBox=\"0 0 24 24\">\r\n  <polygon transform=\"translate(12.000000, 12.500000) rotate(-180.000000) translate(-12.000000, -12.500000) \" points=\"12 8 18 17 6 17\"/>\r\n  <rect x=\"11\" y=\"2\" width=\"2\" height=\"7\"/>\r\n  <rect x=\"4\" y=\"18\" width=\"16\" height=\"2\"/>\r\n</symbol><symbol id=\"inm-icon__edit\" viewBox=\"0 0 35 35\">\r\n<path d=\"M15.9,2.9l-2.2,3.7l7.5,4.3l2.2-3.7L15.9,2.9z M3.5,24.4l7.5,4.3l9.2-15.9l-7.5-4.3L3.5,24.4z M2.4,26.3L4,32.2\r\n\tl5.9-1.6L2.4,26.3z M22,13.9L22,13.9L11.2,32.6L2.4,35L0,26.2L10.8,7.5l1.1-1.9L15.1,0l11.2,6.5l-3.6,6.2L22,13.9z M15.3,35v-2.2H35\r\n\tV35H15.3z\"/>\r\n</symbol><symbol id=\"inm-icon__expand-active\" viewBox=\"0 0 35 35\">\r\n\t<path class=\"st0\" d=\"M17.5,0C7.8,0,0,7.8,0,17.5S7.8,35,17.5,35S35,27.2,35,17.5S27.2,0,17.5,0z M27.3,14l-9.8,10.5L7.7,14\r\n\t\tc-0.4-0.4-0.3-1,0.1-1.3c0.2-0.1,0.4-0.2,0.7-0.2c0.3,0,0.6,0.1,0.8,0.3l8.2,8.8l8.2-8.8c0.4-0.4,1-0.4,1.5-0.1\r\n\t\tC27.6,13,27.6,13.6,27.3,14z\"/>\r\n</symbol><symbol id=\"inm-icon__expand\" viewBox=\"0 0 35 35\">\r\n<path class=\"st1\" d=\"M17.5,0C7.8,0,0,7.8,0,17.5S7.8,35,17.5,35S35,27.2,35,17.5S27.2,0,17.5,0z M17.5,32.7\r\n\tc-8.4,0-15.2-6.8-15.2-15.2S9.1,2.3,17.5,2.3s15.2,6.8,15.2,15.2S25.9,32.7,17.5,32.7z M8.5,12.5c0.3,0,0.6,0.1,0.8,0.3l8.2,8.8\r\n\tl8.2-8.8c0.4-0.4,1-0.4,1.5-0.1c0.4,0.3,0.5,0.9,0.1,1.3l-9.8,10.5L7.7,14c-0.4-0.4-0.3-1,0.1-1.3C8.1,12.6,8.3,12.5,8.5,12.5z\"/>\r\n</symbol><symbol id=\"inm-icon__export\" viewBox=\"0 0 35 35\">\r\n<path d=\"M2.3,5.8v25.7c0,0.6,0.5,1.2,1.2,1.2h25.7c0.6,0,1.2-0.5,1.2-1.2V16.3h2.3v16.3c0,1.3-1,2.3-2.3,2.3h-28\r\n\tC1,35,0,34,0,32.7v-28c0-1.3,1-2.3,2.3-2.3h16.3v2.3H3.5C2.9,4.7,2.3,5.2,2.3,5.8z M34.9,1.2L35,12.8c0,0.6-0.5,1.1-1.2,1.1\r\n\tc-0.6,0-1.2-0.5-1.2-1.1l-0.1-8.9L13.6,23c-0.4,0.4-1.2,0.4-1.6,0c-0.5-0.4-0.5-1.2,0-1.6l19-19L22,2.4c-0.6,0-1.1-0.5-1.1-1.2\r\n\tc0-0.6,0.5-1.2,1.1-1.2L33.7,0h0h0h0.1c0.3,0,0.5,0.1,0.7,0.3c0,0,0.1,0,0.1,0.1c0,0,0,0.1,0.1,0.1C34.8,0.6,34.9,0.8,34.9,1.2\r\n\tL34.9,1.2L34.9,1.2C34.9,1.2,34.9,1.2,34.9,1.2z\"/>\r\n</symbol><symbol id=\"inm-icon__eye-slash\" viewBox=\"0 0 640 512\"><path d=\"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z\"/></symbol><symbol id=\"inm-icon__eye\" viewBox=\"0 0 576 512\"><path d=\"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z\"/></symbol><symbol id=\"inm-icon__help\" viewBox=\"0 0 35 35\">\r\n<path d=\"M17.5,2.3c8.4,0,15.2,6.8,15.2,15.2s-6.8,15.2-15.2,15.2S2.3,25.9,2.3,17.5S9.1,2.3,17.5,2.3 M17.5,0\r\n\tC7.8,0,0,7.8,0,17.5S7.8,35,17.5,35S35,27.2,35,17.5S27.2,0,17.5,0L17.5,0z M17.5,23c-0.7,0-1.2-0.6-1.2-1.2v-1.2\r\n\tc0-2.3,1.6-3.5,2.9-4.5c1.3-1,2-1.6,2-2.7c0-2-1.6-3.6-3.6-3.6c-2,0-3.6,1.6-3.6,3.6c0,0.7-0.6,1.2-1.2,1.2s-1.2-0.6-1.2-1.2\r\n\tc0-3.4,2.7-6.1,6.1-6.1c3.4,0,6.1,2.7,6.1,6.1c0,2.4-1.6,3.7-3,4.7c-1.2,0.9-1.9,1.5-1.9,2.6v1.2C18.7,22.4,18.2,23,17.5,23z\r\n\t M16,26.4c0,0.8,0.7,1.5,1.5,1.5c0.8,0,1.5-0.7,1.5-1.5s-0.7-1.5-1.5-1.5C16.7,24.9,16,25.5,16,26.4z\"/>\r\n</symbol><symbol id=\"inm-icon__message\" viewBox=\"0 0 35 35\">\r\n<path d=\"M17.5,16.3l13.3-9.4H4.2L17.5,16.3z M2.2,27.1c0,0.5,0.5,1,1.1,1h28.4c0.6,0,1.1-0.4,1.1-1V7.9L18.3,18.1\r\n\tc0,0,0,0,0,0c-0.2,0.2-0.5,0.3-0.8,0.3c-0.3,0-0.6-0.1-0.8-0.3c0,0,0,0,0,0L2.2,7.9L2.2,27.1L2.2,27.1z M35,29c0,0.5-0.5,1-1.1,1\r\n\tH1.1C0.5,30,0,29.6,0,29V6c0,0,0,0,0,0c0,0,0,0,0,0c0-0.2,0.1-0.4,0.3-0.6c0,0,0,0,0-0.1c0,0,0.1,0,0.1,0C0.6,5.1,0.8,5,1,5\r\n\tc0,0,0.1,0,0.1,0h32.8c0,0,0.1,0,0.1,0c0.2,0,0.4,0.1,0.6,0.2c0,0,0.1,0,0.1,0c0,0,0,0,0,0.1C34.9,5.5,35,5.7,35,5.9c0,0,0,0,0,0\r\n\tc0,0,0,0,0,0L35,29L35,29z\"/>\r\n</symbol><symbol id=\"inm-icon__print\" viewBox=\"0 0 16 16\">\r\n    <path d=\"M15,4H12V2L10,0H5A1,1,0,0,0,4,1V4H1A1,1,0,0,0,0,5v7a1,1,0,0,0,1,1H4v2a1,1,0,0,0,1,1h6a1,1,0,0,0,1-1V13h3a1,1,0,0,0,1-1V5A1,1,0,0,0,15,4ZM5,1H9.59L11,2.41V4H5Zm6,14H5V10h6Zm4-3H12V10h.5a.5.5,0,0,0,0-1h-9a.5.5,0,0,0,0,1H4v2H1V5H15Z\"/><path d=\"M13,6.5a.5.5,0,0,1-.5.5h-1a.5.5,0,0,1,0-1h1A.5.5,0,0,1,13,6.5Z\"/><path d=\"M9,11.5a.5.5,0,0,1-.5.5h-2a.5.5,0,0,1,0-1h2A.5.5,0,0,1,9,11.5Z\"/>\r\n    <path d=\"M10,13.5a.5.5,0,0,1-.5.5h-3a.5.5,0,0,1,0-1h3A.5.5,0,0,1,10,13.5Z\"/>\r\n</symbol><symbol id=\"inm-icon__refresh\" viewBox=\"0 0 16 16\">\r\n  <path d=\"M13.72,5,13,5.67A6,6,0,1,1,7.72,3L6.61,4.24a.45.45,0,0,0,.68.6L9.36,2.51,7.27.15a.45.45,0,1,0-.68.6L7.69,2A7,7,0,1,0,15,9,6.94,6.94,0,0,0,13.72,5Z\"/>\r\n</symbol><symbol id=\"inm-icon__save\" viewBox=\"0 0 16 16\">\r\n  <path d=\"M15,0H1A1,1,0,0,0,0,1V15a1,1,0,0,0,1,1H15a1,1,0,0,0,1-1V1A1,1,0,0,0,15,0Zm0,15H1V12H5.17a3,3,0,0,0,5.66,0H15Zm0-4H10a2,2,0,0,1-4,0H1V1H15Z\"/>\r\n  <path d=\"M10.35,7.64,8,10,5.65,7.64a.49.49,0,0,1,.7-.7L7.5,8.08V3.5a.5.5,0,0,1,1,0V8.08L9.65,6.94a.49.49,0,0,1,.7.7Z\"/>\r\n</symbol><symbol id=\"inm-icon__search\" viewBox=\"0 0 35 35\">\r\n<path d=\"M34.7,33l-9.1-9.1c2.2-2.5,3.5-5.8,3.5-9.4C29,6.5,22.5,0,14.5,0S0,6.5,0,14.5S6.5,29,14.5,29\r\n\tc3.6,0,6.9-1.3,9.4-3.5l9.1,9.1c0.2,0.2,0.5,0.3,0.8,0.3s0.6-0.1,0.8-0.3C35.1,34.2,35.1,33.5,34.7,33z M2.3,14.5\r\n\tc0-6.7,5.5-12.2,12.2-12.2s12.2,5.5,12.2,12.2s-5.5,12.2-12.2,12.2S2.3,21.2,2.3,14.5z\"/>\r\n</symbol><symbol id=\"inm-icon__success\" viewBox=\"0 0 35 35\">\r\n<path d=\"M13.9,24.5c-0.3,0-0.6-0.1-0.8-0.3l-4.6-4.6c-0.5-0.5-0.5-1.2,0-1.6c0.5-0.5,1.2-0.5,1.6,0l3.8,3.8l10.9-10.9\r\n\tc0.5-0.5,1.2-0.5,1.6,0c0.5,0.5,0.5,1.2,0,1.6L14.8,24.2C14.5,24.4,14.2,24.5,13.9,24.5z M17.5,2.3C9.1,2.3,2.3,9.1,2.3,17.5\r\n\ts6.8,15.2,15.2,15.2s15.2-6.8,15.2-15.2S25.9,2.3,17.5,2.3 M17.5,0C27.2,0,35,7.8,35,17.5S27.2,35,17.5,35S0,27.2,0,17.5\r\n\tS7.8,0,17.5,0L17.5,0z\"/>\r\n</symbol><symbol id=\"inm-icon__trash\" viewBox=\"0 0 35 35\">\r\n<path d=\"M24.2,30.6h-2.7V15.3h2.7V30.6z M18.8,30.6h-2.7V15.3h2.7V30.6z M13.5,30.6h-2.7V15.3h2.7V30.6z M31,6.6h-8.1\r\n\tH12.1H4c-0.7,0-1.3,0.5-1.3,1.1c0,0.6,0.6,1.1,1.3,1.1h1.3h24.2H31c0.7,0,1.3-0.5,1.3-1.1C32.3,7.1,31.7,6.6,31,6.6z M21.5,2.2h-8.1\r\n\tv2.2h8.1V2.2z M5.4,12v1.1v18.6c0,0.6,0.6,1.1,1.3,1.1h21.5c0.7,0,1.3-0.5,1.3-1.1V13.1V12v-1.1h-1.3H6.7H5.4V12z M32.3,10.9v21.9\r\n\tc0,1.2-1.2,2.2-2.7,2.2H5.4c-1.5,0-2.7-1-2.7-2.2V10.9C1.2,10.9,0,10,0,8.8V6.6c0-1.2,1.2-2.2,2.7-2.2h8.1V1.1\r\n\tc0-0.6,0.6-1.1,1.3-1.1h10.8c0.7,0,1.3,0.5,1.3,1.1v3.3h8.1c1.5,0,2.7,1,2.7,2.2v2.2C35,10,33.8,10.9,32.3,10.9z\"/>\r\n</symbol><symbol id=\"inm-icon__user\" viewBox=\"0 0 35 35\">
1135\r\n\t<path d=\"M35,35H0l1.6-7.3c0.7-1.7,1.7-2.8,2.8-3.3c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1.3,0.7l14,24.1\r\n\tc0.3,0.5,0.3,1,0,1.5C31,28.9,30.5,29.2,30,29.2z\"/>\r\n</g>\r\n</symbol></svg>";
1136
1137    // this points to the dist because this file is built from other files.
1138
1139    var svg = {
1140      init: function init() {
1141        var doc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
1142
1143        //don't use getElementById, because that does not execute on body, which is sometimes what doc resolves to
1144        if (!doc.querySelector('#inm-icons-svg')) {
1145          var icons = document.createElement('div');
1146          icons.setAttribute('id', 'inm-icons-svg');
1147          icons.style.display = "none";
1148          icons.innerHTML = icon_file;
1149          if (doc.body) {
1150            doc.body.appendChild(icons);
1151            return;
1152          }
1153          doc.appendChild(icons);
1154        }
1155      }
1156    };
1157
1158    var tooltip = {
1159      init: function init() {
1160        var insertListener = function insertListener(e) {
1161          var el_tooltip = Utils.closest.apply(e.target, ['js-inm-tooltip']);
1162          if (el_tooltip) {
1163            el_tooltip.classList.contains('is-open') ? el_tooltip.classList.remove('is-open') : el_tooltip.classList.add('is-open');
1164          }
1165        };
1166
1167        document.addEventListener("click", insertListener, false);
1168      }
1169    };
1170
1171    function addCurrentYearToFooter(event) {
1172      var currentLocale = locale.getLocaleKeyValue();
1173      if (!event.target.classList.contains('inm-layout-footer') || event.target.classList.contains('js-inm-layout-footer')) {
1174        return;
1175      }
1176      event.target.classList.add('js-inm-layout-footer');
1177
1178      var yearLabel = '' + new Date().getFullYear();
1179      event.target.innerHTML = '\n    <div class="inm-layout-footer__copyright">&copy; Life in Check EBT, <span class="inm-layout-footer__rights">' + currentLocale.ALL_RIGHTS_RESERVED + ', ' + yearLabel + '</span></div>\n  ';
1180      document.dispatchEvent(new CustomEvent('inm-theme-footer-enhanced', { detail: { targetEl: event.target } }));
1181    }
1182
1183    var footer = {
1184      init: function init() {
1185        // get items already on the page first
1186        var items = document.getElementsByClassName('inm-layout-footer');
1187        var _iteratorNormalCompletion = true;
1188        var _didIteratorError = false;
1189        var _iteratorError = undefined;
1190
1191        try {
1192          for (var _iterator = items[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
1193            var el = _step.value;
1194
1195            addCurrentYearToFooter({ target: el });
1196          }
1197
1198          // listen for any new items being added to the page
1199        } catch (err) {
1200          _didIteratorError = true;
1201          _iteratorError = err;
1202        } finally {
1203          try {
1204            if (!_iteratorNormalCompletion && _iterator.return) {
1205              _iterator.return();
1206            }
1207          } finally {
1208            if (_didIteratorError) {
1209              throw _iteratorError;
1210            }
1211          }
1212        }
1213
1214        document.addEventListener("inm_node_inserted", addCurrentYearToFooter);
1215      }
1216    };
1217
1218    var Keys$3 = Utils.Keys;
1219
1220    var enhance_tabs = function enhance_tabs(e) {
1221      if (e.target.className.indexOf('inm-tabs') !== -1) {
1222        e.target.addEventListener("keydown", keychange_tabs, false);
1223      }
1224    };
1225
1226    // make tabs keyboard clickable
1227    var keychange_tabs = function keychange_tabs(e) {
1228      if (e.target.className.indexOf('inm-tabs__tab') !== -1) {
1229        if ([Keys$3.SPACE_BAR, Keys$3.ENTER].indexOf(e.keyCode) !== -1) {
1230          e.preventDefault();
1231          simulate_click$1(e.target);
1232        }
1233      }
1234    };
1235
1236    var simulate_click$1 = function simulate_click(el) {
1237      var event = document.createEvent('HTMLEvents');
1238      event.initEvent('click', true, false);
1239      el.dispatchEvent(event);
1240    };
1241
1242    var tabs = {
1243      init: function init() {
1244        document.addEventListener("inm_node_inserted", enhance_tabs);
1245      }
1246    };
1247
1248    var Keys$4 = Utils.Keys;
1249
1250    var enhance_junk_drawer = function enhance_junk_drawer(e) {
1251      if (e.target.className.indexOf('inm-junk-drawer') !== -1) {
1252        e.target.classList.add('has-closed-menu', 'js-inm-junk-drawer'); // set the default state to closed
1253        e.target.setAttribute('aria-expanded', 'false');
1254        e.target.setAttribute('aria-haspopup', 'true');
1255        e.target.addEventListener("click", toggle_junk_drawer, false);
1256        e.target.addEventListener("keydown", keychange_junkdrawer, false);
1257        var title = e.target.querySelector('.inm-junk-drawer__title');
1258        if (title) {
1259          title.setAttribute('tabindex', '0');
1260        }
1261
1262        var options = e.target.querySelector('.inm-junk-drawer__options');
1263        if (options) {
1264          options.setAttribute('role', 'menu');
1265          options.setAttribute('aria-hidden', 'true');
1266          options.setAttribute('hidden', 'true');
1267          if (title) {
1268            options.setAttribute('aria-label', title.innerText);
1269          }
1270          var eachOption = options.querySelectorAll('.inm-junk-drawer__option');
1271          eachOption.forEach(function (el) {
1272            el.setAttribute('role', 'menuitem');
1273          });
1274        }
1275
1276        // make sure all of the elements in the junk drawer are tabbable for accessibility
1277        e.target.querySelectorAll('.inm-junk-drawer__option, .inm-junk-drawer__option--disabled').forEach(function (el) {
1278          // these could have modifiers, so we use indexOf instead
1279          observeOptionChanges(el);
1280          update_options(el);
1281        });
1282      }
1283    };
1284
1285    var MutationObserver$2 = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
1286    var observer = new MutationObserver$2(function (mutations) {
1287      mutations.forEach(function (mutation) {
1288        if (mutation.type == "attributes") {
1289          update_options(mutation.target);
1290        }
1291      });
1292    });
1293
1294    // detect changes to the messaging on 
1295    var observeOptionChanges = function observeOptionChanges(el) {
1296      observer.observe(el, {
1297        attributeFilter: ['class'], // only bother listening for the ones we care about
1298        attributes: true //configure it to listen to attribute changes
1299      });
1300    };
1301
1302    var update_options = function update_options(el) {
1303      var isDisabled = el.className.indexOf('--disabled') !== -1;
1304      if (isDisabled) {
1305        el.setAttribute('tabindex', '-1');
1306        el.setAttribute('disabled', true);
1307        el.setAttribute('focusable', false);
1308      } else {
1309        el.setAttribute('tabindex', '0');
1310        el.setAttribute('disabled', false);
1311        el.setAttribute('focusable', true);
1312      }
1313    };
1314
1315    var toggle_junk_drawer = function toggle_junk_drawer(e) {
1316      var handleToggle = function handleToggle() {
1317        var drawer = Utils.closest.apply(e.target, ['js-inm-junk-drawer']);
1318        if (drawer) {
1319          var isClosing = !drawer.classList.contains('has-closed-menu');
1320          drawer.classList.toggle('has-closed-menu', isClosing);
1321          drawer.setAttribute('aria-expanded', !isClosing);
1322          e.preventDefault(); // don't stop propagation, as the developer may attach events to click on buttons as well, only prevent the buttons from doing the default.
1323
1324          var options = drawer.querySelector('.inm-junk-drawer__options');
1325          if (options) {
1326            options.setAttribute('aria-hidden', isClosing);
1327            isClosing ? options.setAttribute('hidden', 'true') : options.removeAttribute('hidden');
1328          }
1329        }
1330        return drawer;
1331      };
1332
1333      // if the user is clicking on the title, they want to open/close the menu for sure
1334      if (e.target.classList.contains('inm-junk-drawer__title')) {
1335        handleToggle();
1336      }
1337      // if they're clicking on a menu item, then we should infer that a close is probably appropriate as well.
1338      else if (e.target.classList.contains('inm-junk-drawer__option') || e.target.classList.contains('inm-junk-drawer__option-icon') && e.target.parentNode.classList.contains('inm-junk-drawer__option')) {
1339          var drawer = handleToggle();
1340          if (drawer) {
1341            var isClosing = drawer.classList.contains('has-closed-menu'); // since we JUST closed it, it should be there
1342            if (isClosing) {
1343              var title = drawer.querySelector('.inm-junk-drawer__title');
1344              if (title) {
1345                title.focus();
1346              }
1347            }
1348          }
1349        }
1350    };
1351
1352    var moveFocus = function moveFocus(el) {
1353      var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'down';
1354
1355      var drawer = Utils.closest.apply(el, ['js-inm-junk-drawer']);
1356      var options = drawer.getElementsByClassName('inm-junk-drawer__option');
1357      // we must do this because options is not a proper array, so we can't just use indexOf
1358      var currentIndex = Array.prototype.indexOf.call(options, el); //options.indexOf(el)
1359      var lastIndex = options.length - 1;
1360      var nextIndex = direction == 'down' ? currentIndex + 1 : currentIndex - 1;
1361
1362      // if we're at the bottom, and go down again, then restart at the top
1363      if (direction === 'down' && lastIndex == currentIndex) {
1364        nextIndex = 0;
1365      }
1366      // if we're at the top, and go up again, then restart at the bottom
1367      if (direction === 'up' && currentIndex == 0) {
1368        nextIndex = lastIndex;
1369      }
1370      options[nextIndex].focus();
1371    };
1372
1373    // add active classes to checkbox radios when key pressed
1374    var keychange_junkdrawer = function keychange_junkdrawer(e) {
1375      if (e.keyCode === Keys$4.SPACE_BAR && (e.target.className.indexOf('inm-junk-drawer__option') !== -1 || e.target.className.indexOf('inm-junk-drawer__title') !== -1)) {
1376        e.preventDefault();
1377        simulate_click$2(e.target);
1378      } else if (e.keyCode === Keys$4.DOWN && e.target.className.indexOf('inm-junk-drawer__title') !== -1) {
1379        e.preventDefault();
1380        simulate_click$2(e.target);
1381        // auto-select the first thing in the dropdown
1382        setTimeout(function () {
1383          return e.target.parentNode.getElementsByClassName('inm-junk-drawer__option')[0].focus();
1384        }, 100);
1385      } else if (e.keyCode === Keys$4.DOWN && e.target.className.indexOf('inm-junk-drawer__option') !== -1) {
1386        e.preventDefault();
1387        moveFocus(e.target, 'down');
1388      } else if (e.keyCode === Keys$4.UP && e.target.className.indexOf('inm-junk-drawer__option') !== -1) {
1389        e.preventDefault();
1390        moveFocus(e.target, 'up');
1391      }
1392    };
1393
1394    var simulate_click$2 = function simulate_click(el) {
1395      var event = document.createEvent('HTMLEvents');
1396      event.initEvent('click', true, false);
1397      el.dispatchEvent(event);
1398    };
1399
1400    var junk_drawer = {
1401      init: function init() {
1402        document.addEventListener("inm_node_inserted", enhance_junk_drawer);
1403
1404        // global close of junk drawers that are open
1405        document.addEventListener("click", function (e) {
1406          var drawer = Utils.closest.apply(e.target, ['js-inm-junk-drawer']);
1407          if (!drawer) {
1408            document.querySelectorAll('.js-inm-junk-drawer[aria-expanded="true"]').forEach(function (drawer) {
1409              simulate_click$2(drawer.getElementsByClassName('inm-junk-drawer__title')[0]);
1410            });
1411          }
1412        });
1413      }
1414    };
1415
1416    var selectable_table_enhancement = function selectable_table_enhancement(e) {
1417        if (e.target.classList.contains('js-inm-selectable-table-row')) {
1418            var tr = Utils.closest.apply(e.target, ['inm-table__selectable-row']);
1419            var id = tr.getAttribute('id');
1420            if (!id) {
1421                id = 'js_selectable_table__' + Math.floor(Math.random() * Math.floor(9999999999999));
1422                tr.setAttribute('id', id);
1423                tr.setAttribute('tabindex', "0");
1424                tr.classList.add('js-inm-table__selectable-row');
1425            }
1426            var inp = e.target.querySelector('input');
1427            if (inp) {
1428                inp.classList.add('js-inm-table__selectable-row__input');
1429                inp.setAttribute('aria-labelledby', id);
1430                inp.setAttribute('tabindex', "-1");
1431            }
1432
1433            e.target.setAttribute('tabindex', "-1");
1434        }
1435    };
1436    var select_row = function select_row(e) {
1437        var target = Utils.closest.apply(e.target, ['inm-table__selectable-row']);
1438        if (target) {
1439            var item = target.querySelector('.js-inm-table__selectable-row__input');
1440            if (item) {
1441                // check to make sure we didn't literally click on the input, which would make the 
1442                // "simulate selection" event fire twice, therefore giving us a double-click-like action, and 
1443                // therefore negating the event itself.
1444                if (!e.target.classList.contains('js-inm-table__selectable-row__input')) {
1445                    observeForms.simulate_selection(item, e);
1446                }
1447
1448                target.classList.toggle('inm-is-selected', item.checked);
1449                e.stopPropagation();
1450            }
1451        }
1452    };
1453
1454    var selectable_table = {
1455        init: function init() {
1456            document.addEventListener("keydown", Utils.handleKeys([Utils.Keys.SPACE_BAR], select_row));
1457            document.addEventListener("click", select_row);
1458            document.addEventListener("inm_node_inserted", selectable_table_enhancement);
1459        }
1460    };
1461
1462    // adding the loading indicator here by default creates a circular reference.
1463    var loadingIndicator = null;
1464    try {
1465      if (!window.inm.loadingIndicator) {
1466        console.warn('loading indicator not present. you should add it: https://static.portal.inmar.com/b2c-lic-loading-indicator/1/loading-indicator.min.js');
1467      }
1468      // sometimes thee indicator hasn't bootstrapped yet. so this will catch it and let us workaround
1469      loadingIndicator = window.inm.loadingIndicator;
1470      loadingIndicator.create(); // make sure it actually exists
1471    } catch (e) {
1472      loadingIndicator = {
1473        create: function create() {
1474          return {
1475            play: function play() {},
1476            stop: function stop() {}
1477          };
1478        }
1479      };
1480    }
1481    var type = '';
1482    var header_height = 60;
1483    var loadingTimeout = void 0;
1484
1485    var setType = function setType() {
1486      var el_navbar = document.getElementById('js-inmc-navbar') || document.getElementById('portal-navbar');
1487      var set = function set() {
1488        type = 'inm-has-content-loading';
1489        header_height = el_navbar.getBoundingClientRect().height;
1490      };
1491
1492      if (el_navbar) {
1493        set();
1494        // we have to do this because the navbar is relatively slow
1495        // at loading the optional "logged in as" that appears often at the top of the screen,
1496        // the first (1.8 sec) hopes the height is set before we fade in the site initially, the second
1497        // makes 100% certain that we have a correct height/type, as 5 seconds 
1497is an eternity in
1498        // the land of programming. these both recalculate the height & type to show the loading indicator
1499        // on subsequent page reloads as well as possible.
1500        setTimeout(set, 1800);
1501        setTimeout(set, 5000);
1502      }
1503    };
1504
1505    // build the loading indicator
1506    var el_indicator_parent = document.createElement('div');
1507    var el_indicator = document.createElement('div');
1508    var size = 100;
1509    var indicator = loadingIndicator.create(el_indicator, {
1510      strokeColor: '#003e52', // life-in-check primary color "midnight green"
1511      style: 'inline',
1512      width: size,
1513      height: size
1514    });
1515    el_indicator_parent.className = 'inm-content-loader';
1516    el_indicator.className = 'inm-content-loader__loader';
1517    el_indicator.style.position = ""; // reset the position so our css can handle it.
1518    el_indicator_parent.appendChild(el_indicator);
1519
1520    var self$1 = {
1521      show: function show() {
1522        var _this = this;
1523
1524        var body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
1525
1526        if (!body) {
1527          return;
1528        }
1529        if (!type) {
1530          setType();
1531        }
1532        if (type) {
1533          el_indicator_parent.style.height = 'calc(100% - ' + header_height + 'px)';
1534          el_indicator_parent.style.top = header_height + 'px';
1535          body.appendChild(el_indicator_parent); // "body" changes often with turbolinks, so reattach each time.
1536          body.classList.add(type);
1537          indicator.play();
1538          // do a timeout because we may be navigating to a page that doesn't use the theme
1539          loadingTimeout = setTimeout(function () {
1540            return _this.hide();
1541          }, 2000);
1542        }
1543      },
1544      hide: function hide() {
1545        var body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
1546
1547        loadingTimeout && clearTimeout(loadingTimeout);
1548
1549        if (!body) {
1550          return;
1551        }
1552        if (!type) {
1553          setType();
1554        }
1555        if (type) {
1556          console.log("type", type);
1557          indicator.stop();
1558          body.classList.remove(type);
1559        }
1560      }
1561    };
1562
1563    var turbolinks_hooks = (function () {
1564      // turbolinks pulls multiple body tags in and manages them for us
1565      // therefore, this event could fire multiple times depending on the number of pages
1566      // turbolinks manages for us. this is expected behavior. we should always add the site-is-loaded
1567      // tag in when turbolinks is managing the page transitions, because we always know that our
1568      // navbar at least exists on our pages at this point, and therefore there is no reason for us to hide
1569      // it.
1570      document.addEventListener("turbolinks:before-render", function (e) {
1571        if (e.data && e.data.newBody) {
1572          e.data.newBody.classList.add('inm-site-is-loaded--no-animate'); // this should exist anyway, but if the spa does not use the new theme, it allows for compatibility
1573          svg.init(e.data.newBody);
1574          favicon.init();
1575          self$1.show(e.data.newBody);
1576        }
1577      });
1578
1579      // when we transition between spas, we want to show a loading indicator
1580      // that continues to display the menu, as it should already be handled by turbolinks.
1581      document.addEventListener("turbolinks:request-start", function (e) {
1582        self$1.show(document.body);
1583      });
1584    });
1585
1586    var node_insertion_event = function node_insertion_event() {
1587      var insertListener = function insertListener(event) {
1588        if (event.animationName !== "nodeInserted") {
1589          return;
1590        }
1591
1592        // dispatch generic node inserted event for handling initialization of specific nodes
1593        event.target.dispatchEvent(new CustomEvent("inm_node_inserted", { 'detail': {}, 'bubbles': true }));
1594      };
1595
1596      document.addEventListener("animationstart", insertListener, false); // standard + firefox
1597      document.addEventListener("MSAnimationStart", insertListener, false); // IE
1598      document.addEventListener("webkitAnimationStart", insertListener, false); // Chrome + Safari
1599    };
1600
1601    var retries = 0;
1602
1603    var createSkipLink = function createSkipLink() {
1604        if (document.getElementsByClassName('js-inm-skip-to-main')[0]) {
1605            return;
1606        }
1607
1608        var currentLocale = locale.getLocaleKeyValue();
1609        var main_content = document.getElementById('inm-skip-to-main');
1610        if (!main_content) {
1611            main_content = document.getElementsByClassName('inm-layout-main__content-area');
1612        }
1613        if (!main_content.length) {
1614            main_content = document.getElementsByClassName('inm-layout-sidebar__content-area');
1615        }
1616        if (!main_content.length) {
1617            main_content = document.getElementsByClassName('inm-layout-main__content');
1618        }
1619        if (!main_content.length) {
1620            main_content = document.getElementsByClassName('inm-layout-main__content--with-expanded-header');
1621        }
1622        if (!main_content.length) {
1623            main_content = document.getElementsByClassName('inm-layout-sidebar__content');
1624        }
1625
1626        if (main_content[0]) {
1627            if (!main_content[0].getAttribute('id')) {
1628                main_content[0].setAttribute('id', "inm-skip-to-main");
1629            }
1630            main_content[0].setAttribute('tabindex', '-1');
1631            var mainContentId = main_content[0].getAttribute('id');
1632            var skip = document.createElement('a');
1633            skip.href = "#" + mainContentId;
1634            skip.innerText = currentLocale.SKIP_TO_MAIN_CONTENT;
1635            skip.className = "inm-skip-to-main js-inm-skip-to-main";
1636            // var rslt = result;
1637            // var item = document.getElementById('TextArea1');
1638            document.body.insertBefore(skip, document.body.childNodes[0]);
1639            // document.body.prepend(skip)
1640            skip.addEventListener('click', function (e) {
1641                var pageId = e.target.getAttribute('href').replace('#', '');
1642                document.getElementById(pageId).focus();
1643                e.preventDefault();
1644            });
1645        } else {
1646            retries++;
1647            if (retries > 4) {
1648                console.error("no main content to link 'skip to main content' link to");
1649                return;
1650            }
1651            setTimeout(createSkipLink, 500);
1652        }
1653    };
1654
1655    var skip_to_main_content = {
1656        init: function init() {
1657            setTimeout(createSkipLink, 10);
1658        }
1659    };
1660
1661    var initialTimeout = void 0;
1662    var _status = void 0;
1663    var initialize_app = function initialize_app() {
1664      if (!has_theme()) {
1665        _status = 'started';
1666        nativePropertyHooks.init();
1667        observeForms.init();
1668        subnavs.init();
1669        sticky.init();
1670        favicon.init();
1671        svg.init();
1672        tooltip.init();
1673        selectable_table.init();
1674        footer.init();
1675        tabs.init();
1676        junk_drawer.init();
1677        skip_to_main_content.init();
1678        node_insertion_event(); // must appear after all inits have taken place
1679        turbolinks_hooks();
1680        add_to_window();
1681        _status = 'finished';
1682        document.dispatchEvent(new CustomEvent('inm-theme-ready'));
1683        initialTimeout = setTimeout(function () {
1684          return self$2.initiallyShowSite();
1685        }, 2000);
1686      }
1687    };
1688
1689    var self$2 = {
1690      status: function status() {
1691        return _status;
1692      },
1693      init: function init() {
1694        if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading") {
1695          initialize_app();
1696        } else {
1697          document.addEventListener('DOMContentLoaded', initialize_app);
1698        }
1699      },
1700
1701      // this is for each SPA to call to tell us when it's data has loaded and the SPA itself is ready to show.
1702      showSite: function showSite() {
1703        self$2.initiallyShowSite(); // this will typically already be loaded, but will not hurt anything to call again here.
1704        self$1.hide();
1705      },
1706      hideSite: function hideSite() {
1707        self$1.show();
1708      },
1709
1710      // if this is not called, it will display a white page, with a blue bar at the top only.
1711      // this is intentional, as we don't want users to see the page before they are logged in.
1712      // we do not want to display the SPA yet though, that should be managed by each spa, which will call
1713      // "showSite()" to tell us when to display the SPA.
1714      initiallyShowSite: function initiallyShowSite() {
1715        initialTimeout && clearTimeout(initialTimeout);
1716        if (!document.body.classList.contains('inm-site-is-loaded')) {
1717          setTimeout(function () {
1718            return document.body.classList.add('inm-site-is-loaded');
1719          }, 50);
1720        }
1721      },
1722
1723      select: select
1724    };
1725
1726    var add_to_window = function add_to_window() {
1727      if (!window.inm) {
1728        window.inm = {};
1729      }
1730      if (!window.inm.theme) {
1731        window.inm.theme = { v2: self$2 };
1732      }
1733    };
1734
1735    var has_theme = function has_theme() {
1736      if (!window.inm) {
1737        return false;
1738      }
1739      if (!window.inm.theme) {
1740        return false;
1741      }
1742      if (!window.inm.theme.v2) {
1743        return false;
1744      }
1745      if (!window.inm.theme.v2.status()) {
1746        return false;
1747      }
1748      return true;
1749    };
1750
1751    if (!has_theme()) {
1752      self$2.init();
1753    }
1754
1755    return self$2;
1756
1757})));

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.