(function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("preact")):"function"==typeof define&&define.amd?define(["preact"],t):"object"==typeof exports?exports["Autocomplete"]=t(require("preact")):e["Autocomplete"]=t(e["preact"])})(window,function(n){return function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/",o(o.s=31)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var m=n(0),v=n(5),y=n(6),g=n(14),b=n(16),O="prototype",w=function(e,t,n){var r,o,u,i,a=e&w.F,s=e&w.G,l=e&w.S,c=e&w.P,p=e&w.B,f=s?m:l?m[t]||(m[t]={}):(m[t]||{})[O],d=s?v:v[t]||(v[t]={}),h=d[O]||(d[O]={});for(r in s&&(n=t),n)u=((o=!a&&f&&f[r]!==undefined)?f:n)[r],i=p&&o?b(u,m):c&&"function"==typeof u?b(Function.call,u):u,f&&g(f,r,u,e&w.U),d[r]!=u&&y(d,r,i),c&&h[r]!=u&&(h[r]=u)};m.core=v,w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128,e.exports=w},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(7),o=n(35);e.exports=n(3)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(8),u=n(33),i=n(34),a=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),u)try{return a(e,t,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(2);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(e===undefined?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(20);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(e==undefined)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports=n},function(e,t,n){var r=n(2),o=n(0).document,u=r(o)&&r(o.createElement);e.exports=function(e){return u?o.createElement(e):{}}},function(e,t,n){var u=n(0),i=n(6),a=n(15),s=n(9)("src"),r="toString",o=Function[r],l=(""+o).split(r);n(5).inspectSource=function(e){return o.call(e)},(e.exports=function(e,t,n,r){var o="function"==typeof n;o&&(a(n,"name")||i(n,"name",t)),e[t]!==n&&(o&&(a(n,s)||i(n,s,e[t]?""+e[t]:l.join(String(t)))),e===u?e[t]=n:r?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,r,function(){return"function"==typeof this&&this[s]||o.call(this)})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var u=n(17);e.exports=function(r,o,e){if(u(r),o===undefined)return r;switch(e){case 1:return function(e){return r.call(o,e)};case 2:return function(e,t){return r.call(o,e,t)};case 3:return function(e,t,n){return r.call(o,e,t,n)}}return function(){return r.apply(o,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(37),o=n(26);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(10),o=n(11);e.exports=function(e){return r(o(e))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var s=n(19),l=n(22),c=n(38);e.exports=function(a){return function(e,t,n){var r,o=s(e),u=l(o.length),i=c(n,u);if(a&&t!=t){for(;i=r;this.setState({query:a}),u||!s&&l&&c?o(a,function(e){var t=0=i,M=this.props.showNoOptionsFound&&I&&E&&j&&C,A=n+"__wrapper",P=n+"__input",k=null!==g?" "+P+"--focused":"",F=this.props.showAllValues?" "+P+"--show-all-values":" "+P+"--default",R=n+"__dropdown-arrow-down",q=-1!==g&&null!==g,T=n+"__menu",N=T+"--"+r,D=T+"--"+(O||M?"visible":"hidden"),L=n+"__option",B=n+"__hint",V=this.templateInputValue(w[_]),K=V&&0===V.toLowerCase().indexOf(x.toLowerCase())&&S?x+V.substr(x.length):"",U=G&&K;return c&&"string"==typeof(e=v({className:R}))&&(e=(0,$.createElement)("div",{className:n+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:e}})),(0,$.createElement)("div",{className:A,onKeyDown:this.handleKeyDown,role:"combobox","aria-expanded":O?"true":"false"},(0,$.createElement)(W["default"],{length:w.length,queryLength:x.length,minQueryLength:i,selectedOption:this.templateInputValue(w[_]),selectedOptionIndex:_,tQueryTooShort:f,tNoResults:d,tSelectedOption:h,tResults:m}),U&&(0,$.createElement)("span",null,(0,$.createElement)("input",{className:B,readonly:!0,tabIndex:"-1",value:K})),(0,$.createElement)("input",z({"aria-activedescendant":!!q&&u+"__option--"+g,"aria-owns":u+"__listbox",autoComplete:"off",className:""+P+k+F,id:u,onClick:function(e){return o.handleInputClick(e)},onBlur:this.handleInputBlur},function Q(e){return{onInput:e}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:a,placeholder:s,ref:function(e){o.elementReferences[-1]=e},type:"text",role:"textbox",required:l,value:x})),e,(0,$.createElement)("ul",{className:T+" "+N+" "+D,onMouseLeave:function(e){return o.handleListMouseLeave(e)},id:u+"__listbox",role:"listbox"},w.map(function(e,t){var n=(-1===g?_===t:g===t)&&null===b?" "+L+"--focused":"",r=t%2?" "+L+"--odd":"";return(0,$.createElement)("li",{"aria-selected":g===t,className:""+L+n+r,dangerouslySetInnerHTML:{__html:o.templateSuggestion(e)},id:u+"__option--"+t,key:t,onBlur:function(e){return o.handleOptionBlur(e,t)},onClick:function(e){return o.handleOptionClick(e,t)},onMouseEnter:function(e){return o.handleOptionMouseEnter(e,t)},ref:function(e){o.elementReferences[t]=e},role:"option",tabIndex:"-1"})}),M&&(0,$.createElement)("li",{className:L+" "+L+"--no-results"},p())))},e}($.Component);(t["default"]=s).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},dropdownArrow:r["default"]}},function(e,t,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(36)})},function(e,t,n){e.exports=!n(3)&&!n(4)(function(){return 7!=Object.defineProperty(n(13)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var o=n(2);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var f=n(18),d=n(40),h=n(41),m=n(27),v=n(10),o=Object.assign;e.exports=!o||n(4)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=o({},e)[n]||Object.keys(o({},t)).join("")!=r})?function(e,t){for(var n=m(e),r=arguments.length,o=1,u=d.f,i=h.f;oo;)i(r,n=t[o++])&&(~s(u,n)||u.push(n));return u}},function(e,t,n){var r=n(23),o=Math.max,u=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):u(e,t)}},function(e,t){e.exports=!1},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){var o=r(8),u=r(43),i=r(26),a=r(24)("IE_PROTO"),s=function(){},l="prototype",c=function(){var e,t=r(13)("iframe"),n=i.length;for(t.style.display="none",r(44).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("