!function(t,e,s){"use strict";function a(t){t.element;return t.id?""+t.text:t.text}s(".select2").select2({dropdownAutoWidth:!0,width:"100%"}),s(".select2-placeholder").select2({dropdownAutoWidth:!0,width:"100%",placeholder:"Select a state",allowClear:!0}),s(".select2-icons").select2({dropdownAutoWidth:!0,width:"100%",minimumResultsForSearch:1/0,templateResult:a,templateSelection:a,escapeMarkup:function(t){return t}}),s(".select2-placeholder-multiple").select2({dropdownAutoWidth:!0,width:"100%",placeholder:"Select State"}),s(".hide-search").select2({dropdownAutoWidth:!0,width:"100%",minimumResultsForSearch:1/0}),s(".max-length").select2({dropdownAutoWidth:!0,width:"100%",maximumSelectionLength:2,placeholder:"Select maximum 2 items"});var o=s(".js-example-events");o.select2({dropdownAutoWidth:!0,width:"100%",placeholder:"DOM Events"}),o.on("select2:open",(function(t){alert("Open Event Fired.")})),o.on("select2:close",(function(t){alert("Close Event Fired.")})),o.on("select2:select",(function(t){alert("Select Event Fired.")})),o.on("select2:unselect",(function(t){alert("Unselect Event Fired.")})),o.on("change",(function(t){alert("Change Event Fired.")}));var i=s(".js-example-programmatic").select2({dropdownAutoWidth:!0,width:"100%"}),r=s(".js-example-programmatic-multi").select2();r.select2({dropdownAutoWidth:!0,width:"100%",placeholder:"Programmatic Events"}),s(".js-programmatic-set-val").on("click",(function(){i.val("CA").trigger("change")})),s(".js-programmatic-open").on("click",(function(){i.select2("open")})),s(".js-programmatic-close").on("click",(function(){i.select2("close")})),s(".js-programmatic-init").on("click",(function(){i.select2()})),s(".js-programmatic-destroy").on("click",(function(){i.select2("destroy")})),s(".js-programmatic-multi-set-val").on("click",(function(){r.val(["CA","AL"]).trigger("change")})),s(".js-programmatic-multi-clear").on("click",(function(){r.val(null).trigger("change")}));function l(t,e){return 0===e.toUpperCase().indexOf(t.toUpperCase())}function c(t){return t.id?s('
'+t.text+""):t.text}s(".select2-data-array").select2({dropdownAutoWidth:!0,width:"100%",data:[{id:0,text:"enhancement"},{id:1,text:"bug"},{id:2,text:"duplicate"},{id:3,text:"invalid"},{id:4,text:"wontfix"}]}),s(".select2-data-ajax").select2({dropdownAutoWidth:!0,width:"100%",placeholder:"Loading remote data",ajax:{url:"http://api.github.com/search/repositories",dataType:"json",delay:250,data:function(t){return{q:t.term,page:t.page}},processResults:function(t,e){return e.page=e.page||1,{results:t.items,pagination:{more:30*e.page
"},templateSelection:function(t){return t.full_name||t.text}}),s(".select2-tags").select2({dropdownAutoWidth:!0,width:"100%",tags:!0}),s(".select2-tokenizer").select2({dropdownAutoWidth:!0,width:"100%",tags:!0,tokenSeparators:[","," "]}),s.fn.select2.amd.require(["select2/compat/matcher"],(function(t){s(".select2-customize-result").select2({dropdownAutoWidth:!0,width:"100%",placeholder:"Search by 'a'",matcher:t(l)})})),s(".select2-language").select2({dropdownAutoWidth:!0,width:"100%",language:"es"}),s(".select2-rtl").select2({dropdownAutoWidth:!0,width:"100%",placeholder:"RTL Select",dir:"rtl"}),s(".select2-diacritics").select2({dropdownAutoWidth:!0,width:"100%",placeholder:"Type 'aero'"}),s(".select2-theme").select2({dropdownAutoWidth:!0,width:"100%",placeholder:"Classic Theme",theme:"classic"}),s(".select2-templating").select2({dropdownAutoWidth:!0,width:"100%",templateResult:c,templateSelection:c}),s(".select2-size-lg").select2({dropdownAutoWidth:!0,width:"100%",containerCssClass:"select-lg"}),s(".select2-size-sm").select2({dropdownAutoWidth:!0,width:"100%",containerCssClass:"select-sm"}),s(".select2-size-xs").select2({dropdownAutoWidth:!0,width:"100%",containerCssClass:"select-xs"}),s(".select2-bg").each((function(t,e){var a="",o="",i=s(this).data("bgcolor");a=s(this).data("bgcolor-variation"),""!==(o=s(this).data("text-variation"))&&(o=" "+o),""!==a&&(a=" bg-"+a);var r="bg-"+i+a+" "+s(this).data("text-color")+o+" border-"+i+" border-darken-2 ";s(this).select2({containerCssClass:r})})),s(".select2-border").each((function(t,e){var a="",o="",i=s(this).data("border-color");""!==(o=s(this).data("text-variation"))&&(o=" "+o),""!==(a=s(this).data("border-variation"))&&(a=" border-"+a);var r="border-"+i+" "+a+" "+s(this).data("text-color")+o;s(this).select2({dropdownAutoWidth:!0,width:"100%",containerCssClass:r})})),s(".select2-menu-bg").each((function(t,e){var a="",o="",i=s(this).data("bgcolor");""!==(a=s(this).data("bgcolor-variation"))&&(a=" bg-"+a),""!==(o=s(this).data("text-variation"))&&(o=" "+o);var r="bg-"+i+a+" "+s(this).data("text-color")+o+" border-"+i+" border-darken-2 ";s(this).select2({dropdownAutoWidth:!0,width:"100%",dropdownCssClass:r})})),s(".select2-full-bg").each((function(t,e){var a="",o="",i=s(this).data("bgcolor");""!==(a=s(this).data("bgcolor-variation"))&&(a=" bg-"+a),""!==(o=s(this).data("text-variation"))&&(o=" "+o);var r="bg-"+i+a+" "+s(this).data("text-color")+o+" border-"+i+" border-darken-2 ";s(this).select2({dropdownAutoWidth:!0,width:"100%",containerCssClass:r,dropdownCssClass:r})})),s("select[data-text-color]").each((function(t,e){var a,o=s(this).data("text-color");""!==(a=s(this).data("text-variation"))&&(a=" "+a),s(this).next(".select2").find(".select2-selection__rendered").addClass(o+a)}))}(window,document,jQuery);