File "select2.full.min.js"
Full path: /home/webcknlt/admissiontell.com/wp-content/plugins/publishpress-authors/src/assets/lib/select2/js/select2.full.min.js
File
size: 76.72 B (76.72 KB bytes)
MIME-type: text/plain
Charset: utf-8
Download Open Edit Advanced Editor &nnbsp; Back
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n),n}:e(jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.ppma_select2&&e.fn.ppma_select2.amd)var t,n,n=e.fn.ppma_select2.amd;return!function(){if(!n||!n.requirejs){var e,t,i;n?t=n:n={},function(n){var r,s,o,a,l={},c={},u={},p={},d=Object.prototype.hasOwnProperty,h=[].slice,f=/\.js$/;function m(e,t){return d.call(e,t)}function g(e,t){var n,i,r,s,o,a,l,c,p,d,h,m,g=t&&t.split("/"),v=u.map,y=v&&v["*"]||{};if(e){for(o=(e=e.split("/")).length-1,u.nodeIdCompat&&f.test(e[o])&&(e[o]=e[o].replace(f,"")),"."===e[0].charAt(0)&&g&&(e=(m=g.slice(0,g.length-1)).concat(e)),p=0;p<e.length;p++)if("."===(h=e[p]))e.splice(p,1),p-=1;else if(".."===h){if(0===p||1===p&&".."===e[2]||".."===e[p-1])continue;p>0&&(e.splice(p-1,2),p-=2)}e=e.join("/")}if((g||y)&&v){for(p=(n=e.split("/")).length;p>0;p-=1){if(i=n.slice(0,p).join("/"),g){for(d=g.length;d>0;d-=1)if((r=v[g.slice(0,d).join("/")])&&(r=r[i])){s=r,a=p;break}}if(s)break;!l&&y&&y[i]&&(l=y[i],c=p)}!s&&l&&(s=l,a=c),s&&(n.splice(0,a,s),e=n.join("/"))}return e}function v(e,t){return function(){var i=h.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),s.apply(n,i.concat([e,t]))}}function y(e){return function(t){l[e]=t}}function b(e){if(m(c,e)){var t=c[e];delete c[e],p[e]=!0,r.apply(n,t)}if(!m(l,e)&&!m(p,e))throw Error("No "+e);return l[e]}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function A(e){return e?w(e):[]}o=function(e,t){var n,i,r=w(e),s=r[0],o=t[1];return(e=r[1],s&&(i=b(s=g(s,o))),s)?e=i&&i.normalize?i.normalize(e,(n=o,function(e){return g(e,n)})):g(e,o):(e=g(e,o),s=(r=w(e))[0],e=r[1],s&&(i=b(s))),{f:s?s+"!"+e:e,n:e,pr:s,p:i}},a={require:function(e){return v(e)},exports:function(e){var t=l[e];return void 0!==t?t:l[e]={}},module:function(e){var t;return{id:e,uri:"",exports:l[e],config:(t=e,function(){return u&&u.config&&u.config[t]||{}})}}},r=function(e,t,i,r){var s,u,d,h,f,g,w,D=[],x=typeof i;if(g=A(r=r||e),"undefined"===x||"function"===x){for(f=0,t=!t.length&&i.length?["require","exports","module"]:t;f<t.length;f+=1)if("require"===(u=(h=o(t[f],g)).f))D[f]=a.require(e);else if("exports"===u)D[f]=a.exports(e),w=!0;else if("module"===u)s=D[f]=a.module(e);else if(m(l,u)||m(c,u)||m(p,u))D[f]=b(u);else if(h.p)h.p.load(h.n,v(r,!0),y(u),{}),D[f]=l[u];else throw Error(e+" missing "+u);d=i?i.apply(l[e],D):void 0,e&&(s&&s.exports!==n&&s.exports!==l[e]?l[e]=s.exports:d===n&&w||(l[e]=d))}else e&&(l[e]=i)},e=t=s=function(e,t,i,l,c){if("string"==typeof e)return a[e]?a[e](t):b(o(e,A(t)).f);if(!e.splice){if((u=e).deps&&s(u.deps,u.callback),!t)return;t.splice?(e=t,t=i,i=null):e=n}return t=t||function(){},"function"==typeof i&&(i=l,l=c),l?r(n,e,t,i):setTimeout(function(){r(n,e,t,i)},4),s},s.config=function(e){return s(e)},e._defined=l,(i=function(e,t,n){if("string"!=typeof e)throw Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),m(l,e)||m(c,e)||(c[e]=[e,t,n])}).amd={jQuery:!0}}(),n.requirejs=e,n.require=t,n.define=i}}(),n.define("almond",function(){}),n.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("PPMA_Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before PPMA_Select2 on your web page."),t}),n.define("ppma_select2/utils",["jquery"],function(e){var t={};function n(e){var t=e.prototype,n=[];for(var i in t)"function"==typeof t[i]&&"constructor"!==i&&n.push(i);return n}t.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var i=n(t),r=n(e);function s(){var n=Array.prototype.unshift,i=t.prototype.constructor.length,r=e.prototype.constructor;i>0&&(n.call(arguments,e.prototype.constructor),r=t.prototype.constructor),r.apply(this,arguments)}t.displayName=e.displayName,s.prototype=new function e(){this.constructor=s};for(var o=0;o<r.length;o++){var a=r[o];s.prototype[a]=e.prototype[a]}for(var l=0;l<i.length;l++){var c=i[l];s.prototype[c]=function(e){var n=function(){};e in s.prototype&&(n=s.prototype[e]);var i=t.prototype[e];return function(){return Array.prototype.unshift.call(arguments,n),i.apply(this,arguments)}}(c)}return s};var i=function(){this.listeners={}};i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},t.Observable=i,t.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},t.bind=function(e,t){return function(){e.apply(t,arguments)}},t._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var s=n[r];(s=s.substring(0,1).toLowerCase()+s.substring(1))in i||(i[s]={}),r==n.length-1&&(i[s]=e[t]),i=i[s]}delete e[t]}}return e},t.hasScroll=function(t,n){var i=e(n),r=n.style.overflowX,s=n.style.overflowY;return(r!==s||"hidden"!==s&&"visible"!==s)&&("scroll"===r||"scroll"===s||i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth)},t.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},t.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,function(e){i=i.add(e)}),n=i}t.append(n)},t.__cache={};var r=0;return t.GetUniqueElementId=function(e){var t=e.getAttribute("data-ppma_select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-ppma_select2-id",t)):(e.setAttribute("data-ppma_select2-id",++r),t=r.toString())),t},t.StoreData=function(e,n,i){var r=t.GetUniqueElementId(e);t.__cache[r]||(t.__cache[r]={}),t.__cache[r][n]=i},t.GetData=function(n,i){var r=t.GetUniqueElementId(n);return i?t.__cache[r]&&null!=t.__cache[r][i]?t.__cache[r][i]:e(n).data(i):t.__cache[r]},t.RemoveData=function(e){var n=t.GetUniqueElementId(e);null!=t.__cache[n]&&delete t.__cache[n],e.removeAttribute("data-ppma_select2-id")},t}),n.define("ppma_select2/results",["jquery","./utils"],function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="ppma_select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="alert" aria-live="assertive" class="ppma_select2-results__option"></li>'),r=this.options.get("translations").get(t.message);i.append(n(r(t.args))),i[0].className+=" ppma_select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".ppma_select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null==e.results||0===e.results.length){0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"});return}e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)},n.prototype.position=function(e,t){t.find(".ppma_select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".ppma_select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var n=this;this.data.current(function(i){var r=e.map(i,function(e){return e.id.toString()});n.$results.find(".ppma_select2-results__option[aria-selected]").each(function(){var n=e(this),i=t.GetData(this,"data"),s=""+i.id;null!=i.element&&i.element.selected||null==i.element&&e.inArray(s,r)>-1?n.attr("aria-selected","true"):n.attr("aria-selected","false")})})},n.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(n){var i=document.createElement("li");i.className="ppma_select2-results__option";var r={role:"option","aria-selected":"false"},s=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var o in(null!=n.element&&s.call(n.element,":disabled")||null==n.element&&n.disabled)&&(delete r["aria-selected"],r["aria-disabled"]="true"),null==n.id&&delete r["aria-selected"],null!=n._resultId&&(i.id=n._resultId),n.title,n.children&&(r.role="group",r["aria-label"]=n.text,delete r["aria-selected"]),r){var a=r[o];i.setAttribute(o,a)}if(n.children){var l=e(i),c=document.createElement("strong");c.className="ppma_select2-results__group",e(c),this.template(n,c);for(var u=[],p=0;p<n.children.length;p++){var d=n.children[p],h=this.option(d);u.push(h)}var f=e("<ul></ul>",{class:"ppma_select2-results__options ppma_select2-results__options--nested"});f.append(u),l.append(c),l.append(f)}else this.template(n,i);return t.StoreData(i,"data",n),i},n.prototype.bind=function(n,i){var r=this,s=n.id+"-results";this.$results.attr("id",s),n.on("results:all",function(e){r.clear(),r.append(e.data),n.isOpen()&&(r.setClasses(),r.highlightFirstItem())}),n.on("results:append",function(e){r.append(e.data),n.isOpen()&&r.setClasses()}),n.on("query",function(e){r.hideMessages(),r.showLoading(e)}),n.on("select",function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())}),n.on("unselect",function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())}),n.on("open",function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()}),n.on("close",function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")}),n.on("results:toggle",function(){var e=r.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),n.on("results:select",function(){var e=r.getHighlightedResults();if(0!==e.length){var n=t.GetData(e[0],"data");"true"==e.attr("aria-selected")?r.trigger("close",{}):r.trigger("select",{data:n})}}),n.on("results:previous",function(){var e=r.getHighlightedResults(),t=r.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var i=n-1;0===e.length&&(i=0);var s=t.eq(i);s.trigger("mouseenter");var o=r.$results.offset().top,a=s.offset().top,l=r.$results.scrollTop()+(a-o);0===i?r.$results.scrollTop(0):a-o<0&&r.$results.scrollTop(l)}}),n.on("results:next",function(){var e=r.getHighlightedResults(),t=r.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var s=r.$results.offset().top+r.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),a=r.$results.scrollTop()+o-s;0===n?r.$results.scrollTop(0):o>s&&r.$results.scrollTop(a)}}),n.on("results:focus",function(e){e.element.addClass("ppma_select2-results__option--highlighted")}),n.on("results:message",function(e){r.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=r.$results.scrollTop(),n=r.$results.get(0).scrollHeight-t+e.deltaY,i=e.deltaY>0&&t-e.deltaY<=0,s=e.deltaY<0&&n<=r.$results.height();i?(r.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):s&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".ppma_select2-results__option[aria-selected]",function(n){var i=e(this),s=t.GetData(this,"data");if("true"===i.attr("aria-selected")){r.options.get("multiple")?r.trigger("unselect",{originalEvent:n,data:s}):r.trigger("close",{});return}r.trigger("select",{originalEvent:n,data:s})}),this.$results.on("mouseenter",".ppma_select2-results__option[aria-selected]",function(n){var i=t.GetData(this,"data");r.getHighlightedResults().removeClass("ppma_select2-results__option--highlighted"),r.trigger("results:focus",{data:i,element:e(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".ppma_select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),s=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),s=i(t,n);null==s?n.style.display="none":"string"==typeof s?n.innerHTML=r(s):e(n).append(s)},n}),n.define("ppma_select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),n.define("ppma_select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var n=e('<span class="ppma_select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("tabindex",this._tabindex),n.attr("aria-disabled","false"),this.$selection=n,n},i.prototype.bind=function(e,t){var i=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){i.trigger("focus",e)}),this.$selection.on("blur",function(e){i._handleBlur(e)}),this.$selection.on("keydown",function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){i.update(e.data)}),e.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",r),i._attachCloseHandler(e)}),e.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.trigger("focus"),i._detachCloseHandler(e)}),e.on("enable",function(){i.$selection.attr("tabindex",i._tabindex),i.$selection.attr("aria-disabled","false")}),e.on("disable",function(){i.$selection.attr("tabindex","-1"),i.$selection.attr("aria-disabled","true")})},i.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){!(document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement))&&n.trigger("blur",t)},1)},i.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.ppma_select2."+n.id,function(n){var i=e(n.target).closest(".ppma_select2");e(".ppma_select2.ppma_select2-container--open").each(function(){this!=i[0]&&t.GetData(this,"element").ppma_select2("close")})})},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.ppma_select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw Error("The `update` method must be defined in child classes.")},i.prototype.isEnabled=function(){return!this.isDisabled()},i.prototype.isDisabled=function(){return this.options.get("disabled")},i}),n.define("ppma_select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("ppma_select2-selection--single"),e.html('<span class="ppma_select2-selection__rendered"></span><span class="ppma_select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".ppma_select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("focus",function(t){e.isOpen()||n.$selection.trigger("focus")})},r.prototype.clear=function(){var e=this.$selection.find(".ppma_select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0===e.length){this.clear();return}var t=e[0],n=this.$selection.find(".ppma_select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),t.title||t.text,n.removeAttr("title")},r}),n.define("ppma_select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("ppma_select2-selection--multiple"),e.html('<ul class="ppma_select2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,r){var s=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){s.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".ppma_select2-selection__choice__remove",function(t){if(!s.isDisabled()){var i=e(this).parent(),r=n.GetData(i[0],"data");s.trigger("unselect",{originalEvent:t,data:r})}})},i.prototype.clear=function(){var e=this.$selection.find(".ppma_select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('<li class="ppma_select2-selection__choice"><span class="ppma_select2-selection__choice__remove" role="presentation">×</span></li>')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i<e.length;i++){var r=e[i],s=this.selectionContainer(),o=this.display(r,s);s.append(o),(r.title||r.text)&&s.removeAttr("title"),n.StoreData(s[0],"data",r),t.push(s)}var a=this.$selection.find(".ppma_select2-selection__rendered");n.appendMany(a,t)}},i}),n.define("ppma_select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("ppma_select2-selection__placeholder").removeClass("ppma_select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(t.length>1||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".ppma_select2-selection__rendered").append(i)},t}),n.define("ppma_select2/selection/allowClear",["jquery","../keys","../utils"],function(e,t,n){function i(){}return i.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("PPMA_Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".ppma_select2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},i.prototype._handleClear=function(e,t){if(!this.isDisabled()){var i=this.$selection.find(".ppma_select2-selection__clear");if(0!==i.length){t.stopPropagation();var r=n.GetData(i[0],"data"),s=this.$element.val();this.$element.val(this.placeholder.id);var o={data:r};if(this.trigger("clear",o),o.prevented){this.$element.val(s);return}for(var a=0;a<r.length;a++)if(o={data:r[a]},this.trigger("unselect",o),o.prevented){this.$element.val(s);return}this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}},i.prototype._handleKeyboardClear=function(e,n,i){!i.isOpen()&&(n.which==t.DELETE||n.which==t.BACKSPACE)&&this._handleClear(n)},i.prototype.update=function(t,i){if(t.call(this,i),!(this.$selection.find(".ppma_select2-selection__placeholder").length>0)&&0!==i.length){var r=e('<span class="ppma_select2-selection__clear" title="'+this.options.get("translations").get("removeAllItems")()+'">×</span>');n.StoreData(r[0],"data",i),this.$selection.find(".ppma_select2-selection__rendered").prepend(r)}},i}),n.define("ppma_select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('<li class="ppma_select2-search ppma_select2-search--inline"><input class="ppma_select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,i,r){var s=this,o=i.id+"-results";e.call(this,i,r),i.on("open",function(){s.$search.attr("aria-controls",o),s.$search.trigger("focus")}),i.on("close",function(){s.$search.val(""),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.trigger("focus")}),i.on("enable",function(){s.$search.prop("disabled",!1),s._transferTabIndex()}),i.on("disable",function(){s.$search.prop("disabled",!0)}),i.on("focus",function(e){s.$search.trigger("focus")}),i.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".ppma_select2-search--inline",function(e){s.trigger("focus",e)}),this.$selection.on("focusout",".ppma_select2-search--inline",function(e){s._handleBlur(e)}),this.$selection.on("keydown",".ppma_select2-search--inline",function(e){if(e.stopPropagation(),s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===s.$search.val()){var i=s.$searchContainer.prev(".ppma_select2-selection__choice");if(i.length>0){var r=t.GetData(i[0],"data");s.searchRemoveChoice(r),e.preventDefault()}}}),this.$selection.on("click",".ppma_select2-search--inline",function(e){s.$search.val()&&e.stopPropagation()});var a=document.documentMode,l=a&&a<=11;this.$selection.on("input.searchcheck",".ppma_select2-search--inline",function(e){if(l){s.$selection.off("input.search input.searchcheck");return}s.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".ppma_select2-search--inline",function(e){if(l&&"input"===e.type){s.$selection.off("input.search input.searchcheck");return}var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&s.handleSearch(e)})},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".ppma_select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";e=""!==this.$search.attr("placeholder")?this.$selection.find(".ppma_select2-selection__rendered").width():.75*(this.$search.val().length+1)+"em",this.$search.css("width",e)},i}),n.define("ppma_select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,i){var r=this,s=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];t.call(this,n,i),n.on("*",function(t,n){if(-1!==e.inArray(t,s)){n=n||{};var i=e.Event("ppma_select2:"+t,{params:n});r.$element.trigger(i),-1!==e.inArray(t,o)&&(n.prevented=i.isDefaultPrevented())}})},t}),n.define("ppma_select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n}),n.define("ppma_select2/diacritics",[],function(){return{"Ⓐ":"A",A:"A",À:"A",Á:"A",Â:"A",Ầ:"A",Ấ:"A",Ẫ:"A",Ẩ:"A",Ã:"A",Ā:"A",Ă:"A",Ằ:"A",Ắ:"A",Ẵ:"A",Ẳ:"A",Ȧ:"A",Ǡ:"A",Ä:"A",Ǟ:"A",Ả:"A",Å:"A",Ǻ:"A",Ǎ:"A",Ȁ:"A",Ȃ:"A",Ạ:"A",Ậ:"A",Ặ:"A",Ḁ:"A",Ą:"A",Ⱥ:"A",Ɐ:"A",Ꜳ:"AA",Æ:"AE",Ǽ:"AE",Ǣ:"AE",Ꜵ:"AO",Ꜷ:"AU",Ꜹ:"AV",Ꜻ:"AV",Ꜽ:"AY","Ⓑ":"B",B:"B",Ḃ:"B",Ḅ:"B",Ḇ:"B",Ƀ:"B",Ƃ:"B",Ɓ:"B","Ⓒ":"C",C:"C",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",Ç:"C",Ḉ:"C",Ƈ:"C",Ȼ:"C",Ꜿ:"C","Ⓓ":"D",D:"D",Ḋ:"D",Ď:"D",Ḍ:"D",Ḑ:"D",Ḓ:"D",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ι",ϊ:"ι",ΐ:"ι",ό:"ο",ύ:"υ",ϋ:"υ",ΰ:"υ",ώ:"ω",ς:"σ","’":"'"}}),n.define("ppma_select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return i+=e.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+e.generateChars(4),i},t}),n.define("ppma_select2/data/select",["./base","../utils","jquery"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each(function(){var e=n(this),r=i.item(e);t.push(r)}),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option")){e.element.selected=!0,this.$element.trigger("input").trigger("change");return}if(this.$element.prop("multiple"))this.current(function(i){var r=[];(e=[e]).push.apply(e,i);for(var s=0;s<e.length;s++){var o=e[s].id;-1===n.inArray(o,r)&&r.push(o)}t.$element.val(r),t.$element.trigger("input").trigger("change")});else{var i=e.id;this.$element.val(i),this.$element.trigger("input").trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,n(e.element).is("option")){e.element.selected=!1,this.$element.trigger("input").trigger("change");return}this.current(function(i){for(var r=[],s=0;s<i.length;s++){var o=i[s].id;o!==e.id&&-1===n.inArray(o,r)&&r.push(o)}t.$element.val(r),t.$element.trigger("input").trigger("change")})}},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){t.RemoveData(this)})},i.prototype.query=function(e,t){var i=[],r=this;this.$element.children().each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var s=r.item(t),o=r.matches(e,s);null!==o&&i.push(o)}}),t({results:i})},i.prototype.addOptions=function(e){t.appendMany(this.$element,e)},i.prototype.option=function(e){e.children?(i=document.createElement("optgroup")).label=e.text:void 0!==(i=document.createElement("option")).textContent?i.textContent=e.text:i.innerText=e.text,void 0!==e.id&&(i.value=e.id),e.disabled&&(i.disabled=!0),e.selected&&(i.selected=!0),e.title;var i,r=n(i),s=this._normalizeItem(e);return s.element=i,t.StoreData(i,"data",s),r},i.prototype.item=function(e){var i={};if(null!=(i=t.GetData(e[0],"data")))return i;if(e.is("option"))i={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){i={text:e.prop("label"),children:[],title:e.prop("title")};for(var r=e.children("option"),s=[],o=0;o<r.length;o++){var a=n(r[o]),l=this.item(a);s.push(l)}i.children=s}return(i=this._normalizeItem(i)).element=e[0],t.StoreData(e[0],"data",i),i},i.prototype._normalizeItem=function(e){return e!==Object(e)&&(e={id:e,text:e}),null!=(e=n.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},{selected:!1,disabled:!1},e)},i.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},i}),n.define("ppma_select2/data/array",["./select","../utils","jquery"],function(e,t,n){function i(e,t){this._dataToConvert=t.get("data")||[],i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype.bind=function(e,t){i.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},i.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){var i=this,r=this.$element.find("option"),s=r.map(function(){return i.item(n(this)).id}).get(),o=[];function a(e){return function(){return n(this).val()==e.id}}for(var l=0;l<e.length;l++){var c=this._normalizeItem(e[l]);if(n.inArray(c.id,s)>=0){var u=r.filter(a(c)),p=this.item(u),d=n.extend(!0,{},c,p),h=this.option(d);u.replaceWith(h);continue}var f=this.option(c);if(c.children){var m=this.convertToOptions(c.children);t.appendMany(f,m)}o.push(f)}return o},i}),n.define("ppma_select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){return n.extend({},{data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var r=n.ajax(e);return r.then(t),r.fail(i),r}},e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){var i=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);function s(){var s=r.transport(r,function(r){var s=i.processResults(r,e);i.options.get("debug")&&window.console&&console.error&&(!s||!s.results||!n.isArray(s.results))&&console.error("PPMA_Select2: The AJAX results did not return an array in the `results` key of the response."),t(s)},function(){(!("status"in s)||0!==s.status&&"0"!==s.status)&&i.trigger("results:message",{message:"errorLoading"})});i._request=s}"function"==typeof r.url&&(r.url=r.url.call(this.$element,e)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(s,this.ajaxOptions.delay)):s()},i}),n.define("ppma_select2/data/tags",["jquery"],function(e){function t(t,n,i){var r=i.get("tags"),s=i.get("createTag");void 0!==s&&(this.createTag=s);var o=i.get("insertTag");if(void 0!==o&&(this.insertTag=o),t.call(this,n,i),e.isArray(r))for(var a=0;a<r.length;a++){var l=r[a],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return t.prototype.query=function(e,t,n){var i=this;if(this._removeOldTags(),null==t.term||null!=t.page){e.call(this,t,n);return}e.call(this,t,function e(r,s){for(var o=r.results,a=0;a<o.length;a++){var l,c=o[a],u=null!=c.children&&!e({results:c.children},!0);if((c.text||"").toUpperCase()===(t.term||"").toUpperCase()||u){if(s)return!1;r.data=o,n(r);return}}if(s)return!0;var p=i.createTag(t);if(null!=p){var d=i.option(p);d.attr("data-ppma_select2-tag",!0),i.addOptions([d]),i.insertTag(o,p)}r.results=o,n(r)})},t.prototype.createTag=function(t,n){var i=e.trim(n.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){this.$element.find("option[data-ppma_select2-tag]").each(function(){!this.selected&&e(this).remove()})},t}),n.define("ppma_select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".ppma_select2-search__field")},t.prototype.query=function(t,n,i){var r=this;n.term=n.term||"";var s=this.tokenizer(n,this.options,function t(n){var i,s=r._normalizeItem(n);if(!r.$element.find("option").filter(function(){return e(this).val()===s.id}).length){var o=r.option(s);o.attr("data-ppma_select2-tag",!0),r._removeOldTags(),r.addOptions([o])}i=s,r.trigger("select",{data:i})});s.term!==n.term&&(this.$search.length&&(this.$search.val(s.term),this.$search.trigger("focus")),n.term=s.term),t.call(this,n,i)},t.prototype.tokenizer=function(t,n,i,r){for(var s=i.get("tokenSeparators")||[],o=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<o.length;){var c=o[a];if(-1===e.inArray(c,s)){a++;continue}var u=o.substr(0,a),p=e.extend({},n,{term:u}),d=l(p);if(null==d){a++;continue}r(d),o=o.substr(a+1)||"",a=0}return{term:o}},t}),n.define("ppma_select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){if(t.term=t.term||"",t.term.length<this.minimumInputLength){this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}});return}e.call(this,t,n)},e}),n.define("ppma_select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){if(t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength){this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}});return}e.call(this,t,n)},e}),n.define("ppma_select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(){i._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected(function(){e.call(i,t,n)})},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current(function(e){var i=null!=e?e.length:0;if(n.maximumSelectionLength>0&&i>=n.maximumSelectionLength){n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}});return}t&&t()})},e}),n.define("ppma_select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="ppma_select2-dropdown"><span class="ppma_select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),n.define("ppma_select2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('<span class="ppma_select2-search ppma_select2-search--dropdown"><input class="ppma_select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var r=this,s=n.id+"-results";t.call(this,n,i),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),n.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",s),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),n.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),n.on("focus",function(){n.isOpen()||r.$search.trigger("focus")}),n.on("results:all",function(e){(null==e.query.term||""===e.query.term)&&(r.showSearch(e)?r.$searchContainer.removeClass("ppma_select2-search--hide"):r.$searchContainer.addClass("ppma_select2-search--hide"))}),n.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),n.define("ppma_select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),n.define("ppma_select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},t.prototype.loadMoreIfNeeded=function(){var t,n=e.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&n){this.$results.offset().top+this.$results.outerHeight(!1)+50>=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)&&this.loadMore()}},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="ppma_select2-results__option ppma_select2-results__option--load-more"role="option" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),n.define("ppma_select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,i){this.$dropdownParent=e(i.get("dropdownParent")||document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("ppma_select2"),t.addClass("ppma_select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},n.prototype._attachPositioningHandler=function(n,i){var r=this,s="scroll.ppma_select2."+i.id,o="resize.ppma_select2."+i.id,a="orientationchange.ppma_select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){t.StoreData(this,"ppma_select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(s,function(n){var i=t.GetData(this,"ppma_select2-scroll-position");e(this).scrollTop(i.y)}),e(window).on(s+" "+o+" "+a,function(e){r._positionDropdown(),r._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var r="scroll.ppma_select2."+i.id,s="resize.ppma_select2."+i.id,o="orientationchange.ppma_select2."+i.id;this.$container.parents().filter(t.hasScroll).off(r),e(window).off(r+" "+s+" "+o)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("ppma_select2-dropdown--above"),i=this.$dropdown.hasClass("ppma_select2-dropdown--below"),r=null,s=this.$container.offset();s.bottom=s.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=s.top,o.bottom=s.top+o.height;var a={height:this.$dropdown.outerHeight(!1)},l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=l.top<s.top-a.height,u=l.bottom>s.bottom+a.height,p={left:s.left,top:o.bottom},d=this.$dropdownParent;"static"===d.css("position")&&(d=d.offsetParent());var h={top:0,left:0};(e.contains(document.body,d[0])||d[0].isConnected)&&(h=d.offset()),p.top-=h.top,p.left-=h.left,n||i||(r="below"),u||!c||n?!c&&u&&n&&(r="below"):r="above",("above"==r||n&&"below"!==r)&&(p.top=o.top-h.top-a.height),null!=r&&(this.$dropdown.removeClass("ppma_select2-dropdown--below ppma_select2-dropdown--above").addClass("ppma_select2-dropdown--"+r),this.$container.removeClass("ppma_select2-container--below ppma_select2-container--above").addClass("ppma_select2-container--"+r)),this.$dropdownContainer.css(p)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),n.define("ppma_select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),n.define("ppma_select2/dropdown/selectOnClose",["../utils"],function(e){function t(){}return t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},t.prototype._handleSelectOnClose=function(t,n){if(n&&null!=n.originalPPMA_Select2Event){var i=n.originalPPMA_Select2Event;if("select"===i._type||"unselect"===i._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var s=e.GetData(r[0],"data");(null==s.element||!s.element.selected)&&(null!=s.element||!s.selected)&&this.trigger("select",{data:s})}},t}),n.define("ppma_select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;(!n||!n.ctrlKey&&!n.metaKey)&&this.trigger("close",{originalEvent:n,originalPPMA_Select2Event:t})},e}),n.define("ppma_select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){var t;return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),n.define("ppma_select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,n,i,r,s,o,a,l,c,u,p,d,h,f,m,g,v,y,b,w,A,D,x,C,S,E,_,O){function P(){this.reset()}return P.prototype.apply=function(u){if(null==(u=e.extend(!0,{},this.defaults,u)).dataAdapter){if(null!=u.ajax?u.dataAdapter=f:null!=u.data?u.dataAdapter=h:u.dataAdapter=d,u.minimumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,v)),u.maximumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,y)),u.maximumSelectionLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,b)),u.tags&&(u.dataAdapter=c.Decorate(u.dataAdapter,m)),(null!=u.tokenSeparators||null!=u.tokenizer)&&(u.dataAdapter=c.Decorate(u.dataAdapter,g)),null!=u.query){var p=t(u.amdBase+"compat/query");u.dataAdapter=c.Decorate(u.dataAdapter,p)}if(null!=u.initSelection){var O=t(u.amdBase+"compat/initSelection");u.dataAdapter=c.Decorate(u.dataAdapter,O)}}if(null==u.resultsAdapter&&(u.resultsAdapter=n,null!=u.ajax&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,x)),null!=u.placeholder&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,D)),u.selectOnClose&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,E))),null==u.dropdownAdapter){if(u.multiple)u.dropdownAdapter=w;else{var P=c.Decorate(w,A);u.dropdownAdapter=P}if(0!==u.minimumResultsForSearch&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,S)),u.closeOnSelect&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,_)),null!=u.dropdownCssClass||null!=u.dropdownCss||null!=u.adaptDropdownCssClass){var q=t(u.amdBase+"compat/dropdownCss");u.dropdownAdapter=c.Decorate(u.dropdownAdapter,q)}u.dropdownAdapter=c.Decorate(u.dropdownAdapter,C)}if(null==u.selectionAdapter){if(u.multiple?u.selectionAdapter=r:u.selectionAdapter=i,null!=u.placeholder&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,s)),u.allowClear&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,o)),u.multiple&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,a)),null!=u.containerCssClass||null!=u.containerCss||null!=u.adaptContainerCssClass){var T=t(u.amdBase+"compat/containerCss");u.selectionAdapter=c.Decorate(u.selectionAdapter,T)}u.selectionAdapter=c.Decorate(u.selectionAdapter,l)}u.language=this._resolveLanguage(u.language),u.language.push("en");for(var M=[],L=0;L<u.language.length;L++){var j=u.language[L];-1===M.indexOf(j)&&M.push(j)}return u.language=M,u.translations=this._processTranslations(u.language,u.debug),u},P.prototype.reset=function(){function t(e){return e.replace(/[^\u0000-\u007E]/g,function e(t){return p[t]||t})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:{},matcher:function n(i,r){if(""===e.trim(i.term))return r;if(r.children&&r.children.length>0){for(var s=e.extend(!0,{},r),o=r.children.length-1;o>=0;o--)null==n(i,r.children[o])&&s.children.splice(o,1);return s.children.length>0?s:n(i,s)}var a=t(r.text).toUpperCase(),l=t(i.term).toUpperCase();return a.indexOf(l)>-1?r:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},P.prototype.applyFromElement=function(e,t){var n=e.language,i=this.defaults.language,r=t.prop("lang"),s=t.closest("[lang]").prop("lang"),o=Array.prototype.concat.call(this._resolveLanguage(r),this._resolveLanguage(n),this._resolveLanguage(i),this._resolveLanguage(s));return e.language=o,e},P.prototype._resolveLanguage=function(t){if(!t||e.isEmptyObject(t))return[];if(e.isPlainObject(t))return[t];n=e.isArray(t)?t:[t];for(var n,i=[],r=0;r<n.length;r++)if(i.push(n[r]),"string"==typeof n[r]&&n[r].indexOf("-")>0){var s=n[r].split("-")[0];i.push(s)}return i},P.prototype._processTranslations=function(t,n){for(var i=new u,r=0;r<t.length;r++){var s=new u,o=t[r];if("string"==typeof o)try{s=u.loadPath(o)}catch(a){try{o=this.defaults.amdLanguageBase+o,s=u.loadPath(o)}catch(l){n&&window.console&&console.warn&&console.warn('PPMA_Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.')}}else s=e.isPlainObject(o)?new u(o):o;i.extend(s)}return i},P.prototype.set=function(t,n){var i=e.camelCase(t),r={};r[i]=n;var s=c._convertData(r);e.extend(!0,this.defaults,s)},new P}),n.define("ppma_select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,i){function r(t,r){if(this.options=t,null!=r&&this.fromElement(r),null!=r&&(this.options=n.applyFromElement(this.options,r)),this.options=n.apply(this.options),r&&r.is("input")){var s=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,s)}}return r.prototype.fromElement=function(e){var n=["ppma_select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),i.GetData(e[0],"ppmaSelect2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('PPMA_Select2: The `data-ppma_select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of PPMA_Select2.'),i.StoreData(e[0],"data",i.GetData(e[0],"ppmaSelect2Tags")),i.StoreData(e[0],"tags",!0)),i.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("PPMA_Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of PPMA_Select2."),e.attr("ajax--url",i.GetData(e[0],"ajaxUrl")),i.StoreData(e[0],"ajax-Url",i.GetData(e[0],"ajaxUrl")));var r={};function s(e,t){return t.toUpperCase()}for(var o=0;o<e[0].attributes.length;o++){var a=e[0].attributes[o].name,l="data-";if(a.substr(0,l.length)==l){var c=a.substring(l.length),u=i.GetData(e[0],c);r[c.replace(/-([a-z])/g,s)]=u}}t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset&&(r=t.extend(!0,{},e[0].dataset,r));var p=t.extend(!0,{},i.GetData(e[0]),r);for(var d in p=i._convertData(p))!(t.inArray(d,n)>-1)&&(t.isPlainObject(this.options[d])?t.extend(this.options[d],p[d]):this.options[d]=p[d]);return this},r.prototype.get=function(e){return this.options[e]},r.prototype.set=function(e,t){this.options[e]=t},r}),n.define("ppma_select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,i){var r=function(e,i){null!=n.GetData(e[0],"ppma_select2")&&n.GetData(e[0],"ppma_select2").destroy(),this.$element=e,this.id=this._generateId(e),i=i||{},this.options=new t(i,e),r.__super__.constructor.call(this);var s=e.attr("tabindex")||0;n.StoreData(e[0],"old-tabindex",s),e.attr("tabindex","-1");var o=this.options.get("dataAdapter");this.dataAdapter=new o(e,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var u=this.options.get("resultsAdapter");this.results=new u(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var p=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){p.trigger("selection:update",{data:e})}),e.addClass("ppma_select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),n.StoreData(e[0],"ppma_select2",this),e.data("ppma_select2",this)};return n.Extend(r,n.Observable),r.prototype._generateId=function(e){var t="";return"ppma_select2-"+(t=(t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,""))},r.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},r.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==t){var s=e.attr("style");if("string"!=typeof s)return null;for(var o=s.split(";"),a=0,l=o.length;a<l;a+=1){var c=o[a].replace(/\s/g,"").match(n);if(null!==c&&c.length>=1)return c[1]}return null}return"computedstyle"==t?window.getComputedStyle(e[0]).width:t},r.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},r.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.ppma_select2",function(){e.dataAdapter.current(function(t){e.trigger("selection:update",{data:t})})}),this.$element.on("focus.ppma_select2",function(t){e.trigger("focus",t)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=t?(this._observer=new t(function(t){e._syncA(),e._syncS(null,t)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},r.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},r.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(i,r){-1===e.inArray(i,n)&&t.trigger(i,r)})},r.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},r.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},r.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("ppma_select2-container--open")}),this.on("close",function(){e.$container.removeClass("ppma_select2-container--open")}),this.on("enable",function(){e.$container.removeClass("ppma_select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("ppma_select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("ppma_select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&t.altKey?(e.close(t),t.preventDefault()):n===i.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._isChangeMutation=function(t,n){var i=!1,r=this;if(!t||!t.target||"OPTION"===t.target.nodeName||"OPTGROUP"===t.target.nodeName){if(n){if(n.addedNodes&&n.addedNodes.length>0)for(var s=0;s<n.addedNodes.length;s++)n.addedNodes[s].selected&&(i=!0);else n.removedNodes&&n.removedNodes.length>0?i=!0:e.isArray(n)&&e.each(n,function(e,t){if(r._isChangeMutation(e,t))return i=!0,!1})}else i=!0;return i}},r.prototype._syncSubtree=function(e,t){var n=this._isChangeMutation(e,t),i=this;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})},r.prototype.trigger=function(e,t){var n=r.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in i){var s=i[e],o={prevented:!1,name:e,args:t};if(n.call(this,s,o),o.prevented){t.prevented=!0;return}}n.call(this,e,t)},r.prototype.toggleDropdown=function(){!this.isDisabled()&&(this.isOpen()?this.close():this.open())},r.prototype.open=function(){!(this.isOpen()||this.isDisabled())&&this.trigger("query",{})},r.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r.prototype.isOpen=function(){return this.$container.hasClass("ppma_select2-container--open")},r.prototype.hasFocus=function(){return this.$container.hasClass("ppma_select2-container--focus")},r.prototype.focus=function(e){!this.hasFocus()&&(this.$container.addClass("ppma_select2-container--focus"),this.trigger("focus",{}))},r.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('PPMA_Select2: The `ppma_select2("enable")` method has been deprecated and will be removed in later PPMA_Select2 versions. Use $element.prop("disabled") instead.'),(null==e||0===e.length)&&(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},r.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('PPMA_Select2: Data can no longer be set using `ppma_select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},r.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('PPMA_Select2: The `ppma_select2("val")` method has been deprecated and will be removed in later PPMA_Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("input").trigger("change")},r.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".ppma_select2"),this.$element.attr("tabindex",n.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("ppma_select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),n.RemoveData(this.$element[0]),this.$element.removeData("ppma_select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},r.prototype.render=function(){var t=e('<span class="ppma_select2 ppma_select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("ppma_select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},r}),n.define("ppma_select2/compat/utils",["jquery"],function(e){return{syncCssClasses:function t(n,i,r){var s,o,a=[];(s=e.trim(n.attr("class")))&&e((s=""+s).split(/\s+/)).each(function(){0===this.indexOf("ppma_select2-")&&a.push(this)}),(s=e.trim(i.attr("class")))&&e((s=""+s).split(/\s+/)).each(function(){0!==this.indexOf("ppma_select2-")&&null!=(o=r(this))&&a.push(o)}),n.attr("class",a.join(" "))}}}),n.define("ppma_select2/compat/containerCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var r=i.call(this),s=this.options.get("containerCssClass")||"";e.isFunction(s)&&(s=s(this.$element));var o=this.options.get("adaptContainerCssClass");if(o=o||n,-1!==s.indexOf(":all:")){s=s.replace(":all:","");var a=o;o=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("containerCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(r,this.$element,o),r.css(l),r.addClass(s),r},i}),n.define("ppma_select2/compat/dropdownCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var r=i.call(this),s=this.options.get("dropdownCssClass")||"";e.isFunction(s)&&(s=s(this.$element));var o=this.options.get("adaptDropdownCssClass");if(o=o||n,-1!==s.indexOf(":all:")){s=s.replace(":all:","");var a=o;o=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("dropdownCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(r,this.$element,o),r.css(l),r.addClass(s),r},i}),n.define("ppma_select2/compat/initSelection",["jquery"],function(e){function t(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("PPMA_Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of PPMA_Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return t.prototype.current=function(t,n){var i=this;if(this._isInitialized){t.call(this,n);return}this.initSelection.call(null,this.$element,function(t){i._isInitialized=!0,e.isArray(t)||(t=[t]),n(t)})},t}),n.define("ppma_select2/compat/inputData",["jquery","../utils"],function(e,t){function n(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("PPMA_Select2: Using a hidden input with PPMA_Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),e.call(this,t,n)}return n.prototype.current=function(t,n){function i(t,n){var r=[];return t.selected||-1!==e.inArray(t.id,n)?(t.selected=!0,r.push(t)):t.selected=!1,t.children&&r.push.apply(r,i(t.children,n)),r}for(var r=[],s=0;s<this._currentData.length;s++){var o=this._currentData[s];r.push.apply(r,i(o,this.$element.val().split(this._valueSeparator)))}n(r)},n.prototype.select=function(t,n){if(this.options.get("multiple")){var i=this.$element.val();i+=this._valueSeparator+n.id,this.$element.val(i),this.$element.trigger("input").trigger("change")}else this.current(function(t){e.map(t,function(e){e.selected=!1})}),this.$element.val(n.id),this.$element.trigger("input").trigger("change")},n.prototype.unselect=function(e,t){var n=this;t.selected=!1,this.current(function(e){for(var i=[],r=0;r<e.length;r++){var s=e[r];t.id!=s.id&&i.push(s.id)}n.$element.val(i.join(n._valueSeparator)),n.$element.trigger("input").trigger("change")})},n.prototype.query=function(e,t,n){for(var i=[],r=0;r<this._currentData.length;r++){var s=this._currentData[r],o=this.matches(t,s);null!==o&&i.push(o)}n({results:i})},n.prototype.addOptions=function(n,i){var r=e.map(i,function(e){return t.GetData(e[0],"data")});this._currentData.push.apply(this._currentData,r)},n}),n.define("ppma_select2/compat/matcher",["jquery"],function(e){return function t(n){return function t(i,r){var s=e.extend(!0,{},r);if(null==i.term||""===e.trim(i.term))return s;if(r.children){for(var o=r.children.length-1;o>=0;o--){var a=r.children[o];n(i.term,a.text,a)||s.children.splice(o,1)}if(s.children.length>0)return s}return n(i.term,r.text,r)?s:null}}}),n.define("ppma_select2/compat/query",[],function(){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("PPMA_Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of PPMA_Select2."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n,this.options.get("query").call(null,t)},e}),n.define("ppma_select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t.addClass("ppma_select2-dropdown--below"),n.addClass("ppma_select2-container--below")},e}),n.define("ppma_select2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$dropdown.on("blur change click dblclick focus focusin focusout input keydown keyup keypress mousedown mouseenter mouseleave mousemove mouseover mouseup search touchend touchstart",function(e){e.stopPropagation()})},e}),n.define("ppma_select2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$selection.on("blur change click dblclick focus focusin focusout input keydown keyup keypress mousedown mouseenter mouseleave mousemove mouseover mouseup search touchend touchstart",function(e){e.stopPropagation()})},e}),t=function(e){var t,n,i=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],s=Array.prototype.slice;if(e.event.fixHooks)for(var o=i.length;o;)e.event.fixHooks[i[--o]]=e.event.mouseHooks;var a=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=r.length;t;)this.addEventListener(r[--t],l,!1);else this.onmousewheel=l;e.data(this,"mousewheel-line-height",a.getLineHeight(this)),e.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=r.length;t;)this.removeEventListener(r[--t],l,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function l(i){var r=i||window.event,o=s.call(arguments,1),l=0,p=0,d=0,h=0,f=0,m=0;if((i=e.event.fix(r)).type="mousewheel","detail"in r&&(d=-1*r.detail),"wheelDelta"in r&&(d=r.wheelDelta),"wheelDeltaY"in r&&(d=r.wheelDeltaY),"wheelDeltaX"in r&&(p=-1*r.wheelDeltaX),"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(p=-1*d,d=0),l=0===d?p:d,"deltaY"in r&&(l=d=-1*r.deltaY),"deltaX"in r&&(p=r.deltaX,0===d&&(l=-1*p)),0!==d||0!==p){if(1===r.deltaMode){var g=e.data(this,"mousewheel-line-height");l*=g,d*=g,p*=g}else if(2===r.deltaMode){var v=e.data(this,"mousewheel-page-height");l*=v,d*=v,p*=v}if(h=Math.max(Math.abs(d),Math.abs(p)),(!n||h<n)&&(n=h,u(r,h)&&(n/=40)),u(r,h)&&(l/=40,p/=40,d/=40),l=Math[l>=1?"floor":"ceil"](l/n),p=Math[p>=1?"floor":"ceil"](p/n),d=Math[d>=1?"floor":"ceil"](d/n),a.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=i.clientX-y.left,m=i.clientY-y.top}return i.deltaX=p,i.deltaY=d,i.deltaFactor=n,i.offsetX=f,i.offsetY=m,i.deltaMode=0,o.unshift(i,l,p,d),t&&clearTimeout(t),t=setTimeout(c,200),(e.event.dispatch||e.event.handle).apply(this,o)}}function c(){n=null}function u(e,t){return a.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof n.define&&n.define.amd?n.define("jquery-mousewheel",["jquery"],t):"object"==typeof exports?module.exports=t:t(e),n.define("jquery.ppma_select2",["jquery","jquery-mousewheel","./ppma_select2/core","./ppma_select2/defaults","./ppma_select2/utils"],function(e,t,n,i,r){if(null==e.fn.ppma_select2){var s=["open","close","destroy"];e.fn.ppma_select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i,o=Array.prototype.slice.call(arguments,1);return(this.each(function(){var e=r.GetData(this,"ppma_select2");null==e&&window.console&&console.error&&console.error("The ppma_select2('"+t+"') method was called on an element that is not using PPMA_Select2."),i=e[t].apply(e,o)}),e.inArray(t,s)>-1)?this:i}throw Error("Invalid arguments for PPMA_Select2: "+t)}}return null==e.fn.ppma_select2.defaults&&(e.fn.ppma_select2.defaults=i),n}),{define:n.define,require:n.require}}(),n=t.require("jquery.ppma_select2");return e.fn.ppma_select2.amd=t,n});