diff --git a/docs/assets/js/docs.min.js b/docs/assets/js/docs.min.js index b28ddeb2c..748adf18d 100644 --- a/docs/assets/js/docs.min.js +++ b/docs/assets/js/docs.min.js @@ -1,14 +1,14 @@ !function(a){"undefined"==typeof a.fn.each2&&a.fn.extend({each2:function(b){for(var c=a([0]),d=-1,e=this.length;++dc;c+=1)if(a===b[c])return c;return-1}function d(a,b){return a===b}function e(b,c){var d,e,f;if(null===b||b.length<1)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function f(a){return a.outerWidth(!1)-a.width()}function g(c){var d="keyup-change-value";c.bind("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.bind("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function h(c){c.bind("mousemove",function(c){var d=F;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function i(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function j(a){var b,c=!1;return function(){return c===!1&&(b=a(),c=!0),b}}function k(a,b){var d=i(a,function(a){b.trigger("scroll-debounced",a)});b.bind("scroll",function(a){c(a.target,b.get())>=0&&d(a)})}function l(a){a[0]!==document.activeElement&&window.setTimeout(function(){var b,c=a[0],d=a.val().length;a.focus(),c.setSelectionRange?c.setSelectionRange(d,d):c.createTextRange&&(b=c.createTextRange(),b.collapse(!0),b.moveEnd("character",d),b.moveStart("character",d),b.select())},0)}function m(a){a.preventDefault(),a.stopPropagation()}function n(a){a.preventDefault(),a.stopImmediatePropagation()}function o(b){if(!E){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);E=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),E.attr("class","select2-sizer"),a("body").append(E)}return E.text(b.val()),E.width()}function p(b,c,d){var e,f,g=[];e=b.attr("class"),"string"==typeof e&&a(e.split(" ")).each2(function(){0===this.indexOf("select2-")&&g.push(this)}),e=c.attr("class"),"string"==typeof e&&a(e.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(f=d(this),"string"==typeof f&&f.length>0&&g.push(this))}),b.attr("class",g.join(" "))}function q(a,b,c,d){var e=a.toUpperCase().indexOf(b.toUpperCase()),f=b.length;return 0>e?void c.push(d(a)):(c.push(d(a.substring(0,e))),c.push(""),c.push(d(a.substring(e,e+f))),c.push(""),void c.push(d(a.substring(e+f,a.length))))}function r(b){var c,d=0,e=null,f=b.quietMillis||100;return function(g){window.clearTimeout(c),c=window.setTimeout(function(){d+=1;var c=d,f=b.data,h=b.url,i=b.transport||a.ajax,j=b.type||"GET",k={};f=f?f.call(this,g.term,g.page,g.context):null,h="function"==typeof h?h.call(this,g.term,g.page,g.context):h,null!==e&&e.abort(),b.params&&(a.isFunction(b.params)?a.extend(k,b.params.call(null)):a.extend(k,b.params)),a.extend(k,{url:h,dataType:b.dataType,data:f,type:j,cache:!1,success:function(a){if(!(d>c)){var e=b.results(a,g.page);g.callback(e)}}}),e=i.call(null,k)},f)}}function s(b){var c,d=b,e=function(a){return""+a.text};return a.isArray(d)||(e=d.text,a.isFunction(e)||(c=d.text,e=function(a){return a[c]}),d=d.results),function(b){var c,f=b.term,g={results:[]};return""===f?void b.callback({results:d}):(c=function(d,g){var h,i;if(d=d[0],d.children){h={};for(i in d)d.hasOwnProperty(i)&&(h[i]=d[i]);h.children=[],a(d.children).each2(function(a,b){c(b,h.children)}),(h.children.length||b.matcher(f,e(h),d))&&g.push(h)}else b.matcher(f,e(d),d)&&g.push(d)},a(d).each2(function(a,b){c(b,g.results)}),void b.callback(g))}}function t(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]};a(d?c():c).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g)}}function u(b){if(a.isFunction(b))return!0;if(!b)return!1;throw new Error("formatterName must be a function or a falsy value")}function v(b){return a.isFunction(b)?b():b}function w(b){var c=0;return a.each(b,function(a,b){b.children?c+=w(b.children):c++}),c}function x(a,c,e,f){var g,h,i,j,k,l=a,m=!1;if(!f.createSearchChoice||!f.tokenSeparators||f.tokenSeparators.length<1)return b;for(;;){for(h=-1,i=0,j=f.tokenSeparators.length;j>i&&(k=f.tokenSeparators[i],h=a.indexOf(k),!(h>=0));i++);if(0>h)break;if(g=a.substring(0,h),a=a.substring(h+k.length),g.length>0&&(g=f.createSearchChoice(g,c),g!==b&&null!==g&&f.id(g)!==b&&null!==f.id(g))){for(m=!1,i=0,j=c.length;j>i;i++)if(d(f.id(g),f.id(c[i]))){m=!0;break}m||e(g)}}return l!==a?a:void 0}function y(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var z,A,B,C,D,E,F,G;z={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case z.LEFT:case z.RIGHT:case z.UP:case z.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case z.SHIFT:case z.CTRL:case z.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},G=a(document),D=function(){var a=1;return function(){return a++}}(),G.bind("mousemove",function(a){F={x:a.pageX,y:a.pageY}}),A=y(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,f,i=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+D()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=j(function(){return c.element.closest("body")}),f=a("#select2-drop-mask"),0==f.length&&(f=a(document.createElement("div")),f.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),f.hide(),f.appendTo(this.body()),f.bind("mousedown touchstart",function(){var b,c=a("#select2-drop");c.length>0&&(b=c.data("select2"),b.opts.selectOnBlur&&b.selectHighlighted({noFocus:!0}),b.close())})),p(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(v(c.containerCss)),this.container.addClass(v(c.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){a(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(v(c.dropdownCssClass)),this.dropdown.data("select2",this),this.results=d=this.container.find(i),this.search=e=this.container.find("input.select2-input"),e.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),this.initContainerWidth(),h(this.results),this.dropdown.delegate(i,"mousemove-filtered",this.bind(this.highlightUnderEvent)),k(80,this.results),this.dropdown.delegate(i,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),m(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),m(a))}),g(e),e.bind("keyup-change input paste",this.bind(this.updateResults)),e.bind("focus",function(){e.addClass("select2-focused")}),e.bind("blur",function(){e.removeClass("select2-focused")}),this.dropdown.delegate(i,"mouseup",this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0?(this.highlightUnderEvent(b),this.selectHighlighted(b)):this.focusSearch(),m(b)})),this.dropdown.bind("click mouseup mousedown",function(a){a.stopPropagation()}),a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(c.element.is(":disabled")||c.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var a=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),a!==b&&(a.container.remove(),a.dropdown.remove(),a.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(c){var f,g,h,i;if(f=c.element,"select"===f.get(0).tagName.toLowerCase()&&(this.select=g=c.element),g&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a ",""].join(""));return b},disable:function(){this.enabled&&(this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled"))},enable:function(){this.enabled||(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(a.Event("open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),l(this.focusser))},focus:function(){this.opened()?this.close():(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 a,b=this.container,c=this.dropdown,d=!1;this.selection=a=b.find(".select2-choice"),this.focusser=b.find(".select2-focusser"),this.search.bind("keydown",this.bind(function(a){if(this.enabled){if(a.which===z.PAGE_UP||a.which===z.PAGE_DOWN)return void m(a);switch(a.which){case z.UP:case z.DOWN:return this.moveHighlight(a.which===z.UP?-1:1),void m(a);case z.TAB:case z.ENTER:return this.selectHighlighted(),void m(a);case z.ESC:return this.cancel(a),void m(a)}}})),this.focusser.bind("keydown",this.bind(function(a){return!this.enabled||a.which===z.TAB||z.isControl(a)||z.isFunctionKey(a)||a.which===z.ESC?void 0:this.opts.openOnEnter===!1&&a.which===z.ENTER?void m(a):a.which==z.DOWN||a.which==z.UP||a.which==z.ENTER&&this.opts.openOnEnter?(this.open(),void m(a)):a.which==z.DELETE||a.which==z.BACKSPACE?(this.opts.allowClear&&this.clear(),void m(a)):void 0})),g(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(a){this.opened()||(this.open(),this.search.val(this.focusser.val()),this.focusser.val(""),m(a))})),a.delegate("abbr","mousedown",this.bind(function(a){this.enabled&&(this.clear(),n(a),this.close(),this.triggerChange(),this.selection.focus())})),a.bind("mousedown",this.bind(function(a){d=!0,this.opened()?this.close():this.enabled&&this.open(),m(a),d=!1})),c.bind("mousedown",this.bind(function(){this.search.focus()})),a.bind("focus",this.bind(function(a){m(a)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){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 a=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(a),choice:a}),this.triggerChange({removed:a})},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text())this.close(),this.setPlaceholder();else{var a=this;this.opts.initSelection.call(null,this.opts.element,function(c){c!==b&&null!==c&&(a.updateSelection(c),a.close(),a.setPlaceholder())})}},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments);return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(b,c){var d=b.find(":selected");a.isFunction(c)&&c({id:d.attr("value")||d.text(),text:d.text(),element:d})}:"data"in b&&(b.initSelection=b.initSelection||function(c,e){var f=c.val();b.query({matcher:function(a,c,e){return d(f,b.id(e))},callback:a.isFunction(e)?function(a){e(a.results.length?a.results[0]:null)}:a.noop})}),b},setPlaceholder:function(){var a=this.getPlaceholder();if(""===this.opts.element.val()&&a!==b){if(this.select&&""!==this.select.find("option:first").text())return;this.selection.find("span").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(b,c){var e=0,f=this,g=!0;this.findHighlightableChoices().each2(function(a,b){return d(f.id(b.data("select2-data")),f.opts.element.val())?(e=a,!1):void 0}),this.highlight(e),c===!0&&(g=this.showSearchInput=w(b.results)>=this.opts.minimumResultsForSearch,this.dropdown.find(".select2-search")[g?"removeClass":"addClass"]("select2-search-hidden"),a(this.dropdown,this.container)[g?"addClass":"removeClass"]("select2-with-searchbox"))},onSelect:function(a,b){var c=this.opts.element.val();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),this.close(),b&&b.noFocus||this.selection.focus(),d(c,this.id(a))||this.triggerChange()},updateSelection:function(a){var c,d=this.selection.find("span");this.selection.data("select2-data",a),d.empty(),c=this.opts.formatSelection(a,d),c!==b&&d.append(this.opts.escapeMarkup(c)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.selection.find("abbr").show()},val:function(){var a,c=!1,d=null,e=this;if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find(":selected").each2(function(a,b){return d={id:b.attr("value")||b.text(),text:b.text()},!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange();else{if(this.opts.initSelection===b)throw new Error("cannot call val() if initSelection() is not defined");if(!a&&0!==a)return this.clear(),void(c&&this.triggerChange());this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a){var c;return 0===arguments.length?(c=this.selection.data("select2-data"),c==b&&(c=null),c):void(a&&""!==a?(this.opts.element.val(a?this.id(a):""),this.updateSelection(a)):this.clear())}}),C=y(A,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" ",""].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments);return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var c=[];a.find(":selected").each2(function(a,b){c.push({id:b.attr("value")||b.text(),text:b.text(),element:b[0]})}),b(c)}:"data"in b&&(b.initSelection=b.initSelection||function(c,f){var g=e(c.val(),b.separator);b.query({matcher:function(c,e,f){return a.grep(g,function(a){return d(a,b.id(f))}).length},callback:a.isFunction(f)?function(a){f(a.results)}:a.noop})}),b},initContainer:function(){var b,c=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=b=this.container.find(c),this.search.bind("input paste",this.bind(function(){this.enabled&&(this.opened()||this.open())})),this.search.bind("keydown",this.bind(function(a){if(this.enabled){if(a.which===z.BACKSPACE&&""===this.search.val()){this.close();var c,d=b.find(".select2-search-choice-focus");if(d.length>0)return this.unselect(d.first()),this.search.width(10),void m(a);c=b.find(".select2-search-choice:not(.select2-locked)"),c.length>0&&c.last().addClass("select2-search-choice-focus")}else b.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(a.which){case z.UP:case z.DOWN:return this.moveHighlight(a.which===z.UP?-1:1),void m(a);case z.ENTER:case z.TAB:return this.selectHighlighted(),void m(a);case z.ESC:return this.cancel(a),void m(a)}if(a.which!==z.TAB&&!z.isControl(a)&&!z.isFunctionKey(a)&&a.which!==z.BACKSPACE&&a.which!==z.ESC){if(a.which===z.ENTER){if(this.opts.openOnEnter===!1)return;if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return}this.open(),(a.which===z.PAGE_UP||a.which===z.PAGE_DOWN)&&m(a)}}})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(a){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),a.stopImmediatePropagation()})),this.container.delegate(c,"mousedown",this.bind(function(b){this.enabled&&(a(b.target).closest(".select2-search-choice").length>0||(this.clearPlaceholder(),this.open(),this.focusSearch(),b.preventDefault()))})),this.container.delegate(c,"focus",this.bind(function(){this.enabled&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.clearSearch()},enable:function(){this.enabled||(this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled"))},disable:function(){this.enabled&&(this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0))},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var a=this;this.opts.initSelection.call(null,this.opts.element,function(c){c!==b&&null!==c&&(a.updateSelection(c),a.close(),a.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.resizeSearch()):this.search.val("").width(10) },clearPlaceholder:function(){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(a.Event("open"))},close:function(){this.opened()&&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(b){var d=[],e=[],f=this;a(b).each(function(){c(f.id(this),d)<0&&(d.push(f.id(this)),e.push(this))}),b=e,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){f.addSelectedChoice(this)}),f.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer(a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,b){this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),b&&b.noFocus||this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var d,e=!c.locked,f=a("
  • ×
  • "),g=a("
  • "),h=e?f:g,i=this.id(c),j=this.getVal();d=this.opts.formatSelection(c,h.find("div")),d!=b&&h.find("div").replaceWith("
    "+this.opts.escapeMarkup(d)+"
    "),e&&h.find(".select2-search-choice-close").bind("mousedown",m).bind("click dblclick",this.bind(function(b){this.enabled&&(a(b.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),m(b))})).bind("focus",this.bind(function(){this.enabled&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),h.data("select2-data",c),h.insertBefore(this.searchContainer),j.push(i),this.setVal(j)},unselect:function(a){var b,d,e=this.getVal();if(a=a.closest(".select2-search-choice"),0===a.length)throw"Invalid argument: "+a+". Must be .select2-search-choice";b=a.data("select2-data"),b&&(d=c(this.id(b),e),d>=0&&(e.splice(d,1),this.setVal(e),this.select&&this.postprocessResults()),a.remove(),this.opts.element.trigger({type:"removed",val:this.id(b),choice:b}),this.triggerChange({removed:b}))},postprocessResults:function(){var a=this.getVal(),b=this.results.find(".select2-result"),d=this.results.find(".select2-result-with-children"),e=this;b.each2(function(b,d){var f=e.id(d.data("select2-data"));c(f,a)>=0&&(d.addClass("select2-selected"),d.find(".select2-result-selectable").addClass("select2-selected"))}),d.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&e.highlight(0)},resizeSearch:function(){var a,b,c,d,e,g=f(this.search);a=o(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-g,a>e&&(e=c-g),40>e&&(e=c-g),0>=e&&(e=a),this.search.width(e)},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),e(a,this.opts.separator))},setVal:function(b){var d;this.select?this.select.val(b):(d=[],a(b).each(function(){c(this,d)<0&&d.push(this)}),this.opts.element.val(0===d.length?"":d.join(this.opts.separator)))},val:function(){var c,d=!1,e=this;if(0===arguments.length)return this.getVal();if(c=arguments[0],arguments.length>1&&(d=arguments[1]),!c&&0!==c)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(d&&this.triggerChange());if(this.setVal(c),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),d&&this.triggerChange();else{if(this.opts.initSelection===b)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(b){var c=a(b).map(e.id);e.setVal(c),e.updateSelection(b),e.clearSearch(),d&&e.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 b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(b){var c,d=this;return 0===arguments.length?this.selection.find(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(b||(b=[]),c=a.map(b,function(a){return d.opts.id(a)}),this.setVal(c),this.updateSelection(b),this.clearSearch(),void 0)}}),a.fn.select2=function(){var d,e,f,g,h=Array.prototype.slice.call(arguments,0),i=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(0===h.length||"object"==typeof h[0])d=0===h.length?{}:a.extend({},h[0]),d.element=a(this),"select"===d.element.get(0).tagName.toLowerCase()?g=d.element.attr("multiple"):(g=d.multiple||!1,"tags"in d&&(d.multiple=g=!0)),e=g?new C:new B,e.init(d);else{if("string"!=typeof h[0])throw"Invalid arguments to select2 plugin: "+h;if(c(h[0],i)<0)throw"Unknown method: "+h[0];if(f=b,e=a(this).data("select2"),e===b)return;if(f="container"===h[0]?e.container:e[h[0]].apply(e,h.slice(1)),f!==b)return!1}}),f===b?this:f},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return q(a.text,c.term,e,d),e.join("")},formatSelection:function(a){return a?a.text:b},sortResults:function(a){return a},formatResultCssClass:function(){return b},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please enter "+c+" less character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a.id},matcher:function(a,b){return b.toUpperCase().indexOf(a.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:x,escapeMarkup:function(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(a).replace(/[&<>"'/\\]/g,function(a){return b[a[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null}},window.Select2={query:{ajax:r,local:s,tags:t},util:{debounce:i,markMatch:q},"class":{"abstract":A,single:B,multi:C}}}}(jQuery);/*! -Holder - 2.3 - client side image placeholders -(c) 2012-2014 Ivan Malopinsky / http://imsky.co +Holder - 2.2 - client side image placeholders +(c) 2012-2013 Ivan Malopinsky / http://imsky.co Provided under the MIT License. Commercial use requires attribution. */ -var Holder=Holder||{};!function(a,b){function c(a,b,c){b=parseInt(b,10),a=parseInt(a,10);var d=Math.max(b,a),e=Math.min(b,a),f=1/12,g=Math.min(.75*e,.75*d*f);return{height:Math.round(Math.max(c.size,g))}}function d(a){var b=[];for(p in a)a.hasOwnProperty(p)&&b.push(p+":"+a[p]);return b.join(";")}function e(a){var b=a.ctx,d=a.dimensions,e=a.template,f=a.ratio,g=a.holder,h="literal"==g.textmode,i="exact"==g.textmode,j=c(d.width,d.height,e),k=j.height,l=d.width*f,m=d.height*f,n=e.font?e.font:"Arial,Helvetica,sans-serif";canvas.width=l,canvas.height=m,b.textAlign="center",b.textBaseline="middle",b.fillStyle=e.background,b.fillRect(0,0,l,m),b.fillStyle=e.foreground,b.font="bold "+k+"px "+n;var o=e.text?e.text:Math.floor(d.width)+"x"+Math.floor(d.height);if(h){var d=g.dimensions;o=d.width+"x"+d.height}else if(i&&g.exact_dimensions){var d=g.exact_dimensions;o=Math.floor(d.width)+"x"+Math.floor(d.height)}var p=b.measureText(o).width;return p/l>=.75&&(k=Math.floor(.75*k*(l/p))),b.font="bold "+k*f+"px "+n,b.fillText(o,l/2,m/2,l),canvas.toDataURL("image/png")}function f(a){var b=a.dimensions,d=a.template,e=a.holder,f="literal"==e.textmode,g="exact"==e.textmode,h=c(b.width,b.height,d),i=h.height,j=b.width,k=b.height,l=d.font?d.font:"Arial,Helvetica,sans-serif",m=d.text?d.text:Math.floor(b.width)+"x"+Math.floor(b.height);if(f){var b=e.dimensions;m=b.width+"x"+b.height}else if(g&&e.exact_dimensions){var b=e.exact_dimensions;m=Math.floor(b.width)+"x"+Math.floor(b.height)}var n=z({text:m,width:j,height:k,text_height:i,font:l,template:d});return"data:image/svg+xml;base64,"+btoa(n)}function g(a){return r.use_canvas&&!r.use_svg?e(a):f(a)}function h(a,b,c,d){var e=c.dimensions,f=c.theme,h=c.text?decodeURIComponent(c.text):c.text,i=e.width+"x"+e.height;f=h?o(f,{text:h}):f,f=c.font?o(f,{font:c.font}):f,b.setAttribute("data-src",d),c.theme=f,b.holder_data=c,"image"==a?(b.setAttribute("alt",h?h:f.text?f.text+" ["+i+"]":i),(r.use_fallback||!c.auto)&&(b.style.width=e.width+"px",b.style.height=e.height+"px"),r.use_fallback?b.style.backgroundColor=f.background:(b.setAttribute("src",g({ctx:w,dimensions:e,template:f,ratio:x,holder:c})),c.textmode&&"exact"==c.textmode&&(v.push(b),k(b)))):"background"==a?r.use_fallback||(b.style.backgroundImage="url("+g({ctx:w,dimensions:e,template:f,ratio:x,holder:c})+")",b.style.backgroundSize=e.width+"px "+e.height+"px"):"fluid"==a&&(b.setAttribute("alt",h?h:f.text?f.text+" ["+i+"]":i),"%"==e.height.slice(-1)?b.style.height=e.height:null!=c.auto&&c.auto||(b.style.height=e.height+"px"),"%"==e.width.slice(-1)?b.style.width=e.width:null!=c.auto&&c.auto||(b.style.width=e.width+"px"),("inline"==b.style.display||""===b.style.display||"none"==b.style.display)&&(b.style.display="block"),j(b),r.use_fallback?b.style.backgroundColor=f.background:(v.push(b),k(b)))}function i(a,b){var c={height:a.clientHeight,width:a.clientWidth};return c.height||c.width?(a.removeAttribute("data-holder-invisible"),c):(a.setAttribute("data-holder-invisible",!0),void b.call(this,a))}function j(b){if(b.holder_data){var c=i(b,a.invisible_error_fn(j));if(c){var d=b.holder_data;d.initial_dimensions=c,d.fluid_data={fluid_height:"%"==d.dimensions.height.slice(-1),fluid_width:"%"==d.dimensions.width.slice(-1),mode:null},d.fluid_data.fluid_width&&!d.fluid_data.fluid_height?(d.fluid_data.mode="width",d.fluid_data.ratio=d.initial_dimensions.width/parseFloat(d.dimensions.height)):!d.fluid_data.fluid_width&&d.fluid_data.fluid_height&&(d.fluid_data.mode="height",d.fluid_data.ratio=parseFloat(d.dimensions.width)/d.initial_dimensions.height)}}}function k(b){var c;c=null==b.nodeType?v:[b];for(var d in c)if(c.hasOwnProperty(d)){var e=c[d];if(e.holder_data){var f=e.holder_data,h=i(e,a.invisible_error_fn(k));if(h){if(f.fluid){if(f.auto)switch(f.fluid_data.mode){case"width":h.height=h.width/f.fluid_data.ratio;break;case"height":h.width=h.height*f.fluid_data.ratio}e.setAttribute("src",g({ctx:w,dimensions:h,template:f.theme,ratio:x,holder:f}))}f.textmode&&"exact"==f.textmode&&(f.exact_dimensions=h,e.setAttribute("src",g({ctx:w,dimensions:f.dimensions,template:f.theme,ratio:x,holder:f})))}}}}function l(b,c){for(var d={theme:o(y.themes.gray,{})},e=!1,f=b.length,g=0;f>g;g++){var h=b[g];a.flags.dimensions.match(h)?(e=!0,d.dimensions=a.flags.dimensions.output(h)):a.flags.fluid.match(h)?(e=!0,d.dimensions=a.flags.fluid.output(h),d.fluid=!0):a.flags.textmode.match(h)?d.textmode=a.flags.textmode.output(h):a.flags.colors.match(h)?d.theme=a.flags.colors.output(h):c.themes[h]?c.themes.hasOwnProperty(h)&&(d.theme=o(c.themes[h],{})):a.flags.font.match(h)?d.font=a.flags.font.output(h):a.flags.auto.match(h)?d.auto=!0:a.flags.text.match(h)&&(d.text=a.flags.text.output(h))}return e?d:!1}function m(a,b){var c="complete",d="readystatechange",e=!1,f=e,g=!0,h=a.document,i=h.documentElement,j=h.addEventListener?"addEventListener":"attachEvent",k=h.addEventListener?"removeEventListener":"detachEvent",l=h.addEventListener?"":"on",m=function(g){(g.type!=d||h.readyState==c)&&(("load"==g.type?a:h)[k](l+g.type,m,e),!f&&(f=!0)&&b.call(a,null))},n=function(){try{i.doScroll("left")}catch(a){return void setTimeout(n,50)}m("poll")};if(h.readyState==c)b.call(a,"lazy");else{if(h.createEventObject&&i.doScroll){try{g=!a.frameElement}catch(o){}g&&n()}h[j](l+"DOMContentLoaded",m,e),h[j](l+d,m,e),a[j](l+"load",m,e)}}function n(a,b){var a=a.match(/^(\W)?(.*)/),b=b||document,c=b["getElement"+(a[1]?"#"==a[1]?"ById":"sByClassName":"sByTagName")],d=c.call(b,a[2]),e=[];return null!==d&&(e=d.length||0===d.length?d:[d]),e}function o(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);for(var d in b)b.hasOwnProperty(d)&&(c[d]=b[d]);return c}var q={use_svg:!1,use_canvas:!1,use_fallback:!1},r={},s=!1;canvas=document.createElement("canvas");var t=1,u=1,v=[];if(canvas.getContext)if(canvas.toDataURL("image/png").indexOf("data:image/png")<0)q.use_fallback=!0;else var w=canvas.getContext("2d");else q.use_fallback=!0;document.createElementNS&&document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect&&(q.use_svg=!0,q.use_canvas=!1),q.use_fallback||(t=window.devicePixelRatio||1,u=w.webkitBackingStorePixelRatio||w.mozBackingStorePixelRatio||w.msBackingStorePixelRatio||w.oBackingStorePixelRatio||w.backingStorePixelRatio||1);var x=t/u,y={domain:"holder.js",images:"img",bgnodes:".holderjs",themes:{gray:{background:"#eee",foreground:"#aaa",size:12},social:{background:"#3a5a97",foreground:"#fff",size:12},industrial:{background:"#434A52",foreground:"#C2F200",size:12},sky:{background:"#0D8FDB",foreground:"#fff",size:12},vine:{background:"#39DBAC",foreground:"#1E292C",size:12},lava:{background:"#F8591A",foreground:"#1C2846",size:12}},stylesheet:""};a.flags={dimensions:{regex:/^(\d+)x(\d+)$/,output:function(a){var b=this.regex.exec(a);return{width:+b[1],height:+b[2]}}},fluid:{regex:/^([0-9%]+)x([0-9%]+)$/,output:function(a){var b=this.regex.exec(a);return{width:b[1],height:b[2]}}},colors:{regex:/#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,output:function(a){var b=this.regex.exec(a);return{size:y.themes.gray.size,foreground:"#"+b[2],background:"#"+b[1]}}},text:{regex:/text\:(.*)/,output:function(a){return this.regex.exec(a)[1]}},font:{regex:/font\:(.*)/,output:function(a){return this.regex.exec(a)[1]}},auto:{regex:/^auto$/},textmode:{regex:/textmode\:(.*)/,output:function(a){return this.regex.exec(a)[1]}}};var z=function(){var a=new XMLSerializer,b="http://www.w3.org/2000/svg",c=document.createElementNS(b,"svg");c.setAttribute("xmlns","http://www.w3.org/2000/svg"),c.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink");var e=document.createElementNS(b,"rect"),f=document.createElementNS(b,"text"),g=document.createTextNode(null);return f.setAttribute("text-anchor","middle"),f.appendChild(g),c.appendChild(e),c.appendChild(f),function(b){return c.setAttribute("width",b.width),c.setAttribute("height",b.height),e.setAttribute("width",b.width),e.setAttribute("height",b.height),e.setAttribute("fill",b.template.background),f.setAttribute("x",b.width/2),f.setAttribute("y",b.height/2),g.nodeValue=b.text,f.setAttribute("style",d({fill:b.template.foreground,"font-weight":"bold","font-size":b.text_height+"px","font-family":b.font,"dominant-baseline":"central"})),a.serializeToString(c)}}();for(var A in a.flags)a.flags.hasOwnProperty(A)&&(a.flags[A].match=function(a){return a.match(this.regex)});a.invisible_error_fn=function(){return function(a){if(a.hasAttribute("data-holder-invisible"))throw new Error("Holder: invisible placeholder")}},a.add_theme=function(b,c){return null!=b&&null!=c&&(y.themes[b]=c),a},a.add_image=function(b,c){var d=n(c);if(d.length)for(var e=0,f=d.length;f>e;e++){var g=document.createElement("img");g.setAttribute("data-src",b),d[e].appendChild(g)}return a},a.run=function(b){r=o({},q),s=!0;var c=o(y,b),d=[],e=[],f=[];for(null!=c.use_canvas&&c.use_canvas&&(r.use_canvas=!0,r.use_svg=!1),"string"==typeof c.images?e=n(c.images):window.NodeList&&c.images instanceof window.NodeList?e=c.images:window.Node&&c.images instanceof window.Node?e=[c.images]:window.HTMLCollection&&c.images instanceof window.HTMLCollection&&(e=c.images),"string"==typeof c.bgnodes?f=n(c.bgnodes):window.NodeList&&c.elements instanceof window.NodeList?f=c.bgnodes:window.Node&&c.bgnodes instanceof window.Node&&(f=[c.bgnodes]),k=0,j=e.length;j>k;k++)d.push(e[k]);var g=document.getElementById("holderjs-style");g||(g=document.createElement("style"),g.setAttribute("id","holderjs-style"),g.type="text/css",document.getElementsByTagName("head")[0].appendChild(g)),c.nocss||(g.styleSheet?g.styleSheet.cssText+=c.stylesheet:g.appendChild(document.createTextNode(c.stylesheet)));for(var i=new RegExp(c.domain+'/(.*?)"?\\)'),j=f.length,k=0;j>k;k++){var m=window.getComputedStyle(f[k],null).getPropertyValue("background-image"),p=m.match(i),t=f[k].getAttribute("data-background-src");if(p){var u=l(p[1].split("/"),c);u&&h("background",f[k],u,m)}else if(null!=t){var u=l(t.substr(t.lastIndexOf(c.domain)+c.domain.length+1).split("/"),c);u&&h("background",f[k],u,m)}}for(j=d.length,k=0;j>k;k++){var v,w;w=v=m=null;try{w=d[k].getAttribute("src"),attr_datasrc=d[k].getAttribute("data-src")}catch(x){}if(null==attr_datasrc&&w&&w.indexOf(c.domain)>=0?m=w:attr_datasrc&&attr_datasrc.indexOf(c.domain)>=0&&(m=attr_datasrc),m){var u=l(m.substr(m.lastIndexOf(c.domain)+c.domain.length+1).split("/"),c);u&&(u.fluid?h("fluid",d[k],u,m):h("image",d[k],u,m))}}return a},m(b,function(){window.addEventListener?(window.addEventListener("resize",k,!1),window.addEventListener("orientationchange",k,!1)):window.attachEvent("onresize",k),s||a.run({})}),"function"==typeof define&&define.amd&&define([],function(){return a}),function(){function a(a){this.message=a}var b="undefined"!=typeof exports?exports:this,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.prototype=Error(),a.prototype.name="InvalidCharacterError",b.btoa||(b.btoa=function(b){for(var d,e,f=0,g=c,h="";b.charAt(0|f)||(g="=",f%1);h+=g.charAt(63&d>>8-8*(f%1))){if(e=b.charCodeAt(f+=.75),e>255)throw new a("'btoa' failed");d=d<<8|e}return h}),b.atob||(b.atob=function(b){if(b=b.replace(/=+$/,""),1==b.length%4)throw new a("'atob' failed");for(var d,e,f=0,g=0,h="";e=b.charAt(g++);~e&&(d=f%4?64*d+e:e,f++%4)?h+=String.fromCharCode(255&d>>(6&-2*f)):0)e=c.indexOf(e);return h})}(),document.getElementsByClassName||(document.getElementsByClassName=function(a){var b,c,d,e=document,f=[];if(e.querySelectorAll)return e.querySelectorAll("."+a);if(e.evaluate)for(c=".//*[contains(concat(' ', @class, ' '), ' "+a+" ')]",b=e.evaluate(c,e,null,0,null);d=b.iterateNext();)f.push(d);else for(b=e.getElementsByTagName("*"),c=new RegExp("(^|\\s)"+a+"(\\s|$)"),d=0;d=.75&&(k=Math.floor(.75*k*(l/q))),b.font="bold "+k*e+"px "+n,b.fillText(p,l/2,m/2,l),o.toDataURL("image/png")}function h(a,b,c,d){var f=c.dimensions,h=c.theme,i=c.text?decodeURIComponent(c.text):c.text,j=f.width+"x"+f.height;h=i?e(h,{text:i}):h,h=c.font?e(h,{font:c.font}):h,b.setAttribute("data-src",d),c.theme=h,b.holder_data=c,"image"==a?(b.setAttribute("alt",i?i:h.text?h.text+" ["+j+"]":j),(n||!c.auto)&&(b.style.width=f.width+"px",b.style.height=f.height+"px"),n?b.style.backgroundColor=h.background:(b.setAttribute("src",g({ctx:s,dimensions:f,template:h,ratio:t,holder:c})),c.textmode&&"exact"==c.textmode&&(r.push(b),k(b)))):"background"==a?n||(b.style.backgroundImage="url("+g({ctx:s,dimensions:f,template:h,ratio:t,holder:c})+")",b.style.backgroundSize=f.width+"px "+f.height+"px"):"fluid"==a&&(b.setAttribute("alt",i?i:h.text?h.text+" ["+j+"]":j),b.style.height="%"==f.height.slice(-1)?f.height:f.height+"px",b.style.width="%"==f.width.slice(-1)?f.width:f.width+"px",("inline"==b.style.display||""===b.style.display||"none"==b.style.display)&&(b.style.display="block"),n?b.style.backgroundColor=h.background:(r.push(b),k(b)))}function i(a,b){var c={height:a.clientHeight,width:a.clientWidth};if(!c.height&&!c.width){if(a.hasAttribute("data-holder-invisible"))throw new Error("Holder: placeholder is not visible");return a.setAttribute("data-holder-invisible",!0),setTimeout(function(){b.call(this,a)},1),null}return a.removeAttribute("data-holder-invisible"),c}function k(a){var b;b=null==a.nodeType?r:[a];for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];if(d.holder_data){var e=d.holder_data,f=i(d,k);f&&(e.fluid&&d.setAttribute("src",g({ctx:s,dimensions:f,template:e.theme,ratio:t,holder:e})),e.textmode&&"exact"==e.textmode&&(e.exact_dimensions=f,d.setAttribute("src",g({ctx:s,dimensions:e.dimensions,template:e.theme,ratio:t,holder:e}))))}}}function l(b,c){var d={theme:e(u.themes.gray,{})},f=!1;for(sl=b.length,j=0;sl>j;j++){var g=b[j];a.flags.dimensions.match(g)?(f=!0,d.dimensions=a.flags.dimensions.output(g)):a.flags.fluid.match(g)?(f=!0,d.dimensions=a.flags.fluid.output(g),d.fluid=!0):a.flags.textmode.match(g)?d.textmode=a.flags.textmode.output(g):a.flags.colors.match(g)?d.theme=a.flags.colors.output(g):c.themes[g]?c.themes.hasOwnProperty(g)&&(d.theme=e(c.themes[g],{})):a.flags.font.match(g)?d.font=a.flags.font.output(g):a.flags.auto.match(g)?d.auto=!0:a.flags.text.match(g)&&(d.text=a.flags.text.output(g))}return f?d:!1}var m=!1,n=!1,o=document.createElement("canvas"),p=1,q=1,r=[];if(o.getContext)if(o.toDataURL("image/png").indexOf("data:image/png")<0)n=!0;else var s=o.getContext("2d");else n=!0;n||(p=window.devicePixelRatio||1,q=s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1);var t=p/q,u={domain:"holder.js",images:"img",bgnodes:".holderjs",themes:{gray:{background:"#eee",foreground:"#aaa",size:12},social:{background:"#3a5a97",foreground:"#fff",size:12},industrial:{background:"#434A52",foreground:"#C2F200",size:12},sky:{background:"#0D8FDB",foreground:"#fff",size:12},vine:{background:"#39DBAC",foreground:"#1E292C",size:12},lava:{background:"#F8591A",foreground:"#1C2846",size:12}},stylesheet:""};a.flags={dimensions:{regex:/^(\d+)x(\d+)$/,output:function(a){var b=this.regex.exec(a);return{width:+b[1],height:+b[2]}}},fluid:{regex:/^([0-9%]+)x([0-9%]+)$/,output:function(a){var b=this.regex.exec(a);return{width:b[1],height:b[2]}}},colors:{regex:/#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,output:function(a){var b=this.regex.exec(a);return{size:u.themes.gray.size,foreground:"#"+b[2],background:"#"+b[1]}}},text:{regex:/text\:(.*)/,output:function(a){return this.regex.exec(a)[1]}},font:{regex:/font\:(.*)/,output:function(a){return this.regex.exec(a)[1]}},auto:{regex:/^auto$/},textmode:{regex:/textmode\:(.*)/,output:function(a){return this.regex.exec(a)[1]}}},document.getElementsByClassName||(document.getElementsByClassName=function(a){var b,c,d,e=document,f=[];if(e.querySelectorAll)return e.querySelectorAll("."+a);if(e.evaluate)for(c=".//*[contains(concat(' ', @class, ' '), ' "+a+" ')]",b=e.evaluate(c,e,null,0,null);d=b.iterateNext();)f.push(d);else for(b=e.getElementsByTagName("*"),c=new RegExp("(^|\\s)"+a+"(\\s|$)"),d=0;df;f++){var h=document.createElement("img");h.setAttribute("data-src",b),e[f].appendChild(h)}return a},a.run=function(b){m=!0;var c=e(u,b),f=[],g=[],i=[];for("string"==typeof c.images?g=d(c.images):window.NodeList&&c.images instanceof window.NodeList?g=c.images:window.Node&&c.images instanceof window.Node&&(g=[c.images]),"string"==typeof c.bgnodes?i=d(c.bgnodes):window.NodeList&&c.elements instanceof window.NodeList?i=c.bgnodes:window.Node&&c.bgnodes instanceof window.Node&&(i=[c.bgnodes]),o=0,n=g.length;n>o;o++)f.push(g[o]);var j=document.getElementById("holderjs-style");j||(j=document.createElement("style"),j.setAttribute("id","holderjs-style"),j.type="text/css",document.getElementsByTagName("head")[0].appendChild(j)),c.nocss||(j.styleSheet?j.styleSheet.cssText+=c.stylesheet:j.appendChild(document.createTextNode(c.stylesheet)));for(var k=new RegExp(c.domain+'/(.*?)"?\\)'),n=i.length,o=0;n>o;o++){var p=window.getComputedStyle(i[o],null).getPropertyValue("background-image"),q=p.match(k),r=i[o].getAttribute("data-background-src");if(q){var s=l(q[1].split("/"),c);s&&h("background",i[o],s,p)}else if(null!=r){var s=l(r.substr(r.lastIndexOf(c.domain)+c.domain.length+1).split("/"),c);s&&h("background",i[o],s,p)}}for(n=f.length,o=0;n>o;o++){var t,v;v=t=p=null;try{v=f[o].getAttribute("src"),attr_datasrc=f[o].getAttribute("data-src")}catch(w){}if(null==attr_datasrc&&v&&v.indexOf(c.domain)>=0?p=v:attr_datasrc&&attr_datasrc.indexOf(c.domain)>=0&&(p=attr_datasrc),p){var s=l(p.substr(p.lastIndexOf(c.domain)+c.domain.length+1).split("/"),c);s&&(s.fluid?h("fluid",f[o],s,p):h("image",f[o],s,p))}}return a},c(b,function(){window.addEventListener?(window.addEventListener("resize",k,!1),window.addEventListener("orientationchange",k,!1)):window.attachEvent("onresize",k),m||a.run()}),"function"==typeof define&&define.amd&&define([],function(){return a})}(Holder,window),/*! * JavaScript for Bootstrap's docs (http://getbootstrap.com) * Copyright 2011-2014 Twitter, Inc. * Licensed under the Creative Commons Attribution 3.0 Unported License. For