").append(ie.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){a.each(n,i||[e.responseText,t,e])}),this},ie.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ie.fn[t]=function(e){return this.on(t,e)}}),ie.expr.filters.animated=function(e){return ie.grep(ie.timers,function(t){return e===t.elem}).length};var rn=e.document.documentElement;ie.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=ie.css(e,"position"),f=ie(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=ie.css(e,"top"),u=ie.css(e,"left"),l=("absolute"===c||"fixed"===c)&&ie.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),ie.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},ie.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ie.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;return o?(t=o.documentElement,ie.contains(t,i)?(typeof i.getBoundingClientRect!==ke&&(r=i.getBoundingClientRect()),n=V(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r):void 0},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===ie.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ie.nodeName(e[0],"html")||(n=e.offset()),n.top+=ie.css(e[0],"borderTopWidth",!0),n.left+=ie.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-ie.css(r,"marginTop",!0),left:t.left-n.left-ie.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||rn;e&&!ie.nodeName(e,"html")&&"static"===ie.css(e,"position");)e=e.offsetParent;return e||rn})}}),ie.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);ie.fn[e]=function(r){return Ae(this,function(e,r,i){var o=V(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?ie(o).scrollLeft():i,n?i:ie(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),ie.each(["top","left"],function(e,t){ie.cssHooks[t]=N(ne.pixelPosition,function(e,n){return n?(n=tt(e,t),rt.test(n)?ie(e).position()[t]+"px":n):void 0})}),ie.each({Height:"height",Width:"width"},function(e,t){ie.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){ie.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Ae(this,function(t,n,r){var i;return ie.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?ie.css(t,n,a):ie.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),ie.fn.size=function(){return this.length},ie.fn.andSelf=ie.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ie});var on=e.jQuery,an=e.$;return ie.noConflict=function(t){return e.$===ie&&(e.$=an),t&&e.jQuery===ie&&(e.jQuery=on),ie},typeof t===ke&&(e.jQuery=e.$=ie),ie}),function(){var e=this,t=e._,n=Array.prototype,r=Object.prototype,i=Function.prototype,o=n.push,a=n.slice,s=n.concat,u=r.toString,l=r.hasOwnProperty,c=Array.isArray,f=Object.keys,d=i.bind,h=function(e){return e instanceof h?e:this instanceof h?void(this._wrapped=e):new h(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=h),exports._=h):e._=h,h.VERSION="1.7.0";var p=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}};h.iteratee=function(e,t,n){return null==e?h.identity:h.isFunction(e)?p(e,t,n):h.isObject(e)?h.matches(e):h.property(e)},h.each=h.forEach=function(e,t,n){if(null==e)return e;t=p(t,n);var r,i=e.length;if(i===+i)for(r=0;i>r;r++)t(e[r],r,e);else{var o=h.keys(e);for(r=0,i=o.length;i>r;r++)t(e[o[r]],o[r],e)}return e},h.map=h.collect=function(e,t,n){if(null==e)return[];t=h.iteratee(t,n);for(var r,i=e.length!==+e.length&&h.keys(e),o=(i||e).length,a=Array(o),s=0;o>s;s++)r=i?i[s]:s,a[s]=t(e[r],r,e);return a};var g="Reduce of empty array with no initial value";h.reduce=h.foldl=h.inject=function(e,t,n,r){null==e&&(e=[]),t=p(t,r,4);var i,o=e.length!==+e.length&&h.keys(e),a=(o||e).length,s=0;if(arguments.length<3){if(!a)throw new TypeError(g);n=e[o?o[s++]:s++]}for(;a>s;s++)i=o?o[s]:s,n=t(n,e[i],i,e);return n},h.reduceRight=h.foldr=function(e,t,n,r){null==e&&(e=[]),t=p(t,r,4);var i,o=e.length!==+e.length&&h.keys(e),a=(o||e).length;if(arguments.length<3){if(!a)throw new TypeError(g);n=e[o?o[--a]:--a]}for(;a--;)i=o?o[a]:a,
n=t(n,e[i],i,e);return n},h.find=h.detect=function(e,t,n){var r;return t=h.iteratee(t,n),h.some(e,function(e,n,i){return t(e,n,i)?(r=e,!0):void 0}),r},h.filter=h.select=function(e,t,n){var r=[];return null==e?r:(t=h.iteratee(t,n),h.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r)},h.reject=function(e,t,n){return h.filter(e,h.negate(h.iteratee(t)),n)},h.every=h.all=function(e,t,n){if(null==e)return!0;t=h.iteratee(t,n);var r,i,o=e.length!==+e.length&&h.keys(e),a=(o||e).length;for(r=0;a>r;r++)if(i=o?o[r]:r,!t(e[i],i,e))return!1;return!0},h.some=h.any=function(e,t,n){if(null==e)return!1;t=h.iteratee(t,n);var r,i,o=e.length!==+e.length&&h.keys(e),a=(o||e).length;for(r=0;a>r;r++)if(i=o?o[r]:r,t(e[i],i,e))return!0;return!1},h.contains=h.include=function(e,t){return null==e?!1:(e.length!==+e.length&&(e=h.values(e)),h.indexOf(e,t)>=0)},h.invoke=function(e,t){var n=a.call(arguments,2),r=h.isFunction(t);return h.map(e,function(e){return(r?t:e[t]).apply(e,n)})},h.pluck=function(e,t){return h.map(e,h.property(t))},h.where=function(e,t){return h.filter(e,h.matches(t))},h.findWhere=function(e,t){return h.find(e,h.matches(t))},h.max=function(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t&&null!=e){e=e.length===+e.length?e:h.values(e);for(var s=0,u=e.length;u>s;s++)r=e[s],r>o&&(o=r)}else t=h.iteratee(t,n),h.each(e,function(e,n,r){i=t(e,n,r),(i>a||i===-1/0&&o===-1/0)&&(o=e,a=i)});return o},h.min=function(e,t,n){var r,i,o=1/0,a=1/0;if(null==t&&null!=e){e=e.length===+e.length?e:h.values(e);for(var s=0,u=e.length;u>s;s++)r=e[s],o>r&&(o=r)}else t=h.iteratee(t,n),h.each(e,function(e,n,r){i=t(e,n,r),(a>i||1/0===i&&1/0===o)&&(o=e,a=i)});return o},h.shuffle=function(e){for(var t,n=e&&e.length===+e.length?e:h.values(e),r=n.length,i=Array(r),o=0;r>o;o++)t=h.random(0,o),t!==o&&(i[o]=i[t]),i[t]=n[o];return i},h.sample=function(e,t,n){return null==t||n?(e.length!==+e.length&&(e=h.values(e)),e[h.random(e.length-1)]):h.shuffle(e).slice(0,Math.max(0,t))},h.sortBy=function(e,t,n){return t=h.iteratee(t,n),h.pluck(h.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return e.index-t.index}),"value")};var m=function(e){return function(t,n,r){var i={};return n=h.iteratee(n,r),h.each(t,function(r,o){var a=n(r,o,t);e(i,r,a)}),i}};h.groupBy=m(function(e,t,n){h.has(e,n)?e[n].push(t):e[n]=[t]}),h.indexBy=m(function(e,t,n){e[n]=t}),h.countBy=m(function(e,t,n){h.has(e,n)?e[n]++:e[n]=1}),h.sortedIndex=function(e,t,n,r){n=h.iteratee(n,r,1);for(var i=n(t),o=0,a=e.length;a>o;){var s=o+a>>>1;n(e[s])
t?[]:a.call(e,0,t)},h.initial=function(e,t,n){return a.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},h.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:a.call(e,Math.max(e.length-t,0))},h.rest=h.tail=h.drop=function(e,t,n){return a.call(e,null==t||n?1:t)},h.compact=function(e){return h.filter(e,h.identity)};var v=function(e,t,n,r){if(t&&h.every(e,h.isArray))return s.apply(r,e);for(var i=0,a=e.length;a>i;i++){var u=e[i];h.isArray(u)||h.isArguments(u)?t?o.apply(r,u):v(u,t,n,r):n||r.push(u)}return r};h.flatten=function(e,t){return v(e,t,!1,[])},h.without=function(e){return h.difference(e,a.call(arguments,1))},h.uniq=h.unique=function(e,t,n,r){if(null==e)return[];h.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=h.iteratee(n,r));for(var i=[],o=[],a=0,s=e.length;s>a;a++){var u=e[a];if(t)a&&o===u||i.push(u),o=u;else if(n){var l=n(u,a,e);h.indexOf(o,l)<0&&(o.push(l),i.push(u))}else h.indexOf(i,u)<0&&i.push(u)}return i},h.union=function(){return h.uniq(v(arguments,!0,!0,[]))},h.intersection=function(e){if(null==e)return[];for(var t=[],n=arguments.length,r=0,i=e.length;i>r;r++){var o=e[r];if(!h.contains(t,o)){for(var a=1;n>a&&h.contains(arguments[a],o);a++);a===n&&t.push(o)}}return t},h.difference=function(e){var t=v(a.call(arguments,1),!0,!0,[]);return h.filter(e,function(e){return!h.contains(t,e)})},h.zip=function(e){if(null==e)return[];for(var t=h.max(arguments,"length").length,n=Array(t),r=0;t>r;r++)n[r]=h.pluck(arguments,r);return n},h.object=function(e,t){if(null==e)return{};for(var n={},r=0,i=e.length;i>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},h.indexOf=function(e,t,n){if(null==e)return-1;var r=0,i=e.length;if(n){if("number"!=typeof n)return r=h.sortedIndex(e,t),e[r]===t?r:-1;r=0>n?Math.max(0,i+n):n}for(;i>r;r++)if(e[r]===t)return r;return-1},h.lastIndexOf=function(e,t,n){if(null==e)return-1;var r=e.length;for("number"==typeof n&&(r=0>n?r+n+1:Math.min(r,n+1));--r>=0;)if(e[r]===t)return r;return-1},h.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=n||1;for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;r>o;o++,e+=n)i[o]=e;return i};var y=function(){};h.bind=function(e,t){var n,r;if(d&&e.bind===d)return d.apply(e,a.call(arguments,1));if(!h.isFunction(e))throw new TypeError("Bind must be called on a function");return n=a.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(a.call(arguments)));y.prototype=e.prototype;var i=new y;y.prototype=null;var o=e.apply(i,n.concat(a.call(arguments)));return h.isObject(o)?o:i}},h.partial=function(e){var t=a.call(arguments,1);return function(){for(var n=0,r=t.slice(),i=0,o=r.length;o>i;i++)r[i]===h&&(r[i]=arguments[n++]);for(;n=r)throw new Error("bindAll must be passed function names");for(t=1;r>t;t++)n=arguments[t],e[n]=h.bind(e[n],e);return e},h.memoize=function(e,t){var n=function(r){var i=n.cache,o=t?t.apply(this,arguments):r;return h.has(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n},h.delay=function(e,t){var n=a.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},h.defer=function(e){return h.delay.apply(h,[e,1].concat(a.call(arguments,1)))},h.throttle=function(e,t,n){var r,i,o,a=null,s=0;n||(n={});var u=function(){s=n.leading===!1?0:h.now(),a=null,o=e.apply(r,i),a||(r=i=null)};return function(){var l=h.now();s||n.leading!==!1||(s=l);var c=t-(l-s);return r=this,i=arguments,0>=c||c>t?(clearTimeout(a),a=null,s=l,o=e.apply(r,i),a||(r=i=null)):a||n.trailing===!1||(a=setTimeout(u,c)),o}},h.debounce=function(e,t,n){var r,i,o,a,s,u=function(){var l=h.now()-a;t>l&&l>0?r=setTimeout(u,t-l):(r=null,n||(s=e.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,a=h.now();var l=n&&!r;return r||(r=setTimeout(u,t)),l&&(s=e.apply(o,i),o=i=null),s}},h.wrap=function(e,t){return h.partial(t,e)},h.negate=function(e){return function(){return!e.apply(this,arguments)}},h.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},h.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},h.before=function(e,t){var n;return function(){return--e>0?n=t.apply(this,arguments):t=null,n}},h.once=h.partial(h.before,2),h.keys=function(e){if(!h.isObject(e))return[];if(f)return f(e);var t=[];for(var n in e)h.has(e,n)&&t.push(n);return t},h.values=function(e){for(var t=h.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=e[t[i]];return r},h.pairs=function(e){for(var t=h.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=[t[i],e[t[i]]];return r},h.invert=function(e){for(var t={},n=h.keys(e),r=0,i=n.length;i>r;r++)t[e[n[r]]]=n[r];return t},h.functions=h.methods=function(e){var t=[];for(var n in e)h.isFunction(e[n])&&t.push(n);return t.sort()},h.extend=function(e){if(!h.isObject(e))return e;for(var t,n,r=1,i=arguments.length;i>r;r++){t=arguments[r];for(n in t)l.call(t,n)&&(e[n]=t[n])}return e},h.pick=function(e,t,n){var r,i={};if(null==e)return i;if(h.isFunction(t)){t=p(t,n);for(r in e){var o=e[r];t(o,r,e)&&(i[r]=o)}}else{var u=s.apply([],a.call(arguments,1));e=new Object(e);for(var l=0,c=u.length;c>l;l++)r=u[l],r in e&&(i[r]=e[r])}return i},h.omit=function(e,t,n){if(h.isFunction(t))t=h.negate(t);else{var r=h.map(s.apply([],a.call(arguments,1)),String);t=function(e,t){return!h.contains(r,t)}}return h.pick(e,t,n)},h.defaults=function(e){if(!h.isObject(e))return e;for(var t=1,n=arguments.length;n>t;t++){var r=arguments[t];for(var i in r)void 0===e[i]&&(e[i]=r[i])}return e},h.clone=function(e){return h.isObject(e)?h.isArray(e)?e.slice():h.extend({},e):e},h.tap=function(e,t){return t(e),e};var b=function(e,t,n,r){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof h&&(e=e._wrapped),t instanceof h&&(t=t._wrapped);var i=u.call(e);if(i!==u.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}if("object"!=typeof e||"object"!=typeof t)return!1;for(var o=n.length;o--;)if(n[o]===e)return r[o]===t;var a=e.constructor,s=t.constructor;if(a!==s&&"constructor"in e&&"constructor"in t&&!(h.isFunction(a)&&a instanceof a&&h.isFunction(s)&&s instanceof s))return!1;n.push(e),r.push(t);var l,c;if("[object Array]"===i){if(l=e.length,c=l===t.length)for(;l--&&(c=b(e[l],t[l],n,r)););}else{var f,d=h.keys(e);if(l=d.length,c=h.keys(t).length===l)for(;l--&&(f=d[l],c=h.has(t,f)&&b(e[f],t[f],n,r)););}return n.pop(),r.pop(),c};h.isEqual=function(e,t){return b(e,t,[],[])},h.isEmpty=function(e){if(null==e)return!0;if(h.isArray(e)||h.isString(e)||h.isArguments(e))return 0===e.length;for(var t in e)if(h.has(e,t))return!1;return!0},h.isElement=function(e){return!(!e||1!==e.nodeType)},h.isArray=c||function(e){return"[object Array]"===u.call(e)},h.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},h.each(["Arguments","Function","String","Number","Date","RegExp"],function(e){h["is"+e]=function(t){return u.call(t)==="[object "+e+"]"}}),h.isArguments(arguments)||(h.isArguments=function(e){return h.has(e,"callee")}),"function"!=typeof/./&&(h.isFunction=function(e){return"function"==typeof e||!1}),h.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},h.isNaN=function(e){return h.isNumber(e)&&e!==+e},h.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===u.call(e)},h.isNull=function(e){return null===e},h.isUndefined=function(e){return void 0===e},h.has=function(e,t){return null!=e&&l.call(e,t)},h.noConflict=function(){return e._=t,this},h.identity=function(e){return e},h.constant=function(e){return function(){return e}},h.noop=function(){},h.property=function(e){return function(t){return t[e]}},h.matches=function(e){var t=h.pairs(e),n=t.length;return function(e){if(null==e)return!n;e=new Object(e);for(var r=0;n>r;r++){var i=t[r],o=i[0];if(i[1]!==e[o]||!(o in e))return!1}return!0}},h.times=function(e,t,n){var r=Array(Math.max(0,e));t=p(t,n,1);for(var i=0;e>i;i++)r[i]=t(i);return r},h.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},h.now=Date.now||function(){return(new Date).getTime()};var x={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},w=h.invert(x),T=function(e){var t=function(t){return e[t]},n="(?:"+h.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};h.escape=T(x),h.unescape=T(w),h.result=function(e,t){if(null==e)return void 0;var n=e[t];return h.isFunction(n)?e[t]():n};var k=0;h.uniqueId=function(e){var t=++k+"";return e?e+t:t},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var E=/(.)^/,C={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},N=/\\|'|\r|\n|\u2028|\u2029/g,_=function(e){return"\\"+C[e]};h.template=function(e,t,n){!t&&n&&(t=n),t=h.defaults({},t,h.templateSettings);var r=RegExp([(t.escape||E).source,(t.interpolate||E).source,(t.evaluate||E).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,function(t,n,r,a,s){return o+=e.slice(i,s).replace(N,_),i=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t}),o+="';\n",t.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(t.variable||"obj","_",o)}catch(s){throw s.source=o,s}var u=function(e){return a.call(this,e,h)},l=t.variable||"obj";return u.source="function("+l+"){\n"+o+"}",u},h.chain=function(e){var t=h(e);return t._chain=!0,t};var S=function(e){return this._chain?h(e).chain():e};h.mixin=function(e){h.each(h.functions(e),function(t){var n=h[t]=e[t];h.prototype[t]=function(){var e=[this._wrapped];return o.apply(e,arguments),S.call(this,n.apply(h,e))}})},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=n[e];h.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],S.call(this,n)}}),h.each(["concat","join","slice"],function(e){var t=n[e];h.prototype[e]=function(){return S.call(this,t.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}.call(this),function(e,t){if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(n,r,i){e.Backbone=t(e,i,n,r)});else if("undefined"!=typeof exports){var n=require("underscore");t(e,exports,n)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,t,n,r){var i=e.Backbone,o=[],a=(o.push,o.slice);o.splice;t.VERSION="1.1.2",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var s=t.Events={on:function(e,t,n){if(!l(this,"on",e,[t,n])||!t)return this;this._events||(this._events={});var r=this._events[e]||(this._events[e]=[]);return r.push({callback:t,context:n,ctx:n||this}),this},once:function(e,t,r){if(!l(this,"once",e,[t,r])||!t)return this;var i=this,o=n.once(function(){i.off(e,o),t.apply(this,arguments)});return o._callback=t,this.on(e,o,r)},off:function(e,t,r){var i,o,a,s,u,c,f,d;if(!this._events||!l(this,"off",e,[t,r]))return this;if(!e&&!t&&!r)return this._events=void 0,this;for(s=e?[e]:n.keys(this._events),u=0,c=s.length;c>u;u++)if(e=s[u],a=this._events[e]){if(this._events[e]=i=[],t||r)for(f=0,d=a.length;d>f;f++)o=a[f],(t&&t!==o.callback&&t!==o.callback._callback||r&&r!==o.context)&&i.push(o);i.length||delete this._events[e]}return this},trigger:function(e){if(!this._events)return this;var t=a.call(arguments,1);if(!l(this,"trigger",e,t))return this;var n=this._events[e],r=this._events.all;return n&&c(n,t),r&&c(r,arguments),this},stopListening:function(e,t,r){var i=this._listeningTo;if(!i)return this;var o=!t&&!r;r||"object"!=typeof t||(r=this),e&&((i={})[e._listenId]=e);for(var a in i)e=i[a],e.off(t,r,this),(o||n.isEmpty(e._events))&&delete this._listeningTo[a];return this}},u=/\s+/,l=function(e,t,n,r){if(!n)return!0;if("object"==typeof n){for(var i in n)e[t].apply(e,[i,n[i]].concat(r));return!1}if(u.test(n)){for(var o=n.split(u),a=0,s=o.length;s>a;a++)e[t].apply(e,[o[a]].concat(r));return!1}return!0},c=function(e,t){var n,r=-1,i=e.length,o=t[0],a=t[1],s=t[2];switch(t.length){case 0:for(;++rd;d++)this.trigger("change:"+s[d],this,f[s[d]],r)}if(l)return this;if(!u)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?n.clone(this.changed):!1;var t,r=!1,i=this._changing?this._previousAttributes:this.attributes;for(var o in e)n.isEqual(i[o],t=e[o])||((r||(r={}))[o]=t);return r},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=e?n.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=this,r=e.success;return e.success=function(n){return t.set(t.parse(n,e),e)?(r&&r(t,n,e),void t.trigger("sync",t,n,e)):!1},P(this,e),this.sync("read",this,e)},save:function(e,t,r){var i,o,a,s=this.attributes;if(null==e||"object"==typeof e?(i=e,r=t):(i={})[e]=t,r=n.extend({validate:!0},r),i&&!r.wait){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;i&&r.wait&&(this.attributes=n.extend({},s,i)),void 0===r.parse&&(r.parse=!0);var u=this,l=r.success;return r.success=function(e){u.attributes=s;var t=u.parse(e,r);return r.wait&&(t=n.extend(i||{},t)),n.isObject(t)&&!u.set(t,r)?!1:(l&&l(u,e,r),void u.trigger("sync",u,e,r))},P(this,r),o=this.isNew()?"create":r.patch?"patch":"update","patch"===o&&(r.attrs=i),a=this.sync(o,this,r),i&&r.wait&&(this.attributes=s),a},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=function(){t.trigger("destroy",t,t.collection,e)};if(e.success=function(n){(e.wait||t.isNew())&&i(),r&&r(t,n,e),t.isNew()||t.trigger("sync",t,n,e)},this.isNew())return e.success(),!1;P(this,e);var o=this.sync("delete",this,e);return e.wait||i(),o},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||q();return this.isNew()?e:e.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return r?(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1):!0}});var h=["keys","values","pairs","invert","pick","omit"];n.each(h,function(e){d.prototype[e]=function(){var t=a.call(arguments);return t.unshift(this.attributes),n[e].apply(n,t)}});var p=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},g={add:!0,remove:!0,merge:!0},m={add:!0,remove:!1};n.extend(p.prototype,s,{model:d,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,m))},remove:function(e,t){var r=!n.isArray(e);e=r?[e]:n.clone(e),t||(t={});var i,o,a,s;for(i=0,o=e.length;o>i;i++)s=e[i]=this.get(e[i]),s&&(delete this._byId[s.id],delete this._byId[s.cid],a=this.indexOf(s),this.models.splice(a,1),this.length--,t.silent||(t.index=a,s.trigger("remove",s,this,t)),this._removeReference(s,t));return r?e[0]:e},set:function(e,t){t=n.defaults({},t,g),t.parse&&(e=this.parse(e,t));var r=!n.isArray(e);e=r?e?[e]:[]:n.clone(e);var i,o,a,s,u,l,c,f=t.at,h=this.model,p=this.comparator&&null==f&&t.sort!==!1,m=n.isString(this.comparator)?this.comparator:null,v=[],y=[],b={},x=t.add,w=t.merge,T=t.remove,k=!p&&x&&T?[]:!1;for(i=0,o=e.length;o>i;i++){if(u=e[i]||{},a=u instanceof d?s=u:u[h.prototype.idAttribute||"id"],l=this.get(a))T&&(b[l.cid]=!0),w&&(u=u===s?s.attributes:u,t.parse&&(u=l.parse(u,t)),l.set(u,t),p&&!c&&l.hasChanged(m)&&(c=!0)),e[i]=l;else if(x){if(s=e[i]=this._prepareModel(u,t),!s)continue;v.push(s),this._addReference(s,t)}s=l||s,!k||!s.isNew()&&b[s.id]||k.push(s),b[s.id]=!0}if(T){for(i=0,o=this.length;o>i;++i)b[(s=this.models[i]).cid]||y.push(s);y.length&&this.remove(y,t)}if(v.length||k&&k.length)if(p&&(c=!0),this.length+=v.length,null!=f)for(i=0,o=v.length;o>i;i++)this.models.splice(f+i,0,v[i]);else{k&&(this.models.length=0);var E=k||v;for(i=0,o=E.length;o>i;i++)this.models.push(E[i])}if(c&&this.sort({silent:!0}),!t.silent){for(i=0,o=v.length;o>i;i++)(s=v[i]).trigger("add",s,this,t);(c||k&&k.length)&&this.trigger("sort",this,t)}return r?e[0]:e},reset:function(e,t){t||(t={});for(var r=0,i=this.models.length;i>r;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(){return a.apply(this.models,arguments)},get:function(e){return null==e?void 0:this._byId[e]||this._byId[e.id]||this._byId[e.cid]},at:function(e){return this.models[e]},where:function(e,t){return n.isEmpty(e)?t?void 0:[]:this[t?"find":"filter"](function(t){for(var n in e)if(e[n]!==t.get(n))return!1;return!0})},findWhere:function(e){return this.where(e,!0)},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),n.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return n.invoke(this.models,"get",e)},fetch:function(e){e=e?n.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=e.success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t(r,n,e),r.trigger("sync",r,n,e)},P(this,e),this.sync("read",this,e)},create:function(e,t){if(t=t?n.clone(t):{},!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var r=this,i=t.success;return t.success=function(e,n){t.wait&&r.add(e,t),i&&i(e,n,t)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(e instanceof d)return e;t=t?n.clone(t):{},t.collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_addReference:function(e,t){this._byId[e.cid]=e,null!=e.id&&(this._byId[e.id]=e),e.collection||(e.collection=this),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){("add"!==e&&"remove"!==e||n===this)&&("destroy"===e&&this.remove(t,r),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],null!=t.id&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments))}});var v=["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","sample"];n.each(v,function(e){p.prototype[e]=function(){var t=a.call(arguments);return t.unshift(this.models),n[e].apply(n,t)}});var y=["groupBy","countBy","sortBy","indexBy"];n.each(y,function(e){p.prototype[e]=function(t,r){var i=n.isFunction(t)?t:function(e){return e.get(t)};return n[e](this.models,i,r)}});var b=t.View=function(e){this.cid=n.uniqueId("view"),e||(e={}),n.extend(this,n.pick(e,w)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},x=/^(\S+)\s*(.*)$/,w=["model","collection","el","id","attributes","className","tagName","events"];n.extend(b.prototype,s,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(e,n){return this.$el&&this.undelegateEvents(),this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0],n!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=n.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var r=e[t];if(n.isFunction(r)||(r=this[e[t]]),r){var i=t.match(x),o=i[1],a=i[2];r=n.bind(r,this),o+=".delegateEvents"+this.cid,""===a?this.$el.on(o,r):this.$el.on(o,a,r)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"),!1);else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e["class"]=n.result(this,"className"));var r=t.$("<"+n.result(this,"tagName")+">").attr(e);this.setElement(r,!1)}}}),t.sync=function(e,r,i){var o=k[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var a={type:o,dataType:"json"};if(i.url||(a.url=n.result(r,"url")||q()),null!=i.data||!r||"create"!==e&&"update"!==e&&"patch"!==e||(a.contentType="application/json",a.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){a.type="POST",i.emulateJSON&&(a.data._method=o);var s=i.beforeSend;i.beforeSend=function(e){return e.setRequestHeader("X-HTTP-Method-Override",o),s?s.apply(this,arguments):void 0}}"GET"===a.type||i.emulateJSON||(a.processData=!1),"PATCH"===a.type&&T&&(a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var u=i.xhr=t.ajax(n.extend(a,i));return r.trigger("request",r,u,i),u};var T=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),k={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var E=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},C=/\((.*?)\)/g,N=/(\(\?)?:\w+/g,_=/\*\w+/g,S=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(E.prototype,s,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return t.history.route(e,function(n){var a=o._extractParameters(e,n);o.execute(i,a),o.trigger.apply(o,["route:"+r].concat(a)),o.trigger("route",r,a),t.history.trigger("route",o,r,a)}),this},execute:function(e,t){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(S,"\\$&").replace(C,"(?:$1)?").replace(N,function(e,t){return t?e:"([^/?]+)"}).replace(_,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null})}});var A=t.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},j=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,L=/msie [\w.]+/,H=/\/$/,$=/#.*$/;A.started=!1,n.extend(A.prototype,s,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(null==e)if(this._hasPushState||!this._wantsHashChange||t){e=decodeURI(this.location.pathname+this.location.search);var n=this.root.replace(H,"");e.indexOf(n)||(e=e.slice(n.length))}else e=this.getHash();return e.replace(j,"")},start:function(e){if(A.started)throw new Error("Backbone.history has already been started");A.started=!0,this.options=n.extend({root:"/"},this.options,e),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 r=this.getFragment(),i=document.documentMode,o=L.exec(navigator.userAgent.toLowerCase())&&(!i||7>=i);if(this.root=("/"+this.root+"/").replace(D,"/"),o&&this._wantsHashChange){var a=t.$('