jQuery(function(a){function c(){var d={formatMatches:function(e){if(1===e){return suffice_enhanced_select_params.i18n_matches_1}return suffice_enhanced_select_params.i18n_matches_n.replace("%qty%",e)},formatNoMatches:function(){return suffice_enhanced_select_params.i18n_no_matches},formatAjaxError:function(){return suffice_enhanced_select_params.i18n_ajax_error},formatInputTooShort:function(e,f){var g=f-e.length;if(1===g){return suffice_enhanced_select_params.i18n_input_too_short_1}return suffice_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",g)},formatInputTooLong:function(f,e){var g=f.length-e;if(1===g){return suffice_enhanced_select_params.i18n_input_too_long_1}return suffice_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",g)},formatSelectionTooBig:function(e){if(1===e){return suffice_enhanced_select_params.i18n_selection_too_long_1}return suffice_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",e)},formatLoadMore:function(){return suffice_enhanced_select_params.i18n_load_more},formatSearching:function(){return suffice_enhanced_select_params.i18n_searching}};return d}function b(d){if(d.id&&a(d.element).data("icon")){return' '+d.text}return d.text}a(document.body).on("suffice-enhanced-select-init",function(){a(":input.suffice-enhanced-select-icons").filter(":not(.enhanced)").each(function(){var d=a.extend({minimumResultsForSearch:10,allowClear:true,escapeMarkup:function(e){return e},placeholder:a(this).data("placeholder"),templateResult:b},c());a(this).select2(d).addClass("enhanced")})}).trigger("suffice-enhanced-select-init")});