text: !function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="/js/",e(0)}([function(t,e,n){n(6),n(10),n(25),n(27),n(17),t.exports=n(22)},,function(t,e){t.exports=jQuery},,,,function(t,e,n){var i,r;(function(s){!function(o){var a="object"==typeof self&&self.self==self&&self||"object"==typeof s&&s.global==s&&s;i=[n(7),n(2),e],r=function(t,e,n){a.Backbone=o(a,n,t,e)}.apply(e,i),!(void 0!==r&&(t.exports=r))}(function(t,e,n,i){var r=t.Backbone,s=[].slice;e.VERSION="1.2.1",e.$=i,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var o=function(t,e,i){switch(t){case 1:return function(){return n[e](this[i])};case 2:return function(t){return n[e](this[i],t)};case 3:return function(t,r){return n[e](this[i],t,r)};case 4:return function(t,r,s){return n[e](this[i],t,r,s)};default:return function(){var t=s.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=o(e,r,i))})},u=e.Events={},l=/\s+/,h=function(t,e,i,r,s){var o,a=0;if(i&&"object"==typeof i){void 0!==r&&"context"in s&&void 0===s.context&&(s.context=r);for(o=n.keys(i);a<o.length;a++)e=t(e,o[a],i[o[a]],s)}else if(i&&l.test(i))for(o=i.split(l);a<o.length;a++)e=t(e,o[a],r,s);else e=t(e,i,r,s);return e};u.on=function(t,e,n){return c(this,t,e,n)};var c=function(t,e,n,i,r){if(t._events=h(d,t._events||{},e,n,{context:i,ctx:t,listening:r}),r){var s=t._listeners||(t._listeners={});s[r.id]=r}return t};u.listenTo=function(t,e,i){if(!t)return this;var r=t._listenId||(t._listenId=n.uniqueId("l")),s=this._listeningTo||(this._listeningTo={}),o=s[r];if(!o){var a=this._listenId||(this._listenId=n.uniqueId("l"));o=s[r]={obj:t,objId:r,id:a,listeningTo:s,count:0}}return c(t,e,i,this,o),this};var d=function(t,e,n,i){if(n){var r=t[e]||(t[e]=[]),s=i.context,o=i.ctx,a=i.listening;a&&a.count++,r.push({callback:n,context:s,ctx:s||o,listening:a})}return t};u.off=function(t,e,n){return this._events?(this._events=h(f,this._events,t,e,{context:n,listeners:this._listeners}),this):this},u.stopListening=function(t,e,i){var r=this._listeningTo;if(!r)return this;for(var s=t?[t._listenId]:n.keys(r),o=0;o<s.length;o++){var a=r[s[o]];if(!a)break;a.obj.off(e,i,this)}return n.isEmpty(r)&&(this._listeningTo=void 0),this};var f=function(t,e,i,r){if(t){var s,o=0,a=r.context,u=r.listeners;if(e||i||a){for(var l=e?[e]:n.keys(t);o<l.length;o++){e=l[o];var h=t[e];if(!h)break;for(var c=[],d=0;d<h.length;d++){var f=h[d];i&&i!==f.callback&&i!==f.callback._callback||a&&a!==f.context?c.push(f):(s=f.listening,s&&0===--s.count&&(delete u[s.id],delete s.listeningTo[s.objId]))}c.length?t[e]=c:delete t[e]}return n.size(t)?t:void 0}for(var p=n.keys(u);o<p.length;o++)s=u[p[o]],delete u[s.id],delete s.listeningTo[s.objId]}};u.once=function(t,e,i){var r=h(p,{},t,e,n.bind(this.off,this));return this.on(r,void 0,i)},u.listenToOnce=function(t,e,i){var r=h(p,{},e,i,n.bind(this.stopListening,this,t));return this.listenTo(t,r)};var p=function(t,e,i,r){if(i){var s=t[e]=n.once(function(){r(e,s),i.apply(this,arguments)});s._callback=i}return t};u.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),i=0;e>i;i++)n[i]=arguments[i+1];return h(g,this._events,t,void 0,n),this};var g=function(t,e,n,i){if(t){var r=t[e],s=t.all;r&&s&&(s=s.slice()),r&&v(r,i),s&&v(s,[e].concat(i))}return t},v=function(t,e){var n,i=-1,r=t.length,s=e[0],o=e[1],a=e[2];switch(e.length){case 0:for(;++i<r;)(n=t[i]).callback.call(n.ctx);return;case 1:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s);return;case 2:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s,o);return;case 3:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s,o,a);return;default:for(;++i<r;)(n=t[i]).callback.apply(n.ctx,e);return}};u.bind=u.on,u.unbind=u.off,n.extend(e,u);var m=e.Model=function(t,e){var i=t||{};e||(e={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(i=this.parse(i,e)||{}),i=n.defaults({},i,n.result(this,"defaults")),this.set(i,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(m.prototype,u,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!n.iteratee(t,this)(this.attributes)},set:function(t,e,i){if(null==t)return this;var r;if("object"==typeof t?(r=t,i=e):(r={})[t]=e,i||(i={}),!this._validate(r,i))return!1;var s=i.unset,o=i.silent,a=[],u=this._changing;this._changing=!0,u||(this._previousAttributes=n.clone(this.attributes),this.changed={});var l=this.attributes,h=this.changed,c=this._previousAttributes;this.idAttribute in r&&(this.id=r[this.idAttribute]);for(var d in r)e=r[d],n.isEqual(l[d],e)||a.push(d),n.isEqual(c[d],e)?delete h[d]:h[d]=e,s?delete l[d]:l[d]=e;if(!o){a.length&&(this._pending=i);for(var f=0;f<a.length;f++)this.trigger("change:"+a[f],this,l[a[f]],i)}if(u)return this;if(!o)for(;this._pending;)i=this._pending,this._pending=!1,this.trigger("change",this,i);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var i in this.attributes)e[i]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?n.clone(this.changed):!1;var e=this._changing?this._previousAttributes:this.attributes,i={};for(var r in t){var s=t[r];n.isEqual(e[r],s)||(i[r]=s)}return n.size(i)?i:!1},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=n.extend({parse:!0},t);var e=this,i=t.success;return t.success=function(n){var r=t.parse?e.parse(n,t):n;return e.set(r,t)?(i&&i.call(t.context,e,n,t),void e.trigger("sync",e,n,t)):!1},V(this,t),this.sync("read",this,t)},save:function(t,e,i){var r;null==t||"object"==typeof t?(r=t,i=e):(r={})[t]=e,i=n.extend({validate:!0,parse:!0},i);var s=i.wait;if(r&&!s){if(!this.set(r,i))return!1}else if(!this._validate(r,i))return!1;var o=this,a=i.success,u=this.attributes;i.success=function(t){o.attributes=u;var e=i.parse?o.parse(t,i):t;return s&&(e=n.extend({},r,e)),e&&!o.set(e,i)?!1:(a&&a.call(i.context,o,t,i),void o.trigger("sync",o,t,i))},V(this,i),r&&s&&(this.attributes=n.extend({},u,r));var l=this.isNew()?"create":i.patch?"patch":"update";"patch"!==l||i.attrs||(i.attrs=r);var h=this.sync(l,this,i);return this.attributes=u,h},destroy:function(t){t=t?n.clone(t):{};var e=this,i=t.success,r=t.wait,s=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(n){r&&s(),i&&i.call(t.context,e,n,t),e.isNew()||e.trigger("sync",e,n,t)};var o=!1;return this.isNew()?n.defer(t.success):(V(this,t),o=this.sync("delete",this,t)),r||s(),o},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||N();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.defaults({validate:!0},t))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var i=this.validationError=this.validate(t,e)||null;return i?(this.trigger("invalid",this,i,n.extend(e,{validationError:i})),!1):!0}});var _={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};a(m,_,"attributes");var y=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,n.extend({silent:!0},e))},w={add:!0,remove:!0,merge:!0},b={add:!0,remove:!1};n.extend(y.prototype,u,{model:m,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,n.extend({merge:!1},e,b))},remove:function(t,e){e=n.extend({},e);var i=!n.isArray(t);t=i?[t]:n.clone(t);var r=this._removeModels(t,e);return!e.silent&&r&&this.trigger("update",this,e),i?r[0]:r},set:function(t,e){e=n.defaults({},e,w),e.parse&&!this._isModel(t)&&(t=this.parse(t,e));var i=!n.isArray(t);t=i?t?[t]:[]:t.slice();var r,s,o,a,u,l=e.at;null!=l&&(l=+l),0>l&&(l+=this.length+1);for(var h=this.comparator&&null==l&&e.sort!==!1,c=n.isString(this.comparator)?this.comparator:null,d=[],f=[],p={},g=e.add,v=e.merge,m=e.remove,_=!h&&g&&m?[]:!1,y=!1,b=0;b<t.length;b++){if(o=t[b],a=this.get(o))m&&(p[a.cid]=!0),v&&o!==a&&(o=this._isModel(o)?o.attributes:o,e.parse&&(o=a.parse(o,e)),a.set(o,e),h&&!u&&a.hasChanged(c)&&(u=!0)),t[b]=a;else if(g){if(s=t[b]=this._prepareModel(o,e),!s)continue;d.push(s),this._addReference(s,e)}s=a||s,s&&(r=this.modelId(s.attributes),!_||!s.isNew()&&p[r]||(_.push(s),y=y||!this.models[b]||s.cid!==this.models[b].cid),p[r]=!0)}if(m){for(var b=0;b<this.length;b++)p[(s=this.models[b]).cid]||f.push(s);f.length&&this._removeModels(f,e)}if(d.length||y)if(h&&(u=!0),this.length+=d.length,null!=l)for(var b=0;b<d.length;b++)this.models.splice(l+b,0,d[b]);else{_&&(this.models.length=0);for(var x=_||d,b=0;b<x.length;b++)this.models.push(x[b])}if(u&&this.sort({silent:!0}),!e.silent){for(var E=null!=l?n.clone(e):e,b=0;b<d.length;b++)null!=l&&(E.index=l+b),(s=d[b]).trigger("add",s,this,E);(u||y)&&this.trigger("sort",this,e),(d.length||f.length)&&this.trigger("update",this,e)}return i?t[0]:t},reset:function(t,e){e=e?n.clone(e):{};for(var i=0;i<this.models.length;i++)this._removeReference(this.models[i],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return s.apply(this.models,arguments)},get:function(t){if(null==t)return void 0;var e=this.modelId(this._isModel(t)?t.attributes:t);return this._byId[t]||this._byId[e]||this._byId[t.cid]},at:function(t){return 0>t&&(t+=this.length),this.models[t]},where:function(t,e){var i=n.matches(t);return this[e?"find":"filter"](function(t){return i(t.attributes)})},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={}),n.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return n.invoke(this.models,"get",t)},fetch:function(t){t=n.extend({parse:!0},t);var e=t.success,i=this;return t.success=function(n){var r=t.reset?"reset":"set";i[r](n,t),e&&e.call(t.context,i,n,t),i.trigger("sync",i,n,t)},V(this,t),this.sync("read",this,t)},create:function(t,e){e=e?n.clone(e):{};var i=e.wait;if(t=this._prepareModel(t,e),!t)return!1;i||this.add(t,e);var r=this,s=e.success;return e.success=function(t,e,n){i&&r.add(t,n),s&&s.call(n.context,t,e,n)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;e=e?n.clone(e):{},e.collection=this;var i=new this.model(t,e);return i.validationError?(this.trigger("invalid",this,i.validationError,e),!1):i},_removeModels:function(t,e){for(var n=[],i=0;i<t.length;i++){var r=this.get(t[i]);if(r){var s=this.indexOf(r);this.models.splice(s,1),this.length--,e.silent||(e.index=s,r.trigger("remove",r,this,e)),n.push(r),this._removeReference(r,e)}}return n.length?n:!1},_isModel:function(t){return t instanceof m},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,i){if("add"!==t&&"remove"!==t||n===this){if("destroy"===t&&this.remove(e,i),"change"===t){var r=this.modelId(e.previousAttributes()),s=this.modelId(e.attributes);r!==s&&(null!=r&&delete this._byId[r],null!=s&&(this._byId[s]=e))}this.trigger.apply(this,arguments)}}});var x={forEach:3,each:3,map:3,collect:3,reduce:4,foldl:4,inject:4,reduceRight:4,foldr:4,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:2,contains:2,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3};a(y,x,"models");var E=["groupBy","countBy","sortBy","indexBy"];n.each(E,function(t){n[t]&&(y.prototype[t]=function(e,i){var r=n.isFunction(e)?e:function(t){return t.get(e)};return n[t](this.models,r,i)})});var M=e.View=function(t){this.cid=n.uniqueId("view"),n.extend(this,n.pick(t,C)),this._ensureElement(),this.initialize.apply(this,arguments)},O=/^(\S+)\s*(.*)$/,C=["model","collection","el","id","attributes","className","tagName","events"];n.extend(M.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=n.result(this,"events")),!t)return this;this.undelegateEvents();for(var e in t){var i=t[e];if(n.isFunction(i)||(i=this[i]),i){var r=e.match(O);this.delegate(r[1],r[2],n.bind(i,this))}}return this},delegate:function(t,e,n){return this.$el.on(t+".delegateEvents"+this.cid,e,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,n){return this.$el.off(t+".delegateEvents"+this.cid,e,n),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var t=n.extend({},n.result(this,"attributes"));this.id&&(t.id=n.result(this,"id")),this.className&&(t["class"]=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),e.sync=function(t,i,r){var s=T[t];n.defaults(r||(r={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var o={type:s,dataType:"json"};if(r.url||(o.url=n.result(i,"url")||N()),null!=r.data||!i||"create"!==t&&"update"!==t&&"patch"!==t||(o.contentType="application/json",o.data=JSON.stringify(r.attrs||i.toJSON(r))),r.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{}),r.emulateHTTP&&("PUT"===s||"DELETE"===s||"PATCH"===s)){o.type="POST",r.emulateJSON&&(o.data._method=s);var a=r.beforeSend;r.beforeSend=function(t){return t.setRequestHeader("X-HTTP-Method-Override",s),a?a.apply(this,arguments):void 0}}"GET"===o.type||r.emulateJSON||(o.processData=!1);var u=r.error;r.error=function(t,e,n){r.textStatus=e,r.errorThrown=n,u&&u.call(r.context,t,e,n)};var l=r.xhr=e.ajax(n.extend(o,r));return i.trigger("request",i,l,r),l};var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var S=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},I=/\((.*?)\)/g,k=/(\(\?)?:\w+/g,A=/\*\w+/g,P=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(S.prototype,u,{initialize:function(){},route:function(t,i,r){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(i)&&(r=i,i=""),r||(r=this[i]);var s=this;return e.history.route(t,function(n){var o=s._extractParameters(t,n);s.execute(r,o,i)!==!1&&(s.trigger.apply(s,["route:"+i].concat(o)),s.trigger("route",i,o),e.history.trigger("route",s,i,o))}),this},execute:function(t,e,n){t&&t.apply(this,e)},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(P,"\\$&").replace(I,"(?:$1)?").replace(k,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return n.map(i,function(t,e){return e===i.length-1?t||null:t?decodeURIComponent(t):null})}});var R=e.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},H=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,L=/#.*$/;R.started=!1,n.extend(R.prototype,u,{interval:50,atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:function(){var t=this.decodeFragment(this.location.pathname),e=t.slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(H,"")},start:function(t){if(R.started)throw new Error("Backbone.history has already been started");if(R.started=!0,this.options=n.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window,this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(D,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var i=document.body,r=i.insertBefore(this.iframe,i.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};return this._usePushState?s("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?s("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.options.silent?void 0:this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),R.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment?!1:(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return this.matchRoot()?(t=this.fragment=this.getFragment(t),n.any(this.handlers,function(e){return e.route.test(t)?(e.callback(t),!0):void 0})):!1},navigate:function(t,e){if(!R.started)return!1;e&&e!==!0||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;(""===t||"?"===t.charAt(0))&&(n=n.slice(0,-1)||"/");var i=n+t;if(t=this.decodeFragment(t.replace(L,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var i=t.href.replace(/(javascript:|#).*$/,"");t.replace(i+"#"+e)}else t.hash="#"+e}}),e.history=new R;var F=function(t,e){var i,r=this;i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e);var s=function(){this.constructor=i};return s.prototype=r.prototype,i.prototype=new s,t&&n.extend(i.prototype,t),i.__super__=r.prototype,i};m.extend=y.extend=S.extend=M.extend=R.extend=F;var N=function(){throw new Error('A "url" property or function must be specified')},V=function(t,e){var n=e.error;e.error=function(i){n&&n.call(e.context,t,i,e),t.trigger("error",t,i,e)}};return e})}).call(e,function(){return this}())},function(t,e,n){var i;(function(t,r){(function(){function s(t,e){if(t!==e){var n=null===t,i=t===C,r=t===t,s=null===e,o=e===C,a=e===e;if(t>e&&!s||!r||n&&!o&&a||i&&a)return 1;if(e>t&&!n||!a||s&&!i&&r||o&&r)return-1}return 0}function o(t,e,n){for(var i=t.length,r=n?i:-1;n?r--:++r<i;)if(e(t[r],r,t))return r;return-1}function a(t,e,n){if(e!==e)return m(t,n);for(var i=n-1,r=t.length;++i<r;)if(t[i]===e)return i;return-1}function u(t){return"function"==typeof t||!1}function l(t){return"string"==typeof t?t:null==t?"":t+""}function h(t,e){for(var n=-1,i=t.length;++n<i&&e.indexOf(t.charAt(n))>-1;);return n}function c(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function d(t,e){return s(t.criteria,e.criteria)||t.index-e.index}function f(t,e,n){for(var i=-1,r=t.criteria,o=e.criteria,a=r.length,u=n.length;++i<a;){var l=s(r[i],o[i]);if(l)return i>=u?l:l*(n[i]?1:-1)}return t.index-e.index}function p(t){return Jt[t]}function g(t){return Kt[t]}function v(t){return"\\"+Xt[t]}function m(t,e,n){for(var i=t.length,r=e+(n?0:-1);n?r--:++r<i;){var s=t[r];if(s!==s)return r}return-1}function _(t){return!!t&&"object"==typeof t}function y(t){return 160>=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function w(t,e){for(var n=-1,i=t.length,r=-1,s=[];++n<i;)t[n]===e&&(t[n]=z,s[++r]=n);return s}function b(t,e){for(var n,i=-1,r=t.length,s=-1,o=[];++i<r;){var a=t[i],u=e?e(a,i,t):a;i&&n===u||(n=u,o[++s]=a)}return o}function x(t){for(var e=-1,n=t.length;++e<n&&y(t.charCodeAt(e)););return e}function E(t){for(var e=t.length;e--&&y(t.charCodeAt(e)););return e}function M(t){return Gt[t]}function O(t){function e(t){if(_(t)&&!Ta(t)&&!(t instanceof r)){if(t instanceof i)return t;if(Ks.call(t,"__chain__")&&Ks.call(t,"__wrapped__"))return li(t)}return new i(t)}function n(){}function i(t,e,n){this.__wrapped__=t,this.__actions__=n||[],this.__chain__=!!e}function r(t){this.__wrapped__=t,this.__actions__=null,this.__dir__=1,this.__dropCount__=0,this.__filtered__=!1,this.__iteratees__=null,this.__takeCount__=Oo,this.__views__=null}function y(){var t=this.__actions__,e=this.__iteratees__,n=this.__views__,i=new r(this.__wrapped__);return i.__actions__=t?te(t):null,i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=e?te(e):null,i.__takeCount__=this.__takeCount__,i.__views__=n?te(n):null,i}function Y(){if(this.__filtered__){var t=new r(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function nt(){var t=this.__wrapped__.value();if(!Ta(t))return en(t,this.__actions__);var e=this.__dir__,n=0>e,i=Un(0,t.length,this.__views__),r=i.start,s=i.end,o=s-r,a=n?s:r-1,u=yo(o,this.__takeCount__),l=this.__iteratees__,h=l?l.length:0,c=0,d=[];t:for(;o--&&u>c;){a+=e;for(var f=-1,p=t[a];++f<h;){var g=l[f],v=g.iteratee,m=g.type;if(m==B){if(g.done&&(n?a>g.index:a<g.index)&&(g.count=0,g.done=!1),g.index=a,!g.done){var _=g.limit;if(!(g.done=_>-1?g.count++>=_:!v(p)))continue t}}else{var y=v(p);if(m==$)p=y;else if(!y){if(m==U)continue t;break t}}}d[c++]=p}return d}function rt(){this.__data__={}}function Jt(t){return this.has(t)&&delete this.__data__[t]}function Kt(t){return"__proto__"==t?C:this.__data__[t]}function Gt(t){return"__proto__"!=t&&Ks.call(this.__data__,t)}function Qt(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this}function Xt(t){var e=t?t.length:0;for(this.data={hash:po(null),set:new ao};e--;)this.push(t[e])}function Yt(t,e){var n=t.data,i="string"==typeof e||Sr(e)?n.set.has(e):n.hash[e];return i?0:-1}function Zt(t){var e=this.data;"string"==typeof t||Sr(t)?e.set.add(t):e.hash[t]=!0}function te(t,e){var n=-1,i=t.length;for(e||(e=Rs(i));++n<i;)e[n]=t[n];return e}function ee(t,e){for(var n=-1,i=t.length;++n<i&&e(t[n],n,t)!==!1;);return t}function ne(t,e){for(var n=t.length;n--&&e(t[n],n,t)!==!1;);return t}function se(t,e){for(var n=-1,i=t.length;++n<i;)if(!e(t[n],n,t))return!1;return!0}function oe(t,e,n,i){for(var r=-1,s=t.length,o=i,a=o;++r<s;){var u=t[r],l=+e(u);n(l,o)&&(o=l,a=u)}return a}function ae(t,e){for(var n=-1,i=t.length,r=-1,s=[];++n<i;){var o=t[n];e(o,n,t)&&(s[++r]=o)}return s}function ue(t,e){for(var n=-1,i=t.length,r=Rs(i);++n<i;)r[n]=e(t[n],n,t);return r}function le(t,e,n,i){var r=-1,s=t.length;for(i&&s&&(n=t[++r]);++r<s;)n=e(n,t[r],r,t);return n}function he(t,e,n,i){var r=t.length;for(i&&r&&(n=t[--r]);r--;)n=e(n,t[r],r,t);return n}function ce(t,e){for(var n=-1,i=t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}function de(t){for(var e=t.length,n=0;e--;)n+=+t[e]||0;return n}function fe(t,e){return t===C?e:t}function pe(t,e,n,i){return t!==C&&Ks.call(i,n)?t:e}function ge(t,e,n){for(var i=-1,r=Va(e),s=r.length;++i<s;){var o=r[i],a=t[o],u=n(a,e[o],o,t,e);(u===u?u===a:a!==a)&&(a!==C||o in t)||(t[o]=u)}return t}function ve(t,e){return null==e?t:_e(e,Va(e),t)}function me(t,e){for(var n=-1,i=null==t,r=!i&&Jn(t),s=r?t.length:0,o=e.length,a=Rs(o);++n<o;){var u=e[n];a[n]=r?Kn(u,s)?t[u]:C:i?C:t[u]}return a}function _e(t,e,n){n||(n={});for(var i=-1,r=e.length;++i<r;){var s=e[i];n[s]=t[s]}return n}function ye(t,e,n){var i=typeof t;return"function"==i?e===C?t:sn(t,e,n):null==t?ws:"object"==i?Ne(t):e===C?Cs(t):Ve(t,e)}function we(t,e,n,i,r,s,o){var a;if(n&&(a=r?n(t,i,r):n(t)),a!==C)return a;if(!Sr(t))return t;var u=Ta(t);if(u){if(a=$n(t),!e)return te(t,a)}else{var l=Qs.call(t),h=l==X;if(l!=tt&&l!=W&&(!h||r))return zt[l]?zn(t,l,e):r?t:{};if(a=qn(h?{}:t),!e)return ve(a,t)}s||(s=[]),o||(o=[]);for(var c=s.length;c--;)if(s[c]==t)return o[c];return s.push(t),o.push(a),(u?ee:ke)(t,function(i,r){a[r]=we(i,e,n,r,t,s,o)}),a}function be(t,e,n){if("function"!=typeof t)throw new Us(q);return uo(function(){t.apply(C,n)},e)}function xe(t,e){var n=t?t.length:0,i=[];if(!n)return i;var r=-1,s=Vn(),o=s==a,u=o&&e.length>=200?jo(e):null,l=e.length;u&&(s=Yt,o=!1,e=u);t:for(;++r<n;){var h=t[r];if(o&&h===h){for(var c=l;c--;)if(e[c]===h)continue t;i.push(h)}else s(e,h,0)<0&&i.push(h)}return i}function Ee(t,e){var n=!0;return Do(t,function(t,i,r){return n=!!e(t,i,r)}),n}function Me(t,e,n,i){var r=i,s=r;return Do(t,function(t,o,a){var u=+e(t,o,a);(n(u,r)||u===i&&u===s)&&(r=u,s=t)}),s}function Oe(t,e,n,i){var r=t.length;for(n=null==n?0:+n||0,0>n&&(n=-n>r?0:r+n),i=i===C||i>r?r:+i||0,0>i&&(i+=r),r=n>i?0:i>>>0,n>>>=0;r>n;)t[n++]=e;return t}function Ce(t,e){var n=[];return Do(t,function(t,i,r){e(t,i,r)&&n.push(t)}),n}function Te(t,e,n,i){var r;return n(t,function(t,n,s){return e(t,n,s)?(r=i?n:t,!1):void 0}),r}function Se(t,e,n){for(var i=-1,r=t.length,s=-1,o=[];++i<r;){var a=t[i];if(_(a)&&Jn(a)&&(n||Ta(a)||br(a))){e&&(a=Se(a,e,n));for(var u=-1,l=a.length;++u<l;)o[++s]=a[u]}else n||(o[++s]=a)}return o}function Ie(t,e){return Fo(t,e,Jr)}function ke(t,e){return Fo(t,e,Va)}function Ae(t,e){return No(t,e,Va)}function Pe(t,e){for(var n=-1,i=e.length,r=-1,s=[];++n<i;){var o=e[n];Ia(t[o])&&(s[++r]=o)}return s}function Re(t,e,n){if(null!=t){n!==C&&n in ai(t)&&(e=[n]);for(var i=0,r=e.length;null!=t&&r>i;)t=t[e[i++]];return i&&i==r?t:C}}function He(t,e,n,i,r,s){return t===e?!0:null==t||null==e||!Sr(t)&&!_(e)?t!==t&&e!==e:De(t,e,He,n,i,r,s)}function De(t,e,n,i,r,s,o){var a=Ta(t),u=Ta(e),l=J,h=J;a||(l=Qs.call(t),l==W?l=tt:l!=tt&&(a=Lr(t))),u||(h=Qs.call(e),h==W?h=tt:h!=tt&&(u=Lr(e)));var c=l==tt,d=h==tt,f=l==h;if(f&&!a&&!c)return Dn(t,e,l);if(!r){var p=c&&Ks.call(t,"__wrapped__"),g=d&&Ks.call(e,"__wrapped__");if(p||g)return n(p?t.value():t,g?e.value():e,i,r,s,o)}if(!f)return!1;s||(s=[]),o||(o=[]);for(var v=s.length;v--;)if(s[v]==t)return o[v]==e;s.push(t),o.push(e);var m=(a?Hn:Ln)(t,e,n,i,r,s,o);return s.pop(),o.pop(),m}function Le(t,e,n){var i=e.length,r=i,s=!n;if(null==t)return!r;for(t=ai(t);i--;){var o=e[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<r;){o=e[i];var a=o[0],u=t[a],l=o[1];if(s&&o[2]){if(u===C&&!(a in t))return!1}else{var h=n?n(u,l,a):C;if(!(h===C?He(l,u,n,!0):h))return!1}}return!0}function Fe(t,e){var n=-1,i=Jn(t)?Rs(t.length):[];return Do(t,function(t,r,s){i[++n]=e(t,r,s)}),i}function Ne(t){var e=jn(t);if(1==e.length&&e[0][2]){var n=e[0][0],i=e[0][1];return function(t){return null==t?!1:t[n]===i&&(i!==C||n in ai(t))}}return function(t){return Le(t,e)}}function Ve(t,e){var n=Ta(t),i=Qn(t)&&Zn(e),r=t+"";return t=ui(t),function(s){if(null==s)return!1;var o=r;if(s=ai(s),!(!n&&i||o in s)){if(s=1==t.length?s:Re(s,Je(t,0,-1)),null==s)return!1;o=xi(t),s=ai(s)}return s[o]===e?e!==C||o in s:He(e,s[o],C,!0)}}function je(t,e,n,i,r){if(!Sr(t))return t;var s=Jn(e)&&(Ta(e)||Lr(e)),o=s?null:Va(e);return ee(o||e,function(a,u){if(o&&(u=a,a=e[u]),_(a))i||(i=[]),r||(r=[]),Be(t,e,u,je,n,i,r);else{var l=t[u],h=n?n(l,a,u,t,e):C,c=h===C;c&&(h=a),h===C&&(!s||u in t)||!c&&(h===h?h===l:l!==l)||(t[u]=h)}}),t}function Be(t,e,n,i,r,s,o){for(var a=s.length,u=e[n];a--;)if(s[a]==u)return void(t[n]=o[a]);var l=t[n],h=r?r(l,u,n,t,e):C,c=h===C;c&&(h=u,Jn(u)&&(Ta(u)||Lr(u))?h=Ta(l)?l:Jn(l)?te(l):[]:ka(u)||br(u)?h=br(l)?Br(l):ka(l)?l:{}:c=!1),s.push(u),o.push(h),c?t[n]=i(h,u,r,s,o):(h===h?h!==l:l===l)&&(t[n]=h)}function Ue(t){return function(e){return null==e?C:e[t]}}function $e(t){var e=t+"";return t=ui(t),function(n){return Re(n,t,e)}}function qe(t,e){for(var n=t?e.length:0;n--;){var i=e[n];if(i!=r&&Kn(i)){var r=i;lo.call(t,i,1)}}return t}function ze(t,e){return t+io(Eo()*(e-t+1))}function We(t,e,n,i,r){return r(t,function(t,r,s){n=i?(i=!1,t):e(n,t,r,s)}),n}function Je(t,e,n){var i=-1,r=t.length;e=null==e?0:+e||0,0>e&&(e=-e>r?0:r+e),n=n===C||n>r?r:+n||0,0>n&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var s=Rs(r);++i<r;)s[i]=t[i+e];return s}function Ke(t,e){var n;return Do(t,function(t,i,r){return n=e(t,i,r),!n}),!!n}function Ge(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function Qe(t,e,n){var i=Fn(),r=-1;e=ue(e,function(t){return i(t)});var s=Fe(t,function(t){var n=ue(e,function(e){
  return e(t)});return{criteria:n,index:++r,value:t}});return Ge(s,function(t,e){return f(t,e,n)})}function Xe(t,e){var n=0;return Do(t,function(t,i,r){n+=+e(t,i,r)||0}),n}function Ye(t,e){var n=-1,i=Vn(),r=t.length,s=i==a,o=s&&r>=200,u=o?jo():null,l=[];u?(i=Yt,s=!1):(o=!1,u=e?[]:l);t:for(;++n<r;){var h=t[n],c=e?e(h,n,t):h;if(s&&h===h){for(var d=u.length;d--;)if(u[d]===c)continue t;e&&u.push(c),l.push(h)}else i(u,c,0)<0&&((e||o)&&u.push(c),l.push(h))}return l}function Ze(t,e){for(var n=-1,i=e.length,r=Rs(i);++n<i;)r[n]=t[e[n]];return r}function tn(t,e,n,i){for(var r=t.length,s=i?r:-1;(i?s--:++s<r)&&e(t[s],s,t););return n?Je(t,i?0:s,i?s+1:r):Je(t,i?s+1:0,i?r:s)}function en(t,e){var n=t;n instanceof r&&(n=n.value());for(var i=-1,s=e.length;++i<s;){var o=[n],a=e[i];oo.apply(o,a.args),n=a.func.apply(a.thisArg,o)}return n}function nn(t,e,n){var i=0,r=t?t.length:i;if("number"==typeof e&&e===e&&So>=r){for(;r>i;){var s=i+r>>>1,o=t[s];(n?e>=o:e>o)&&null!==o?i=s+1:r=s}return r}return rn(t,e,ws,n)}function rn(t,e,n,i){e=n(e);for(var r=0,s=t?t.length:0,o=e!==e,a=null===e,u=e===C;s>r;){var l=io((r+s)/2),h=n(t[l]),c=h!==C,d=h===h;if(o)var f=d||i;else f=a?d&&c&&(i||null!=h):u?d&&(i||c):null==h?!1:i?e>=h:e>h;f?r=l+1:s=l}return yo(s,To)}function sn(t,e,n){if("function"!=typeof t)return ws;if(e===C)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,i,r){return t.call(e,n,i,r)};case 4:return function(n,i,r,s){return t.call(e,n,i,r,s)};case 5:return function(n,i,r,s,o){return t.call(e,n,i,r,s,o)}}return function(){return t.apply(e,arguments)}}function on(t){return to.call(t,0)}function an(t,e,n){for(var i=n.length,r=-1,s=_o(t.length-i,0),o=-1,a=e.length,u=Rs(s+a);++o<a;)u[o]=e[o];for(;++r<i;)u[n[r]]=t[r];for(;s--;)u[o++]=t[r++];return u}function un(t,e,n){for(var i=-1,r=n.length,s=-1,o=_o(t.length-r,0),a=-1,u=e.length,l=Rs(o+u);++s<o;)l[s]=t[s];for(var h=s;++a<u;)l[h+a]=e[a];for(;++i<r;)l[h+n[i]]=t[s++];return l}function ln(t,e){return function(n,i,r){var s=e?e():{};if(i=Fn(i,r,3),Ta(n))for(var o=-1,a=n.length;++o<a;){var u=n[o];t(s,u,i(u,o,n),n)}else Do(n,function(e,n,r){t(s,e,i(e,n,r),r)});return s}}function hn(t){return fr(function(e,n){var i=-1,r=null==e?0:n.length,s=r>2?n[r-2]:C,o=r>2?n[2]:C,a=r>1?n[r-1]:C;for("function"==typeof s?(s=sn(s,a,5),r-=2):(s="function"==typeof a?a:C,r-=s?1:0),o&&Gn(n[0],n[1],o)&&(s=3>r?C:s,r=1);++i<r;){var u=n[i];u&&t(e,u,s)}return e})}function cn(t,e){return function(n,i){var r=n?Uo(n):0;if(!Yn(r))return t(n,i);for(var s=e?r:-1,o=ai(n);(e?s--:++s<r)&&i(o[s],s,o)!==!1;);return n}}function dn(t){return function(e,n,i){for(var r=ai(e),s=i(e),o=s.length,a=t?o:-1;t?a--:++a<o;){var u=s[a];if(n(r[u],u,r)===!1)break}return e}}function fn(t,e){function n(){var r=this&&this!==ie&&this instanceof n?i:t;return r.apply(e,arguments)}var i=gn(t);return n}function pn(t){return function(e){for(var n=-1,i=ms(is(e)),r=i.length,s="";++n<r;)s=t(s,i[n],n);return s}}function gn(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4])}var n=Ho(t.prototype),i=t.apply(n,e);return Sr(i)?i:n}}function vn(t){function e(n,i,r){r&&Gn(n,i,r)&&(i=null);var s=Rn(n,t,null,null,null,null,null,i);return s.placeholder=e.placeholder,s}return e}function mn(t,e){return function(n,i,r){if(r&&Gn(n,i,r)&&(i=null),i=Fn(i,r,3),1==i.length){n=oi(n);var s=oe(n,i,t,e);if(!n.length||s!==e)return s}return Me(n,i,t,e)}}function _n(t,e){return function(n,i,r){if(i=Fn(i,r,3),Ta(n)){var s=o(n,i,e);return s>-1?n[s]:C}return Te(n,i,t)}}function yn(t){return function(e,n,i){return e&&e.length?(n=Fn(n,i,3),o(e,n,t)):-1}}function wn(t){return function(e,n,i){return n=Fn(n,i,3),Te(e,n,t,!0)}}function bn(t){return function(){for(var e,n=arguments.length,r=t?n:-1,s=0,o=Rs(n);t?r--:++r<n;){var a=o[s++]=arguments[r];if("function"!=typeof a)throw new Us(q);!e&&i.prototype.thru&&"wrapper"==Nn(a)&&(e=new i([]))}for(r=e?-1:n;++r<n;){a=o[r];var u=Nn(a),l="wrapper"==u?Bo(a):null;e=l&&Xn(l[0])&&l[1]==(D|A|R|L)&&!l[4].length&&1==l[9]?e[Nn(l[0])].apply(e,l[3]):1==a.length&&Xn(a)?e[u]():e.thru(a)}return function(){var t=arguments;if(e&&1==t.length&&Ta(t[0]))return e.plant(t[0]).value();for(var i=0,r=n?o[i].apply(this,t):t[0];++i<n;)r=o[i].call(this,r);return r}}}function xn(t,e){return function(n,i,r){return"function"==typeof i&&r===C&&Ta(n)?t(n,i):e(n,sn(i,r,3))}}function En(t){return function(e,n,i){return("function"!=typeof n||i!==C)&&(n=sn(n,i,3)),t(e,n,Jr)}}function Mn(t){return function(e,n,i){return("function"!=typeof n||i!==C)&&(n=sn(n,i,3)),t(e,n)}}function On(t){return function(e,n,i){var r={};return n=Fn(n,i,3),ke(e,function(e,i,s){var o=n(e,i,s);i=t?o:i,e=t?e:o,r[i]=e}),r}}function Cn(t){return function(e,n,i){return e=l(e),(t?e:"")+kn(e,n,i)+(t?"":e)}}function Tn(t){var e=fr(function(n,i){var r=w(i,e.placeholder);return Rn(n,t,null,i,r)});return e}function Sn(t,e){return function(n,i,r,s){var o=arguments.length<3;return"function"==typeof i&&s===C&&Ta(n)?t(n,i,r,o):We(n,Fn(i,s,4),r,o,e)}}function In(t,e,n,i,r,s,o,a,u,l){function h(){for(var _=arguments.length,y=_,b=Rs(_);y--;)b[y]=arguments[y];if(i&&(b=an(b,i,r)),s&&(b=un(b,s,o)),p||v){var x=h.placeholder,E=w(b,x);if(_-=E.length,l>_){var M=a?te(a):null,O=_o(l-_,0),T=p?E:null,k=p?null:E,A=p?b:null,P=p?null:b;e|=p?R:H,e&=~(p?H:R),g||(e&=~(S|I));var D=[t,e,n,A,T,P,k,M,u,O],L=In.apply(C,D);return Xn(t)&&$o(L,D),L.placeholder=x,L}}var F=d?n:this,N=f?F[t]:t;return a&&(b=ii(b,a)),c&&u<b.length&&(b.length=u),this&&this!==ie&&this instanceof h&&(N=m||gn(t)),N.apply(F,b)}var c=e&D,d=e&S,f=e&I,p=e&A,g=e&k,v=e&P,m=f?null:gn(t);return h}function kn(t,e,n){var i=t.length;if(e=+e,i>=e||!vo(e))return"";var r=e-i;return n=null==n?" ":n+"",ls(n,eo(r/n.length)).slice(0,r)}function An(t,e,n,i){function r(){for(var e=-1,a=arguments.length,u=-1,l=i.length,h=Rs(a+l);++u<l;)h[u]=i[u];for(;a--;)h[u++]=arguments[++e];var c=this&&this!==ie&&this instanceof r?o:t;return c.apply(s?n:this,h)}var s=e&S,o=gn(t);return r}function Pn(t){return function(e,n,i,r){var s=Fn(i);return null==i&&s===ye?nn(e,n,t):rn(e,n,s(i,r,1),t)}}function Rn(t,e,n,i,r,s,o,a){var u=e&I;if(!u&&"function"!=typeof t)throw new Us(q);var l=i?i.length:0;if(l||(e&=~(R|H),i=r=null),l-=r?r.length:0,e&H){var h=i,c=r;i=r=null}var d=u?null:Bo(t),f=[t,e,n,i,r,h,c,s,o,a];if(d&&(ti(f,d),e=f[1],a=f[9]),f[9]=null==a?u?0:t.length:_o(a-l,0)||0,e==S)var p=fn(f[0],f[2]);else p=e!=R&&e!=(S|R)||f[4].length?In.apply(C,f):An.apply(C,f);var g=d?Vo:$o;return g(p,f)}function Hn(t,e,n,i,r,s,o){var a=-1,u=t.length,l=e.length;if(u!=l&&!(r&&l>u))return!1;for(;++a<u;){var h=t[a],c=e[a],d=i?i(r?c:h,r?h:c,a):C;if(d!==C){if(d)continue;return!1}if(r){if(!ce(e,function(t){return h===t||n(h,t,i,r,s,o)}))return!1}else if(h!==c&&!n(h,c,i,r,s,o))return!1}return!0}function Dn(t,e,n){switch(n){case K:case G:return+t==+e;case Q:return t.name==e.name&&t.message==e.message;case Z:return t!=+t?e!=+e:t==+e;case et:case it:return t==e+""}return!1}function Ln(t,e,n,i,r,s,o){var a=Va(t),u=a.length,l=Va(e),h=l.length;if(u!=h&&!r)return!1;for(var c=u;c--;){var d=a[c];if(!(r?d in e:Ks.call(e,d)))return!1}for(var f=r;++c<u;){d=a[c];var p=t[d],g=e[d],v=i?i(r?g:p,r?p:g,d):C;if(!(v===C?n(p,g,i,r,s,o):v))return!1;f||(f="constructor"==d)}if(!f){var m=t.constructor,_=e.constructor;if(m!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _))return!1}return!0}function Fn(t,n,i){var r=e.callback||_s;return r=r===_s?ye:r,i?r(t,n,i):r}function Nn(t){for(var e=t.name,n=Po[e],i=n?n.length:0;i--;){var r=n[i],s=r.func;if(null==s||s==t)return r.name}return e}function Vn(t,n,i){var r=e.indexOf||wi;return r=r===wi?a:r,t?r(t,n,i):r}function jn(t){for(var e=Kr(t),n=e.length;n--;)e[n][2]=Zn(e[n][1]);return e}function Bn(t,e){var n=null==t?C:t[e];return Ar(n)?n:C}function Un(t,e,n){for(var i=-1,r=n?n.length:0;++i<r;){var s=n[i],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=yo(e,t+o);break;case"takeRight":t=_o(t,e-o)}}return{start:t,end:e}}function $n(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Ks.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function qn(t){var e=t.constructor;return"function"==typeof e&&e instanceof e||(e=Vs),new e}function zn(t,e,n){var i=t.constructor;switch(e){case st:return on(t);case K:case G:return new i(+t);case ot:case at:case ut:case lt:case ht:case ct:case dt:case ft:case pt:var r=t.buffer;return new i(n?on(r):r,t.byteOffset,t.length);case Z:case it:return new i(t);case et:var s=new i(t.source,Rt.exec(t));s.lastIndex=t.lastIndex}return s}function Wn(t,e,n){null==t||Qn(e,t)||(e=ui(e),t=1==e.length?t:Re(t,Je(e,0,-1)),e=xi(e));var i=null==t?t:t[e];return null==i?C:i.apply(t,n)}function Jn(t){return null!=t&&Yn(Uo(t))}function Kn(t,e){return t="number"==typeof t||Lt.test(t)?+t:-1,e=null==e?ko:e,t>-1&&t%1==0&&e>t}function Gn(t,e,n){if(!Sr(n))return!1;var i=typeof e;if("number"==i?Jn(n)&&Kn(e,n.length):"string"==i&&e in n){var r=n[e];return t===t?t===r:r!==r}return!1}function Qn(t,e){var n=typeof t;if("string"==n&&Ct.test(t)||"number"==n)return!0;if(Ta(t))return!1;var i=!Ot.test(t);return i||null!=e&&t in ai(e)}function Xn(t){var n=Nn(t);if(!(n in r.prototype))return!1;var i=e[n];if(t===i)return!0;var s=Bo(i);return!!s&&t===s[0]}function Yn(t){return"number"==typeof t&&t>-1&&t%1==0&&ko>=t}function Zn(t){return t===t&&!Sr(t)}function ti(t,e){var n=t[1],i=e[1],r=n|i,s=D>r,o=i==D&&n==A||i==D&&n==L&&t[7].length<=e[8]||i==(D|L)&&n==A;if(!s&&!o)return t;i&S&&(t[2]=e[2],r|=n&S?0:k);var a=e[3];if(a){var u=t[3];t[3]=u?an(u,a,e[4]):te(a),t[4]=u?w(t[3],z):te(e[4])}return a=e[5],a&&(u=t[5],t[5]=u?un(u,a,e[6]):te(a),t[6]=u?w(t[5],z):te(e[6])),a=e[7],a&&(t[7]=te(a)),i&D&&(t[8]=null==t[8]?e[8]:yo(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=r,t}function ei(t,e){t=ai(t);for(var n=-1,i=e.length,r={};++n<i;){var s=e[n];s in t&&(r[s]=t[s])}return r}function ni(t,e){var n={};return Ie(t,function(t,i,r){e(t,i,r)&&(n[i]=t)}),n}function ii(t,e){for(var n=t.length,i=yo(e.length,n),r=te(t);i--;){var s=e[i];t[i]=Kn(s,n)?r[s]:C}return t}function ri(t){{var n;e.support}if(!_(t)||Qs.call(t)!=tt||!Ks.call(t,"constructor")&&(n=t.constructor,"function"==typeof n&&!(n instanceof n)))return!1;var i;return Ie(t,function(t,e){i=e}),i===C||Ks.call(t,i)}function si(t){for(var e=Jr(t),n=e.length,i=n&&t.length,r=!!i&&Yn(i)&&(Ta(t)||br(t)),s=-1,o=[];++s<n;){var a=e[s];(r&&Kn(a,i)||Ks.call(t,a))&&o.push(a)}return o}function oi(t){return null==t?[]:Jn(t)?Sr(t)?t:Vs(t):Yr(t)}function ai(t){return Sr(t)?t:Vs(t)}function ui(t){if(Ta(t))return t;var e=[];return l(t).replace(Tt,function(t,n,i,r){e.push(i?r.replace(At,"$1"):n||t)}),e}function li(t){return t instanceof r?t.clone():new i(t.__wrapped__,t.__chain__,te(t.__actions__))}function hi(t,e,n){e=(n?Gn(t,e,n):null==e)?1:_o(+e||1,1);for(var i=0,r=t?t.length:0,s=-1,o=Rs(eo(r/e));r>i;)o[++s]=Je(t,i,i+=e);return o}function ci(t){for(var e=-1,n=t?t.length:0,i=-1,r=[];++e<n;){var s=t[e];s&&(r[++i]=s)}return r}function di(t,e,n){var i=t?t.length:0;return i?((n?Gn(t,e,n):null==e)&&(e=1),Je(t,0>e?0:e)):[]}function fi(t,e,n){var i=t?t.length:0;return i?((n?Gn(t,e,n):null==e)&&(e=1),e=i-(+e||0),Je(t,0,0>e?0:e)):[]}function pi(t,e,n){return t&&t.length?tn(t,Fn(e,n,3),!0,!0):[]}function gi(t,e,n){return t&&t.length?tn(t,Fn(e,n,3),!0):[]}function vi(t,e,n,i){var r=t?t.length:0;return r?(n&&"number"!=typeof n&&Gn(t,e,n)&&(n=0,i=r),Oe(t,e,n,i)):[]}function mi(t){return t?t[0]:C}function _i(t,e,n){var i=t?t.length:0;return n&&Gn(t,e,n)&&(e=!1),i?Se(t,e):[]}function yi(t){var e=t?t.length:0;return e?Se(t,!0):[]}function wi(t,e,n){var i=t?t.length:0;if(!i)return-1;if("number"==typeof n)n=0>n?_o(i+n,0):n;else if(n){var r=nn(t,e),s=t[r];return(e===e?e===s:s!==s)?r:-1}return a(t,e,n||0)}function bi(t){return fi(t,1)}function xi(t){var e=t?t.length:0;return e?t[e-1]:C}function Ei(t,e,n){var i=t?t.length:0;if(!i)return-1;var r=i;if("number"==typeof n)r=(0>n?_o(i+n,0):yo(n||0,i-1))+1;else if(n){r=nn(t,e,!0)-1;var s=t[r];return(e===e?e===s:s!==s)?r:-1}if(e!==e)return m(t,r,!0);for(;r--;)if(t[r]===e)return r;return-1}function Mi(){var t=arguments,e=t[0];if(!e||!e.length)return e;for(var n=0,i=Vn(),r=t.length;++n<r;)for(var s=0,o=t[n];(s=i(e,o,s))>-1;)lo.call(e,s,1);return e}function Oi(t,e,n){var i=[];if(!t||!t.length)return i;var r=-1,s=[],o=t.length;for(e=Fn(e,n,3);++r<o;){var a=t[r];e(a,r,t)&&(i.push(a),s.push(r))}return qe(t,s),i}function Ci(t){return di(t,1)}function Ti(t,e,n){var i=t?t.length:0;return i?(n&&"number"!=typeof n&&Gn(t,e,n)&&(e=0,n=i),Je(t,e,n)):[]}function Si(t,e,n){var i=t?t.length:0;return i?((n?Gn(t,e,n):null==e)&&(e=1),Je(t,0,0>e?0:e)):[]}function Ii(t,e,n){var i=t?t.length:0;return i?((n?Gn(t,e,n):null==e)&&(e=1),e=i-(+e||0),Je(t,0>e?0:e)):[]}function ki(t,e,n){return t&&t.length?tn(t,Fn(e,n,3),!1,!0):[]}function Ai(t,e,n){return t&&t.length?tn(t,Fn(e,n,3)):[]}function Pi(t,e,n,i){var r=t?t.length:0;if(!r)return[];null!=e&&"boolean"!=typeof e&&(i=n,n=Gn(t,e,i)?null:e,e=!1);var s=Fn();return(null!=n||s!==ye)&&(n=s(n,i,3)),e&&Vn()==a?b(t,n):Ye(t,n)}function Ri(t){if(!t||!t.length)return[];var e=-1,n=0;t=ae(t,function(t){return Jn(t)?(n=_o(t.length,n),!0):void 0});for(var i=Rs(n);++e<n;)i[e]=ue(t,Ue(e));return i}function Hi(t,e,n){var i=t?t.length:0;if(!i)return[];var r=Ri(t);return null==e?r:(e=sn(e,n,4),ue(r,function(t){return le(t,e,C,!0)}))}function Di(){for(var t=-1,e=arguments.length;++t<e;){var n=arguments[t];if(Jn(n))var i=i?xe(i,n).concat(xe(n,i)):n}return i?Ye(i):[]}function Li(t,e){var n=-1,i=t?t.length:0,r={};for(!i||e||Ta(t[0])||(e=[]);++n<i;){var s=t[n];e?r[s]=e[n]:s&&(r[s[0]]=s[1])}return r}function Fi(t){var n=e(t);return n.__chain__=!0,n}function Ni(t,e,n){return e.call(n,t),t}function Vi(t,e,n){return e.call(n,t)}function ji(){return Fi(this)}function Bi(){return new i(this.value(),this.__chain__)}function Ui(t){for(var e,i=this;i instanceof n;){var r=li(i);e?s.__wrapped__=r:e=r;var s=r;i=i.__wrapped__}return s.__wrapped__=t,e}function $i(){var t=this.__wrapped__;return t instanceof r?(this.__actions__.length&&(t=new r(this)),new i(t.reverse(),this.__chain__)):this.thru(function(t){return t.reverse()})}function qi(){return this.value()+""}function zi(){return en(this.__wrapped__,this.__actions__)}function Wi(t,e,n){var i=Ta(t)?se:Ee;return n&&Gn(t,e,n)&&(e=null),("function"!=typeof e||n!==C)&&(e=Fn(e,n,3)),i(t,e)}function Ji(t,e,n){var i=Ta(t)?ae:Ce;return e=Fn(e,n,3),i(t,e)}function Ki(t,e){return ia(t,Ne(e))}function Gi(t,e,n,i){var r=t?Uo(t):0;return Yn(r)||(t=Yr(t),r=t.length),r?(n="number"!=typeof n||i&&Gn(e,n,i)?0:0>n?_o(r+n,0):n||0,"string"==typeof t||!Ta(t)&&Dr(t)?r>n&&t.indexOf(e,n)>-1:Vn(t,e,n)>-1):!1}function Qi(t,e,n){var i=Ta(t)?ue:Fe;return e=Fn(e,n,3),i(t,e)}function Xi(t,e){return Qi(t,Cs(e))}function Yi(t,e,n){var i=Ta(t)?ae:Ce;return e=Fn(e,n,3),i(t,function(t,n,i){return!e(t,n,i)})}function Zi(t,e,n){if(n?Gn(t,e,n):null==e){t=oi(t);var i=t.length;return i>0?t[ze(0,i-1)]:C}var r=-1,s=jr(t),i=s.length,o=i-1;for(e=yo(0>e?0:+e||0,i);++r<e;){var a=ze(r,o),u=s[a];s[a]=s[r],s[r]=u}return s.length=e,s}function tr(t){return Zi(t,Oo)}function er(t){var e=t?Uo(t):0;return Yn(e)?e:Va(t).length}function nr(t,e,n){var i=Ta(t)?ce:Ke;return n&&Gn(t,e,n)&&(e=null),("function"!=typeof e||n!==C)&&(e=Fn(e,n,3)),i(t,e)}function ir(t,e,n){if(null==t)return[];n&&Gn(t,e,n)&&(e=null);var i=-1;e=Fn(e,n,3);var r=Fe(t,function(t,n,r){return{criteria:e(t,n,r),index:++i,value:t}});return Ge(r,d)}function rr(t,e,n,i){return null==t?[]:(i&&Gn(e,n,i)&&(n=null),Ta(e)||(e=null==e?[]:[e]),Ta(n)||(n=null==n?[]:[n]),Qe(t,e,n))}function sr(t,e){return Ji(t,Ne(e))}function or(t,e){if("function"!=typeof e){if("function"!=typeof t)throw new Us(q);var n=t;t=e,e=n}return t=vo(t=+t)?t:0,function(){return--t<1?e.apply(this,arguments):void 0}}function ar(t,e,n){return n&&Gn(t,e,n)&&(e=null),e=t&&null==e?t.length:_o(+e||0,0),Rn(t,D,null,null,null,null,e)}function ur(t,e){var n;if("function"!=typeof e){if("function"!=typeof t)throw new Us(q);var i=t;t=e,e=i}return function(){return--t>0&&(n=e.apply(this,arguments)),1>=t&&(e=null),n}}function lr(t,e,n){function i(){d&&no(d),u&&no(u),u=d=f=C}function r(){var n=e-(pa()-h);if(0>=n||n>e){u&&no(u);var i=f;u=d=f=C,i&&(p=pa(),l=t.apply(c,a),d||u||(a=c=null))}else d=uo(r,n)}function s(){d&&no(d),u=d=f=C,(v||g!==e)&&(p=pa(),l=t.apply(c,a),d||u||(a=c=null))}function o(){if(a=arguments,h=pa(),c=this,f=v&&(d||!m),g===!1)var n=m&&!d;else{u||m||(p=h);var i=g-(h-p),o=0>=i||i>g;o?(u&&(u=no(u)),p=h,l=t.apply(c,a)):u||(u=uo(s,i))}return o&&d?d=no(d):d||e===g||(d=uo(r,e)),n&&(o=!0,l=t.apply(c,a)),!o||d||u||(a=c=null),l}var a,u,l,h,c,d,f,p=0,g=!1,v=!0;if("function"!=typeof t)throw new Us(q);if(e=0>e?0:+e||0,n===!0){var m=!0;v=!1}else Sr(n)&&(m=n.leading,g="maxWait"in n&&_o(+n.maxWait||0,e),v="trailing"in n?n.trailing:v);return o.cancel=i,o}function hr(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new Us(q);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=t.apply(this,i);return n.cache=s.set(r,o),o};return n.cache=new hr.Cache,n}function cr(t){if("function"!=typeof t)throw new Us(q);return function(){return!t.apply(this,arguments)}}function dr(t){return ur(2,t)}function fr(t,e){if("function"!=typeof t)throw new Us(q);return e=_o(e===C?t.length-1:+e||0,0),function(){for(var n=arguments,i=-1,r=_o(n.length-e,0),s=Rs(r);++i<r;)s[i]=n[e+i];switch(e){case 0:return t.call(this,s);case 1:return t.call(this,n[0],s);case 2:return t.call(this,n[0],n[1],s)}var o=Rs(e+1);for(i=-1;++i<e;)o[i]=n[i];return o[e]=s,t.apply(this,o)}}function pr(t){if("function"!=typeof t)throw new Us(q);return function(e){return t.apply(this,e)}}function gr(t,e,n){var i=!0,r=!0;if("function"!=typeof t)throw new Us(q);return n===!1?i=!1:Sr(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Wt.leading=i,Wt.maxWait=+e,Wt.trailing=r,lr(t,e,Wt)}function vr(t,e){return e=null==e?ws:e,Rn(e,R,null,[t],[])}function mr(t,e,n,i){return e&&"boolean"!=typeof e&&Gn(t,e,n)?e=!1:"function"==typeof e&&(i=n,n=e,e=!1),"function"==typeof n?we(t,e,sn(n,i,1)):we(t,e)}function _r(t,e,n){return"function"==typeof e?we(t,!0,sn(e,n,1)):we(t,!0)}function yr(t,e){return t>e}function wr(t,e){return t>=e}function br(t){return _(t)&&Jn(t)&&Qs.call(t)==W}function xr(t){return t===!0||t===!1||_(t)&&Qs.call(t)==K}function Er(t){return _(t)&&Qs.call(t)==G}function Mr(t){return!!t&&1===t.nodeType&&_(t)&&Qs.call(t).indexOf("Element")>-1}function Or(t){return null==t?!0:Jn(t)&&(Ta(t)||Dr(t)||br(t)||_(t)&&Ia(t.splice))?!t.length:!Va(t).length}function Cr(t,e,n,i){n="function"==typeof n?sn(n,i,3):C;var r=n?n(t,e):C;return r===C?He(t,e,n):!!r}function Tr(t){return _(t)&&"string"==typeof t.message&&Qs.call(t)==Q}function Sr(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Ir(t,e,n,i){return n="function"==typeof n?sn(n,i,3):C,Le(t,jn(e),n)}function kr(t){return Rr(t)&&t!=+t}function Ar(t){return null==t?!1:Qs.call(t)==X?Ys.test(Js.call(t)):_(t)&&Dt.test(t)}function Pr(t){return null===t}function Rr(t){return"number"==typeof t||_(t)&&Qs.call(t)==Z}function Hr(t){return _(t)&&Qs.call(t)==et}function Dr(t){return"string"==typeof t||_(t)&&Qs.call(t)==it}function Lr(t){return _(t)&&Yn(t.length)&&!!qt[Qs.call(t)]}function Fr(t){return t===C}function Nr(t,e){return e>t}function Vr(t,e){return e>=t}function jr(t){var e=t?Uo(t):0;return Yn(e)?e?te(t):[]:Yr(t)}function Br(t){return _e(t,Jr(t))}function Ur(t,e,n){var i=Ho(t);return n&&Gn(t,e,n)&&(e=null),e?ve(i,e):i}function $r(t){return Pe(t,Jr(t))}function qr(t,e,n){var i=null==t?C:Re(t,ui(e),e+"");return i===C?n:i}function zr(t,e){if(null==t)return!1;var n=Ks.call(t,e);if(!n&&!Qn(e)){if(e=ui(e),t=1==e.length?t:Re(t,Je(e,0,-1)),null==t)return!1;e=xi(e),n=Ks.call(t,e)}return n||Yn(t.length)&&Kn(e,t.length)&&(Ta(t)||br(t))}function Wr(t,e,n){n&&Gn(t,e,n)&&(e=null);for(var i=-1,r=Va(t),s=r.length,o={};++i<s;){var a=r[i],u=t[a];e?Ks.call(o,u)?o[u].push(a):o[u]=[a]:o[u]=a}return o}function Jr(t){if(null==t)return[];Sr(t)||(t=Vs(t));var e=t.length;e=e&&Yn(e)&&(Ta(t)||br(t))&&e||0;for(var n=t.constructor,i=-1,r="function"==typeof n&&n.prototype===t,s=Rs(e),o=e>0;++i<e;)s[i]=i+"";for(var a in t)o&&Kn(a,e)||"constructor"==a&&(r||!Ks.call(t,a))||s.push(a);return s}function Kr(t){t=ai(t);for(var e=-1,n=Va(t),i=n.length,r=Rs(i);++e<i;){var s=n[e];r[e]=[s,t[s]]}return r}function Gr(t,e,n){var i=null==t?C:t[e];return i===C&&(null==t||Qn(e,t)||(e=ui(e),t=1==e.length?t:Re(t,Je(e,0,-1)),i=null==t?C:t[xi(e)]),i=i===C?n:i),Ia(i)?i.call(t):i}function Qr(t,e,n){if(null==t)return t;var i=e+"";e=null!=t[i]||Qn(e,t)?[i]:ui(e);for(var r=-1,s=e.length,o=s-1,a=t;null!=a&&++r<s;){var u=e[r];Sr(a)&&(r==o?a[u]=n:null==a[u]&&(a[u]=Kn(e[r+1])?[]:{})),a=a[u]}return t}function Xr(t,e,n,i){var r=Ta(t)||Lr(t);if(e=Fn(e,i,4),null==n)if(r||Sr(t)){var s=t.constructor;n=r?Ta(t)?new s:[]:Ho(Ia(s)?s.prototype:null)}else n={};return(r?ee:ke)(t,function(t,i,r){return e(n,t,i,r)}),n}function Yr(t){return Ze(t,Va(t))}function Zr(t){return Ze(t,Jr(t))}function ts(t,e,n){return e=+e||0,"undefined"==typeof n?(n=e,e=0):n=+n||0,t>=yo(e,n)&&t<_o(e,n)}function es(t,e,n){n&&Gn(t,e,n)&&(e=n=null);var i=null==t,r=null==e;if(null==n&&(r&&"boolean"==typeof t?(n=t,t=1):"boolean"==typeof e&&(n=e,r=!0)),i&&r&&(e=1,r=!1),t=+t||0,r?(e=t,t=0):e=+e||0,n||t%1||e%1){var s=Eo();return yo(t+s*(e-t+so("1e-"+((s+"").length-1))),e)}return ze(t,e)}function ns(t){return t=l(t),t&&t.charAt(0).toUpperCase()+t.slice(1)}function is(t){return t=l(t),t&&t.replace(Ft,p).replace(kt,"")}function rs(t,e,n){t=l(t),e+="";var i=t.length;return n=n===C?i:yo(0>n?0:+n||0,i),n-=e.length,n>=0&&t.indexOf(e,n)==n}function ss(t){return t=l(t),t&&bt.test(t)?t.replace(yt,g):t}function os(t){return t=l(t),t&&It.test(t)?t.replace(St,"\\$&"):t}function as(t,e,n){t=l(t),e=+e;var i=t.length;if(i>=e||!vo(e))return t;var r=(e-i)/2,s=io(r),o=eo(r);return n=kn("",o,n),n.slice(0,s)+t+n}function us(t,e,n){return n&&Gn(t,e,n)&&(e=0),xo(t,e)}function ls(t,e){var n="";if(t=l(t),e=+e,1>e||!t||!vo(e))return n;do e%2&&(n+=t),e=io(e/2),t+=t;while(e);return n}function hs(t,e,n){return t=l(t),n=null==n?0:yo(0>n?0:+n||0,t.length),t.lastIndexOf(e,n)==n}function cs(t,n,i){var r=e.templateSettings;i&&Gn(t,n,i)&&(n=i=null),t=l(t),n=ge(ve({},i||n),r,pe);var s,o,a=ge(ve({},n.imports),r.imports,pe),u=Va(a),h=Ze(a,u),c=0,d=n.interpolate||Nt,f="__p += '",p=js((n.escape||Nt).source+"|"+d.source+"|"+(d===Mt?Pt:Nt).source+"|"+(n.evaluate||Nt).source+"|$","g"),g="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++$t+"]")+"\n";t.replace(p,function(e,n,i,r,a,u){return i||(i=r),f+=t.slice(c,u).replace(Vt,v),n&&(s=!0,f+="' +\n__e("+n+") +\n'"),a&&(o=!0,f+="';\n"+a+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=u+e.length,e}),f+="';\n";var m=n.variable;m||(f="with (obj) {\n"+f+"\n}\n"),f=(o?f.replace(gt,""):f).replace(vt,"$1").replace(mt,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var _=Xa(function(){return Ls(u,g+"return "+f).apply(C,h)});if(_.source=f,Tr(_))throw _;return _}function ds(t,e,n){var i=t;return(t=l(t))?(n?Gn(i,e,n):null==e)?t.slice(x(t),E(t)+1):(e+="",t.slice(h(t,e),c(t,e)+1)):t}function fs(t,e,n){var i=t;return t=l(t),t?t.slice((n?Gn(i,e,n):null==e)?x(t):h(t,e+"")):t}function ps(t,e,n){var i=t;return t=l(t),t?(n?Gn(i,e,n):null==e)?t.slice(0,E(t)+1):t.slice(0,c(t,e+"")+1):t}function gs(t,e,n){n&&Gn(t,e,n)&&(e=null);var i=F,r=N;if(null!=e)if(Sr(e)){var s="separator"in e?e.separator:s;i="length"in e?+e.length||0:i,r="omission"in e?l(e.omission):r}else i=+e||0;if(t=l(t),i>=t.length)return t;var o=i-r.length;if(1>o)return r;var a=t.slice(0,o);if(null==s)return a+r;if(Hr(s)){if(t.slice(o).search(s)){var u,h,c=t.slice(0,o);for(s.global||(s=js(s.source,(Rt.exec(s)||"")+"g")),s.lastIndex=0;u=s.exec(c);)h=u.index;a=a.slice(0,null==h?o:h)}}else if(t.indexOf(s,o)!=o){var d=a.lastIndexOf(s);d>-1&&(a=a.slice(0,d))}return a+r}function vs(t){return t=l(t),t&&wt.test(t)?t.replace(_t,M):t}function ms(t,e,n){return n&&Gn(t,e,n)&&(e=null),t=l(t),t.match(e||jt)||[]}function _s(t,e,n){return n&&Gn(t,e,n)&&(e=null),_(t)?bs(t):ye(t,e)}function ys(t){return function(){return t}}function ws(t){return t}function bs(t){return Ne(we(t,!0))}function xs(t,e){return Ve(t,we(e,!0))}function Es(t,e,n){if(null==n){var i=Sr(e),r=i?Va(e):null,s=r&&r.length?Pe(e,r):null;(s?s.length:i)||(s=!1,n=e,e=t,t=this)}s||(s=Pe(e,Va(e)));var o=!0,a=-1,u=Ia(t),l=s.length;n===!1?o=!1:Sr(n)&&"chain"in n&&(o=n.chain);for(;++a<l;){var h=s[a],c=e[h];t[h]=c,u&&(t.prototype[h]=function(e){return function(){var n=this.__chain__;if(o||n){var i=t(this.__wrapped__),r=i.__actions__=te(this.__actions__);return r.push({func:e,args:arguments,thisArg:t}),i.__chain__=n,i}var s=[this.value()];return oo.apply(s,arguments),e.apply(t,s)}}(c))}return t}function Ms(){return t._=Xs,this}function Os(){}function Cs(t){return Qn(t)?Ue(t):$e(t)}function Ts(t){return function(e){return Re(t,ui(e),e+"")}}function Ss(t,e,n){n&&Gn(t,e,n)&&(e=n=null),t=+t||0,n=null==n?1:+n||0,null==e?(e=t,t=0):e=+e||0;for(var i=-1,r=_o(eo((e-t)/(n||1)),0),s=Rs(r);++i<r;)s[i]=t,t+=n;return s}function Is(t,e,n){if(t=io(t),1>t||!vo(t))return[];var i=-1,r=Rs(yo(t,Co));for(e=sn(e,n,1);++i<t;)Co>i?r[i]=e(i):e(i);return r}function ks(t){var e=++Gs;return l(t)+e}function As(t,e){return(+t||0)+(+e||0)}function Ps(t,e,n){n&&Gn(t,e,n)&&(e=null);var i=Fn(),r=null==e;return r&&i===ye||(r=!1,e=i(e,n,3)),r?de(Ta(t)?t:oi(t)):Xe(t,e)}t=t?re.defaults(ie.Object(),t,re.pick(ie,Ut)):ie;var Rs=t.Array,Hs=t.Date,Ds=t.Error,Ls=t.Function,Fs=t.Math,Ns=t.Number,Vs=t.Object,js=t.RegExp,Bs=t.String,Us=t.TypeError,$s=Rs.prototype,qs=Vs.prototype,zs=Bs.prototype,Ws=(Ws=t.window)?Ws.document:null,Js=Ls.prototype.toString,Ks=qs.hasOwnProperty,Gs=0,Qs=qs.toString,Xs=t._,Ys=js("^"+os(Js.call(Ks)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Zs=Bn(t,"ArrayBuffer"),to=Bn(Zs&&new Zs(0),"slice"),eo=Fs.ceil,no=t.clearTimeout,io=Fs.floor,ro=Bn(Vs,"getPrototypeOf"),so=t.parseFloat,oo=$s.push,ao=Bn(t,"Set"),uo=t.setTimeout,lo=$s.splice,ho=Bn(t,"Uint8Array"),co=Bn(t,"WeakMap"),fo=function(){try{var e=Bn(t,"Float64Array"),n=new e(new Zs(10),0,1)&&e}catch(i){}return n||null}(),po=Bn(Vs,"create"),go=Bn(Rs,"isArray"),vo=t.isFinite,mo=Bn(Vs,"keys"),_o=Fs.max,yo=Fs.min,wo=Bn(Hs,"now"),bo=Bn(Ns,"isFinite"),xo=t.parseInt,Eo=Fs.random,Mo=Ns.NEGATIVE_INFINITY,Oo=Ns.POSITIVE_INFINITY,Co=4294967295,To=Co-1,So=Co>>>1,Io=fo?fo.BYTES_PER_ELEMENT:0,ko=9007199254740991,Ao=co&&new co,Po={},Ro=e.support={};!function(t){var e=function(){this.x=t},n=[];e.prototype={valueOf:t,y:t};for(var i in new e)n.push(i);try{Ro.dom=11===Ws.createDocumentFragment().nodeType}catch(r){Ro.dom=!1}}(1,0),e.templateSettings={escape:xt,evaluate:Et,interpolate:Mt,variable:"",imports:{_:e}};var Ho=function(){function t(){}return function(e){if(Sr(e)){t.prototype=e;var n=new t;t.prototype=null}return n||{}}}(),Do=cn(ke),Lo=cn(Ae,!0),Fo=dn(),No=dn(!0),Vo=Ao?function(t,e){return Ao.set(t,e),t}:ws;to||(on=Zs&&ho?function(t){var e=t.byteLength,n=fo?io(e/Io):0,i=n*Io,r=new Zs(e);if(n){var s=new fo(r,0,n);s.set(new fo(t,0,n))}return e!=i&&(s=new ho(r,i),s.set(new ho(t,i))),r}:ys(null));var jo=po&&ao?function(t){return new Xt(t)}:ys(null),Bo=Ao?function(t){return Ao.get(t)}:Os,Uo=Ue("length"),$o=function(){var t=0,e=0;return function(n,i){var r=pa(),s=j-(r-e);if(e=r,s>0){if(++t>=V)return n}else t=0;return Vo(n,i)}}(),qo=fr(function(t,e){return Jn(t)?xe(t,Se(e,!1,!0)):[]}),zo=yn(),Wo=yn(!0),Jo=fr(function(t){for(var e=t.length,n=e,i=Rs(c),r=Vn(),s=r==a,o=[];n--;){var u=t[n]=Jn(u=t[n])?u:[];i[n]=s&&u.length>=120?jo(n&&u):null}var l=t[0],h=-1,c=l?l.length:0,d=i[0];t:for(;++h<c;)if(u=l[h],(d?Yt(d,u):r(o,u,0))<0){for(var n=e;--n;){var f=i[n];if((f?Yt(f,u):r(t[n],u,0))<0)continue t}d&&d.push(u),o.push(u)}return o}),Ko=fr(function(t,e){e=Se(e);var n=me(t,e);return qe(t,e.sort(s)),n}),Go=Pn(),Qo=Pn(!0),Xo=fr(function(t){return Ye(Se(t,!1,!0))}),Yo=fr(function(t,e){return Jn(t)?xe(t,e):[]}),Zo=fr(Ri),ta=fr(function(t){var e=t.length,n=e>2?t[e-2]:C,i=e>1?t[e-1]:C;return e>2&&"function"==typeof n?e-=2:(n=e>1&&"function"==typeof i?(--e,i):C,i=C),t.length=e,Hi(t,n,i)}),ea=fr(function(t,e){return me(t,Se(e))}),na=ln(function(t,e,n){Ks.call(t,n)?++t[n]:t[n]=1}),ia=_n(Do),ra=_n(Lo,!0),sa=xn(ee,Do),oa=xn(ne,Lo),aa=ln(function(t,e,n){Ks.call(t,n)?t[n].push(e):t[n]=[e]}),ua=ln(function(t,e,n){t[n]=e}),la=fr(function(t,e,n){var i=-1,r="function"==typeof e,s=Qn(e),o=Jn(t)?Rs(t.length):[];return Do(t,function(t){var a=r?e:s&&null!=t?t[e]:null;o[++i]=a?a.apply(t,n):Wn(t,e,n)}),o}),ha=ln(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),ca=Sn(le,Do),da=Sn(he,Lo),fa=fr(function(t,e){if(null==t)return[];var n=e[2];return n&&Gn(e[0],e[1],n)&&(e.length=1),Qe(t,Se(e),[])}),pa=wo||function(){return(new Hs).getTime()},ga=fr(function(t,e,n){var i=S;if(n.length){var r=w(n,ga.placeholder);i|=R}return Rn(t,i,e,n,r)}),va=fr(function(t,e){e=e.length?Se(e):$r(t);for(var n=-1,i=e.length;++n<i;){var r=e[n];t[r]=Rn(t[r],S,t)}return t}),ma=fr(function(t,e,n){var i=S|I;if(n.length){var r=w(n,ma.placeholder);i|=R}return Rn(e,i,t,n,r)}),_a=vn(A),ya=vn(P),wa=fr(function(t,e){return be(t,1,e)}),ba=fr(function(t,e,n){return be(t,e,n)}),xa=bn(),Ea=bn(!0),Ma=Tn(R),Oa=Tn(H),Ca=fr(function(t,e){return Rn(t,L,null,null,null,Se(e))}),Ta=go||function(t){return _(t)&&Yn(t.length)&&Qs.call(t)==J};Ro.dom||(Mr=function(t){return!!t&&1===t.nodeType&&_(t)&&!ka(t)});var Sa=bo||function(t){return"number"==typeof t&&vo(t)},Ia=u(/x/)||ho&&!u(ho)?function(t){return Qs.call(t)==X}:u,ka=ro?function(t){if(!t||Qs.call(t)!=tt)return!1;var e=Bn(t,"valueOf"),n=e&&(n=ro(e))&&ro(n);return n?t==n||ro(t)==n:ri(t)}:ri,Aa=hn(function(t,e,n){return n?ge(t,e,n):ve(t,e)}),Pa=fr(function(t){var e=t[0];return null==e?e:(t.push(fe),Aa.apply(C,t))}),Ra=wn(ke),Ha=wn(Ae),Da=En(Fo),La=En(No),Fa=Mn(ke),Na=Mn(Ae),Va=mo?function(t){var e=null==t?null:t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&Jn(t)?si(t):Sr(t)?mo(t):[]}:si,ja=On(!0),Ba=On(),Ua=hn(je),$a=fr(function(t,e){if(null==t)return{};if("function"!=typeof e[0]){var e=ue(Se(e),Bs);return ei(t,xe(Jr(t),e))}var n=sn(e[0],e[1],3);return ni(t,function(t,e,i){return!n(t,e,i)})}),qa=fr(function(t,e){return null==t?{}:"function"==typeof e[0]?ni(t,sn(e[0],e[1],3)):ei(t,Se(e))}),za=pn(function(t,e,n){return e=e.toLowerCase(),t+(n?e.charAt(0).toUpperCase()+e.slice(1):e)}),Wa=pn(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Ja=Cn(),Ka=Cn(!0);8!=xo(Bt+"08")&&(us=function(t,e,n){return(n?Gn(t,e,n):null==e)?e=0:e&&(e=+e),t=ds(t),xo(t,e||(Ht.test(t)?16:10))});var Ga=pn(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Qa=pn(function(t,e,n){return t+(n?" ":"")+(e.charAt(0).toUpperCase()+e.slice(1))}),Xa=fr(function(t,e){try{return t.apply(C,e)}catch(n){return Tr(n)?n:new Ds(n)}}),Ya=fr(function(t,e){return function(n){return Wn(n,t,e)}}),Za=fr(function(t,e){return function(n){return Wn(t,n,e)}}),tu=mn(yr,Mo),eu=mn(Nr,Oo);return e.prototype=n.prototype,i.prototype=Ho(n.prototype),i.prototype.constructor=i,r.prototype=Ho(n.prototype),r.prototype.constructor=r,rt.prototype["delete"]=Jt,rt.prototype.get=Kt,rt.prototype.has=Gt,rt.prototype.set=Qt,Xt.prototype.push=Zt,hr.Cache=rt,e.after=or,e.ary=ar,e.assign=Aa,e.at=ea,e.before=ur,e.bind=ga,e.bindAll=va,e.bindKey=ma,e.callback=_s,e.chain=Fi,e.chunk=hi,e.compact=ci,e.constant=ys,e.countBy=na,e.create=Ur,e.curry=_a,e.curryRight=ya,e.debounce=lr,e.defaults=Pa,e.defer=wa,e.delay=ba,e.difference=qo,e.drop=di,e.dropRight=fi,e.dropRightWhile=pi,
  e.dropWhile=gi,e.fill=vi,e.filter=Ji,e.flatten=_i,e.flattenDeep=yi,e.flow=xa,e.flowRight=Ea,e.forEach=sa,e.forEachRight=oa,e.forIn=Da,e.forInRight=La,e.forOwn=Fa,e.forOwnRight=Na,e.functions=$r,e.groupBy=aa,e.indexBy=ua,e.initial=bi,e.intersection=Jo,e.invert=Wr,e.invoke=la,e.keys=Va,e.keysIn=Jr,e.map=Qi,e.mapKeys=ja,e.mapValues=Ba,e.matches=bs,e.matchesProperty=xs,e.memoize=hr,e.merge=Ua,e.method=Ya,e.methodOf=Za,e.mixin=Es,e.negate=cr,e.omit=$a,e.once=dr,e.pairs=Kr,e.partial=Ma,e.partialRight=Oa,e.partition=ha,e.pick=qa,e.pluck=Xi,e.property=Cs,e.propertyOf=Ts,e.pull=Mi,e.pullAt=Ko,e.range=Ss,e.rearg=Ca,e.reject=Yi,e.remove=Oi,e.rest=Ci,e.restParam=fr,e.set=Qr,e.shuffle=tr,e.slice=Ti,e.sortBy=ir,e.sortByAll=fa,e.sortByOrder=rr,e.spread=pr,e.take=Si,e.takeRight=Ii,e.takeRightWhile=ki,e.takeWhile=Ai,e.tap=Ni,e.throttle=gr,e.thru=Vi,e.times=Is,e.toArray=jr,e.toPlainObject=Br,e.transform=Xr,e.union=Xo,e.uniq=Pi,e.unzip=Ri,e.unzipWith=Hi,e.values=Yr,e.valuesIn=Zr,e.where=sr,e.without=Yo,e.wrap=vr,e.xor=Di,e.zip=Zo,e.zipObject=Li,e.zipWith=ta,e.backflow=Ea,e.collect=Qi,e.compose=Ea,e.each=sa,e.eachRight=oa,e.extend=Aa,e.iteratee=_s,e.methods=$r,e.object=Li,e.select=Ji,e.tail=Ci,e.unique=Pi,Es(e,e),e.add=As,e.attempt=Xa,e.camelCase=za,e.capitalize=ns,e.clone=mr,e.cloneDeep=_r,e.deburr=is,e.endsWith=rs,e.escape=ss,e.escapeRegExp=os,e.every=Wi,e.find=ia,e.findIndex=zo,e.findKey=Ra,e.findLast=ra,e.findLastIndex=Wo,e.findLastKey=Ha,e.findWhere=Ki,e.first=mi,e.get=qr,e.gt=yr,e.gte=wr,e.has=zr,e.identity=ws,e.includes=Gi,e.indexOf=wi,e.inRange=ts,e.isArguments=br,e.isArray=Ta,e.isBoolean=xr,e.isDate=Er,e.isElement=Mr,e.isEmpty=Or,e.isEqual=Cr,e.isError=Tr,e.isFinite=Sa,e.isFunction=Ia,e.isMatch=Ir,e.isNaN=kr,e.isNative=Ar,e.isNull=Pr,e.isNumber=Rr,e.isObject=Sr,e.isPlainObject=ka,e.isRegExp=Hr,e.isString=Dr,e.isTypedArray=Lr,e.isUndefined=Fr,e.kebabCase=Wa,e.last=xi,e.lastIndexOf=Ei,e.lt=Nr,e.lte=Vr,e.max=tu,e.min=eu,e.noConflict=Ms,e.noop=Os,e.now=pa,e.pad=as,e.padLeft=Ja,e.padRight=Ka,e.parseInt=us,e.random=es,e.reduce=ca,e.reduceRight=da,e.repeat=ls,e.result=Gr,e.runInContext=O,e.size=er,e.snakeCase=Ga,e.some=nr,e.sortedIndex=Go,e.sortedLastIndex=Qo,e.startCase=Qa,e.startsWith=hs,e.sum=Ps,e.template=cs,e.trim=ds,e.trimLeft=fs,e.trimRight=ps,e.trunc=gs,e.unescape=vs,e.uniqueId=ks,e.words=ms,e.all=Wi,e.any=nr,e.contains=Gi,e.eq=Cr,e.detect=ia,e.foldl=ca,e.foldr=da,e.head=mi,e.include=Gi,e.inject=ca,Es(e,function(){var t={};return ke(e,function(n,i){e.prototype[i]||(t[i]=n)}),t}(),!1),e.sample=Zi,e.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(e){return Zi(e,t)}):Zi(this.value())},e.VERSION=T,ee(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),ee(["dropWhile","filter","map","takeWhile"],function(t,e){var n=e!=$,i=e==B;r.prototype[t]=function(t,s){var o=this.__filtered__,a=o&&i?new r(this):this.clone(),u=a.__iteratees__||(a.__iteratees__=[]);return u.push({done:!1,count:0,index:0,iteratee:Fn(t,s,1),limit:-1,type:e}),a.__filtered__=o||n,a}}),ee(["drop","take"],function(t,e){var n=t+"While";r.prototype[t]=function(n){var i=this.__filtered__,r=i&&!e?this.dropWhile():this.clone();if(n=null==n?1:_o(io(n)||0,0),i)e?r.__takeCount__=yo(r.__takeCount__,n):xi(r.__iteratees__).limit=n;else{var s=r.__views__||(r.__views__=[]);s.push({size:n,type:t+(r.__dir__<0?"Right":"")})}return r},r.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()},r.prototype[t+"RightWhile"]=function(t,e){return this.reverse()[n](t,e).reverse()}}),ee(["first","last"],function(t,e){var n="take"+(e?"Right":"");r.prototype[t]=function(){return this[n](1).value()[0]}}),ee(["initial","rest"],function(t,e){var n="drop"+(e?"":"Right");r.prototype[t]=function(){return this[n](1)}}),ee(["pluck","where"],function(t,e){var n=e?"filter":"map",i=e?Ne:Cs;r.prototype[t]=function(t){return this[n](i(t))}}),r.prototype.compact=function(){return this.filter(ws)},r.prototype.reject=function(t,e){return t=Fn(t,e,1),this.filter(function(e){return!t(e)})},r.prototype.slice=function(t,e){t=null==t?0:+t||0;var n=this;return 0>t?n=this.takeRight(-t):t&&(n=this.drop(t)),e!==C&&(e=+e||0,n=0>e?n.dropRight(-e):n.take(e-t)),n},r.prototype.toArray=function(){return this.drop(0)},ke(r.prototype,function(t,n){var s=e[n];if(s){var o=/^(?:filter|map|reject)|While$/.test(n),a=/^(?:first|last)$/.test(n);e.prototype[n]=function(){var n=arguments,u=this.__chain__,l=this.__wrapped__,h=!!this.__actions__.length,c=l instanceof r,d=n[0],f=c||Ta(l);f&&o&&"function"==typeof d&&1!=d.length&&(c=f=!1);var p=c&&!h;if(a&&!u)return p?t.call(l):s.call(e,this.value());var g=function(t){var i=[t];return oo.apply(i,n),s.apply(e,i)};if(f){var v=p?l:new r(this),m=t.apply(v,n);if(!a&&(h||m.__actions__)){var _=m.__actions__||(m.__actions__=[]);_.push({func:Vi,args:[g],thisArg:e})}return new i(m,u)}return this.thru(g)}}}),ee(["concat","join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var n=(/^(?:replace|split)$/.test(t)?zs:$s)[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:join|pop|replace|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;return r&&!this.__chain__?n.apply(this.value(),t):this[i](function(e){return n.apply(e,t)})}}),ke(r.prototype,function(t,n){var i=e[n];if(i){var r=i.name,s=Po[r]||(Po[r]=[]);s.push({name:n,func:i})}}),Po[In(null,I).name]=[{name:"wrapper",func:null}],r.prototype.clone=y,r.prototype.reverse=Y,r.prototype.value=nt,e.prototype.chain=ji,e.prototype.commit=Bi,e.prototype.plant=Ui,e.prototype.reverse=$i,e.prototype.toString=qi,e.prototype.run=e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=zi,e.prototype.collect=e.prototype.map,e.prototype.head=e.prototype.first,e.prototype.select=e.prototype.filter,e.prototype.tail=e.prototype.rest,e}var C,T="3.9.3",S=1,I=2,k=4,A=8,P=16,R=32,H=64,D=128,L=256,F=30,N="...",V=150,j=16,B=0,U=1,$=2,q="Expected a function",z="__lodash_placeholder__",W="[object Arguments]",J="[object Array]",K="[object Boolean]",G="[object Date]",Q="[object Error]",X="[object Function]",Y="[object Map]",Z="[object Number]",tt="[object Object]",et="[object RegExp]",nt="[object Set]",it="[object String]",rt="[object WeakMap]",st="[object ArrayBuffer]",ot="[object Float32Array]",at="[object Float64Array]",ut="[object Int8Array]",lt="[object Int16Array]",ht="[object Int32Array]",ct="[object Uint8Array]",dt="[object Uint8ClampedArray]",ft="[object Uint16Array]",pt="[object Uint32Array]",gt=/\b__p \+= '';/g,vt=/\b(__p \+=) '' \+/g,mt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39|#96);/g,yt=/[&<>"'`]/g,wt=RegExp(_t.source),bt=RegExp(yt.source),xt=/<%-([\s\S]+?)%>/g,Et=/<%([\s\S]+?)%>/g,Mt=/<%=([\s\S]+?)%>/g,Ot=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Ct=/^\w*$/,Tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,St=/[.*+?^${}()|[\]\/\\]/g,It=RegExp(St.source),kt=/[\u0300-\u036f\ufe20-\ufe23]/g,At=/\\(\\)?/g,Pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Rt=/\w*$/,Ht=/^0[xX]/,Dt=/^\[object .+?Constructor\]$/,Lt=/^\d+$/,Ft=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Nt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,jt=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")}(),Bt=" 	\f \ufeff\n\r\u2028\u2029 ᠎             　",Ut=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window"],$t=-1,qt={};qt[ot]=qt[at]=qt[ut]=qt[lt]=qt[ht]=qt[ct]=qt[dt]=qt[ft]=qt[pt]=!0,qt[W]=qt[J]=qt[st]=qt[K]=qt[G]=qt[Q]=qt[X]=qt[Y]=qt[Z]=qt[tt]=qt[et]=qt[nt]=qt[it]=qt[rt]=!1;var zt={};zt[W]=zt[J]=zt[st]=zt[K]=zt[G]=zt[ot]=zt[at]=zt[ut]=zt[lt]=zt[ht]=zt[Z]=zt[tt]=zt[et]=zt[it]=zt[ct]=zt[dt]=zt[ft]=zt[pt]=!0,zt[Q]=zt[X]=zt[Y]=zt[nt]=zt[rt]=!1;var Wt={leading:!1,maxWait:0,trailing:!1},Jt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Kt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Gt={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Qt={"function":!0,object:!0},Xt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yt=Qt[typeof e]&&e&&!e.nodeType&&e,Zt=Qt[typeof t]&&t&&!t.nodeType&&t,te=Yt&&Zt&&"object"==typeof r&&r&&r.Object&&r,ee=Qt[typeof self]&&self&&self.Object&&self,ne=Qt[typeof window]&&window&&window.Object&&window,ie=(Zt&&Zt.exports===Yt&&Yt,te||ne!==(this&&this.window)&&ne||ee||this),re=O();ie._=re,i=function(){return re}.call(e,n,e,t),!(i!==C&&(t.exports=i))}).call(this)}).call(e,n(8)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},,function(t,e,n){var i,r;!function(s,o){i=[n(11),n(7),n(12),n(13)],r=function(t,e){return s.Marionette=s.Mn=o(s,t,e)}.apply(e,i),!(void 0!==r&&(t.exports=r))}(this,function(t,e,n){"use strict";var i=t.Marionette,r=t.Mn,s=e.Marionette={};s.VERSION="2.4.2",s.noConflict=function(){return t.Marionette=i,t.Mn=r,this},s.Deferred=e.$.Deferred,s.FEATURES={},s.isEnabled=function(t){return!!s.FEATURES[t]},s.extend=e.Model.extend,s.isNodeAttached=function(t){return e.$.contains(document.documentElement,t)},s.mergeOptions=function(t,e){t&&n.extend(this,n.pick(t,e))},s.getOption=function(t,e){return t&&e?t.options&&void 0!==t.options[e]?t.options[e]:t[e]:void 0},s.proxyGetOption=function(t){return s.getOption(this,t)},s._getValue=function(t,e,i){return n.isFunction(t)&&(t=i?t.apply(e,i):t.call(e)),t},s.normalizeMethods=function(t){return n.reduce(t,function(t,e,i){return n.isFunction(e)||(e=this[e]),e&&(t[i]=e),t},{},this)},s.normalizeUIString=function(t,e){return t.replace(/@ui\.[a-zA-Z_$0-9]*/g,function(t){return e[t.slice(4)]})},s.normalizeUIKeys=function(t,e){return n.reduce(t,function(t,n,i){var r=s.normalizeUIString(i,e);return t[r]=n,t},{})},s.normalizeUIValues=function(t,e,i){return n.each(t,function(r,o){n.isString(r)?t[o]=s.normalizeUIString(r,e):n.isObject(r)&&n.isArray(i)&&(n.extend(r,s.normalizeUIValues(n.pick(r,i),e)),n.each(i,function(t){var i=r[t];n.isString(i)&&(r[t]=s.normalizeUIString(i,e))}))}),t},s.actAsCollection=function(t,e){var i=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck"];n.each(i,function(i){t[i]=function(){var t=n.values(n.result(this,e)),r=[t].concat(n.toArray(arguments));return n[i].apply(n,r)}})};var o=s.deprecate=function(t,e){n.isObject(t)&&(t=t.prev+" is going to be removed in the future. Please use "+t.next+" instead."+(t.url?" See: "+t.url:"")),void 0!==e&&e||o._cache[t]||(o._warn("Deprecation warning: "+t),o._cache[t]=!0)};o._warn="undefined"!=typeof console&&(console.warn||console.log)||function(){},o._cache={},s._triggerMethod=function(){function t(t,e,n){return n.toUpperCase()}var e=/(^|:)(\w)/gi;return function(i,r,s){var o=arguments.length<3;o&&(s=r,r=s[0]);var a,u="on"+r.replace(e,t),l=i[u];return n.isFunction(l)&&(a=l.apply(i,o?n.rest(s):s)),n.isFunction(i.trigger)&&(o+s.length>1?i.trigger.apply(i,o?s:[r].concat(n.drop(s,0))):i.trigger(r)),a}}(),s.triggerMethod=function(t){return s._triggerMethod(this,arguments)},s.triggerMethodOn=function(t){var e=n.isFunction(t.triggerMethod)?t.triggerMethod:s.triggerMethod;return e.apply(t,n.rest(arguments))},s.MonitorDOMRefresh=function(t){function e(){t._isShown=!0,r()}function i(){t._isRendered=!0,r()}function r(){t._isShown&&t._isRendered&&s.isNodeAttached(t.el)&&n.isFunction(t.triggerMethod)&&t.triggerMethod("dom:refresh")}t.on({show:e,render:i})},function(t){function e(e,i,r,s){var o=s.split(/\s+/);n.each(o,function(n){var s=e[n];if(!s)throw new t.Error('Method "'+n+'" was configured as an event handler, but does not exist.');e.listenTo(i,r,s)})}function i(t,e,n,i){t.listenTo(e,n,i)}function r(t,e,i,r){var s=r.split(/\s+/);n.each(s,function(n){var r=t[n];t.stopListening(e,i,r)})}function s(t,e,n,i){t.stopListening(e,n,i)}function o(e,i,r,s,o){if(i&&r){if(!n.isObject(r))throw new t.Error({message:"Bindings must be an object or function.",url:"marionette.functions.html#marionettebindentityevents"});r=t._getValue(r,e),n.each(r,function(t,r){n.isFunction(t)?s(e,i,r,t):o(e,i,r,t)})}}t.bindEntityEvents=function(t,n,r){o(t,n,r,i,e)},t.unbindEntityEvents=function(t,e,n){o(t,e,n,s,r)},t.proxyBindEntityEvents=function(e,n){return t.bindEntityEvents(this,e,n)},t.proxyUnbindEntityEvents=function(e,n){return t.unbindEntityEvents(this,e,n)}}(s);var a=["description","fileName","lineNumber","name","message","number"];return s.Error=s.extend.call(Error,{urlRoot:"http://marionettejs.com/docs/v"+s.VERSION+"/",constructor:function(t,e){n.isObject(t)?(e=t,t=e.message):e||(e={});var i=Error.call(this,t);n.extend(this,n.pick(i,a),n.pick(e,a)),this.captureStackTrace(),e.url&&(this.url=this.urlRoot+e.url)},captureStackTrace:function(){Error.captureStackTrace&&Error.captureStackTrace(this,s.Error)},toString:function(){return this.name+": "+this.message+(this.url?" See: "+this.url:"")}}),s.Error.extend=s.extend,s.Callbacks=function(){this._deferred=s.Deferred(),this._callbacks=[]},n.extend(s.Callbacks.prototype,{add:function(t,e){var i=n.result(this._deferred,"promise");this._callbacks.push({cb:t,ctx:e}),i.then(function(n){e&&(n.context=e),t.call(n.context,n.options)})},run:function(t,e){this._deferred.resolve({options:t,context:e})},reset:function(){var t=this._callbacks;this._deferred=s.Deferred(),this._callbacks=[],n.each(t,function(t){this.add(t.cb,t.ctx)},this)}}),s.Controller=function(t){this.options=t||{},n.isFunction(this.initialize)&&this.initialize(this.options)},s.Controller.extend=s.extend,n.extend(s.Controller.prototype,e.Events,{destroy:function(){return s._triggerMethod(this,"before:destroy",arguments),s._triggerMethod(this,"destroy",arguments),this.stopListening(),this.off(),this},triggerMethod:s.triggerMethod,mergeOptions:s.mergeOptions,getOption:s.proxyGetOption}),s.Object=function(t){this.options=n.extend({},n.result(this,"options"),t),this.initialize.apply(this,arguments)},s.Object.extend=s.extend,n.extend(s.Object.prototype,e.Events,{initialize:function(){},destroy:function(){return this.triggerMethod("before:destroy"),this.triggerMethod("destroy"),this.stopListening(),this},triggerMethod:s.triggerMethod,mergeOptions:s.mergeOptions,getOption:s.proxyGetOption,bindEntityEvents:s.proxyBindEntityEvents,unbindEntityEvents:s.proxyUnbindEntityEvents}),s.Region=s.Object.extend({constructor:function(t){if(this.options=t||{},this.el=this.getOption("el"),this.el=this.el instanceof e.$?this.el[0]:this.el,!this.el)throw new s.Error({name:"NoElError",message:'An "el" must be specified for a region.'});this.$el=this.getEl(this.el),s.Object.call(this,t)},show:function(t,e){if(this._ensureElement()){this._ensureViewIsIntact(t);var i=e||{},r=t!==this.currentView,o=!!i.preventDestroy,a=!!i.forceShow,u=!!this.currentView,l=r&&!o,h=r||a;if(u&&this.triggerMethod("before:swapOut",this.currentView,this,e),this.currentView&&delete this.currentView._parent,l?this.empty():u&&h&&this.currentView.off("destroy",this.empty,this),h){t.once("destroy",this.empty,this),t.render(),t._parent=this,u&&this.triggerMethod("before:swap",t,this,e),this.triggerMethod("before:show",t,this,e),s.triggerMethodOn(t,"before:show",t,this,e),u&&this.triggerMethod("swapOut",this.currentView,this,e);var c=s.isNodeAttached(this.el),d=[],f=n.extend({triggerBeforeAttach:this.triggerBeforeAttach,triggerAttach:this.triggerAttach},i);return c&&f.triggerBeforeAttach&&(d=this._displayedViews(t),this._triggerAttach(d,"before:")),this.attachHtml(t),this.currentView=t,c&&f.triggerAttach&&(d=this._displayedViews(t),this._triggerAttach(d)),u&&this.triggerMethod("swap",t,this,e),this.triggerMethod("show",t,this,e),s.triggerMethodOn(t,"show",t,this,e),this}return this}},triggerBeforeAttach:!0,triggerAttach:!0,_triggerAttach:function(t,e){var i=(e||"")+"attach";n.each(t,function(t){s.triggerMethodOn(t,i,t,this)},this)},_displayedViews:function(t){return n.union([t],n.result(t,"_getNestedViews")||[])},_ensureElement:function(){if(n.isObject(this.el)||(this.$el=this.getEl(this.el),this.el=this.$el[0]),!this.$el||0===this.$el.length){if(this.getOption("allowMissingEl"))return!1;throw new s.Error('An "el" '+this.$el.selector+" must exist in DOM")}return!0},_ensureViewIsIntact:function(t){if(!t)throw new s.Error({name:"ViewNotValid",message:"The view passed is undefined and therefore invalid. You must pass a view instance to show."});if(t.isDestroyed)throw new s.Error({name:"ViewDestroyedError",message:'View (cid: "'+t.cid+'") has already been destroyed and cannot be used.'})},getEl:function(t){return e.$(t,s._getValue(this.options.parentEl,this))},attachHtml:function(t){this.$el.contents().detach(),this.el.appendChild(t.el)},empty:function(t){var e=this.currentView,n=s._getValue(t,"preventDestroy",this);return e?(e.off("destroy",this.empty,this),this.triggerMethod("before:empty",e),n||this._destroyView(),this.triggerMethod("empty",e),delete this.currentView,n&&this.$el.contents().detach(),this):void 0},_destroyView:function(){var t=this.currentView;t.destroy&&!t.isDestroyed?t.destroy():t.remove&&(t.remove(),t.isDestroyed=!0)},attachView:function(t){return this.currentView=t,this},hasView:function(){return!!this.currentView},reset:function(){return this.empty(),this.$el&&(this.el=this.$el.selector),delete this.$el,this}},{buildRegion:function(t,e){if(n.isString(t))return this._buildRegionFromSelector(t,e);if(t.selector||t.el||t.regionClass)return this._buildRegionFromObject(t,e);if(n.isFunction(t))return this._buildRegionFromRegionClass(t);throw new s.Error({message:"Improper region configuration type.",url:"marionette.region.html#region-configuration-types"})},_buildRegionFromSelector:function(t,e){return new e({el:t})},_buildRegionFromObject:function(t,e){var i=t.regionClass||e,r=n.omit(t,"selector","regionClass");return t.selector&&!r.el&&(r.el=t.selector),new i(r)},_buildRegionFromRegionClass:function(t){return new t}}),s.RegionManager=s.Controller.extend({constructor:function(t){this._regions={},this.length=0,s.Controller.call(this,t),this.addRegions(this.getOption("regions"))},addRegions:function(t,e){return t=s._getValue(t,this,arguments),n.reduce(t,function(t,i,r){return n.isString(i)&&(i={selector:i}),i.selector&&(i=n.defaults({},i,e)),t[r]=this.addRegion(r,i),t},{},this)},addRegion:function(t,e){var n;return n=e instanceof s.Region?e:s.Region.buildRegion(e,s.Region),this.triggerMethod("before:add:region",t,n),n._parent=this,this._store(t,n),this.triggerMethod("add:region",t,n),n},get:function(t){return this._regions[t]},getRegions:function(){return n.clone(this._regions)},removeRegion:function(t){var e=this._regions[t];return this._remove(t,e),e},removeRegions:function(){var t=this.getRegions();return n.each(this._regions,function(t,e){this._remove(e,t)},this),t},emptyRegions:function(){var t=this.getRegions();return n.invoke(t,"empty"),t},destroy:function(){return this.removeRegions(),s.Controller.prototype.destroy.apply(this,arguments)},_store:function(t,e){this._regions[t]||this.length++,this._regions[t]=e},_remove:function(t,e){this.triggerMethod("before:remove:region",t,e),e.empty(),e.stopListening(),delete e._parent,delete this._regions[t],this.length--,this.triggerMethod("remove:region",t,e)}}),s.actAsCollection(s.RegionManager.prototype,"_regions"),s.TemplateCache=function(t){this.templateId=t},n.extend(s.TemplateCache,{templateCaches:{},get:function(t,e){var n=this.templateCaches[t];return n||(n=new s.TemplateCache(t),this.templateCaches[t]=n),n.load(e)},clear:function(){var t,e=n.toArray(arguments),i=e.length;if(i>0)for(t=0;i>t;t++)delete this.templateCaches[e[t]];else this.templateCaches={}}}),n.extend(s.TemplateCache.prototype,{load:function(t){if(this.compiledTemplate)return this.compiledTemplate;var e=this.loadTemplate(this.templateId,t);return this.compiledTemplate=this.compileTemplate(e,t),this.compiledTemplate},loadTemplate:function(t,n){var i=e.$(t).html();if(!i||0===i.length)throw new s.Error({name:"NoTemplateError",message:'Could not find template: "'+t+'"'});return i},compileTemplate:function(t,e){return n.template(t,e)}}),s.Renderer={render:function(t,e){if(!t)throw new s.Error({name:"TemplateNotFoundError",message:"Cannot render the template since its false, null or undefined."});var i=n.isFunction(t)?t:s.TemplateCache.get(t);return i(e)}},s.View=e.View.extend({isDestroyed:!1,constructor:function(t){n.bindAll(this,"render"),t=s._getValue(t,this),this.options=n.extend({},n.result(this,"options"),t),this._behaviors=s.Behaviors(this),e.View.call(this,this.options),s.MonitorDOMRefresh(this)},getTemplate:function(){return this.getOption("template")},serializeModel:function(t){return t.toJSON.apply(t,n.rest(arguments))},mixinTemplateHelpers:function(t){t=t||{};var e=this.getOption("templateHelpers");return e=s._getValue(e,this),n.extend(t,e)},normalizeUIKeys:function(t){var e=n.result(this,"_uiBindings");return s.normalizeUIKeys(t,e||n.result(this,"ui"))},normalizeUIValues:function(t,e){var i=n.result(this,"ui"),r=n.result(this,"_uiBindings");return s.normalizeUIValues(t,r||i,e)},configureTriggers:function(){if(this.triggers){var t=this.normalizeUIKeys(n.result(this,"triggers"));return n.reduce(t,function(t,e,n){return t[n]=this._buildViewTrigger(e),t},{},this)}},delegateEvents:function(t){return this._delegateDOMEvents(t),this.bindEntityEvents(this.model,this.getOption("modelEvents")),this.bindEntityEvents(this.collection,this.getOption("collectionEvents")),n.each(this._behaviors,function(t){t.bindEntityEvents(this.model,t.getOption("modelEvents")),t.bindEntityEvents(this.collection,t.getOption("collectionEvents"))},this),this},_delegateDOMEvents:function(t){var i=s._getValue(t||this.events,this);i=this.normalizeUIKeys(i),n.isUndefined(t)&&(this.events=i);var r={},o=n.result(this,"behaviorEvents")||{},a=this.configureTriggers(),u=n.result(this,"behaviorTriggers")||{};n.extend(r,o,i,a,u),e.View.prototype.delegateEvents.call(this,r)},undelegateEvents:function(){return e.View.prototype.undelegateEvents.apply(this,arguments),this.unbindEntityEvents(this.model,this.getOption("modelEvents")),this.unbindEntityEvents(this.collection,this.getOption("collectionEvents")),n.each(this._behaviors,function(t){t.unbindEntityEvents(this.model,t.getOption("modelEvents")),t.unbindEntityEvents(this.collection,t.getOption("collectionEvents"))},this),this},_ensureViewIsIntact:function(){if(this.isDestroyed)throw new s.Error({name:"ViewDestroyedError",message:'View (cid: "'+this.cid+'") has already been destroyed and cannot be used.'})},destroy:function(){if(this.isDestroyed)return this;var t=n.toArray(arguments);return this.triggerMethod.apply(this,["before:destroy"].concat(t)),this.isDestroyed=!0,this.triggerMethod.apply(this,["destroy"].concat(t)),this.unbindUIElements(),this.isRendered=!1,this.remove(),n.invoke(this._behaviors,"destroy",t),this},bindUIElements:function(){this._bindUIElements(),n.invoke(this._behaviors,this._bindUIElements)},_bindUIElements:function(){if(this.ui){this._uiBindings||(this._uiBindings=this.ui);var t=n.result(this,"_uiBindings");this.ui={},n.each(t,function(t,e){this.ui[e]=this.$(t)},this)}},unbindUIElements:function(){this._unbindUIElements(),n.invoke(this._behaviors,this._unbindUIElements)},_unbindUIElements:function(){this.ui&&this._uiBindings&&(n.each(this.ui,function(t,e){delete this.ui[e]},this),this.ui=this._uiBindings,delete this._uiBindings)},_buildViewTrigger:function(t){var e=n.isObject(t),i=n.defaults({},e?t:{},{preventDefault:!0,stopPropagation:!0}),r=e?i.event:t;return function(t){t&&(t.preventDefault&&i.preventDefault&&t.preventDefault(),t.stopPropagation&&i.stopPropagation&&t.stopPropagation());var e={view:this,model:this.model,collection:this.collection};this.triggerMethod(r,e)}},setElement:function(){var t=e.View.prototype.setElement.apply(this,arguments);return n.invoke(this._behaviors,"proxyViewProperties",this),t},triggerMethod:function(){var t=s._triggerMethod(this,arguments);return this._triggerEventOnBehaviors(arguments),this._triggerEventOnParentLayout(arguments[0],n.rest(arguments)),t},_triggerEventOnBehaviors:function(t){for(var e=s._triggerMethod,n=this._behaviors,i=0,r=n&&n.length;r>i;i++)e(n[i],t)},_triggerEventOnParentLayout:function(t,e){var i=this._parentLayoutView();if(i){var r=s.getOption(i,"childViewEventPrefix"),o=r+":"+t;s._triggerMethod(i,[o,this].concat(e));var a=s.getOption(i,"childEvents"),u=i.normalizeMethods(a);u&&n.isFunction(u[t])&&u[t].apply(i,[this].concat(e))}},_getImmediateChildren:function(){return[]},_getNestedViews:function(){var t=this._getImmediateChildren();return t.length?n.reduce(t,function(t,e){return e._getNestedViews?t.concat(e._getNestedViews()):t},t):t},_getAncestors:function(){for(var t=[],e=this._parent;e;)t.push(e),e=e._parent;return t},_parentLayoutView:function(){var t=this._getAncestors();return n.find(t,function(t){return t instanceof s.LayoutView})},normalizeMethods:s.normalizeMethods,mergeOptions:s.mergeOptions,getOption:s.proxyGetOption,bindEntityEvents:s.proxyBindEntityEvents,unbindEntityEvents:s.proxyUnbindEntityEvents}),s.ItemView=s.View.extend({constructor:function(){s.View.apply(this,arguments)},serializeData:function(){if(!this.model&&!this.collection)return{};var t=[this.model||this.collection];return arguments.length&&t.push.apply(t,arguments),this.model?this.serializeModel.apply(this,t):{items:this.serializeCollection.apply(this,t)}},serializeCollection:function(t){return t.toJSON.apply(t,n.rest(arguments))},render:function(){return this._ensureViewIsIntact(),this.triggerMethod("before:render",this),this._renderTemplate(),this.isRendered=!0,this.bindUIElements(),this.triggerMethod("render",this),this},_renderTemplate:function(){var t=this.getTemplate();if(t!==!1){if(!t)throw new s.Error({name:"UndefinedTemplateError",message:"Cannot render the template since it is null or undefined."});var e=this.mixinTemplateHelpers(this.serializeData()),n=s.Renderer.render(t,e,this);return this.attachElContent(n),this}},attachElContent:function(t){return this.$el.html(t),this}}),s.CollectionView=s.View.extend({childViewEventPrefix:"childview",sort:!0,constructor:function(t){this.once("render",this._initialEvents),this._initChildViewStorage(),s.View.apply(this,arguments),this.on({"before:show":this._onBeforeShowCalled,show:this._onShowCalled,"before:attach":this._onBeforeAttachCalled,attach:this._onAttachCalled}),this.initRenderBuffer()},initRenderBuffer:function(){this._bufferedChildren=[]},startBuffering:function(){this.initRenderBuffer(),this.isBuffering=!0},endBuffering:function(){var t,e=this._isShown&&s.isNodeAttached(this.el);this.isBuffering=!1,this._isShown&&this._triggerMethodMany(this._bufferedChildren,this,"before:show"),e&&this._triggerBeforeAttach&&(t=this._getNestedViews(),this._triggerMethodMany(t,this,"before:attach")),this.attachBuffer(this,this._createBuffer()),e&&this._triggerAttach&&(t=this._getNestedViews(),this._triggerMethodMany(t,this,"attach")),this._isShown&&this._triggerMethodMany(this._bufferedChildren,this,"show"),this.initRenderBuffer()},_triggerMethodMany:function(t,e,i){var r=n.drop(arguments,3);n.each(t,function(t){s.triggerMethodOn.apply(t,[t,i,t,e].concat(r))})},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"remove",this._onCollectionRemove),this.listenTo(this.collection,"reset",this.render),this.getOption("sort")&&this.listenTo(this.collection,"sort",this._sortViews))},_onCollectionAdd:function(t,e,i){var r;if(r=void 0!==i.at?i.at:n.indexOf(this._filteredSortedModels(),t),this._shouldAddChild(t,r)){this.destroyEmptyView();var s=this.getChildView(t);this.addChild(t,s,r)}},_onCollectionRemove:function(t){var e=this.children.findByModel(t);this.removeChildView(e),this.checkEmpty()},_onBeforeShowCalled:function(){this._triggerBeforeAttach=this._triggerAttach=!1,this.children.each(function(t){s.triggerMethodOn(t,"before:show",t)})},_onShowCalled:function(){this.children.each(function(t){s.triggerMethodOn(t,"show",t)})},_onBeforeAttachCalled:function(){this._triggerBeforeAttach=!0},_onAttachCalled:function(){this._triggerAttach=!0},render:function(){return this._ensureViewIsIntact(),this.triggerMethod("before:render",this),this._renderChildren(),this.isRendered=!0,this.triggerMethod("render",this),this},reorder:function(){var t=this.children,e=this._filteredSortedModels(),i=n.find(e,function(e){return!t.findByModel(e)});if(i)this.render();else{var r=n.map(e,function(e,n){var i=t.findByModel(e);return i._index=n,i.el});this.triggerMethod("before:reorder"),this._appendReorderedChildren(r),this.triggerMethod("reorder")}},resortView:function(){s.getOption(this,"reorderOnSort")?this.reorder():this.render()},_sortViews:function(){var t=this._filteredSortedModels(),e=n.find(t,function(t,e){var n=this.children.findByModel(t);return!n||n._index!==e},this);e&&this.resortView()},_emptyViewIndex:-1,_appendReorderedChildren:function(t){this.$el.append(t)},_renderChildren:function(){this.destroyEmptyView(),this.destroyChildren({checkEmpty:!1}),this.isEmpty(this.collection)?this.showEmptyView():(this.triggerMethod("before:render:collection",this),this.startBuffering(),this.showCollection(),this.endBuffering(),this.triggerMethod("render:collection",this),this.children.isEmpty()&&this.showEmptyView())},showCollection:function(){var t,e=this._filteredSortedModels();n.each(e,function(e,n){t=this.getChildView(e),this.addChild(e,t,n)},this)},_filteredSortedModels:function(){var t,e=this.getViewComparator();return t=e?n.isString(e)||1===e.length?this.collection.sortBy(e,this):n.clone(this.collection.models).sort(n.bind(e,this)):this.collection.models,this.getOption("filter")&&(t=n.filter(t,function(t,e){return this._shouldAddChild(t,e)},this)),t},showEmptyView:function(){var t=this.getEmptyView();if(t&&!this._showingEmptyView){this.triggerMethod("before:render:empty"),this._showingEmptyView=!0;var n=new e.Model;this.addEmptyView(n,t),this.triggerMethod("render:empty")}},destroyEmptyView:function(){this._showingEmptyView&&(this.triggerMethod("before:remove:empty"),this.destroyChildren(),delete this._showingEmptyView,this.triggerMethod("remove:empty"))},getEmptyView:function(){return this.getOption("emptyView")},addEmptyView:function(t,e){var i,r=this._isShown&&!this.isBuffering&&s.isNodeAttached(this.el),o=this.getOption("emptyViewOptions")||this.getOption("childViewOptions");n.isFunction(o)&&(o=o.call(this,t,this._emptyViewIndex));var a=this.buildChildView(t,e,o);a._parent=this,this.proxyChildEvents(a),this._isShown&&s.triggerMethodOn(a,"before:show",a),this.children.add(a),r&&this._triggerBeforeAttach&&(i=[a].concat(a._getNestedViews()),a.once("render",function(){this._triggerMethodMany(i,this,"before:attach")},this)),this.renderChildView(a,this._emptyViewIndex),r&&this._triggerAttach&&(i=[a].concat(a._getNestedViews()),this._triggerMethodMany(i,this,"attach")),this._isShown&&s.triggerMethodOn(a,"show",a)},getChildView:function(t){var e=this.getOption("childView");if(!e)throw new s.Error({name:"NoChildViewError",message:'A "childView" must be specified'});return e},addChild:function(t,e,n){var i=this.getOption("childViewOptions");
  
  i=s._getValue(i,this,[t,n]);var r=this.buildChildView(t,e,i);return this._updateIndices(r,!0,n),this.triggerMethod("before:add:child",r),this._addChildView(r,n),this.triggerMethod("add:child",r),r._parent=this,r},_updateIndices:function(t,e,n){this.getOption("sort")&&(e&&(t._index=n),this.children.each(function(n){n._index>=t._index&&(n._index+=e?1:-1)}))},_addChildView:function(t,e){var n,i=this._isShown&&!this.isBuffering&&s.isNodeAttached(this.el);this.proxyChildEvents(t),this._isShown&&!this.isBuffering&&s.triggerMethodOn(t,"before:show",t),this.children.add(t),i&&this._triggerBeforeAttach&&(n=[t].concat(t._getNestedViews()),t.once("render",function(){this._triggerMethodMany(n,this,"before:attach")},this)),this.renderChildView(t,e),i&&this._triggerAttach&&(n=[t].concat(t._getNestedViews()),this._triggerMethodMany(n,this,"attach")),this._isShown&&!this.isBuffering&&s.triggerMethodOn(t,"show",t)},renderChildView:function(t,e){return t.render(),this.attachHtml(this,t,e),t},buildChildView:function(t,e,i){var r=n.extend({model:t},i);return new e(r)},removeChildView:function(t){return t&&(this.triggerMethod("before:remove:child",t),t.destroy?t.destroy():t.remove&&t.remove(),delete t._parent,this.stopListening(t),this.children.remove(t),this.triggerMethod("remove:child",t),this._updateIndices(t,!1)),t},isEmpty:function(){return!this.collection||0===this.collection.length},checkEmpty:function(){this.isEmpty(this.collection)&&this.showEmptyView()},attachBuffer:function(t,e){t.$el.append(e)},_createBuffer:function(){var t=document.createDocumentFragment();return n.each(this._bufferedChildren,function(e){t.appendChild(e.el)}),t},attachHtml:function(t,e,n){t.isBuffering?t._bufferedChildren.splice(n,0,e):t._insertBefore(e,n)||t._insertAfter(e)},_insertBefore:function(t,e){var n,i=this.getOption("sort")&&e<this.children.length-1;return i&&(n=this.children.find(function(t){return t._index===e+1})),n?(n.$el.before(t.el),!0):!1},_insertAfter:function(t){this.$el.append(t.el)},_initChildViewStorage:function(){this.children=new e.ChildViewContainer},destroy:function(){return this.isDestroyed?this:(this.triggerMethod("before:destroy:collection"),this.destroyChildren({checkEmpty:!1}),this.triggerMethod("destroy:collection"),s.View.prototype.destroy.apply(this,arguments))},destroyChildren:function(t){var e=t||{},i=!0,r=this.children.map(n.identity);return n.isUndefined(e.checkEmpty)||(i=e.checkEmpty),this.children.each(this.removeChildView,this),i&&this.checkEmpty(),r},_shouldAddChild:function(t,e){var i=this.getOption("filter");return!n.isFunction(i)||i.call(this,t,e,this.collection)},proxyChildEvents:function(t){var e=this.getOption("childViewEventPrefix");this.listenTo(t,"all",function(){var i=n.toArray(arguments),r=i[0],s=this.normalizeMethods(n.result(this,"childEvents"));i[0]=e+":"+r,i.splice(1,0,t),"undefined"!=typeof s&&n.isFunction(s[r])&&s[r].apply(this,i.slice(1)),this.triggerMethod.apply(this,i)})},_getImmediateChildren:function(){return n.values(this.children._views)},getViewComparator:function(){return this.getOption("viewComparator")}}),s.CompositeView=s.CollectionView.extend({constructor:function(){s.CollectionView.apply(this,arguments)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"remove",this._onCollectionRemove),this.listenTo(this.collection,"reset",this._renderChildren),this.getOption("sort")&&this.listenTo(this.collection,"sort",this._sortViews))},getChildView:function(t){var e=this.getOption("childView")||this.constructor;return e},serializeData:function(){var t={};return this.model&&(t=n.partial(this.serializeModel,this.model).apply(this,arguments)),t},render:function(){return this._ensureViewIsIntact(),this._isRendering=!0,this.resetChildViewContainer(),this.triggerMethod("before:render",this),this._renderTemplate(),this._renderChildren(),this._isRendering=!1,this.isRendered=!0,this.triggerMethod("render",this),this},_renderChildren:function(){(this.isRendered||this._isRendering)&&s.CollectionView.prototype._renderChildren.call(this)},_renderTemplate:function(){var t={};t=this.serializeData(),t=this.mixinTemplateHelpers(t),this.triggerMethod("before:render:template");var e=this.getTemplate(),n=s.Renderer.render(e,t,this);this.attachElContent(n),this.bindUIElements(),this.triggerMethod("render:template")},attachElContent:function(t){return this.$el.html(t),this},attachBuffer:function(t,e){var n=this.getChildViewContainer(t);n.append(e)},_insertAfter:function(t){var e=this.getChildViewContainer(this,t);e.append(t.el)},_appendReorderedChildren:function(t){var e=this.getChildViewContainer(this);e.append(t)},getChildViewContainer:function(t,e){if(t.$childViewContainer)return t.$childViewContainer;var n,i=s.getOption(t,"childViewContainer");if(i){var r=s._getValue(i,t);if(n="@"===r.charAt(0)&&t.ui?t.ui[r.substr(4)]:t.$(r),n.length<=0)throw new s.Error({name:"ChildViewContainerMissingError",message:'The specified "childViewContainer" was not found: '+t.childViewContainer})}else n=t.$el;return t.$childViewContainer=n,n},resetChildViewContainer:function(){this.$childViewContainer&&(this.$childViewContainer=void 0)}}),s.LayoutView=s.ItemView.extend({regionClass:s.Region,options:{destroyImmediate:!1},childViewEventPrefix:"childview",constructor:function(t){t=t||{},this._firstRender=!0,this._initializeRegions(t),s.ItemView.call(this,t)},render:function(){return this._ensureViewIsIntact(),this._firstRender?this._firstRender=!1:this._reInitializeRegions(),s.ItemView.prototype.render.apply(this,arguments)},destroy:function(){return this.isDestroyed?this:(this.getOption("destroyImmediate")===!0&&this.$el.remove(),this.regionManager.destroy(),s.ItemView.prototype.destroy.apply(this,arguments))},showChildView:function(t,e){return this.getRegion(t).show(e)},getChildView:function(t){return this.getRegion(t).currentView},addRegion:function(t,e){var n={};return n[t]=e,this._buildRegions(n)[t]},addRegions:function(t){return this.regions=n.extend({},this.regions,t),this._buildRegions(t)},removeRegion:function(t){return delete this.regions[t],this.regionManager.removeRegion(t)},getRegion:function(t){return this.regionManager.get(t)},getRegions:function(){return this.regionManager.getRegions()},_buildRegions:function(t){var e={regionClass:this.getOption("regionClass"),parentEl:n.partial(n.result,this,"el")};return this.regionManager.addRegions(t,e)},_initializeRegions:function(t){var e;this._initRegionManager(),e=s._getValue(this.regions,this,[t])||{};var i=this.getOption.call(t,"regions");i=s._getValue(i,this,[t]),n.extend(e,i),e=this.normalizeUIValues(e,["selector","el"]),this.addRegions(e)},_reInitializeRegions:function(){this.regionManager.invoke("reset")},getRegionManager:function(){return new s.RegionManager},_initRegionManager:function(){this.regionManager=this.getRegionManager(),this.regionManager._parent=this,this.listenTo(this.regionManager,"before:add:region",function(t){this.triggerMethod("before:add:region",t)}),this.listenTo(this.regionManager,"add:region",function(t,e){this[t]=e,this.triggerMethod("add:region",t,e)}),this.listenTo(this.regionManager,"before:remove:region",function(t){this.triggerMethod("before:remove:region",t)}),this.listenTo(this.regionManager,"remove:region",function(t,e){delete this[t],this.triggerMethod("remove:region",t,e)})},_getImmediateChildren:function(){return n.chain(this.regionManager.getRegions()).pluck("currentView").compact().value()}}),s.Behavior=s.Object.extend({constructor:function(t,e){this.view=e,this.defaults=n.result(this,"defaults")||{},this.options=n.extend({},this.defaults,t),this.ui=n.extend({},n.result(e,"ui"),n.result(this,"ui")),s.Object.apply(this,arguments)},$:function(){return this.view.$.apply(this.view,arguments)},destroy:function(){return this.stopListening(),this},proxyViewProperties:function(t){this.$el=t.$el,this.el=t.el}}),s.Behaviors=function(t,e){function n(t,i){return e.isObject(t.behaviors)?(i=n.parseBehaviors(t,i||e.result(t,"behaviors")),n.wrap(t,i,e.keys(o)),i):{}}function i(t,e){this._view=t,this._behaviors=e,this._triggers={}}function r(t){return t._uiBindings||t.ui}var s=/^(\S+)\s*(.*)$/,o={behaviorTriggers:function(t,e){var n=new i(this,e);return n.buildBehaviorTriggers()},behaviorEvents:function(n,i){var o={};return e.each(i,function(n,i){var a={},u=e.clone(e.result(n,"events"))||{};u=t.normalizeUIKeys(u,r(n));var l=0;e.each(u,function(t,r){var o=r.match(s),u=o[1]+"."+[this.cid,i,l++," "].join(""),h=o[2],c=u+h,d=e.isFunction(t)?t:n[t];a[c]=e.bind(d,n)},this),o=e.extend(o,a)},this),o}};return e.extend(n,{behaviorsLookup:function(){throw new t.Error({message:"You must define where your behaviors are stored.",url:"marionette.behaviors.html#behaviorslookup"})},getBehaviorClass:function(e,i){return e.behaviorClass?e.behaviorClass:t._getValue(n.behaviorsLookup,this,[e,i])[i]},parseBehaviors:function(t,i){return e.chain(i).map(function(i,r){var s=n.getBehaviorClass(i,r),o=new s(i,t),a=n.parseBehaviors(t,e.result(o,"behaviors"));return[o].concat(a)}).flatten().value()},wrap:function(t,n,i){e.each(i,function(i){t[i]=e.partial(o[i],t[i],n)})}}),e.extend(i.prototype,{buildBehaviorTriggers:function(){return e.each(this._behaviors,this._buildTriggerHandlersForBehavior,this),this._triggers},_buildTriggerHandlersForBehavior:function(n,i){var s=e.clone(e.result(n,"triggers"))||{};s=t.normalizeUIKeys(s,r(n)),e.each(s,e.bind(this._setHandlerForBehavior,this,n,i))},_setHandlerForBehavior:function(t,e,n,i){var r=i.replace(/^\S+/,function(t){return t+".behaviortriggers"+e});this._triggers[r]=this._view._buildViewTrigger(n)}}),n}(s,n),s.AppRouter=e.Router.extend({constructor:function(t){this.options=t||{},e.Router.apply(this,arguments);var n=this.getOption("appRoutes"),i=this._getController();this.processAppRoutes(i,n),this.on("route",this._processOnRoute,this)},appRoute:function(t,e){var n=this._getController();this._addAppRoute(n,t,e)},_processOnRoute:function(t,e){if(n.isFunction(this.onRoute)){var i=n.invert(this.getOption("appRoutes"))[t];this.onRoute(t,i,e)}},processAppRoutes:function(t,e){if(e){var i=n.keys(e).reverse();n.each(i,function(n){this._addAppRoute(t,n,e[n])},this)}},_getController:function(){return this.getOption("controller")},_addAppRoute:function(t,e,i){var r=t[i];if(!r)throw new s.Error('Method "'+i+'" was not found on the controller');this.route(e,i,n.bind(r,t))},mergeOptions:s.mergeOptions,getOption:s.proxyGetOption,triggerMethod:s.triggerMethod,bindEntityEvents:s.proxyBindEntityEvents,unbindEntityEvents:s.proxyUnbindEntityEvents}),s.Application=s.Object.extend({constructor:function(t){this._initializeRegions(t),this._initCallbacks=new s.Callbacks,this.submodules={},n.extend(this,t),this._initChannel(),s.Object.call(this,t)},execute:function(){this.commands.execute.apply(this.commands,arguments)},request:function(){return this.reqres.request.apply(this.reqres,arguments)},addInitializer:function(t){this._initCallbacks.add(t)},start:function(t){this.triggerMethod("before:start",t),this._initCallbacks.run(t,this),this.triggerMethod("start",t)},addRegions:function(t){return this._regionManager.addRegions(t)},emptyRegions:function(){return this._regionManager.emptyRegions()},removeRegion:function(t){return this._regionManager.removeRegion(t)},getRegion:function(t){return this._regionManager.get(t)},getRegions:function(){return this._regionManager.getRegions()},module:function(t,e){var i=s.Module.getClass(e),r=n.toArray(arguments);return r.unshift(this),i.create.apply(i,r)},getRegionManager:function(){return new s.RegionManager},_initializeRegions:function(t){var e=n.isFunction(this.regions)?this.regions(t):this.regions||{};this._initRegionManager();var i=s.getOption(t,"regions");return n.isFunction(i)&&(i=i.call(this,t)),n.extend(e,i),this.addRegions(e),this},_initRegionManager:function(){this._regionManager=this.getRegionManager(),this._regionManager._parent=this,this.listenTo(this._regionManager,"before:add:region",function(){s._triggerMethod(this,"before:add:region",arguments)}),this.listenTo(this._regionManager,"add:region",function(t,e){this[t]=e,s._triggerMethod(this,"add:region",arguments)}),this.listenTo(this._regionManager,"before:remove:region",function(){s._triggerMethod(this,"before:remove:region",arguments)}),this.listenTo(this._regionManager,"remove:region",function(t){delete this[t],s._triggerMethod(this,"remove:region",arguments)})},_initChannel:function(){this.channelName=n.result(this,"channelName")||"global",this.channel=n.result(this,"channel")||e.Wreqr.radio.channel(this.channelName),this.vent=n.result(this,"vent")||this.channel.vent,this.commands=n.result(this,"commands")||this.channel.commands,this.reqres=n.result(this,"reqres")||this.channel.reqres}}),s.Module=function(t,e,i){this.moduleName=t,this.options=n.extend({},this.options,i),this.initialize=i.initialize||this.initialize,this.submodules={},this._setupInitializersAndFinalizers(),this.app=e,n.isFunction(this.initialize)&&this.initialize(t,e,this.options)},s.Module.extend=s.extend,n.extend(s.Module.prototype,e.Events,{startWithParent:!0,initialize:function(){},addInitializer:function(t){this._initializerCallbacks.add(t)},addFinalizer:function(t){this._finalizerCallbacks.add(t)},start:function(t){this._isInitialized||(n.each(this.submodules,function(e){e.startWithParent&&e.start(t)}),this.triggerMethod("before:start",t),this._initializerCallbacks.run(t,this),this._isInitialized=!0,this.triggerMethod("start",t))},stop:function(){this._isInitialized&&(this._isInitialized=!1,this.triggerMethod("before:stop"),n.invoke(this.submodules,"stop"),this._finalizerCallbacks.run(void 0,this),this._initializerCallbacks.reset(),this._finalizerCallbacks.reset(),this.triggerMethod("stop"))},addDefinition:function(t,e){this._runModuleDefinition(t,e)},_runModuleDefinition:function(t,i){if(t){var r=n.flatten([this,this.app,e,s,e.$,n,i]);t.apply(this,r)}},_setupInitializersAndFinalizers:function(){this._initializerCallbacks=new s.Callbacks,this._finalizerCallbacks=new s.Callbacks},triggerMethod:s.triggerMethod}),n.extend(s.Module,{create:function(t,e,i){var r=t,s=n.drop(arguments,3);e=e.split(".");var o=e.length,a=[];return a[o-1]=i,n.each(e,function(e,n){var o=r;r=this._getModule(o,e,t,i),this._addModuleDefinition(o,r,a[n],s)},this),r},_getModule:function(t,e,i,r,s){var o=n.extend({},r),a=this.getClass(r),u=t[e];return u||(u=new a(e,i,o),t[e]=u,t.submodules[e]=u),u},getClass:function(t){var e=s.Module;return t?t.prototype instanceof e?t:t.moduleClass||e:e},_addModuleDefinition:function(t,e,n,i){var r=this._getDefine(n),s=this._getStartWithParent(n,e);r&&e.addDefinition(r,i),this._addStartWithParent(t,e,s)},_getStartWithParent:function(t,e){var i;return n.isFunction(t)&&t.prototype instanceof s.Module?(i=e.constructor.prototype.startWithParent,n.isUndefined(i)?!0:i):n.isObject(t)?(i=t.startWithParent,n.isUndefined(i)?!0:i):!0},_getDefine:function(t){return!n.isFunction(t)||t.prototype instanceof s.Module?n.isObject(t)?t.define:null:t},_addStartWithParent:function(t,e,n){e.startWithParent=e.startWithParent&&n,e.startWithParent&&!e.startWithParentIsConfigured&&(e.startWithParentIsConfigured=!0,t.addInitializer(function(t){e.startWithParent&&e.start(t)}))}}),s})},function(t,e,n){var i,r;(function(s){!function(o){var a="object"==typeof self&&self.self==self&&self||"object"==typeof s&&s.global==s&&s;i=[n(7),n(2),e],r=function(t,e,n){a.Backbone=o(a,n,t,e)}.apply(e,i),!(void 0!==r&&(t.exports=r))}(function(t,e,n,i){var r=t.Backbone,s=[].slice;e.VERSION="1.2.1",e.$=i,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var o=function(t,e,i){switch(t){case 1:return function(){return n[e](this[i])};case 2:return function(t){return n[e](this[i],t)};case 3:return function(t,r){return n[e](this[i],t,r)};case 4:return function(t,r,s){return n[e](this[i],t,r,s)};default:return function(){var t=s.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=o(e,r,i))})},u=e.Events={},l=/\s+/,h=function(t,e,i,r,s){var o,a=0;if(i&&"object"==typeof i){void 0!==r&&"context"in s&&void 0===s.context&&(s.context=r);for(o=n.keys(i);a<o.length;a++)e=t(e,o[a],i[o[a]],s)}else if(i&&l.test(i))for(o=i.split(l);a<o.length;a++)e=t(e,o[a],r,s);else e=t(e,i,r,s);return e};u.on=function(t,e,n){return c(this,t,e,n)};var c=function(t,e,n,i,r){if(t._events=h(d,t._events||{},e,n,{context:i,ctx:t,listening:r}),r){var s=t._listeners||(t._listeners={});s[r.id]=r}return t};u.listenTo=function(t,e,i){if(!t)return this;var r=t._listenId||(t._listenId=n.uniqueId("l")),s=this._listeningTo||(this._listeningTo={}),o=s[r];if(!o){var a=this._listenId||(this._listenId=n.uniqueId("l"));o=s[r]={obj:t,objId:r,id:a,listeningTo:s,count:0}}return c(t,e,i,this,o),this};var d=function(t,e,n,i){if(n){var r=t[e]||(t[e]=[]),s=i.context,o=i.ctx,a=i.listening;a&&a.count++,r.push({callback:n,context:s,ctx:s||o,listening:a})}return t};u.off=function(t,e,n){return this._events?(this._events=h(f,this._events,t,e,{context:n,listeners:this._listeners}),this):this},u.stopListening=function(t,e,i){var r=this._listeningTo;if(!r)return this;for(var s=t?[t._listenId]:n.keys(r),o=0;o<s.length;o++){var a=r[s[o]];if(!a)break;a.obj.off(e,i,this)}return n.isEmpty(r)&&(this._listeningTo=void 0),this};var f=function(t,e,i,r){if(t){var s,o=0,a=r.context,u=r.listeners;if(e||i||a){for(var l=e?[e]:n.keys(t);o<l.length;o++){e=l[o];var h=t[e];if(!h)break;for(var c=[],d=0;d<h.length;d++){var f=h[d];i&&i!==f.callback&&i!==f.callback._callback||a&&a!==f.context?c.push(f):(s=f.listening,s&&0===--s.count&&(delete u[s.id],delete s.listeningTo[s.objId]))}c.length?t[e]=c:delete t[e]}return n.size(t)?t:void 0}for(var p=n.keys(u);o<p.length;o++)s=u[p[o]],delete u[s.id],delete s.listeningTo[s.objId]}};u.once=function(t,e,i){var r=h(p,{},t,e,n.bind(this.off,this));return this.on(r,void 0,i)},u.listenToOnce=function(t,e,i){var r=h(p,{},e,i,n.bind(this.stopListening,this,t));return this.listenTo(t,r)};var p=function(t,e,i,r){if(i){var s=t[e]=n.once(function(){r(e,s),i.apply(this,arguments)});s._callback=i}return t};u.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),i=0;e>i;i++)n[i]=arguments[i+1];return h(g,this._events,t,void 0,n),this};var g=function(t,e,n,i){if(t){var r=t[e],s=t.all;r&&s&&(s=s.slice()),r&&v(r,i),s&&v(s,[e].concat(i))}return t},v=function(t,e){var n,i=-1,r=t.length,s=e[0],o=e[1],a=e[2];switch(e.length){case 0:for(;++i<r;)(n=t[i]).callback.call(n.ctx);return;case 1:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s);return;case 2:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s,o);return;case 3:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s,o,a);return;default:for(;++i<r;)(n=t[i]).callback.apply(n.ctx,e);return}};u.bind=u.on,u.unbind=u.off,n.extend(e,u);var m=e.Model=function(t,e){var i=t||{};e||(e={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(i=this.parse(i,e)||{}),i=n.defaults({},i,n.result(this,"defaults")),this.set(i,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(m.prototype,u,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!n.iteratee(t,this)(this.attributes)},set:function(t,e,i){if(null==t)return this;var r;if("object"==typeof t?(r=t,i=e):(r={})[t]=e,i||(i={}),!this._validate(r,i))return!1;var s=i.unset,o=i.silent,a=[],u=this._changing;this._changing=!0,u||(this._previousAttributes=n.clone(this.attributes),this.changed={});var l=this.attributes,h=this.changed,c=this._previousAttributes;this.idAttribute in r&&(this.id=r[this.idAttribute]);for(var d in r)e=r[d],n.isEqual(l[d],e)||a.push(d),n.isEqual(c[d],e)?delete h[d]:h[d]=e,s?delete l[d]:l[d]=e;if(!o){a.length&&(this._pending=i);for(var f=0;f<a.length;f++)this.trigger("change:"+a[f],this,l[a[f]],i)}if(u)return this;if(!o)for(;this._pending;)i=this._pending,this._pending=!1,this.trigger("change",this,i);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var i in this.attributes)e[i]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?n.clone(this.changed):!1;var e=this._changing?this._previousAttributes:this.attributes,i={};for(var r in t){var s=t[r];n.isEqual(e[r],s)||(i[r]=s)}return n.size(i)?i:!1},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=n.extend({parse:!0},t);var e=this,i=t.success;return t.success=function(n){var r=t.parse?e.parse(n,t):n;return e.set(r,t)?(i&&i.call(t.context,e,n,t),void e.trigger("sync",e,n,t)):!1},V(this,t),this.sync("read",this,t)},save:function(t,e,i){var r;null==t||"object"==typeof t?(r=t,i=e):(r={})[t]=e,i=n.extend({validate:!0,parse:!0},i);var s=i.wait;if(r&&!s){if(!this.set(r,i))return!1}else if(!this._validate(r,i))return!1;var o=this,a=i.success,u=this.attributes;i.success=function(t){o.attributes=u;var e=i.parse?o.parse(t,i):t;return s&&(e=n.extend({},r,e)),e&&!o.set(e,i)?!1:(a&&a.call(i.context,o,t,i),void o.trigger("sync",o,t,i))},V(this,i),r&&s&&(this.attributes=n.extend({},u,r));var l=this.isNew()?"create":i.patch?"patch":"update";"patch"!==l||i.attrs||(i.attrs=r);var h=this.sync(l,this,i);return this.attributes=u,h},destroy:function(t){t=t?n.clone(t):{};var e=this,i=t.success,r=t.wait,s=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(n){r&&s(),i&&i.call(t.context,e,n,t),e.isNew()||e.trigger("sync",e,n,t)};var o=!1;return this.isNew()?n.defer(t.success):(V(this,t),o=this.sync("delete",this,t)),r||s(),o},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||N();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.defaults({validate:!0},t))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var i=this.validationError=this.validate(t,e)||null;return i?(this.trigger("invalid",this,i,n.extend(e,{validationError:i})),!1):!0}});var _={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};a(m,_,"attributes");var y=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,n.extend({silent:!0},e))},w={add:!0,remove:!0,merge:!0},b={add:!0,remove:!1};n.extend(y.prototype,u,{model:m,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,n.extend({merge:!1},e,b))},remove:function(t,e){e=n.extend({},e);var i=!n.isArray(t);t=i?[t]:n.clone(t);var r=this._removeModels(t,e);return!e.silent&&r&&this.trigger("update",this,e),i?r[0]:r},set:function(t,e){e=n.defaults({},e,w),e.parse&&!this._isModel(t)&&(t=this.parse(t,e));var i=!n.isArray(t);t=i?t?[t]:[]:t.slice();var r,s,o,a,u,l=e.at;null!=l&&(l=+l),0>l&&(l+=this.length+1);for(var h=this.comparator&&null==l&&e.sort!==!1,c=n.isString(this.comparator)?this.comparator:null,d=[],f=[],p={},g=e.add,v=e.merge,m=e.remove,_=!h&&g&&m?[]:!1,y=!1,b=0;b<t.length;b++){if(o=t[b],a=this.get(o))m&&(p[a.cid]=!0),v&&o!==a&&(o=this._isModel(o)?o.attributes:o,e.parse&&(o=a.parse(o,e)),a.set(o,e),h&&!u&&a.hasChanged(c)&&(u=!0)),t[b]=a;else if(g){if(s=t[b]=this._prepareModel(o,e),!s)continue;d.push(s),this._addReference(s,e)}s=a||s,s&&(r=this.modelId(s.attributes),!_||!s.isNew()&&p[r]||(_.push(s),y=y||!this.models[b]||s.cid!==this.models[b].cid),p[r]=!0)}if(m){for(var b=0;b<this.length;b++)p[(s=this.models[b]).cid]||f.push(s);f.length&&this._removeModels(f,e)}if(d.length||y)if(h&&(u=!0),this.length+=d.length,null!=l)for(var b=0;b<d.length;b++)this.models.splice(l+b,0,d[b]);else{_&&(this.models.length=0);for(var x=_||d,b=0;b<x.length;b++)this.models.push(x[b])}if(u&&this.sort({silent:!0}),!e.silent){for(var E=null!=l?n.clone(e):e,b=0;b<d.length;b++)null!=l&&(E.index=l+b),(s=d[b]).trigger("add",s,this,E);(u||y)&&this.trigger("sort",this,e),(d.length||f.length)&&this.trigger("update",this,e)}return i?t[0]:t},reset:function(t,e){e=e?n.clone(e):{};for(var i=0;i<this.models.length;i++)this._removeReference(this.models[i],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return s.apply(this.models,arguments)},get:function(t){if(null==t)return void 0;var e=this.modelId(this._isModel(t)?t.attributes:t);return this._byId[t]||this._byId[e]||this._byId[t.cid]},at:function(t){return 0>t&&(t+=this.length),this.models[t]},where:function(t,e){var i=n.matches(t);return this[e?"find":"filter"](function(t){return i(t.attributes)})},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={}),n.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return n.invoke(this.models,"get",t)},fetch:function(t){t=n.extend({parse:!0},t);var e=t.success,i=this;return t.success=function(n){var r=t.reset?"reset":"set";i[r](n,t),e&&e.call(t.context,i,n,t),i.trigger("sync",i,n,t)},V(this,t),this.sync("read",this,t)},create:function(t,e){e=e?n.clone(e):{};var i=e.wait;if(t=this._prepareModel(t,e),!t)return!1;i||this.add(t,e);var r=this,s=e.success;return e.success=function(t,e,n){i&&r.add(t,n),s&&s.call(n.context,t,e,n)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;e=e?n.clone(e):{},e.collection=this;var i=new this.model(t,e);return i.validationError?(this.trigger("invalid",this,i.validationError,e),!1):i},_removeModels:function(t,e){for(var n=[],i=0;i<t.length;i++){var r=this.get(t[i]);if(r){var s=this.indexOf(r);this.models.splice(s,1),this.length--,e.silent||(e.index=s,r.trigger("remove",r,this,e)),n.push(r),this._removeReference(r,e)}}return n.length?n:!1},_isModel:function(t){return t instanceof m},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,i){if("add"!==t&&"remove"!==t||n===this){if("destroy"===t&&this.remove(e,i),"change"===t){var r=this.modelId(e.previousAttributes()),s=this.modelId(e.attributes);r!==s&&(null!=r&&delete this._byId[r],null!=s&&(this._byId[s]=e))}this.trigger.apply(this,arguments)}}});var x={forEach:3,each:3,map:3,collect:3,reduce:4,foldl:4,inject:4,reduceRight:4,foldr:4,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:2,contains:2,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3};a(y,x,"models");var E=["groupBy","countBy","sortBy","indexBy"];n.each(E,function(t){n[t]&&(y.prototype[t]=function(e,i){var r=n.isFunction(e)?e:function(t){return t.get(e)};return n[t](this.models,r,i)})});var M=e.View=function(t){this.cid=n.uniqueId("view"),n.extend(this,n.pick(t,C)),this._ensureElement(),this.initialize.apply(this,arguments)},O=/^(\S+)\s*(.*)$/,C=["model","collection","el","id","attributes","className","tagName","events"];n.extend(M.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=n.result(this,"events")),!t)return this;this.undelegateEvents();for(var e in t){var i=t[e];if(n.isFunction(i)||(i=this[i]),i){var r=e.match(O);this.delegate(r[1],r[2],n.bind(i,this))}}return this},delegate:function(t,e,n){return this.$el.on(t+".delegateEvents"+this.cid,e,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,n){return this.$el.off(t+".delegateEvents"+this.cid,e,n),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var t=n.extend({},n.result(this,"attributes"));this.id&&(t.id=n.result(this,"id")),this.className&&(t["class"]=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),e.sync=function(t,i,r){var s=T[t];n.defaults(r||(r={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var o={type:s,dataType:"json"};if(r.url||(o.url=n.result(i,"url")||N()),null!=r.data||!i||"create"!==t&&"update"!==t&&"patch"!==t||(o.contentType="application/json",o.data=JSON.stringify(r.attrs||i.toJSON(r))),r.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{}),r.emulateHTTP&&("PUT"===s||"DELETE"===s||"PATCH"===s)){o.type="POST",r.emulateJSON&&(o.data._method=s);var a=r.beforeSend;r.beforeSend=function(t){return t.setRequestHeader("X-HTTP-Method-Override",s),a?a.apply(this,arguments):void 0}}"GET"===o.type||r.emulateJSON||(o.processData=!1);var u=r.error;r.error=function(t,e,n){r.textStatus=e,r.errorThrown=n,u&&u.call(r.context,t,e,n)};var l=r.xhr=e.ajax(n.extend(o,r));return i.trigger("request",i,l,r),l};var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var S=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},I=/\((.*?)\)/g,k=/(\(\?)?:\w+/g,A=/\*\w+/g,P=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(S.prototype,u,{initialize:function(){},route:function(t,i,r){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(i)&&(r=i,i=""),r||(r=this[i]);var s=this;return e.history.route(t,function(n){var o=s._extractParameters(t,n);s.execute(r,o,i)!==!1&&(s.trigger.apply(s,["route:"+i].concat(o)),s.trigger("route",i,o),e.history.trigger("route",s,i,o))}),this},execute:function(t,e,n){t&&t.apply(this,e)},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");
  
  for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(P,"\\$&").replace(I,"(?:$1)?").replace(k,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return n.map(i,function(t,e){return e===i.length-1?t||null:t?decodeURIComponent(t):null})}});var R=e.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},H=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,L=/#.*$/;R.started=!1,n.extend(R.prototype,u,{interval:50,atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:function(){var t=this.decodeFragment(this.location.pathname),e=t.slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(H,"")},start:function(t){if(R.started)throw new Error("Backbone.history has already been started");if(R.started=!0,this.options=n.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window,this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(D,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var i=document.body,r=i.insertBefore(this.iframe,i.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};return this._usePushState?s("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?s("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.options.silent?void 0:this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),R.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment?!1:(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return this.matchRoot()?(t=this.fragment=this.getFragment(t),n.any(this.handlers,function(e){return e.route.test(t)?(e.callback(t),!0):void 0})):!1},navigate:function(t,e){if(!R.started)return!1;e&&e!==!0||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;(""===t||"?"===t.charAt(0))&&(n=n.slice(0,-1)||"/");var i=n+t;if(t=this.decodeFragment(t.replace(L,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var i=t.href.replace(/(javascript:|#).*$/,"");t.replace(i+"#"+e)}else t.hash="#"+e}}),e.history=new R;var F=function(t,e){var i,r=this;i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e);var s=function(){this.constructor=i};return s.prototype=r.prototype,i.prototype=new s,t&&n.extend(i.prototype,t),i.__super__=r.prototype,i};m.extend=y.extend=S.extend=M.extend=R.extend=F;var N=function(){throw new Error('A "url" property or function must be specified')},V=function(t,e){var n=e.error;e.error=function(i){n&&n.call(e.context,t,i,e),t.trigger("error",t,i,e)}};return e})}).call(e,function(){return this}())},function(t,e,n){var i,r;!function(s,o){i=[n(11),n(7)],r=function(t,e){return o(t,e)}.apply(e,i),!(void 0!==r&&(t.exports=r))}(this,function(t,e){"use strict";var n=t.Wreqr,i=t.Wreqr={};return t.Wreqr.VERSION="1.3.3",t.Wreqr.noConflict=function(){return t.Wreqr=n,this},i.Handlers=function(t,e){var n=function(t){this.options=t,this._wreqrHandlers={},e.isFunction(this.initialize)&&this.initialize(t)};return n.extend=t.Model.extend,e.extend(n.prototype,t.Events,{setHandlers:function(t){e.each(t,function(t,n){var i=null;e.isObject(t)&&!e.isFunction(t)&&(i=t.context,t=t.callback),this.setHandler(n,t,i)},this)},setHandler:function(t,e,n){var i={callback:e,context:n};this._wreqrHandlers[t]=i,this.trigger("handler:add",t,e,n)},hasHandler:function(t){return!!this._wreqrHandlers[t]},getHandler:function(t){var e=this._wreqrHandlers[t];if(e)return function(){return e.callback.apply(e.context,arguments)}},removeHandler:function(t){delete this._wreqrHandlers[t]},removeAllHandlers:function(){this._wreqrHandlers={}}}),n}(t,e),i.CommandStorage=function(){var n=function(t){this.options=t,this._commands={},e.isFunction(this.initialize)&&this.initialize(t)};return e.extend(n.prototype,t.Events,{getCommands:function(t){var e=this._commands[t];return e||(e={command:t,instances:[]},this._commands[t]=e),e},addCommand:function(t,e){var n=this.getCommands(t);n.instances.push(e)},clearCommands:function(t){var e=this.getCommands(t);e.instances=[]}}),n}(),i.Commands=function(t,e){return t.Handlers.extend({storageType:t.CommandStorage,constructor:function(e){this.options=e||{},this._initializeStorage(this.options),this.on("handler:add",this._executeCommands,this),t.Handlers.prototype.constructor.apply(this,arguments)},execute:function(t){t=arguments[0];var n=e.rest(arguments);this.hasHandler(t)?this.getHandler(t).apply(this,n):this.storage.addCommand(t,n)},_executeCommands:function(t,n,i){var r=this.storage.getCommands(t);e.each(r.instances,function(t){n.apply(i,t)}),this.storage.clearCommands(t)},_initializeStorage:function(t){var n,i=t.storageType||this.storageType;n=e.isFunction(i)?new i:i,this.storage=n}})}(i,e),i.RequestResponse=function(t,e){return t.Handlers.extend({request:function(t){return this.hasHandler(t)?this.getHandler(t).apply(this,e.rest(arguments)):void 0}})}(i,e),i.EventAggregator=function(t,e){var n=function(){};return n.extend=t.Model.extend,e.extend(n.prototype,t.Events),n}(t,e),i.Channel=function(n){var i=function(e){this.vent=new t.Wreqr.EventAggregator,this.reqres=new t.Wreqr.RequestResponse,this.commands=new t.Wreqr.Commands,this.channelName=e};return e.extend(i.prototype,{reset:function(){return this.vent.off(),this.vent.stopListening(),this.reqres.removeAllHandlers(),this.commands.removeAllHandlers(),this},connectEvents:function(t,e){return this._connect("vent",t,e),this},connectCommands:function(t,e){return this._connect("commands",t,e),this},connectRequests:function(t,e){return this._connect("reqres",t,e),this},_connect:function(t,n,i){if(n){i=i||this;var r="vent"===t?"on":"setHandler";e.each(n,function(n,s){this[t][r](s,e.bind(n,i))},this)}}}),i}(i),i.radio=function(t,e){var n=function(){this._channels={},this.vent={},this.commands={},this.reqres={},this._proxyMethods()};e.extend(n.prototype,{channel:function(t){if(!t)throw new Error("Channel must receive a name");return this._getChannel(t)},_getChannel:function(e){var n=this._channels[e];return n||(n=new t.Channel(e),this._channels[e]=n),n},_proxyMethods:function(){e.each(["vent","commands","reqres"],function(t){e.each(i[t],function(e){this[t][e]=r(this,t,e)},this)},this)}});var i={vent:["on","off","trigger","once","stopListening","listenTo","listenToOnce"],commands:["execute","setHandler","setHandlers","removeHandler","removeAllHandlers"],reqres:["request","setHandler","setHandlers","removeHandler","removeAllHandlers"]},r=function(t,n,i){return function(r){var s=t._getChannel(r)[n];return s[i].apply(s,e.rest(arguments))}};return new n}(i,e),t.Wreqr})},function(t,e,n){var i,r;!function(s,o){i=[n(11),n(7)],r=function(t,e){return o(t,e)}.apply(e,i),!(void 0!==r&&(t.exports=r))}(this,function(t,e){"use strict";var n=t.ChildViewContainer;return t.ChildViewContainer=function(t,e){var n=function(t){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),e.each(t,this.add,this)};e.extend(n.prototype,{add:function(t,e){var n=t.cid;return this._views[n]=t,t.model&&(this._indexByModel[t.model.cid]=n),e&&(this._indexByCustom[e]=n),this._updateLength(),this},findByModel:function(t){return this.findByModelCid(t.cid)},findByModelCid:function(t){var e=this._indexByModel[t];return this.findByCid(e)},findByCustom:function(t){var e=this._indexByCustom[t];return this.findByCid(e)},findByIndex:function(t){return e.values(this._views)[t]},findByCid:function(t){return this._views[t]},remove:function(t){var n=t.cid;return t.model&&delete this._indexByModel[t.model.cid],e.any(this._indexByCustom,function(t,e){return t===n?(delete this._indexByCustom[e],!0):void 0},this),delete this._views[n],this._updateLength(),this},call:function(t){this.apply(t,e.tail(arguments))},apply:function(t,n){e.each(this._views,function(i){e.isFunction(i[t])&&i[t].apply(i,n||[])})},_updateLength:function(){this.length=e.size(this._views)}});var i=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce"];return e.each(i,function(t){n.prototype[t]=function(){var n=e.values(this._views),i=[n].concat(e.toArray(arguments));return e[t].apply(e,i)}}),n}(t,e),t.ChildViewContainer.VERSION="0.1.8",t.ChildViewContainer.noConflict=function(){return t.ChildViewContainer=n,this},t.ChildViewContainer})},,,,function(t,e,n){var i;!function(){function r(t,e,n){return t.call.apply(t.bind,arguments)}function s(t,e,n){if(!t)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,i),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function o(t,e,n){return o=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?r:s,o.apply(null,arguments)}function a(t,e){this.C=t,this.q=e||t,this.D=this.q.document}function u(t,e,n){t=t.D.getElementsByTagName(e)[0],t||(t=document.documentElement),t&&t.lastChild&&t.insertBefore(n,t.lastChild)}function l(t,e,n){e=e||[],n=n||[];for(var i=t.className.split(/\s+/),r=0;r<e.length;r+=1){for(var s=!1,o=0;o<i.length;o+=1)if(e[r]===i[o]){s=!0;break}s||i.push(e[r])}for(e=[],r=0;r<i.length;r+=1){for(s=!1,o=0;o<n.length;o+=1)if(i[r]===n[o]){s=!0;break}s||e.push(i[r])}t.className=e.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function h(t,e){for(var n=t.className.split(/\s+/),i=0,r=n.length;r>i;i++)if(n[i]==e)return!0;return!1}function c(t){if("string"==typeof t.ca)return t.ca;var e=t.q.location.protocol;return"about:"==e&&(e=t.C.location.protocol),"https:"==e?"https:":"http:"}function d(t,e){var n=t.createElement("link",{rel:"stylesheet",href:e,media:"all"}),i=!1;n.onload=function(){i||(i=!0)},n.onerror=function(){i||(i=!0)},u(t,"head",n)}function f(t,e,n,i){var r=t.D.getElementsByTagName("head")[0];if(r){var s=t.createElement("script",{src:e}),o=!1;return s.onload=s.onreadystatechange=function(){o||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(o=!0,n&&n(null),s.onload=s.onreadystatechange=null,"HEAD"==s.parentNode.tagName&&r.removeChild(s))},r.appendChild(s),setTimeout(function(){o||(o=!0,n&&n(Error("Script load timeout")))},i||5e3),s}return null}function p(t){this.ba=t||"-"}function g(t,e){this.U=t,this.M=4,this.G="n";var n=(e||"n4").match(/^([nio])([1-9])$/i);n&&(this.G=n[1],this.M=parseInt(n[2],10))}function v(t){return t.G+t.M}function m(t){var e=4,n="n",i=null;return t&&((i=t.match(/(normal|oblique|italic)/i))&&i[1]&&(n=i[1].substr(0,1).toLowerCase()),(i=t.match(/([1-9]00|normal|bold)/i))&&i[1]&&(/bold/i.test(i[1])?e=7:/[1-9]00/.test(i[1])&&(e=parseInt(i[1].substr(0,1),10)))),n+e}function _(t,e){this.a=t,this.j=t.q.document.documentElement,this.I=e,this.f="wf",this.e=new p("-"),this.Y=!1!==e.events,this.v=!1!==e.classes}function y(t){t.v&&l(t.j,[t.e.d(t.f,"loading")]),b(t,"loading")}function w(t){if(t.v){var e=h(t.j,t.e.d(t.f,"active")),n=[],i=[t.e.d(t.f,"loading")];e||n.push(t.e.d(t.f,"inactive")),l(t.j,n,i)}b(t,"inactive")}function b(t,e,n){t.Y&&t.I[e]&&(n?t.I[e](n.getName(),v(n)):t.I[e]())}function x(){this.u={}}function E(t,e,n){var i,r=[];for(i in e)if(e.hasOwnProperty(i)){var s=t.u[i];s&&r.push(s(e[i],n))}return r}function M(t,e){this.a=t,this.A=e,this.g=this.a.createElement("span",{"aria-hidden":"true"},this.A)}function O(t){u(t.a,"body",t.g)}function C(t){var e;e=[];for(var n=t.U.split(/,\s*/),i=0;i<n.length;i++){var r=n[i].replace(/['"]/g,"");e.push(-1==r.indexOf(" ")?r:"'"+r+"'")}return e=e.join(","),n="normal","o"===t.G?n="oblique":"i"===t.G&&(n="italic"),"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+e+";"+("font-style:"+n+";font-weight:"+(t.M+"00")+";")}function T(t,e,n,i,r,s,o){this.N=t,this.aa=e,this.a=n,this.h=i,this.A=o||"BESbswy",this.p={},this.L=r||3e3,this.S=s||null,this.w=this.o=this.m=null,this.m=new M(this.a,this.A),this.o=new M(this.a,this.A),this.w=new M(this.a,this.A),t=new g("serif",v(this.h)),t=C(t),this.m.g.style.cssText=t,t=new g("sans-serif",v(this.h)),t=C(t),this.o.g.style.cssText=t,t=new g("monospace",v(this.h)),t=C(t),this.w.g.style.cssText=t,O(this.m),O(this.o),O(this.w),this.p.serif=this.m.g.offsetWidth,this.p["sans-serif"]=this.o.g.offsetWidth,this.p.monospace=this.w.g.offsetWidth}function S(){if(null===J){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);J=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return J}function I(t,e,n){for(var i in W)if(W.hasOwnProperty(i)&&e===t.p[W[i]]&&n===t.p[W[i]])return!0;return!1}function k(t){var e,n=t.m.g.offsetWidth,i=t.o.g.offsetWidth;(e=n===t.p.serif&&i===t.p["sans-serif"])||(e=S()&&I(t,n,i)),e?z()-t.da>=t.L?S()&&I(t,n,i)&&(null===t.S||t.S.hasOwnProperty(t.h.getName()))?P(t,t.N):P(t,t.aa):A(t):P(t,t.N)}function A(t){setTimeout(o(function(){k(this)},t),50)}function P(t,e){t.m.remove(),t.o.remove(),t.w.remove(),e(t.h)}function R(t,e,n){this.a=t,this.s=e,this.J=0,this.W=this.R=!1,this.L=n}function H(t){0==--t.J&&t.R&&(t.W?(t=t.s,t.v&&l(t.j,[t.e.d(t.f,"active")],[t.e.d(t.f,"loading"),t.e.d(t.f,"inactive")]),b(t,"active")):w(t.s))}function D(t){this.C=t,this.t=new x,this.T=0,this.O=this.P=!0}function L(t,e,n,i,r){var s=0==--t.T;(t.O||t.P)&&setTimeout(function(){var t=r||null,a=i||null||{};if(0===n.length&&s)w(e.s);else{e.J+=n.length,s&&(e.R=s);for(var u=0;u<n.length;u++){var h=n[u],c=a[h.getName()],d=e.s,f=h;d.v&&l(d.j,[d.e.d(d.f,f.getName(),v(f).toString(),"loading")]),b(d,"fontloading",f),d=null,d=new T(o(e.Z,e),o(e.$,e),e.a,h,e.L,t,c),d.start()}}},0)}function F(t,e,n){var i=[],r=n.timeout;y(e);var i=E(t.t,n,t.a),s=new R(t.a,e,r);for(t.T=i.length,e=0,n=i.length;n>e;e++)i[e].load(function(e,n,i){L(t,s,e,n,i)})}function N(t,e,n){this.H=t?t:e+K,this.k=[],this.K=[],this.X=n||""}function V(t){this.k=t,this.V=[],this.F={}}function j(t,e){this.a=t,this.c=e}function B(t,e){this.a=t,this.c=e,this.Q=[]}function U(t,e){this.a=t,this.c=e}function $(t,e){this.a=t,this.c=e}function q(t,e){this.a=t,this.c=e}var z=Date.now||function(){return+new Date};a.prototype.createElement=function(t,e,n){if(t=this.D.createElement(t),e)for(var i in e)e.hasOwnProperty(i)&&("style"==i?t.style.cssText=e[i]:t.setAttribute(i,e[i]));return n&&t.appendChild(this.D.createTextNode(n)),t},p.prototype.d=function(t){for(var e=[],n=0;n<arguments.length;n++)e.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return e.join(this.ba)},g.prototype.getName=function(){return this.U},M.prototype.remove=function(){var t=this.g;t.parentNode&&t.parentNode.removeChild(t)};var W={ga:"serif",fa:"sans-serif",ea:"monospace"},J=null;T.prototype.start=function(){this.da=z();var t=new g(this.h.getName()+",serif",v(this.h)),t=C(t);this.m.g.style.cssText=t,t=new g(this.h.getName()+",sans-serif",v(this.h)),t=C(t),this.o.g.style.cssText=t,k(this)},R.prototype.Z=function(t){var e=this.s;e.v&&l(e.j,[e.e.d(e.f,t.getName(),v(t).toString(),"active")],[e.e.d(e.f,t.getName(),v(t).toString(),"loading"),e.e.d(e.f,t.getName(),v(t).toString(),"inactive")]),b(e,"fontactive",t),this.W=!0,H(this)},R.prototype.$=function(t){var e=this.s;if(e.v){var n=h(e.j,e.e.d(e.f,t.getName(),v(t).toString(),"active")),i=[],r=[e.e.d(e.f,t.getName(),v(t).toString(),"loading")];n||i.push(e.e.d(e.f,t.getName(),v(t).toString(),"inactive")),l(e.j,i,r)}b(e,"fontinactive",t),H(this)},D.prototype.load=function(t){this.a=new a(this.C,t.context||this.C),this.P=!1!==t.events,this.O=!1!==t.classes,F(this,new _(this.a,t),t)};var K="//fonts.googleapis.com/css";N.prototype.d=function(){if(0==this.k.length)throw Error("No fonts to load!");if(-1!=this.H.indexOf("kit="))return this.H;for(var t=this.k.length,e=[],n=0;t>n;n++)e.push(this.k[n].replace(/ /g,"+"));return t=this.H+"?family="+e.join("%7C"),0<this.K.length&&(t+="&subset="+this.K.join(",")),0<this.X.length&&(t+="&text="+encodeURIComponent(this.X)),t};var G={latin:"BESbswy",cyrillic:"&#1081;&#1103;&#1046;",greek:"&#945;&#946;&#931;",khmer:"&#x1780;&#x1781;&#x1782;",Hanuman:"&#x1780;&#x1781;&#x1782;"},Q={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},X={i:"i",italic:"i",n:"n",normal:"n"},Y=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;V.prototype.parse=function(){for(var t=this.k.length,e=0;t>e;e++){var n=this.k[e].split(":"),i=n[0].replace(/\+/g," "),r=["n4"];if(2<=n.length){var s,o=n[1];if(s=[],o)for(var o=o.split(","),a=o.length,u=0;a>u;u++){var l;if(l=o[u],l.match(/^[\w-]+$/))if(l=Y.exec(l.toLowerCase()),null==l)l="";else{var h;if(h=l[1],null==h||""==h)h="4";else{var c=Q[h];h=c?c:isNaN(h)?"4":h.substr(0,1)}l=l[2],l=[null==l||""==l?"n":X[l],h].join("")}else l="";l&&s.push(l)}0<s.length&&(r=s),3==n.length&&(n=n[2],s=[],n=n?n.split(","):s,0<n.length&&(n=G[n[0]])&&(this.F[i]=n))}for(this.F[i]||(n=G[i])&&(this.F[i]=n),n=0;n<r.length;n+=1)this.V.push(new g(i,r[n]))}};var Z={Arimo:!0,Cousine:!0,Tinos:!0};j.prototype.load=function(t){for(var e=this.a,n=new N(this.c.api,c(e),this.c.text),i=this.c.families,r=i.length,s=0;r>s;s++){var o=i[s].split(":");3==o.length&&n.K.push(o.pop());var a="";2==o.length&&""!=o[1]&&(a=":"),n.k.push(o.join(a))}i=new V(i),i.parse(),d(e,n.d()),t(i.V,i.F,Z)},B.prototype.B=function(t){var e=this.a;return c(this.a)+(this.c.api||"//f.fontdeck.com/s/css/js/")+(e.q.location.hostname||e.C.location.hostname)+"/"+t+".js"},B.prototype.load=function(t){var e=this.c.id,n=this.a.q,i=this;e?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[e]=function(e,n){for(var r=0,s=n.fonts.length;s>r;++r){var o=n.fonts[r];i.Q.push(new g(o.name,m("font-weight:"+o.weight+";font-style:"+o.style)))}t(i.Q)},f(this.a,this.B(e),function(e){e&&t([])})):t([])},U.prototype.B=function(t){return(this.c.api||"https://use.typekit.net")+"/"+t+".js"},U.prototype.load=function(t){var e=this.c.id,n=this.a.q;e?f(this.a,this.B(e),function(e){if(e)t([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){e=n.Typekit.config.fn;for(var i=[],r=0;r<e.length;r+=2)for(var s=e[r],o=e[r+1],a=0;a<o.length;a++)i.push(new g(s,o[a]));try{n.Typekit.load({events:!1,classes:!1})}catch(u){}t(i)}},2e3):t([])},$.prototype.B=function(t,e){var n=c(this.a),i=(this.c.api||"fast.fonts.net/jsapi").replace(/^.*http(s?):(\/\/)?/,"");return n+"//"+i+"/"+t+".js"+(e?"?v="+e:"")},$.prototype.load=function(t){var e=this.c.projectId,n=this.c.version;if(e){var i=this.a.q;f(this.a,this.B(e,n),function(n){if(n)t([]);else if(i["__mti_fntLst"+e]){n=i["__mti_fntLst"+e]();var r=[];if(n)for(var s=0;s<n.length;s++)r.push(new g(n[s].fontfamily));t(r)}else t([])}).id="__MonotypeAPIScript__"+e}else t([])},q.prototype.load=function(t){var e,n,i=this.c.urls||[],r=this.c.families||[],s=this.c.testStrings||{};for(e=0,n=i.length;n>e;e++)d(this.a,i[e]);for(i=[],e=0,n=r.length;n>e;e++){var o=r[e].split(":");if(o[1])for(var a=o[1].split(","),u=0;u<a.length;u+=1)i.push(new g(o[0],a[u]));else i.push(new g(o[0]))}t(i,s)};var tt=new D(window);tt.t.u.custom=function(t,e){return new q(e,t)},tt.t.u.fontdeck=function(t,e){return new B(e,t)},tt.t.u.monotype=function(t,e){return new $(e,t)},tt.t.u.typekit=function(t,e){return new U(e,t)},tt.t.u.google=function(t,e){return new j(e,t)};var et={load:o(tt.load,tt)};i=function(){return et}.call(e,n,e,t),!(void 0!==i&&(t.exports=i))}()},,,,,function(t,e,n){var i;(function(t){!function(r,s){"use strict";function o(t,e){function n(t){return vt.preferFlash&&ut&&!vt.ignoreFlash&&vt.flash[t]!==s&&vt.flash[t]}function i(t){return function(e){var n,i=this._s;return i&&i._a?n=t.call(this,e):(vt._wD(i&&i.id?i.id+": Ignoring "+e.type:bt+"Ignoring "+e.type),n=null),n}}this.setupOptions={url:t||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1e3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0,forceUseGlobalHTML5Audio:!1,ignoreMobileRestrictions:!1,html5Test:/^(probably|maybe)$/i,preferFlash:!1,noSWFCache:!1,idPrefix:"sound"},this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfailure:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100},this.flash9Options={isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null},this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null},this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},opus:{type:["audio/ogg; codecs=opus","audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1}},this.movieID="sm2-container",this.id=e||"sm2movie",this.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20150601",this.version=null,this.movieURL=null,this.altURL=null,this.swfLoaded=!1,this.enabled=!1,this.oMC=null,this.sounds={},this.soundIDs=[],this.muted=!1,this.didFlashBlock=!1,this.filePattern=null,this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i},this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1},this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null},this.html5={usingFlash:null},this.flash={},this.html5Only=!1,this.ignoreFlash=!1;var o,a,u,l,h,c,d,f,p,g,v,m,_,y,w,b,x,E,M,O,C,T,S,I,k,A,P,R,H,D,L,F,N,V,j,B,U,$,q,z,W,J,K,G,Q,X,Y,Z,tt,et,nt,it,rt,st,ot,at,ut,lt,ht,ct,dt,ft,pt,gt,vt=this,mt=null,_t=null,yt="soundManager",wt=yt+": ",bt="HTML5::",xt=navigator.userAgent,Et=r.location.href.toString(),Mt=document,Ot=[],Ct=!0,Tt=!1,St=!1,It=!1,kt=!1,At=!1,Pt=0,Rt=["log","info","warn","error"],Ht=8,Dt=null,Lt=null,Ft=!1,Nt=!1,Vt=0,jt=null,Bt=[],Ut=null,$t=Array.prototype.slice,qt=!1,zt=0,Wt=1e3,Jt=xt.match(/(ipad|iphone|ipod)/i),Kt=xt.match(/android/i),Gt=xt.match(/msie/i),Qt=xt.match(/webkit/i),Xt=xt.match(/safari/i)&&!xt.match(/chrome/i),Yt=xt.match(/opera/i),Zt=xt.match(/(mobile|pre\/|xoom)/i)||Jt||Kt,te=!Et.match(/usehtml5audio/i)&&!Et.match(/sm2\-ignorebadua/i)&&Xt&&!xt.match(/silk/i)&&xt.match(/OS X 10_6_([3-7])/i),ee=r.console!==s&&console.log!==s,ne=Mt.hasFocus!==s?Mt.hasFocus():null,ie=Xt&&(Mt.hasFocus===s||!Mt.hasFocus()),re=!ie,se=/(mp3|mp4|mpa|m4a|m4b)/i,oe="about:blank",ae="data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==",ue=Mt.location?Mt.location.protocol.match(/http/i):null,le=ue?"":"http://",he=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,ce=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","m4b","mp4v","3gp","3g2"],de=new RegExp("\\.("+ce.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!ue,U={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"},this.hasHTML5=function(){try{return Audio!==s&&(Yt&&opera!==s&&opera.version()<10?new Audio(null):new Audio).canPlayType!==s}catch(t){return!1}}(),this.setup=function(t){var e=!vt.url;return t!==s&&It&&Ut&&vt.ok()&&(t.flashVersion!==s||t.url!==s||t.html5Test!==s)&&W(V("setupLate")),v(t),vt.setupOptions.useHTML5Audio&&!qt&&vt.setupOptions.forceUseGlobalHTML5Audio&&(Bt.push(C.globalHTML5),qt=!0),!gt&&Zt&&(vt.setupOptions.ignoreMobileRestrictions&&Bt.push(C.ignoreMobile),(!vt.setupOptions.useHTML5Audio||vt.setupOptions.preferFlash)&&vt._wD(C.mobileUA),vt.setupOptions.useHTML5Audio=!0,vt.setupOptions.preferFlash=!1,Kt&&!xt.match(/android\s2\.3/i)&&(vt._wD(C.globalHTML5),Jt&&(vt.ignoreFlash=!0),qt=!0)),t&&(e&&k&&t.url!==s&&vt.beginDelayedInit(),k||t.url===s||"complete"!==Mt.readyState||setTimeout(S,1)),gt=!0,vt},this.ok=function(){return Ut?It&&!kt:vt.useHTML5Audio&&vt.hasHTML5},this.supported=this.ok,this.getMovie=function(t){return a(t)||Mt[t]||r[t]},this.createSound=function(t,e){function n(){return a=q(a),vt.sounds[a.id]=new o(a),vt.soundIDs.push(a.id),vt.sounds[a.id]}var i,r,a,u=null;if(i=yt+".createSound(): ",r=i+V(It?"notOK":"notReady"),!It||!vt.ok())return W(r),!1;if(e!==s&&(t={id:t,url:e}),a=g(t),a.url=X(a.url),a.id===s&&(a.id=vt.setupOptions.idPrefix+zt++),a.id.toString().charAt(0).match(/^[0-9]$/)&&vt._wD(i+V("badID",a.id),2),vt._wD(i+a.id+(a.url?" ("+a.url+")":""),1),J(a.id,!0))return vt._wD(i+a.id+" exists",1),vt.sounds[a.id];if(tt(a))u=n(),vt.html5Only||vt._wD(a.id+": Using HTML5"),u._setup_html5(a);else{if(vt.html5Only)return vt._wD(a.id+": No HTML5 support for this sound, and no Flash. Exiting."),n();if(vt.html5.usingFlash&&a.url&&a.url.match(/data\:/i))return vt._wD(a.id+": data: URIs not supported via Flash. Exiting."),n();c>8&&(null===a.isMovieStar&&(a.isMovieStar=!!(a.serverURL||(a.type?a.type.match(he):!1)||a.url&&a.url.match(de))),a.isMovieStar&&(vt._wD(i+"using MovieStar handling"),a.loops>1&&f("noNSLoop"))),a=z(a,i),u=n(),8===c?_t._createSound(a.id,a.loops||1,a.usePolicyFile):(_t._createSound(a.id,a.url,a.usePeakData,a.useWaveformData,a.useEQData,a.isMovieStar,a.isMovieStar?a.bufferTime:!1,a.loops||1,a.serverURL,a.duration||null,a.autoPlay,!0,a.autoLoad,a.usePolicyFile),a.serverURL||(u.connected=!0,a.onconnect&&a.onconnect.apply(u))),a.serverURL||!a.autoLoad&&!a.autoPlay||u.load(a)}return!a.serverURL&&a.autoPlay&&u.play(),u},this.destroySound=function(t,e){if(!J(t))return!1;var n,i=vt.sounds[t];for(i.stop(),i._iO={},i.unload(),n=0;n<vt.soundIDs.length;n++)if(vt.soundIDs[n]===t){vt.soundIDs.splice(n,1);break}return e||i.destruct(!0),i=null,delete vt.sounds[t],!0},this.load=function(t,e){return J(t)?vt.sounds[t].load(e):!1},this.unload=function(t){return J(t)?vt.sounds[t].unload():!1},this.onPosition=function(t,e,n,i){return J(t)?vt.sounds[t].onposition(e,n,i):!1},this.onposition=this.onPosition,this.clearOnPosition=function(t,e,n){return J(t)?vt.sounds[t].clearOnPosition(e,n):!1},this.play=function(t,e){var n=null,i=e&&!(e instanceof Object);if(!It||!vt.ok())return W(yt+".play(): "+V(It?"notOK":"notReady")),!1;if(J(t,i))i&&(e={url:e});else{if(!i)return!1;i&&(e={url:e}),e&&e.url&&(vt._wD(yt+'.play(): Attempting to create "'+t+'"',1),e.id=t,n=vt.createSound(e).play())}return null===n&&(n=vt.sounds[t].play(e)),n},this.start=this.play,this.setPosition=function(t,e){return J(t)?vt.sounds[t].setPosition(e):!1},this.stop=function(t){return J(t)?(vt._wD(yt+".stop("+t+")",1),vt.sounds[t].stop()):!1},this.stopAll=function(){var t;vt._wD(yt+".stopAll()",1);for(t in vt.sounds)vt.sounds.hasOwnProperty(t)&&vt.sounds[t].stop()},this.pause=function(t){return J(t)?vt.sounds[t].pause():!1},this.pauseAll=function(){var t;for(t=vt.soundIDs.length-1;t>=0;t--)vt.sounds[vt.soundIDs[t]].pause()},this.resume=function(t){return J(t)?vt.sounds[t].resume():!1},this.resumeAll=function(){var t;for(t=vt.soundIDs.length-1;t>=0;t--)vt.sounds[vt.soundIDs[t]].resume()},this.togglePause=function(t){return J(t)?vt.sounds[t].togglePause():!1},this.setPan=function(t,e){return J(t)?vt.sounds[t].setPan(e):!1},this.setVolume=function(t,e){var n,i;{if(t===s||isNaN(t)||e!==s)return J(t)?vt.sounds[t].setVolume(e):!1;for(n=0,i=vt.soundIDs.length;i>n;n++)vt.sounds[vt.soundIDs[n]].setVolume(t)}},this.mute=function(t){var e=0;if(t instanceof String&&(t=null),t)return J(t)?(vt._wD(yt+'.mute(): Muting "'+t+'"'),vt.sounds[t].mute()):!1;for(vt._wD(yt+".mute(): Muting all sounds"),e=vt.soundIDs.length-1;e>=0;e--)vt.sounds[vt.soundIDs[e]].mute();return vt.muted=!0,!0},this.muteAll=function(){vt.mute()},this.unmute=function(t){var e;if(t instanceof String&&(t=null),t)return J(t)?(vt._wD(yt+'.unmute(): Unmuting "'+t+'"'),vt.sounds[t].unmute()):!1;for(vt._wD(yt+".unmute(): Unmuting all sounds"),e=vt.soundIDs.length-1;e>=0;e--)vt.sounds[vt.soundIDs[e]].unmute();return vt.muted=!1,!0},this.unmuteAll=function(){vt.unmute()},this.toggleMute=function(t){return J(t)?vt.sounds[t].toggleMute():!1},this.getMemoryUse=function(){var t=0;return _t&&8!==c&&(t=parseInt(_t._getMemoryUse(),10)),t},this.disable=function(t){var e;if(t===s&&(t=!1),kt)return!1;for(kt=!0,f("shutdown",1),e=vt.soundIDs.length-1;e>=0;e--)L(vt.sounds[vt.soundIDs[e]]);return p(t),ot.remove(r,"load",w),!0},this.canPlayMIME=function(t){var e;return vt.hasHTML5&&(e=et({type:t})),!e&&Ut&&(e=t&&vt.ok()?!!((c>8?t.match(he):null)||t.match(vt.mimePattern)):null),e},this.canPlayURL=function(t){var e;return vt.hasHTML5&&(e=et({
  url:t})),!e&&Ut&&(e=t&&vt.ok()?!!t.match(vt.filePattern):null),e},this.canPlayLink=function(t){return t.type!==s&&t.type&&vt.canPlayMIME(t.type)?!0:vt.canPlayURL(t.href)},this.getSoundById=function(t,e){if(!t)return null;var n=vt.sounds[t];return n||e||vt._wD(yt+'.getSoundById(): Sound "'+t+'" not found.',2),n},this.onready=function(t,e){var n="onready",i=!1;if("function"!=typeof t)throw V("needFunction",n);return It&&vt._wD(V("queue",n)),e||(e=r),_(n,t,e),y(),i=!0,i},this.ontimeout=function(t,e){var n="ontimeout",i=!1;if("function"!=typeof t)throw V("needFunction",n);return It&&vt._wD(V("queue",n)),e||(e=r),_(n,t,e),y({type:n}),i=!0,i},this._writeDebug=function(t,e){var n,i,r="soundmanager-debug";return vt.setupOptions.debugMode?ee&&vt.useConsole&&(e&&"object"==typeof e?console.log(t,e):Rt[e]!==s?console[Rt[e]](t):console.log(t),vt.consoleOnly)?!0:(n=a(r))?(i=Mt.createElement("div"),++Pt%2===0&&(i.className="sm2-alt"),e=e===s?0:parseInt(e,10),i.appendChild(Mt.createTextNode(t)),e&&(e>=2&&(i.style.fontWeight="bold"),3===e&&(i.style.color="#ff3333")),n.insertBefore(i,n.firstChild),n=null,!0):!1:!1},-1!==Et.indexOf("sm2-debug=alert")&&(this._writeDebug=function(t){r.alert(t)}),this._wD=this._writeDebug,this._debug=function(){var t,e;for(f("currentObj",1),t=0,e=vt.soundIDs.length;e>t;t++)vt.sounds[vt.soundIDs[t]]._debug()},this.reboot=function(t,e){vt.soundIDs.length&&vt._wD("Destroying "+vt.soundIDs.length+" SMSound object"+(1!==vt.soundIDs.length?"s":"")+"...");var n,i,s;for(n=vt.soundIDs.length-1;n>=0;n--)vt.sounds[vt.soundIDs[n]].destruct();if(_t)try{Gt&&(Lt=_t.innerHTML),Dt=_t.parentNode.removeChild(_t)}catch(o){f("badRemove",2)}if(Lt=Dt=Ut=_t=null,vt.enabled=k=It=Ft=Nt=Tt=St=kt=qt=vt.swfLoaded=!1,vt.soundIDs=[],vt.sounds={},zt=0,gt=!1,t)Ot=[];else for(n in Ot)if(Ot.hasOwnProperty(n))for(i=0,s=Ot[n].length;s>i;i++)Ot[n][i].fired=!1;return e||vt._wD(yt+": Rebooting..."),vt.html5={usingFlash:null},vt.flash={},vt.html5Only=!1,vt.ignoreFlash=!1,r.setTimeout(function(){e||vt.beginDelayedInit()},20),vt},this.reset=function(){return f("reset"),vt.reboot(!0,!0)},this.getMoviePercent=function(){return _t&&"PercentLoaded"in _t?_t.PercentLoaded():null},this.beginDelayedInit=function(){At=!0,S(),setTimeout(function(){return Nt?!1:(P(),T(),Nt=!0,!0)},20),b()},this.destruct=function(){vt._wD(yt+".destruct()"),vt.disable(!0)},o=function(t){var e,n,i,r,o,a,u,l,h,p,v=this,m=!1,_=[],y=0,w=null;h={duration:null,time:null},this.id=t.id,this.sID=this.id,this.url=t.url,this.options=g(t),this.instanceOptions=this.options,this._iO=this.instanceOptions,this.pan=this.options.pan,this.volume=this.options.volume,this.isHTML5=!1,this._a=null,p=this.url?!1:!0,this.id3={},this._debug=function(){vt._wD(v.id+": Merged options:",v.options)},this.load=function(t){var e,n=null;if(t!==s?v._iO=g(t,v.options):(t=v.options,v._iO=t,w&&w!==v.url&&(f("manURL"),v._iO.url=v.url,v.url=null)),v._iO.url||(v._iO.url=v.url),v._iO.url=X(v._iO.url),v.instanceOptions=v._iO,e=v._iO,vt._wD(v.id+": load ("+e.url+")"),!e.url&&!v.url)return vt._wD(v.id+": load(): url is unassigned. Exiting.",2),v;if(v.isHTML5||8!==c||v.url||e.autoPlay||vt._wD(v.id+": Flash 8 load() limitation: Wait for onload() before calling play().",1),e.url===v.url&&0!==v.readyState&&2!==v.readyState)return f("onURL",1),3===v.readyState&&e.onload&&pt(v,function(){e.onload.apply(v,[!!v.duration])}),v;if(v.loaded=!1,v.readyState=1,v.playState=0,v.id3={},tt(e))n=v._setup_html5(e),n._called_load?vt._wD(v.id+": Ignoring request to load again"):(v._html5_canplay=!1,v.url!==e.url&&(vt._wD(f("manURL")+": "+e.url),v._a.src=e.url,v.setPosition(0)),v._a.autobuffer="auto",v._a.preload="auto",v._a._called_load=!0);else{if(vt.html5Only)return vt._wD(v.id+": No flash support. Exiting."),v;if(v._iO.url&&v._iO.url.match(/data\:/i))return vt._wD(v.id+": data: URIs not supported via Flash. Exiting."),v;try{v.isHTML5=!1,v._iO=z(q(e)),v._iO.autoPlay&&(v._iO.position||v._iO.from)&&(vt._wD(v.id+": Disabling autoPlay because of non-zero offset case"),v._iO.autoPlay=!1),e=v._iO,8===c?_t._load(v.id,e.url,e.stream,e.autoPlay,e.usePolicyFile):_t._load(v.id,e.url,!!e.stream,!!e.autoPlay,e.loops||1,!!e.autoLoad,e.usePolicyFile)}catch(i){f("smError",2),d("onload",!1),R({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return v.url=e.url,v},this.unload=function(){return 0!==v.readyState&&(vt._wD(v.id+": unload()"),v.isHTML5?(r(),v._a&&(v._a.pause(),w=it(v._a))):8===c?_t._unload(v.id,oe):_t._unload(v.id),e()),v},this.destruct=function(t){vt._wD(v.id+": Destruct"),v.isHTML5?(r(),v._a&&(v._a.pause(),it(v._a),qt||i(),v._a._s=null,v._a=null)):(v._iO.onfailure=null,_t._destroySound(v.id)),t||vt.destroySound(v.id,!0)},this.play=function(t,e){var n,i,r,u,h,d,f,_=!0,y=null;if(n=v.id+": play(): ",e=e===s?!0:e,t||(t={}),v.url&&(v._iO.url=v.url),v._iO=g(v._iO,v.options),v._iO=g(t,v._iO),v._iO.url=X(v._iO.url),v.instanceOptions=v._iO,!v.isHTML5&&v._iO.serverURL&&!v.connected)return v.getAutoPlay()||(vt._wD(n+" Netstream not connected yet - setting autoPlay"),v.setAutoPlay(!0)),v;if(tt(v._iO)&&(v._setup_html5(v._iO),o()),1!==v.playState||v.paused||(i=v._iO.multiShot,i?vt._wD(n+"Already playing (multi-shot)",1):(vt._wD(n+"Already playing (one-shot)",1),v.isHTML5&&v.setPosition(v._iO.position),y=v)),null!==y)return y;if(t.url&&t.url!==v.url&&(v.readyState||v.isHTML5||8!==c||!p?v.load(v._iO):p=!1),v.loaded?vt._wD(n.substr(0,n.lastIndexOf(":"))):0===v.readyState?(vt._wD(n+"Attempting to load"),v.isHTML5||vt.html5Only?v.isHTML5?v.load(v._iO):(vt._wD(n+"Unsupported type. Exiting."),y=v):(v._iO.autoPlay=!0,v.load(v._iO)),v.instanceOptions=v._iO):2===v.readyState?(vt._wD(n+"Could not load - exiting",2),y=v):vt._wD(n+"Loading - attempting to play..."),null!==y)return y;if(!v.isHTML5&&9===c&&v.position>0&&v.position===v.duration&&(vt._wD(n+"Sound at end, resetting to position: 0"),t.position=0),v.paused&&v.position>=0&&(!v._iO.serverURL||v.position>0))vt._wD(n+"Resuming from paused state",1),v.resume();else{if(v._iO=g(t,v._iO),(!v.isHTML5&&null!==v._iO.position&&v._iO.position>0||null!==v._iO.from&&v._iO.from>0||null!==v._iO.to)&&0===v.instanceCount&&0===v.playState&&!v._iO.serverURL){if(u=function(){v._iO=g(t,v._iO),v.play(v._iO)},v.isHTML5&&!v._html5_canplay?(vt._wD(n+"Beginning load for non-zero offset case"),v.load({_oncanplay:u}),y=!1):v.isHTML5||v.loaded||v.readyState&&2===v.readyState||(vt._wD(n+"Preloading for non-zero offset case"),v.load({onload:u}),y=!1),null!==y)return y;v._iO=l()}(!v.instanceCount||v._iO.multiShotEvents||v.isHTML5&&v._iO.multiShot&&!qt||!v.isHTML5&&c>8&&!v.getAutoPlay())&&v.instanceCount++,v._iO.onposition&&0===v.playState&&a(v),v.playState=1,v.paused=!1,v.position=v._iO.position===s||isNaN(v._iO.position)?0:v._iO.position,v.isHTML5||(v._iO=z(q(v._iO))),v._iO.onplay&&e&&(v._iO.onplay.apply(v),m=!0),v.setVolume(v._iO.volume,!0),v.setPan(v._iO.pan,!0),v.isHTML5?v.instanceCount<2?(o(),r=v._setup_html5(),v.setPosition(v._iO.position),r.play()):(vt._wD(v.id+": Cloning Audio() for instance #"+v.instanceCount+"..."),h=new Audio(v._iO.url),d=function(){ot.remove(h,"ended",d),v._onfinish(v),it(h),h=null},f=function(){ot.remove(h,"canplay",f);try{h.currentTime=v._iO.position/Wt}catch(t){W(v.id+": multiShot play() failed to apply position of "+v._iO.position/Wt)}h.play()},ot.add(h,"ended",d),v._iO.volume!==s&&(h.volume=Math.max(0,Math.min(1,v._iO.volume/100))),v.muted&&(h.muted=!0),v._iO.position?ot.add(h,"canplay",f):h.play()):(_=_t._start(v.id,v._iO.loops||1,9===c?v.position:v.position/Wt,v._iO.multiShot||!1),9!==c||_||(vt._wD(n+"No sound hardware, or 32-sound ceiling hit",2),v._iO.onplayerror&&v._iO.onplayerror.apply(v)))}return v},this.start=this.play,this.stop=function(t){var e,n=v._iO;return 1===v.playState&&(vt._wD(v.id+": stop()"),v._onbufferchange(0),v._resetOnPosition(0),v.paused=!1,v.isHTML5||(v.playState=0),u(),n.to&&v.clearOnPosition(n.to),v.isHTML5?v._a&&(e=v.position,v.setPosition(0),v.position=e,v._a.pause(),v.playState=0,v._onTimer(),r()):(_t._stop(v.id,t),n.serverURL&&v.unload()),v.instanceCount=0,v._iO={},n.onstop&&n.onstop.apply(v)),v},this.setAutoPlay=function(t){vt._wD(v.id+": Autoplay turned "+(t?"on":"off")),v._iO.autoPlay=t,v.isHTML5||(_t._setAutoPlay(v.id,t),t&&(v.instanceCount||1!==v.readyState||(v.instanceCount++,vt._wD(v.id+": Incremented instance count to "+v.instanceCount))))},this.getAutoPlay=function(){return v._iO.autoPlay},this.setPosition=function(t){t===s&&(t=0);var e,n,i=v.isHTML5?Math.max(t,0):Math.min(v.duration||v._iO.duration,Math.max(t,0));if(v.position=i,n=v.position/Wt,v._resetOnPosition(v.position),v._iO.position=i,v.isHTML5){if(v._a){if(v._html5_canplay){if(v._a.currentTime!==n){vt._wD(v.id+": setPosition("+n+")");try{v._a.currentTime=n,(0===v.playState||v.paused)&&v._a.pause()}catch(r){vt._wD(v.id+": setPosition("+n+") failed: "+r.message,2)}}}else if(n)return vt._wD(v.id+": setPosition("+n+"): Cannot seek yet, sound not ready",2),v;v.paused&&v._onTimer(!0)}}else e=9===c?v.position:n,v.readyState&&2!==v.readyState&&_t._setPosition(v.id,e,v.paused||!v.playState,v._iO.multiShot);return v},this.pause=function(t){return v.paused||0===v.playState&&1!==v.readyState?v:(vt._wD(v.id+": pause()"),v.paused=!0,v.isHTML5?(v._setup_html5().pause(),r()):(t||t===s)&&_t._pause(v.id,v._iO.multiShot),v._iO.onpause&&v._iO.onpause.apply(v),v)},this.resume=function(){var t=v._iO;return v.paused?(vt._wD(v.id+": resume()"),v.paused=!1,v.playState=1,v.isHTML5?(v._setup_html5().play(),o()):(t.isMovieStar&&!t.serverURL&&v.setPosition(v.position),_t._pause(v.id,t.multiShot)),!m&&t.onplay?(t.onplay.apply(v),m=!0):t.onresume&&t.onresume.apply(v),v):v},this.togglePause=function(){return vt._wD(v.id+": togglePause()"),0===v.playState?(v.play({position:9!==c||v.isHTML5?v.position/Wt:v.position}),v):(v.paused?v.resume():v.pause(),v)},this.setPan=function(t,e){return t===s&&(t=0),e===s&&(e=!1),v.isHTML5||_t._setPan(v.id,t),v._iO.pan=t,e||(v.pan=t,v.options.pan=t),v},this.setVolume=function(t,e){return t===s&&(t=100),e===s&&(e=!1),v.isHTML5?v._a&&(vt.muted&&!v.muted&&(v.muted=!0,v._a.muted=!0),v._a.volume=Math.max(0,Math.min(1,t/100))):_t._setVolume(v.id,vt.muted&&!v.muted||v.muted?0:t),v._iO.volume=t,e||(v.volume=t,v.options.volume=t),v},this.mute=function(){return v.muted=!0,v.isHTML5?v._a&&(v._a.muted=!0):_t._setVolume(v.id,0),v},this.unmute=function(){v.muted=!1;var t=v._iO.volume!==s;return v.isHTML5?v._a&&(v._a.muted=!1):_t._setVolume(v.id,t?v._iO.volume:v.options.volume),v},this.toggleMute=function(){return v.muted?v.unmute():v.mute()},this.onPosition=function(t,e,n){return _.push({position:parseInt(t,10),method:e,scope:n!==s?n:v,fired:!1}),v},this.onposition=this.onPosition,this.clearOnPosition=function(t,e){var n;if(t=parseInt(t,10),isNaN(t))return!1;for(n=0;n<_.length;n++)t===_[n].position&&(e&&e!==_[n].method||(_[n].fired&&y--,_.splice(n,1)))},this._processOnPosition=function(){var t,e,n=_.length;if(!n||!v.playState||y>=n)return!1;for(t=n-1;t>=0;t--)e=_[t],!e.fired&&v.position>=e.position&&(e.fired=!0,y++,e.method.apply(e.scope,[e.position]),n=_.length);return!0},this._resetOnPosition=function(t){var e,n,i=_.length;if(!i)return!1;for(e=i-1;e>=0;e--)n=_[e],n.fired&&t<=n.position&&(n.fired=!1,y--);return!0},l=function(){var t,e,n=v._iO,i=n.from,r=n.to;return e=function(){vt._wD(v.id+': "To" time of '+r+" reached."),v.clearOnPosition(r,e),v.stop()},t=function(){vt._wD(v.id+': Playing "from" '+i),null===r||isNaN(r)||v.onPosition(r,e)},null===i||isNaN(i)||(n.position=i,n.multiShot=!1,t()),n},a=function(){var t,e=v._iO.onposition;if(e)for(t in e)e.hasOwnProperty(t)&&v.onPosition(parseInt(t,10),e[t])},u=function(){var t,e=v._iO.onposition;if(e)for(t in e)e.hasOwnProperty(t)&&v.clearOnPosition(parseInt(t,10))},o=function(){v.isHTML5&&K(v)},r=function(){v.isHTML5&&G(v)},e=function(t){t||(_=[],y=0),m=!1,v._hasTimer=null,v._a=null,v._html5_canplay=!1,v.bytesLoaded=null,v.bytesTotal=null,v.duration=v._iO&&v._iO.duration?v._iO.duration:null,v.durationEstimate=null,v.buffered=[],v.eqData=[],v.eqData.left=[],v.eqData.right=[],v.failures=0,v.isBuffering=!1,v.instanceOptions={},v.instanceCount=0,v.loaded=!1,v.metadata={},v.readyState=0,v.muted=!1,v.paused=!1,v.peakData={left:0,right:0},v.waveformData={left:[],right:[]},v.playState=0,v.position=null,v.id3={}},e(),this._onTimer=function(t){var e,n,i=!1,r={};return v._hasTimer||t?(v._a&&(t||(v.playState>0||1===v.readyState)&&!v.paused)&&(e=v._get_html5_duration(),e!==h.duration&&(h.duration=e,v.duration=e,i=!0),v.durationEstimate=v.duration,n=v._a.currentTime*Wt||0,n!==h.time&&(h.time=n,i=!0),(i||t)&&v._whileplaying(n,r,r,r,r)),i):void 0},this._get_html5_duration=function(){var t=v._iO,e=v._a&&v._a.duration?v._a.duration*Wt:t&&t.duration?t.duration:null,n=e&&!isNaN(e)&&e!==1/0?e:null;return n},this._apply_loop=function(t,e){!t.loop&&e>1&&vt._wD("Note: Native HTML5 looping is infinite.",1),t.loop=e>1?"loop":""},this._setup_html5=function(t){var i,r=g(v._iO,t),s=qt?mt:v._a,o=decodeURI(r.url);if(qt?o===decodeURI(at)&&(i=!0):o===decodeURI(w)&&(i=!0),s){if(s._s)if(qt)s._s&&s._s.playState&&!i&&s._s.stop();else if(!qt&&o===decodeURI(w))return v._apply_loop(s,r.loops),s;i||(w&&e(!1),s.src=r.url,v.url=r.url,w=r.url,at=r.url,s._called_load=!1)}else r.autoLoad||r.autoPlay?(v._a=new Audio(r.url),v._a.load()):v._a=Yt&&opera.version()<10?new Audio(null):new Audio,s=v._a,s._called_load=!1,qt&&(mt=s);return v.isHTML5=!0,v._a=s,s._s=v,n(),v._apply_loop(s,r.loops),r.autoLoad||r.autoPlay?v.load():(s.autobuffer=!1,s.preload="auto"),s},n=function(){function t(t,e,n){return v._a?v._a.addEventListener(t,e,n||!1):null}if(v._a._added_events)return!1;var e;v._a._added_events=!0;for(e in ct)ct.hasOwnProperty(e)&&t(e,ct[e]);return!0},i=function(){function t(t,e,n){return v._a?v._a.removeEventListener(t,e,n||!1):null}var e;vt._wD(v.id+": Removing event listeners"),v._a._added_events=!1;for(e in ct)ct.hasOwnProperty(e)&&t(e,ct[e])},this._onload=function(t){var e,n=!!t||!v.isHTML5&&8===c&&v.duration;return e=v.id+": ",vt._wD(e+(n?"onload()":"Failed to load / invalid sound?"+(v.duration?" -":" Zero-length duration reported.")+" ("+v.url+")"),n?1:2),n||v.isHTML5||(vt.sandbox.noRemote===!0&&vt._wD(e+V("noNet"),1),vt.sandbox.noLocal===!0&&vt._wD(e+V("noLocal"),1)),v.loaded=n,v.readyState=n?3:2,v._onbufferchange(0),v._iO.onload&&pt(v,function(){v._iO.onload.apply(v,[n])}),!0},this._onbufferchange=function(t){return 0===v.playState?!1:t&&v.isBuffering||!t&&!v.isBuffering?!1:(v.isBuffering=1===t,v._iO.onbufferchange&&(vt._wD(v.id+": Buffer state change: "+t),v._iO.onbufferchange.apply(v,[t])),!0)},this._onsuspend=function(){return v._iO.onsuspend&&(vt._wD(v.id+": Playback suspended"),v._iO.onsuspend.apply(v)),!0},this._onfailure=function(t,e,n){v.failures++,vt._wD(v.id+": Failure ("+v.failures+"): "+t),v._iO.onfailure&&1===v.failures?v._iO.onfailure(t,e,n):vt._wD(v.id+": Ignoring failure")},this._onwarning=function(t,e,n){v._iO.onwarning&&v._iO.onwarning(t,e,n)},this._onfinish=function(){var t=v._iO.onfinish;v._onbufferchange(0),v._resetOnPosition(0),v.instanceCount&&(v.instanceCount--,v.instanceCount||(u(),v.playState=0,v.paused=!1,v.instanceCount=0,v.instanceOptions={},v._iO={},r(),v.isHTML5&&(v.position=0)),(!v.instanceCount||v._iO.multiShotEvents)&&t&&(vt._wD(v.id+": onfinish()"),pt(v,function(){t.apply(v)})))},this._whileloading=function(t,e,n,i){var r=v._iO;v.bytesLoaded=t,v.bytesTotal=e,v.duration=Math.floor(n),v.bufferLength=i,v.durationEstimate=v.isHTML5||r.isMovieStar?v.duration:r.duration?v.duration>r.duration?v.duration:r.duration:parseInt(v.bytesTotal/v.bytesLoaded*v.duration,10),v.isHTML5||(v.buffered=[{start:0,end:v.duration}]),(3!==v.readyState||v.isHTML5)&&r.whileloading&&r.whileloading.apply(v)},this._whileplaying=function(t,e,n,i,r){var o,a=v._iO;return isNaN(t)||null===t?!1:(v.position=Math.max(0,t),v._processOnPosition(),!v.isHTML5&&c>8&&(a.usePeakData&&e!==s&&e&&(v.peakData={left:e.leftPeak,right:e.rightPeak}),a.useWaveformData&&n!==s&&n&&(v.waveformData={left:n.split(","),right:i.split(",")}),a.useEQData&&r!==s&&r&&r.leftEQ&&(o=r.leftEQ.split(","),v.eqData=o,v.eqData.left=o,r.rightEQ!==s&&r.rightEQ&&(v.eqData.right=r.rightEQ.split(",")))),1===v.playState&&(v.isHTML5||8!==c||v.position||!v.isBuffering||v._onbufferchange(0),a.whileplaying&&a.whileplaying.apply(v)),!0)},this._oncaptiondata=function(t){vt._wD(v.id+": Caption data received."),v.captiondata=t,v._iO.oncaptiondata&&v._iO.oncaptiondata.apply(v,[t])},this._onmetadata=function(t,e){vt._wD(v.id+": Metadata received.");var n,i,r={};for(n=0,i=t.length;i>n;n++)r[t[n]]=e[n];v.metadata=r,v._iO.onmetadata&&v._iO.onmetadata.call(v,v.metadata)},this._onid3=function(t,e){vt._wD(v.id+": ID3 data received.");var n,i,r=[];for(n=0,i=t.length;i>n;n++)r[t[n]]=e[n];v.id3=g(v.id3,r),v._iO.onid3&&v._iO.onid3.apply(v)},this._onconnect=function(t){t=1===t,vt._wD(v.id+": "+(t?"Connected.":"Failed to connect? - "+v.url),t?1:2),v.connected=t,t&&(v.failures=0,J(v.id)&&(v.getAutoPlay()?v.play(s,v.getAutoPlay()):v._iO.autoLoad&&v.load()),v._iO.onconnect&&v._iO.onconnect.apply(v,[t]))},this._ondataerror=function(t){v.playState>0&&(vt._wD(v.id+": Data error: "+t),v._iO.ondataerror&&v._iO.ondataerror.apply(v))},this._debug()},A=function(){return Mt.body||Mt.getElementsByTagName("div")[0]},a=function(t){return Mt.getElementById(t)},g=function(t,e){var n,i,r=t||{};n=e===s?vt.defaultOptions:e;for(i in n)n.hasOwnProperty(i)&&r[i]===s&&(r[i]="object"!=typeof n[i]||null===n[i]?n[i]:g(r[i],n[i]));return r},pt=function(t,e){t.isHTML5||8!==c?e():r.setTimeout(e,0)},m={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},v=function(t,e){var n,i=!0,r=e!==s,o=vt.setupOptions,a=m;if(t===s){i=[];for(n in o)o.hasOwnProperty(n)&&i.push(n);for(n in a)a.hasOwnProperty(n)&&i.push("object"==typeof vt[n]?n+": {...}":vt[n]instanceof Function?n+": function() {...}":n);return vt._wD(V("setup",i.join(", "))),!1}for(n in t)if(t.hasOwnProperty(n))if("object"!=typeof t[n]||null===t[n]||t[n]instanceof Array||t[n]instanceof RegExp)r&&a[e]!==s?vt[e][n]=t[n]:o[n]!==s?(vt.setupOptions[n]=t[n],vt[n]=t[n]):a[n]===s?(W(V(vt[n]===s?"setupUndef":"setupError",n),2),i=!1):vt[n]instanceof Function?vt[n].apply(vt,t[n]instanceof Array?t[n]:[t[n]]):vt[n]=t[n];else{if(a[n]!==s)return v(t[n],n);W(V(vt[n]===s?"setupUndef":"setupError",n),2),i=!1}return i},ot=function(){function t(t){var e=$t.call(t),n=e.length;return s?(e[1]="on"+e[1],n>3&&e.pop()):3===n&&e.push(!1),e}function e(t,e){var n=t.shift(),i=[o[e]];s?n[i](t[0],t[1]):n[i].apply(n,t)}function n(){e(t(arguments),"add")}function i(){e(t(arguments),"remove")}var s=r.attachEvent,o={add:s?"attachEvent":"addEventListener",remove:s?"detachEvent":"removeEventListener"};return{add:n,remove:i}}(),ct={abort:i(function(){vt._wD(this._s.id+": abort")}),canplay:i(function(){var t,e=this._s;if(e._html5_canplay)return!0;if(e._html5_canplay=!0,vt._wD(e.id+": canplay"),e._onbufferchange(0),t=e._iO.position===s||isNaN(e._iO.position)?null:e._iO.position/Wt,this.currentTime!==t){vt._wD(e.id+": canplay: Setting position to "+t);try{this.currentTime=t}catch(n){vt._wD(e.id+": canplay: Setting position of "+t+" failed: "+n.message,2)}}e._iO._oncanplay&&e._iO._oncanplay()}),canplaythrough:i(function(){var t=this._s;t.loaded||(t._onbufferchange(0),t._whileloading(t.bytesLoaded,t.bytesTotal,t._get_html5_duration()),t._onload(!0))}),durationchange:i(function(){var t,e=this._s;t=e._get_html5_duration(),isNaN(t)||t===e.duration||(vt._wD(this._s.id+": durationchange ("+t+")"+(e.duration?", previously "+e.duration:"")),e.durationEstimate=e.duration=t)}),ended:i(function(){var t=this._s;vt._wD(t.id+": ended"),t._onfinish()}),error:i(function(){vt._wD(this._s.id+": HTML5 error, code "+this.error.code),this._s._onload(!1)}),loadeddata:i(function(){var t=this._s;vt._wD(t.id+": loadeddata"),t._loaded||Xt||(t.duration=t._get_html5_duration())}),loadedmetadata:i(function(){vt._wD(this._s.id+": loadedmetadata")}),loadstart:i(function(){vt._wD(this._s.id+": loadstart"),this._s._onbufferchange(1)}),play:i(function(){this._s._onbufferchange(0)}),playing:i(function(){vt._wD(this._s.id+": playing "+String.fromCharCode(9835)),this._s._onbufferchange(0)}),progress:i(function(t){var e,n,i,r=this._s,s=0,o="progress"===t.type,a=t.target.buffered,u=t.loaded||0,l=t.total||1;if(r.buffered=[],a&&a.length){for(e=0,n=a.length;n>e;e++)r.buffered.push({start:a.start(e)*Wt,end:a.end(e)*Wt});if(s=(a.end(0)-a.start(0))*Wt,u=Math.min(1,s/(t.target.duration*Wt)),o&&a.length>1){for(i=[],n=a.length,e=0;n>e;e++)i.push(t.target.buffered.start(e)*Wt+"-"+t.target.buffered.end(e)*Wt);vt._wD(this._s.id+": progress, timeRanges: "+i.join(", "))}o&&!isNaN(u)&&vt._wD(this._s.id+": progress, "+Math.floor(100*u)+"% loaded")}isNaN(u)||(r._whileloading(u,l,r._get_html5_duration()),u&&l&&u===l&&ct.canplaythrough.call(this,t))}),ratechange:i(function(){vt._wD(this._s.id+": ratechange")}),suspend:i(function(t){var e=this._s;vt._wD(this._s.id+": suspend"),ct.progress.call(this,t),e._onsuspend()}),stalled:i(function(){vt._wD(this._s.id+": stalled")}),timeupdate:i(function(){this._s._onTimer()}),waiting:i(function(){var t=this._s;vt._wD(this._s.id+": waiting"),t._onbufferchange(1)})},tt=function(t){var e;return e=t&&(t.type||t.url||t.serverURL)?t.serverURL||t.type&&n(t.type)?!1:t.type?et({type:t.type}):et({url:t.url})||vt.html5Only||t.url.match(/data\:/i):!1},it=function(t){var e;return t&&(e=Xt?oe:vt.html5.canPlayType("audio/wav")?ae:oe,t.src=e,t._called_unload!==s&&(t._called_load=!1)),qt&&(at=null),e},et=function(t){if(!vt.useHTML5Audio||!vt.hasHTML5)return!1;var e,i,r,o,a=t.url||null,u=t.type||null,l=vt.audioFormats;if(u&&vt.html5[u]!==s)return vt.html5[u]&&!n(u);if(!nt){nt=[];for(o in l)l.hasOwnProperty(o)&&(nt.push(o),l[o].related&&(nt=nt.concat(l[o].related)));nt=new RegExp("\\.("+nt.join("|")+")(\\?.*)?$","i")}return r=a?a.toLowerCase().match(nt):null,r&&r.length?r=r[1]:u?(i=u.indexOf(";"),r=(-1!==i?u.substr(0,i):u).substr(6)):e=!1,r&&vt.html5[r]!==s?e=vt.html5[r]&&!n(r):(u="audio/"+r,e=vt.html5.canPlayType({type:u}),vt.html5[r]=e,e=e&&vt.html5[u]&&!n(u)),e},st=function(){function t(t){var e,n,i=!1,s=!1;if(!o||"function"!=typeof o.canPlayType)return i;if(t instanceof Array){for(r=0,n=t.length;n>r;r++)(vt.html5[t[r]]||o.canPlayType(t[r]).match(vt.html5Test))&&(s=!0,vt.html5[t[r]]=!0,vt.flash[t[r]]=!!t[r].match(se));i=s}else e=o&&"function"==typeof o.canPlayType?o.canPlayType(t):!1,i=!(!e||!e.match(vt.html5Test));return i}if(!vt.useHTML5Audio||!vt.hasHTML5)return vt.html5.usingFlash=!0,Ut=!0,!1;var e,n,i,r,o=Audio!==s?Yt&&opera.version()<10?new Audio(null):new Audio:null,a={};i=vt.audioFormats;for(e in i)if(i.hasOwnProperty(e)&&(n="audio/"+e,a[e]=t(i[e].type),a[n]=a[e],e.match(se)?(vt.flash[e]=!0,vt.flash[n]=!0):(vt.flash[e]=!1,vt.flash[n]=!1),i[e]&&i[e].related))for(r=i[e].related.length-1;r>=0;r--)a["audio/"+i[e].related[r]]=a[e],vt.html5[i[e].related[r]]=a[e],vt.flash[i[e].related[r]]=a[e];return a.canPlayType=o?t:null,vt.html5=g(vt.html5,a),vt.html5.usingFlash=Z(),Ut=vt.html5.usingFlash,!0},C={notReady:"Unavailable - wait until onready() has fired.",notOK:"Audio support is not available.",domError:yt+"exception caught while appending SWF to DOM.",spcWmode:"Removing wmode, preventing known SWF loading issue(s)",swf404:wt+"Verify that %s is a valid path.",tryDebug:"Try "+yt+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:wt+"Non-HTTP page ("+Mt.location.protocol+" URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, eg. c:/sm2/ or /users/me/sm2/",waitFocus:wt+"Special case: Waiting for SWF to load with window focus...",waitForever:wt+"Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:wt+"Waiting for 100% SWF load...",needFunction:wt+"Function object expected for %s",badID:'Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:wt+"_debug(): Current sound objects",waitOnload:wt+"Waiting for window.onload()",docLoaded:wt+"Document already loaded",onload:wt+"initComplete(): calling soundManager.onload()",onloadOK:yt+".onload() complete",didInit:wt+"init(): Already called?",secNote:"Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html",badRemove:wt+"Failed to remove Flash node.",shutdown:yt+".disable(): Shutting down",queue:wt+"Queueing %s handler",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+U.swfTimedout+" CSS...",fbLoaded:"Flash loaded",fbHandler:wt+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:yt+".load(): current URL already assigned.",badFV:yt+'.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.',as2loop:"Note: Setting stream:false so looping can work (flash 8 limitation)",noNSLoop:"Note: Looping not implemented for MovieStar formats",needfl9:"Note: Switching to flash 9, required for MP4 formats.",mfTimeout:"Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case",needFlash:wt+"Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:wt+"Got window focus.",policy:"Enabling usePolicyFile for data access",setup:yt+".setup(): allowed parameters: %s",setupError:yt+'.setup(): "%s" cannot be assigned with this method.',setupUndef:yt+'.setup(): Could not find option "%s"',setupLate:yt+".setup(): url, flashVersion and html5Test property changes will not take effect until reboot().",noURL:wt+"Flash URL required. Call soundManager.setup({url:...}) to get started.",sm2Loaded:"SoundManager 2: Ready. "+String.fromCharCode(10003),reset:yt+".reset(): Removing event callbacks",mobileUA:"Mobile UA detected, preferring HTML5 by default.",globalHTML5:"Using singleton HTML5 Audio() pattern for this device.",ignoreMobile:"Ignoring mobile restrictions for this device."},V=function(){var t,e,n,i,r;if(t=$t.call(arguments),i=t.shift(),r=C&&C[i]?C[i]:"",r&&t&&t.length)for(e=0,n=t.length;n>e;e++)r=r.replace("%s",t[e]);return r},q=function(t){return 8===c&&t.loops>1&&t.stream&&(f("as2loop"),t.stream=!1),t},z=function(t,e){return t&&!t.usePolicyFile&&(t.onid3||t.usePeakData||t.useWaveformData||t.useEQData)&&(vt._wD((e||"")+V("policy")),t.usePolicyFile=!0),t},W=function(t){ee&&console.warn!==s?console.warn(t):vt._wD(t)},u=function(){return!1},L=function(t){var e;for(e in t)t.hasOwnProperty(e)&&"function"==typeof t[e]&&(t[e]=u);e=null},F=function(t){t===s&&(t=!1),(kt||t)&&vt.disable(t)},N=function(t){var e,n=null;if(t)if(t.match(/\.swf(\?.*)?$/i)){if(n=t.substr(t.toLowerCase().lastIndexOf(".swf?")+4))return t}else t.lastIndexOf("/")!==t.length-1&&(t+="/");return e=(t&&-1!==t.lastIndexOf("/")?t.substr(0,t.lastIndexOf("/")+1):"./")+vt.movieURL,vt.noSWFCache&&(e+="?ts="+(new Date).getTime()),e},M=function(){c=parseInt(vt.flashVersion,10),8!==c&&9!==c&&(vt._wD(V("badFV",c,Ht)),vt.flashVersion=c=Ht);var t=vt.debugMode||vt.debugFlash?"_debug.swf":".swf";vt.useHTML5Audio&&!vt.html5Only&&vt.audioFormats.mp4.required&&9>c&&(vt._wD(V("needfl9")),vt.flashVersion=c=9),vt.version=vt.versionNumber+(vt.html5Only?" (HTML5-only mode)":9===c?" (AS3/Flash 9)":" (AS2/Flash 8)"),c>8?(vt.defaultOptions=g(vt.defaultOptions,vt.flash9Options),vt.features.buffering=!0,vt.defaultOptions=g(vt.defaultOptions,vt.movieStarOptions),vt.filePatterns.flash9=new RegExp("\\.(mp3|"+ce.join("|")+")(\\?.*)?$","i"),vt.features.movieStar=!0):vt.features.movieStar=!1,vt.filePattern=vt.filePatterns[8!==c?"flash9":"flash8"],vt.movieURL=(8===c?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",t),vt.features.peakData=vt.features.waveformData=vt.features.eqData=c>8},H=function(t,e){return _t?void _t._setPolling(t,e):!1},D=function(){if(vt.debugURLParam.test(Et)&&(vt.setupOptions.debugMode=vt.debugMode=!0),a(vt.debugID))return!1;var t,e,n,i,r;if(!(!vt.debugMode||a(vt.debugID)||ee&&vt.useConsole&&vt.consoleOnly)){t=Mt.createElement("div"),t.id=vt.debugID+"-toggle",i={position:"fixed",bottom:"0px",right:"0px",width:"1.2em",height:"1.2em",lineHeight:"1.2em",margin:"2px",textAlign:"center",border:"1px solid #999",cursor:"pointer",background:"#fff",color:"#333",zIndex:10001},t.appendChild(Mt.createTextNode("-")),t.onclick=$,t.title="Toggle SM2 debug console",xt.match(/msie 6/i)&&(t.style.position="absolute",t.style.cursor="hand");for(r in i)i.hasOwnProperty(r)&&(t.style[r]=i[r]);if(e=Mt.createElement("div"),e.id=vt.debugID,e.style.display=vt.debugMode?"block":"none",vt.debugMode&&!a(t.id)){try{n=A(),n.appendChild(t)}catch(s){throw new Error(V("domError")+" \n"+s.toString())}n.appendChild(e)}}n=null},J=this.getSoundById,f=function(t,e){return t?vt._wD(V(t),e):""},$=function(){var t=a(vt.debugID),e=a(vt.debugID+"-toggle");return t?(Ct?(e.innerHTML="+",t.style.display="none"):(e.innerHTML="-",t.style.display="block"),void(Ct=!Ct)):!1},d=function(t,e,n){if(r.sm2Debugger!==s)try{sm2Debugger.handleEvent(t,e,n)}catch(i){return!1}return!0},B=function(){var t=[];return vt.debugMode&&t.push(U.sm2Debug),vt.debugFlash&&t.push(U.flashDebug),vt.useHighPerformance&&t.push(U.highPerf),t.join(" ")},j=function(){var t=V("fbHandler"),e=vt.getMoviePercent(),n=U,i={type:"FLASHBLOCK"};return vt.html5Only?!1:void(vt.ok()?(vt.didFlashBlock&&vt._wD(t+": Unblocked"),vt.oMC&&(vt.oMC.className=[B(),n.swfDefault,n.swfLoaded+(vt.didFlashBlock?" "+n.swfUnblocked:"")].join(" "))):(Ut&&(vt.oMC.className=B()+" "+n.swfDefault+" "+(null===e?n.swfTimedout:n.swfError),vt._wD(t+": "+V("fbTimeout")+(e?" ("+V("fbLoaded")+")":""))),vt.didFlashBlock=!0,y({type:"ontimeout",ignoreInit:!0,error:i}),R(i)))},_=function(t,e,n){Ot[t]===s&&(Ot[t]=[]),Ot[t].push({method:e,scope:n||null,fired:!1})},y=function(t){if(t||(t={type:vt.ok()?"onready":"ontimeout"}),!It&&t&&!t.ignoreInit)return!1;if("ontimeout"===t.type&&(vt.ok()||kt&&!t.ignoreInit))return!1;var e,n,i={success:t&&t.ignoreInit?vt.ok():!kt},r=t&&t.type?Ot[t.type]||[]:[],s=[],o=[i],a=Ut&&!vt.ok();for(t.error&&(o[0].error=t.error),e=0,n=r.length;n>e;e++)r[e].fired!==!0&&s.push(r[e]);if(s.length)for(e=0,n=s.length;n>e;e++)s[e].scope?s[e].method.apply(s[e].scope,o):s[e].method.apply(this,o),a||(s[e].fired=!0);return!0},w=function(){r.setTimeout(function(){vt.useFlashBlock&&j(),y(),"function"==typeof vt.onload&&(f("onload",1),vt.onload.apply(r),f("onloadOK",1)),vt.waitForWindowLoad&&ot.add(r,"load",w)},1)},lt=function(){if(ut!==s)return ut;var t,e,n,i=!1,o=navigator,a=o.plugins,u=r.ActiveXObject;if(a&&a.length)e="application/x-shockwave-flash",n=o.mimeTypes,n&&n[e]&&n[e].enabledPlugin&&n[e].enabledPlugin.description&&(i=!0);else if(u!==s&&!xt.match(/MSAppHost/i)){try{t=new u("ShockwaveFlash.ShockwaveFlash")}catch(l){t=null}i=!!t,t=null}return ut=i,i},Z=function(){var t,e,n=vt.audioFormats,i=Jt&&!!xt.match(/os (1|2|3_0|3_1)\s/i);if(i?(vt.hasHTML5=!1,vt.html5Only=!0,vt.oMC&&(vt.oMC.style.display="none")):vt.useHTML5Audio&&(vt.html5&&vt.html5.canPlayType||(vt._wD("SoundManager: No HTML5 Audio() support detected."),vt.hasHTML5=!1),te&&vt._wD(wt+"Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+(ut?"will use flash fallback for MP3/MP4, if available":" would use flash fallback for MP3/MP4, but none detected."),1)),vt.useHTML5Audio&&vt.hasHTML5){Y=!0;for(e in n)n.hasOwnProperty(e)&&n[e].required&&(vt.html5.canPlayType(n[e].type)?vt.preferFlash&&(vt.flash[e]||vt.flash[n[e].type])&&(t=!0):(Y=!1,t=!0))}return vt.ignoreFlash&&(t=!1,Y=!0),vt.html5Only=vt.hasHTML5&&vt.useHTML5Audio&&!t,!vt.html5Only},X=function(t){var e,n,i,r=0;if(t instanceof Array){for(e=0,n=t.length;n>e;e++)if(t[e]instanceof Object){if(vt.canPlayMIME(t[e].type)){r=e;break}}else if(vt.canPlayURL(t[e])){r=e;
  break}t[r].url&&(t[r]=t[r].url),i=t[r]}else i=t;return i},K=function(t){t._hasTimer||(t._hasTimer=!0,!Zt&&vt.html5PollingInterval&&(null===jt&&0===Vt&&(jt=setInterval(Q,vt.html5PollingInterval)),Vt++))},G=function(t){t._hasTimer&&(t._hasTimer=!1,!Zt&&vt.html5PollingInterval&&Vt--)},Q=function(){var t;if(null!==jt&&!Vt)return clearInterval(jt),jt=null,!1;for(t=vt.soundIDs.length-1;t>=0;t--)vt.sounds[vt.soundIDs[t]].isHTML5&&vt.sounds[vt.soundIDs[t]]._hasTimer&&vt.sounds[vt.soundIDs[t]]._onTimer()},R=function(t){t=t!==s?t:{},"function"==typeof vt.onerror&&vt.onerror.apply(r,[{type:t.type!==s?t.type:null}]),t.fatal!==s&&t.fatal&&vt.disable()},ht=function(){if(!te||!lt())return!1;var t,e,n=vt.audioFormats;for(e in n)if(n.hasOwnProperty(e)&&("mp3"===e||"mp4"===e)&&(vt._wD(yt+": Using flash fallback for "+e+" format"),vt.html5[e]=!1,n[e]&&n[e].related))for(t=n[e].related.length-1;t>=0;t--)vt.html5[n[e].related[t]]=!1},this._setSandboxType=function(t){var e=vt.sandbox;e.type=t,e.description=e.types[e.types[t]!==s?t:"unknown"],"localWithFile"===e.type?(e.noRemote=!0,e.noLocal=!1,f("secNote",2)):"localWithNetwork"===e.type?(e.noRemote=!1,e.noLocal=!0):"localTrusted"===e.type&&(e.noRemote=!1,e.noLocal=!1)},this._externalInterfaceOK=function(t){if(vt.swfLoaded)return!1;var e;return d("swf",!0),d("flashtojs",!0),vt.swfLoaded=!0,ie=!1,te&&ht(),t&&t.replace(/\+dev/i,"")===vt.versionNumber.replace(/\+dev/i,"")?void setTimeout(h,Gt?100:1):(e=yt+': Fatal: JavaScript file build "'+vt.versionNumber+'" does not match Flash SWF build "'+t+'" at '+vt.url+". Ensure both are up-to-date.",setTimeout(function(){throw new Error(e)},0),!1)},P=function(t,e){function n(){var t,e=[],n=[],i=" + ";t="SoundManager "+vt.version+(!vt.html5Only&&vt.useHTML5Audio?vt.hasHTML5?" + HTML5 audio":", no HTML5 audio support":""),vt.html5Only?vt.html5PollingInterval&&e.push("html5PollingInterval ("+vt.html5PollingInterval+"ms)"):(vt.preferFlash&&e.push("preferFlash"),vt.useHighPerformance&&e.push("useHighPerformance"),vt.flashPollingInterval&&e.push("flashPollingInterval ("+vt.flashPollingInterval+"ms)"),vt.html5PollingInterval&&e.push("html5PollingInterval ("+vt.html5PollingInterval+"ms)"),vt.wmode&&e.push("wmode ("+vt.wmode+")"),vt.debugFlash&&e.push("debugFlash"),vt.useFlashBlock&&e.push("flashBlock")),e.length&&(n=n.concat([e.join(i)])),vt._wD(t+(n.length?i+n.join(", "):""),1),dt()}function i(t,e){return'<param name="'+t+'" value="'+e+'" />'}if(Tt&&St)return!1;if(vt.html5Only)return M(),n(),vt.oMC=a(vt.movieID),h(),Tt=!0,St=!0,!1;var r,o,u,l,c,d,f,p,g=e||vt.url,v=vt.altURL||g,m="JS/Flash audio component (SoundManager 2)",_=A(),y=B(),w=null,b=Mt.getElementsByTagName("html")[0];if(w=b&&b.dir&&b.dir.match(/rtl/i),t=t===s?vt.id:t,M(),vt.url=N(ue?g:v),e=vt.url,vt.wmode=!vt.wmode&&vt.useHighPerformance?"transparent":vt.wmode,null!==vt.wmode&&(xt.match(/msie 8/i)||!Gt&&!vt.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(Bt.push(C.spcWmode),vt.wmode=null),r={name:t,id:t,src:e,quality:"high",allowScriptAccess:vt.allowScriptAccess,bgcolor:vt.bgColor,pluginspage:le+"www.macromedia.com/go/getflashplayer",title:m,type:"application/x-shockwave-flash",wmode:vt.wmode,hasPriority:"true"},vt.debugFlash&&(r.FlashVars="debug=1"),vt.wmode||delete r.wmode,Gt)o=Mt.createElement("div"),l=['<object id="'+t+'" data="'+e+'" type="'+r.type+'" title="'+r.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">',i("movie",e),i("AllowScriptAccess",vt.allowScriptAccess),i("quality",r.quality),vt.wmode?i("wmode",vt.wmode):"",i("bgcolor",vt.bgColor),i("hasPriority","true"),vt.debugFlash?i("FlashVars",r.FlashVars):"","</object>"].join("");else{o=Mt.createElement("embed");for(u in r)r.hasOwnProperty(u)&&o.setAttribute(u,r[u])}if(D(),y=B(),_=A())if(vt.oMC=a(vt.movieID)||Mt.createElement("div"),vt.oMC.id)p=vt.oMC.className,vt.oMC.className=(p?p+" ":U.swfDefault)+(y?" "+y:""),vt.oMC.appendChild(o),Gt&&(c=vt.oMC.appendChild(Mt.createElement("div")),c.className=U.swfBox,c.innerHTML=l),St=!0;else{if(vt.oMC.id=vt.movieID,vt.oMC.className=U.swfDefault+" "+y,d=null,c=null,vt.useFlashBlock||(vt.useHighPerformance?d={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(d={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},w&&(d.left=Math.abs(parseInt(d.left,10))+"px"))),Qt&&(vt.oMC.style.zIndex=1e4),!vt.debugFlash)for(f in d)d.hasOwnProperty(f)&&(vt.oMC.style[f]=d[f]);try{Gt||vt.oMC.appendChild(o),_.appendChild(vt.oMC),Gt&&(c=vt.oMC.appendChild(Mt.createElement("div")),c.className=U.swfBox,c.innerHTML=l),St=!0}catch(x){throw new Error(V("domError")+" \n"+x.toString())}}return Tt=!0,n(),!0},T=function(){return vt.html5Only?(P(),!1):_t?!1:vt.url?(_t=vt.getMovie(vt.id),_t||(Dt?(Gt?vt.oMC.innerHTML=Lt:vt.oMC.appendChild(Dt),Dt=null,Tt=!0):P(vt.id,vt.url),_t=vt.getMovie(vt.id)),"function"==typeof vt.oninitmovie&&setTimeout(vt.oninitmovie,1),ft(),!0):(f("noURL"),!1)},b=function(){setTimeout(x,1e3)},E=function(){r.setTimeout(function(){W(wt+"useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false..."),vt.setup({preferFlash:!1}).reboot(),vt.didFlashBlock=!0,vt.beginDelayedInit()},1)},x=function(){var t,e=!1;return vt.url?Ft?!1:(Ft=!0,ot.remove(r,"load",b),ut&&ie&&!ne?(f("waitFocus"),!1):(It||(t=vt.getMoviePercent(),t>0&&100>t&&(e=!0)),void setTimeout(function(){return t=vt.getMoviePercent(),e?(Ft=!1,vt._wD(V("waitSWF")),r.setTimeout(b,1),!1):(It||(vt._wD(yt+": No Flash response within expected time. Likely causes: "+(0===t?"SWF load failed, ":"")+"Flash blocked or JS-Flash security error."+(vt.debugFlash?" "+V("checkSWF"):""),2),!ue&&t&&(f("localFail",2),vt.debugFlash||f("tryDebug",2)),0===t&&vt._wD(V("swf404",vt.url),1),d("flashtojs",!1,": Timed out"+(ue?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"))),void(!It&&re&&(null===t?vt.useFlashBlock||0===vt.flashLoadTimeout?(vt.useFlashBlock&&j(),f("waitForever")):!vt.useFlashBlock&&Y?E():(f("waitForever"),y({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===vt.flashLoadTimeout?f("waitForever"):!vt.useFlashBlock&&Y?E():F(!0))))},vt.flashLoadTimeout))):!1},O=function(){function t(){ot.remove(r,"focus",O)}return ne||!ie?(t(),!0):(re=!0,ne=!0,f("gotFocus"),Ft=!1,b(),t(),!0)},ft=function(){Bt.length&&(vt._wD("SoundManager 2: "+Bt.join(" "),1),Bt=[])},dt=function(){ft();var t,e=[];if(vt.useHTML5Audio&&vt.hasHTML5){for(t in vt.audioFormats)vt.audioFormats.hasOwnProperty(t)&&e.push(t+" = "+vt.html5[t]+(!vt.html5[t]&&Ut&&vt.flash[t]?" (using flash)":vt.preferFlash&&vt.flash[t]&&Ut?" (preferring flash)":vt.html5[t]?"":" ("+(vt.audioFormats[t].required?"required, ":"")+"and no flash support)"));vt._wD("SoundManager 2 HTML5 support: "+e.join(", "),1)}},p=function(t){if(It)return!1;if(vt.html5Only)return f("sm2Loaded",1),It=!0,w(),d("onload",!0),!0;var e,n=vt.useFlashBlock&&vt.flashLoadTimeout&&!vt.getMoviePercent(),i=!0;return n||(It=!0),e={type:!ut&&Ut?"NO_FLASH":"INIT_TIMEOUT"},vt._wD("SoundManager 2 "+(kt?"failed to load":"loaded")+" ("+(kt?"Flash security/load error":"OK")+") "+String.fromCharCode(kt?10006:10003),kt?2:1),kt||t?(vt.useFlashBlock&&vt.oMC&&(vt.oMC.className=B()+" "+(null===vt.getMoviePercent()?U.swfTimedout:U.swfError)),y({type:"ontimeout",error:e,ignoreInit:!0}),d("onload",!1),R(e),i=!1):d("onload",!0),kt||(vt.waitForWindowLoad&&!At?(f("waitOnload"),ot.add(r,"load",w)):(vt.waitForWindowLoad&&At&&f("docLoaded"),w())),i},l=function(){var t,e=vt.setupOptions;for(t in e)e.hasOwnProperty(t)&&(vt[t]===s?vt[t]=e[t]:vt[t]!==e[t]&&(vt.setupOptions[t]=vt[t]))},h=function(){function t(){ot.remove(r,"load",vt.beginDelayedInit)}if(It)return f("didInit"),!1;if(vt.html5Only)return It||(t(),vt.enabled=!0,p()),!0;T();try{_t._externalInterfaceTest(!1),H(!0,vt.flashPollingInterval||(vt.useHighPerformance?10:50)),vt.debugMode||_t._disableDebug(),vt.enabled=!0,d("jstoflash",!0),vt.html5Only||ot.add(r,"unload",u)}catch(e){return vt._wD("js/flash exception: "+e.toString()),d("jstoflash",!1),R({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),F(!0),p(),!1}return p(),t(),!0},S=function(){return k?!1:(k=!0,l(),D(),!ut&&vt.hasHTML5&&(vt._wD("SoundManager 2: No Flash detected"+(vt.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5."),1),vt.setup({useHTML5Audio:!0,preferFlash:!1})),st(),!ut&&Ut&&(Bt.push(C.needFlash),vt.setup({flashLoadTimeout:1})),Mt.removeEventListener&&Mt.removeEventListener("DOMContentLoaded",S,!1),T(),!0)},rt=function(){return"complete"===Mt.readyState&&(S(),Mt.detachEvent("onreadystatechange",rt)),!0},I=function(){At=!0,S(),ot.remove(r,"load",I)},lt(),ot.add(r,"focus",O),ot.add(r,"load",b),ot.add(r,"load",I),Mt.addEventListener?Mt.addEventListener("DOMContentLoaded",S,!1):Mt.attachEvent?Mt.attachEvent("onreadystatechange",rt):(d("onload",!1),R({type:"NO_DOM2_EVENTS",fatal:!0}))}if(!r||!r.document)throw new Error("SoundManager requires a browser with window and document objects.");var a=null;r.SM2_DEFER!==s&&SM2_DEFER||(a=new o),"object"==typeof t&&t&&"object"==typeof t.exports?(t.exports.SoundManager=o,t.exports.soundManager=a):(i=function(){function t(t){if(!r.soundManager&&t instanceof Function){var e=t(o);e instanceof o&&(r.soundManager=e)}return r.soundManager}return{constructor:o,getInstance:t}}.call(e,n,e,t),!(void 0!==i&&(t.exports=i))),r.SoundManager=o,r.soundManager=a}(window)}).call(e,n(8)(t))},,,function(t,e,n){var i,r;!function(s,o){i=[n(26),n(7)],r=function(t,e){return o(t,e)}.apply(e,i),!(void 0!==r&&(t.exports=r))}(this,function(t,e){"use strict";var n=t.ChildViewContainer;return t.ChildViewContainer=function(t,e){var n=function(t){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),e.each(t,this.add,this)};e.extend(n.prototype,{add:function(t,e){var n=t.cid;return this._views[n]=t,t.model&&(this._indexByModel[t.model.cid]=n),e&&(this._indexByCustom[e]=n),this._updateLength(),this},findByModel:function(t){return this.findByModelCid(t.cid)},findByModelCid:function(t){var e=this._indexByModel[t];return this.findByCid(e)},findByCustom:function(t){var e=this._indexByCustom[t];return this.findByCid(e)},findByIndex:function(t){return e.values(this._views)[t]},findByCid:function(t){return this._views[t]},remove:function(t){var n=t.cid;return t.model&&delete this._indexByModel[t.model.cid],e.any(this._indexByCustom,function(t,e){return t===n?(delete this._indexByCustom[e],!0):void 0},this),delete this._views[n],this._updateLength(),this},call:function(t){this.apply(t,e.tail(arguments))},apply:function(t,n){e.each(this._views,function(i){e.isFunction(i[t])&&i[t].apply(i,n||[])})},_updateLength:function(){this.length=e.size(this._views)}});var i=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce"];return e.each(i,function(t){n.prototype[t]=function(){var n=e.values(this._views),i=[n].concat(e.toArray(arguments));return e[t].apply(e,i)}}),n}(t,e),t.ChildViewContainer.VERSION="0.1.8",t.ChildViewContainer.noConflict=function(){return t.ChildViewContainer=n,this},t.ChildViewContainer})},function(t,e,n){var i,r;(function(s){!function(o){var a="object"==typeof self&&self.self==self&&self||"object"==typeof s&&s.global==s&&s;i=[n(7),n(2),e],r=function(t,e,n){a.Backbone=o(a,n,t,e)}.apply(e,i),!(void 0!==r&&(t.exports=r))}(function(t,e,n,i){var r=t.Backbone,s=[].slice;e.VERSION="1.2.1",e.$=i,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var o=function(t,e,i){switch(t){case 1:return function(){return n[e](this[i])};case 2:return function(t){return n[e](this[i],t)};case 3:return function(t,r){return n[e](this[i],t,r)};case 4:return function(t,r,s){return n[e](this[i],t,r,s)};default:return function(){var t=s.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=o(e,r,i))})},u=e.Events={},l=/\s+/,h=function(t,e,i,r,s){var o,a=0;if(i&&"object"==typeof i){void 0!==r&&"context"in s&&void 0===s.context&&(s.context=r);for(o=n.keys(i);a<o.length;a++)e=t(e,o[a],i[o[a]],s)}else if(i&&l.test(i))for(o=i.split(l);a<o.length;a++)e=t(e,o[a],r,s);else e=t(e,i,r,s);return e};u.on=function(t,e,n){return c(this,t,e,n)};var c=function(t,e,n,i,r){if(t._events=h(d,t._events||{},e,n,{context:i,ctx:t,listening:r}),r){var s=t._listeners||(t._listeners={});s[r.id]=r}return t};u.listenTo=function(t,e,i){if(!t)return this;var r=t._listenId||(t._listenId=n.uniqueId("l")),s=this._listeningTo||(this._listeningTo={}),o=s[r];if(!o){var a=this._listenId||(this._listenId=n.uniqueId("l"));o=s[r]={obj:t,objId:r,id:a,listeningTo:s,count:0}}return c(t,e,i,this,o),this};var d=function(t,e,n,i){if(n){var r=t[e]||(t[e]=[]),s=i.context,o=i.ctx,a=i.listening;a&&a.count++,r.push({callback:n,context:s,ctx:s||o,listening:a})}return t};u.off=function(t,e,n){return this._events?(this._events=h(f,this._events,t,e,{context:n,listeners:this._listeners}),this):this},u.stopListening=function(t,e,i){var r=this._listeningTo;if(!r)return this;for(var s=t?[t._listenId]:n.keys(r),o=0;o<s.length;o++){var a=r[s[o]];if(!a)break;a.obj.off(e,i,this)}return n.isEmpty(r)&&(this._listeningTo=void 0),this};var f=function(t,e,i,r){if(t){var s,o=0,a=r.context,u=r.listeners;if(e||i||a){for(var l=e?[e]:n.keys(t);o<l.length;o++){e=l[o];var h=t[e];if(!h)break;for(var c=[],d=0;d<h.length;d++){var f=h[d];i&&i!==f.callback&&i!==f.callback._callback||a&&a!==f.context?c.push(f):(s=f.listening,s&&0===--s.count&&(delete u[s.id],delete s.listeningTo[s.objId]))}c.length?t[e]=c:delete t[e]}return n.size(t)?t:void 0}for(var p=n.keys(u);o<p.length;o++)s=u[p[o]],delete u[s.id],delete s.listeningTo[s.objId]}};u.once=function(t,e,i){var r=h(p,{},t,e,n.bind(this.off,this));return this.on(r,void 0,i)},u.listenToOnce=function(t,e,i){var r=h(p,{},e,i,n.bind(this.stopListening,this,t));return this.listenTo(t,r)};var p=function(t,e,i,r){if(i){var s=t[e]=n.once(function(){r(e,s),i.apply(this,arguments)});s._callback=i}return t};u.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),i=0;e>i;i++)n[i]=arguments[i+1];return h(g,this._events,t,void 0,n),this};var g=function(t,e,n,i){if(t){var r=t[e],s=t.all;r&&s&&(s=s.slice()),r&&v(r,i),s&&v(s,[e].concat(i))}return t},v=function(t,e){var n,i=-1,r=t.length,s=e[0],o=e[1],a=e[2];switch(e.length){case 0:for(;++i<r;)(n=t[i]).callback.call(n.ctx);return;case 1:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s);return;case 2:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s,o);return;case 3:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s,o,a);return;default:for(;++i<r;)(n=t[i]).callback.apply(n.ctx,e);return}};u.bind=u.on,u.unbind=u.off,n.extend(e,u);var m=e.Model=function(t,e){var i=t||{};e||(e={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(i=this.parse(i,e)||{}),i=n.defaults({},i,n.result(this,"defaults")),this.set(i,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(m.prototype,u,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!n.iteratee(t,this)(this.attributes)},set:function(t,e,i){if(null==t)return this;var r;if("object"==typeof t?(r=t,i=e):(r={})[t]=e,i||(i={}),!this._validate(r,i))return!1;var s=i.unset,o=i.silent,a=[],u=this._changing;this._changing=!0,u||(this._previousAttributes=n.clone(this.attributes),this.changed={});var l=this.attributes,h=this.changed,c=this._previousAttributes;this.idAttribute in r&&(this.id=r[this.idAttribute]);for(var d in r)e=r[d],n.isEqual(l[d],e)||a.push(d),n.isEqual(c[d],e)?delete h[d]:h[d]=e,s?delete l[d]:l[d]=e;if(!o){a.length&&(this._pending=i);for(var f=0;f<a.length;f++)this.trigger("change:"+a[f],this,l[a[f]],i)}if(u)return this;if(!o)for(;this._pending;)i=this._pending,this._pending=!1,this.trigger("change",this,i);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var i in this.attributes)e[i]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?n.clone(this.changed):!1;var e=this._changing?this._previousAttributes:this.attributes,i={};for(var r in t){var s=t[r];n.isEqual(e[r],s)||(i[r]=s)}return n.size(i)?i:!1},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=n.extend({parse:!0},t);var e=this,i=t.success;return t.success=function(n){var r=t.parse?e.parse(n,t):n;return e.set(r,t)?(i&&i.call(t.context,e,n,t),void e.trigger("sync",e,n,t)):!1},V(this,t),this.sync("read",this,t)},save:function(t,e,i){var r;null==t||"object"==typeof t?(r=t,i=e):(r={})[t]=e,i=n.extend({validate:!0,parse:!0},i);var s=i.wait;if(r&&!s){if(!this.set(r,i))return!1}else if(!this._validate(r,i))return!1;var o=this,a=i.success,u=this.attributes;i.success=function(t){o.attributes=u;var e=i.parse?o.parse(t,i):t;return s&&(e=n.extend({},r,e)),e&&!o.set(e,i)?!1:(a&&a.call(i.context,o,t,i),void o.trigger("sync",o,t,i))},V(this,i),r&&s&&(this.attributes=n.extend({},u,r));var l=this.isNew()?"create":i.patch?"patch":"update";"patch"!==l||i.attrs||(i.attrs=r);var h=this.sync(l,this,i);return this.attributes=u,h},destroy:function(t){t=t?n.clone(t):{};var e=this,i=t.success,r=t.wait,s=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(n){r&&s(),i&&i.call(t.context,e,n,t),e.isNew()||e.trigger("sync",e,n,t)};var o=!1;return this.isNew()?n.defer(t.success):(V(this,t),o=this.sync("delete",this,t)),r||s(),o},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||N();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.defaults({validate:!0},t))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var i=this.validationError=this.validate(t,e)||null;return i?(this.trigger("invalid",this,i,n.extend(e,{validationError:i})),!1):!0}});var _={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};a(m,_,"attributes");var y=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,n.extend({silent:!0},e))},w={add:!0,remove:!0,merge:!0},b={add:!0,remove:!1};n.extend(y.prototype,u,{model:m,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,n.extend({merge:!1},e,b))},remove:function(t,e){e=n.extend({},e);var i=!n.isArray(t);t=i?[t]:n.clone(t);var r=this._removeModels(t,e);return!e.silent&&r&&this.trigger("update",this,e),i?r[0]:r},set:function(t,e){e=n.defaults({},e,w),e.parse&&!this._isModel(t)&&(t=this.parse(t,e));var i=!n.isArray(t);t=i?t?[t]:[]:t.slice();var r,s,o,a,u,l=e.at;null!=l&&(l=+l),0>l&&(l+=this.length+1);for(var h=this.comparator&&null==l&&e.sort!==!1,c=n.isString(this.comparator)?this.comparator:null,d=[],f=[],p={},g=e.add,v=e.merge,m=e.remove,_=!h&&g&&m?[]:!1,y=!1,b=0;b<t.length;b++){if(o=t[b],a=this.get(o))m&&(p[a.cid]=!0),v&&o!==a&&(o=this._isModel(o)?o.attributes:o,e.parse&&(o=a.parse(o,e)),a.set(o,e),h&&!u&&a.hasChanged(c)&&(u=!0)),t[b]=a;else if(g){if(s=t[b]=this._prepareModel(o,e),!s)continue;d.push(s),this._addReference(s,e)}s=a||s,s&&(r=this.modelId(s.attributes),!_||!s.isNew()&&p[r]||(_.push(s),y=y||!this.models[b]||s.cid!==this.models[b].cid),p[r]=!0)}if(m){for(var b=0;b<this.length;b++)p[(s=this.models[b]).cid]||f.push(s);f.length&&this._removeModels(f,e)}if(d.length||y)if(h&&(u=!0),this.length+=d.length,null!=l)for(var b=0;b<d.length;b++)this.models.splice(l+b,0,d[b]);else{_&&(this.models.length=0);for(var x=_||d,b=0;b<x.length;b++)this.models.push(x[b])}if(u&&this.sort({silent:!0}),!e.silent){for(var E=null!=l?n.clone(e):e,b=0;b<d.length;b++)null!=l&&(E.index=l+b),(s=d[b]).trigger("add",s,this,E);(u||y)&&this.trigger("sort",this,e),(d.length||f.length)&&this.trigger("update",this,e)}return i?t[0]:t},reset:function(t,e){e=e?n.clone(e):{};for(var i=0;i<this.models.length;i++)this._removeReference(this.models[i],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return s.apply(this.models,arguments)},get:function(t){if(null==t)return void 0;var e=this.modelId(this._isModel(t)?t.attributes:t);return this._byId[t]||this._byId[e]||this._byId[t.cid]},at:function(t){return 0>t&&(t+=this.length),this.models[t]},where:function(t,e){var i=n.matches(t);return this[e?"find":"filter"](function(t){return i(t.attributes)})},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={}),n.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return n.invoke(this.models,"get",t)},fetch:function(t){t=n.extend({parse:!0},t);var e=t.success,i=this;return t.success=function(n){var r=t.reset?"reset":"set";i[r](n,t),e&&e.call(t.context,i,n,t),i.trigger("sync",i,n,t)},V(this,t),this.sync("read",this,t)},create:function(t,e){e=e?n.clone(e):{};var i=e.wait;if(t=this._prepareModel(t,e),!t)return!1;i||this.add(t,e);var r=this,s=e.success;return e.success=function(t,e,n){i&&r.add(t,n),s&&s.call(n.context,t,e,n)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;e=e?n.clone(e):{},e.collection=this;var i=new this.model(t,e);return i.validationError?(this.trigger("invalid",this,i.validationError,e),!1):i},_removeModels:function(t,e){for(var n=[],i=0;i<t.length;i++){var r=this.get(t[i]);if(r){var s=this.indexOf(r);this.models.splice(s,1),this.length--,e.silent||(e.index=s,r.trigger("remove",r,this,e)),n.push(r),this._removeReference(r,e)}}return n.length?n:!1},_isModel:function(t){return t instanceof m},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,i){if("add"!==t&&"remove"!==t||n===this){if("destroy"===t&&this.remove(e,i),"change"===t){var r=this.modelId(e.previousAttributes()),s=this.modelId(e.attributes);r!==s&&(null!=r&&delete this._byId[r],null!=s&&(this._byId[s]=e))}this.trigger.apply(this,arguments)}}});var x={forEach:3,each:3,map:3,collect:3,reduce:4,foldl:4,inject:4,reduceRight:4,foldr:4,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:2,contains:2,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3};a(y,x,"models");var E=["groupBy","countBy","sortBy","indexBy"];n.each(E,function(t){n[t]&&(y.prototype[t]=function(e,i){var r=n.isFunction(e)?e:function(t){return t.get(e)};return n[t](this.models,r,i)})});var M=e.View=function(t){this.cid=n.uniqueId("view"),n.extend(this,n.pick(t,C)),this._ensureElement(),this.initialize.apply(this,arguments)},O=/^(\S+)\s*(.*)$/,C=["model","collection","el","id","attributes","className","tagName","events"];n.extend(M.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=n.result(this,"events")),!t)return this;this.undelegateEvents();for(var e in t){var i=t[e];if(n.isFunction(i)||(i=this[i]),i){var r=e.match(O);this.delegate(r[1],r[2],n.bind(i,this))}}return this},delegate:function(t,e,n){return this.$el.on(t+".delegateEvents"+this.cid,e,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,n){return this.$el.off(t+".delegateEvents"+this.cid,e,n),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var t=n.extend({},n.result(this,"attributes"));this.id&&(t.id=n.result(this,"id")),this.className&&(t["class"]=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),e.sync=function(t,i,r){var s=T[t];n.defaults(r||(r={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var o={type:s,dataType:"json"};if(r.url||(o.url=n.result(i,"url")||N()),null!=r.data||!i||"create"!==t&&"update"!==t&&"patch"!==t||(o.contentType="application/json",o.data=JSON.stringify(r.attrs||i.toJSON(r))),r.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{}),r.emulateHTTP&&("PUT"===s||"DELETE"===s||"PATCH"===s)){o.type="POST",r.emulateJSON&&(o.data._method=s);var a=r.beforeSend;r.beforeSend=function(t){return t.setRequestHeader("X-HTTP-Method-Override",s),a?a.apply(this,arguments):void 0}}"GET"===o.type||r.emulateJSON||(o.processData=!1);var u=r.error;r.error=function(t,e,n){r.textStatus=e,r.errorThrown=n,u&&u.call(r.context,t,e,n)};var l=r.xhr=e.ajax(n.extend(o,r));return i.trigger("request",i,l,r),l};var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var S=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},I=/\((.*?)\)/g,k=/(\(\?)?:\w+/g,A=/\*\w+/g,P=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(S.prototype,u,{initialize:function(){},route:function(t,i,r){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(i)&&(r=i,i=""),r||(r=this[i]);var s=this;return e.history.route(t,function(n){var o=s._extractParameters(t,n);s.execute(r,o,i)!==!1&&(s.trigger.apply(s,["route:"+i].concat(o)),s.trigger("route",i,o),e.history.trigger("route",s,i,o))}),this},execute:function(t,e,n){t&&t.apply(this,e)},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(P,"\\$&").replace(I,"(?:$1)?").replace(k,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return n.map(i,function(t,e){return e===i.length-1?t||null:t?decodeURIComponent(t):null})}});var R=e.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},H=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,L=/#.*$/;R.started=!1,n.extend(R.prototype,u,{interval:50,atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:function(){var t=this.decodeFragment(this.location.pathname),e=t.slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(H,"")},start:function(t){if(R.started)throw new Error("Backbone.history has already been started");if(R.started=!0,this.options=n.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window,this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(D,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var i=document.body,r=i.insertBefore(this.iframe,i.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};return this._usePushState?s("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?s("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.options.silent?void 0:this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),R.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment?!1:(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return this.matchRoot()?(t=this.fragment=this.getFragment(t),n.any(this.handlers,function(e){return e.route.test(t)?(e.callback(t),!0):void 0})):!1},navigate:function(t,e){if(!R.started)return!1;e&&e!==!0||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;(""===t||"?"===t.charAt(0))&&(n=n.slice(0,-1)||"/");var i=n+t;if(t=this.decodeFragment(t.replace(L,"")),
  this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var i=t.href.replace(/(javascript:|#).*$/,"");t.replace(i+"#"+e)}else t.hash="#"+e}}),e.history=new R;var F=function(t,e){var i,r=this;i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e);var s=function(){this.constructor=i};return s.prototype=r.prototype,i.prototype=new s,t&&n.extend(i.prototype,t),i.__super__=r.prototype,i};m.extend=y.extend=S.extend=M.extend=R.extend=F;var N=function(){throw new Error('A "url" property or function must be specified')},V=function(t,e){var n=e.error;e.error=function(i){n&&n.call(e.context,t,i,e),t.trigger("error",t,i,e)}};return e})}).call(e,function(){return this}())},function(t,e,n){var i,r;!function(s,o){i=[n(28),n(7)],r=function(t,e){return o(t,e)}.apply(e,i),!(void 0!==r&&(t.exports=r))}(this,function(t,e){"use strict";var n=t.Wreqr,i=t.Wreqr={};return t.Wreqr.VERSION="1.3.3",t.Wreqr.noConflict=function(){return t.Wreqr=n,this},i.Handlers=function(t,e){var n=function(t){this.options=t,this._wreqrHandlers={},e.isFunction(this.initialize)&&this.initialize(t)};return n.extend=t.Model.extend,e.extend(n.prototype,t.Events,{setHandlers:function(t){e.each(t,function(t,n){var i=null;e.isObject(t)&&!e.isFunction(t)&&(i=t.context,t=t.callback),this.setHandler(n,t,i)},this)},setHandler:function(t,e,n){var i={callback:e,context:n};this._wreqrHandlers[t]=i,this.trigger("handler:add",t,e,n)},hasHandler:function(t){return!!this._wreqrHandlers[t]},getHandler:function(t){var e=this._wreqrHandlers[t];if(e)return function(){return e.callback.apply(e.context,arguments)}},removeHandler:function(t){delete this._wreqrHandlers[t]},removeAllHandlers:function(){this._wreqrHandlers={}}}),n}(t,e),i.CommandStorage=function(){var n=function(t){this.options=t,this._commands={},e.isFunction(this.initialize)&&this.initialize(t)};return e.extend(n.prototype,t.Events,{getCommands:function(t){var e=this._commands[t];return e||(e={command:t,instances:[]},this._commands[t]=e),e},addCommand:function(t,e){var n=this.getCommands(t);n.instances.push(e)},clearCommands:function(t){var e=this.getCommands(t);e.instances=[]}}),n}(),i.Commands=function(t,e){return t.Handlers.extend({storageType:t.CommandStorage,constructor:function(e){this.options=e||{},this._initializeStorage(this.options),this.on("handler:add",this._executeCommands,this),t.Handlers.prototype.constructor.apply(this,arguments)},execute:function(t){t=arguments[0];var n=e.rest(arguments);this.hasHandler(t)?this.getHandler(t).apply(this,n):this.storage.addCommand(t,n)},_executeCommands:function(t,n,i){var r=this.storage.getCommands(t);e.each(r.instances,function(t){n.apply(i,t)}),this.storage.clearCommands(t)},_initializeStorage:function(t){var n,i=t.storageType||this.storageType;n=e.isFunction(i)?new i:i,this.storage=n}})}(i,e),i.RequestResponse=function(t,e){return t.Handlers.extend({request:function(t){return this.hasHandler(t)?this.getHandler(t).apply(this,e.rest(arguments)):void 0}})}(i,e),i.EventAggregator=function(t,e){var n=function(){};return n.extend=t.Model.extend,e.extend(n.prototype,t.Events),n}(t,e),i.Channel=function(n){var i=function(e){this.vent=new t.Wreqr.EventAggregator,this.reqres=new t.Wreqr.RequestResponse,this.commands=new t.Wreqr.Commands,this.channelName=e};return e.extend(i.prototype,{reset:function(){return this.vent.off(),this.vent.stopListening(),this.reqres.removeAllHandlers(),this.commands.removeAllHandlers(),this},connectEvents:function(t,e){return this._connect("vent",t,e),this},connectCommands:function(t,e){return this._connect("commands",t,e),this},connectRequests:function(t,e){return this._connect("reqres",t,e),this},_connect:function(t,n,i){if(n){i=i||this;var r="vent"===t?"on":"setHandler";e.each(n,function(n,s){this[t][r](s,e.bind(n,i))},this)}}}),i}(i),i.radio=function(t,e){var n=function(){this._channels={},this.vent={},this.commands={},this.reqres={},this._proxyMethods()};e.extend(n.prototype,{channel:function(t){if(!t)throw new Error("Channel must receive a name");return this._getChannel(t)},_getChannel:function(e){var n=this._channels[e];return n||(n=new t.Channel(e),this._channels[e]=n),n},_proxyMethods:function(){e.each(["vent","commands","reqres"],function(t){e.each(i[t],function(e){this[t][e]=r(this,t,e)},this)},this)}});var i={vent:["on","off","trigger","once","stopListening","listenTo","listenToOnce"],commands:["execute","setHandler","setHandlers","removeHandler","removeAllHandlers"],reqres:["request","setHandler","setHandlers","removeHandler","removeAllHandlers"]},r=function(t,n,i){return function(r){var s=t._getChannel(r)[n];return s[i].apply(s,e.rest(arguments))}};return new n}(i,e),t.Wreqr})},function(t,e,n){var i,r;(function(s){!function(o){var a="object"==typeof self&&self.self==self&&self||"object"==typeof s&&s.global==s&&s;i=[n(7),n(2),e],r=function(t,e,n){a.Backbone=o(a,n,t,e)}.apply(e,i),!(void 0!==r&&(t.exports=r))}(function(t,e,n,i){var r=t.Backbone,s=[].slice;e.VERSION="1.2.1",e.$=i,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var o=function(t,e,i){switch(t){case 1:return function(){return n[e](this[i])};case 2:return function(t){return n[e](this[i],t)};case 3:return function(t,r){return n[e](this[i],t,r)};case 4:return function(t,r,s){return n[e](this[i],t,r,s)};default:return function(){var t=s.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=o(e,r,i))})},u=e.Events={},l=/\s+/,h=function(t,e,i,r,s){var o,a=0;if(i&&"object"==typeof i){void 0!==r&&"context"in s&&void 0===s.context&&(s.context=r);for(o=n.keys(i);a<o.length;a++)e=t(e,o[a],i[o[a]],s)}else if(i&&l.test(i))for(o=i.split(l);a<o.length;a++)e=t(e,o[a],r,s);else e=t(e,i,r,s);return e};u.on=function(t,e,n){return c(this,t,e,n)};var c=function(t,e,n,i,r){if(t._events=h(d,t._events||{},e,n,{context:i,ctx:t,listening:r}),r){var s=t._listeners||(t._listeners={});s[r.id]=r}return t};u.listenTo=function(t,e,i){if(!t)return this;var r=t._listenId||(t._listenId=n.uniqueId("l")),s=this._listeningTo||(this._listeningTo={}),o=s[r];if(!o){var a=this._listenId||(this._listenId=n.uniqueId("l"));o=s[r]={obj:t,objId:r,id:a,listeningTo:s,count:0}}return c(t,e,i,this,o),this};var d=function(t,e,n,i){if(n){var r=t[e]||(t[e]=[]),s=i.context,o=i.ctx,a=i.listening;a&&a.count++,r.push({callback:n,context:s,ctx:s||o,listening:a})}return t};u.off=function(t,e,n){return this._events?(this._events=h(f,this._events,t,e,{context:n,listeners:this._listeners}),this):this},u.stopListening=function(t,e,i){var r=this._listeningTo;if(!r)return this;for(var s=t?[t._listenId]:n.keys(r),o=0;o<s.length;o++){var a=r[s[o]];if(!a)break;a.obj.off(e,i,this)}return n.isEmpty(r)&&(this._listeningTo=void 0),this};var f=function(t,e,i,r){if(t){var s,o=0,a=r.context,u=r.listeners;if(e||i||a){for(var l=e?[e]:n.keys(t);o<l.length;o++){e=l[o];var h=t[e];if(!h)break;for(var c=[],d=0;d<h.length;d++){var f=h[d];i&&i!==f.callback&&i!==f.callback._callback||a&&a!==f.context?c.push(f):(s=f.listening,s&&0===--s.count&&(delete u[s.id],delete s.listeningTo[s.objId]))}c.length?t[e]=c:delete t[e]}return n.size(t)?t:void 0}for(var p=n.keys(u);o<p.length;o++)s=u[p[o]],delete u[s.id],delete s.listeningTo[s.objId]}};u.once=function(t,e,i){var r=h(p,{},t,e,n.bind(this.off,this));return this.on(r,void 0,i)},u.listenToOnce=function(t,e,i){var r=h(p,{},e,i,n.bind(this.stopListening,this,t));return this.listenTo(t,r)};var p=function(t,e,i,r){if(i){var s=t[e]=n.once(function(){r(e,s),i.apply(this,arguments)});s._callback=i}return t};u.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),i=0;e>i;i++)n[i]=arguments[i+1];return h(g,this._events,t,void 0,n),this};var g=function(t,e,n,i){if(t){var r=t[e],s=t.all;r&&s&&(s=s.slice()),r&&v(r,i),s&&v(s,[e].concat(i))}return t},v=function(t,e){var n,i=-1,r=t.length,s=e[0],o=e[1],a=e[2];switch(e.length){case 0:for(;++i<r;)(n=t[i]).callback.call(n.ctx);return;case 1:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s);return;case 2:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s,o);return;case 3:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s,o,a);return;default:for(;++i<r;)(n=t[i]).callback.apply(n.ctx,e);return}};u.bind=u.on,u.unbind=u.off,n.extend(e,u);var m=e.Model=function(t,e){var i=t||{};e||(e={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(i=this.parse(i,e)||{}),i=n.defaults({},i,n.result(this,"defaults")),this.set(i,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(m.prototype,u,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!n.iteratee(t,this)(this.attributes)},set:function(t,e,i){if(null==t)return this;var r;if("object"==typeof t?(r=t,i=e):(r={})[t]=e,i||(i={}),!this._validate(r,i))return!1;var s=i.unset,o=i.silent,a=[],u=this._changing;this._changing=!0,u||(this._previousAttributes=n.clone(this.attributes),this.changed={});var l=this.attributes,h=this.changed,c=this._previousAttributes;this.idAttribute in r&&(this.id=r[this.idAttribute]);for(var d in r)e=r[d],n.isEqual(l[d],e)||a.push(d),n.isEqual(c[d],e)?delete h[d]:h[d]=e,s?delete l[d]:l[d]=e;if(!o){a.length&&(this._pending=i);for(var f=0;f<a.length;f++)this.trigger("change:"+a[f],this,l[a[f]],i)}if(u)return this;if(!o)for(;this._pending;)i=this._pending,this._pending=!1,this.trigger("change",this,i);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var i in this.attributes)e[i]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?n.clone(this.changed):!1;var e=this._changing?this._previousAttributes:this.attributes,i={};for(var r in t){var s=t[r];n.isEqual(e[r],s)||(i[r]=s)}return n.size(i)?i:!1},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=n.extend({parse:!0},t);var e=this,i=t.success;return t.success=function(n){var r=t.parse?e.parse(n,t):n;return e.set(r,t)?(i&&i.call(t.context,e,n,t),void e.trigger("sync",e,n,t)):!1},V(this,t),this.sync("read",this,t)},save:function(t,e,i){var r;null==t||"object"==typeof t?(r=t,i=e):(r={})[t]=e,i=n.extend({validate:!0,parse:!0},i);var s=i.wait;if(r&&!s){if(!this.set(r,i))return!1}else if(!this._validate(r,i))return!1;var o=this,a=i.success,u=this.attributes;i.success=function(t){o.attributes=u;var e=i.parse?o.parse(t,i):t;return s&&(e=n.extend({},r,e)),e&&!o.set(e,i)?!1:(a&&a.call(i.context,o,t,i),void o.trigger("sync",o,t,i))},V(this,i),r&&s&&(this.attributes=n.extend({},u,r));var l=this.isNew()?"create":i.patch?"patch":"update";"patch"!==l||i.attrs||(i.attrs=r);var h=this.sync(l,this,i);return this.attributes=u,h},destroy:function(t){t=t?n.clone(t):{};var e=this,i=t.success,r=t.wait,s=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(n){r&&s(),i&&i.call(t.context,e,n,t),e.isNew()||e.trigger("sync",e,n,t)};var o=!1;return this.isNew()?n.defer(t.success):(V(this,t),o=this.sync("delete",this,t)),r||s(),o},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||N();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.defaults({validate:!0},t))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var i=this.validationError=this.validate(t,e)||null;return i?(this.trigger("invalid",this,i,n.extend(e,{validationError:i})),!1):!0}});var _={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};a(m,_,"attributes");var y=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,n.extend({silent:!0},e))},w={add:!0,remove:!0,merge:!0},b={add:!0,remove:!1};n.extend(y.prototype,u,{model:m,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,n.extend({merge:!1},e,b))},remove:function(t,e){e=n.extend({},e);var i=!n.isArray(t);t=i?[t]:n.clone(t);var r=this._removeModels(t,e);return!e.silent&&r&&this.trigger("update",this,e),i?r[0]:r},set:function(t,e){e=n.defaults({},e,w),e.parse&&!this._isModel(t)&&(t=this.parse(t,e));var i=!n.isArray(t);t=i?t?[t]:[]:t.slice();var r,s,o,a,u,l=e.at;null!=l&&(l=+l),0>l&&(l+=this.length+1);for(var h=this.comparator&&null==l&&e.sort!==!1,c=n.isString(this.comparator)?this.comparator:null,d=[],f=[],p={},g=e.add,v=e.merge,m=e.remove,_=!h&&g&&m?[]:!1,y=!1,b=0;b<t.length;b++){if(o=t[b],a=this.get(o))m&&(p[a.cid]=!0),v&&o!==a&&(o=this._isModel(o)?o.attributes:o,e.parse&&(o=a.parse(o,e)),a.set(o,e),h&&!u&&a.hasChanged(c)&&(u=!0)),t[b]=a;else if(g){if(s=t[b]=this._prepareModel(o,e),!s)continue;d.push(s),this._addReference(s,e)}s=a||s,s&&(r=this.modelId(s.attributes),!_||!s.isNew()&&p[r]||(_.push(s),y=y||!this.models[b]||s.cid!==this.models[b].cid),p[r]=!0)}if(m){for(var b=0;b<this.length;b++)p[(s=this.models[b]).cid]||f.push(s);f.length&&this._removeModels(f,e)}if(d.length||y)if(h&&(u=!0),this.length+=d.length,null!=l)for(var b=0;b<d.length;b++)this.models.splice(l+b,0,d[b]);else{_&&(this.models.length=0);for(var x=_||d,b=0;b<x.length;b++)this.models.push(x[b])}if(u&&this.sort({silent:!0}),!e.silent){for(var E=null!=l?n.clone(e):e,b=0;b<d.length;b++)null!=l&&(E.index=l+b),(s=d[b]).trigger("add",s,this,E);(u||y)&&this.trigger("sort",this,e),(d.length||f.length)&&this.trigger("update",this,e)}return i?t[0]:t},reset:function(t,e){e=e?n.clone(e):{};for(var i=0;i<this.models.length;i++)this._removeReference(this.models[i],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return s.apply(this.models,arguments)},get:function(t){if(null==t)return void 0;var e=this.modelId(this._isModel(t)?t.attributes:t);return this._byId[t]||this._byId[e]||this._byId[t.cid]},at:function(t){return 0>t&&(t+=this.length),this.models[t]},where:function(t,e){var i=n.matches(t);return this[e?"find":"filter"](function(t){return i(t.attributes)})},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={}),n.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return n.invoke(this.models,"get",t)},fetch:function(t){t=n.extend({parse:!0},t);var e=t.success,i=this;return t.success=function(n){var r=t.reset?"reset":"set";i[r](n,t),e&&e.call(t.context,i,n,t),i.trigger("sync",i,n,t)},V(this,t),this.sync("read",this,t)},create:function(t,e){e=e?n.clone(e):{};var i=e.wait;if(t=this._prepareModel(t,e),!t)return!1;i||this.add(t,e);var r=this,s=e.success;return e.success=function(t,e,n){i&&r.add(t,n),s&&s.call(n.context,t,e,n)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;e=e?n.clone(e):{},e.collection=this;var i=new this.model(t,e);return i.validationError?(this.trigger("invalid",this,i.validationError,e),!1):i},_removeModels:function(t,e){for(var n=[],i=0;i<t.length;i++){var r=this.get(t[i]);if(r){var s=this.indexOf(r);this.models.splice(s,1),this.length--,e.silent||(e.index=s,r.trigger("remove",r,this,e)),n.push(r),this._removeReference(r,e)}}return n.length?n:!1},_isModel:function(t){return t instanceof m},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,i){if("add"!==t&&"remove"!==t||n===this){if("destroy"===t&&this.remove(e,i),"change"===t){var r=this.modelId(e.previousAttributes()),s=this.modelId(e.attributes);r!==s&&(null!=r&&delete this._byId[r],null!=s&&(this._byId[s]=e))}this.trigger.apply(this,arguments)}}});var x={forEach:3,each:3,map:3,collect:3,reduce:4,foldl:4,inject:4,reduceRight:4,foldr:4,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:2,contains:2,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3};a(y,x,"models");var E=["groupBy","countBy","sortBy","indexBy"];n.each(E,function(t){n[t]&&(y.prototype[t]=function(e,i){var r=n.isFunction(e)?e:function(t){return t.get(e)};return n[t](this.models,r,i)})});var M=e.View=function(t){this.cid=n.uniqueId("view"),n.extend(this,n.pick(t,C)),this._ensureElement(),this.initialize.apply(this,arguments)},O=/^(\S+)\s*(.*)$/,C=["model","collection","el","id","attributes","className","tagName","events"];n.extend(M.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=n.result(this,"events")),!t)return this;this.undelegateEvents();for(var e in t){var i=t[e];if(n.isFunction(i)||(i=this[i]),i){var r=e.match(O);this.delegate(r[1],r[2],n.bind(i,this))}}return this},delegate:function(t,e,n){return this.$el.on(t+".delegateEvents"+this.cid,e,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,n){return this.$el.off(t+".delegateEvents"+this.cid,e,n),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var t=n.extend({},n.result(this,"attributes"));this.id&&(t.id=n.result(this,"id")),this.className&&(t["class"]=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),e.sync=function(t,i,r){var s=T[t];n.defaults(r||(r={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var o={type:s,dataType:"json"};if(r.url||(o.url=n.result(i,"url")||N()),null!=r.data||!i||"create"!==t&&"update"!==t&&"patch"!==t||(o.contentType="application/json",o.data=JSON.stringify(r.attrs||i.toJSON(r))),r.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{}),r.emulateHTTP&&("PUT"===s||"DELETE"===s||"PATCH"===s)){o.type="POST",r.emulateJSON&&(o.data._method=s);var a=r.beforeSend;r.beforeSend=function(t){return t.setRequestHeader("X-HTTP-Method-Override",s),a?a.apply(this,arguments):void 0}}"GET"===o.type||r.emulateJSON||(o.processData=!1);var u=r.error;r.error=function(t,e,n){r.textStatus=e,r.errorThrown=n,u&&u.call(r.context,t,e,n)};var l=r.xhr=e.ajax(n.extend(o,r));return i.trigger("request",i,l,r),l};var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var S=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},I=/\((.*?)\)/g,k=/(\(\?)?:\w+/g,A=/\*\w+/g,P=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(S.prototype,u,{initialize:function(){},route:function(t,i,r){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(i)&&(r=i,i=""),r||(r=this[i]);var s=this;return e.history.route(t,function(n){var o=s._extractParameters(t,n);s.execute(r,o,i)!==!1&&(s.trigger.apply(s,["route:"+i].concat(o)),s.trigger("route",i,o),e.history.trigger("route",s,i,o))}),this},execute:function(t,e,n){t&&t.apply(this,e)},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(P,"\\$&").replace(I,"(?:$1)?").replace(k,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return n.map(i,function(t,e){return e===i.length-1?t||null:t?decodeURIComponent(t):null})}});var R=e.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},H=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,L=/#.*$/;R.started=!1,n.extend(R.prototype,u,{interval:50,atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:function(){var t=this.decodeFragment(this.location.pathname),e=t.slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(H,"")},start:function(t){if(R.started)throw new Error("Backbone.history has already been started");if(R.started=!0,this.options=n.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window,this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(D,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var i=document.body,r=i.insertBefore(this.iframe,i.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};return this._usePushState?s("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?s("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.options.silent?void 0:this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),R.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment?!1:(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return this.matchRoot()?(t=this.fragment=this.getFragment(t),n.any(this.handlers,function(e){return e.route.test(t)?(e.callback(t),!0):void 0})):!1},navigate:function(t,e){if(!R.started)return!1;e&&e!==!0||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;(""===t||"?"===t.charAt(0))&&(n=n.slice(0,-1)||"/");var i=n+t;if(t=this.decodeFragment(t.replace(L,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var i=t.href.replace(/(javascript:|#).*$/,"");t.replace(i+"#"+e)}else t.hash="#"+e}}),e.history=new R;var F=function(t,e){var i,r=this;i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e);var s=function(){this.constructor=i};return s.prototype=r.prototype,i.prototype=new s,t&&n.extend(i.prototype,t),i.__super__=r.prototype,i};m.extend=y.extend=S.extend=M.extend=R.extend=F;var N=function(){throw new Error('A "url" property or function must be specified')},V=function(t,e){var n=e.error;e.error=function(i){n&&n.call(e.context,t,i,e),t.trigger("error",t,i,e)}};return e})}).call(e,function(){return this}())}]);