1// niceSelect 2!function(e){e.fn.niceSelect=function(t){if("string"==typeof t)return"update"==t?this.each(function(){var t=e(this),l=e(this).next(".nice-select"),c=l.hasClass("open");l.length&&(l.remove(),s(t),c&&t.next().trigger("click"))}):"destroy"==t?(this.each(function(){var t=e(this),s=e(this).next(".nice-select");s.length&&(s.remove(),t.css("display",""))}),0==e(".nice-select").length&&e(document).off(".nice_select")):console.log('Method "'+t+'" does not exist.'),this;function s(t){t.after(e("<div></div>").addClass("nice-select").addClass(t.attr("class")||"").addClass(t.attr("disabled")?"disabled":"").addClass(t.attr("multiple")?"has-multiple":"").attr("tabindex",t.attr("disabled")?null:"0").html(t.attr("multiple")?'<span class="multiple-options"></span><div class="nice-select-search-box"><input type="text" class="nice-select-search" placeholder="Search..."/></div><ul class="list"></ul>':'<span class="current"></span><div class="nice-select-search-box"><input type="text" class="nice-select-search" placeholder="Search..."/></div><ul class="list"></ul>'));var s=t.next(),l=t.find("option");if(t.attr("multiple")){var c="";(a=t.find("option:selected")).each(function(){$selected_option=e(this),$selected_text=$selected_option.data("display")||$selected_option.text(),c+='<span class="current">'+$selected_text+"</span>"}),$select_placeholder=t.data("placeholder")||t.attr("placeholder"),$select_placeholder=""==$select_placeholder?"Select":$select_placeholder,c=""==c?$select_placeholder:c,s.find(".multiple-options").html(c)}else{var a=t.find("option:selected");s.find(".current").html(a.data("display")||a.text())}l.each(function(t){var l=e(this),c=l.data("display");s.find("ul").append(e("<li></li>").attr("data-value",l.val()).attr("data-display",c||null).addClass("option"+(l.is(":selected")?" selected":"")+(l.is(":disabled")?" disabled":"")).html(l.text()))})}this.hide(),this.each(function(){var t=e(this);t.next().hasClass("nice-select")||s(t)}),e(document).off(".nice_select"),e(document).on("click.nice_select",".nice-select",function(t){var s=e(this);e(".nice-select").not(s).removeClass("open"),s.toggleClass("open"),s.hasClass("open")?(s.find(".option"),s.find(".nice-select-search").val(""),s.find(".nice-select-search").focus(),s.find(".focus").removeClass("focus"),s.find(".selected").addClass("focus"),s.find("ul li").show()):s.focus()}),e(document).on("click",".nice-select-search-box",function(e){return e.stopPropagation(),!1}),e(document).on("click.nice_select",function(t){0===e(t.target).closest(".nice-select").length&&e(".nice-select").removeClass("open").find(".option")}),e(document).on("click.nice_select",".nice-select .option:not(.disabled)",function(t){var s=e(this),l=s.closest(".nice-select");if(l.hasClass("has-multiple"))s.hasClass("selected")?s.removeClass("selected"):s.addClass("selected"),$selected_html="",$selected_values=[],l.find(".selected").each(function(){$selected_option=e(this);var t=$selected_option.data("display")||$selected_option.text();$selected_html+='<span class="current">'+t+"</span>",$selected_values.push($selected_option.data("value"))}),$select_placeholder=l.prev("select").data("placeholder")||l.prev("select").attr("placeholder"),$select_placeholder=""==$select_placeholder?"Select":$select_placeholder,$selected_html=""==$selected_html?$select_placeholder:$selected_html,l.find(".multiple-options").html($selected_html),l.prev("select").val($selected_values).trigger("change");else{l.find(".selected").removeClass("selected"),s.addClass("selected");var c=s.data("display")||s.text();l.find(".current").text(c),l.prev("select").val(s.data("value")).trigger("change")}}),e(document).on("keydown.nice_select",".nice-select",function(t){var s=e(this),l=e(s.find(".focus")||s.find(".list .option.selected"));if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?l.trigger("click"):s.trigger("click"),!1;if(40==t.keyCode){if(s.hasClass("open")){var c=l.nextAll(".option:not(.disabled)").first();c.length>0&&(s.find(".focus").removeClass("focus"),c.addClass("focus"))}else s.trigger("click");return!1}if(38==t.keyCode){if(s.hasClass("open")){var a=l.prevAll(".option:not(.disabled)").first();a.length>0&&(s.find(".focus").removeClass("focus"),a.addClass("focus"))}else s.trigger("click");return!1}if(27==t.keyCode)s.hasClass("open")&&s.trigger("click");else if(9==t.keyCode&&s.hasClass("open"))return!1}),e(document).on("keydown.nice-select-search",".nice-select",function(){var t=e(this),s=t.find(".nice-select-search").val(),l=t.find("ul li");if(""==s)l.show();else if(t.hasClass("open")){s=s.toLowerCase();var c=new RegExp(s);0<l.length?l.each(function(){var t=e(this),s=t.text().toLowerCase();c.test(s)?t.show():t.hide()}):l.show()}});var l=document.createElement("a").style;return l.cssText="pointer-events:auto","auto"!==l.pointerEvents&&e("html").addClass("no-csspointerevents"),this}}(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.