diff --git a/dist/suggestions.js b/dist/suggestions.js index 0b70e23..5b32e71 100644 --- a/dist/suggestions.js +++ b/dist/suggestions.js @@ -1 +1 @@ -!function(){function t(e,i,n){function s(o,h){if(!i[o]){if(!e[o]){var a="function"==typeof require&&require;if(!h&&a)return a(o,!0);if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var u=i[o]={exports:{}};e[o][0].call(u.exports,function(t){return s(e[o][1][t]||t)},u,u.exports,t,e,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o-1},o.prototype.value=function(t){if(this.selected=t,this.el.value=this.getItemValue(t),document.createEvent){var e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!1),this.el.dispatchEvent(e)}else this.el.fireEvent("onchange")},o.prototype.getCandidates=function(t){var e={pre:"",post:"",extract:function(t){return this.getItemValue(t)}.bind(this)};t(this.options.filter?s.filter(this.query,this.data,e):this.data.map(function(t){for(var e=this.getItemValue(t),i=this.normalize(e),n=i.lastIndexOf(this.query);n>-1;){var s=n+this.query.length;e=e.slice(0,n)+""+e.slice(n,s)+""+e.slice(s),n=i.slice(0,n).lastIndexOf(this.query)}return{original:t,string:e}}.bind(this)))},o.prototype.getItemValue=function(t){return t},e.exports=o},{"./list":4,fuzzy:2,xtend:3}]},{},[1]); +!function(){function t(e,i,n){function s(o,h){if(!i[o]){if(!e[o]){var a="function"==typeof require&&require;if(!h&&a)return a(o,!0);if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var u=i[o]={exports:{}};e[o][0].call(u.exports,function(t){return s(e[o][1][t]||t)},u,u.exports,t,e,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o-1},o.prototype.value=function(t){if(this.selected=t,this.el.value=this.getItemValue(t),document.createEvent){var e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!1),this.el.dispatchEvent(e)}else this.el.fireEvent("onchange")},o.prototype.getCandidates=function(t){var e,i={pre:"",post:"",extract:function(t){return this.getItemValue(t)}.bind(this)};this.options.filter?(e=s.filter(this.query,this.data,i),e=e.map(function(t){return{original:t.original,string:this.render(t.original,t.string)}}.bind(this))):e=this.data.map(function(t){return{original:t,string:this.render(t)}}.bind(this)),t(e)},o.prototype.getItemValue=function(t){return t},o.prototype.render=function(t,e){if(e)return e;for(var i=t.original?this.getItemValue(t.original):this.getItemValue(t),n=this.normalize(i),s=n.lastIndexOf(this.query);s>-1;){var r=s+this.query.length;i=i.slice(0,s)+""+i.slice(s,r)+""+i.slice(r),s=n.slice(0,s).lastIndexOf(this.query)}return i},e.exports=o},{"./list":4,fuzzy:2,xtend:3}]},{},[1]);