!function(t,e){sumo.define("plugins/css",[],function(){if("undefined"==typeof window)return{load:function(t,e,i){i()}};var t=document.getElementsByTagName("head")[0],e=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)/)||0,i=!1,n=!0;e[1]||e[7]?i=parseInt(e[1])<6||parseInt(e[7])<=9:e[2]?n=!1:e[4]&&(i=parseInt(e[4])<18);var s={};s.pluginBuilder="./css-builder";var r,o=function(){r=document.createElement("style"),t.appendChild(r)},a=function(t,e){o();var i=r.styleSheet||r.sheet;if(i&&i.addImport)i.addImport(t),r.onload=e;else{r.textContent='@import "'+t+'";';var n=setInterval(function(){try{r.sheet.cssRules,clearInterval(n),e()}catch(t){}},10)}},l=function(e,i){var s=document.createElement("link");if(s.type="text/css",s.rel="stylesheet",n)s.onload=function(){s.onload=function(){},setTimeout(i,7)};else var r=setInterval(function(){for(var t=0;ts;s++)n[s]=arguments[s+e];switch(e){case 0:return t.call(this,n);case 1:return t.call(this,arguments[0],n);case 2:return t.call(this,arguments[0],arguments[1],n)}var r=Array(e+1);for(s=0;e>s;s++)r[s]=arguments[s];return r[e]=n,t.apply(this,r)}},w=function(t){if(!m.isObject(t))return{};if(p)return p(t);f.prototype=t;var e=new f;return f.prototype=null,e},x=function(t){return function(e){return null==e?void 0:e[t]}},_=Math.pow(2,53)-1,C=x("length"),S=function(t){var e=C(t);return"number"==typeof e&&e>=0&&_>=e};m.each=m.forEach=function(t,e,i){e=g(e,i);var n,s;if(S(t))for(n=0,s=t.length;s>n;n++)e(t[n],n,t);else{var r=m.keys(t);for(n=0,s=r.length;s>n;n++)e(t[r[n]],r[n],t)}return t},m.map=m.collect=function(t,e,i){e=y(e,i);for(var n=!S(t)&&m.keys(t),s=(n||t).length,r=Array(s),o=0;s>o;o++){var a=n?n[o]:o;r[o]=e(t[a],a,t)}return r};var k=function(t){var e=function(e,i,n,s){var r=!S(e)&&m.keys(e),o=(r||e).length,a=t>0?0:o-1;for(s||(n=e[r?r[a]:a],a+=t);a>=0&&o>a;a+=t){var l=r?r[a]:a;n=i(n,e[l],l,e)}return n};return function(t,i,n,s){var r=arguments.length>=3;return e(t,g(i,s,4),n,r)}};m.reduce=m.foldl=m.inject=k(1),m.reduceRight=m.foldr=k(-1),m.find=m.detect=function(t,e,i){var n=S(t)?m.findIndex:m.findKey,s=n(t,e,i);return void 0!==s&&-1!==s?t[s]:void 0},m.filter=m.select=function(t,e,i){var n=[];return e=y(e,i),m.each(t,function(t,i,s){e(t,i,s)&&n.push(t)}),n},m.reject=function(t,e,i){return m.filter(t,m.negate(y(e)),i)},m.every=m.all=function(t,e,i){e=y(e,i);for(var n=!S(t)&&m.keys(t),s=(n||t).length,r=0;s>r;r++){var o=n?n[r]:r;if(!e(t[o],o,t))return!1}return!0},m.some=m.any=function(t,e,i){e=y(e,i);for(var n=!S(t)&&m.keys(t),s=(n||t).length,r=0;s>r;r++){var o=n?n[r]:r;if(e(t[o],o,t))return!0}return!1},m.contains=m.includes=m.include=function(t,e,i,n){return S(t)||(t=m.values(t)),("number"!=typeof i||n)&&(i=0),m.indexOf(t,e,i)>=0},m.invoke=b(function(t,e,i){var n=m.isFunction(e);return m.map(t,function(t){var s=n?e:t[e];return null==s?s:s.apply(t,i)})}),m.pluck=function(t,e){return m.map(t,m.property(e))},m.where=function(t,e){return m.filter(t,m.matcher(e))},m.findWhere=function(t,e){return m.find(t,m.matcher(e))},m.max=function(t,e,i){var n=-(1/0),s=-(1/0),r,o;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t){t=S(t)?t:m.values(t);for(var a=0,l=t.length;l>a;a++)r=t[a],null!=r&&r>n&&(n=r)}else e=y(e,i),m.each(t,function(t,i,r){o=e(t,i,r),(o>s||o===-(1/0)&&n===-(1/0))&&(n=t,s=o)});return n},m.min=function(t,e,i){var n=1/0,s=1/0,r,o;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t){t=S(t)?t:m.values(t);for(var a=0,l=t.length;l>a;a++)r=t[a],null!=r&&n>r&&(n=r)}else e=y(e,i),m.each(t,function(t,i,r){o=e(t,i,r),(s>o||o===1/0&&n===1/0)&&(n=t,s=o)});return n},m.shuffle=function(t){return m.sample(t,1/0)},m.sample=function(t,e,i){if(null==e||i)return S(t)||(t=m.values(t)),t[m.random(t.length-1)];var n=S(t)?m.clone(t):m.values(t),s=C(n);e=Math.max(Math.min(e,s),0);for(var r=s-1,o=0;e>o;o++){var a=m.random(o,r),l=n[o];n[o]=n[a],n[a]=l}return n.slice(0,e)},m.sortBy=function(t,e,i){var n=0;return e=y(e,i),m.pluck(m.map(t,function(t,i,s){return{value:t,index:n++,criteria:e(t,i,s)}}).sort(function(t,e){var i=t.criteria,n=e.criteria;if(i!==n){if(i>n||void 0===i)return 1;if(n>i||void 0===n)return-1}return t.index-e.index}),"value")};var E=function(t,e){return function(i,n,s){var r=e?[[],[]]:{};return n=y(n,s),m.each(i,function(e,s){var o=n(e,s,i);t(r,e,o)}),r}};m.groupBy=E(function(t,e,i){m.has(t,i)?t[i].push(e):t[i]=[e]}),m.indexBy=E(function(t,e,i){t[i]=e}),m.countBy=E(function(t,e,i){m.has(t,i)?t[i]++:t[i]=1});var $=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;m.toArray=function(t){return t?m.isArray(t)?l.call(t):m.isString(t)?t.match($):S(t)?m.map(t,m.identity):m.values(t):[]},m.size=function(t){return null==t?0:S(t)?t.length:m.keys(t).length},m.partition=E(function(t,e,i){t[i?0:1].push(e)},!0),m.first=m.head=m.take=function(t,e,i){return null==t||t.length<1?void 0:null==e||i?t[0]:m.initial(t,t.length-e)},m.initial=function(t,e,i){return l.call(t,0,Math.max(0,t.length-(null==e||i?1:e)))},m.last=function(t,e,i){return null==t||t.length<1?void 0:null==e||i?t[t.length-1]:m.rest(t,Math.max(0,t.length-e))},m.rest=m.tail=m.drop=function(t,e,i){return l.call(t,null==e||i?1:e)},m.compact=function(t){return m.filter(t,Boolean)};var T=function(t,e,i,n){n=n||[];for(var s=n.length,r=0,o=C(t);o>r;r++){var a=t[r];if(S(a)&&(m.isArray(a)||m.isArguments(a)))if(e)for(var l=0,h=a.length;h>l;)n[s++]=a[l++];else T(a,e,i,n),s=n.length;else i||(n[s++]=a)}return n};m.flatten=function(t,e){return T(t,e,!1)},m.without=b(function(t,e){return m.difference(t,e)}),m.uniq=m.unique=function(t,e,i,n){m.isBoolean(e)||(n=i,i=e,e=!1),null!=i&&(i=y(i,n));for(var s=[],r=[],o=0,a=C(t);a>o;o++){var l=t[o],h=i?i(l,o,t):l;e?(o&&r===h||s.push(l),r=h):i?m.contains(r,h)||(r.push(h),s.push(l)):m.contains(s,l)||s.push(l)}return s},m.union=b(function(t){return m.uniq(T(t,!0,!0))}),m.intersection=function(t){for(var e=[],i=arguments.length,n=0,s=C(t);s>n;n++){var r=t[n];if(!m.contains(e,r)){var o;for(o=1;i>o&&m.contains(arguments[o],r);o++);o===i&&e.push(r)}}return e},m.difference=b(function(t,e){return e=T(e,!0,!0),m.filter(t,function(t){return!m.contains(e,t)})}),m.unzip=function(t){for(var e=t&&m.max(t,C).length||0,i=Array(e),n=0;e>n;n++)i[n]=m.pluck(t,n);return i},m.zip=b(m.unzip),m.object=function(t,e){for(var i={},n=0,s=C(t);s>n;n++)e?i[t[n]]=e[n]:i[t[n][0]]=t[n][1];return i};var P=function(t){return function(e,i,n){i=y(i,n);for(var s=C(e),r=t>0?0:s-1;r>=0&&s>r;r+=t)if(i(e[r],r,e))return r;return-1}};m.findIndex=P(1),m.findLastIndex=P(-1),m.sortedIndex=function(t,e,i,n){i=y(i,n,1);for(var s=i(e),r=0,o=C(t);o>r;){var a=Math.floor((r+o)/2);i(t[a])0?o=r>=0?r:Math.max(r+a,o):a=r>=0?Math.min(r+1,a):r+a+1;else if(i&&r&&a)return r=i(n,s),n[r]===s?r:-1;if(s!==s)return r=e(l.call(n,o,a),m.isNaN),r>=0?r+o:-1;for(r=t>0?o:a-1;r>=0&&a>r;r+=t)if(n[r]===s)return r;return-1}};m.indexOf=O(1,m.findIndex,m.sortedIndex),m.lastIndexOf=O(-1,m.findLastIndex),m.range=function(t,e,i){null==e&&(e=t||0,t=0),i||(i=t>e?-1:1);for(var n=Math.max(Math.ceil((e-t)/i),0),s=Array(n),r=0;n>r;r++,t+=i)s[r]=t;return s},m.chunk=function(t,e){if(null==e||1>e)return[];for(var i=[],n=0,s=t.length;s>n;)i.push(l.call(t,n,n+=e));return i};var I=function(t,e,i,n,s){if(!(n instanceof e))return t.apply(i,s);var r=w(t.prototype),o=t.apply(r,s);return m.isObject(o)?o:r};m.bind=b(function(t,e,i){if(!m.isFunction(t))throw new TypeError("Bind must be called on a function");var n=b(function(s){return I(t,n,e,this,i.concat(s))});return n}),m.partial=b(function(t,e){var i=m.partial.placeholder,n=function(){for(var s=0,r=e.length,o=Array(r),a=0;r>a;a++)o[a]=e[a]===i?arguments[s++]:e[a];for(;si)throw new Error("bindAll must be passed function names");for(;i--;){var n=e[i];t[n]=m.bind(t[n],t)}}),m.memoize=function(t,e){var i=function(n){var s=i.cache,r=""+(e?e.apply(this,arguments):n);return m.has(s,r)||(s[r]=t.apply(this,arguments)),s[r]};return i.cache={},i},m.delay=b(function(t,e,i){return setTimeout(function(){return t.apply(null,i)},e)}),m.defer=m.partial(m.delay,m,1),m.throttle=function(t,e,i){var n,s,r,o,a=0;i||(i={});var l=function(){a=i.leading===!1?0:m.now(),n=null,o=t.apply(s,r),n||(s=r=null)},h=function(){var h=m.now();a||i.leading!==!1||(a=h);var u=e-(h-a);return s=this,r=arguments,0>=u||u>e?(n&&(clearTimeout(n),n=null),a=h,o=t.apply(s,r),n||(s=r=null)):n||i.trailing===!1||(n=setTimeout(l,u)),o};return h.cancel=function(){clearTimeout(n),a=0,n=s=r=null},h},m.debounce=function(t,e,i){var n,s,r=function(e,i){n=null,i&&(s=t.apply(e,i))},o=b(function(o){if(n&&clearTimeout(n),i){var a=!n;n=setTimeout(r,e),a&&(s=t.apply(this,o))}else n=m.delay(r,e,this,o);return s});return o.cancel=function(){clearTimeout(n),n=null},o},m.wrap=function(t,e){return m.partial(e,t)},m.negate=function(t){return function(){return!t.apply(this,arguments)}},m.compose=function(){var t=arguments,e=t.length-1;return function(){for(var i=e,n=t[e].apply(this,arguments);i--;)n=t[i].call(this,n);return n}},m.after=function(t,e){return function(){return--t<1?e.apply(this,arguments):void 0}},m.before=function(t,e){var i;return function(){return--t>0&&(i=e.apply(this,arguments)),1>=t&&(e=null),i}},m.once=m.partial(m.before,2),m.restArgs=b;var A=!{toString:null}.propertyIsEnumerable("toString"),L=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],D=function(t,e){var i=L.length,n=t.constructor,s=m.isFunction(n)&&n.prototype||r,o="constructor";for(m.has(t,o)&&!m.contains(e,o)&&e.push(o);i--;)o=L[i],o in t&&t[o]!==s[o]&&!m.contains(e,o)&&e.push(o)};m.keys=function(t){if(!m.isObject(t))return[];if(d)return d(t);var e=[];for(var i in t)m.has(t,i)&&e.push(i);return A&&D(t,e),e},m.allKeys=function(t){if(!m.isObject(t))return[];var e=[];for(var i in t)e.push(i);return A&&D(t,e),e},m.values=function(t){for(var e=m.keys(t),i=e.length,n=Array(i),s=0;i>s;s++)n[s]=t[e[s]];return n},m.mapObject=function(t,e,i){e=y(e,i);for(var n=m.keys(t),s=n.length,r={},o=0;s>o;o++){var a=n[o];r[a]=e(t[a],a,t)}return r},m.pairs=function(t){for(var e=m.keys(t),i=e.length,n=Array(i),s=0;i>s;s++)n[s]=[e[s],t[e[s]]];return n},m.invert=function(t){for(var e={},i=m.keys(t),n=0,s=i.length;s>n;n++)e[t[i[n]]]=i[n];return e},m.functions=m.methods=function(t){var e=[];for(var i in t)m.isFunction(t[i])&&e.push(i);return e.sort()};var N=function(t,e){return function(i){var n=arguments.length;if(e&&(i=Object(i)),2>n||null==i)return i;for(var s=1;n>s;s++)for(var r=arguments[s],o=t(r),a=o.length,l=0;a>l;l++){var h=o[l];e&&void 0!==i[h]||(i[h]=r[h])}return i}};m.extend=N(m.allKeys),m.extendOwn=m.assign=N(m.keys),m.findKey=function(t,e,i){e=y(e,i);for(var n=m.keys(t),s,r=0,o=n.length;o>r;r++)if(s=n[r],e(t[s],s,t))return s};var M=function(t,e,i){return e in i};m.pick=b(function(t,e){var i={},n=e[0];if(null==t)return i;m.isFunction(n)?(e.length>1&&(n=g(n,e[1])),e=m.allKeys(t)):(n=M,e=T(e,!1,!1),t=Object(t));for(var s=0,r=e.length;r>s;s++){var o=e[s],a=t[o];n(a,o,t)&&(i[o]=a)}return i}),m.omit=b(function(t,e){var i=e[0],n;return m.isFunction(i)?(i=m.negate(i),e.length>1&&(n=e[1])):(e=m.map(T(e,!1,!1),String),i=function(t,i){return!m.contains(e,i)}),m.pick(t,i,n)}),m.defaults=N(m.allKeys,!0),m.create=function(t,e){var i=w(t);return e&&m.extendOwn(i,e),i},m.clone=function(t){return m.isObject(t)?m.isArray(t)?t.slice():m.extend({},t):t},m.tap=function(t,e){return e(t),t},m.isMatch=function(t,e){var i=m.keys(e),n=i.length;if(null==t)return!n;for(var s=Object(t),r=0;n>r;r++){var o=i[r];if(e[o]!==s[o]||!(o in s))return!1}return!0};var z,B;z=function(t,e,i,n){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;if(t!==t)return e!==e;var s=typeof t;return"function"!==s&&"object"!==s&&"object"!=typeof e?!1:B(t,e,i,n)},B=function(t,e,i,n){t instanceof m&&(t=t._wrapped),e instanceof m&&(e=e._wrapped);var s=h.call(t);if(s!==h.call(e))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e;case"[object Symbol]":return o.valueOf.call(t)===o.valueOf.call(e)}var r="[object Array]"===s;if(!r){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,l=e.constructor;if(a!==l&&!(m.isFunction(a)&&a instanceof a&&m.isFunction(l)&&l instanceof l)&&"constructor"in t&&"constructor"in e)return!1}i=i||[],n=n||[];for(var u=i.length;u--;)if(i[u]===t)return n[u]===e;if(i.push(t),n.push(e),r){if(u=t.length,u!==e.length)return!1;for(;u--;)if(!z(t[u],e[u],i,n))return!1}else{var c=m.keys(t),d;if(u=c.length,m.keys(e).length!==u)return!1;for(;u--;)if(d=c[u],!m.has(e,d)||!z(t[d],e[d],i,n))return!1}return i.pop(),n.pop(),!0},m.isEqual=function(t,e){return z(t,e)},m.isEmpty=function(t){return null==t?!0:S(t)&&(m.isArray(t)||m.isString(t)||m.isArguments(t))?0===t.length:0===m.keys(t).length},m.isElement=function(t){return!(!t||1!==t.nodeType)},m.isArray=c||function(t){return"[object Array]"===h.call(t)},m.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},m.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(t){m["is"+t]=function(e){return h.call(e)==="[object "+t+"]"}}),m.isArguments(arguments)||(m.isArguments=function(t){return m.has(t,"callee")});var H=i.document&&i.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof H&&(m.isFunction=function(t){return"function"==typeof t||!1}),m.isFinite=function(t){return!m.isSymbol(t)&&isFinite(t)&&!isNaN(parseFloat(t))},m.isNaN=function(t){return m.isNumber(t)&&isNaN(t)},m.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===h.call(t)},m.isNull=function(t){return null===t},m.isUndefined=function(t){return void 0===t},m.has=function(t,e){return null!=t&&u.call(t,e)},m.noConflict=function(){return i._=n,this},m.identity=function(t){return t},m.constant=function(t){return function(){return t}},m.noop=function(){},m.property=x,m.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},m.matcher=m.matches=function(t){return t=m.extendOwn({},t),function(e){return m.isMatch(e,t)}},m.times=function(t,e,i){var n=Array(Math.max(0,t));e=g(e,i,1);for(var s=0;t>s;s++)n[s]=e(s);return n},m.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},m.now=Date.now||function(){return(new Date).getTime()};var V={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},j=m.invert(V),R=function(t){var e=function(e){return t[e]},i="(?:"+m.keys(t).join("|")+")",n=RegExp(i),s=RegExp(i,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(s,e):t}};m.escape=R(V),m.unescape=R(j),m.result=function(t,e,i){var n=null==t?void 0:t[e];return void 0===n&&(n=i),m.isFunction(n)?n.call(t):n};var q=0;m.uniqueId=function(t){var e=++q+"";return t?t+e:e},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var F=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},U=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(t){return"\\"+W[t]};m.template=function(t,e,i){!e&&i&&(e=i),e=m.defaults({},e,m.templateSettings);var n=RegExp([(e.escape||F).source,(e.interpolate||F).source,(e.evaluate||F).source].join("|")+"|$","g"),s=0,r="__p+='";t.replace(n,function(e,i,n,o,a){return r+=t.slice(s,a).replace(U,Q),s=a+e.length,i?r+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":n?r+="'+\n((__t=("+n+"))==null?'':__t)+\n'":o&&(r+="';\n"+o+"\n__p+='"),e}),r+="';\n",e.variable||(r="with(obj||{}){\n"+r+"}\n"),r="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+r+"return __p;\n";var o;try{o=new Function(e.variable||"obj","_",r)}catch(a){throw a.source=r,a}var l=function(t){return o.call(this,t,m)},h=e.variable||"obj";return l.source="function("+h+"){\n"+r+"}",l},m.chain=function(t){var e=m(t);return e._chain=!0,e};var G=function(t,e){return t._chain?m(e).chain():e};m.mixin=function(t){return m.each(m.functions(t),function(e){var i=m[e]=t[e];m.prototype[e]=function(){var t=[this._wrapped];return a.apply(t,arguments),G(this,i.apply(m,t))}}),m},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=s[t];m.prototype[t]=function(){var i=this._wrapped;return e.apply(i,arguments),"shift"!==t&&"splice"!==t||0!==i.length||delete i[0],G(this,i)}}),m.each(["concat","join","slice"],function(t){var e=s[t];m.prototype[t]=function(){return G(this,e.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return String(this._wrapped)},"function"==typeof sumo.define&&sumo.define.amd&&sumo.define("underscore",[],function(){return m})}(),sumo.define("underscore-lib",function(){}),sumo.define("underscore",["underscore-lib"],function(t){return t.noConflict()}),function(e,i){"undefined"!=typeof t?i(e,t,require("underscore")):"function"==typeof sumo.define&&sumo.define.amd?sumo.define("backbone-lib",["underscore","jquery","exports"],function(t,n,s){e.Backbone=i(e,s,t,n)}):e.Backbone=i(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(t,e,i,n){var s=t.Backbone,r=[],o=r.push,a=r.slice,l=r.splice;e.VERSION="1.1.0",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var h=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var n=this._events[t]||(this._events[t]=[]);return n.push({callback:e,context:i,ctx:i||this}),this},once:function(t,e,n){if(!c(this,"once",t,[e,n])||!e)return this;var s=this,r=i.once(function(){s.off(t,r),e.apply(this,arguments)});return r._callback=e,this.on(t,r,n)},off:function(t,e,n){var s,r,o,a,l,h,u,d;if(!this._events||!c(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events={},this;for(a=t?[t]:i.keys(this._events),l=0,h=a.length;h>l;l++)if(t=a[l],o=this._events[t]){if(this._events[t]=s=[],e||n)for(u=0,d=o.length;d>u;u++)r=o[u],(e&&e!==r.callback&&e!==r.callback._callback||n&&n!==r.context)&&s.push(r);s.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=a.call(arguments,1);if(!c(this,"trigger",t,e))return this;var i=this._events[t],n=this._events.all;return i&&d(i,e),n&&d(n,arguments),this},stopListening:function(t,e,n){var s=this._listeningTo;if(!s)return this;var r=!e&&!n;n||"object"!=typeof e||(n=this),t&&((s={})[t._listenId]=t);for(var o in s)t=s[o],t.off(e,n,this),(r||i.isEmpty(t._events))&&delete this._listeningTo[o];return this}},u=/\s+/,c=function(t,e,i,n){if(!i)return!0;if("object"==typeof i){for(var s in i)t[e].apply(t,[s,i[s]].concat(n));return!1}if(u.test(i)){for(var r=i.split(u),o=0,a=r.length;a>o;o++)t[e].apply(t,[r[o]].concat(n));return!1}return!0},d=function(t,e){var i,n=-1,s=t.length,r=e[0],o=e[1],a=e[2];switch(e.length){case 0:for(;++nd;d++)this.trigger("change:"+a[d],this,c[a[d]],n)}if(h)return this;if(!l)for(;this._pending;)this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,i.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!i.isEmpty(this.changed):i.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?i.clone(this.changed):!1;var e,n=!1,s=this._changing?this._previousAttributes:this.attributes;for(var r in t)i.isEqual(s[r],e=t[r])||((n||(n={}))[r]=e);return n},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=t?i.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=this,n=t.success;return t.success=function(i){return e.set(e.parse(i,t),t)?(n&&n(e,i,t),void e.trigger("sync",e,i,t)):!1},H(this,t),this.sync("read",this,t)},save:function(t,e,n){var s,r,o,a=this.attributes;if(null==t||"object"==typeof t?(s=t,n=e):(s={})[t]=e,n=i.extend({validate:!0},n),s&&!n.wait){if(!this.set(s,n))return!1}else if(!this._validate(s,n))return!1;s&&n.wait&&(this.attributes=i.extend({},a,s)),void 0===n.parse&&(n.parse=!0);var l=this,h=n.success;return n.success=function(t){l.attributes=a;var e=l.parse(t,n);return n.wait&&(e=i.extend(s||{},e)),i.isObject(e)&&!l.set(e,n)?!1:(h&&h(l,t,n),void l.trigger("sync",l,t,n))},H(this,n),r=this.isNew()?"create":n.patch?"patch":"update","patch"===r&&(n.attrs=s),o=this.sync(r,this,n),s&&n.wait&&(this.attributes=a),o},destroy:function(t){t=t?i.clone(t):{};var e=this,n=t.success,s=function(){e.trigger("destroy",e,e.collection,t)};if(t.success=function(i){(t.wait||e.isNew())&&s(),n&&n(e,i,t),e.isNew()||e.trigger("sync",e,i,t)},this.isNew())return t.success(),!1;H(this,t);var r=this.sync("delete",this,t);return t.wait||s(),r},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||B();return this.isNew()?t:t+("/"===t.charAt(t.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(t){return this._validate({},i.extend(t||{},{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=i.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return n?(this.trigger("invalid",this,n,i.extend(e,{validationError:n})),!1):!0}});var m=["keys","values","pairs","invert","pick","omit"];i.each(m,function(t){f.prototype[t]=function(){var e=a.call(arguments);return e.unshift(this.attributes),i[t].apply(i,e)}});var g=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,i.extend({silent:!0},e))},v={add:!0,remove:!0,merge:!0},y={add:!0,remove:!1};i.extend(g.prototype,h,{model:f,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:!1},e,y))},remove:function(t,e){var n=!i.isArray(t);t=n?[t]:i.clone(t),e||(e={});var s,r,o,a;for(s=0,r=t.length;r>s;s++)a=t[s]=this.get(t[s]),a&&(delete this._byId[a.id],delete this._byId[a.cid],o=this.indexOf(a),this.models.splice(o,1),this.length--,e.silent||(e.index=o,a.trigger("remove",a,this,e)),this._removeReference(a));return n?t[0]:t},set:function(t,e){e=i.defaults({},e,v),e.parse&&(t=this.parse(t,e));var n=!i.isArray(t);t=n?t?[t]:[]:i.clone(t);var s,r,o,a,l,h,u,c=e.at,d=this.model,p=this.comparator&&null==c&&e.sort!==!1,m=i.isString(this.comparator)?this.comparator:null,g=[],y=[],b={},w=e.add,x=e.merge,_=e.remove,C=!p&&w&&_?[]:!1;for(s=0,r=t.length;r>s;s++){if(l=t[s],o=l instanceof f?a=l:l[d.prototype.idAttribute],h=this.get(o))_&&(b[h.cid]=!0),x&&(l=l===a?a.attributes:l,e.parse&&(l=h.parse(l,e)),h.set(l,e),p&&!u&&h.hasChanged(m)&&(u=!0)),t[s]=h;else if(w){if(a=t[s]=this._prepareModel(l,e),!a)continue;g.push(a),a.on("all",this._onModelEvent,this),this._byId[a.cid]=a,null!=a.id&&(this._byId[a.id]=a)}C&&C.push(h||a)}if(_){for(s=0,r=this.length;r>s;++s)b[(a=this.models[s]).cid]||y.push(a);y.length&&this.remove(y,e)}if(g.length||C&&C.length)if(p&&(u=!0),this.length+=g.length,null!=c)for(s=0,r=g.length;r>s;s++)this.models.splice(c+s,0,g[s]);else{C&&(this.models.length=0);var S=C||g;for(s=0,r=S.length;r>s;s++)this.models.push(S[s])}if(u&&this.sort({silent:!0}),!e.silent){for(s=0,r=g.length;r>s;s++)(a=g[s]).trigger("add",a,this,e);(u||C&&C.length)&&this.trigger("sort",this,e)}return n?t[0]:t},reset:function(t,e){e||(e={});for(var n=0,s=this.models.length;s>n;n++)this._removeReference(this.models[n]);return e.previousModels=this.models,this._reset(),t=this.add(t,i.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t),e},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t),e},slice:function(){return a.apply(this.models,arguments)},get:function(t){return null!=t?this._byId[t.id]||this._byId[t.cid]||this._byId[t]:void 0},at:function(t){return this.models[t]},where:function(t,e){return i.isEmpty(t)?e?void 0:[]:this[e?"find":"filter"](function(e){for(var i in t)if(t[i]!==e.get(i))return!1;return!0})},findWhere:function(t){return this.where(t,!0)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return t||(t={}),i.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(i.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return i.invoke(this.models,"get",t)},fetch:function(t){t=t?i.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=t.success,n=this;return t.success=function(i){var s=t.reset?"reset":"set";n[s](i,t),e&&e(n,i,t),n.trigger("sync",n,i,t)},H(this,t),this.sync("read",this,t)},create:function(t,e){if(e=e?i.clone(e):{},!(t=this._prepareModel(t,e)))return!1;e.wait||this.add(t,e);var n=this,s=e.success;return e.success=function(t,e,i){i.wait&&n.add(t,i),s&&s(t,e,i)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(t instanceof f)return t.collection||(t.collection=this),t;e=e?i.clone(e):{},e.collection=this;var n=new this.model(t,e);return n.validationError?(this.trigger("invalid",this,n.validationError,e),!1):n},_removeReference:function(t){this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){("add"!==t&&"remove"!==t||i===this)&&("destroy"===t&&this.remove(e,n),e&&t==="change:"+e.idAttribute&&(delete this._byId[e.previous(e.idAttribute)],null!=e.id&&(this._byId[e.id]=e)),this.trigger.apply(this,arguments))}});var b=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain"];i.each(b,function(t){g.prototype[t]=function(){var e=a.call(arguments);return e.unshift(this.models),i[t].apply(i,e)}});var w=["groupBy","countBy","sortBy"];i.each(w,function(t){g.prototype[t]=function(e,n){var s=i.isFunction(e)?e:function(t){return t.get(e)};return i[t](this.models,s,n)}});var x=e.View=function(t){this.cid=i.uniqueId("view"),t||(t={}),i.extend(this,i.pick(t,C)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},_=/^(\S+)\s*(.*)$/,C=["model","collection","el","id","attributes","className","tagName","events"];i.extend(x.prototype,h,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(t,i){return this.$el&&this.undelegateEvents(),this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0],i!==!1&&this.delegateEvents(),this},delegateEvents:function(t){if(!t&&!(t=i.result(this,"events")))return this;this.undelegateEvents();for(var e in t){var n=t[e];if(i.isFunction(n)||(n=this[t[e]]),n){var s=e.match(_),r=s[1],o=s[2];n=i.bind(n,this),r+=".delegateEvents"+this.cid,""===o?this.$el.on(r,n):this.$el.on(r,o,n)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(i.result(this,"el"),!1);else{var t=i.extend({},i.result(this,"attributes"));this.id&&(t.id=i.result(this,"id")),this.className&&(t["class"]=i.result(this,"className"));var n=e.$("<"+i.result(this,"tagName")+">").attr(t);this.setElement(n,!1)}}}),e.sync=function(t,n,s){var r=k[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var o={type:r,dataType:"json"};if(s.url||(o.url=i.result(n,"url")||B()),null!=s.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(o.contentType="application/json",o.data=JSON.stringify(s.attrs||n.toJSON(s))),s.emulateJSON&&(o.contentType="application/x-www-form-urlencoded", o.data=o.data?{model:o.data}:{}),s.emulateHTTP&&("PUT"===r||"DELETE"===r||"PATCH"===r)){o.type="POST",s.emulateJSON&&(o.data._method=r);var a=s.beforeSend;s.beforeSend=function(t){return t.setRequestHeader("X-HTTP-Method-Override",r),a?a.apply(this,arguments):void 0}}"GET"===o.type||s.emulateJSON||(o.processData=!1),"PATCH"===o.type&&S&&(o.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var l=s.xhr=e.ajax(i.extend(o,s));return n.trigger("request",n,l,s),l};var S=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),k={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var E=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},$=/\((.*?)\)/g,T=/(\(\?)?:\w+/g,P=/\*\w+/g,O=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend(E.prototype,h,{initialize:function(){},route:function(t,n,s){i.isRegExp(t)||(t=this._routeToRegExp(t)),i.isFunction(n)&&(s=n,n=""),s||(s=this[n]);var r=this;return e.history.route(t,function(i){var o=r._extractParameters(t,i);s&&s.apply(r,o),r.trigger.apply(r,["route:"+n].concat(o)),r.trigger("route",n,o),e.history.trigger("route",r,n,o)}),this},navigate:function(t,i){return e.history.navigate(t,i),this},_bindRoutes:function(){if(this.routes){this.routes=i.result(this,"routes");for(var t,e=i.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(O,"\\$&").replace($,"(?:$1)?").replace(T,function(t,e){return e?t:"([^/]+)"}).replace(P,"(.*?)"),new RegExp("^"+t+"$")},_extractParameters:function(t,e){var n=t.exec(e).slice(1);return i.map(n,function(t){return t?decodeURIComponent(t):null})}});var I=e.History=function(){this.handlers=[],i.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},A=/^[#\/]|\s+$/g,L=/^\/+|\/+$/g,D=/msie [\w.]+/,N=/\/$/,M=/[?#].*$/;I.started=!1,i.extend(I.prototype,h,{interval:50,getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(null==t)if(this._hasPushState||!this._wantsHashChange||e){t=this.location.pathname;var i=this.root.replace(N,"");t.indexOf(i)||(t=t.slice(i.length))}else t=this.getHash();return t.replace(A,"")},start:function(t){if(I.started)throw new Error("Backbone.history has already been started");I.started=!0,this.options=i.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var n=this.getFragment(),s=document.documentMode,r=D.exec(navigator.userAgent.toLowerCase())&&(!s||7>=s);this.root=("/"+this.root+"/").replace(L,"/"),r&&this._wantsHashChange&&(this.iframe=e.$('