text: (function(){"use strict";function e(e){e[s]||(e[s]=0===u.length?++c:u.pop());var t=e[s];return l[t]||(l[t]=[])}function t(e){var t=e[s];l[t]&&(l[t]=null,e[s]=null,u.push(t))}function n(t,n,r,o){"function"==typeof r&&(o=r,r=null);var s=a.exec(n);n=s[1]||null;var c=s[2]||null;if(n){var l=o,u=o;l=r?function(e){for(var n=e.target;n&&n!==t;n=n.parentElement)if(i.call(n,r)){var o=u.call(n,e,n);return o===!1&&(e.stopPropagation(),e.preventDefault()),o}}:function(e){var n=u.call(t,e,t);return n===!1&&(e.stopPropagation(),e.preventDefault()),n},t.addEventListener(n,l,!1),e(t).push({eventName:n,callback:o,handler:l,namespace:c,selector:r})}}function r(n,r,o,i){"function"==typeof o&&(i=o,o=null);var s=a.exec(r||"");r=s[1];var c=s[2],l=e(n)||[];if(r||c||o||i){var u=l.filter(function(e){return!(c&&e.namespace!==c||r&&e.eventName!==r||i&&e.callback!==i||o&&e.selector!==o)});u.forEach(function(e){n.removeEventListener(e.eventName,e.handler,!1),l.splice(l.indexOf(e),1)}),0===l.length&&t(n)}else l.forEach(function(e){n.removeEventListener(e.eventName,e.handler,!1)}),t(n)}function o(e,t){if(t=t||document,!(this instanceof o))return new o(e,t);if(e)if("string"==typeof e)if(/^\s*</.test(e)){var n=document.createElement("div");n.innerHTML=e,this[0]=n.firstChild,n.removeChild(n.firstChild),this.length=1}else this[0]=t.querySelector(e),this.length=1;else this[0]=e,this.length=1;else this.length=0}var a=/^([^.]+)?(?:\.([^.]+))?$/,i=Element.prototype.matchesSelector||null;i||["webkit","moz","o","ms"].forEach(function(e){var t=Element.prototype[e+"MatchesSelector"];t&&(i=t)});var s="backboneNativeKey"+Math.random(),c=1,l={},u=[];o.prototype={hide:null,appendTo:null,find:null,attr:function(e){return Object.keys(e).forEach(function(t){switch(t){case"html":this[0].innerHTML=e[t];break;case"text":this[0].textContent=e[t];break;case"class":this[0].className=e[t];break;default:this[0].setAttribute(t,e[t])}},this),this},html:function(e){return this[0].innerHTML=e,this},remove:function(){var e=this[0];return e.parentElement&&e.parentElement.removeChild(e),function t(e){r(e);for(var n=0,o=e.childNodes.length;o>n;n++)e.childNodes[n].nodeType!==Node.TEXT_NODE&&t(e.childNodes[n])}(e),this},on:function(e,t,r){return n(this[0],e,t,r),this},off:function(e,t,n){return r(this[0],e,t,n),this},bind:function(e,t){return this.on(e,t)},unbind:function(e,t){return this.off(e,t)},delegate:function(e,t,n){return this.on(t,e,n)},undelegate:function(e,t,n){return this.off(t,e,n)}},o.ajax=function(e){e=e||{};var t=e.type||"GET",n=e.url,r=void 0===e.processData?!0:!!e.processData,o=e.data;if(r&&"object"==typeof o){var a=Object.keys(o).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(o[e])});o=a.join("&")}!o||"GET"!==t&&"HEAD"!==t||(n+=(-1===n.indexOf("?")?"?":"&")+o,o=void 0);var i=new XMLHttpRequest;return i.open(t,n,!0),e.contentType&&i.setRequestHeader("Content-Type",e.contentType),e.beforeSend&&e.beforeSend(i),i.onload=function(){var t=!1,n=i.responseText;if("json"===e.dataType)try{n=JSON.parse(n)}catch(r){t=!0}!t&&i.status>=200&&300>i.status?e.success&&e.success(n,i.statusText,i):e.error&&e.error(i)}.bind(this),i.onerror=i.onabort=function(){e.error&&e.error(i)},i.send(o),i},o.on=n,o.off=r;var f=this,h=f.Backbone?f.Backbone.Native:null,d=f.$;f.Backbone&&(f.Backbone.Native=o),f.$=o,o.noConflict=function(e){return f.$=d,e&&(f.Backbone.Native=h),o},f.Backbone&&(f.Backbone.setDomLibrary?f.Backbone.setDomLibrary(o):f.Backbone.$=o)}).call(this);