{I" class:EFI"BundledAsset;FI"logical_path;FI"roroacms/vendor/select.js;TI" pathname;FI"Y/Applications/Ruby/engines/roroacms/app/assets/javascripts/roroacms/vendor/select.js;TI"content_type;FI"application/javascript;FI" mtime;Fl+°£ÖSI" length;FioÃI" digest;F"%c44c1139e7d17a0096376a1e03d7588bI" source;FI"oÃ(function($){if(typeof $.fn.each2=="undefined"){$.fn.extend({each2:function(c){var j=$([0]),i=-1,l=this.length;while(++i=112&&k<=123}};$document=$(document);nextUid=(function(){var counter=1;return function(){return counter++}}());function indexOf(value,array){var i=0,l=array.length;for(;i=0)notify(e)})}function focus($el){if($el[0]===document.activeElement)return;window.setTimeout(function(){var el=$el[0],pos=$el.val().length,range;$el.focus();if(el.setSelectionRange){el.setSelectionRange(pos,pos)}else if(el.createTextRange){range=el.createTextRange();range.collapse(true);range.moveEnd('character',pos);range.moveStart('character',pos);range.select()}},0)}function killEvent(event){event.preventDefault();event.stopPropagation()}function killEventImmediately(event){event.preventDefault();event.stopImmediatePropagation()}function measureTextWidth(e){if(!sizer){var style=e[0].currentStyle||window.getComputedStyle(e[0],null);sizer=$(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:style.fontSize,fontFamily:style.fontFamily,fontStyle:style.fontStyle,fontWeight:style.fontWeight,letterSpacing:style.letterSpacing,textTransform:style.textTransform,whiteSpace:"nowrap"});sizer.attr("class","select2-sizer");$("body").append(sizer)}sizer.text(e.val());return sizer.width()}function syncCssClasses(dest,src,adapter){var classes,replacements=[],adapted;classes=dest.attr("class");if(typeof classes==="string"){$(classes.split(" ")).each2(function(){if(this.indexOf("select2-")===0){replacements.push(this)}})}classes=src.attr("class");if(typeof classes==="string"){$(classes.split(" ")).each2(function(){if(this.indexOf("select2-")!==0){adapted=adapter(this);if(typeof adapted==="string"&&adapted.length>0){replacements.push(this)}}})}dest.attr("class",replacements.join(" "))}function markMatch(text,term,markup,escapeMarkup){var match=text.toUpperCase().indexOf(term.toUpperCase()),tl=term.length;if(match<0){markup.push(escapeMarkup(text));return}markup.push(escapeMarkup(text.substring(0,match)));markup.push("");markup.push(escapeMarkup(text.substring(match,match+tl)));markup.push("");markup.push(escapeMarkup(text.substring(match+tl,text.length)))}function ajax(options){var timeout,requestSequence=0,handler=null,quietMillis=options.quietMillis||100;return function(query){window.clearTimeout(timeout);timeout=window.setTimeout(function(){requestSequence+=1;var requestNumber=requestSequence,data=options.data,url=options.url,transport=options.transport||$.ajax,type=options.type||'GET',params={};data=data?data.call(this,query.term,query.page,query.context):null;url=(typeof url==='function')?url.call(this,query.term,query.page,query.context):url;if(null!==handler){handler.abort()}if(options.params){if($.isFunction(options.params)){$.extend(params,options.params.call(null))}else{$.extend(params,options.params)}}$.extend(params,{url:url,dataType:options.dataType,data:data,type:type,cache:false,success:function(data){if(requestNumber=0)break}if(index<0)break;token=input.substring(0,index);input=input.substring(index+separator.length);if(token.length>0){token=opts.createSearchChoice(token,selection);if(token!==undefined&&token!==null&&opts.id(token)!==undefined&&opts.id(token)!==null){dupe=false;for(i=0,l=selection.length;i\|])/g,'\\$1');this.container.attr("id",this.containerId);this.body=thunk(function(){return opts.element.closest("body")});mask=$("#select2-drop-mask");if(mask.length==0){mask=$(document.createElement("div"));mask.attr("id","select2-drop-mask").attr("class","select2-drop-mask");mask.hide();mask.appendTo(this.body());mask.bind("mousedown touchstart",function(e){var dropdown=$("#select2-drop"),self;if(dropdown.length>0){self=dropdown.data("select2");if(self.opts.selectOnBlur){self.selectHighlighted({noFocus:true})}self.close()}})}syncCssClasses(this.container,this.opts.element,this.opts.adaptContainerCssClass);this.container.css(evaluate(opts.containerCss));this.container.addClass(evaluate(opts.containerCssClass));this.elementTabIndex=this.opts.element.attr("tabIndex");this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){$(this).select2("focus")}).attr("tabIndex","-1").before(this.container);this.container.data("select2",this);this.dropdown=this.container.find(".select2-drop");this.dropdown.addClass(evaluate(opts.dropdownCssClass));this.dropdown.data("select2",this);this.results=results=this.container.find(resultsSelector);this.search=search=this.container.find("input.select2-input");search.attr("tabIndex",this.elementTabIndex);this.resultsPage=0;this.context=null;this.initContainer();this.initContainerWidth();installFilteredMouseMove(this.results);this.dropdown.delegate(resultsSelector,"mousemove-filtered",this.bind(this.highlightUnderEvent));installDebouncedScroll(80,this.results);this.dropdown.delegate(resultsSelector,"scroll-debounced",this.bind(this.loadMoreIfNeeded));if($.fn.mousewheel){results.mousewheel(function(e,delta,deltaX,deltaY){var top=results.scrollTop(),height;if(deltaY>0&&top-deltaY<=0){results.scrollTop(0);killEvent(e)}else if(deltaY<0&&results.get(0).scrollHeight-results.scrollTop()+deltaY<=results.height()){results.scrollTop(results.get(0).scrollHeight-results.height());killEvent(e)}})}installKeyUpChangeEvent(search);search.bind("keyup-change input paste",this.bind(this.updateResults));search.bind("focus",function(){search.addClass("select2-focused")});search.bind("blur",function(){search.removeClass("select2-focused")});this.dropdown.delegate(resultsSelector,"mouseup",this.bind(function(e){if($(e.target).closest(".select2-result-selectable").length>0){this.highlightUnderEvent(e);this.selectHighlighted(e)}else{this.focusSearch()}killEvent(e)}));this.dropdown.bind("click mouseup mousedown",function(e){e.stopPropagation()});if($.isFunction(this.opts.initSelection)){this.initSelection();this.monitorSource()}if(opts.element.is(":disabled")||opts.element.is("[readonly='readonly']"))this.disable()},destroy:function(){var select2=this.opts.element.data("select2");if(this.propertyObserver){delete this.propertyObserver;this.propertyObserver=null}if(select2!==undefined){select2.container.remove();select2.dropdown.remove();select2.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({"tabIndex":this.elementTabIndex}).show()}},prepareOpts:function(opts){var element,select,idKey,ajaxUrl;element=opts.element;if(element.get(0).tagName.toLowerCase()==="select"){this.select=select=opts.element}if(select){$.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in opts){throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a ",""].join(""));return container},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments);this.focusser.attr("disabled","disabled")},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments);this.focusser.removeAttr("disabled")},opening:function(){this.parent.opening.apply(this,arguments);this.focusser.attr("disabled","disabled");this.opts.element.trigger($.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments);this.focusser.removeAttr("disabled");focus(this.focusser)},focus:function(){if(this.opened()){this.close()}else{this.focusser.removeAttr("disabled");this.focusser.focus()}},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments);this.focusser.removeAttr("disabled");this.focusser.focus()},initContainer:function(){var selection,container=this.container,dropdown=this.dropdown,clickingInside=false;this.selection=selection=container.find(".select2-choice");this.focusser=container.find(".select2-focusser");this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===KEY.PAGE_UP||e.which===KEY.PAGE_DOWN){killEvent(e);return}switch(e.which){case KEY.UP:case KEY.DOWN:this.moveHighlight((e.which===KEY.UP)?-1:1);killEvent(e);return;case KEY.TAB:case KEY.ENTER:this.selectHighlighted();killEvent(e);return;case KEY.ESC:this.cancel(e);killEvent(e);return}}));this.focusser.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===KEY.TAB||KEY.isControl(e)||KEY.isFunctionKey(e)||e.which===KEY.ESC){return}if(this.opts.openOnEnter===false&&e.which===KEY.ENTER){killEvent(e);return}if(e.which==KEY.DOWN||e.which==KEY.UP||(e.which==KEY.ENTER&&this.opts.openOnEnter)){this.open();killEvent(e);return}if(e.which==KEY.DELETE||e.which==KEY.BACKSPACE){if(this.opts.allowClear){this.clear()}killEvent(e);return}}));installKeyUpChangeEvent(this.focusser);this.focusser.bind("keyup-change input",this.bind(function(e){if(this.opened())return;this.open();this.search.val(this.focusser.val());this.focusser.val("");killEvent(e)}));selection.delegate("abbr","mousedown",this.bind(function(e){if(!this.enabled)return;this.clear();killEventImmediately(e);this.close();this.triggerChange();this.selection.focus()}));selection.bind("mousedown",this.bind(function(e){clickingInside=true;if(this.opened()){this.close()}else if(this.enabled){this.open()}killEvent(e);clickingInside=false}));dropdown.bind("mousedown",this.bind(function(){this.search.focus()}));selection.bind("focus",this.bind(function(e){killEvent(e)}));this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){if(!this.opened()){this.container.removeClass("select2-container-active")}}));this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")}));this.setPlaceholder()},clear:function(){var data=this.selection.data("select2-data");this.opts.element.val("");this.selection.find("span").empty();this.selection.removeData("select2-data");this.setPlaceholder();this.opts.element.trigger({type:"removed",val:this.id(data),choice:data});this.triggerChange({removed:data})},initSelection:function(){var selected;if(this.opts.element.val()===""&&this.opts.element.text()===""){this.close();this.setPlaceholder()}else{var self=this;this.opts.initSelection.call(null,this.opts.element,function(selected){if(selected!==undefined&&selected!==null){self.updateSelection(selected);self.close();self.setPlaceholder()}})}},prepareOpts:function(){var opts=this.parent.prepareOpts.apply(this,arguments);if(opts.element.get(0).tagName.toLowerCase()==="select"){opts.initSelection=function(element,callback){var selected=element.find(":selected");if($.isFunction(callback))callback({id:selected.attr("value")||selected.text(),text:selected.text(),element:selected})}}else if("data"in opts){opts.initSelection=opts.initSelection||function(element,callback){var id=element.val();opts.query({matcher:function(term,text,el){return equal(id,opts.id(el))},callback:!$.isFunction(callback)?$.noop:function(filtered){callback(filtered.results.length?filtered.results[0]:null)}})}}return opts},setPlaceholder:function(){var placeholder=this.getPlaceholder();if(this.opts.element.val()===""&&placeholder!==undefined){if(this.select&&this.select.find("option:first").text()!=="")return;this.selection.find("span").html(this.opts.escapeMarkup(placeholder));this.selection.addClass("select2-default");this.selection.find("abbr").hide()}},postprocessResults:function(data,initial){var selected=0,self=this,showSearchInput=true;this.findHighlightableChoices().each2(function(i,elm){if(equal(self.id(elm.data("select2-data")),self.opts.element.val())){selected=i;return false}});this.highlight(selected);if(initial===true){showSearchInput=this.showSearchInput=countResults(data.results)>=this.opts.minimumResultsForSearch;this.dropdown.find(".select2-search")[showSearchInput?"removeClass":"addClass"]("select2-search-hidden");$(this.dropdown,this.container)[showSearchInput?"addClass":"removeClass"]("select2-with-searchbox")}},onSelect:function(data,options){var old=this.opts.element.val();this.opts.element.val(this.id(data));this.updateSelection(data);this.opts.element.trigger({type:"selected",val:this.id(data),choice:data});this.close();if(!options||!options.noFocus)this.selection.focus();if(!equal(old,this.id(data))){this.triggerChange()}},updateSelection:function(data){var container=this.selection.find("span"),formatted;this.selection.data("select2-data",data);container.empty();formatted=this.opts.formatSelection(data,container);if(formatted!==undefined){container.append(this.opts.escapeMarkup(formatted))}this.selection.removeClass("select2-default");if(this.opts.allowClear&&this.getPlaceholder()!==undefined){this.selection.find("abbr").show()}},val:function(){var val,triggerChange=false,data=null,self=this;if(arguments.length===0){return this.opts.element.val()}val=arguments[0];if(arguments.length>1){triggerChange=arguments[1]}if(this.select){this.select.val(val).find(":selected").each2(function(i,elm){data={id:elm.attr("value")||elm.text(),text:elm.text()};return false});this.updateSelection(data);this.setPlaceholder();if(triggerChange){this.triggerChange()}}else{if(this.opts.initSelection===undefined){throw new Error("cannot call val() if initSelection() is not defined");}if(!val&&val!==0){this.clear();if(triggerChange){this.triggerChange()}return}this.opts.element.val(val);this.opts.initSelection(this.opts.element,function(data){self.opts.element.val(!data?"":self.id(data));self.updateSelection(data);self.setPlaceholder();if(triggerChange){self.triggerChange()}})}},clearSearch:function(){this.search.val("");this.focusser.val("")},data:function(value){var data;if(arguments.length===0){data=this.selection.data("select2-data");if(data==undefined)data=null;return data}else{if(!value||value===""){this.clear()}else{this.opts.element.val(!value?"":this.id(value));this.updateSelection(value)}}}});MultiSelect2=clazz(AbstractSelect2,{createContainer:function(){var container=$(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["
    ","
  • "," ","
  • ","
",""].join(""));return container},prepareOpts:function(){var opts=this.parent.prepareOpts.apply(this,arguments);if(opts.element.get(0).tagName.toLowerCase()==="select"){opts.initSelection=function(element,callback){var data=[];element.find(":selected").each2(function(i,elm){data.push({id:elm.attr("value")||elm.text(),text:elm.text(),element:elm[0]})});callback(data)}}else if("data"in opts){opts.initSelection=opts.initSelection||function(element,callback){var ids=splitVal(element.val(),opts.separator);opts.query({matcher:function(term,text,el){return $.grep(ids,function(id){return equal(id,opts.id(el))}).length},callback:!$.isFunction(callback)?$.noop:function(filtered){callback(filtered.results)}})}}return opts},initContainer:function(){var selector=".select2-choices",selection;this.searchContainer=this.container.find(".select2-search-field");this.selection=selection=this.container.find(selector);this.search.bind("input paste",this.bind(function(){if(!this.enabled)return;if(!this.opened()){this.open()}}));this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===KEY.BACKSPACE&&this.search.val()===""){this.close();var choices,selected=selection.find(".select2-search-choice-focus");if(selected.length>0){this.unselect(selected.first());this.search.width(10);killEvent(e);return}choices=selection.find(".select2-search-choice:not(.select2-locked)");if(choices.length>0){choices.last().addClass("select2-search-choice-focus")}}else{selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")}if(this.opened()){switch(e.which){case KEY.UP:case KEY.DOWN:this.moveHighlight((e.which===KEY.UP)?-1:1);killEvent(e);return;case KEY.ENTER:case KEY.TAB:this.selectHighlighted();killEvent(e);return;case KEY.ESC:this.cancel(e);killEvent(e);return}}if(e.which===KEY.TAB||KEY.isControl(e)||KEY.isFunctionKey(e)||e.which===KEY.BACKSPACE||e.which===KEY.ESC){return}if(e.which===KEY.ENTER){if(this.opts.openOnEnter===false){return}else if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}}this.open();if(e.which===KEY.PAGE_UP||e.which===KEY.PAGE_DOWN){killEvent(e)}}));this.search.bind("keyup",this.bind(this.resizeSearch));this.search.bind("blur",this.bind(function(e){this.container.removeClass("select2-container-active");this.search.removeClass("select2-focused");if(!this.opened())this.clearSearch();e.stopImmediatePropagation()}));this.container.delegate(selector,"mousedown",this.bind(function(e){if(!this.enabled)return;if($(e.target).closest(".select2-search-choice").length>0){return}this.clearPlaceholder();this.open();this.focusSearch();e.preventDefault()}));this.container.delegate(selector,"focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active");this.dropdown.addClass("select2-drop-active");this.clearPlaceholder()}));this.clearSearch()},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments);this.search.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments);this.search.attr("disabled",true)},initSelection:function(){var data;if(this.opts.element.val()===""&&this.opts.element.text()===""){this.updateSelection([]);this.close();this.clearSearch()}if(this.select||this.opts.element.val()!==""){var self=this;this.opts.initSelection.call(null,this.opts.element,function(data){if(data!==undefined&&data!==null){self.updateSelection(data);self.close();self.clearSearch()}})}},clearSearch:function(){var placeholder=this.getPlaceholder();if(placeholder!==undefined&&this.getVal().length===0&&this.search.hasClass("select2-focused")===false){this.search.val(placeholder).addClass("select2-default");this.resizeSearch()}else{this.search.val("").width(10)}},clearPlaceholder:function(){if(this.search.hasClass("select2-default")){this.search.val("").removeClass("select2-default")}},opening:function(){this.parent.opening.apply(this,arguments);this.clearPlaceholder();this.resizeSearch();this.focusSearch();this.opts.element.trigger($.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close();this.search.focus();this.opts.element.triggerHandler("focus")},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(data){var ids=[],filtered=[],self=this;$(data).each(function(){if(indexOf(self.id(this),ids)<0){ids.push(self.id(this));filtered.push(this)}});data=filtered;this.selection.find(".select2-search-choice").remove();$(data).each(function(){self.addSelectedChoice(this)});self.postprocessResults()},tokenize:function(){var input=this.search.val();input=this.opts.tokenizer(input,this.data(),this.bind(this.onSelect),this.opts);if(input!=null&&input!=undefined){this.search.val(input);if(input.length>0){this.open()}}},onSelect:function(data,options){this.addSelectedChoice(data);this.opts.element.trigger({type:"selected",val:this.id(data),choice:data});if(this.select||!this.opts.closeOnSelect)this.postprocessResults();if(this.opts.closeOnSelect){this.close();this.search.width(10)}else{if(this.countSelectableResults()>0){this.search.width(10);this.resizeSearch();if(this.val().length>=this.getMaximumSelectionSize()){this.updateResults(true)}this.positionDropdown()}else{this.close();this.search.width(10)}}this.triggerChange({added:data});if(!options||!options.noFocus)this.focusSearch()},cancel:function(){this.close();this.focusSearch()},addSelectedChoice:function(data){var enableChoice=!data.locked,enabledItem=$("
  • "+"
    "+" ×"+"
  • "),disabledItem=$("
  • "+"
    "+"
  • ");var choice=enableChoice?enabledItem:disabledItem,id=this.id(data),val=this.getVal(),formatted;formatted=this.opts.formatSelection(data,choice.find("div"));if(formatted!=undefined){choice.find("div").replaceWith("
    "+this.opts.escapeMarkup(formatted)+"
    ")}if(enableChoice){choice.find(".select2-search-choice-close").bind("mousedown",killEvent).bind("click dblclick",this.bind(function(e){if(!this.enabled)return;$(e.target).closest(".select2-search-choice").fadeOut('fast',this.bind(function(){this.unselect($(e.target));this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");this.close();this.focusSearch()})).dequeue();killEvent(e)})).bind("focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active");this.dropdown.addClass("select2-drop-active")}))}choice.data("select2-data",data);choice.insertBefore(this.searchContainer);val.push(id);this.setVal(val)},unselect:function(selected){var val=this.getVal(),data,index;selected=selected.closest(".select2-search-choice");if(selected.length===0){throw"Invalid argument: "+selected+". Must be .select2-search-choice";}data=selected.data("select2-data");if(!data){return}index=indexOf(this.id(data),val);if(index>=0){val.splice(index,1);this.setVal(val);if(this.select)this.postprocessResults()}selected.remove();this.opts.element.trigger({type:"removed",val:this.id(data),choice:data});this.triggerChange({removed:data})},postprocessResults:function(){var val=this.getVal(),choices=this.results.find(".select2-result"),compound=this.results.find(".select2-result-with-children"),self=this;choices.each2(function(i,choice){var id=self.id(choice.data("select2-data"));if(indexOf(id,val)>=0){choice.addClass("select2-selected");choice.find(".select2-result-selectable").addClass("select2-selected")}});compound.each2(function(i,choice){if(!choice.is('.select2-result-selectable')&&choice.find(".select2-result-selectable:not(.select2-selected)").length===0){choice.addClass("select2-selected")}});if(this.highlight()==-1){self.highlight(0)}},resizeSearch:function(){var minimumWidth,left,maxWidth,containerLeft,searchWidth,sideBorderPadding=getSideBorderPadding(this.search);minimumWidth=measureTextWidth(this.search)+10;left=this.search.offset().left;maxWidth=this.selection.width();containerLeft=this.selection.offset().left;searchWidth=maxWidth-(left-containerLeft)-sideBorderPadding;if(searchWidth1){triggerChange=arguments[1]}if(!val&&val!==0){this.opts.element.val("");this.updateSelection([]);this.clearSearch();if(triggerChange){this.triggerChange()}return}this.setVal(val);if(this.select){this.opts.initSelection(this.select,this.bind(this.updateSelection));if(triggerChange){this.triggerChange()}}else{if(this.opts.initSelection===undefined){throw new Error("val() cannot be called if initSelection() is not defined");}this.opts.initSelection(this.opts.element,function(data){var ids=$(data).map(self.id);self.setVal(ids);self.updateSelection(data);self.clearSearch();if(triggerChange){self.triggerChange()}})}this.clearSearch()},onSortStart:function(){if(this.select){throw new Error("Sorting of elements is not supported when attached to instead.");}this.search.width(0);this.searchContainer.hide()},onSortEnd:function(){var val=[],self=this;this.searchContainer.show();this.searchContainer.appendTo(this.searchContainer.parent());this.resizeSearch();this.selection.find(".select2-search-choice").each(function(){val.push(self.opts.id($(this).data("select2-data")))});this.setVal(val);this.triggerChange()},data:function(values){var self=this,ids;if(arguments.length===0){return this.selection.find(".select2-search-choice").map(function(){return $(this).data("select2-data")}).get()}else{if(!values){values=[]}ids=$.map(values,function(e){return self.opts.id(e)});this.setVal(ids);this.updateSelection(values);this.clearSearch()}}});$.fn.select2=function(){var args=Array.prototype.slice.call(arguments,0),opts,select2,value,multiple,allowedMethods=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];this.each(function(){if(args.length===0||typeof(args[0])==="object"){opts=args.length===0?{}:$.extend({},args[0]);opts.element=$(this);if(opts.element.get(0).tagName.toLowerCase()==="select"){multiple=opts.element.attr("multiple")}else{multiple=opts.multiple||false;if("tags"in opts){opts.multiple=multiple=true}}select2=multiple?new MultiSelect2():new SingleSelect2();select2.init(opts)}else if(typeof(args[0])==="string"){if(indexOf(args[0],allowedMethods)<0){throw"Unknown method: "+args[0];}value=undefined;select2=$(this).data("select2");if(select2===undefined)return;if(args[0]==="container"){value=select2.container}else{value=select2[args[0]].apply(select2,args.slice(1))}if(value!==undefined){return false}}else{throw"Invalid arguments to select2 plugin: "+args;}});return(value===undefined)?this:value};$.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:true,openOnEnter:true,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(result,container,query,escapeMarkup){var markup=[];markMatch(result.text,query.term,markup,escapeMarkup);return markup.join("")},formatSelection:function(data,container){return data?data.text:undefined},sortResults:function(results,container,query){return results},formatResultCssClass:function(data){return undefined},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(input,min){var n=min-input.length;return"Please enter "+n+" more character"+(n==1?"":"s")},formatInputTooLong:function(input,max){var n=input.length-max;return"Please enter "+n+" less character"+(n==1?"":"s")},formatSelectionTooBig:function(limit){return"You can only select "+limit+" item"+(limit==1?"":"s")},formatLoadMore:function(pageNumber){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e.id},matcher:function(term,text){return text.toUpperCase().indexOf(term.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:defaultTokenizer,escapeMarkup:function(markup){var replace_map={'\\':'\','&':'&','<':'<','>':'>','"':'"',"'":''',"/":'/'};return String(markup).replace(/[&<>"'/\\]/g,function(match){return replace_map[match[0]]})},blurOnChange:false,selectOnBlur:false,adaptContainerCssClass:function(c){return c},adaptDropdownCssClass:function(c){return null}};window.Select2={query:{ajax:ajax,local:local,tags:tags},util:{debounce:debounce,markMatch:markMatch},"class":{"abstract":AbstractSelect2,"single":SingleSelect2,"multi":MultiSelect2}}}(jQuery)); ;TI"required_assets_digest;F"%a217e2d96483387fe94df965934a5f5eI" _version;F"%134d714864361d96664b8e1779275370