');\n\n if (this.options.enableClickableOptGroups) {\n r.addClass(\"multiselect-group-clickable\")\n }\n this.$ul.append(r);\n if ($(group).is(\":disabled\")) {\n r.addClass(\"disabled\")\n }\n $(\"option\", group).each($.proxy(function($, group) {\n this.createOptionValue(group)\n }, this))\n }\n else {\n var groupName = $(group).prop('label');\n\n // Add a header for the group.\n var $li = $(this.options.templates.liGroup);\n\n if (this.options.enableHTML) {\n $('label', $li).html(groupName);\n }\n else {\n $('label', $li).text(groupName);\n }\n\n if (this.options.enableClickableOptGroups) {\n $li.addClass('multiselect-group-clickable');\n }\n\n this.$ul.append($li);\n\n if ($(group).is(':disabled')) {\n $li.addClass('disabled');\n }\n\n // Add the options of the group.\n $('option', group).each($.proxy(function(index, element) {\n this.createOptionValue(element);\n }, this));\n }\n },\n\n /**\n * Build the select all.\n *\n * Checks if a select all has already been created.\n */\n buildSelectAll: function() {\n if (typeof this.options.selectAllValue === 'number') {\n this.options.selectAllValue = this.options.selectAllValue.toString();\n }\n\n var alreadyHasSelectAll = this.hasSelectAll();\n\n if (!alreadyHasSelectAll && this.options.includeSelectAllOption && this.options.multiple\n && $('option', this.$select).length > this.options.includeSelectAllIfMoreThan) {\n\n // Check whether to add a divider after the select all.\n if (this.options.includeSelectAllDivider) {\n this.$ul.prepend($(this.options.templates.divider));\n }\n\n var $li = $(this.options.templates.li);\n $('label', $li).addClass(\"checkbox\");\n\n if (this.options.enableHTML) {\n $('label', $li).html(\" \" + this.options.selectAllText);\n }\n else {\n $('label', $li).text(\" \" + this.options.selectAllText);\n }\n\n if (this.options.selectAllName) {\n $('label', $li).prepend('');\n }\n else {\n $('label', $li).prepend('');\n }\n\n var $checkbox = $('input', $li);\n $checkbox.val(this.options.selectAllValue);\n\n $li.addClass(\"multiselect-item multiselect-all\");\n $checkbox.parent().parent()\n .addClass('multiselect-all');\n\n this.$ul.prepend($li);\n\n $checkbox.prop('checked', false);\n }\n },\n\n /**\n * Builds the filter.\n */\n buildFilter: function() {\n\n // Build filter if filtering OR case insensitive filtering is enabled and the number of options exceeds (or equals) enableFilterLength.\n if (this.options.enableFiltering || this.options.enableCaseInsensitiveFiltering) {\n var enableFilterLength = Math.max(this.options.enableFiltering, this.options.enableCaseInsensitiveFiltering);\n\n if (this.$select.find('option').length >= enableFilterLength) {\n\n this.$filter = $(this.options.templates.filter);\n $('input', this.$filter).attr('placeholder', this.options.filterPlaceholder);\n\n // Adds optional filter clear button\n if(this.options.includeFilterClearBtn){\n var clearBtn = $(this.options.templates.filterClearBtn);\n clearBtn.on('click', $.proxy(function(event){\n clearTimeout(this.searchTimeout);\n this.$filter.find('.multiselect-search').val('');\n $('li', this.$ul).show().removeClass(\"filter-hidden\");\n this.updateSelectAll();\n }, this));\n this.$filter.find('.input-group').append(clearBtn);\n }\n\n this.$ul.prepend(this.$filter);\n\n this.$filter.val(this.query).on('click', function(event) {\n event.stopPropagation();\n }).on('input keydown', $.proxy(function(event) {\n // Cancel enter key default behaviour\n if (event.which === 13) {\n event.preventDefault();\n }\n\n // This is useful to catch \"keydown\" events after the browser has updated the control.\n clearTimeout(this.searchTimeout);\n\n this.searchTimeout = this.asyncFunction($.proxy(function() {\n\n if (this.query !== event.target.value) {\n this.query = event.target.value;\n\n var currentGroup, currentGroupVisible;\n $.each($('li', this.$ul), $.proxy(function(index, element) {\n var value = $('input', element).length > 0 ? $('input', element).val() : \"\";\n var text = $('label', element).text();\n\n var filterCandidate = '';\n if ((this.options.filterBehavior === 'text')) {\n filterCandidate = text;\n }\n else if ((this.options.filterBehavior === 'value')) {\n filterCandidate = value;\n }\n else if (this.options.filterBehavior === 'both') {\n filterCandidate = text + '\\n' + value;\n }\n\n if (value !== this.options.selectAllValue && text) {\n\n // By default lets assume that element is not\n // interesting for this search.\n var showElement = false;\n\n if (this.options.enableCaseInsensitiveFiltering) {\n filterCandidate = filterCandidate.toLowerCase();\n this.query = this.query.toLowerCase();\n }\n\n if (this.options.enableFullValueFiltering && this.options.filterBehavior !== 'both') {\n var valueToMatch = filterCandidate.trim().substring(0, this.query.length);\n if (this.query.indexOf(valueToMatch) > -1) {\n showElement = true;\n }\n }\n else if (filterCandidate.indexOf(this.query) > -1) {\n showElement = true;\n }\n\n // Toggle current element (group or group item) according to showElement boolean.\n $(element).toggle(showElement).toggleClass('filter-hidden', !showElement);\n\n // Differentiate groups and group items.\n if ($(element).hasClass('multiselect-group')) {\n // Remember group status.\n currentGroup = element;\n currentGroupVisible = showElement;\n }\n else {\n // Show group name when at least one of its items is visible.\n if (showElement) {\n $(currentGroup).show().removeClass('filter-hidden');\n }\n\n // Show all group items when group name satisfies filter.\n if (!showElement && currentGroupVisible) {\n $(element).show().removeClass('filter-hidden');\n }\n }\n }\n }, this));\n }\n\n this.updateSelectAll();\n }, this), 300, this);\n }, this));\n }\n }\n },\n\n /**\n * Unbinds the whole plugin.\n */\n destroy: function() {\n this.$container.remove();\n this.$select.show();\n this.$select.data('multiselect', null);\n },\n\n /**\n * Refreshs the multiselect based on the selected options of the select.\n */\n refresh: function () {\n var inputs = $.map($('li input', this.$ul), $);\n\n $('option', this.$select).each($.proxy(function (index, element) {\n var $elem = $(element);\n var value = $elem.val();\n var $input;\n for (var i = inputs.length; 0 < i--; /**/) {\n if (value !== ($input = inputs[i]).val())\n continue; // wrong li\n\n if ($elem.is(':selected')) {\n $input.prop('checked', true);\n\n if (this.options.selectedClass) {\n $input.closest('li')\n .addClass(this.options.selectedClass);\n }\n }\n else {\n $input.prop('checked', false);\n\n if (this.options.selectedClass) {\n $input.closest('li')\n .removeClass(this.options.selectedClass);\n }\n }\n\n if ($elem.is(\":disabled\")) {\n $input.attr('disabled', 'disabled')\n .prop('disabled', true)\n .closest('li')\n .addClass('disabled');\n }\n else {\n $input.prop('disabled', false)\n .closest('li')\n .removeClass('disabled');\n }\n break; // assumes unique values\n }\n }, this));\n\n this.updateButtonText();\n this.updateSelectAll();\n },\n\n /**\n * Select all options of the given values.\n *\n * If triggerOnChange is set to true, the on change event is triggered if\n * and only if one value is passed.\n *\n * @param {Array} selectValues\n * @param {Boolean} triggerOnChange\n */\n select: function(selectValues, triggerOnChange) {\n if(!$.isArray(selectValues)) {\n selectValues = [selectValues];\n }\n\n for (var i = 0; i < selectValues.length; i++) {\n var value = selectValues[i];\n\n if (value === null || value === undefined) {\n continue;\n }\n\n var $option = this.getOptionByValue(value);\n var $checkbox = this.getInputByValue(value);\n\n if($option === undefined || $checkbox === undefined) {\n continue;\n }\n\n if (!this.options.multiple) {\n this.deselectAll(false);\n }\n\n if (this.options.selectedClass) {\n $checkbox.closest('li')\n .addClass(this.options.selectedClass);\n }\n\n $checkbox.prop('checked', true);\n $option.prop('selected', true);\n\n if (triggerOnChange) {\n this.options.onChange($option, true);\n }\n }\n\n this.updateButtonText();\n this.updateSelectAll();\n },\n\n /**\n * Clears all selected items.\n */\n clearSelection: function () {\n this.deselectAll(false);\n this.updateButtonText();\n this.updateSelectAll();\n },\n\n /**\n * Deselects all options of the given values.\n *\n * If triggerOnChange is set to true, the on change event is triggered, if\n * and only if one value is passed.\n *\n * @param {Array} deselectValues\n * @param {Boolean} triggerOnChange\n */\n deselect: function(deselectValues, triggerOnChange) {\n if(!$.isArray(deselectValues)) {\n deselectValues = [deselectValues];\n }\n\n for (var i = 0; i < deselectValues.length; i++) {\n var value = deselectValues[i];\n\n if (value === null || value === undefined) {\n continue;\n }\n\n var $option = this.getOptionByValue(value);\n var $checkbox = this.getInputByValue(value);\n\n if($option === undefined || $checkbox === undefined) {\n continue;\n }\n\n if (this.options.selectedClass) {\n $checkbox.closest('li')\n .removeClass(this.options.selectedClass);\n }\n\n $checkbox.prop('checked', false);\n $option.prop('selected', false);\n\n if (triggerOnChange) {\n this.options.onChange($option, false);\n }\n }\n\n this.updateButtonText();\n this.updateSelectAll();\n },\n\n /**\n * Selects all enabled & visible options.\n *\n * If justVisible is true or not specified, only visible options are selected.\n *\n * @param {Boolean} justVisible\n * @param {Boolean} triggerOnSelectAll\n */\n selectAll: function (justVisible, triggerOnSelectAll) {\n justVisible = (this.options.enableCollapsibleOptGroups && this.options.multiple) ? false : justVisible;\n\n var justVisible = typeof justVisible === 'undefined' ? true : justVisible;\n var allCheckboxes = $(\"li input[type='checkbox']:enabled\", this.$ul);\n var visibleCheckboxes = allCheckboxes.filter(\":visible\");\n var allCheckboxesCount = allCheckboxes.length;\n var visibleCheckboxesCount = visibleCheckboxes.length;\n\n if(justVisible) {\n visibleCheckboxes.prop('checked', true);\n $(\"li:not(.divider):not(.disabled)\", this.$ul).filter(\":visible\").addClass(this.options.selectedClass);\n }\n else {\n allCheckboxes.prop('checked', true);\n $(\"li:not(.divider):not(.disabled)\", this.$ul).addClass(this.options.selectedClass);\n }\n\n if (allCheckboxesCount === visibleCheckboxesCount || justVisible === false) {\n $(\"option:not([data-role='divider']):enabled\", this.$select).prop('selected', true);\n }\n else {\n var values = visibleCheckboxes.map(function() {\n return $(this).val();\n }).get();\n\n $(\"option:enabled\", this.$select).filter(function(index) {\n return $.inArray($(this).val(), values) !== -1;\n }).prop('selected', true);\n }\n\n if (triggerOnSelectAll) {\n this.options.onSelectAll();\n }\n },\n\n /**\n * Deselects all options.\n *\n * If justVisible is true or not specified, only visible options are deselected.\n *\n * @param {Boolean} justVisible\n */\n deselectAll: function (justVisible) {\n justVisible = (this.options.enableCollapsibleOptGroups && this.options.multiple) ? false : justVisible;\n justVisible = typeof justVisible === 'undefined' ? true : justVisible;\n\n if(justVisible) {\n var visibleCheckboxes = $(\"li input[type='checkbox']:not(:disabled)\", this.$ul).filter(\":visible\");\n visibleCheckboxes.prop('checked', false);\n\n var values = visibleCheckboxes.map(function() {\n return $(this).val();\n }).get();\n\n $(\"option:enabled\", this.$select).filter(function(index) {\n return $.inArray($(this).val(), values) !== -1;\n }).prop('selected', false);\n\n if (this.options.selectedClass) {\n $(\"li:not(.divider):not(.disabled)\", this.$ul).filter(\":visible\").removeClass(this.options.selectedClass);\n }\n }\n else {\n $(\"li input[type='checkbox']:enabled\", this.$ul).prop('checked', false);\n $(\"option:enabled\", this.$select).prop('selected', false);\n\n if (this.options.selectedClass) {\n $(\"li:not(.divider):not(.disabled)\", this.$ul).removeClass(this.options.selectedClass);\n }\n }\n },\n\n /**\n * Rebuild the plugin.\n *\n * Rebuilds the dropdown, the filter and the select all option.\n */\n rebuild: function() {\n this.$ul.html('');\n\n // Important to distinguish between radios and checkboxes.\n this.options.multiple = this.$select.attr('multiple') === \"multiple\";\n\n this.buildSelectAll();\n this.buildDropdownOptions();\n this.buildFilter();\n\n this.updateButtonText();\n this.updateSelectAll(true);\n\n if (this.options.disableIfEmpty && $('option', this.$select).length <= 0) {\n this.disable();\n }\n else {\n this.enable();\n }\n\n if (this.options.dropRight) {\n this.$ul.addClass('pull-right');\n }\n },\n\n /**\n * The provided data will be used to build the dropdown.\n */\n dataprovider: function(dataprovider) {\n\n var groupCounter = 0;\n var $select = this.$select.empty();\n\n $.each(dataprovider, function (index, option) {\n var $tag;\n\n if ($.isArray(option.children)) { // create optiongroup tag\n groupCounter++;\n\n $tag = $('').attr({\n label: option.label || 'Group ' + groupCounter,\n disabled: !!option.disabled\n });\n\n forEach(option.children, function(subOption) { // add children option tags\n $tag.append($('').attr({\n value: subOption.value,\n label: subOption.label || subOption.value,\n title: subOption.title,\n selected: !!subOption.selected,\n disabled: !!subOption.disabled\n }));\n });\n }\n else {\n $tag = $('').attr({\n value: option.value,\n label: option.label || option.value,\n title: option.title,\n class: option.class,\n selected: !!option.selected,\n disabled: !!option.disabled\n });\n $tag.text(option.label || option.value);\n }\n\n $select.append($tag);\n });\n\n this.rebuild();\n },\n\n /**\n * Enable the multiselect.\n */\n enable: function() {\n this.$select.prop('disabled', false);\n this.$button.prop('disabled', false)\n .removeClass('disabled');\n },\n\n /**\n * Disable the multiselect.\n */\n disable: function() {\n this.$select.prop('disabled', true);\n this.$button.prop('disabled', true)\n .addClass('disabled');\n },\n\n /**\n * Set the options.\n *\n * @param {Array} options\n */\n setOptions: function(options) {\n this.options = this.mergeOptions(options);\n },\n\n /**\n * Merges the given options with the default options.\n *\n * @param {Array} options\n * @returns {Array}\n */\n mergeOptions: function(options) {\n return $.extend(true, {}, this.defaults, this.options, options);\n },\n\n /**\n * Checks whether a select all checkbox is present.\n *\n * @returns {Boolean}\n */\n hasSelectAll: function() {\n return $('li.multiselect-all', this.$ul).length > 0;\n },\n\n /**\n * Updates the select all checkbox based on the currently displayed and selected checkboxes.\n */\n updateSelectAll: function(notTriggerOnSelectAll) {\n if (this.hasSelectAll()) {\n var allBoxes = $(\"li:not(.multiselect-item):not(.filter-hidden) input:enabled\", this.$ul);\n var allBoxesLength = allBoxes.length;\n var checkedBoxesLength = allBoxes.filter(\":checked\").length;\n var selectAllLi = $(\"li.multiselect-all\", this.$ul);\n var selectAllInput = selectAllLi.find(\"input\");\n\n if (checkedBoxesLength > 0 && checkedBoxesLength === allBoxesLength) {\n selectAllInput.prop(\"checked\", true);\n selectAllLi.addClass(this.options.selectedClass);\n this.options.onSelectAll(true);\n }\n else {\n selectAllInput.prop(\"checked\", false);\n selectAllLi.removeClass(this.options.selectedClass);\n if (checkedBoxesLength === 0) {\n if (!notTriggerOnSelectAll) {\n this.options.onSelectAll(false);\n }\n }\n }\n }\n },\n\n /**\n * Update the button text and its title based on the currently selected options.\n */\n updateButtonText: function() {\n var options = this.getSelected();\n\n // First update the displayed button text.\n if (this.options.enableHTML) {\n $('.multiselect .multiselect-selected-text', this.$container).html(this.options.buttonText(options, this.$select));\n }\n else {\n $('.multiselect .multiselect-selected-text', this.$container).text(this.options.buttonText(options, this.$select));\n }\n\n // Now update the title attribute of the button.\n $('.multiselect', this.$container).attr('title', this.options.buttonTitle(options, this.$select));\n },\n\n /**\n * Get all selected options.\n *\n * @returns {jQUery}\n */\n getSelected: function() {\n return $('option', this.$select).filter(\":selected\");\n },\n\n /**\n * Gets a select option by its value.\n *\n * @param {String} value\n * @returns {jQuery}\n */\n getOptionByValue: function (value) {\n\n var options = $('option', this.$select);\n var valueToCompare = value.toString();\n\n for (var i = 0; i < options.length; i = i + 1) {\n var option = options[i];\n if (option.value === valueToCompare) {\n return $(option);\n }\n }\n },\n\n /**\n * Get the input (radio/checkbox) by its value.\n *\n * @param {String} value\n * @returns {jQuery}\n */\n getInputByValue: function (value) {\n\n var checkboxes = $('li input', this.$ul);\n var valueToCompare = value.toString();\n\n for (var i = 0; i < checkboxes.length; i = i + 1) {\n var checkbox = checkboxes[i];\n if (checkbox.value === valueToCompare) {\n return $(checkbox);\n }\n }\n },\n\n /**\n * Used for knockout integration.\n */\n updateOriginalOptions: function() {\n this.originalOptions = this.$select.clone()[0].options;\n },\n\n asyncFunction: function(callback, timeout, self) {\n var args = Array.prototype.slice.call(arguments, 3);\n return setTimeout(function() {\n callback.apply(self || window, args);\n }, timeout);\n },\n\n setAllSelectedText: function(allSelectedText) {\n this.options.allSelectedText = allSelectedText;\n this.updateButtonText();\n }\n };\n\n $.fn.multiselect = function(option, parameter, extraOptions) {\n return this.each(function() {\n var data = $(this).data('multiselect');\n var options = typeof option === 'object' && option;\n\n // Initialize the multiselect.\n if (!data) {\n data = new Multiselect(this, options);\n $(this).data('multiselect', data);\n }\n\n // Call multiselect method.\n if (typeof option === 'string') {\n data[option](parameter, extraOptions);\n\n if (option === 'destroy') {\n $(this).data('multiselect', false);\n }\n }\n });\n };\n\n $.fn.multiselect.Constructor = Multiselect;\n\n $(function() {\n $(\"select[data-role=multiselect]\").multiselect();\n });\n\n}($));\n","/**\n * Uniform\n * A jQuery plugin to make your form controls look how you want them to.\n *\n * @author Josh Pyles \n * @author Tyler Akins \n * @author Shahriyar Imanov \n *\n * @license MIT\n *\n * @see http://opensource.audith.org/uniform\n */\nimport $ from 'jquery';\n\n(function (wind, $, undef) {\n \"use strict\";\n\n /**\n * Use .prop() if jQuery supports it, otherwise fall back to .attr()\n * @usage All other parameters are passed to jQuery's function\n *\n * @param {jQuery} $el jQuery'd element on which we're calling attr/prop\n * @return {*} The result from jQuery\n */\n function attrOrProp($el /* , args */) {\n var args = Array.prototype.slice.call(arguments, 1);\n\n if ($el.prop) {\n // jQuery 1.6+\n return $el.prop.apply($el, args);\n }\n\n // jQuery 1.5 and below\n return $el.attr.apply($el, args);\n }\n\n /**\n * For backwards compatibility with older jQuery libraries, only bind\n * one thing at a time. Also, this function adds our namespace to\n * events in one consistent location, shrinking the minified code.\n *\n * The properties on the events object are the names of the events\n * that we are supposed to add to. It can be a space separated list.\n * The namespace will be added automatically.\n *\n * @param {jQuery} $el\n * @param {Object} options Uniform options for this element\n * @param {Object} events Events to bind, properties are event names\n */\n function bindMany($el, options, events) {\n var name, namespaced;\n\n for (name in events) {\n if (events.hasOwnProperty(name)) {\n namespaced = name.replace(/ |$/g, options.eventNamespace);\n $el.bind(namespaced, events[name]);\n }\n }\n }\n\n /**\n * Bind the hover, active, focus, and blur UI updates\n *\n * @param {jQuery} $el Original element\n * @param {jQuery} $target Target for the events (our div/span)\n * @param {Object} options Uniform options for the element $target\n */\n function bindUi($el, $target, options) {\n bindMany($el, options, {\n focus: function () {\n $target.addClass(options.focusClass);\n },\n blur: function () {\n $target.removeClass(options.focusClass);\n $target.removeClass(options.activeClass);\n },\n mouseenter: function () {\n $target.addClass(options.hoverClass);\n },\n mouseleave: function () {\n $target.removeClass(options.hoverClass);\n $target.removeClass(options.activeClass);\n },\n \"mousedown touchbegin\": function () {\n if (!$el.is(\":disabled\")) {\n $target.addClass(options.activeClass);\n }\n },\n \"mouseup touchend\": function () {\n $target.removeClass(options.activeClass);\n }\n });\n }\n\n /**\n * Remove the hover, focus, active classes.\n *\n * @param {jQuery} $el Element with classes\n * @param {Object} options Uniform options for the element\n */\n function classClearStandard($el, options) {\n $el.removeClass(options.hoverClass + \" \" + options.focusClass + \" \" + options.activeClass);\n }\n\n /**\n * Add or remove a class, depending on if it's \"enabled\"\n *\n * @param {jQuery} $el Element that has the class added/removed\n * @param {String} className Class or classes to add/remove\n * @param {Boolean} enabled True to add the class, false to remove\n */\n function classUpdate($el, className, enabled) {\n if (enabled) {\n $el.addClass(className);\n } else {\n $el.removeClass(className);\n }\n }\n\n /**\n * Updating the \"checked\" property can be a little tricky. This\n * changed in jQuery 1.6 and now we can pass booleans to .prop().\n * Prior to that, one either adds an attribute (\"checked=checked\") or\n * removes the attribute.\n *\n * @param {jQuery} $tag Our Uniform span/div\n * @param {jQuery} $el Original form element\n * @param {Object} options Uniform options for this element\n */\n function classUpdateChecked($tag, $el, options) {\n // setTimeout() introduced by #357\n setTimeout(function () {\n var c = \"checked\",\n isChecked = $el.is(\":\" + c);\n\n if(!$el.attr(\"readonly\")) {\n if ($el.prop) {\n // jQuery 1.6+\n $el.prop(c, isChecked);\n } else {\n // jQuery 1.5 and below\n if (isChecked) {\n $el.attr(c, c);\n } else {\n $el.removeAttr(c);\n }\n }\n }\n\n classUpdate($tag, options.checkedClass, isChecked);\n }, 1);\n }\n\n /**\n * Set or remove the \"disabled\" class for disabled elements, based on\n * if the element is detected to be disabled.\n *\n * @param {jQuery} $tag Our Uniform span/div\n * @param {jQuery} $el Original form element\n * @param {Object} options Uniform options for this element\n */\n function classUpdateDisabled($tag, $el, options) {\n classUpdate($tag, options.disabledClass, $el.is(\":disabled\"));\n }\n\n /**\n * Wrap an element inside of a container or put the container next\n * to the element. See the code for examples of the different methods.\n *\n * Returns the container that was added to the HTML.\n *\n * @param {jQuery} $el Element to wrap\n * @param {jQuery} $container Add this new container around/near $el\n * @param {String} method One of \"after\", \"before\" or \"wrap\"\n * @return {jQuery} $container after it has been cloned for adding to $el\n */\n function divSpanWrap($el, $container, method) {\n switch (method) {\n case \"after\":\n // Result: \n $el.after($container);\n return $el.next();\n case \"before\":\n // Result: \n $el.before($container);\n return $el.prev();\n case \"wrap\":\n // Result: \n $el.wrap($container);\n return $el.parent();\n }\n\n return null;\n }\n\n /**\n * Create a div/span combo for uniforming an element\n *\n * @param {jQuery} $el Element to wrap\n * @param {Object} options Options for the element, set by the user\n * @param {Object} divSpanConfig Options for how we wrap the div/span\n * @return {Object} Contains the div and span as properties\n */\n function divSpan($el, options, divSpanConfig) {\n var $div, $span, id;\n\n if (!divSpanConfig) {\n divSpanConfig = {};\n }\n\n divSpanConfig = $.extend({\n bind: {},\n divClass: null,\n divWrap: \"wrap\",\n spanClass: null,\n spanHtml: null,\n spanWrap: \"wrap\"\n }, divSpanConfig);\n\n $div = $('');\n $span = $('');\n\n // Automatically hide this div/span if the element is hidden.\n // Do not hide if the element is hidden because a parent is hidden.\n if (options.autoHide && $el.is(':hidden') && $el.css('display') === 'none') {\n $div.hide();\n }\n\n if (divSpanConfig.divClass) {\n $div.addClass(divSpanConfig.divClass);\n }\n\n if (options.wrapperClass) {\n $div.addClass(options.wrapperClass);\n }\n\n if (divSpanConfig.spanClass) {\n $span.addClass(divSpanConfig.spanClass);\n }\n\n id = attrOrProp($el, 'id');\n\n if (options.useID && id) {\n attrOrProp($div, 'id', options.idPrefix + '-' + id);\n }\n\n if (divSpanConfig.spanHtml) {\n $span.html(divSpanConfig.spanHtml);\n }\n\n $div = divSpanWrap($el, $div, divSpanConfig.divWrap);\n $span = divSpanWrap($el, $span, divSpanConfig.spanWrap);\n classUpdateDisabled($div, $el, options);\n return {\n div: $div,\n span: $span\n };\n }\n\n /**\n * Wrap an element with a span to apply a global wrapper class\n *\n * @param {jQuery} $el Element to wrap\n * @param {Object} options\n * @return {jQuery} jQuery Wrapper element\n */\n function wrapWithWrapperClass($el, options) {\n var $span;\n\n if (!options.wrapperClass) {\n return null;\n }\n\n $span = $('').addClass(options.wrapperClass);\n $span = divSpanWrap($el, $span, \"wrap\");\n return $span;\n }\n\n /**\n * Test if high contrast mode is enabled.\n *\n * In high contrast mode, background images can not be set and\n * they are always returned as 'none'.\n *\n * @return {Boolean} True if in high contrast mode\n */\n function highContrast() {\n // var c, $div, el, rgb;\n //\n // // High contrast mode deals with white and black\n // rgb = 'rgb(120,2,153)';\n // $div = $('
');\n // $('body').append($div);\n // el = $div.get(0);\n //\n // // $div.css() will get the style definition, not\n // // the actually displaying style\n // if (wind.getComputedStyle) {\n // c = wind.getComputedStyle(el, '').color;\n // } else {\n // c = (el.currentStyle || el.style || {}).color;\n // }\n //\n // $div.remove();\n // return c.replace(/ /g, '') !== rgb;\n }\n\n /**\n * Change text into safe HTML\n *\n * @param {String} text\n * @return {String} HTML version\n */\n function htmlify(text) {\n if (!text) {\n return \"\";\n }\n\n return $('').text(text).html();\n }\n\n /**\n * If not MSIE, return false.\n * If it is, return the version number.\n *\n * @return {Boolean}|{Number}\n */\n function isMsie() {\n return navigator.cpuClass && !navigator.product;\n }\n\n /**\n * Return true if this version of IE allows styling\n *\n * @return {Boolean}\n */\n function isMsieSevenOrNewer() {\n return wind.XMLHttpRequest !== undefined;\n }\n\n /**\n * Check if the element is a multiselect\n *\n * @param {jQuery} $el Element\n * @return {Boolean} true/false\n */\n function isMultiselect($el) {\n var elSize;\n\n if ($el[0].multiple) {\n return true;\n }\n\n elSize = attrOrProp($el, \"size\");\n\n return !(!elSize || elSize <= 1);\n }\n\n /**\n * Meaningless utility function. Used mostly for improving minification.\n *\n * @return {Boolean}\n */\n function returnFalse() {\n return false;\n }\n\n /**\n * noSelect plugin, very slightly modified\n * http://mths.be/noselect v1.0.3\n *\n * @param {jQuery} $elem Element that we don't want to select\n * @param {Object} options Uniform options for the element\n */\n function noSelect($elem, options) {\n var none = 'none';\n bindMany($elem, options, {\n 'selectstart dragstart mousedown': returnFalse\n });\n\n $elem.css({\n MozUserSelect: none,\n msUserSelect: none,\n webkitUserSelect: none,\n userSelect: none\n });\n }\n\n /**\n * Updates the filename tag based on the value of the real input\n * element.\n *\n * @param {jQuery} $el Actual form element\n * @param {jQuery} $filenameTag Span/div to update\n * @param {Object} options Uniform options for this element\n */\n function setFilename($el, $filenameTag, options) {\n var filenames = $.map($el[0].files, function (file) {return file.name}).join(', ');\n\n if (filenames === \"\") {\n filenames = options.fileDefaultHtml;\n } else {\n filenames = filenames.split(/[\\/\\\\]+/);\n filenames = filenames[(filenames.length - 1)];\n }\n\n $filenameTag.text(filenames);\n }\n\n /**\n * Function from jQuery to swap some CSS values, run a callback,\n * then restore the CSS. Modified to pass JSLint and handle undefined\n * values with 'use strict'.\n *\n * @param {jQuery} $elements Element\n * @param {Object} newCss CSS values to swap out\n * @param {Function} callback Function to run\n */\n function swap($elements, newCss, callback) {\n var restore, item;\n\n restore = [];\n\n $elements.each(function () {\n var name;\n\n for (name in newCss) {\n if (Object.prototype.hasOwnProperty.call(newCss, name)) {\n restore.push({\n el: this,\n name: name,\n old: this.style[name]\n });\n\n this.style[name] = newCss[name];\n }\n }\n });\n\n callback();\n\n while (restore.length) {\n item = restore.pop();\n item.el.style[item.name] = item.old;\n }\n }\n\n /**\n * The browser doesn't provide sizes of elements that are not visible.\n * This will clone an element and add it to the DOM for calculations.\n *\n * @param {jQuery} $el\n * @param {Function} callback\n */\n function sizingInvisible($el, callback) {\n var targets;\n\n // We wish to target ourselves and any parents as long as\n // they are not visible\n targets = $el.parents();\n targets.push($el[0]);\n targets = targets.not(':visible');\n swap(targets, {\n visibility: \"hidden\",\n display: \"block\",\n position: \"absolute\"\n }, callback);\n }\n\n /**\n * Standard way to unwrap the div/span combination from an element\n *\n * @param {jQuery} $el Element that we wish to preserve\n * @param {Object} options Uniform options for the element\n * @return {Function} This generated function will perform the given work\n */\n function unwrapUnwrapUnbindFunction($el, options) {\n return function () {\n $el.unwrap().unwrap().unbind(options.eventNamespace);\n };\n }\n\n var allowStyling = true, // False if IE6 or other unsupported browsers\n highContrastTest = false, // Was the high contrast test ran?\n uniformHandlers = [ // Objects that take care of \"unification\"\n {\n // Buttons\n match: function ($el) {\n return $el.is(\"a, button, :submit, :reset, input[type='button']\");\n },\n apply: function ($el, options) {\n var $div, defaultSpanHtml, ds, getHtml, doingClickEvent;\n defaultSpanHtml = options.submitDefaultHtml;\n\n if ($el.is(\":reset\")) {\n defaultSpanHtml = options.resetDefaultHtml;\n }\n\n if ($el.is(\"a, button\")) {\n // Use the HTML inside the tag\n getHtml = function () {\n return $el.html() || defaultSpanHtml;\n };\n } else {\n // Use the value property of the element\n getHtml = function () {\n return htmlify(attrOrProp($el, \"value\")) || defaultSpanHtml;\n };\n }\n\n ds = divSpan($el, options, {\n divClass: options.buttonClass,\n spanHtml: getHtml()\n });\n $div = ds.div;\n bindUi($el, $div, options);\n doingClickEvent = false;\n bindMany($div, options, {\n \"click touchend\": function () {\n var ev, res, target, href;\n\n if (doingClickEvent) {\n return false;\n }\n\n if ($el.is(':disabled')) {\n return false;\n }\n\n doingClickEvent = true;\n\n if ($el[0].dispatchEvent) {\n ev = document.createEvent(\"MouseEvents\");\n ev.initEvent(\"click\", true, true);\n res = $el[0].dispatchEvent(ev);\n\n if ($el.is('a') && res) {\n target = attrOrProp($el, 'target');\n href = attrOrProp($el, 'href');\n\n if (!target || target === '_self') {\n document.location.href = href;\n } else {\n wind.open(href, target);\n }\n }\n } else {\n $el.click();\n }\n\n doingClickEvent = false;\n }\n });\n noSelect($div, options);\n return {\n remove: function () {\n // Move $el out\n $div.after($el);\n\n // Remove div and span\n $div.remove();\n\n // Unbind events\n $el.unbind(options.eventNamespace);\n return $el;\n },\n update: function () {\n classClearStandard($div, options);\n classUpdateDisabled($div, $el, options);\n $el.detach();\n ds.span.html(getHtml()).append($el);\n }\n };\n }\n },\n {\n // Checkboxes\n match: function ($el) {\n return $el.is(\":checkbox\");\n },\n apply: function ($el, options) {\n var ds, $div, $span;\n ds = divSpan($el, options, {\n divClass: options.checkboxClass\n });\n $div = ds.div;\n $span = ds.span;\n\n // Add focus classes, toggling, active, etc.\n bindUi($el, $div, options);\n bindMany($el, options, {\n \"click touchend\": function () {\n classUpdateChecked($span, $el, options);\n }\n });\n classUpdateChecked($span, $el, options);\n return {\n remove: unwrapUnwrapUnbindFunction($el, options),\n update: function () {\n classClearStandard($div, options);\n $span.removeClass(options.checkedClass);\n classUpdateChecked($span, $el, options);\n classUpdateDisabled($div, $el, options);\n }\n };\n }\n },\n {\n // File selection / uploads\n match: function ($el) {\n return $el.is(\":file\");\n },\n apply: function ($el, options) {\n var ds, $div, $filename, $button;\n\n // Issue #441: Check if the control supports multiple selection.\n var multiselect = typeof($el.attr(\"multiple\")) != \"undefined\";\n\n // The \"span\" is the button\n ds = divSpan($el, options, {\n divClass: options.fileClass,\n spanClass: options.fileButtonClass,\n // Issue #441: Choose a display label based on the control supporting multiple selection.\n spanHtml: multiselect ? options.filesButtonHtml : options.fileButtonHtml,\n spanWrap: \"after\"\n });\n $div = ds.div;\n $button = ds.span;\n $filename = $(\"\").html(options.fileDefaultHtml);\n $filename.addClass(options.filenameClass);\n $filename = divSpanWrap($el, $filename, \"after\");\n\n // Set the size\n if (!attrOrProp($el, \"size\")) {\n attrOrProp($el, \"size\", $div.width() / 10);\n }\n\n // Actions\n function filenameUpdate() {\n setFilename($el, $filename, options);\n }\n\n bindUi($el, $div, options);\n\n // Account for input saved across refreshes\n filenameUpdate();\n\n // IE7 doesn't fire onChange until blur or second fire.\n if (isMsie()) {\n // IE considers browser chrome blocking I/O, so it\n // suspends tiemouts until after the file has\n // been selected.\n bindMany($el, options, {\n click: function () {\n $el.trigger(\"change\");\n setTimeout(filenameUpdate, 0);\n }\n });\n } else {\n // All other browsers behave properly\n bindMany($el, options, {\n change: filenameUpdate\n });\n }\n\n noSelect($filename, options);\n noSelect($button, options);\n return {\n remove: function () {\n // Remove filename and button\n $filename.remove();\n $button.remove();\n\n // Unwrap parent div, remove events\n return $el.unwrap().unbind(options.eventNamespace);\n },\n update: function () {\n classClearStandard($div, options);\n setFilename($el, $filename, options);\n classUpdateDisabled($div, $el, options);\n }\n };\n }\n },\n {\n // Input fields (text)\n match: function ($el) {\n if ($el.is(\"input\")) {\n var t = (\" \" + attrOrProp($el, \"type\") + \" \").toLowerCase(),\n allowed = \" color date datetime datetime-local email month number password search tel text time url week \";\n return allowed.indexOf(t) >= 0;\n }\n\n return false;\n },\n apply: function ($el, options) {\n var elType, $wrapper;\n\n elType = attrOrProp($el, \"type\");\n $el.addClass(options.inputClass);\n $wrapper = wrapWithWrapperClass($el, options);\n bindUi($el, $el, options);\n\n if (options.inputAddTypeAsClass) {\n $el.addClass(elType);\n }\n\n return {\n remove: function () {\n $el.removeClass(options.inputClass);\n\n if (options.inputAddTypeAsClass) {\n $el.removeClass(elType);\n }\n\n if ($wrapper) {\n $el.unwrap();\n }\n },\n update: returnFalse\n };\n }\n },\n {\n // Radio buttons\n match: function ($el) {\n return $el.is(\":radio\");\n },\n apply: function ($el, options) {\n var ds, $div, $span;\n ds = divSpan($el, options, {\n divClass: options.radioClass\n });\n $div = ds.div;\n $span = ds.span;\n\n // Add classes for focus, handle active, checked\n bindUi($el, $div, options);\n bindMany($el, options, {\n \"click touchend\": function () {\n // Fixes #418 - Find all radios with the same name, then update them with $.uniform.update() so the right per-element options are used\n $el.attr('name') !== undefined ? $.uniform.update($(':radio[name=\"' + attrOrProp($el, \"name\") + '\"]')) : $.uniform.update($el);\n }\n });\n classUpdateChecked($span, $el, options);\n return {\n remove: unwrapUnwrapUnbindFunction($el, options),\n update: function () {\n classClearStandard($div, options);\n classUpdateChecked($span, $el, options);\n classUpdateDisabled($div, $el, options);\n }\n };\n }\n },\n {\n // Select lists, but do not style multiselects here\n match: function ($el) {\n return !!($el.is(\"select\") && !isMultiselect($el));\n },\n apply: function ($el, options) {\n var ds, $div, $span, origElemWidth;\n\n if (options.selectAutoWidth) {\n sizingInvisible($el, function () {\n origElemWidth = $el.width();\n });\n }\n\n ds = divSpan($el, options, {\n divClass: options.selectClass,\n spanHtml: ($el.find(\":selected:first\") || $el.find(\"option:first\")).html(),\n spanWrap: \"before\"\n });\n $div = ds.div;\n $span = ds.span;\n\n if (options.selectAutoWidth) {\n // Use the width of the select and adjust the\n // span and div accordingly\n sizingInvisible($el, function () {\n // Force \"display: block\" - related to bug #287\n swap($([$span[0], $div[0]]), {\n display: \"block\"\n }, function () {\n var spanPad;\n spanPad = $span.outerWidth() - $span.width();\n $div.width(origElemWidth + spanPad);\n $span.width(origElemWidth);\n });\n });\n } else {\n // Force the select to fill the size of the div\n $div.addClass('fixedWidth');\n }\n\n // Take care of events\n bindUi($el, $div, options);\n bindMany($el, options, {\n change: function () {\n $span.html($el.find(\":selected\").html());\n $div.removeClass(options.activeClass);\n },\n \"click touchend\": function () {\n // IE7 and IE8 may not update the value right\n // until after click event - issue #238\n var selHtml = $el.find(\":selected\").html();\n\n if ($span.html() !== selHtml) {\n // Change was detected\n // Fire the change event on the select tag\n $el.trigger('change');\n }\n },\n keyup: function () {\n $span.html($el.find(\":selected\").html());\n }\n });\n noSelect($span, options);\n return {\n remove: function () {\n // Remove sibling span\n $span.remove();\n\n // Unwrap parent div\n $el.unwrap().unbind(options.eventNamespace);\n return $el;\n },\n update: function () {\n if (options.selectAutoWidth) {\n // Easier to remove and reapply formatting\n $.uniform.restore($el);\n $el.uniform(options);\n } else {\n classClearStandard($div, options);\n\n // Reset current selected text\n $el[0].selectedIndex = $el[0].selectedIndex; // Force IE to have a \":selected\" option (if the field was reset for example)\n $span.html($el.find(\":selected\").html());\n classUpdateDisabled($div, $el, options);\n }\n }\n };\n }\n },\n {\n // Select lists - multiselect lists only\n match: function ($el) {\n return !!($el.is(\"select\") && isMultiselect($el));\n },\n apply: function ($el, options) {\n var $wrapper;\n\n $el.addClass(options.selectMultiClass);\n $wrapper = wrapWithWrapperClass($el, options);\n bindUi($el, $el, options);\n\n return {\n remove: function () {\n $el.removeClass(options.selectMultiClass);\n\n if ($wrapper) {\n $el.unwrap();\n }\n },\n update: returnFalse\n };\n }\n },\n {\n // Textareas\n match: function ($el) {\n return $el.is(\"textarea\");\n },\n apply: function ($el, options) {\n var $wrapper;\n\n $el.addClass(options.textareaClass);\n $wrapper = wrapWithWrapperClass($el, options);\n bindUi($el, $el, options);\n\n return {\n remove: function () {\n $el.removeClass(options.textareaClass);\n\n if ($wrapper) {\n $el.unwrap();\n }\n },\n update: returnFalse\n };\n }\n }\n ];\n\n // IE6 can't be styled - can't set opacity on select\n if (isMsie() && !isMsieSevenOrNewer()) {\n allowStyling = false;\n }\n\n $.uniform = {\n // Default options that can be overridden globally or when uniformed\n // globally: $.uniform.defaults.fileButtonHtml = \"Pick A File\";\n // on uniform: $('input').uniform({fileButtonHtml: \"Pick a File\"});\n defaults: {\n activeClass: \"active\",\n autoHide: true,\n buttonClass: \"button\",\n checkboxClass: \"checker\",\n checkedClass: \"checked\",\n disabledClass: \"disabled\",\n eventNamespace: \".uniform\",\n fileButtonClass: \"action\",\n fileButtonHtml: \"Choose File\",\n filesButtonHtml: \"Choose Files\",\n fileClass: \"uploader\",\n fileDefaultHtml: \"No file selected\",\n filenameClass: \"filename\",\n focusClass: \"focus\",\n hoverClass: \"hover\",\n idPrefix: \"uniform\",\n inputAddTypeAsClass: true,\n inputClass: \"uniform-input\",\n radioClass: \"radio\",\n resetDefaultHtml: \"Reset\",\n resetSelector: false, // We'll use our own function when you don't specify one\n selectAutoWidth: true,\n selectClass: \"selector\",\n selectMultiClass: \"uniform-multiselect\",\n submitDefaultHtml: \"Submit\", // Only text allowed\n textareaClass: \"uniform\",\n useID: true,\n wrapperClass: null\n },\n\n // All uniformed elements - DOM objects\n elements: []\n };\n\n $.fn.uniform = function (options) {\n var el = this;\n options = $.extend({}, $.uniform.defaults, options);\n\n // If we are in high contrast mode, do not allow styling\n if (!highContrastTest) {\n highContrastTest = true;\n\n if (highContrast()) {\n allowStyling = false;\n }\n }\n\n // Only uniform on browsers that work\n if (!allowStyling) {\n return this;\n }\n\n // Code for specifying a reset button\n if (options.resetSelector) {\n $(options.resetSelector).mouseup(function () {\n wind.setTimeout(function () {\n $.uniform.update(el);\n }, 10);\n });\n }\n\n return this.each(function () {\n var $el = $(this), i, handler, callbacks;\n\n // Avoid uniforming elements already uniformed - just update\n if ($el.data(\"uniformed\")) {\n $.uniform.update($el);\n return;\n }\n\n // See if we have any handler for this type of element\n for (i = 0; i < uniformHandlers.length; i = i + 1) {\n handler = uniformHandlers[i];\n\n if (handler.match($el, options)) {\n callbacks = handler.apply($el, options);\n $el.data(\"uniformed\", callbacks);\n\n // Store element in our global array\n $.uniform.elements.push($el.get(0));\n return;\n }\n }\n\n // Could not style this element\n });\n };\n\n $.uniform.restore = $.fn.uniform.restore = function (elem) {\n if (elem === undef) {\n elem = $.uniform.elements;\n }\n\n $(elem).each(function () {\n var $el = $(this), index, elementData;\n elementData = $el.data(\"uniformed\");\n\n // Skip elements that are not uniformed\n if (!elementData) {\n return;\n }\n\n // Unbind events, remove additional markup that was added\n elementData.remove();\n\n // Remove item from list of uniformed elements\n index = $.inArray(this, $.uniform.elements);\n\n if (index >= 0) {\n $.uniform.elements.splice(index, 1);\n }\n\n $el.removeData(\"uniformed\");\n });\n };\n\n $.uniform.update = $.fn.uniform.update = function (elem) {\n if (elem === undef) {\n elem = $.uniform.elements;\n }\n\n $(elem).each(function () {\n var $el = $(this), elementData;\n elementData = $el.data(\"uniformed\");\n\n // Skip elements that are not uniformed\n if (!elementData) {\n return;\n }\n\n elementData.update($el, elementData.options);\n });\n };\n}(this, $));\n","/* ------------------------------------------------------------------------------\n*\n* # Bootstrap multiselect\n*\n* Specific JS code additions for form_multiselect.html page\n*\n* Version: 1.1\n* Latest update: Oct 20, 2015\n*\n* ---------------------------------------------------------------------------- */\nimport $ from 'jquery';\nimport 'theme/js/plugins/forms/selects/bootstrap_multiselect';\nimport 'theme/js/plugins/forms/styling/uniform.js';\n\nexport const initMultiSelect = () => {\n\n$(function() {\n\n\n // Basic examples\n // ------------------------------\n\n // Basic initialization\n $('.multiselect').multiselect({\n onChange: function() {\n $.uniform.update();\n }\n });\n\n\n // Limit options number\n $('.multiselect-number').multiselect({\n numberDisplayed: 1\n });\n\n\n // Custom empty text\n $('.multiselect-nonselected-text').multiselect({\n nonSelectedText: 'Please choose'\n });\n\n\n // Select All option\n $('.multiselect-select-all').multiselect({\n includeSelectAllOption: true,\n onSelectAll: function() {\n $.uniform.update();\n }\n });\n\n\n // Enable filtering\n $('.multiselect-filtering').multiselect('destroy').multiselect({\n enableFiltering: true,\n enableCaseInsensitiveFiltering: true,\n templates: {\n filter: '
\n >\n );\n};\n\nexport default Container;\n","import React from \"react\";\nimport Form from \"library/basic/forms/Form\";\nimport useFormInit from \"./useFormInit\";\n\n/**\n * Common template for public pages\n *\n * @param formAction\n * @param formDefinitionAction\n * @param mainForm\n * @param isRequestFailed - Form submit failed with an error\n * @param title - Ex: Forgotten Your Password\n * @param subTitle - Ex: We will send you an email with instructions on how to reset your password.\n * @param errorMessage - Ex: We could not send forgot password request. Please try again.\n * @returns {*}\n * @constructor\n */\nconst PublicForm = ({formAction, formDefinitionAction, mainForm, title, subTitle, isRequestFailed, errorMessage}) => {\n const {fetchFormData} = useFormInit({formAction});\n\n return (\n <>\n
\n
\n
\n
\n
\n
\n
\n
\n
\n {title}\n {subTitle}\n
\n
\n {isRequestFailed &&
\n Sorry! \n {errorMessage}\n
}\n\n \n
\n\n \n\n
\n\n
\n\n
\n\n
\n\n >\n );\n }\n;\n\nexport default PublicForm;\n","import {React, $, useEffect, useState} from 'library/base/baseContainerImports';\n\nimport Form from \"library/basic/forms/Form\";\nimport useFormInit from \"./useFormInit\";\n\n/**\n * Common template for public pages\n *\n * @param formAction\n * @param formDefinitionAction\n * @param mainForm\n * @param isRequestFailed - Form submit failed with an error\n * @param title - Ex: Forgotten Your Password\n * @param subTitle - Ex: We will send you an email with instructions on how to reset your password.\n * @param errorMessage - Ex: We could not send forgot password request. Please try again.\n * @returns {*}\n * @constructor\n */\n\n\nconst PublicBlank = ({content}) => {\n\n useEffect( () => {\n initTemplate();\n }, []);\n\n const initTemplate = () => {\n $(\".navbar\").hide();\n }\n\n return (\n <>\n
}>\n \n \n \n >\n );\n};\n\nexport default DualSideBarContent;\n","import {\n React, CompanyRoutes, useEffect\n} from 'library/base/baseContainerImports';\nimport $ from 'jquery';\nimport {useHistory} from \"react-router-dom\";\nimport {hideMenuMobile} from \"../topBar/TopBar\";\nimport {useSelector} from \"react-redux\";\n\n/**\n * This side bar lists the menu with paths only, no attachment of corresponding components here\n * In Content page, the list of cases in a switch-case determines which component should be rendered\n *\n * @returns {*}\n * @constructor\n */\nconst SideBar = () => {\n const sideConfig = useSelector(state => state.userMeta.side);\n const username = useSelector(state => state.userMeta.name);\n const companyLogo = useSelector(state => state.userMeta.meta.logo);\n const role = useSelector(state => state.userMeta?.meta?.role);\n const myAccountUrl = role === 'student' ? \"#\" : CompanyRoutes.ADMIN.MY_ACCOUNT.path;\n const logoClass = (companyLogo == '' ? ' hide' : '');\n\n return (\n
\n\n );\n};\n\nexport default StudentTopBar;\n\nexport const hideMenuMobile = () => {\n const htmlBody = $('body');\n const mobileMenuMainClass = 'sidebar-mobile-main';\n const mobileMenuIndicatorClass = 'sidebar-xs-indicator';\n const isMobile = $(window).width() < 769;\n\n if (isMobile) {\n if (htmlBody.attr('class').includes(mobileMenuMainClass)) {\n htmlBody.removeClass(mobileMenuMainClass);\n }\n if (htmlBody.attr('class').includes(mobileMenuIndicatorClass)) {\n htmlBody.removeClass(mobileMenuIndicatorClass);\n }\n }\n};\n","import {\n React, useEffect\n} from 'library/base/baseContainerImports';\nimport $ from 'jquery';\nimport {useHistory} from \"react-router-dom\";\nimport {hideMenuMobile} from \"../topBar/TopBar\";\nimport {useSelector} from \"react-redux\";\nimport {initApp} from \"../../../theme/js/core/app\";\n\n/**\n * This sidebar lists the menu with paths only, no attachment of corresponding components here\n * In Content page, the list of cases in a switch-case determines which component should be rendered\n *\n * @returns {*}\n * @constructor\n */\nconst StudentSidBar = () => {\n const sideConfig = useSelector(state => state.userMeta.side);\n const username = useSelector(state => state.userMeta.name);\n const companyLogo = useSelector(state => state.userMeta.meta.logo);\n const logoClass = (companyLogo == '' ? ' hide' : '');\n\n return (\n
\n
\n\n
\n
\n
\n
\n
\n {username}\n
\n
\n
\n
\n
\n
\n
\n {displayRouteMenu(sideConfig)}\n
\n
\n
\n\n
\n
\n );\n};\n\nexport default StudentSidBar;\n\n/**\n * Render a nested hierarchy of route configs with unknown depth/breadth\n */\nfunction displayRouteMenu(routes) {\n /**\n * Render a single route as a list item link to the config's pathname\n */\n\n // loop through the array of routes and generate an unordered list\n return (\n <>\n {routes.map(route => {\n // if this route has sub-routes, then show the ROOT as a list item and recursively render a nested list of route links\n if (route.routes) {\n return (\n \n \n {displayRouteMenu(route.routes)}\n \n );\n }\n\n // no nested routes, so just render a single route\n return ;\n })}\n >\n );\n}\n\nexport const SingleRoute = ({route}) => {\n const history = useHistory();\n\n useEffect(() => {\n $(\"ul.sidebar-navi\").on(\"click\", \"li\", function () {\n $(\"ul.sidebar-navi li\").removeClass(\"active\");\n $(this).addClass(\"active\");\n });\n\n activateCurrentMenu();\n }, []);\n\n const activateCurrentMenu = () => {\n const current = window.location.pathname;\n\n $('ul.sidebar-navi li a').each(function(){\n const $this = $(this);\n if($this.attr('href') === current){\n $this.parent('li').addClass('active');\n }\n })\n };\n\n const navigateToPath = (e, path) => {\n e.preventDefault();\n\n // Below method only executed in Mobile\n hideMenuMobile();\n\n if (path) {\n history.push(path);\n }\n };\n\n if (route.href || route.path) {\n return (\n
We are pleased to let you know that a space has become available. You can accept\n or decline the spot by following the links below.
\n
\n
\n \n \n
\n
\n )}\n >\n )}\n
\n
\n );\n}\n\nexport default EventConfirmInvitation;\n","import React from 'react';\nimport Signup from '../../modules/Admin/User/Signup/Signup';\nimport Login from '../../modules/Admin/User/Login/login';\nimport ForgottenPassword from 'modules/Admin/User/ForgottenPassword/ForgottenPassword'\nimport ResetPassword from 'modules/Admin/User/ResetPassword/ResetPassword'\nimport ActivateAccount from 'modules/Admin/User/ActivateAccount/ActivateAccount'\nimport EventBooking from 'modules/Booking/EventBooking'\nimport Checkout from 'modules/Booking/Checkout'\nimport PublicTopBar from \"../layoutComponents/PublicTopBar\";\nimport {Route, Switch} from \"react-router\";\nimport BirthdayPartyBooking from '../../modules/Booking/BirthdayPartyBooking'\nimport BirthdayPartyCheckout from '../../modules/Booking/BirthdayPartyCheckout'\nimport PartyWaiver from '../../modules/Booking/PartyWaiver'\nimport EventWaiver from '../../modules/Booking/EventWaiver'\nimport UpdatePartyGuest from '../../modules/Booking/UpdarePartyGuest'\nimport EventConfirmInvitation from '../../modules/Booking/EventConfirmInvitation'\n\n/**\n * This layout will load Public pages\n */\nconst PublicContainer = () => {\n return (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n >\n );\n};\n\nexport default PublicContainer;\n","import {\n React, useLocation, CompanyRoutes, useEffect\n} from 'library/base/baseContainerImports';\nimport $ from \"jquery\";\nimport {useDispatch, useSelector} from \"react-redux\";\nimport useInitialize from \"../library/hooks/useInitialize\";\nimport '../css/cssImports';\nimport LayoutContainer from \"../layouts/LayoutContainer\";\nimport PublicContainer from \"../layouts/public/PublicContainer\";\nimport {authSuccess} from \"../modules/Admin/User/Login/store/actions\";\nimport useAjaxSetup from \"../library/hooks/useAjaxSetup\";\n\nconst App = () => {\n const initSuccess = useInitialize();\n const userToken = useSelector(state => state.auth.token);\n const dispatch = useDispatch();\n const {prepareAjaxSetup} = useAjaxSetup();\n\n /**\n * This is where init functions are called - once per application load\n */\n useEffect(() => {\n console.log(initSuccess);\n\n setAjaxDefaults();\n }, []);\n\n const publishLayoutUrls = [\n \"/booking\",\n \"/booking/checkout\",\n \"/event/waiver\",\n \"/birthday-party/booking\",\n \"/birthday-party/booking/checkout\",\n \"/birthday-party/waiver\",\n \"/event-booking/waiver\",\n \"/birthday-party/update-guest\",\n \"/events/invitation/confirm\",\n ];\n\n const signupLayoutUrls = [\n CompanyRoutes.ADMIN.COMPANY_SIGNUP.path ,\n CompanyRoutes.ADMIN.COMPANY_SIGNUP.path + \"/\" ,\n CompanyRoutes.ADMIN.COMPANY_SIGNUP.FINAL.path,\n CompanyRoutes.ADMIN.COMPANY_SIGNUP.FINAL.path + \"/\",\n CompanyRoutes.ADMIN.COMPANY_SIGNUP.CANCEL.path,\n CompanyRoutes.ADMIN.COMPANY_SIGNUP.CANCEL.path + \"/\",\n CompanyRoutes.ADMIN.PAYMENT_INVOICE.path,\n CompanyRoutes.ADMIN.PAYMENT_INVOICE.path + \"/\" ,\n CompanyRoutes.ADMIN.STUDENTS.SIGNUP.path,\n CompanyRoutes.ADMIN.STUDENTS.SIGNUP.path + \"/\",\n CompanyRoutes.ADMIN.STUDENTS.LOGIN.path,\n CompanyRoutes.ADMIN.STUDENTS.LOGIN.path + \"/\",\n CompanyRoutes.ADMIN.STUDENTS.FORGOTTEN_PASSWORD.path,\n CompanyRoutes.ADMIN.STUDENTS.FORGOTTEN_PASSWORD.path + \"/\",\n CompanyRoutes.ADMIN.STUDENTS.REQUEST_FORGOTTEN_PASSWORD.path,\n CompanyRoutes.ADMIN.STUDENTS.REQUEST_FORGOTTEN_PASSWORD.path + \"/\",\n ];\n const location = useLocation();\n\n const isLoggedIn = () => {\n if(publishLayoutUrls.indexOf(location.pathname) !== -1) {\n return false;\n }\n\n if(signupLayoutUrls.indexOf(location.pathname) !== -1) {\n return true;\n }\n return userToken;\n };\n\n const setAjaxDefaults = () => {\n prepareAjaxSetup();\n\n $(document).ajaxSuccess(function (event, request) {\n const newToken = request.getResponseHeader('token');\n if (newToken) {\n dispatch(authSuccess(newToken));\n }\n });\n };\n\n return (\n <>\n {isLoggedIn() ? : }\n >\n );\n};\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import {\n USER_META_SUCCESS,\n USER_META_FAIL,\n USER_META_PENDING,\n} from './constants';\n\nconst initialState = {\n name: '',\n meta: {},\n side: [],\n top: [],\n isUserMetaPending: false\n};\n\nexport default (state = initialState, action) => {\n switch (action.type) {\n case USER_META_SUCCESS:\n return {\n ...state,\n isAuthPending: false,\n name: action.metaData.name,\n meta: action.metaData.meta,\n side: action.metaData.navigation.side,\n top: action.metaData.navigation.top,\n };\n case USER_META_FAIL:\n return {\n ...state,\n isAuthPending: false,\n };\n\n case USER_META_PENDING:\n return {\n ...state,\n isAuthPending: true,\n };\n\n default:\n return state;\n }\n};\n","import {createStore} from 'redux';\nimport {persistStore, persistReducer} from 'redux-persist';\nimport storage from 'redux-persist/lib/storage';\n\nimport rootReducer from './reducer';\n\nconst persistConfig = {\n key: 'root',\n storage,\n};\n\nexport const initialState = {\n token: '',\n isAuthPending: false\n};\n\nconst persistedReducer = persistReducer(persistConfig, rootReducer);\n\n/**\n * Persisted storage gets merged when a page refresh occurs\n *\n * @returns {{store: any, persistor: Persistor}}\n */\nexport default () => {\n let store = createStore(persistedReducer, initialState);\n let persistor = persistStore(store);\n return {store, persistor}\n}\n","import authReducer from '../modules/Admin/User/Login/store/reducer';\nimport userMetaReducer from '../layouts/layoutComponents/sidebar/store/reducer'\n\nexport default function rootReducer(state, action) {\n return {\n auth: authReducer(state.auth, action),\n userMeta: userMetaReducer(state.userMeta, action)\n }\n}\n","/* eslint-disable */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './app/App';\nimport * as serviceWorker from './serviceWorker';\nimport {BrowserRouter} from \"react-router-dom\";\nimport {Provider} from 'react-redux';\nimport store from './redux/store';\nimport {PersistGate} from 'redux-persist/integration/react';\n\nReactDOM.render(\n \n \n \n \n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","import React, {useEffect, useState} from 'react';\nimport {useAppRoutes} from \"../../routes/routes\";\nimport {useLocation} from \"react-router\";\nimport each from 'foreach-array';\n\n/**\n * How this works: checks the current URL and get route object corresponds to that.\n * Refers `route.pageHeaderLinks` array to build up middle links\n */\nconst PageHeader = ({hideBreadCrumb = \"\"}) => {\n const {getRoutes} = useAppRoutes();\n const ROUTES = getRoutes();\n const location = useLocation();\n const [isMiddleLinksAvailable, setIsMiddleLinksAvailable] = useState(false);\n const [title, setTitle] = useState('');\n let bradCrumbClass = (hideBreadCrumb === \"\" ? '' : 'hide');\n\n useEffect(() => {\n each(ROUTES, (route) => {\n if (route.path === location.pathname || (route.path + '/') === location.pathname || route.path === (location.pathname + '/')) {\n setIsMiddleLinksAvailable(true);\n setTitle(route.title);\n }\n });\n\n }, [title, isMiddleLinksAvailable]);\n\n const getMiddleLinks = () => {\n const middleLinkArray = [];\n\n each(ROUTES, (route) => {\n if ((location.pathname.includes(route.path) || (route.path + '/') === location.pathname) && route.pageHeaderLinks && route.path !== location.pathname) {\n each(route.pageHeaderLinks, (link) => {\n middleLinkArray[middleLinkArray.length] =