{"version":3,"file":"js/concerns/jichitai_autocomplete-fb9edc3284698de5f5aa.js","sources":["webpack:///webpack/bootstrap","webpack:///./app/javascript/packs/concerns/jichitai_autocomplete.js","webpack:///./node_modules/jquery-ui/ui/keycode.js","webpack:///./node_modules/jquery-ui/ui/position.js","webpack:///./node_modules/jquery-ui/ui/unique-id.js","webpack:///./node_modules/jquery-ui/ui/version.js","webpack:///./node_modules/jquery-ui/ui/widget.js","webpack:///./node_modules/jquery-ui/ui/widgets/autocomplete.js","webpack:///./node_modules/jquery-ui/ui/widgets/menu.js","webpack:///./node_modules/jquery/src/ajax.js","webpack:///./node_modules/jquery/src/ajax/jsonp.js","webpack:///./node_modules/jquery/src/ajax/load.js","webpack:///./node_modules/jquery/src/ajax/script.js","webpack:///./node_modules/jquery/src/ajax/var/location.js","webpack:///./node_modules/jquery/src/ajax/var/nonce.js","webpack:///./node_modules/jquery/src/ajax/var/rquery.js","webpack:///./node_modules/jquery/src/ajax/xhr.js","webpack:///./node_modules/jquery/src/attributes.js","webpack:///./node_modules/jquery/src/attributes/attr.js","webpack:///./node_modules/jquery/src/attributes/classes.js","webpack:///./node_modules/jquery/src/attributes/prop.js","webpack:///./node_modules/jquery/src/attributes/support.js","webpack:///./node_modules/jquery/src/attributes/val.js","webpack:///./node_modules/jquery/src/callbacks.js","webpack:///./node_modules/jquery/src/core.js","webpack:///./node_modules/jquery/src/core/DOMEval.js","webpack:///./node_modules/jquery/src/core/access.js","webpack:///./node_modules/jquery/src/core/camelCase.js","webpack:///./node_modules/jquery/src/core/init.js","webpack:///./node_modules/jquery/src/core/isAttached.js","webpack:///./node_modules/jquery/src/core/nodeName.js","webpack:///./node_modules/jquery/src/core/parseHTML.js","webpack:///./node_modules/jquery/src/core/parseXML.js","webpack:///./node_modules/jquery/src/core/ready.js","webpack:///./node_modules/jquery/src/core/readyException.js","webpack:///./node_modules/jquery/src/core/stripAndCollapse.js","webpack:///./node_modules/jquery/src/core/support.js","webpack:///./node_modules/jquery/src/core/toType.js","webpack:///./node_modules/jquery/src/core/var/rsingleTag.js","webpack:///./node_modules/jquery/src/css.js","webpack:///./node_modules/jquery/src/css/addGetHookIf.js","webpack:///./node_modules/jquery/src/css/adjustCSS.js","webpack:///./node_modules/jquery/src/css/curCSS.js","webpack:///./node_modules/jquery/src/css/finalPropName.js","webpack:///./node_modules/jquery/src/css/hiddenVisibleSelectors.js","webpack:///./node_modules/jquery/src/css/showHide.js","webpack:///./node_modules/jquery/src/css/support.js","webpack:///./node_modules/jquery/src/css/var/cssExpand.js","webpack:///./node_modules/jquery/src/css/var/getStyles.js","webpack:///./node_modules/jquery/src/css/var/isHiddenWithinTree.js","webpack:///./node_modules/jquery/src/css/var/rboxStyle.js","webpack:///./node_modules/jquery/src/css/var/rcustomProp.js","webpack:///./node_modules/jquery/src/css/var/rnumnonpx.js","webpack:///./node_modules/jquery/src/css/var/swap.js","webpack:///./node_modules/jquery/src/data.js","webpack:///./node_modules/jquery/src/data/Data.js","webpack:///./node_modules/jquery/src/data/var/acceptData.js","webpack:///./node_modules/jquery/src/data/var/dataPriv.js","webpack:///./node_modules/jquery/src/data/var/dataUser.js","webpack:///./node_modules/jquery/src/deferred.js","webpack:///./node_modules/jquery/src/deferred/exceptionHook.js","webpack:///./node_modules/jquery/src/deprecated.js","webpack:///./node_modules/jquery/src/deprecated/ajax-event-alias.js","webpack:///./node_modules/jquery/src/deprecated/event.js","webpack:///./node_modules/jquery/src/dimensions.js","webpack:///./node_modules/jquery/src/effects.js","webpack:///./node_modules/jquery/src/effects/Tween.js","webpack:///./node_modules/jquery/src/effects/animatedSelector.js","webpack:///./node_modules/jquery/src/event.js","webpack:///./node_modules/jquery/src/event/trigger.js","webpack:///./node_modules/jquery/src/exports/amd.js","webpack:///./node_modules/jquery/src/exports/global.js","webpack:///./node_modules/jquery/src/jquery.js","webpack:///./node_modules/jquery/src/manipulation.js","webpack:///./node_modules/jquery/src/manipulation/_evalUrl.js","webpack:///./node_modules/jquery/src/manipulation/buildFragment.js","webpack:///./node_modules/jquery/src/manipulation/getAll.js","webpack:///./node_modules/jquery/src/manipulation/setGlobalEval.js","webpack:///./node_modules/jquery/src/manipulation/support.js","webpack:///./node_modules/jquery/src/manipulation/var/rscriptType.js","webpack:///./node_modules/jquery/src/manipulation/var/rtagName.js","webpack:///./node_modules/jquery/src/manipulation/wrapMap.js","webpack:///./node_modules/jquery/src/offset.js","webpack:///./node_modules/jquery/src/queue.js","webpack:///./node_modules/jquery/src/queue/delay.js","webpack:///./node_modules/jquery/src/selector.js","webpack:///./node_modules/jquery/src/selector/contains.js","webpack:///./node_modules/jquery/src/selector/escapeSelector.js","webpack:///./node_modules/jquery/src/serialize.js","webpack:///./node_modules/jquery/src/traversing.js","webpack:///./node_modules/jquery/src/traversing/findFilter.js","webpack:///./node_modules/jquery/src/traversing/var/dir.js","webpack:///./node_modules/jquery/src/traversing/var/rneedsContext.js","webpack:///./node_modules/jquery/src/traversing/var/siblings.js","webpack:///./node_modules/jquery/src/var/ObjectFunctionString.js","webpack:///./node_modules/jquery/src/var/arr.js","webpack:///./node_modules/jquery/src/var/class2type.js","webpack:///./node_modules/jquery/src/var/document.js","webpack:///./node_modules/jquery/src/var/documentElement.js","webpack:///./node_modules/jquery/src/var/flat.js","webpack:///./node_modules/jquery/src/var/fnToString.js","webpack:///./node_modules/jquery/src/var/getProto.js","webpack:///./node_modules/jquery/src/var/hasOwn.js","webpack:///./node_modules/jquery/src/var/indexOf.js","webpack:///./node_modules/jquery/src/var/isFunction.js","webpack:///./node_modules/jquery/src/var/isWindow.js","webpack:///./node_modules/jquery/src/var/pnum.js","webpack:///./node_modules/jquery/src/var/pop.js","webpack:///./node_modules/jquery/src/var/push.js","webpack:///./node_modules/jquery/src/var/rcheckableType.js","webpack:///./node_modules/jquery/src/var/rcssNum.js","webpack:///./node_modules/jquery/src/var/rnothtmlwhite.js","webpack:///./node_modules/jquery/src/var/rtrimCSS.js","webpack:///./node_modules/jquery/src/var/slice.js","webpack:///./node_modules/jquery/src/var/sort.js","webpack:///./node_modules/jquery/src/var/splice.js","webpack:///./node_modules/jquery/src/var/support.js","webpack:///./node_modules/jquery/src/var/toString.js","webpack:///./node_modules/jquery/src/var/whitespace.js","webpack:///./node_modules/jquery/src/wrap.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./app/javascript/packs/concerns/jichitai_autocomplete.js\");\n","require(\"jquery-ui/ui/widgets/autocomplete\");\n$(function () {\n const dataList = function(request, response) {\n var value = $('#prefecture').val();\n if(!value) return;\n $.ajax({\n url: '/member_info/autocomplete_jichitai/' + request.term +'/'+ value,\n dataType: 'json',\n type: 'GET',\n cache: true,\n success: function(data) {\n response(data);\n }\n });\n };\n\n $('#jichitai').autocomplete({\n source: dataList,\n autoFocus: true, \n delay: 300, \n minLength: 1 \n });\n});","/*!\n * jQuery UI Keycode 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: Keycode\n//>>group: Core\n//>>description: Provide keycodes as keynames\n//>>docs: https://api.jqueryui.com/jQuery.ui.keyCode/\n\n(function (factory) {\n \"use strict\";\n\n if (typeof define === \"function\" && define.amd) {\n // AMD. Register as an anonymous module.\n define([\"jquery\", \"./version\"], factory);\n } else {\n // Browser globals\n factory(jQuery);\n }\n})(function ($) {\n \"use strict\";\n\n return $.ui.keyCode = {\n BACKSPACE: 8,\n COMMA: 188,\n DELETE: 46,\n DOWN: 40,\n END: 35,\n ENTER: 13,\n ESCAPE: 27,\n HOME: 36,\n LEFT: 37,\n PAGE_DOWN: 34,\n PAGE_UP: 33,\n PERIOD: 190,\n RIGHT: 39,\n SPACE: 32,\n TAB: 9,\n UP: 38\n };\n});","/*!\n * jQuery UI Position 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n *\n * https://api.jqueryui.com/position/\n */\n\n//>>label: Position\n//>>group: Core\n//>>description: Positions elements relative to other elements.\n//>>docs: https://api.jqueryui.com/position/\n//>>demos: https://jqueryui.com/position/\n\n(function (factory) {\n \"use strict\";\n\n if (typeof define === \"function\" && define.amd) {\n // AMD. Register as an anonymous module.\n define([\"jquery\", \"./version\"], factory);\n } else {\n // Browser globals\n factory(jQuery);\n }\n})(function ($) {\n \"use strict\";\n\n (function () {\n var cachedScrollbarWidth,\n max = Math.max,\n abs = Math.abs,\n rhorizontal = /left|center|right/,\n rvertical = /top|center|bottom/,\n roffset = /[\\+\\-]\\d+(\\.[\\d]+)?%?/,\n rposition = /^\\w+/,\n rpercent = /%$/,\n _position = $.fn.position;\n function getOffsets(offsets, width, height) {\n return [parseFloat(offsets[0]) * (rpercent.test(offsets[0]) ? width / 100 : 1), parseFloat(offsets[1]) * (rpercent.test(offsets[1]) ? height / 100 : 1)];\n }\n function parseCss(element, property) {\n return parseInt($.css(element, property), 10) || 0;\n }\n function isWindow(obj) {\n return obj != null && obj === obj.window;\n }\n function getDimensions(elem) {\n var raw = elem[0];\n if (raw.nodeType === 9) {\n return {\n width: elem.width(),\n height: elem.height(),\n offset: {\n top: 0,\n left: 0\n }\n };\n }\n if (isWindow(raw)) {\n return {\n width: elem.width(),\n height: elem.height(),\n offset: {\n top: elem.scrollTop(),\n left: elem.scrollLeft()\n }\n };\n }\n if (raw.preventDefault) {\n return {\n width: 0,\n height: 0,\n offset: {\n top: raw.pageY,\n left: raw.pageX\n }\n };\n }\n return {\n width: elem.outerWidth(),\n height: elem.outerHeight(),\n offset: elem.offset()\n };\n }\n $.position = {\n scrollbarWidth: function () {\n if (cachedScrollbarWidth !== undefined) {\n return cachedScrollbarWidth;\n }\n var w1,\n w2,\n div = $(\"
\" + \"
\"),\n innerDiv = div.children()[0];\n $(\"body\").append(div);\n w1 = innerDiv.offsetWidth;\n div.css(\"overflow\", \"scroll\");\n w2 = innerDiv.offsetWidth;\n if (w1 === w2) {\n w2 = div[0].clientWidth;\n }\n div.remove();\n return cachedScrollbarWidth = w1 - w2;\n },\n getScrollInfo: function (within) {\n var overflowX = within.isWindow || within.isDocument ? \"\" : within.element.css(\"overflow-x\"),\n overflowY = within.isWindow || within.isDocument ? \"\" : within.element.css(\"overflow-y\"),\n hasOverflowX = overflowX === \"scroll\" || overflowX === \"auto\" && within.width < within.element[0].scrollWidth,\n hasOverflowY = overflowY === \"scroll\" || overflowY === \"auto\" && within.height < within.element[0].scrollHeight;\n return {\n width: hasOverflowY ? $.position.scrollbarWidth() : 0,\n height: hasOverflowX ? $.position.scrollbarWidth() : 0\n };\n },\n getWithinInfo: function (element) {\n var withinElement = $(element || window),\n isElemWindow = isWindow(withinElement[0]),\n isDocument = !!withinElement[0] && withinElement[0].nodeType === 9,\n hasOffset = !isElemWindow && !isDocument;\n return {\n element: withinElement,\n isWindow: isElemWindow,\n isDocument: isDocument,\n offset: hasOffset ? $(element).offset() : {\n left: 0,\n top: 0\n },\n scrollLeft: withinElement.scrollLeft(),\n scrollTop: withinElement.scrollTop(),\n width: withinElement.outerWidth(),\n height: withinElement.outerHeight()\n };\n }\n };\n $.fn.position = function (options) {\n if (!options || !options.of) {\n return _position.apply(this, arguments);\n }\n\n // Make a copy, we don't want to modify arguments\n options = $.extend({}, options);\n var atOffset,\n targetWidth,\n targetHeight,\n targetOffset,\n basePosition,\n dimensions,\n // Make sure string options are treated as CSS selectors\n target = typeof options.of === \"string\" ? $(document).find(options.of) : $(options.of),\n within = $.position.getWithinInfo(options.within),\n scrollInfo = $.position.getScrollInfo(within),\n collision = (options.collision || \"flip\").split(\" \"),\n offsets = {};\n dimensions = getDimensions(target);\n if (target[0].preventDefault) {\n // Force left top to allow flipping\n options.at = \"left top\";\n }\n targetWidth = dimensions.width;\n targetHeight = dimensions.height;\n targetOffset = dimensions.offset;\n\n // Clone to reuse original targetOffset later\n basePosition = $.extend({}, targetOffset);\n\n // Force my and at to have valid horizontal and vertical positions\n // if a value is missing or invalid, it will be converted to center\n $.each([\"my\", \"at\"], function () {\n var pos = (options[this] || \"\").split(\" \"),\n horizontalOffset,\n verticalOffset;\n if (pos.length === 1) {\n pos = rhorizontal.test(pos[0]) ? pos.concat([\"center\"]) : rvertical.test(pos[0]) ? [\"center\"].concat(pos) : [\"center\", \"center\"];\n }\n pos[0] = rhorizontal.test(pos[0]) ? pos[0] : \"center\";\n pos[1] = rvertical.test(pos[1]) ? pos[1] : \"center\";\n\n // Calculate offsets\n horizontalOffset = roffset.exec(pos[0]);\n verticalOffset = roffset.exec(pos[1]);\n offsets[this] = [horizontalOffset ? horizontalOffset[0] : 0, verticalOffset ? verticalOffset[0] : 0];\n\n // Reduce to just the positions without the offsets\n options[this] = [rposition.exec(pos[0])[0], rposition.exec(pos[1])[0]];\n });\n\n // Normalize collision option\n if (collision.length === 1) {\n collision[1] = collision[0];\n }\n if (options.at[0] === \"right\") {\n basePosition.left += targetWidth;\n } else if (options.at[0] === \"center\") {\n basePosition.left += targetWidth / 2;\n }\n if (options.at[1] === \"bottom\") {\n basePosition.top += targetHeight;\n } else if (options.at[1] === \"center\") {\n basePosition.top += targetHeight / 2;\n }\n atOffset = getOffsets(offsets.at, targetWidth, targetHeight);\n basePosition.left += atOffset[0];\n basePosition.top += atOffset[1];\n return this.each(function () {\n var collisionPosition,\n using,\n elem = $(this),\n elemWidth = elem.outerWidth(),\n elemHeight = elem.outerHeight(),\n marginLeft = parseCss(this, \"marginLeft\"),\n marginTop = parseCss(this, \"marginTop\"),\n collisionWidth = elemWidth + marginLeft + parseCss(this, \"marginRight\") + scrollInfo.width,\n collisionHeight = elemHeight + marginTop + parseCss(this, \"marginBottom\") + scrollInfo.height,\n position = $.extend({}, basePosition),\n myOffset = getOffsets(offsets.my, elem.outerWidth(), elem.outerHeight());\n if (options.my[0] === \"right\") {\n position.left -= elemWidth;\n } else if (options.my[0] === \"center\") {\n position.left -= elemWidth / 2;\n }\n if (options.my[1] === \"bottom\") {\n position.top -= elemHeight;\n } else if (options.my[1] === \"center\") {\n position.top -= elemHeight / 2;\n }\n position.left += myOffset[0];\n position.top += myOffset[1];\n collisionPosition = {\n marginLeft: marginLeft,\n marginTop: marginTop\n };\n $.each([\"left\", \"top\"], function (i, dir) {\n if ($.ui.position[collision[i]]) {\n $.ui.position[collision[i]][dir](position, {\n targetWidth: targetWidth,\n targetHeight: targetHeight,\n elemWidth: elemWidth,\n elemHeight: elemHeight,\n collisionPosition: collisionPosition,\n collisionWidth: collisionWidth,\n collisionHeight: collisionHeight,\n offset: [atOffset[0] + myOffset[0], atOffset[1] + myOffset[1]],\n my: options.my,\n at: options.at,\n within: within,\n elem: elem\n });\n }\n });\n if (options.using) {\n // Adds feedback as second argument to using callback, if present\n using = function (props) {\n var left = targetOffset.left - position.left,\n right = left + targetWidth - elemWidth,\n top = targetOffset.top - position.top,\n bottom = top + targetHeight - elemHeight,\n feedback = {\n target: {\n element: target,\n left: targetOffset.left,\n top: targetOffset.top,\n width: targetWidth,\n height: targetHeight\n },\n element: {\n element: elem,\n left: position.left,\n top: position.top,\n width: elemWidth,\n height: elemHeight\n },\n horizontal: right < 0 ? \"left\" : left > 0 ? \"right\" : \"center\",\n vertical: bottom < 0 ? \"top\" : top > 0 ? \"bottom\" : \"middle\"\n };\n if (targetWidth < elemWidth && abs(left + right) < targetWidth) {\n feedback.horizontal = \"center\";\n }\n if (targetHeight < elemHeight && abs(top + bottom) < targetHeight) {\n feedback.vertical = \"middle\";\n }\n if (max(abs(left), abs(right)) > max(abs(top), abs(bottom))) {\n feedback.important = \"horizontal\";\n } else {\n feedback.important = \"vertical\";\n }\n options.using.call(this, props, feedback);\n };\n }\n elem.offset($.extend(position, {\n using: using\n }));\n });\n };\n $.ui.position = {\n fit: {\n left: function (position, data) {\n var within = data.within,\n withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,\n outerWidth = within.width,\n collisionPosLeft = position.left - data.collisionPosition.marginLeft,\n overLeft = withinOffset - collisionPosLeft,\n overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,\n newOverRight;\n\n // Element is wider than within\n if (data.collisionWidth > outerWidth) {\n // Element is initially over the left side of within\n if (overLeft > 0 && overRight <= 0) {\n newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;\n position.left += overLeft - newOverRight;\n\n // Element is initially over right side of within\n } else if (overRight > 0 && overLeft <= 0) {\n position.left = withinOffset;\n\n // Element is initially over both left and right sides of within\n } else {\n if (overLeft > overRight) {\n position.left = withinOffset + outerWidth - data.collisionWidth;\n } else {\n position.left = withinOffset;\n }\n }\n\n // Too far left -> align with left edge\n } else if (overLeft > 0) {\n position.left += overLeft;\n\n // Too far right -> align with right edge\n } else if (overRight > 0) {\n position.left -= overRight;\n\n // Adjust based on position and margin\n } else {\n position.left = max(position.left - collisionPosLeft, position.left);\n }\n },\n top: function (position, data) {\n var within = data.within,\n withinOffset = within.isWindow ? within.scrollTop : within.offset.top,\n outerHeight = data.within.height,\n collisionPosTop = position.top - data.collisionPosition.marginTop,\n overTop = withinOffset - collisionPosTop,\n overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,\n newOverBottom;\n\n // Element is taller than within\n if (data.collisionHeight > outerHeight) {\n // Element is initially over the top of within\n if (overTop > 0 && overBottom <= 0) {\n newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;\n position.top += overTop - newOverBottom;\n\n // Element is initially over bottom of within\n } else if (overBottom > 0 && overTop <= 0) {\n position.top = withinOffset;\n\n // Element is initially over both top and bottom of within\n } else {\n if (overTop > overBottom) {\n position.top = withinOffset + outerHeight - data.collisionHeight;\n } else {\n position.top = withinOffset;\n }\n }\n\n // Too far up -> align with top\n } else if (overTop > 0) {\n position.top += overTop;\n\n // Too far down -> align with bottom edge\n } else if (overBottom > 0) {\n position.top -= overBottom;\n\n // Adjust based on position and margin\n } else {\n position.top = max(position.top - collisionPosTop, position.top);\n }\n }\n },\n flip: {\n left: function (position, data) {\n var within = data.within,\n withinOffset = within.offset.left + within.scrollLeft,\n outerWidth = within.width,\n offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,\n collisionPosLeft = position.left - data.collisionPosition.marginLeft,\n overLeft = collisionPosLeft - offsetLeft,\n overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,\n myOffset = data.my[0] === \"left\" ? -data.elemWidth : data.my[0] === \"right\" ? data.elemWidth : 0,\n atOffset = data.at[0] === \"left\" ? data.targetWidth : data.at[0] === \"right\" ? -data.targetWidth : 0,\n offset = -2 * data.offset[0],\n newOverRight,\n newOverLeft;\n if (overLeft < 0) {\n newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;\n if (newOverRight < 0 || newOverRight < abs(overLeft)) {\n position.left += myOffset + atOffset + offset;\n }\n } else if (overRight > 0) {\n newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;\n if (newOverLeft > 0 || abs(newOverLeft) < overRight) {\n position.left += myOffset + atOffset + offset;\n }\n }\n },\n top: function (position, data) {\n var within = data.within,\n withinOffset = within.offset.top + within.scrollTop,\n outerHeight = within.height,\n offsetTop = within.isWindow ? within.scrollTop : within.offset.top,\n collisionPosTop = position.top - data.collisionPosition.marginTop,\n overTop = collisionPosTop - offsetTop,\n overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,\n top = data.my[1] === \"top\",\n myOffset = top ? -data.elemHeight : data.my[1] === \"bottom\" ? data.elemHeight : 0,\n atOffset = data.at[1] === \"top\" ? data.targetHeight : data.at[1] === \"bottom\" ? -data.targetHeight : 0,\n offset = -2 * data.offset[1],\n newOverTop,\n newOverBottom;\n if (overTop < 0) {\n newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;\n if (newOverBottom < 0 || newOverBottom < abs(overTop)) {\n position.top += myOffset + atOffset + offset;\n }\n } else if (overBottom > 0) {\n newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;\n if (newOverTop > 0 || abs(newOverTop) < overBottom) {\n position.top += myOffset + atOffset + offset;\n }\n }\n }\n },\n flipfit: {\n left: function () {\n $.ui.position.flip.left.apply(this, arguments);\n $.ui.position.fit.left.apply(this, arguments);\n },\n top: function () {\n $.ui.position.flip.top.apply(this, arguments);\n $.ui.position.fit.top.apply(this, arguments);\n }\n }\n };\n })();\n return $.ui.position;\n});","/*!\n * jQuery UI Unique ID 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: uniqueId\n//>>group: Core\n//>>description: Functions to generate and remove uniqueId's\n//>>docs: https://api.jqueryui.com/uniqueId/\n\n(function (factory) {\n \"use strict\";\n\n if (typeof define === \"function\" && define.amd) {\n // AMD. Register as an anonymous module.\n define([\"jquery\", \"./version\"], factory);\n } else {\n // Browser globals\n factory(jQuery);\n }\n})(function ($) {\n \"use strict\";\n\n return $.fn.extend({\n uniqueId: function () {\n var uuid = 0;\n return function () {\n return this.each(function () {\n if (!this.id) {\n this.id = \"ui-id-\" + ++uuid;\n }\n });\n };\n }(),\n removeUniqueId: function () {\n return this.each(function () {\n if (/^ui-id-\\d+$/.test(this.id)) {\n $(this).removeAttr(\"id\");\n }\n });\n }\n });\n});","(function (factory) {\n \"use strict\";\n\n if (typeof define === \"function\" && define.amd) {\n // AMD. Register as an anonymous module.\n define([\"jquery\"], factory);\n } else {\n // Browser globals\n factory(jQuery);\n }\n})(function ($) {\n \"use strict\";\n\n $.ui = $.ui || {};\n return $.ui.version = \"1.14.1\";\n});","/*!\n * jQuery UI Widget 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: Widget\n//>>group: Core\n//>>description: Provides a factory for creating stateful widgets with a common API.\n//>>docs: https://api.jqueryui.com/jQuery.widget/\n//>>demos: https://jqueryui.com/widget/\n\n(function (factory) {\n \"use strict\";\n\n if (typeof define === \"function\" && define.amd) {\n // AMD. Register as an anonymous module.\n define([\"jquery\", \"./version\"], factory);\n } else {\n // Browser globals\n factory(jQuery);\n }\n})(function ($) {\n \"use strict\";\n\n var widgetUuid = 0;\n var widgetHasOwnProperty = Array.prototype.hasOwnProperty;\n var widgetSlice = Array.prototype.slice;\n $.cleanData = function (orig) {\n return function (elems) {\n var events, elem, i;\n for (i = 0; (elem = elems[i]) != null; i++) {\n // Only trigger remove when necessary to save time\n events = $._data(elem, \"events\");\n if (events && events.remove) {\n $(elem).triggerHandler(\"remove\");\n }\n }\n orig(elems);\n };\n }($.cleanData);\n $.widget = function (name, base, prototype) {\n var existingConstructor, constructor, basePrototype;\n\n // ProxiedPrototype allows the provided prototype to remain unmodified\n // so that it can be used as a mixin for multiple widgets (#8876)\n var proxiedPrototype = {};\n var namespace = name.split(\".\")[0];\n name = name.split(\".\")[1];\n if (name === \"__proto__\" || name === \"constructor\") {\n return $.error(\"Invalid widget name: \" + name);\n }\n var fullName = namespace + \"-\" + name;\n if (!prototype) {\n prototype = base;\n base = $.Widget;\n }\n if (Array.isArray(prototype)) {\n prototype = $.extend.apply(null, [{}].concat(prototype));\n }\n\n // Create selector for plugin\n $.expr.pseudos[fullName.toLowerCase()] = function (elem) {\n return !!$.data(elem, fullName);\n };\n $[namespace] = $[namespace] || {};\n existingConstructor = $[namespace][name];\n constructor = $[namespace][name] = function (options, element) {\n // Allow instantiation without \"new\" keyword\n if (!this || !this._createWidget) {\n return new constructor(options, element);\n }\n\n // Allow instantiation without initializing for simple inheritance\n // must use \"new\" keyword (the code above always passes args)\n if (arguments.length) {\n this._createWidget(options, element);\n }\n };\n\n // Extend with the existing constructor to carry over any static properties\n $.extend(constructor, existingConstructor, {\n version: prototype.version,\n // Copy the object used to create the prototype in case we need to\n // redefine the widget later\n _proto: $.extend({}, prototype),\n // Track widgets that inherit from this widget in case this widget is\n // redefined after a widget inherits from it\n _childConstructors: []\n });\n basePrototype = new base();\n\n // We need to make the options hash a property directly on the new instance\n // otherwise we'll modify the options hash on the prototype that we're\n // inheriting from\n basePrototype.options = $.widget.extend({}, basePrototype.options);\n $.each(prototype, function (prop, value) {\n if (typeof value !== \"function\") {\n proxiedPrototype[prop] = value;\n return;\n }\n proxiedPrototype[prop] = function () {\n function _super() {\n return base.prototype[prop].apply(this, arguments);\n }\n function _superApply(args) {\n return base.prototype[prop].apply(this, args);\n }\n return function () {\n var __super = this._super;\n var __superApply = this._superApply;\n var returnValue;\n this._super = _super;\n this._superApply = _superApply;\n returnValue = value.apply(this, arguments);\n this._super = __super;\n this._superApply = __superApply;\n return returnValue;\n };\n }();\n });\n constructor.prototype = $.widget.extend(basePrototype, {\n // TODO: remove support for widgetEventPrefix\n // always use the name + a colon as the prefix, e.g., draggable:start\n // don't prefix for widgets that aren't DOM-based\n widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix || name : name\n }, proxiedPrototype, {\n constructor: constructor,\n namespace: namespace,\n widgetName: name,\n widgetFullName: fullName\n });\n\n // If this widget is being redefined then we need to find all widgets that\n // are inheriting from it and redefine all of them so that they inherit from\n // the new version of this widget. We're essentially trying to replace one\n // level in the prototype chain.\n if (existingConstructor) {\n $.each(existingConstructor._childConstructors, function (i, child) {\n var childPrototype = child.prototype;\n\n // Redefine the child widget using the same prototype that was\n // originally used, but inherit from the new version of the base\n $.widget(childPrototype.namespace + \".\" + childPrototype.widgetName, constructor, child._proto);\n });\n\n // Remove the list of existing child constructors from the old constructor\n // so the old child constructors can be garbage collected\n delete existingConstructor._childConstructors;\n } else {\n base._childConstructors.push(constructor);\n }\n $.widget.bridge(name, constructor);\n return constructor;\n };\n $.widget.extend = function (target) {\n var input = widgetSlice.call(arguments, 1);\n var inputIndex = 0;\n var inputLength = input.length;\n var key;\n var value;\n for (; inputIndex < inputLength; inputIndex++) {\n for (key in input[inputIndex]) {\n value = input[inputIndex][key];\n if (widgetHasOwnProperty.call(input[inputIndex], key) && value !== undefined) {\n // Clone objects\n if ($.isPlainObject(value)) {\n target[key] = $.isPlainObject(target[key]) ? $.widget.extend({}, target[key], value) :\n // Don't extend strings, arrays, etc. with objects\n $.widget.extend({}, value);\n\n // Copy everything else by reference\n } else {\n target[key] = value;\n }\n }\n }\n }\n return target;\n };\n $.widget.bridge = function (name, object) {\n var fullName = object.prototype.widgetFullName || name;\n $.fn[name] = function (options) {\n var isMethodCall = typeof options === \"string\";\n var args = widgetSlice.call(arguments, 1);\n var returnValue = this;\n if (isMethodCall) {\n // If this is an empty collection, we need to have the instance method\n // return undefined instead of the jQuery instance\n if (!this.length && options === \"instance\") {\n returnValue = undefined;\n } else {\n this.each(function () {\n var methodValue;\n var instance = $.data(this, fullName);\n if (options === \"instance\") {\n returnValue = instance;\n return false;\n }\n if (!instance) {\n return $.error(\"cannot call methods on \" + name + \" prior to initialization; \" + \"attempted to call method '\" + options + \"'\");\n }\n if (typeof instance[options] !== \"function\" || options.charAt(0) === \"_\") {\n return $.error(\"no such method '\" + options + \"' for \" + name + \" widget instance\");\n }\n methodValue = instance[options].apply(instance, args);\n if (methodValue !== instance && methodValue !== undefined) {\n returnValue = methodValue && methodValue.jquery ? returnValue.pushStack(methodValue.get()) : methodValue;\n return false;\n }\n });\n }\n } else {\n // Allow multiple hashes to be passed on init\n if (args.length) {\n options = $.widget.extend.apply(null, [options].concat(args));\n }\n this.each(function () {\n var instance = $.data(this, fullName);\n if (instance) {\n instance.option(options || {});\n if (instance._init) {\n instance._init();\n }\n } else {\n $.data(this, fullName, new object(options, this));\n }\n });\n }\n return returnValue;\n };\n };\n $.Widget = function /* options, element */ () {};\n $.Widget._childConstructors = [];\n $.Widget.prototype = {\n widgetName: \"widget\",\n widgetEventPrefix: \"\",\n defaultElement: \"
\",\n options: {\n classes: {},\n disabled: false,\n // Callbacks\n create: null\n },\n _createWidget: function (options, element) {\n element = $(element || this.defaultElement || this)[0];\n this.element = $(element);\n this.uuid = widgetUuid++;\n this.eventNamespace = \".\" + this.widgetName + this.uuid;\n this.bindings = $();\n this.hoverable = $();\n this.focusable = $();\n this.classesElementLookup = {};\n if (element !== this) {\n $.data(element, this.widgetFullName, this);\n this._on(true, this.element, {\n remove: function (event) {\n if (event.target === element) {\n this.destroy();\n }\n }\n });\n this.document = $(element.style ?\n // Element within the document\n element.ownerDocument :\n // Element is window or document\n element.document || element);\n this.window = $(this.document[0].defaultView || this.document[0].parentWindow);\n }\n this.options = $.widget.extend({}, this.options, this._getCreateOptions(), options);\n this._create();\n if (this.options.disabled) {\n this._setOptionDisabled(this.options.disabled);\n }\n this._trigger(\"create\", null, this._getCreateEventData());\n this._init();\n },\n _getCreateOptions: function () {\n return {};\n },\n _getCreateEventData: $.noop,\n _create: $.noop,\n _init: $.noop,\n destroy: function () {\n var that = this;\n this._destroy();\n $.each(this.classesElementLookup, function (key, value) {\n that._removeClass(value, key);\n });\n\n // We can probably remove the unbind calls in 2.0\n // all event bindings should go through this._on()\n this.element.off(this.eventNamespace).removeData(this.widgetFullName);\n this.widget().off(this.eventNamespace).removeAttr(\"aria-disabled\");\n\n // Clean up events and states\n this.bindings.off(this.eventNamespace);\n },\n _destroy: $.noop,\n widget: function () {\n return this.element;\n },\n option: function (key, value) {\n var options = key;\n var parts;\n var curOption;\n var i;\n if (arguments.length === 0) {\n // Don't return a reference to the internal hash\n return $.widget.extend({}, this.options);\n }\n if (typeof key === \"string\") {\n // Handle nested keys, e.g., \"foo.bar\" => { foo: { bar: ___ } }\n options = {};\n parts = key.split(\".\");\n key = parts.shift();\n if (parts.length) {\n curOption = options[key] = $.widget.extend({}, this.options[key]);\n for (i = 0; i < parts.length - 1; i++) {\n curOption[parts[i]] = curOption[parts[i]] || {};\n curOption = curOption[parts[i]];\n }\n key = parts.pop();\n if (arguments.length === 1) {\n return curOption[key] === undefined ? null : curOption[key];\n }\n curOption[key] = value;\n } else {\n if (arguments.length === 1) {\n return this.options[key] === undefined ? null : this.options[key];\n }\n options[key] = value;\n }\n }\n this._setOptions(options);\n return this;\n },\n _setOptions: function (options) {\n var key;\n for (key in options) {\n this._setOption(key, options[key]);\n }\n return this;\n },\n _setOption: function (key, value) {\n if (key === \"classes\") {\n this._setOptionClasses(value);\n }\n this.options[key] = value;\n if (key === \"disabled\") {\n this._setOptionDisabled(value);\n }\n return this;\n },\n _setOptionClasses: function (value) {\n var classKey, elements, currentElements;\n for (classKey in value) {\n currentElements = this.classesElementLookup[classKey];\n if (value[classKey] === this.options.classes[classKey] || !currentElements || !currentElements.length) {\n continue;\n }\n\n // We are doing this to create a new jQuery object because the _removeClass() call\n // on the next line is going to destroy the reference to the current elements being\n // tracked. We need to save a copy of this collection so that we can add the new classes\n // below.\n elements = $(currentElements.get());\n this._removeClass(currentElements, classKey);\n\n // We don't use _addClass() here, because that uses this.options.classes\n // for generating the string of classes. We want to use the value passed in from\n // _setOption(), this is the new value of the classes option which was passed to\n // _setOption(). We pass this value directly to _classes().\n elements.addClass(this._classes({\n element: elements,\n keys: classKey,\n classes: value,\n add: true\n }));\n }\n },\n _setOptionDisabled: function (value) {\n this._toggleClass(this.widget(), this.widgetFullName + \"-disabled\", null, !!value);\n\n // If the widget is becoming disabled, then nothing is interactive\n if (value) {\n this._removeClass(this.hoverable, null, \"ui-state-hover\");\n this._removeClass(this.focusable, null, \"ui-state-focus\");\n }\n },\n enable: function () {\n return this._setOptions({\n disabled: false\n });\n },\n disable: function () {\n return this._setOptions({\n disabled: true\n });\n },\n _classes: function (options) {\n var full = [];\n var that = this;\n options = $.extend({\n element: this.element,\n classes: this.options.classes || {}\n }, options);\n function bindRemoveEvent() {\n var nodesToBind = [];\n options.element.each(function (_, element) {\n var isTracked = $.map(that.classesElementLookup, function (elements) {\n return elements;\n }).some(function (elements) {\n return elements.is(element);\n });\n if (!isTracked) {\n nodesToBind.push(element);\n }\n });\n that._on($(nodesToBind), {\n remove: \"_untrackClassesElement\"\n });\n }\n function processClassString(classes, checkOption) {\n var current, i;\n for (i = 0; i < classes.length; i++) {\n current = that.classesElementLookup[classes[i]] || $();\n if (options.add) {\n bindRemoveEvent();\n current = $($.uniqueSort(current.get().concat(options.element.get())));\n } else {\n current = $(current.not(options.element).get());\n }\n that.classesElementLookup[classes[i]] = current;\n full.push(classes[i]);\n if (checkOption && options.classes[classes[i]]) {\n full.push(options.classes[classes[i]]);\n }\n }\n }\n if (options.keys) {\n processClassString(options.keys.match(/\\S+/g) || [], true);\n }\n if (options.extra) {\n processClassString(options.extra.match(/\\S+/g) || []);\n }\n return full.join(\" \");\n },\n _untrackClassesElement: function (event) {\n var that = this;\n $.each(that.classesElementLookup, function (key, value) {\n if ($.inArray(event.target, value) !== -1) {\n that.classesElementLookup[key] = $(value.not(event.target).get());\n }\n });\n this._off($(event.target));\n },\n _removeClass: function (element, keys, extra) {\n return this._toggleClass(element, keys, extra, false);\n },\n _addClass: function (element, keys, extra) {\n return this._toggleClass(element, keys, extra, true);\n },\n _toggleClass: function (element, keys, extra, add) {\n add = typeof add === \"boolean\" ? add : extra;\n var shift = typeof element === \"string\" || element === null,\n options = {\n extra: shift ? keys : extra,\n keys: shift ? element : keys,\n element: shift ? this.element : element,\n add: add\n };\n options.element.toggleClass(this._classes(options), add);\n return this;\n },\n _on: function (suppressDisabledCheck, element, handlers) {\n var delegateElement;\n var instance = this;\n\n // No suppressDisabledCheck flag, shuffle arguments\n if (typeof suppressDisabledCheck !== \"boolean\") {\n handlers = element;\n element = suppressDisabledCheck;\n suppressDisabledCheck = false;\n }\n\n // No element argument, shuffle and use this.element\n if (!handlers) {\n handlers = element;\n element = this.element;\n delegateElement = this.widget();\n } else {\n element = delegateElement = $(element);\n this.bindings = this.bindings.add(element);\n }\n $.each(handlers, function (event, handler) {\n function handlerProxy() {\n // Allow widgets to customize the disabled handling\n // - disabled as an array instead of boolean\n // - disabled class as method for disabling individual parts\n if (!suppressDisabledCheck && (instance.options.disabled === true || $(this).hasClass(\"ui-state-disabled\"))) {\n return;\n }\n return (typeof handler === \"string\" ? instance[handler] : handler).apply(instance, arguments);\n }\n\n // Copy the guid so direct unbinding works\n if (typeof handler !== \"string\") {\n handlerProxy.guid = handler.guid = handler.guid || handlerProxy.guid || $.guid++;\n }\n var match = event.match(/^([\\w:-]*)\\s*(.*)$/);\n var eventName = match[1] + instance.eventNamespace;\n var selector = match[2];\n if (selector) {\n delegateElement.on(eventName, selector, handlerProxy);\n } else {\n element.on(eventName, handlerProxy);\n }\n });\n },\n _off: function (element, eventName) {\n eventName = (eventName || \"\").split(\" \").join(this.eventNamespace + \" \") + this.eventNamespace;\n element.off(eventName);\n\n // Clear the stack to avoid memory leaks (#10056)\n this.bindings = $(this.bindings.not(element).get());\n this.focusable = $(this.focusable.not(element).get());\n this.hoverable = $(this.hoverable.not(element).get());\n },\n _delay: function (handler, delay) {\n function handlerProxy() {\n return (typeof handler === \"string\" ? instance[handler] : handler).apply(instance, arguments);\n }\n var instance = this;\n return setTimeout(handlerProxy, delay || 0);\n },\n _hoverable: function (element) {\n this.hoverable = this.hoverable.add(element);\n this._on(element, {\n mouseenter: function (event) {\n this._addClass($(event.currentTarget), null, \"ui-state-hover\");\n },\n mouseleave: function (event) {\n this._removeClass($(event.currentTarget), null, \"ui-state-hover\");\n }\n });\n },\n _focusable: function (element) {\n this.focusable = this.focusable.add(element);\n this._on(element, {\n focusin: function (event) {\n this._addClass($(event.currentTarget), null, \"ui-state-focus\");\n },\n focusout: function (event) {\n this._removeClass($(event.currentTarget), null, \"ui-state-focus\");\n }\n });\n },\n _trigger: function (type, event, data) {\n var prop, orig;\n var callback = this.options[type];\n data = data || {};\n event = $.Event(event);\n event.type = (type === this.widgetEventPrefix ? type : this.widgetEventPrefix + type).toLowerCase();\n\n // The original event may come from any element\n // so we need to reset the target on the new event\n event.target = this.element[0];\n\n // Copy original event properties over to the new event\n orig = event.originalEvent;\n if (orig) {\n for (prop in orig) {\n if (!(prop in event)) {\n event[prop] = orig[prop];\n }\n }\n }\n this.element.trigger(event, data);\n return !(typeof callback === \"function\" && callback.apply(this.element[0], [event].concat(data)) === false || event.isDefaultPrevented());\n }\n };\n $.each({\n show: \"fadeIn\",\n hide: \"fadeOut\"\n }, function (method, defaultEffect) {\n $.Widget.prototype[\"_\" + method] = function (element, options, callback) {\n if (typeof options === \"string\") {\n options = {\n effect: options\n };\n }\n var hasOptions;\n var effectName = !options ? method : options === true || typeof options === \"number\" ? defaultEffect : options.effect || defaultEffect;\n options = options || {};\n if (typeof options === \"number\") {\n options = {\n duration: options\n };\n } else if (options === true) {\n options = {};\n }\n hasOptions = !$.isEmptyObject(options);\n options.complete = callback;\n if (options.delay) {\n element.delay(options.delay);\n }\n if (hasOptions && $.effects && $.effects.effect[effectName]) {\n element[method](options);\n } else if (effectName !== method && element[effectName]) {\n element[effectName](options.duration, options.easing, callback);\n } else {\n element.queue(function (next) {\n $(this)[method]();\n if (callback) {\n callback.call(element[0]);\n }\n next();\n });\n }\n };\n });\n return $.widget;\n});","/*!\n * jQuery UI Autocomplete 1.14.1\n * https://jqueryui.com\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license.\n * https://jquery.org/license\n */\n\n//>>label: Autocomplete\n//>>group: Widgets\n//>>description: Lists suggested words as the user is typing.\n//>>docs: https://api.jqueryui.com/autocomplete/\n//>>demos: https://jqueryui.com/autocomplete/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/autocomplete.css\n//>>css.theme: ../../themes/base/theme.css\n\n(function (factory) {\n \"use strict\";\n\n if (typeof define === \"function\" && define.amd) {\n // AMD. Register as an anonymous module.\n define([\"jquery\", \"./menu\", \"../keycode\", \"../position\", \"../version\", \"../widget\"], factory);\n } else {\n // Browser globals\n factory(jQuery);\n }\n})(function ($) {\n \"use strict\";\n\n $.widget(\"ui.autocomplete\", {\n version: \"1.14.1\",\n defaultElement: \"\",\n options: {\n appendTo: null,\n autoFocus: false,\n delay: 300,\n minLength: 1,\n position: {\n my: \"left top\",\n at: \"left bottom\",\n collision: \"none\"\n },\n source: null,\n // Callbacks\n change: null,\n close: null,\n focus: null,\n open: null,\n response: null,\n search: null,\n select: null\n },\n requestIndex: 0,\n pending: 0,\n liveRegionTimer: null,\n _create: function () {\n // Some browsers only repeat keydown events, not keypress events,\n // so we use the suppressKeyPress flag to determine if we've already\n // handled the keydown event. #7269\n // Unfortunately the code for & in keypress is the same as the up arrow,\n // so we use the suppressKeyPressRepeat flag to avoid handling keypress\n // events when we know the keydown event was used to modify the\n // search term. #7799\n var suppressKeyPress,\n suppressKeyPressRepeat,\n suppressInput,\n nodeName = this.element[0].nodeName.toLowerCase(),\n isTextarea = nodeName === \"textarea\",\n isInput = nodeName === \"input\";\n\n // Textareas are always multi-line\n // Inputs are always single-line, even if inside a contentEditable element\n // All other element types are determined by whether they're contentEditable\n this.isMultiLine = isTextarea || !isInput && this.element.prop(\"contentEditable\") === \"true\";\n this.valueMethod = this.element[isTextarea || isInput ? \"val\" : \"text\"];\n this.isNewMenu = true;\n this._addClass(\"ui-autocomplete-input\");\n this.element.attr(\"autocomplete\", \"off\");\n this._on(this.element, {\n keydown: function (event) {\n if (this.element.prop(\"readOnly\")) {\n suppressKeyPress = true;\n suppressInput = true;\n suppressKeyPressRepeat = true;\n return;\n }\n suppressKeyPress = false;\n suppressInput = false;\n suppressKeyPressRepeat = false;\n var keyCode = $.ui.keyCode;\n switch (event.keyCode) {\n case keyCode.PAGE_UP:\n suppressKeyPress = true;\n this._move(\"previousPage\", event);\n break;\n case keyCode.PAGE_DOWN:\n suppressKeyPress = true;\n this._move(\"nextPage\", event);\n break;\n case keyCode.UP:\n suppressKeyPress = true;\n this._keyEvent(\"previous\", event);\n break;\n case keyCode.DOWN:\n suppressKeyPress = true;\n this._keyEvent(\"next\", event);\n break;\n case keyCode.ENTER:\n // when menu is open and has focus\n if (this.menu.active) {\n // #6055 - Opera still allows the keypress to occur\n // which causes forms to submit\n suppressKeyPress = true;\n event.preventDefault();\n this.menu.select(event);\n }\n break;\n case keyCode.TAB:\n if (this.menu.active) {\n this.menu.select(event);\n }\n break;\n case keyCode.ESCAPE:\n if (this.menu.element.is(\":visible\")) {\n if (!this.isMultiLine) {\n this._value(this.term);\n }\n this.close(event);\n\n // Different browsers have different default behavior for escape\n // Single press can mean undo or clear\n event.preventDefault();\n }\n break;\n default:\n suppressKeyPressRepeat = true;\n\n // search timeout should be triggered before the input value is changed\n this._searchTimeout(event);\n break;\n }\n },\n keypress: function (event) {\n if (suppressKeyPress) {\n suppressKeyPress = false;\n if (!this.isMultiLine || this.menu.element.is(\":visible\")) {\n event.preventDefault();\n }\n return;\n }\n if (suppressKeyPressRepeat) {\n return;\n }\n\n // Replicate some key handlers to allow them to repeat in Firefox and Opera\n var keyCode = $.ui.keyCode;\n switch (event.keyCode) {\n case keyCode.PAGE_UP:\n this._move(\"previousPage\", event);\n break;\n case keyCode.PAGE_DOWN:\n this._move(\"nextPage\", event);\n break;\n case keyCode.UP:\n this._keyEvent(\"previous\", event);\n break;\n case keyCode.DOWN:\n this._keyEvent(\"next\", event);\n break;\n }\n },\n input: function (event) {\n if (suppressInput) {\n suppressInput = false;\n event.preventDefault();\n return;\n }\n this._searchTimeout(event);\n },\n focus: function () {\n this.selectedItem = null;\n this.previous = this._value();\n },\n blur: function (event) {\n clearTimeout(this.searching);\n this.close(event);\n this._change(event);\n }\n });\n this._initSource();\n this.menu = $(\"