@allurereport/web-allure2
Version:
The static files for Allure Classic Report
2 lines • 928 kB
JavaScript
/*! For license information please see app-a744a689.js.LICENSE.txt */
!function(){var t,e,n={3021:function(t,e,n){var r,i,o;o="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g,r=[n(8241),n(4339),e],i=function(t,e,n){o.Backbone=function(t,e,n,r){var i=t.Backbone,o=Array.prototype.slice;e.VERSION="1.6.0",e.$=r,e.noConflict=function(){return t.Backbone=i,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a,s=e.Events={},l=/\s+/,u=function(t,e,r,i,o){var a,s=0;if(r&&"object"==typeof r){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(a=n.keys(r);s<a.length;s++)e=u(t,e,a[s],r[a[s]],o)}else if(r&&l.test(r))for(a=r.split(l);s<a.length;s++)e=t(e,a[s],i,o);else e=t(e,r,i,o);return e};s.on=function(t,e,n){return this._events=u(c,this._events||{},t,e,{context:n,ctx:this,listening:a}),a&&((this._listeners||(this._listeners={}))[a.id]=a,a.interop=!1),this},s.listenTo=function(t,e,r){if(!t)return this;var i=t._listenId||(t._listenId=n.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),s=a=o[i];s||(this._listenId||(this._listenId=n.uniqueId("l")),s=a=o[i]=new g(this,t));var l=h(t,e,r,this);if(a=void 0,l)throw l;return s.interop&&s.on(e,r),this};var c=function(t,e,n,r){if(n){var i=t[e]||(t[e]=[]),o=r.context,a=r.ctx,s=r.listening;s&&s.count++,i.push({callback:n,context:o,ctx:o||a,listening:s})}return t},h=function(t,e,n,r){try{t.on(e,n,r)}catch(t){return t}};s.off=function(t,e,n){return this._events?(this._events=u(d,this._events,t,e,{context:n,listeners:this._listeners}),this):this},s.stopListening=function(t,e,r){var i=this._listeningTo;if(!i)return this;for(var o=t?[t._listenId]:n.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(e,r,this),s.interop&&s.off(e,r)}return n.isEmpty(i)&&(this._listeningTo=void 0),this};var d=function(t,e,r,i){if(t){var o,a=i.context,s=i.listeners,l=0;if(e||a||r){for(o=e?[e]:n.keys(t);l<o.length;l++){var u=t[e=o[l]];if(!u)break;for(var c=[],h=0;h<u.length;h++){var d=u[h];if(r&&r!==d.callback&&r!==d.callback._callback||a&&a!==d.context)c.push(d);else{var f=d.listening;f&&f.off(e,r)}}c.length?t[e]=c:delete t[e]}return t}for(o=n.keys(s);l<o.length;l++)s[o[l]].cleanup()}};s.once=function(t,e,n){var r=u(f,{},t,e,this.off.bind(this));return"string"==typeof t&&null==n&&(e=void 0),this.on(r,e,n)},s.listenToOnce=function(t,e,n){var r=u(f,{},e,n,this.stopListening.bind(this,t));return this.listenTo(t,r)};var f=function(t,e,r,i){if(r){var o=t[e]=n.once((function(){i(e,o),r.apply(this,arguments)}));o._callback=r}return t};s.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),r=0;r<e;r++)n[r]=arguments[r+1];return u(p,this._events,t,void 0,n),this};var p=function(t,e,n,r){if(t){var i=t[e],o=t.all;i&&o&&(o=o.slice()),i&&m(i,r),o&&m(o,[e].concat(r))}return t},m=function(t,e){var n,r=-1,i=t.length,o=e[0],a=e[1],s=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e);return}},g=function(t,e){this.id=t._listenId,this.listener=t,this.obj=e,this.interop=!0,this.count=0,this._events=void 0};g.prototype.on=s.on,g.prototype.off=function(t,e){var n;this.interop?(this._events=u(d,this._events,t,e,{context:void 0,listeners:void 0}),n=!this._events):(this.count--,n=0===this.count),n&&this.cleanup()},g.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},s.bind=s.on,s.unbind=s.off,n.extend(e,s);var v=e.Model=function(t,e){var r=t||{};e||(e={}),this.preinitialize.apply(this,arguments),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(r=this.parse(r,e)||{});var i=n.result(this,"defaults");r=n.defaults(n.extend({},i,r),i),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(v.prototype,s,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},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,r){if(null==t)return this;var i;if("object"==typeof t?(i=t,r=e):(i={})[t]=e,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,a=r.silent,s=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=n.clone(this.attributes),this.changed={});var u=this.attributes,c=this.changed,h=this._previousAttributes;for(var d in i)e=i[d],n.isEqual(u[d],e)||s.push(d),n.isEqual(h[d],e)?delete c[d]:c[d]=e,o?delete u[d]:u[d]=e;if(this.idAttribute in i){var f=this.id;this.id=this.get(this.idAttribute),this.trigger("changeId",this,f,r)}if(!a){s.length&&(this._pending=r);for(var p=0;p<s.length;p++)this.trigger("change:"+s[p],this,u[s[p]],r)}if(l)return this;if(!a)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);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 r in this.attributes)e[r]=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);var e,r=this._changing?this._previousAttributes:this.attributes,i={};for(var o in t){var a=t[o];n.isEqual(r[o],a)||(i[o]=a,e=!0)}return!!e&&i},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,r=t.success;return t.success=function(n){var i=t.parse?e.parse(n,t):n;if(!e.set(i,t))return!1;r&&r.call(t.context,e,n,t),e.trigger("sync",e,n,t)},$(this,t),this.sync("read",this,t)},save:function(t,e,r){var i;null==t||"object"==typeof t?(i=t,r=e):(i={})[t]=e;var o=(r=n.extend({validate:!0,parse:!0},r)).wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var a=this,s=r.success,l=this.attributes;r.success=function(t){a.attributes=l;var e=r.parse?a.parse(t,r):t;if(o&&(e=n.extend({},i,e)),e&&!a.set(e,r))return!1;s&&s.call(r.context,a,t,r),a.trigger("sync",a,t,r)},$(this,r),i&&o&&(this.attributes=n.extend({},l,i));var u=this.isNew()?"create":r.patch?"patch":"update";"patch"!==u||r.attrs||(r.attrs=i);var c=this.sync(u,this,r);return this.attributes=l,c},destroy:function(t){t=t?n.clone(t):{};var e=this,r=t.success,i=t.wait,o=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(n){i&&o(),r&&r.call(t.context,e,n,t),e.isNew()||e.trigger("sync",e,n,t)};var a=!1;return this.isNew()?n.defer(t.success):($(this,t),a=this.sync("delete",this,t)),i||o(),a},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||U();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.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;return!r||(this.trigger("invalid",this,r,n.extend(e,{validationError:r})),!1)}});var y=e.Collection=function(t,e){e||(e={}),this.preinitialize.apply(this,arguments),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))},b={add:!0,remove:!0,merge:!0},w={add:!0,remove:!1},_=function(t,e,n){n=Math.min(Math.max(n,0),t.length);var r,i=Array(t.length-n),o=e.length;for(r=0;r<i.length;r++)i[r]=t[r+n];for(r=0;r<o;r++)t[r+n]=e[r];for(r=0;r<i.length;r++)t[r+o+n]=i[r]};n.extend(y.prototype,s,{model:v,preinitialize:function(){},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,w))},remove:function(t,e){e=n.extend({},e);var r=!n.isArray(t);t=r?[t]:t.slice();var i=this._removeModels(t,e);return!e.silent&&i.length&&(e.changes={added:[],merged:[],removed:i},this.trigger("update",this,e)),r?i[0]:i},set:function(t,e){if(null!=t){(e=n.extend({},b,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var r=!n.isArray(t);t=r?[t]:t.slice();var i=e.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],l=[],u=[],c=[],h={},d=e.add,f=e.merge,p=e.remove,m=!1,g=this.comparator&&null==i&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(a=0;a<t.length;a++){o=t[a];var y=this.get(o);if(y){if(f&&o!==y){var w=this._isModel(o)?o.attributes:o;e.parse&&(w=y.parse(w,e)),y.set(w,e),u.push(y),g&&!m&&(m=y.hasChanged(v))}h[y.cid]||(h[y.cid]=!0,s.push(y)),t[a]=y}else d&&(o=t[a]=this._prepareModel(o,e))&&(l.push(o),this._addReference(o,e),h[o.cid]=!0,s.push(o))}if(p){for(a=0;a<this.length;a++)h[(o=this.models[a]).cid]||c.push(o);c.length&&this._removeModels(c,e)}var x=!1,k=!g&&d&&p;if(s.length&&k?(x=this.length!==s.length||n.some(this.models,(function(t,e){return t!==s[e]})),this.models.length=0,_(this.models,s,0),this.length=this.models.length):l.length&&(g&&(m=!0),_(this.models,l,null==i?this.length:i),this.length=this.models.length),m&&this.sort({silent:!0}),!e.silent){for(a=0;a<l.length;a++)null!=i&&(e.index=i+a),(o=l[a]).trigger("add",o,this,e);(m||x)&&this.trigger("sort",this,e),(l.length||c.length||u.length)&&(e.changes={added:l,removed:c,merged:u},this.trigger("update",this,e))}return r?t[0]:t}},reset:function(t,e){e=e?n.clone(e):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],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 o.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(this._isModel(t)?t.attributes:t,t.idAttribute)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var r=e.length;return n.isFunction(e)&&(e=e.bind(this)),1===r||n.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){var e=(t=n.extend({parse:!0},t)).success,r=this;return t.success=function(n){var i=t.reset?"reset":"set";r[i](n,t),e&&e.call(t.context,r,n,t),r.trigger("sync",r,n,t)},$(this,t),this.sync("read",this,t)},create:function(t,e){var r=(e=e?n.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;r||this.add(t,e);var i=this,o=e.success;return e.success=function(t,e,n){r&&(t.off("error",i._forwardPristineError,i),i.add(t,n)),o&&o.call(n.context,t,e,n)},r&&t.once("error",this._forwardPristineError,this),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,e){return t[e||this.model.prototype.idAttribute||"id"]},values:function(){return new k(this,C)},keys:function(){return new k(this,A)},entries:function(){return new k(this,O)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){return this._isModel(t)?(t.collection||(t.collection=this),t):((e=e?n.clone(e):{}).collection=this,(r=this.model.prototype?new this.model(t,e):this.model(t,e)).validationError?(this.trigger("invalid",this,r.validationError,e),!1):r);var r},_removeModels:function(t,e){for(var n=[],r=0;r<t.length;r++){var i=this.get(t[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];var a=this.modelId(i.attributes,i.idAttribute);null!=a&&delete this._byId[a],e.silent||(e.index=o,i.trigger("remove",i,this,e)),n.push(i),this._removeReference(i,e)}}return t.length>0&&!e.silent&&delete e.index,n},_isModel:function(t){return t instanceof v},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes,t.idAttribute);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,t.idAttribute);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){if(e){if(("add"===t||"remove"===t)&&n!==this)return;if("destroy"===t&&this.remove(e,r),"changeId"===t){var i=this.modelId(e.previousAttributes(),e.idAttribute),o=this.modelId(e.attributes,e.idAttribute);null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=e)}}this.trigger.apply(this,arguments)},_forwardPristineError:function(t,e,n){this.has(t)||this._onModelEvent("error",t,e,n)}});var x="function"==typeof Symbol&&Symbol.iterator;x&&(y.prototype[x]=y.prototype.values);var k=function(t,e){this._collection=t,this._kind=e,this._index=0},C=1,A=2,O=3;x&&(k.prototype[x]=function(){return this}),k.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var t,e=this._collection.at(this._index);if(this._index++,this._kind===C)t=e;else{var n=this._collection.modelId(e.attributes,e.idAttribute);t=this._kind===A?n:[n,e]}return{value:t,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var E=e.View=function(t){this.cid=n.uniqueId("view"),this.preinitialize.apply(this,arguments),n.extend(this,n.pick(t,P)),this._ensureElement(),this.initialize.apply(this,arguments)},S=/^(\S+)\s*(.*)$/,P=["model","collection","el","id","attributes","className","tagName","events"];n.extend(E.prototype,s,{tagName:"div",$:function(t){return this.$el.find(t)},preinitialize:function(){},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;for(var e in this.undelegateEvents(),t){var r=t[e];if(n.isFunction(r)||(r=this[r]),r){var i=e.match(S);this.delegate(i[1],i[2],r.bind(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)}});var j=function(t,e,r,i){n.each(r,(function(n,r){e[r]&&(t.prototype[r]=function(t,e,n,r){switch(e){case 1:return function(){return t[n](this[r])};case 2:return function(e){return t[n](this[r],e)};case 3:return function(e,i){return t[n](this[r],T(e,this),i)};case 4:return function(e,i,o){return t[n](this[r],T(e,this),i,o)};default:return function(){var e=o.call(arguments);return e.unshift(this[r]),t[n].apply(t,e)}}}(e,n,r,i))}))},T=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?M(t):n.isString(t)?function(e){return e.get(t)}:t},M=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}};n.each([[y,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,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,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models"],[v,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],(function(t){var e=t[0],r=t[1],i=t[2];e.mixin=function(t){var r=n.reduce(n.functions(t),(function(t,e){return t[e]=0,t}),{});j(e,t,r,i)},j(e,n,r,i)})),e.sync=function(t,r,i){var o=R[t];n.defaults(i||(i={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:o,dataType:"json"};if(i.url||(a.url=n.result(r,"url")||U()),null!=i.data||!r||"create"!==t&&"update"!==t&&"patch"!==t||(a.contentType="application/json",a.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){a.type="POST",i.emulateJSON&&(a.data._method=o);var s=i.beforeSend;i.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",o),s)return s.apply(this,arguments)}}"GET"===a.type||i.emulateJSON||(a.processData=!1);var l=i.error;i.error=function(t,e,n){i.textStatus=e,i.errorThrown=n,l&&l.call(i.context,t,e,n)};var u=i.xhr=e.ajax(n.extend(a,i));return r.trigger("request",r,u,i),u};var R={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var D=e.Router=function(t){t||(t={}),this.preinitialize.apply(this,arguments),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},N=/\((.*?)\)/g,V=/(\(\?)?:\w+/g,L=/\*\w+/g,B=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(D.prototype,s,{preinitialize:function(){},initialize:function(){},route:function(t,r,i){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return e.history.route(t,(function(n){var a=o._extractParameters(t,n);!1!==o.execute(i,a,r)&&(o.trigger.apply(o,["route:"+r].concat(a)),o.trigger("route",r,a),e.history.trigger("route",o,r,a))})),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(B,"\\$&").replace(N,"(?:$1)?").replace(V,(function(t,e){return e?t:"([^/?]+)"})).replace(L,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return n.map(r,(function(t,e){return e===r.length-1?t||null:t?decodeURIComponent(t):null}))}});var H=e.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},I=/^[#\/]|\s+$/g,z=/^\/+|\/+$/g,F=/#.*$/;H.started=!1,n.extend(H.prototype,s,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===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(I,"")},start:function(t){if(H.started)throw new Error("Backbone.history has already been started");if(H.started=!0,this.options=n.extend({root:"/"},this.options,t),this.root=this.options.root,this._trailingSlash=this.options.trailingSlash,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),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(z,"/"),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 r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return 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),H.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!this.matchRoot()&&this.notfound();this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return this.matchRoot()?(t=this.fragment=this.getFragment(t),n.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0}))||this.notfound()):this.notfound()},notfound:function(){return this.trigger("notfound"),!1},navigate:function(t,e){if(!H.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;this._trailingSlash||""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+t;t=t.replace(F,"");var i=this.decodeFragment(t);if(this.fragment!==i){if(this.fragment=i,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var o=this.iframe.contentWindow;e.replace||(o.document.open(),o.document.close()),this._updateHash(o.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),e.history=new H;v.extend=y.extend=D.extend=E.extend=H.extend=function(t,e){var r,i=this;return r=t&&n.has(t,"constructor")?t.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,e),r.prototype=n.create(i.prototype,t),r.prototype.constructor=r,r.__super__=i.prototype,r};var U=function(){throw new Error('A "url" property or function must be specified')},$=function(t,e){var n=e.error;e.error=function(r){n&&n.call(e.context,t,r,e),t.trigger("error",t,r,e)}};return e._debug=function(){return{root:t,_:n}},e}(o,n,t,e)}.apply(e,r),void 0===i||(t.exports=i)},5231:function(t,e,n){t.exports=function(t,e,n){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t,e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var r="3.5.1",i=function(t){return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.apply(e,r)}},o=t.Model.extend,a=function t(n,r){e.isObject(n)&&(n=n.prev+" is going to be removed in the future. Please use "+n.next+" instead."+(n.url?" See: "+n.url:"")),Dt.DEV_MODE&&(void 0!==r&&r||t._cache[n]||(t._warn("Deprecation warning: "+n),t._cache[n]=!0))};a._console="undefined"!=typeof console?console:{},a._warn=function(){return(a._console.warn||a._console.log||e.noop).apply(a._console,arguments)},a._cache={};var s=function(t){return document.documentElement.contains(t&&t.parentNode)},l=function(t,n){var r=this;t&&e.each(n,(function(e){var n=t[e];void 0!==n&&(r[e]=n)}))},u=function(t){if(t)return this.options&&void 0!==this.options[t]?this.options[t]:this[t]},c=function(t){var n=this;return e.reduce(t,(function(t,r,i){return e.isFunction(r)||(r=n[r]),r&&(t[i]=r),t}),{})},h=/(^|:)(\w)/gi;function d(t,e,n){return n.toUpperCase()}var f=e.memoize((function(t){return"on"+t.replace(h,d)}));function p(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=f(t),a=u.call(this,o),s=void 0;return e.isFunction(a)&&(s=a.apply(this,r)),this.trigger.apply(this,arguments),s}function m(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return e.isFunction(t.triggerMethod)?t.triggerMethod.apply(t,r):p.apply(t,r)}function g(t,n,r){t._getImmediateChildren&&e.each(t._getImmediateChildren(),(function(t){r(t)&&m(t,n,t)}))}function v(t){return!t._isAttached}function y(t){return!!v(t)&&(t._isAttached=!0,!0)}function b(t){return t._isAttached}function w(t){return!!b(t)&&(t._isAttached=!1,!0)}function _(t){t._isAttached&&t._isRendered&&m(t,"dom:refresh",t)}function x(t){t._isAttached&&t._isRendered&&m(t,"dom:remove",t)}function k(){g(this,"before:attach",v)}function C(){g(this,"attach",y),_(this)}function A(){g(this,"before:detach",b),x(this)}function O(){g(this,"detach",w)}function E(){x(this)}function S(){_(this)}function P(t){t._areViewEventsMonitored||!1===t.monitorViewEvents||(t._areViewEventsMonitored=!0,t.on({"before:attach":k,attach:C,"before:detach":A,detach:O,"before:render":E,render:S}))}var j=["description","fileName","lineNumber","name","message","number"],T=o.call(Error,{urlRoot:"http://marionettejs.com/docs/v3.5.1/",constructor:function(t,n){e.isObject(t)?t=(n=t).message:n||(n={});var r=Error.call(this,t);e.extend(this,e.pick(r,j),e.pick(n,j)),this.captureStackTrace(),n.url&&(this.url=this.urlRoot+n.url)},captureStackTrace:function(){Error.captureStackTrace&&Error.captureStackTrace(this,T)},toString:function(){return this.name+": "+this.message+(this.url?" See: "+this.url:"")}});function M(t,n,r,i){if(!e.isObject(r))throw new T({message:"Bindings must be an object.",url:"marionette.functions.html#marionettebindevents"});e.each(r,(function(r,o){e.isString(r)?function(t,n,r,i,o){var s=i.split(/\s+/);s.length>1&&a("Multiple handlers for a single event are deprecated. If needed, use a single handler to call multiple methods."),e.each(s,(function(e){var i=t[e];if(!i)throw new T('Method "'+e+'" was configured as an event handler, but does not exist.');t[o](n,r,i)}))}(t,n,o,r,i):t[i](n,o,r)}))}function R(t,e){return t&&e?(M(this,t,e,"listenTo"),this):this}function D(t,e){return t?e?(M(this,t,e,"stopListening"),this):(this.stopListening(t),this):this}function N(t,n,r,i){if(!e.isObject(r))throw new T({message:"Bindings must be an object.",url:"marionette.functions.html#marionettebindrequests"});var o=c.call(t,r);n[i](o,t)}function V(t,e){return t&&e?(N(this,t,e,"reply"),this):this}function L(t,e){return t?e?(N(this,t,e,"stopReplying"),this):(t.stopReplying(null,null,this),this):this}T.extend=o;var B={normalizeMethods:c,_setOptions:function(t){this.options=e.extend({},e.result(this,"options"),t)},mergeOptions:l,getOption:u,bindEvents:R,unbindEvents:D},H={_initRadio:function(){var t=e.result(this,"channelName");if(t){if(!n)throw new T({name:"BackboneRadioMissing",message:'The dependency "backbone.radio" is missing.'});var r=this._channel=n.channel(t),i=e.result(this,"radioEvents");this.bindEvents(r,i);var o=e.result(this,"radioRequests");this.bindRequests(r,o),this.on("destroy",this._destroyRadio)}},_destroyRadio:function(){this._channel.stopReplying(null,null,this)},getChannel:function(){return this._channel},bindEvents:R,unbindEvents:D,bindRequests:V,unbindRequests:L},I=["channelName","radioEvents","radioRequests"],z=function(t){this.hasOwnProperty("options")||this._setOptions(t),this.mergeOptions(t,I),this._setCid(),this._initRadio(),this.initialize.apply(this,arguments)};z.extend=o,e.extend(z.prototype,t.Events,B,H,{cidPrefix:"mno",_isDestroyed:!1,isDestroyed:function(){return this._isDestroyed},initialize:function(){},_setCid:function(){this.cid||(this.cid=e.uniqueId(this.cidPrefix))},destroy:function(){if(this._isDestroyed)return this;for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.triggerMethod.apply(this,["before:destroy",this].concat(e)),this._isDestroyed=!0,this.triggerMethod.apply(this,["destroy",this].concat(e)),this.stopListening(),this},triggerMethod:p});var F=function(t){this.templateId=t};e.extend(F,{templateCaches:{},get:function(t,e){var n=this.templateCaches[t];return n||(n=new F(t),this.templateCaches[t]=n),n.load(e)},clear:function(){for(var t=void 0,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n.length;if(i>0)for(t=0;t<i;t++)delete this.templateCaches[n[t]];else this.templateCaches={}}}),e.extend(F.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(e,n){var r=t.$(e);if(!r.length)throw new T({name:"NoTemplateError",message:'Could not find template: "'+e+'"'});return r.html()},compileTemplate:function(t,n){return e.template(t,n)}});var U=e.invokeMap||e.invoke;function $(t,n){return e.chain(n).map((function(n,r){var i=function(t,n){return t.behaviorClass?t.behaviorClass:e.isFunction(t)?t:e.isFunction(Dt.Behaviors.behaviorsLookup)?Dt.Behaviors.behaviorsLookup(t,n)[n]:Dt.Behaviors.behaviorsLookup[n]}(n,r),o=new i(n===i?{}:n,t),a=$(t,e.result(o,"behaviors"));return[o].concat(a)})).flatten().value()}var q={_initBehaviors:function(){this._behaviors=this._getBehaviors()},_getBehaviors:function(){var t=e.result(this,"behaviors");return e.isObject(t)?$(this,t):{}},_getBehaviorTriggers:function(){var t=U(this._behaviors,"getTriggers");return e.reduce(t,(function(t,n){return e.extend(t,n)}),{})},_getBehaviorEvents:function(){var t=U(this._behaviors,"getEvents");return e.reduce(t,(function(t,n){return e.extend(t,n)}),{})},_proxyBehaviorViewProperties:function(){U(this._behaviors,"proxyViewProperties")},_delegateBehaviorEntityEvents:function(){U(this._behaviors,"delegateEntityEvents")},_undelegateBehaviorEntityEvents:function(){U(this._behaviors,"undelegateEntityEvents")},_destroyBehaviors:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];U.apply(void 0,[this._behaviors,"destroy"].concat(e))},_removeBehavior:function(t){this._isDestroyed||(this.undelegate(".trig"+t.cid+" ."+t.cid),this._behaviors=e.without(this._behaviors,t))},_bindBehaviorUIElements:function(){U(this._behaviors,"bindUIElements")},_unbindBehaviorUIElements:function(){U(this._behaviors,"unbindUIElements")},_triggerEventOnBehaviors:function(){for(var t=this._behaviors,e=0,n=t&&t.length;e<n;e++)p.apply(t[e],arguments)}},W={_delegateEntityEvents:function(t,n){var r=e.result(this,"modelEvents");r&&(D.call(this,t,r),R.call(this,t,r));var i=e.result(this,"collectionEvents");i&&(D.call(this,n,i),R.call(this,n,i))},_undelegateEntityEvents:function(t,n){var r=e.result(this,"modelEvents");D.call(this,t,r);var i=e.result(this,"collectionEvents");D.call(this,n,i)}},Z=/^(\S+)\s*(.*)$/,G=function(t,e){var n=t.match(Z);return n[1]+"."+e+" "+n[2]},K={childViewEventPrefix:!0,triggersStopPropagation:!0,triggersPreventDefault:!0};function X(t){return!!K[t]}var Y={_getViewTriggers:function(t,n){var r=this;return e.reduce(n,(function(n,i,o){return n[o=G(o,"trig"+r.cid)]=function(t,n){e.isString(n)&&(n={event:n});var r=n.event,i=!!n.preventDefault;X("triggersPreventDefault")&&(i=!1!==n.preventDefault);var o=!!n.stopPropagation;return X("triggersStopPropagation")&&(o=!1!==n.stopPropagation),function(e){i&&e.preventDefault(),o&&e.stopPropagation(),t.triggerMethod(r,t,e)}}(t,i),n}),{})}},J=function(t,e){return t.replace(/@ui\.[a-zA-Z-_$0-9]*/g,(function(t){return e[t.slice(4)]}))},Q=function t(n,r,i){return e.each(n,(function(o,a){e.isString(o)?n[a]=J(o,r):e.isObject(o)&&e.isArray(i)&&(e.extend(o,t(e.pick(o,i),r)),e.each(i,(function(t){var n=o[t];e.isString(n)&&(o[t]=J(n,r))})))})),n},tt={normalizeUIKeys:function(t){return function(t,n){return e.reduce(t,(function(t,e,r){return t[J(r,n)]=e,t}),{})}(t,this._getUIBindings())},normalizeUIString:function(t){var e=this._getUIBindings();return J(t,e)},normalizeUIValues:function(t,e){var n=this._getUIBindings();return Q(t,n,e)},_getUIBindings:function(){var t=e.result(this,"_uiBindings"),n=e.result(this,"ui");return t||n},_bindUIElements:function(){var t=this;if(this.ui){this._uiBindings||(this._uiBindings=this.ui);var n=e.result(this,"_uiBindings");this._ui={},e.each(n,(function(e,n){t._ui[n]=t.$(e)})),this.ui=this._ui}},_unbindUIElements:function(){var t=this;this.ui&&this._uiBindings&&(e.each(this.ui,(function(e,n){delete t.ui[n]})),this.ui=this._uiBindings,delete this._uiBindings,delete this._ui)},_getUI:function(t){return this._ui[t]}};function et(e){return e instanceof t.$?e:t.$(e)}function nt(t){return this.prototype.Dom=e.extend({},this.prototype.Dom,t),this}var rt={createBuffer:function(){return document.createDocumentFragment()},getEl:function(t){return et(t)},findEl:function(t,e){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:et(t)).find(e)},hasEl:function(t,e){return t.contains(e&&e.parentNode)},detachEl:function(t){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:et(t)).detach()},replaceEl:function(t,e){if(t!==e){var n=e.parentNode;n&&n.replaceChild(t,e)}},swapEl:function(t,e){if(t!==e){var n=t.parentNode,r=e.parentNode;if(n&&r){var i=t.nextSibling,o=e.nextSibling;n.insertBefore(e,i),r.insertBefore(t,o)}}},setContents:function(t,e){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:et(t)).html(e)},appendContents:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n._$el,i=void 0===r?et(t):r,o=n._$contents,a=void 0===o?et(e):o;i.append(a)},hasContents:function(t){return!!t&&t.hasChildNodes()},detachContents:function(t){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:et(t)).contents().detach()}},it={Dom:rt,supportsRenderLifecycle:!0,supportsDestroyLifecycle:!0,_isDestroyed:!1,isDestroyed:function(){return!!this._isDestroyed},_isRendered:!1,isRendered:function(){return!!this._isRendered},_isAttached:!1,isAttached:function(){return!!this._isAttached},delegateEvents:function(n){this._proxyBehaviorViewProperties(),this._buildEventProxies();var r=this._getEvents(n);void 0===n&&(this.events=r);var i=e.extend({},this._getBehaviorEvents(),r,this._getBehaviorTriggers(),this.getTriggers());return t.View.prototype.delegateEvents.call(this,i),this},_getEvents:function(t){var n=t||this.events;return e.isFunction(n)?this.normalizeUIKeys(n.call(this)):this.normalizeUIKeys(n)},getTriggers:function(){if(this.triggers){var t=this.normalizeUIKeys(e.result(this,"triggers"));return this._getViewTriggers(this,t)}},delegateEntityEvents:function(){return this._delegateEntityEvents(this.model,this.collection),this._delegateBehaviorEntityEvents(),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.model,this.collection),this._undelegateBehaviorEntityEvents(),this},destroy:function(){if(this._isDestroyed)return this;for(var t=this._isAttached&&!this._shouldDisableEvents,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.triggerMethod.apply(this,["before:destroy",this].concat(n)),t&&this.triggerMethod("before:detach",this),this.unbindUIElements(),this._removeElement(),t&&(this._isAttached=!1,this.triggerMethod("detach",this)),this._removeChildren(),this._isDestroyed=!0,this._isRendered=!1,this._destroyBehaviors.apply(this,n),this.triggerMethod.apply(this,["destroy",this].concat(n)),this.stopListening(),this},_removeElement:function(){this.$el.off().removeData(),this.Dom.detachEl(this.el,this.$el)},bindUIElements:function(){return this._bindUIElements(),this._bindBehaviorUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this._unbindBehaviorUIElements(),this},getUI:function(t){return this._getUI(t)},childViewEventPrefix:function(){return!!X("childViewEventPrefix")&&"childview"},triggerMethod:function(){var t=p.apply(this,arguments);return this._triggerEventOnBehaviors.apply(this,arguments),t},_buildEventProxies:function(){this._childViewEvents=e.result(this,"childViewEvents"),this._childViewTriggers=e.result(this,"childViewTriggers")},_proxyChildViewEvents:function(t){this.listenTo(t,"all",this._childViewEventHandler)},_childViewEventHandler:function(t){for(var n=this.normalizeMethods(this._childViewEvents),r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];void 0!==n&&e.isFunction(n[t])&&n[t].apply(this,i);var a=this._childViewTriggers;a&&e.isString(a[t])&&this.triggerMethod.apply(this,[a[t]].concat(i));var s=e.result(this,"childViewEventPrefix");if(!1!==s){var l=s+":"+t;this.triggerMethod.apply(this,[l].concat(i))}}};function ot(t){t._isRendered||(t.supportsRenderLifecycle||m(t,"before:render",t),t.render(),t.supportsRenderLifecycle||(t._isRendered=!0,m(t,"render",t)))}function at(t){if(t.destroy)t.destroy();else{t.supportsDestroyLifecycle||m(t,"before:destroy",t);var e=t._isAttached&&!t._shouldDisableEvents;e&&m(t,"before:detach",t),t.remove(),e&&(t._isAttached=!1,m(t,"detach",t)),t._isDestroyed=!0,t.supportsDestroyLifecycle||m(t,"destroy",t)}}e.extend(it,q,B,W,Y,tt);var st=["allowMissingEl","parentEl","replaceElement"],lt=z.extend({Dom:rt,cidPrefix:"mnr",replaceElement:!1,_isReplaced:!1,_isSwappingView:!1,constructor:function(e){if(this._setOptions(e),this.mergeOptions(e,st),this._initEl=this.el=this.getOption("el"),this.el=this.el instanceof t.$?this.el[0]:this.el,!this.el)throw new T({name:"NoElError",message:'An "el" must be specified for a region.'});this.$el=this.getEl(this.el),z.call(this,e)},show:function(t,e){if(this._ensureElement(e))return(t=this._getView(t,e))===this.currentView||(this._isSwappingView=!!this.currentView,this.triggerMethod("before:show",this,t,e),t._isAttached||this.empty(e),this._setupChildView(t),this.currentView=t,ot(t),this._attachView(t,e),this.triggerMethod("show",this,t,e),this._isSwappingView=!1),this},_setupChildView:function(t){P(t),this._proxyChildViewEvents(t),t.on("destroy",this._empty,this)},_proxyChildViewEvents:function(t){var e=this._parentView;e&&e._proxyChildViewEvents(t)},_shouldDisableMonitoring:function(){return this._parentView&&!1===this._parentView.monitorViewEvents},_attachView:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!t._isAttached&&s(this.el)&&!this._shouldDisableMonitoring(),i=void 0===n.replaceElement?!!e.result(this,"replaceElement"):!!n.replaceElement;r&&m(t,"before:attach",t),i?this._replaceEl(t):this.attachHtml(t),r&&(t._isAttached=!0,m(t,"attach",t))},_ensureElement:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.isObject(this.el)||(this.$el=this.getEl(this.el),this.el=this.$el[0],this.$el=this.Dom.getEl(this.el)),!this.$el||0===this.$el.length){if(void 0===t.allowMissingEl?e.result(this,"allowMissingEl"):t.allowMissingEl)return!1;throw new T('An "el" must exist in DOM for this region '+this.cid)}return!0},_getView:function(e){if(!e)throw new T({name:"ViewNotValid",message:"The view passed is undefined and therefore invalid. You must pass a view instance to show."});if(e._isDestroyed)throw new T({name:"ViewDestroyedError",message:'View (cid: "'+e.cid+'") has already been destroyed and cannot be used.'});if(e instanceof t.View)return e;var n=this._getViewOptions(e);return new pt(n)},_getViewOptions:function(t){return e.isFunction(t)?{template:t}:e.isObject(t)?t:{template:function(){return t}}},getEl:function(t){var n=e.result(this,"parentEl");return n&&e.isString(t)?this.Dom.findEl(n,t):this.Dom.getEl(t)},_replaceEl:function(t){this._restoreEl(),t.on("before:destroy",this._restoreEl,this),this.Dom.replaceEl(t.el,this.el),this._isReplaced=!0},_restoreEl:function(){if(this._isReplaced){var t=this.currentView;t&&(this._detachView(t),this._isReplaced=!1)}},isReplaced:function(){return!!this._isReplaced},isSwappingView:function(){return!!this._isSwappingView},attachHtml:function(t){this.Dom.appendContents(this.el,t.el,{_$el:this.$el,_$contents:t.$el})},empty:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{allowMissingEl:!0},e=this.currentView;if(!e)return this._ensureElement(t)&&this.detachHtml(),this;var n=!t.preventDestroy;return n||a("The preventDestroy option is deprecated. Use Region#detachView"),this._empty(e,n),this},_empty:function(t,e){t.off("destroy",this._empty,this),this.triggerMethod("before:empty",this,t),this._restoreEl(),delete this.currentView,t._isDestroyed||(e?this.removeView(t):this._detachView(t),this._stopChildViewEvents(t)),this.triggerMethod("empty",this,t)},_stopChildViewEvents:function(t){this._parentView&&this._parentView.stopListening(t)},destroyView:function(t){return t._isDestroyed||(t._shouldDisableEvents=this._shouldDisableMonitoring(),at(t)),t},removeView:function(t){this.destroyView(t)},detachView:function(){var t=this.currentView;if(t)return this._empty(t),t},_detachView:function(t){var e=t._isAttached&&!this._shouldDisableMonitoring(),n=this._isReplaced;e&&m(t,"before:detach",t),n?this.Dom.replaceEl(this.el,t.el):this.detachHtml(),e&&(t._isAttached=!1,m(t,"detach",t))},detachHtml:function(){this.Dom.detachContents(this.el,this.$el)},hasView:function(){return!!this.currentView},reset:function(t){return this.empty(t),this.$el&&(this.el=this._initEl),delete this.$el,this},destroy:function(t){return this._isDestroyed?this:(this.reset(t),this._name&&this._parentView._removeReferences(this._name),delete this._parentView,delete this._name,z.prototype.destroy.apply(this,arguments))}},{setDomApi:nt}),ut=function(t,n){return t instanceof lt?t:function(t,n){var r=e.extend({},n);if(e.isString(t))return e.extend(r,{el:t}),ct(r);if(e.isFunction(t))return e.extend(r,{regionClass:t}),ct(r);if(e.isObject(t))return t.selector&&a("The selector option on a Region definition object is deprecated. Use el to pass a selector string"),e.extend(r,{el:t.selector},t),ct(r);throw new T({message:"Improper region configuration type.",url:"marionette.region.html#region-configuration-types"})}(t,n)};function ct(t){return new(0,t.regionClass)(e.omit(t,"regionClass"))}var ht={regionClass:lt,_initRegions:function(){this.regions=this.regions||{},this._regions={},this.addRegions(e.result(this,"regions"))},_reInitRegions:function(){U(this._regions,"reset")},addRegion:function(t,e){var n={};return n[t]=e,this.addRegions(n)[t]},addRegions:function(t){if(!e.isEmpty(t))return t=this.normalizeUIValues(t,["selector","el"]),this.regions=e.extend({},this.regions,t),this._addRegions(t)},_addRegions:function(t){var n=this,r={regionClass:this.regionClass,parentEl:e.partial(e.result,this,"el")};return e.reduce(t,(function(t,e,i){return t[i]=ut(e,r),n._addRegion(t[i],i),t}),{})},_addRegion:function(t,e){this.triggerMethod("before:add:region",this,e,t),t._parentView=this,t._name=e,this._regions[e]=t,this.triggerMethod("add:region",this,e,t)},removeRegion:function(t){var e=this._regions[t];return this._removeRegion(e,t),e},removeRegions:function(){var t=this._getRegions();return e.each(this._regions,e.bind(this._removeRegion,this)),t},_removeRegion:function(t,e){this.triggerMethod("before:remove:region",this,e,t),t.destroy(),this.triggerMethod("remove:region",this,e,t)},_removeReferences:function(t){delete this.regions[t],delete this._regions[t]},emptyRegions:function(){var t=this.getRegions();return U(t,"empty"),t},hasRegion:function(t){return!!this.getRegion(t)},getRegion:function(t){return this._isRendered||this.render(),this._regions[t]},_getRegions:function(){return e.clone(this._regions)},getRegions:function(){return this._isRendered||this.render(),this._getRegions()},showChildView:function(t,e){for(var n=this.getRegion(t),r=arguments.length,i=Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return n.show.apply(n,[e].concat(i))},detachChildView:function(t){return this.getRegion(t).detachView()},getChildView:function(t){return this.getRegion(t).currentView}},dt={render:function(t,n){if(!t)throw new T({name:"TemplateNotFoundError",message:"Cannot render the template since its false, null or undefined."});return(e.isFunction(t)?t:F.get(t))(n)}},ft=["behaviors","childViewEventPrefix","childViewEvents","childViewTriggers","collectionEvents","events","modelEvents","regionClass","regions","template","templateContext","triggers","ui"],pt=t.View.extend({constructor:function(n){this.render=e.bind(this.render,this),this._setOptions(n),this.mergeOptions(n,ft),P(this),this._initBehaviors(),this._initRegions();var r=Array.prototype.slice.call(arguments);r[0]=this.options,t.View.prototype.constructor.apply(this,r),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this)},serializeData:function(){return this.model||this.collection?this.model?this.serializeModel():{items:this.serializeCollection()}:{}},serializeModel:function(){return this.model?e.clone(this.model.attributes):{}},serializeCollection:function(){return this.collection?this.collection.map((function(t){return e.clone(t.attributes)})):{}},setElement:function(){return t.View.prototype.setElement.apply(this,arguments),this._isRendered=this.Dom.hasContents(this.el),this._isAttached=s(this.el),this._isRendered&&this.bindUIElements(),this},render:function(){return this._isDestroyed||(this.triggerMethod("before:render",this),this._isRendered&&this._reInitRegions(),this._renderTemplate(),this.bindUIElements(),this._isRendered=!0,this.triggerMethod("render",this)),this},_renderTemplate:function(){var t=this.getTemplate();if(!1!==t){var e=this.mixinTemplateContext(this.serializeData()),n=this._renderHtml(t,e);this.attachElContent(n)}else a("template:false is deprecated. Use _.noop.")},_renderHtml:function(t,e){return dt.render(t,e,this)},getTemplate:function(){return this.template},mixinTemplateContext:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.result(this,"templateContext");return e.extend(t,n)},attachElContent:function(t){return this.Dom.setContents(this.el,t,this.$el),this},_removeChildren:function(){this.removeRegions()},_getImmediateChildren:function(){return e.chain(this._getRegions()).map("currentView").compact().value()}},{setRenderer:function(t){return this.prototype._renderHtml=t,this},setDomApi:nt});e.extend(pt.prototype,it,ht);var mt=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce","partition"],gt=function(t,n){e.each(mt,(function(r){t[r]=function(){var t=e.result(this,n),i=Array.prototype.slice.call(arguments);return e[r].apply(e,[t].concat(i))}}))},vt=function(t){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),e.each(t,e.bind(this.add,this))};gt(vt.prototype,"_getViews"),e.extend(vt.prototype,{_getViews:function(){return e.values(this._views)},add:function(t,e){return this._add(t,e)._updateLength()},_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},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){return this._remove(t)._updateLength()},_remove:function(t){var n=t.cid;return t.model&&delete this._indexByModel[t.model.cid],e.some(this._indexByCustom,e.bind((function(t,e){if(t===n)return delete this._indexByCustom[e],!0}),this)),delete this._views[n],this},_updateLength:function(){return this.length=e.size(this._views),this}});var yt=["behaviors","childView","childViewEventPrefix","childViewEvents","childViewOptions","childViewTriggers","collectionEvents","events","filter","emptyView","emptyViewOptions","modelEvents","reorderOnSort","sort","triggers","ui","viewComparator"],bt=t.View.extend({sort:!0,constructor:function(n){this.render=e.bind(this.render,this),this._setOptions(n),this.mergeOptions(n,yt),P(this),this._initBehaviors(),this.once("render",this._initialEvents),this._initChildViewStorage(),this._bufferedChildren=[];var r=Array.prototype.slice.call(arguments);r[0]=this.options,t.View.prototype.constructor.apply(this,r),this.delegateEn