{"version":3,"file":"miniSearchDirectClient.min.js","sources":["miniSearchDirectClient.min.js"],"sourcesContent":["// Polyfills for IE\r\n// Version 1.3\r\n// - string & array: includes\r\n// - endsWith, startsWith, find\r\n// - indexOf\r\n\r\nif (!String.prototype.includes) {\r\n String.prototype.includes = function (search, start) {\r\n 'use strict';\r\n if (typeof start !== 'number') {\r\n start = 0;\r\n }\r\n\r\n if (start + search.length > this.length) {\r\n return false;\r\n } else {\r\n return this.indexOf(search, start) !== -1;\r\n }\r\n };\r\n}\r\n\r\nif (!String.prototype.endsWith) {\r\n String.prototype.endsWith = function (searchString, position) {\r\n var subjectString = this.toString();\r\n if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {\r\n position = subjectString.length;\r\n }\r\n position -= searchString.length;\r\n var lastIndex = subjectString.lastIndexOf(searchString, position);\r\n return lastIndex !== -1 && lastIndex === position;\r\n };\r\n}\r\n\r\n/*! https://mths.be/startswith v0.2.0 by @mathias */\r\nif (!String.prototype.startsWith) {\r\n (function () {\r\n 'use strict'; // needed to support `apply`/`call` with `undefined`/`null`\r\n var defineProperty = (function () {\r\n // IE 8 only supports `Object.defineProperty` on DOM elements\r\n try {\r\n var object = {};\r\n var $defineProperty = Object.defineProperty;\r\n var result = $defineProperty(object, object, object) && $defineProperty;\r\n } catch (error) { }\r\n return result;\r\n }());\r\n var toString = {}.toString;\r\n var startsWith = function (search) {\r\n if (this == null) {\r\n throw TypeError();\r\n }\r\n var string = String(this);\r\n if (search && toString.call(search) == '[object RegExp]') {\r\n throw TypeError();\r\n }\r\n var stringLength = string.length;\r\n var searchString = String(search);\r\n var searchLength = searchString.length;\r\n var position = arguments.length > 1 ? arguments[1] : undefined;\r\n // `ToInteger`\r\n var pos = position ? Number(position) : 0;\r\n if (pos != pos) { // better `isNaN`\r\n pos = 0;\r\n }\r\n var start = Math.min(Math.max(pos, 0), stringLength);\r\n // Avoid the `indexOf` call if no match is possible\r\n if (searchLength + start > stringLength) {\r\n return false;\r\n }\r\n var index = -1;\r\n while (++index < searchLength) {\r\n if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n if (defineProperty) {\r\n defineProperty(String.prototype, 'startsWith', {\r\n 'value': startsWith,\r\n 'configurable': true,\r\n 'writable': true\r\n });\r\n } else {\r\n String.prototype.startsWith = startsWith;\r\n }\r\n }());\r\n}\r\n\r\n// https://tc39.github.io/ecma262/#sec-array.prototype.find\r\nif (!Array.prototype.find) {\r\n Object.defineProperty(Array.prototype, 'find', {\r\n value: function (predicate) {\r\n // 1. Let O be ? ToObject(this value).\r\n if (this == null) {\r\n throw new TypeError('\"this\" is null or not defined');\r\n }\r\n\r\n var o = Object(this);\r\n\r\n // 2. Let len be ? ToLength(? Get(O, \"length\")).\r\n var len = o.length >>> 0;\r\n\r\n // 3. If IsCallable(predicate) is false, throw a TypeError exception.\r\n if (typeof predicate !== 'function') {\r\n throw new TypeError('predicate must be a function');\r\n }\r\n\r\n // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.\r\n var thisArg = arguments[1];\r\n\r\n // 5. Let k be 0.\r\n var k = 0;\r\n\r\n // 6. Repeat, while k < len\r\n while (k < len) {\r\n // a. Let Pk be ! ToString(k).\r\n // b. Let kValue be ? Get(O, Pk).\r\n // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).\r\n // d. If testResult is true, return kValue.\r\n var kValue = o[k];\r\n if (predicate.call(thisArg, kValue, k, o)) {\r\n return kValue;\r\n }\r\n // e. Increase k by 1.\r\n k++;\r\n }\r\n\r\n // 7. Return undefined.\r\n return undefined;\r\n }\r\n });\r\n}\r\n\r\n// Production steps of ECMA-262, Edition 5, 15.4.4.14\r\n// Reference: http://es5.github.io/#x15.4.4.14\r\nif (!Array.prototype.indexOf) {\r\n Array.prototype.indexOf = function (searchElement, fromIndex) {\r\n\r\n var k;\r\n\r\n // 1. Let o be the result of calling ToObject passing\r\n // the this value as the argument.\r\n if (this == null) {\r\n throw new TypeError('\"this\" is null or not defined');\r\n }\r\n\r\n var o = Object(this);\r\n\r\n // 2. Let lenValue be the result of calling the Get\r\n // internal method of o with the argument \"length\".\r\n // 3. Let len be ToUint32(lenValue).\r\n var len = o.length >>> 0;\r\n\r\n // 4. If len is 0, return -1.\r\n if (len === 0) {\r\n return -1;\r\n }\r\n\r\n // 5. If argument fromIndex was passed let n be\r\n // ToInteger(fromIndex); else let n be 0.\r\n var n = fromIndex | 0;\r\n\r\n // 6. If n >= len, return -1.\r\n if (n >= len) {\r\n return -1;\r\n }\r\n\r\n // 7. If n >= 0, then Let k be n.\r\n // 8. Else, n<0, Let k be len - abs(n).\r\n // If k is less than 0, then let k be 0.\r\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\r\n\r\n // 9. Repeat, while k < len\r\n while (k < len) {\r\n // a. Let Pk be ToString(k).\r\n // This is implicit for LHS operands of the in operator\r\n // b. Let kPresent be the result of calling the\r\n // HasProperty internal method of o with argument Pk.\r\n // This step can be combined with c\r\n // c. If kPresent is true, then\r\n // i. Let elementK be the result of calling the Get\r\n // internal method of o with the argument ToString(k).\r\n // ii. Let same be the result of applying the\r\n // Strict Equality Comparison Algorithm to\r\n // searchElement and elementK.\r\n // iii. If same is true, return k.\r\n if (k in o && o[k] === searchElement) {\r\n return k;\r\n }\r\n k++;\r\n }\r\n return -1;\r\n };\r\n}\r\n\r\n// https://tc39.github.io/ecma262/#sec-array.prototype.includes\r\nif (!Array.prototype.includes) {\r\n Object.defineProperty(Array.prototype, 'includes', {\r\n value: function (valueToFind, fromIndex) {\r\n\r\n if (this == null) {\r\n throw new TypeError('\"this\" is null or not defined');\r\n }\r\n\r\n // 1. Let O be ? ToObject(this value).\r\n var o = Object(this);\r\n\r\n // 2. Let len be ? ToLength(? Get(O, \"length\")).\r\n var len = o.length >>> 0;\r\n\r\n // 3. If len is 0, return false.\r\n if (len === 0) {\r\n return false;\r\n }\r\n\r\n // 4. Let n be ? ToInteger(fromIndex).\r\n // (If fromIndex is undefined, this step produces the value 0.)\r\n var n = fromIndex | 0;\r\n\r\n // 5. If n ≥ 0, then\r\n // a. Let k be n.\r\n // 6. Else n < 0,\r\n // a. Let k be len + n.\r\n // b. If k < 0, let k be 0.\r\n var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\r\n\r\n function sameValueZero(x, y) {\r\n return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));\r\n }\r\n\r\n // 7. Repeat, while k < len\r\n while (k < len) {\r\n // a. Let elementK be the result of ? Get(O, ! ToString(k)).\r\n // b. If SameValueZero(valueToFind, elementK) is true, return true.\r\n if (sameValueZero(o[k], valueToFind)) {\r\n return true;\r\n }\r\n // c. Increase k by 1. \r\n k++;\r\n }\r\n\r\n // 8. Return false\r\n return false;\r\n }\r\n });\r\n}\n// File: iframeServices.js\r\n// Version: 2.0.3 - 2017-06-20\r\n// Description: Provides services for client and server iframe widgets\r\n// 2.0.1 - 2017-04-13 - Add syncCallback\r\n// - getStringFromAssocList - use setter only if key in list\r\n// - Add isServerReady()\r\n// 2.0.2 - 2017-05-21 - Add (zero) iframe frameBorder\r\n// 2.0.3 - 2017-06-20 - RM - Use protocol; deal with relative protocol in getTargetOrigin\r\n// 2.0.4 - 2017-08-10 - RM - Add getDateFromAssocList() to parse dates passed from server\r\n//\r\nfunction iframeServices($, inputOptions) {\r\n\r\n ifsSelf = this;\r\n\r\n this.options = {\r\n // Console related stiff\r\n myId: 'ID', // give host and iframe pagess different valied - CLIENT, SERVER?\r\n logToConsole: false,\r\n warnToConsole: false,\r\n infoToConsole: false,\r\n // The Id prefixed to messages so that the participants know messages are for them\r\n // Some other component - e.g. resizer - might be sharing the iframe.\r\n msgId: '[]',\r\n primarySplit: \"&\",\r\n secondarySplit: \"=\",\r\n\r\n syncCode: 'sync', // []sync=n .... return []sync=done\r\n syncPulse: 200, // milliseconds\r\n syncCallback: undefined,\r\n syncMax: 0, // no max, continue forever if not done\r\n syncTrace: false,\r\n\r\n isClient: false, // Set to true for client\r\n iframe: undefined,\r\n protocol: \"\",\r\n\r\n };\r\n\r\n // Run on the client hosting the iframe\r\n var serverReady = false;\r\n var syncTimer;\r\n var syncCount = 0;\r\n this.isServerReady = function () {\r\n return serverReady;\r\n }\r\n this.sendSync = function() {\r\n var ops = ifsSelf.options;\r\n syncCount++;\r\n if (ops.syncMax > 0 && syncCount > ops.syncMax) {\r\n return false;\r\n }\r\n if (ifsSelf.options.syncTrace) {\r\n ifsSelf.info(\"Sending \" + syncCount);\r\n } \r\n ifsSelf.sendMessageToIframe(\"sync=\" + syncCount\r\n + \"&info=\" + ops.infoToConsole\r\n + \"&warn=\" + ops.warnToConsole\r\n + \"&log=\" + ops.logToConsole);\r\n\r\n return true;\r\n }\r\n this.setSyncTimeout = function () {\r\n if (!ifsSelf.sendSync()) {\r\n return; // Exceeded syncMax\r\n }\r\n clearTimeout(syncTimer);\r\n syncTimer = setTimeout(function () {\r\n if (!serverReady) {\r\n ifsSelf.setSyncTimeout();\r\n }\r\n }, ifsSelf.options.syncPulse);\r\n }\r\n this.awaitServerReady = function () {\r\n ifsSelf.setSyncTimeout(); \r\n }\r\n this.checkSync = function(list) {\r\n ifsSelf.getStringFromAssocList(list, {\r\n key: 'sync',\r\n setter: function urlSetter(sync) {\r\n ifsSelf.info(\"Sync received: \" + sync);\r\n if (sync === \"done\") { // client\r\n ifsSelf.getStringFromAssocList(list, {\r\n key: 'syncTo',\r\n setter: function syncTo(syncTo) {\r\n ifsSelf.info(\"syncTo=\" + syncTo);\r\n }\r\n });\r\n if (ifsSelf.options.syncCallback !== undefined) {\r\n ifsSelf.options.syncCallback();\r\n }\r\n } else { // server - send sync=done\r\n ifsSelf.sendMessageToParent(\"sync=done&syncTo=\" + sync);\r\n }\r\n serverReady = true;\r\n }\r\n });\r\n }\r\n\r\n\r\n if ($ === undefined) {\r\n $ = {};\r\n $.extend = Object.assign\r\n }\r\n\r\n\r\n if (this.options !== inputOptions) {\r\n this.options = $.extend({}, this.options, inputOptions);\r\n }\r\n\r\n this.log = function (msg) {\r\n if (this.options.logToConsole && ('object' === typeof window.console)) {\r\n console.log(this.options.myId + ' ' + msg);\r\n }\r\n };\r\n\r\n this.warn = function (msg) {\r\n if (this.options.warnToConsole && ('object' === typeof window.console)) {\r\n console.warn(this.options.myId + ' ' + msg);\r\n }\r\n };\r\n\r\n this.info = function (msg) {\r\n if (this.options.infoToConsole && ('object' === typeof window.console)) {\r\n console.info(this.options.myId + ' ' + msg);\r\n }\r\n };\r\n\r\n\r\n this.getTargetOrigin = function (remoteHost) {\r\n if (remoteHost.substring(0, 2) === \"//\") {\r\n var protocol = window.location.protocol;\r\n protocol = (inputOptions.protocol.length > 0) ? inputOptions.protocol : protocol;\r\n return protocol + remoteHost;\r\n }\r\n return ('' === remoteHost || 'file://' === remoteHost) ? '*' : remoteHost;\r\n };\r\n\r\n this.addEventListener = function (obj, evt, func) {\r\n /* istanbul ignore else */ // Not testable in PhantonJS\r\n if ('addEventListener' in window) {\r\n obj.addEventListener(evt, func, false);\r\n } else if ('attachEvent' in window) {//IE\r\n obj.attachEvent('on' + evt, func);\r\n }\r\n };\r\n\r\n this.removeEventListener = function (el, evt, func) {\r\n /* istanbul ignore else */ // Not testable in phantonJS\r\n if ('removeEventListener' in window) {\r\n el.removeEventListener(evt, func, false);\r\n } else if ('detachEvent' in window) { //IE\r\n el.detachEvent('on' + evt, func);\r\n }\r\n };\r\n\r\n this.sendMessageToIframe = function (msg, withInfo) { // called on client\r\n if (withInfo !== undefined) {\r\n this.info(msg);\r\n }\r\n // will have the options.msgId & options.target after building iframe\r\n this.options.iframe.contentWindow.postMessage(this.options.msgId + msg, this.options.target);\r\n };\r\n this.sendMessageToParent = function (msg, withInfo) { // called on server\r\n if (withInfo !== undefined) {\r\n this.info(msg);\r\n }\r\n window.parent.postMessage(this.options.msgId + msg, '*');\r\n };\r\n\r\n this.getParser = function (value) { // Use an anchor as a parser\r\n var parser = document.createElement('a');\r\n parser.href = value;\r\n return parser;\r\n };\r\n\r\n this.isValidParentUrl = function (value) {\r\n var currentValue = window.parent.location;\r\n var current = this.getParser(currentValue);\r\n var passed = this.getParser(value);\r\n // same host but not the same url\r\n return value != currentValue && current.host == passed.host;\r\n };\r\n\r\n this.isMessageForUs = function (event) {\r\n return this.options.msgId === ('' + event.data).substr(0, this.options.msgId.length); //''+ Protects against non-string messages\r\n };\r\n\r\n this.getMessageData = function (event) {\r\n if (this.isMessageForUs(event)) {\r\n var messageData = event.data.substring(this.options.msgId.length);\r\n return messageData;\r\n }\r\n return \"\";\r\n };\r\n\r\n this.messageListener = function (func) {\r\n\r\n ifsSelf.addEventListener(window, 'message', function receiver(event) {\r\n\r\n var result = ifsSelf.getAssocArrayFromMessage(event, true);\r\n func(result);\r\n \r\n });\r\n };\r\n\r\n // Split a message of multiple pairs, and return an assoc array\r\n // primarySplit: \"&\"\r\n // primarySplit: \"=\"\r\n this.getAssocArray = function (data, primarySplit, secondarySplit) {\r\n if (primarySplit === undefined) {\r\n primarySplit = this.options.primarySplit;\r\n }\r\n if (secondarySplit === undefined) {\r\n secondarySplit = this.options.secondarySplit;\r\n }\r\n var list = [];\r\n var sVariables = data.split(primarySplit);\r\n for (var i = 0; i < sVariables.length; i++) {\r\n var sParameter = sVariables[i].split(secondarySplit);\r\n list[sParameter[0]] = sParameter[1];\r\n }\r\n return list;\r\n };\r\n\r\n this.getAssocArrayFromMessage = function (event, checkSync) {\r\n\r\n var primarySplit = this.options.primarySplit;\r\n var secondarySplit = this.options.secondarySplit;\r\n var list = [];\r\n\r\n if (this.isMessageForUs(event)) {\r\n\r\n var data = event.data.substring(this.options.msgId.length);\r\n \r\n var sVariables = data.split(primarySplit);\r\n for (var i = 0; i < sVariables.length; i++) {\r\n var sParameter = sVariables[i].split(secondarySplit);\r\n list[sParameter[0]] = sParameter[1];\r\n }\r\n\r\n if (checkSync && (!this.options.isClient || !serverReady)) {\r\n ifsSelf.checkSync(list); \r\n }\r\n\r\n return { hasList: true, list: list };\r\n }\r\n return { hasList: false, list: null };\r\n };\r\n\r\n // values = { key: \"to\", min: 1, max: 15, defaultValue: 0, setter: function(n) { something = n; } }\r\n this.getNumberFromAssocList = function (list, values) {\r\n var returnValue = 0;\r\n if (values === undefined || values.key === undefined) {\r\n // no default, no setter, so just return 0\r\n return returnValue;\r\n }\r\n returnValue = (values.defaultValue !== undefined) ? values.defaultValue : returnValue; \r\n \r\n if (values.key in list) {\r\n var value = list[values.key];\r\n if (!isNaN(value)) {\r\n var n = parseInt(value);\r\n if (values.min !== undefined && n < values.min) {\r\n n = returnValue; // i.e. defaultValue, or 0\r\n } else if (values.max !== undefined && n > values.max) {\r\n n = returnValue; // i.e. defaultValue, or 0\r\n } else {\r\n returnValue = n;\r\n }\r\n }\r\n }\r\n if (values.setter !== undefined) {\r\n values.setter(returnValue);\r\n }\r\n return returnValue;\r\n };\r\n\r\n // Get a date value from the list of passed in values\r\n this.getDateFromAssocList = function (list, values) {\r\n var returnValue = new Date();\r\n if (values === undefined || values.key === undefined) {\r\n // no default, no setter, so just return 0\r\n return returnValue;\r\n }\r\n returnValue = (values.defaultValue !== undefined) ? values.defaultValue : returnValue;\r\n\r\n if (values.key in list) {\r\n var value = list[values.key];\r\n returnValue = Date.parse(value);\r\n }\r\n if (values.setter !== undefined) {\r\n values.setter(returnValue);\r\n }\r\n return returnValue;\r\n };\r\n\r\n // values = { key: \"to\", defaultvalue: '', setter: function(value) { something = value; } }\r\n this.getStringFromAssocList = function (list, values) {\r\n if (values === undefined) {\r\n return '';\r\n }\r\n \r\n if(values.key === undefined) {\r\n // no default, no setter, so just return 0\r\n if (values.setter !== undefined) {\r\n values.setter('');\r\n }\r\n return '';\r\n }\r\n var returnValue = (values.defaultValue !== undefined)\r\n ? values.defaultValue : '';\r\n \r\n if (values.key in list) {\r\n returnValue = list[values.key];\r\n if (values.setter !== undefined) {\r\n values.setter(returnValue);\r\n }\r\n }\r\n \r\n return returnValue;\r\n };\r\n\r\n // The values.key contains the prefix of a set of keys\r\n // find all that match, extract the prefix, push onto subList & return subList\r\n this.getListFromAssocList = function (list, values) {\r\n var decode = false;\r\n if (values.decode !== undefined) {\r\n decode = values.decode;\r\n }\r\n var subList = [];\r\n Object.keys(list).forEach(function (key, index) {\r\n if (key.startsWith(values.key)) {\r\n subList.push({\r\n code: key.substring(values.key.length),\r\n value: decode ? decodeURIComponent(list[key]) : list[key]\r\n });\r\n }\r\n });\r\n \r\n return subList;\r\n }\r\n \r\n this.addIframe = function (wrapperId, iframeId, src, inputOptions) {\r\n\r\n var ops = {\r\n scrolling: 'no',\r\n display: '', // 'none'\r\n frameborder: 0,\r\n allowTransparency: true,\r\n width: 0,\r\n height: 0, \r\n }\r\n if (inputOptions !== undefined) {\r\n ops = Object.assign({}, ops, inputOptions);\r\n }\r\n\r\n var dest = document.getElementById(wrapperId);\r\n\r\n var iframe = document.createElement('iframe');\r\n if (ops.display !== '') {\r\n iframe.style.display = \"none\";\r\n }\r\n iframe.id = iframeId;\r\n iframe.src = src;\r\n iframe.scrolling = ops.scrolling;\r\n iframe.frameBorder = ops.frameborder;\r\n iframe.width = ops.width;\r\n if (ops.height !== 'auto') {\r\n iframe.height = ops.height;\r\n }\r\n iframe.allowTransparency = ops.allowTransparency;\r\n\r\n dest.appendChild(iframe);\r\n \r\n\r\n this.options.iframe = iframe;\r\n this.options.remoteHost = src.split('/').slice(0, 3).join('/');\r\n this.options.target = this.getTargetOrigin(this.options.remoteHost);\r\n\r\n return iframe;\r\n };\r\n};\r\n\n// File: domBuilder.js\r\n// Version: 2.0.0\r\n// Author: R Murphy\r\n// Requires: \r\n// - jQuery\r\n// - iframeServices-2.0.0.js\r\n// Description: Builds dom into a target\r\n// \r\nfunction domBuilder($, ifsInput, inputOptions) {\r\n\r\n var eventHandlers = [];\r\n\r\n var $currentParent;\r\n\r\n var ifs = ifsInput;\r\n\r\n var options = {\r\n ns: '',\r\n trace: false\r\n };\r\n\r\n if (inputOptions !== undefined) {\r\n options = $.extend({}, options, inputOptions)\r\n }\r\n\r\n // get namspace string to namespace the id/class etc.\r\n function getNsString(value) {\r\n return (options.ns.length > 0)\r\n ? value.replace(\"*\", options.ns) : value;\r\n }\r\n\r\n function buildClasses(ns, classes) {\r\n var classString = '';\r\n var nsClass =\r\n classes.forEach(function (c) {\r\n classString += getNsString(c) + ' ';\r\n });\r\n return classString.trim();\r\n }\r\n\r\n function addAttrs($target, ns, attrs) {\r\n attrs.forEach(function (attr) {\r\n $target.attr(attr.name, getNsString(attr.val));\r\n });\r\n return $target;\r\n }\r\n\r\n function addOptionRange(c) {\r\n for (var i = c.range[0]; i <= c.range[1]; i++) {\r\n $new = addAttrs($('<' + c.type + '>'), options.ns, c.attrs);\r\n $new.val(c.val.replace(\"*\", i + ''));\r\n $new.text(c.text.replace(\"*\", i + ''));\r\n $new.appendTo($currentParent);\r\n }\r\n }\r\n\r\n function addChild(c) {\r\n if (c.type === undefined) {\r\n ifs.warn(\"Missing type for element\");\r\n }\r\n if (c.type === 'event') {\r\n return;\r\n }\r\n\r\n if (options.trace) {\r\n ifs.info(c.id);\r\n }\r\n \r\n if (c.range !== undefined && c.range.length === 2 && c.type === 'option') {\r\n addOptionRange(c);\r\n return;\r\n }\r\n\r\n var classes = buildClasses(options.ns, c.classes);\r\n var $new = addAttrs($('<' + c.type + '>'), options.ns, c.attrs)\r\n .addClass(classes);\r\n\r\n\r\n if (c.val !== undefined) {\r\n $new.val(c.val);\r\n }\r\n if (c.text !== undefined) {\r\n $new.text(c.text);\r\n }\r\n var $p = $currentParent;\r\n $new.appendTo($p);\r\n $currentParent = $new;\r\n if (c.children.length > 0) {\r\n c.children.forEach(addChild);\r\n }\r\n\r\n if (c.events !== undefined && c.events.length > 0) {\r\n for (var i = 0; i < c.events.length; i++) {\r\n eventHandlers.push({ object: $new, event: c.events[i] });\r\n }\r\n }\r\n\r\n $currentParent = $p;\r\n\r\n }\r\n\r\n\r\n function buildIt(page) {\r\n if (options.parentId !== undefined && options.parentId.length > 0) {\r\n page.parentId = options.parentId;\r\n }\r\n options.ns = page.ns;\r\n\r\n var id = page.parentId.replace('*', options.ns);\r\n var $p = $('#' + id);\r\n\r\n $currentParent = $p;\r\n page.children.forEach(addChild);\r\n\r\n eventHandlers.forEach(function (e) {\r\n e.object.on(e.event.on, e.event.event);\r\n });\r\n }\r\n\r\n\r\n return {\r\n build: buildIt\r\n }\r\n};\r\n\r\n\n// File: miniSearchUtilities.js\r\n// Version: 1.0.1 - 2017-06-20\r\n// Author: R Murphy\r\n// Requires:\r\n// Description: Utility functions:\r\n// pageLog, clearLog - expects to append
  • to