From 2c631456eec29b138d887f64f0be496fe4566cde Mon Sep 17 00:00:00 2001 From: Gara64 Date: Mon, 4 Apr 2016 11:26:59 +0200 Subject: [PATCH] Update translations from Transifex Conflicts: build/server/locales/es.js~a8ef04d... build client/app/locales/fr.json --- .../public/app.780027b8d49e8de4c44a.css.map | 1 - .../client/public/app.780027b8d49e8de4c44a.js | 31 -------- .../public/app.780027b8d49e8de4c44a.js.map | 1 - ...4c44a.css => app.fb41aceed0dc12fb56a7.css} | 2 +- .../public/app.fb41aceed0dc12fb56a7.css.map | 1 + .../client/public/app.fb41aceed0dc12fb56a7.js | 31 ++++++++ .../public/app.fb41aceed0dc12fb56a7.js.map | 1 + .../register.780027b8d49e8de4c44a.js.map | 1 - ...4a.js => register.fb41aceed0dc12fb56a7.js} | 8 +- .../register.fb41aceed0dc12fb56a7.js.map | 1 + build/server/locales/ko.json | 28 +++++++ build/webpack-assets.json | 2 +- client/app/locales/de.json | 77 +++++++++++++++++++ client/app/locales/es.json | 77 +++++++++++++++++++ client/app/locales/ko.json | 77 +++++++++++++++++++ server/locales/ko.json | 28 +++++++ 16 files changed, 327 insertions(+), 40 deletions(-) delete mode 100644 build/client/public/app.780027b8d49e8de4c44a.css.map delete mode 100644 build/client/public/app.780027b8d49e8de4c44a.js delete mode 100644 build/client/public/app.780027b8d49e8de4c44a.js.map rename build/client/public/{app.780027b8d49e8de4c44a.css => app.fb41aceed0dc12fb56a7.css} (99%) create mode 100644 build/client/public/app.fb41aceed0dc12fb56a7.css.map create mode 100644 build/client/public/app.fb41aceed0dc12fb56a7.js create mode 100644 build/client/public/app.fb41aceed0dc12fb56a7.js.map delete mode 100644 build/client/public/register.780027b8d49e8de4c44a.js.map rename build/client/public/{register.780027b8d49e8de4c44a.js => register.fb41aceed0dc12fb56a7.js} (78%) create mode 100644 build/client/public/register.fb41aceed0dc12fb56a7.js.map create mode 100644 build/server/locales/ko.json create mode 100644 client/app/locales/de.json create mode 100644 client/app/locales/es.json create mode 100644 client/app/locales/ko.json create mode 100644 server/locales/ko.json diff --git a/build/client/public/app.780027b8d49e8de4c44a.css.map b/build/client/public/app.780027b8d49e8de4c44a.css.map deleted file mode 100644 index ace6cf0a..00000000 --- a/build/client/public/app.780027b8d49e8de4c44a.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":[],"names":[],"mappings":"","file":"app.780027b8d49e8de4c44a.css","sourceRoot":""} \ No newline at end of file diff --git a/build/client/public/app.780027b8d49e8de4c44a.js b/build/client/public/app.780027b8d49e8de4c44a.js deleted file mode 100644 index f8c371df..00000000 --- a/build/client/public/app.780027b8d49e8de4c44a.js +++ /dev/null @@ -1,31 +0,0 @@ -!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n=window.webpackJsonp;window.webpackJsonp=function(r,o){for(var s,u,a=0,c=[];a1?r.trigger.apply(r,s?o:[i].concat(n.drop(o,0))):r.trigger(i)),u}}(),o.triggerMethod=function(t){return o._triggerMethod(this,arguments)},o.triggerMethodOn=function(t){var e=n.isFunction(t.triggerMethod)?t.triggerMethod:o.triggerMethod;return e.apply(t,n.rest(arguments))},o.MonitorDOMRefresh=function(t){function e(){t._isShown=!0,r()}function n(){t._isRendered=!0,r()}function r(){t._isShown&&t._isRendered&&o.isNodeAttached(t.el)&&o.triggerMethodOn(t,"dom:refresh",t)}t._isDomRefreshMonitored||(t._isDomRefreshMonitored=!0,t.on({show:e,render:n}))},function(t){function e(e,r,i,o){var s=o.split(/\s+/);n.each(s,function(n){var o=e[n];if(!o)throw new t.Error('Method "'+n+'" was configured as an event handler, but does not exist.');e.listenTo(r,i,o)})}function r(t,e,n,r){t.listenTo(e,n,r)}function i(t,e,r,i){var o=i.split(/\s+/);n.each(o,function(n){var i=t[n];t.stopListening(e,r,i)})}function o(t,e,n,r){t.stopListening(e,n,r)}function s(e,r,i,o,s){if(r&&i){if(!n.isObject(i))throw new t.Error({message:"Bindings must be an object or function.",url:"marionette.functions.html#marionettebindentityevents"});i=t._getValue(i,e),n.each(i,function(t,i){n.isFunction(t)?o(e,r,i,t):s(e,r,i,t)})}}t.bindEntityEvents=function(t,n,i){s(t,n,i,r,e)},t.unbindEntityEvents=function(t,e,n){s(t,e,n,o,i)},t.proxyBindEntityEvents=function(e,n){return t.bindEntityEvents(this,e,n)},t.proxyUnbindEntityEvents=function(e,n){return t.unbindEntityEvents(this,e,n)}}(o);var u=["description","fileName","lineNumber","name","message","number"];return o.Error=o.extend.call(Error,{urlRoot:"http://marionettejs.com/docs/v"+o.VERSION+"/",constructor:function(t,e){n.isObject(t)?(e=t,t=e.message):e||(e={});var r=Error.call(this,t);n.extend(this,n.pick(r,u),n.pick(e,u)),this.captureStackTrace(),e.url&&(this.url=this.urlRoot+e.url)},captureStackTrace:function(){Error.captureStackTrace&&Error.captureStackTrace(this,o.Error)},toString:function(){return this.name+": "+this.message+(this.url?" See: "+this.url:"")}}),o.Error.extend=o.extend,o.Callbacks=function(){this._deferred=o.Deferred(),this._callbacks=[]},n.extend(o.Callbacks.prototype,{add:function(t,e){var r=n.result(this._deferred,"promise");this._callbacks.push({cb:t,ctx:e}),r.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=o.Deferred(),this._callbacks=[],n.each(t,function(t){this.add(t.cb,t.ctx)},this)}}),o.Controller=function(t){this.options=t||{},n.isFunction(this.initialize)&&this.initialize(this.options)},o.Controller.extend=o.extend,n.extend(o.Controller.prototype,e.Events,{destroy:function(){return o._triggerMethod(this,"before:destroy",arguments),o._triggerMethod(this,"destroy",arguments),this.stopListening(),this.off(),this},triggerMethod:o.triggerMethod,mergeOptions:o.mergeOptions,getOption:o.proxyGetOption}),o.Object=function(t){this.options=n.extend({},n.result(this,"options"),t),this.initialize.apply(this,arguments)},o.Object.extend=o.extend,n.extend(o.Object.prototype,e.Events,{initialize:function(){},destroy:function(t){return t=t||{},this.triggerMethod("before:destroy",t),this.triggerMethod("destroy",t),this.stopListening(),this},triggerMethod:o.triggerMethod,mergeOptions:o.mergeOptions,getOption:o.proxyGetOption,bindEntityEvents:o.proxyBindEntityEvents,unbindEntityEvents:o.proxyUnbindEntityEvents}),o.Region=o.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 o.Error({name:"NoElError",message:'An "el" must be specified for a region.'});this.$el=this.getEl(this.el),o.Object.call(this,t)},show:function(t,e){if(this._ensureElement()){this._ensureViewIsIntact(t),o.MonitorDOMRefresh(t);var r=e||{},i=t!==this.currentView,s=!!r.preventDestroy,u=!!r.forceShow,a=!!this.currentView,c=i&&!s,l=i||u;if(a&&this.triggerMethod("before:swapOut",this.currentView,this,e),this.currentView&&delete this.currentView._parent,c?this.empty():a&&l&&this.currentView.off("destroy",this.empty,this),l){t.once("destroy",this.empty,this),t._parent=this,this._renderView(t),a&&this.triggerMethod("before:swap",t,this,e),this.triggerMethod("before:show",t,this,e),o.triggerMethodOn(t,"before:show",t,this,e),a&&this.triggerMethod("swapOut",this.currentView,this,e);var h=o.isNodeAttached(this.el),f=[],p=n.extend({triggerBeforeAttach:this.triggerBeforeAttach,triggerAttach:this.triggerAttach},r);return h&&p.triggerBeforeAttach&&(f=this._displayedViews(t),this._triggerAttach(f,"before:")),this.attachHtml(t),this.currentView=t,h&&p.triggerAttach&&(f=this._displayedViews(t),this._triggerAttach(f)),a&&this.triggerMethod("swap",t,this,e),this.triggerMethod("show",t,this,e),o.triggerMethodOn(t,"show",t,this,e),this}return this}},triggerBeforeAttach:!0,triggerAttach:!0,_triggerAttach:function(t,e){var r=(e||"")+"attach";n.each(t,function(t){o.triggerMethodOn(t,r,t,this)},this)},_displayedViews:function(t){return n.union([t],n.result(t,"_getNestedViews")||[])},_renderView:function(t){t.supportsRenderLifecycle||o.triggerMethodOn(t,"before:render",t),t.render(),t.supportsRenderLifecycle||o.triggerMethodOn(t,"render",t)},_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 o.Error('An "el" '+this.$el.selector+" must exist in DOM")}return!0},_ensureViewIsIntact:function(t){if(!t)throw new o.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 o.Error({name:"ViewDestroyedError",message:'View (cid: "'+t.cid+'") has already been destroyed and cannot be used.'})},getEl:function(t){return e.$(t,o._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=t||{},r=!!n.preventDestroy;return e?(e.off("destroy",this.empty,this),this.triggerMethod("before:empty",e),r||this._destroyView(),this.triggerMethod("empty",e),delete this.currentView,r&&this.$el.contents().detach(),this):this},_destroyView:function(){var t=this.currentView;t.isDestroyed||(t.supportsDestroyLifecycle||o.triggerMethodOn(t,"before:destroy",t),t.destroy?t.destroy():(t.remove(),t.isDestroyed=!0),t.supportsDestroyLifecycle||o.triggerMethodOn(t,"destroy",t))},attachView:function(t){return this.currentView&&delete this.currentView._parent,t._parent=this,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 o.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 r=t.regionClass||e,i=n.omit(t,"selector","regionClass");return t.selector&&!i.el&&(i.el=t.selector),new r(i)},_buildRegionFromRegionClass:function(t){return new t}}),o.RegionManager=o.Controller.extend({constructor:function(t){this._regions={},this.length=0,o.Controller.call(this,t),this.addRegions(this.getOption("regions"))},addRegions:function(t,e){return t=o._getValue(t,this,arguments),n.reduce(t,function(t,r,i){return n.isString(r)&&(r={selector:r}),r.selector&&(r=n.defaults({},r,e)),t[i]=this.addRegion(i,r),t},{},this)},addRegion:function(t,e){var n;return n=e instanceof o.Region?e:o.Region.buildRegion(e,o.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(),o.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)}}),o.actAsCollection(o.RegionManager.prototype,"_regions"),o.TemplateCache=function(t){this.templateId=t},n.extend(o.TemplateCache,{templateCaches:{},get:function(t,e){var n=this.templateCaches[t];return n||(n=new o.TemplateCache(t),this.templateCaches[t]=n),n.load(e)},clear:function(){var t,e=n.toArray(arguments),r=e.length;if(r>0)for(t=0;r>t;t++)delete this.templateCaches[e[t]];else this.templateCaches={}}}),n.extend(o.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 r=e.$(t);if(!r.length)throw new o.Error({name:"NoTemplateError",message:'Could not find template: "'+t+'"'});return r.html()},compileTemplate:function(t,e){return n.template(t,e)}}),o.Renderer={render:function(t,e){if(!t)throw new o.Error({name:"TemplateNotFoundError",message:"Cannot render the template since its false, null or undefined."});var r=n.isFunction(t)?t:o.TemplateCache.get(t);return r(e)}},o.View=e.View.extend({isDestroyed:!1,supportsRenderLifecycle:!0,supportsDestroyLifecycle:!0,constructor:function(t){this.render=n.bind(this.render,this),t=o._getValue(t,this),this.options=n.extend({},n.result(this,"options"),t),this._behaviors=o.Behaviors(this),e.View.call(this,this.options),o.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=o._getValue(e,this),n.extend(t,e)},normalizeUIKeys:function(t){var e=n.result(this,"_uiBindings");return o.normalizeUIKeys(t,e||n.result(this,"ui"))},normalizeUIValues:function(t,e){var r=n.result(this,"ui"),i=n.result(this,"_uiBindings");return o.normalizeUIValues(t,i||r,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 r=o._getValue(t||this.events,this);r=this.normalizeUIKeys(r),n.isUndefined(t)&&(this.events=r);var i={},s=n.result(this,"behaviorEvents")||{},u=this.configureTriggers(),a=n.result(this,"behaviorTriggers")||{};n.extend(i,s,r,u,a),e.View.prototype.delegateEvents.call(this,i)},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 o.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.defaults({},t,{preventDefault:!0,stopPropagation:!0}),r=n.isObject(t)?e.event:t;return function(t){t&&(t.preventDefault&&e.preventDefault&&t.preventDefault(),t.stopPropagation&&e.stopPropagation&&t.stopPropagation());var n={view:this,model:this.model,collection:this.collection};this.triggerMethod(r,n)}},setElement:function(){var t=e.View.prototype.setElement.apply(this,arguments);return n.invoke(this._behaviors,"proxyViewProperties",this),t},triggerMethod:function(){var t=o._triggerMethod(this,arguments);return this._triggerEventOnBehaviors(arguments),this._triggerEventOnParentLayout(arguments[0],n.rest(arguments)),t},_triggerEventOnBehaviors:function(t){for(var e=o._triggerMethod,n=this._behaviors,r=0,i=n&&n.length;i>r;r++)e(n[r],t)},_triggerEventOnParentLayout:function(t,e){var r=this._parentLayoutView();if(r){var i=o.getOption(r,"childViewEventPrefix"),s=i+":"+t,u=[this].concat(e);o._triggerMethod(r,s,u);var a=o.getOption(r,"childEvents");a=o._getValue(a,r);var c=r.normalizeMethods(a);c&&n.isFunction(c[t])&&c[t].apply(r,u)}},_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},_parentLayoutView:function(){for(var t=this._parent;t;){if(t instanceof o.LayoutView)return t;t=t._parent}},normalizeMethods:o.normalizeMethods,mergeOptions:o.mergeOptions,getOption:o.proxyGetOption,bindEntityEvents:o.proxyBindEntityEvents,unbindEntityEvents:o.proxyUnbindEntityEvents}),o.ItemView=o.View.extend({constructor:function(){o.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 o.Error({name:"UndefinedTemplateError",message:"Cannot render the template since it is null or undefined."});var e=this.mixinTemplateHelpers(this.serializeData()),n=o.Renderer.render(t,e,this);return this.attachElContent(n),this}},attachElContent:function(t){return this.$el.html(t),this}}),o.CollectionView=o.View.extend({childViewEventPrefix:"childview",sort:!0,constructor:function(t){this.once("render",this._initialEvents),this._initChildViewStorage(),o.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&&o.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,r){var i=n.drop(arguments,3);n.each(t,function(t){o.triggerMethodOn.apply(t,[t,r,t,e].concat(i))})},_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,r){var i=void 0!==r.at&&(r.index||e.indexOf(t));if((this.getOption("filter")||i===!1)&&(i=n.indexOf(this._filteredSortedModels(i),t)),this._shouldAddChild(t,i)){this.destroyEmptyView();var o=this.getChildView(t);this.addChild(t,o,i)}},_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){o.triggerMethodOn(t,"before:show",t)})},_onShowCalled:function(){this.children.each(function(t){o.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(),r=n.some(e,function(e){return!t.findByModel(e)});if(r)this.render();else{var i=n.map(e,function(e,n){var r=t.findByModel(e);return r._index=n,r.el}),o=t.filter(function(t){return!n.contains(i,t.el)});this.triggerMethod("before:reorder"),this._appendReorderedChildren(i),n.each(o,this.removeChildView,this),this.checkEmpty(),this.triggerMethod("reorder")}},resortView:function(){o.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.getOption("filter")&&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(t){var e=this.getViewComparator(),r=this.collection.models;if(t=Math.min(Math.max(t,0),r.length-1),e){var i;t&&(i=r[t],r=r.slice(0,t).concat(r.slice(t+1))),r=this._sortModelsBy(r,e),i&&r.splice(t,0,i)}return this.getOption("filter")&&(r=n.filter(r,function(t,e){return this._shouldAddChild(t,e)},this)),r},_sortModelsBy:function(t,e){return"string"==typeof e?n.sortBy(t,function(t){return t.get(e)},this):1===e.length?n.sortBy(t,e,this):t.sort(n.bind(e,this))},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 r,i=this._isShown&&!this.isBuffering&&o.isNodeAttached(this.el),s=this.getOption("emptyViewOptions")||this.getOption("childViewOptions");n.isFunction(s)&&(s=s.call(this,t,this._emptyViewIndex));var u=this.buildChildView(t,e,s);u._parent=this,this.proxyChildEvents(u),u.once("render",function(){this._isShown&&o.triggerMethodOn(u,"before:show",u),i&&this._triggerBeforeAttach&&(r=this._getViewAndNested(u),this._triggerMethodMany(r,this,"before:attach"))},this),this.children.add(u),this.renderChildView(u,this._emptyViewIndex),i&&this._triggerAttach&&(r=this._getViewAndNested(u),this._triggerMethodMany(r,this,"attach")),this._isShown&&o.triggerMethodOn(u,"show",u)},getChildView:function(t){var e=this.getOption("childView");if(!e)throw new o.Error({name:"NoChildViewError",message:'A "childView" must be specified'});return e},addChild:function(t,e,n){var r=this.getOption("childViewOptions");r=o._getValue(r,this,[t,n]);var i=this.buildChildView(t,e,r);return this._updateIndices(i,!0,n),this.triggerMethod("before:add:child",i),this._addChildView(i,n),this.triggerMethod("add:child",i),i._parent=this,i},_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,r=this._isShown&&!this.isBuffering&&o.isNodeAttached(this.el);this.proxyChildEvents(t),t.once("render",function(){this._isShown&&!this.isBuffering&&o.triggerMethodOn(t,"before:show",t),r&&this._triggerBeforeAttach&&(n=this._getViewAndNested(t),this._triggerMethodMany(n,this,"before:attach"))},this),this.children.add(t),this.renderChildView(t,e),r&&this._triggerAttach&&(n=this._getViewAndNested(t),this._triggerMethodMany(n,this,"attach")),this._isShown&&!this.isBuffering&&o.triggerMethodOn(t,"show",t)},renderChildView:function(t,e){return t.supportsRenderLifecycle||o.triggerMethodOn(t,"before:render",t),t.render(),t.supportsRenderLifecycle||o.triggerMethodOn(t,"render",t),this.attachHtml(this,t,e),t},buildChildView:function(t,e,r){var i=n.extend({model:t},r),s=new e(i);return o.MonitorDOMRefresh(s),s},removeChildView:function(t){return t?(this.triggerMethod("before:remove:child",t),t.supportsDestroyLifecycle||o.triggerMethodOn(t,"before:destroy",t),t.destroy?t.destroy():t.remove(),t.supportsDestroyLifecycle||o.triggerMethodOn(t,"destroy",t),delete t._parent,this.stopListening(t),this.children.remove(t),this.triggerMethod("remove:child",t),this._updateIndices(t,!1),t):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,r=this.getOption("sort")&&e1?e>n:n>e;e>1?n++:n--)for(var r in arguments[n])t[r]=arguments[n][r];return t},B=function(t,e){var n={}.hasOwnProperty,r=function(){};r.prototype=e.prototype,t.prototype=new r;for(var i in e)n.call(e,i)&&(t[i]=e[i]);return t},q={indexOf:function(){return Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var n,r=0;r=0?e.splice(n,1):void 0},fold:function(t,e,n){for(var r,i=0;i5?"[..]":"["+q.map(q.toString,t).toString()+"]":null!=(null!=t?t.toString:void 0)&&t.toString!==Object.prototype.toString?t.toString():"object"==typeof t?L>5?"{..}":(e=function(){var e=[];for(n in t)i.call(t,n)&&(r=function(){var e;try{return t[n]}catch(e){return e}}(),e.push(q.toString(n)+":"+q.toString(r)));return e}(),"{"+e+"}"):t}finally{L--}}},L=0;S._=q;var F=S.UpdateBarrier=function(){var t,e=[],n={},r=[],i=0,o={},s=function(e){return t?r.push(e):e()},u=function(r,i){if(t){var o=n[r.id];return"undefined"==typeof o||null===o?(o=n[r.id]=[i],e.push(r)):o.push(i)}return i()},a=function(){for(;e.length>0;)c(0,!0);o={}},c=function(t,r){var i=e[t],o=i.id,s=n[o];e.splice(t,1),delete n[o],r&&e.length>0&&l(i);for(var u,a=0;a0};return{whenDoneWith:u,hasWaiters:d,inTransaction:h,currentEventId:f,wrappedSubscribe:p,afterTransaction:s}}();H(s.prototype,{_isSource:!0,subscribe:function(t){return this.obs.dispatcher.subscribe(t)},toString:function(){return this.obs.toString()},markEnded:function(){return this.ended=!0,!0},consume:function(){return this.lazy?{value:q.always(this.queue[0])}:this.queue[0]},push:function(t){return this.queue=[t],[t]},mayHave:function(){return!0},hasAtLeast:function(){return this.queue.length},flatten:!0}),B(u,s),H(u.prototype,{consume:function(){return this.queue.shift()},push:function(t){return this.queue.push(t)},mayHave:function(t){return!this.ended||this.queue.length>=t},hasAtLeast:function(t){return this.queue.length>=t},flatten:!1}),B(a,s),H(a.prototype,{consume:function(){var t=this.queue;return this.queue=[],{value:function(){return t}}},push:function(t){return this.queue.push(t.value())},hasAtLeast:function(){return!0}}),s.isTrigger=function(t){return(null!=t?t._isSource:void 0)?t.sync:null!=t?t._isEventStream:void 0},s.fromObservable=function(t){return(null!=t?t._isSource:void 0)?t:(null!=t?t._isProperty:void 0)?new s(t,!1):new u(t,!0)},H(c.prototype,{_isDesc:!0,deps:function(){return this.cached||(this.cached=U([this.context].concat(this.args))),this.cached},toString:function(){return q.toString(this.context)+"."+q.toString(this.method)+"("+q.map(q.toString,this.args)+")"}});var $=function(t,e){var n=t||e;if(n&&n._isDesc)return t||e;for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;r>o;o++)i[o-2]=arguments[o];return new c(t,e,i)},W=function(t,e){return e.desc=t,e},U=function(t){return V(t)?q.flatMap(U,t):I(t)?[t]:("undefined"!=typeof t&&null!==t?t._isSource:void 0)?[t.obs]:[]};S.Desc=c,S.Desc.empty=new S.Desc("","",[]);var G=function(t){return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;n>i;i++)r[i-1]=arguments[i];if("object"==typeof e&&r.length){var o=e,s=r[0];e=function(){return o[s].apply(o,arguments)},r=r.slice(1)}return t.apply(void 0,[e].concat(r))}},J=function(t){return t=Array.prototype.slice.call(t),Z.apply(void 0,t)},X=function(t,e){return function(){for(var n=arguments.length,r=Array(n),i=0;n>i;i++)r[i]=arguments[i];return t.apply(void 0,e.concat(r))}},Y=function(t){return function(e){return function(n){if("undefined"!=typeof n&&null!==n){var r=n[e];return q.isFunction(r)?r.apply(n,t):r}}}},K=function(t,e){var n=t.slice(1).split("."),r=q.map(Y(e),n);return function(t){for(var e,n=0;n1&&"."===t.charAt(0)},Z=G(function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];return q.isFunction(t)?n.length?X(t,n):t:Q(t)?K(t,n):q.always(t)}),tt=function(t,e){return Z.apply(void 0,[t].concat(e))},et=function(t,e,n,r){if("undefined"!=typeof e&&null!==e?e._isProperty:void 0){var i=e.sampledBy(t,function(t,e){return[t,e]});return r.call(i,function(t){var e=t[0];t[1];return e}).map(function(t){var e=(t[0],t[1]);return e})}return e=tt(e,n),r.call(t,e)},nt=function(t){if(q.isFunction(t))return t;if(Q(t)){var e=rt(t);return function(t,n){return t[e](n)}}throw new T("not a function or a field key: "+t)},rt=function(t){return t.slice(1)};H(l.prototype,{_isSome:!0,getOrElse:function(){return this.value},get:function(){return this.value},filter:function(t){return t(this.value)?new l(this.value):it},map:function(t){return new l(t(this.value))},forEach:function(t){return t(this.value)},isDefined:!0,toArray:function(){return[this.value]},inspect:function(){return"Some("+this.value+")"},toString:function(){return this.inspect()}});var it={_isNone:!0,getOrElse:function(t){return t},filter:function(){return it},map:function(){return it},forEach:function(){},isDefined:!1,toArray:function(){return[]},inspect:function(){return"None"},toString:function(){return this.inspect()}},ot=function(t){return("undefined"!=typeof t&&null!==t?t._isSome:void 0)||("undefined"!=typeof t&&null!==t?t._isNone:void 0)?t:new l(t)};S.noMore="",S.more="";var st=0;h.prototype._isEvent=!0,h.prototype.isEvent=function(){return!0},h.prototype.isEnd=function(){return!1},h.prototype.isInitial=function(){return!1},h.prototype.isNext=function(){return!1},h.prototype.isError=function(){return!1},h.prototype.hasValue=function(){return!1},h.prototype.filter=function(){return!0},h.prototype.inspect=function(){return this.toString()},h.prototype.log=function(){return this.toString()},B(f,h),f.prototype.isNext=function(){return!0},f.prototype.hasValue=function(){return!0},f.prototype.value=function(){var t;return(null!=(t=this.valueF)?t._isNext:void 0)?(this.valueInternal=this.valueF.value(),this.valueF=void 0):this.valueF&&(this.valueInternal=this.valueF(),this.valueF=void 0),this.valueInternal},f.prototype.fmap=function(t){var e,n;return this.valueInternal?(n=this.valueInternal,this.apply(function(){return t(n)})):(e=this,this.apply(function(){return t(e.value())}))},f.prototype.apply=function(t){return new f(t)},f.prototype.filter=function(t){return t(this.value())},f.prototype.toString=function(){return q.toString(this.value())},f.prototype.log=function(){return this.value()},f.prototype._isNext=!0,B(p,f),p.prototype._isInitial=!0,p.prototype.isInitial=function(){return!0},p.prototype.isNext=function(){return!1},p.prototype.apply=function(t){return new p(t)},p.prototype.toNext=function(){return new f(this)},B(d,h),d.prototype.isEnd=function(){return!0},d.prototype.fmap=function(){return this},d.prototype.apply=function(){return this},d.prototype.toString=function(){return""},B(g,h),g.prototype.isError=function(){return!0},g.prototype.fmap=function(){return this},g.prototype.apply=function(){return this},g.prototype.toString=function(){return" "+q.toString(this.error)},S.Event=h,S.Initial=p,S.Next=f,S.End=d,S.Error=g;var ut=function(t){return new p(t,!0)},at=function(t){return new f(t,!0)},ct=function(){return new d},lt=function(t){return t&&t._isEvent?t:at(t)},ht=0,ft=function(){};H(v.prototype,{_isObservable:!0,subscribe:function(t){return F.wrappedSubscribe(this,t)},subscribeInternal:function(t){return this.dispatcher.subscribe(t)},onValue:function(){var t=J(arguments);return this.subscribe(function(e){return e.hasValue()?t(e.value()):void 0})},onValues:function(t){return this.onValue(function(e){return t.apply(void 0,e)})},onError:function(){var t=J(arguments);return this.subscribe(function(e){return e.isError()?t(e.error):void 0})},onEnd:function(){var t=J(arguments);return this.subscribe(function(e){return e.isEnd()?t():void 0})},name:function(t){return this._name=t,this},withDescription:function(){return this.desc=$.apply(void 0,arguments),this},toString:function(){return this._name?this._name:this.desc.toString()},internalDeps:function(){return this.initialDesc.deps()}}),v.prototype.assign=v.prototype.onValue,v.prototype.forEach=v.prototype.onValue,v.prototype.inspect=v.prototype.toString,S.Observable=v,H(m.prototype,{add:function(t){var e=this;if(!this.unsubscribed){var n=!1,r=M;this.starting.push(t);var i=function(){return e.unsubscribed?void 0:(n=!0,e.remove(r),q.remove(t,e.starting))};return r=t(this.unsubscribe,i),this.unsubscribed||n?r():this.subscriptions.push(r),q.remove(t,this.starting),r}},remove:function(t){return this.unsubscribed?void 0:void 0!==q.remove(t,this.subscriptions)?t():void 0},unsubscribe:function(){if(!this.unsubscribed){this.unsubscribed=!0;for(var t=this.subscriptions,e=0;e0},y.prototype.removeSub=function(t){return this.subscriptions=q.without(t,this.subscriptions),this.subscriptions},y.prototype.push=function(t){return t.isEnd()&&(this.ended=!0),F.inTransaction(t,this,this.pushIt,[t])},y.prototype.pushToSubscriptions=function(t){try{for(var e=this.subscriptions,n=e.length,r=0;n>r;r++){var i=e[r],o=i.sink(t);(o===S.noMore||t.isEnd())&&this.removeSub(i)}return!0}catch(s){throw this.pushing=!1,this.queue=[],s}},y.prototype.pushIt=function(t){if(this.pushing)return this.queue.push(t),S.more;if(t!==this.prevError){for(t.isError()&&(this.prevError=t),this.pushing=!0,this.pushToSubscriptions(t),this.pushing=!1;this.queue.length;)t=this.queue.shift(),this.push(t);return this.hasSubscribers()?S.more:(this.unsubscribeFromSource(),S.noMore)}},y.prototype.handleEvent=function(t){return this._handleEvent?this._handleEvent(t):this.push(t)},y.prototype.unsubscribeFromSource=function(){this.unsubSrc&&this.unsubSrc(),this.unsubSrc=void 0},y.prototype.subscribe=function(t){var e;return this.ended?(t(ct()),M):(N(t),e={sink:t},this.subscriptions.push(e),1===this.subscriptions.length&&(this.unsubSrc=this._subscribe(this.handleEvent),N(this.unsubSrc)),function(t){return function(){return t.removeSub(e),t.hasSubscribers()?void 0:t.unsubscribeFromSource()}}(this))},S.Dispatcher=y,B(b,v),H(b.prototype,{_isEventStream:!0,toProperty:function(t){var e=0===arguments.length?it:ot(function(){return t}),n=this.dispatcher,r=new S.Desc(this,"toProperty",[t]);return new x(r,function(t){var r=!1,i=!1,o=M,s=S.more,u=function(){return r?void 0:e.forEach(function(e){return r=!0,s=t(new p(e)),s===S.noMore?(o(),o=M,M):void 0})};return o=n.subscribe(function(n){return n.hasValue()?n.isInitial()&&!i?(e=new l(function(){return n.value()}),S.more):(n.isInitial()||u(),r=!0,e=new l(n),t(n)):(n.isEnd()&&(s=u()),s!==S.noMore?t(n):void 0)}),i=!0,u(),o})},toEventStream:function(){return this},withHandler:function(t){return new b(new S.Desc(this,"withHandler",[t]),this.dispatcher.subscribe,t)}}),S.EventStream=b,S.never=function(){return new b($(S,"never"),function(t){return t(ct()),M})},S.when=function(){if(0===arguments.length)return S.never();var t=arguments.length,e="when: expecting arguments in the form (Observable+,function)+";O(e,t%2===0);for(var n=[],r=[],i=0,o=[];t>i;){o[i]=arguments[i],o[i+1]=arguments[i+1];for(var u,a=q.toArray(arguments[i]),c=dt(arguments[i+1]),l={f:c,ixs:[]},h=!1,f=0;fp&&(n.push(u),p=n.length-1);for(var d,g=0;g0&&r.push(l),i+=2}if(!n.length)return S.never();n=q.map(s.fromObservable,n);var v=q.any(n,function(t){return t.flatten})&&pt(q.map(function(t){return t.obs},n)),m=new S.Desc(S,"when",o),y=new b(m,function(t){var e=[],i=!1,o=function(t){for(var e,r=0;r0))return S.more;for(var i,s=S.more,u=e.pop(),c=0;cn;n++)e[n]=arguments[n];1===e.length&&V(e[0])&&(e=e[0]);var r=function(){for(var t,n=[],r=0;rn;n++)e[n]=arguments[n];return e}))},B(w,y),H(w.prototype,{push:function(t){return t.isEnd()&&(this.propertyEnded=!0),t.hasValue()&&(this.current=new l(t),this.currentValueRootId=F.currentEventId()),y.prototype.push.call(this,t)},maybeSubSource:function(t,e){return e===S.noMore?M:this.propertyEnded?(t(ct()),M):y.prototype.subscribe.call(this,t)},subscribe:function(t){var e=this,n=S.more;if(this.current.isDefined&&(this.hasSubscribers()||this.propertyEnded)){var r=F.currentEventId(),i=this.currentValueRootId;return!this.propertyEnded&&i&&r&&r!==i?(F.whenDoneWith(this.property,function(){return e.currentValueRootId===i?t(ut(e.current.get().value())):void 0}),this.maybeSubSource(t,n)):(F.inTransaction(void 0,this,function(){return n=t(ut(this.current.get().value()))},[]),this.maybeSubSource(t,n))}return this.maybeSubSource(t,n)}}),B(x,v),H(x.prototype,{_isProperty:!0,changes:function(){var t=this;return new b(new S.Desc(this,"changes",[]),function(e){return t.dispatcher.subscribe(function(t){return t.isInitial()?void 0:e(t)})})},withHandler:function(t){return new x(new S.Desc(this,"withHandler",[t]),this.dispatcher.subscribe,t)},toProperty:function(){return z(arguments),this},toEventStream:function(){var t=this;return new b(new S.Desc(this,"toEventStream",[]),function(e){return t.dispatcher.subscribe(function(t){return t.isInitial()&&(t=t.toNext()),e(t)})})}}),S.Property=x,S.constant=function(t){return new x(new S.Desc(S,"constant",[t]),function(e){return e(ut(t)),e(ct()),M})},S.fromBinder=function(t){var e=arguments.length<=1||void 0===arguments[1]?q.id:arguments[1],n=new S.Desc(S,"fromBinder",[t,e]);return new b(n,function(n){var r=!1,i=!1,o=function(){return r?void 0:"undefined"!=typeof s&&null!==s?(s(),r=!0):i=!0},s=t(function(){for(var t,r=arguments.length,i=Array(r),s=0;r>s;s++)i[s]=arguments[s];var u=e.apply(this,i);V(u)&&(null!=(t=q.last(u))?t._isEvent:void 0)||(u=[u]);for(var a,c=S.more,l=0;l1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];return et(this,t,n,function(t){return W(new S.Desc(this,"map",[t]),this.withHandler(function(e){return this.push(e.fmap(t))}))})};var gt=function(t){return V(t[0])?t[0]:Array.prototype.slice.call(t)},vt=function(t){return q.isFunction(t[0])?[gt(Array.prototype.slice.call(t,1)),t[0]]:[gt(Array.prototype.slice.call(t,0,t.length-1)),q.last(t)]};S.combineAsArray=function(){for(var t,e=gt(arguments),n=0;nn;n++)e[n]=arguments[n];return e}).toProperty())}return S.constant([])},S.onValues=function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return S.combineAsArray(e.slice(0,e.length-1)).onValues(e[e.length-1])},S.combineWith=function(){var t=vt(arguments),e=t[0],n=t[1],r=new S.Desc(S,"combineWith",[n].concat(e));return W(r,S.combineAsArray(e).map(function(t){return n.apply(void 0,t)}))},S.Observable.prototype.combine=function(t,e){var n=nt(e),r=new S.Desc(this,"combine",[t,e]);return W(r,S.combineAsArray(this,t).map(function(t){return n(t[0],t[1])}))},S.Observable.prototype.withStateMachine=function(t,e){var n=t,r=new S.Desc(this,"withStateMachine",[t,e]);return W(r,this.withHandler(function(t){var r=e(n,t),i=r[0],o=r[1];n=i;for(var s,u=S.more,a=0;a0){var t=this.values;this.values=[];var e=this.push(at(t));if(null!=this.end)return this.push(this.end);if(e!==S.noMore)return n(this)}else if(null!=this.end)return this.push(this.end)},schedule:function(){var e=this;return this.scheduled?void 0:this.scheduled=t(function(){return e.flush()})}},i=S.more;if(!q.isFunction(t)){var o=t;t=function(t){return S.scheduler.setTimeout(t,o)}}return W(new S.Desc(this,"buffer",[]),this.withHandler(function(t){var n=this;return r.push=function(t){return n.push(t)},t.isError()?i=this.push(t):t.isEnd()?(r.end=t,r.scheduled||r.flush()):(r.values.push(t.value()),e(r)),i}))},S.Observable.prototype.filter=function(t){D(t);for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];return et(this,t,n,function(t){return W(new S.Desc(this,"filter",[t]),this.withHandler(function(e){return e.filter(t)?this.push(e):S.more}))})},S.once=function(t){return new b(new c(S,"once",[t]),function(e){return e(lt(t)),e(ct()),M})},S.EventStream.prototype.concat=function(t){var e=this;return new b(new S.Desc(e,"concat",[t]),function(n){var r=M,i=e.dispatcher.subscribe(function(e){return e.isEnd()?r=t.dispatcher.subscribe(n):n(e)});return function(){return i(),r()}})},S.Observable.prototype.flatMap=function(){return xt(this,bt(arguments))},S.Observable.prototype.flatMapFirst=function(){return xt(this,bt(arguments),!0)};var bt=function(t){return 1===t.length&&I(t[0])?q.always(t[0]):J(t)},wt=function(t){return I(t)?t:S.once(t)},xt=function(t,e,n,r){var i=[t],o=[],s=new S.Desc(t,"flatMap"+(n?"First":""),[e]),u=new b(s,function(i){var s=new m,u=[],a=function(t){var n=wt(e(t.value()));return o.push(n),s.add(function(t,e){return n.dispatcher.subscribe(function(r){if(r.isEnd())return q.remove(n,o),c(),l(e),S.noMore;("undefined"!=typeof r&&null!==r?r._isInitial:void 0)&&(r=r.toNext());var s=i(r);return s===S.noMore&&t(),s})})},c=function(){var t=u.shift();return t?a(t):void 0},l=function(t){return t(),s.empty()?i(ct()):void 0};return s.add(function(e,o){return t.dispatcher.subscribe(function(t){return t.isEnd()?l(o):t.isError()?i(t):n&&s.count()>1?S.more:s.unsubscribed?S.noMore:r&&s.count()>r?u.push(t):a(t)})}),s.unsubscribe});return u.internalDeps=function(){return o.length?i.concat(o):i},u};S.Observable.prototype.flatMapWithConcurrencyLimit=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];var i=new S.Desc(this,"flatMapWithConcurrencyLimit",[t].concat(n));return W(i,xt(this,bt(n),!1,t))},S.Observable.prototype.flatMapConcat=function(){var t=new S.Desc(this,"flatMapConcat",Array.prototype.slice.call(arguments,0));return W(t,this.flatMapWithConcurrencyLimit.apply(this,[1].concat(C.call(arguments))))},S.later=function(t,e){return W(new S.Desc(S,"later",[t,e]),S.fromBinder(function(n){var r=function(){return n([e,ct()])},i=S.scheduler.setTimeout(r,t);return function(){return S.scheduler.clearTimeout(i)}}))},S.Observable.prototype.bufferingThrottle=function(t){var e=new S.Desc(this,"bufferingThrottle",[t]);return W(e,this.flatMapConcat(function(e){return S.once(e).concat(S.later(t).filter(!1))}))},S.Property.prototype.bufferingThrottle=function(){return S.Observable.prototype.bufferingThrottle.apply(this,arguments).toProperty()},B(_,b),H(_.prototype,{unsubAll:function(){for(var t,e=this.subscriptions,n=0;n1?i-1:0),s=1;i>s;s++)o[s-1]=arguments[s];return W(new S.Desc(S,t,[n].concat(o)),S.combineAsArray(o).flatMap(r))})};S.fromCallback=_t("fromCallback",function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];return S.fromBinder(function(e){return tt(t,n)(e),M},function(t){return[t,ct()]})}),S.fromNodeCallback=_t("fromNodeCallback",function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];return S.fromBinder(function(e){return tt(t,n)(e),M},function(t,e){return t?[new g(t),ct()]:[e,ct()]})}),S.combineTemplate=function(t){function e(t){return t[t.length-1]}function n(t,n,r){return e(t)[n]=r,r}function r(t,e){return function(r,i){return n(r,t,i[e])}}function i(t,e){return function(r){return n(r,t,e)}}function o(t){return V(t)?[]:{}}function s(t,e){return function(r){var i=o(e);return n(r,t,i),r.push(i)}}function u(t,e){if(I(e))return h.push(e),l.push(r(t,h.length-1));if(!e||e.constructor!=Object&&e.constructor!=Array)return l.push(i(t,e));var n=function(t){return t.pop()};return l.push(s(t,e)),c(e),l.push(n)}function a(e){for(var n,r=o(t),i=[r],s=0;sn;n++)e[n]=arguments[n];return W(new S.Desc(this,"doLog",e),this.withHandler(function(t){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log&&console.log.apply(console,e.concat([t.log()])),this.push(t)}))},S.Observable.prototype.endOnError=function(t){"undefined"!=typeof t&&null!==t||(t=!0);for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];return et(this,t,n,function(t){return W(new S.Desc(this,"endOnError",[]),this.withHandler(function(e){return e.isError()&&t(e.error)?(this.push(e),this.push(ct())):this.push(e)}))})},v.prototype.errors=function(){return W(new S.Desc(this,"errors",[]),this.filter(function(){return!1}))},S.Observable.prototype.take=function(t){return 0>=t?S.never():W(new S.Desc(this,"take",[t]),this.withHandler(function(e){return e.hasValue()?(t--,t>0?this.push(e):(0===t&&this.push(e),this.push(ct()),S.noMore)):this.push(e)}))},S.Observable.prototype.first=function(){return W(new S.Desc(this,"first",[]),this.take(1))},S.Observable.prototype.mapError=function(){var t=J(arguments);return W(new S.Desc(this,"mapError",[t]),this.withHandler(function(e){return e.isError()?this.push(at(t(e.error))):this.push(e)}))},S.Observable.prototype.flatMapError=function(t){var e=new S.Desc(this,"flatMapError",[t]);return W(e,this.mapError(function(t){return new g(t)}).flatMap(function(e){return e instanceof g?t(e.error):S.once(e)}))},S.EventStream.prototype.sampledBy=function(t,e){return W(new S.Desc(this,"sampledBy",[t,e]),this.toProperty().sampledBy(t,e))},S.Property.prototype.sampledBy=function(t,e){var n=!1;"undefined"!=typeof e&&null!==e?e=nt(e):(n=!0,e=function(t){return t.value()});var r=new s(this,!1,n),i=new s(t,!0,n),o=S.when([r,i],e),u=t._isProperty?o.toProperty():o;return W(new S.Desc(this,"sampledBy",[t,e]),u)},S.Property.prototype.sample=function(t){return W(new S.Desc(this,"sample",[t]),this.sampledBy(S.interval(t,{})))},S.Observable.prototype.map=function(t){if(t&&t._isProperty)return t.sampledBy(this,k);for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];return et(this,t,n,function(t){return W(new S.Desc(this,"map",[t]),this.withHandler(function(e){return this.push(e.fmap(t))}))})},S.Observable.prototype.fold=function(t,e){return W(new S.Desc(this,"fold",[t,e]),this.scan(t,e).sampledBy(this.filter(!1).mapEnd().toProperty()))},v.prototype.reduce=v.prototype.fold;var Ct=[["addEventListener","removeEventListener"],["addListener","removeListener"],["on","off"],["bind","unbind"]],St=function(t){for(var e,n=0;nn;n++)e[n]=arguments[n];return this.subscribe(function(t){"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,e.concat([t.log()]))}),this},S.EventStream.prototype.merge=function(t){R(t);var e=this;return W(new S.Desc(e,"merge",[t]),S.mergeAll(this,t))},S.mergeAll=function(){var t=gt(arguments);return t.length?new b(new S.Desc(S,"mergeAll",t),function(e){var n=0,r=function(r){return function(i){return r.dispatcher.subscribe(function(r){if(r.isEnd())return n++,n===t.length?e(ct()):S.more;var o=e(r);return o===S.noMore&&i(),o})}},i=q.map(r,t);return new S.CompositeUnsubscribe(i).unsubscribe}):S.never()},S.repeatedly=function(t,e){var n=0;return W(new S.Desc(S,"repeatedly",[t,e]),S.fromPoll(t,function(){return e[n++%e.length]}))},S.repeat=function(t){var e=0;return S.fromBinder(function(n){function r(t){return t.isEnd()?o?i():o=!0:s=n(t)}function i(){var i;for(o=!0;o&&s!==S.noMore;)i=t(e++),o=!1,i?u=i.subscribeInternal(r):n(ct());return o=!0}var o=!1,s=S.more,u=function(){};return i(),function(){return u()}})},S.retry=function(t){if(!q.isFunction(t.source))throw new T("'source' option has to be a function");var e=t.source,n=t.retries||0,r=t.maxRetries||n,i=t.delay||function(){return 0},o=t.isRetryable||function(){return!0},s=!1,u=null;return W(new S.Desc(S,"retry",[t]),S.repeat(function(){function t(){return e().endOnError().withHandler(function(t){return t.isError()?(u=t,o(u.error)&&n>0?void 0:(s=!0,this.push(t))):(t.hasValue()&&(u=null,s=!0),this.push(t))})}if(s)return null;if(u){var a={error:u.error,retriesDone:r-n},c=S.later(i(a)).filter(!1);return n-=1,c.concat(S.once().flatMap(t))}return t()}))},S.sequentially=function(t,e){var n=0;return W(new S.Desc(S,"sequentially",[t,e]),S.fromPoll(t,function(){var t=e[n++];return n0?(t--,S.more):this.push(e)}))},S.EventStream.prototype.skipUntil=function(t){var e=t.take(1).map(!0).toProperty(!1);return W(new S.Desc(this,"skipUntil",[t]),this.filter(e))},S.EventStream.prototype.skipWhile=function(t){D(t);for(var e=!1,n=arguments.length,r=Array(n>1?n-1:0),i=1;n>i;i++)r[i-1]=arguments[i];return et(this,t,r,function(t){return W(new S.Desc(this,"skipWhile",[t]),this.withHandler(function(n){return!e&&n.hasValue()&&t(n.value())?S.more:(n.hasValue()&&(e=!0),this.push(n))}))})},S.Observable.prototype.slidingWindow=function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return W(new S.Desc(this,"slidingWindow",[t,e]),this.scan([],function(e,n){return e.concat([n]).slice(-t)}).filter(function(t){return t.length>=e}))};var Tt=[],ft=function(t){if(Tt.length&&!ft.running)try{ft.running=!0,Tt.forEach(function(e){e(t)})}finally{delete ft.running}};S.spy=function(t){return Tt.push(t)},S.Property.prototype.startWith=function(t){return W(new S.Desc(this,"startWith",[t]),this.scan(t,function(t,e){return e}))},S.EventStream.prototype.startWith=function(t){return W(new S.Desc(this,"startWith",[t]),S.once(t).concat(this))},S.Observable.prototype.takeWhile=function(t){D(t);for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];return et(this,t,n,function(t){return W(new S.Desc(this,"takeWhile",[t]),this.withHandler(function(e){return e.filter(t)?this.push(e):(this.push(ct()),S.noMore)}))})},S.EventStream.prototype.throttle=function(t){return W(new S.Desc(this,"throttle",[t]),this.bufferWithTime(t).map(function(t){return t[t.length-1]}))},S.Property.prototype.throttle=function(t){return this.delayChanges(new S.Desc(this,"throttle",[t]),function(e){return e.throttle(t)})},v.prototype.firstToPromise=function(t){var e=this;if("function"!=typeof t){if("function"!=typeof Promise)throw new T("There isn't default Promise, use shim or parameter");t=Promise}return new t(function(t,n){return e.subscribe(function(e){return e.hasValue()&&t(e.value()),e.isError()&&n(e.error),S.noMore})})},v.prototype.toPromise=function(t){return this.last().firstToPromise(t)},S["try"]=function(t){return function(e){try{return S.once(t(e))}catch(n){return new S.Error(n)}}},S.update=function(t){function e(t){return function(){for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];return function(e){return t.apply(void 0,[e].concat(n))}}}for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;n>i;i++)r[i-1]=arguments[i];for(var o=r.length-1;o>0;)r[o]instanceof Function||(r[o]=q.always(r[o])),r[o]=e(r[o]),o-=2;return W(new S.Desc(S,"update",[t].concat(r)),S.when.apply(S,r).scan(t,function(t,e){return e(t)}))},S.zipAsArray=function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=gt(e);return W(new S.Desc(S,"zipAsArray",r),S.zipWith(r,function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return e}))},S.zipWith=function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=vt(e),i=r[0],o=r[1];return i=q.map(function(t){return t.toEventStream()},i),W(new S.Desc(S,"zipWith",[o].concat(i)),S.when(i,o))},S.Observable.prototype.zip=function(t,e){return W(new S.Desc(this,"zip",[t]),S.zipWith([this,t],e||Array))},null!==n(99)&&null!=n(40)?(r=[],i=function(){return S}.apply(e,r),!(void 0!==i&&(o.exports=i)),"undefined"!=typeof this&&null!==this&&(this.Bacon=S)):"undefined"!=typeof o&&null!==o&&null!=o.exports?(o.exports=S,S.Bacon=S):this.Bacon=S}).call(this)}).call(e,function(){return this}(),n(20)(t))},function(t,e,n){"use strict";function r(t){return null!=t&&""!==t}function i(t){return(Array.isArray(t)?t.map(i):t&&"object"==typeof t?Object.keys(t).filter(function(e){return t[e]}):[t]).filter(r).join(" ")}function o(t){return u[t]||t}function s(t){var e=String(t).replace(a,o);return e===""+t?t:e}e.merge=function c(t,e){if(1===arguments.length){for(var n=t[0],i=1;i":">",'"':"""},a=/[&<>"]/g;e.escape=s,e.rethrow=function l(t,e,r,i){if(!(t instanceof Error))throw t;if(!("undefined"==typeof window&&e||i))throw t.message+=" on line "+r,t;try{i=i||n(100).readFileSync(e,"utf8")}catch(o){l(t,null,r)}var s=3,u=i.split("\n"),a=Math.max(r-s,0),c=Math.min(u.length,r+s),s=u.slice(a,c).map(function(t,e){var n=e+a+1;return(n==r?" > ":" ")+n+"| "+t}).join("\n");throw t.path=e,t.message=(e||"Jade")+":"+r+"\n"+s+"\n\n"+t.message,t},e.DebugItem=function(t,e){this.lineno=t,this.filename=e}},,function(t,e,n){var r,i;/*! - * jQuery JavaScript Library v2.2.0 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2016-01-08T20:02Z - */ -!function(e,n){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,function(n,o){function s(t){var e=!!t&&"length"in t&&t.length,n=ct.type(t);return"function"===n||ct.isWindow(t)?!1:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function u(t,e,n){if(ct.isFunction(e))return ct.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return ct.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(bt.test(e))return ct.filter(e,t,n);e=ct.filter(e,t)}return ct.grep(t,function(t){return rt.call(e,t)>-1!==n})}function a(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function c(t){var e={};return ct.each(t.match(St)||[],function(t,n){e[n]=!0}),e}function l(){Z.removeEventListener("DOMContentLoaded",l),n.removeEventListener("load",l),ct.ready()}function h(){this.expando=ct.expando+h.uid++}function f(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(Rt,"-$&").toLowerCase(),n=t.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Dt.test(n)?ct.parseJSON(n):n}catch(i){}Ot.set(t,e,n)}else n=void 0;return n}function p(t,e,n,r){var i,o=1,s=20,u=r?function(){return r.cur()}:function(){return ct.css(t,e,"")},a=u(),c=n&&n[3]||(ct.cssNumber[e]?"":"px"),l=(ct.cssNumber[e]||"px"!==c&&+a)&&Nt.exec(ct.css(t,e));if(l&&l[3]!==c){c=c||l[3],n=n||[],l=+a||1;do o=o||".5",l/=o,ct.style(t,e,l+c);while(o!==(o=u()/a)&&1!==o&&--s)}return n&&(l=+l||+a||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}function d(t,e){var n="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&ct.nodeName(t,e)?ct.merge([t],n):n}function g(t,e){for(var n=0,r=t.length;r>n;n++)At.set(t[n],"globalEval",!e||At.get(e[n],"globalEval"))}function v(t,e,n,r,i){for(var o,s,u,a,c,l,h=e.createDocumentFragment(),f=[],p=0,v=t.length;v>p;p++)if(o=t[p],o||0===o)if("object"===ct.type(o))ct.merge(f,o.nodeType?[o]:o);else if(qt.test(o)){for(s=s||h.appendChild(e.createElement("div")),u=(zt.exec(o)||["",""])[1].toLowerCase(),a=Bt[u]||Bt._default,s.innerHTML=a[1]+ct.htmlPrefilter(o)+a[2],l=a[0];l--;)s=s.lastChild;ct.merge(f,s.childNodes),s=h.firstChild,s.textContent=""}else f.push(e.createTextNode(o));for(h.textContent="",p=0;o=f[p++];)if(r&&ct.inArray(o,r)>-1)i&&i.push(o);else if(c=ct.contains(o.ownerDocument,o),s=d(h.appendChild(o),"script"),c&&g(s),n)for(l=0;o=s[l++];)Ht.test(o.type||"")&&n.push(o);return h}function m(){return!0}function y(){return!1}function b(){try{return Z.activeElement}catch(t){}}function w(t,e,n,r,i,o){var s,u;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=void 0);for(u in e)w(t,u,n,r,e[u],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=y;else if(!i)return this;return 1===o&&(s=i,i=function(t){return ct().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=ct.guid++)),t.each(function(){ct.event.add(this,e,i,r,n)})}function x(t,e){return ct.nodeName(t,"table")&&ct.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t:t}function _(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function E(t){var e=Jt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function C(t,e){var n,r,i,o,s,u,a,c;if(1===e.nodeType){if(At.hasData(t)&&(o=At.access(t),s=At.set(e,o),c=o.events)){delete s.handle,s.events={};for(i in c)for(n=0,r=c[i].length;r>n;n++)ct.event.add(e,i,c[i][n])}Ot.hasData(t)&&(u=Ot.access(t),a=ct.extend({},u),Ot.set(e,a))}}function S(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Pt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function T(t,e,n,r){e=et.apply([],e);var i,o,s,u,a,c,l=0,h=t.length,f=h-1,p=e[0],g=ct.isFunction(p);if(g||h>1&&"string"==typeof p&&!ut.checkClone&&Gt.test(p))return t.each(function(i){var o=t.eq(i);g&&(e[0]=p.call(this,i,o.html())),T(o,e,n,r)});if(h&&(i=v(e,t[0].ownerDocument,!1,t,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=ct.map(d(i,"script"),_),u=s.length;h>l;l++)a=i,l!==f&&(a=ct.clone(a,!0,!0),u&&ct.merge(s,d(a,"script"))),n.call(t[l],a,l);if(u)for(c=s[s.length-1].ownerDocument,ct.map(s,E),l=0;u>l;l++)a=s[l],Ht.test(a.type||"")&&!At.access(a,"globalEval")&&ct.contains(c,a)&&(a.src?ct._evalUrl&&ct._evalUrl(a.src):ct.globalEval(a.textContent.replace(Xt,"")))}return t}function M(t,e,n){for(var r,i=e?ct.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ct.cleanData(d(r)),r.parentNode&&(n&&ct.contains(r.ownerDocument,r)&&g(d(r,"script")),r.parentNode.removeChild(r));return t}function k(t,e){var n=ct(e.createElement(t)).appendTo(e.body),r=ct.css(n[0],"display");return n.detach(),r}function A(t){var e=Z,n=Kt[t];return n||(n=k(t,e),"none"!==n&&n||(Yt=(Yt||ct("