returnc(a,b)},d}),a("select2/data/array",["./select","../utils","jquery"],function(a,b,c){functiond(a,b){varc=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}returnb.Extend(d,a),d.prototype.select=function(a){varb=this.$element.find('option[value="'+a.id+'"]');0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){functionb(a){returnfunction(){returnc(this).val()==a.id}}for(vard=this,e=this.$element.find("option"),f=e.map(function(){returnd.item(c(this)).id}).get(),g=c(),h=0;h<a.length;h++){vari=this._normalizeItem(a[h]);if(c.inArray(i.id,f)>=0){varj=e.filter(b(i)),k=this.item(j),l=(c.extend(!0,{},k,i),this.option(k));j.replaceWith(l)}else{varm=this.option(i);if(i.children){varn=this.convertToOptions(i.children);m.append(n)}g=g.add(m)}}returng},d}),a("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){functiond(b,c){this.ajaxOptions=this._applyDefaults(c.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),a.__super__.constructor.call(this,b,c)}returnb.Extend(d,a),d.prototype._applyDefaults=function(a){varb={data:function(a){return{q:a.term}},transport:function(a,b,d){vare=c.ajax(a);returne.then(b),e.fail(d),e}};returnc.extend({},b,a,!0)},d.prototype.processResults=function(a){returna},d.prototype.query=function(a,b){functiond(){vard=f.transport(f,function(d){varf=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){});e._request=d}vare=this;this._request&&(this._request.abort(),this._request=null);varf=c.extend({type:"GET"},this.ajaxOptions);"function"==typeoff.url&&(f.url=f.url(a)),"function"==typeoff.data&&(f.data=f.data(a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),a("select2/data/tags",["jquery"],function(a){functionb(b,c,d){vare=d.get("tags"),f=d.get("createTag");if(void0!==f&&(this.createTag=f),b.call(this,c,d),a.isArray(e))for(varg=0;g<e.length;g++){varh=e[g],i=this._normalizeItem(h),j=this.option(i);this.$element.append(j)}}returnb.prototype.query=function(a,b,c){functiond(a,f){for(varg=a.results,h=0;h<g.length;h++){vari=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)returnf?!1:(a.data=g,voidc(a))}if(f)return!0;varl=e.createTag(b);if(null!=l){varm=e.option(l);m.attr("data-select2-tag",!0),e.addOptions(m),e.insertTag(g,l)}a.results=g,c(a)}vare=this;returnthis._removeOldTags(),null==b.term||null!=b.page?voida.call(this,b,c):voida.call(this,b,d)},b.prototype.createTag=function(b,c){vard=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(){varb=(this._lastTag,this.$element.find("option[data-select2-tag]"));b.each(function(){this.selected||a(this).remove()})},b}),a("select2/data/tokenizer",["jquery"],function(a){functionb(a,b,c){vard=c.get("tokenizer");void0!==d&&(this.tokenizer=d),a.call(this,b,c)}returnb.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(a,b,c){functiond(a){e.select(a)}vare=this;b.term=b.term||"";varf=this.tokenizer(b,this.options,d);f.term!==b.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.focus()),b.term=f.term),a.call(this,b,c)},b.prototype.tokenizer=function(b,c,d,e){for(varf=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){varj=g[h];if(-1!==a.inArray(j,f)){vark=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);e(m),g=g.substr(h+1)||"",h=0}elseh++}return{term:g}},b}),a("select2/data/minimumInputLength",[],function(){functiona(a,b,c){t