From 209cfd09c16122e94acb1e28972a97a46c92a5c7 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 7 Jun 2018 15:27:30 +0200 Subject: folder list on new samplernn page --- app/client/modules/pix2pix/views/pix2pix.new.js | 40 +- app/client/modules/pix2wav/index.js | 2 +- app/client/modules/samplernn/index.js | 12 +- .../modules/samplernn/views/samplernn.new.js | 56 +- public/assets/css/css.css | 20 +- public/bundle.js | 84325 ++++++++++++++++++- public/bundle.js.map | 2 +- 7 files changed, 84428 insertions(+), 29 deletions(-) diff --git a/app/client/modules/pix2pix/views/pix2pix.new.js b/app/client/modules/pix2pix/views/pix2pix.new.js index 203a606..f9f5db7 100644 --- a/app/client/modules/pix2pix/views/pix2pix.new.js +++ b/app/client/modules/pix2pix/views/pix2pix.new.js @@ -1,13 +1,41 @@ import { h, Component } from 'preact' +import { bindActionCreators } from 'redux' +import { connect } from 'react-redux' import NewDatasetForm from '../../../dataset/dataset.new' +import * as pix2pixActions from '../pix2pix.actions' import pix2pixModule from '../pix2pix.module' -export default function Pix2PixNew ({ history }) { - return ( -
- -
- ) +class Pix2PixNew extends Component { + constructor(props){ + super(props) + props.actions.load_directories() + } + render(){ + const { pix2pix, history } = this.props + console.log(pix2pix) + let folders + if (pix2pix.data) { + pix2pix.data.folders.forEach(folder => { + console.log(folder) + }) + } + return ( +
+ + {folders} +
+ ) + } } + +const mapStateToProps = state => ({ + pix2pix: state.module.pix2pix, +}) + +const mapDispatchToProps = (dispatch, ownProps) => ({ + actions: bindActionCreators(pix2pixActions, dispatch), +}) + +export default connect(mapStateToProps, mapDispatchToProps)(Pix2PixNew) diff --git a/app/client/modules/pix2wav/index.js b/app/client/modules/pix2wav/index.js index b73a5df..3a23395 100644 --- a/app/client/modules/pix2wav/index.js +++ b/app/client/modules/pix2wav/index.js @@ -4,7 +4,7 @@ import util from '../../util' import Pix2WavNew from './views/pix2wav.new' import Pix2WavShow from './views/pix2wav.show' -// import Pix2WavLive from './views/pix2wav.live' +import Pix2WavLive from './views/pix2wav.live' function router () { document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #fde, #ffe)' diff --git a/app/client/modules/samplernn/index.js b/app/client/modules/samplernn/index.js index 485a9a4..98195df 100644 --- a/app/client/modules/samplernn/index.js +++ b/app/client/modules/samplernn/index.js @@ -12,12 +12,12 @@ function router () { document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #eef, #fef)' return (
- - - - - - + + + + + +
) } diff --git a/app/client/modules/samplernn/views/samplernn.new.js b/app/client/modules/samplernn/views/samplernn.new.js index 5640afc..821c1d8 100644 --- a/app/client/modules/samplernn/views/samplernn.new.js +++ b/app/client/modules/samplernn/views/samplernn.new.js @@ -1,16 +1,60 @@ import { h, Component } from 'preact' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' +import { Link } from 'react-router-dom' import util from '../../../util' +import { + Group, Param +} from '../../../common' + import NewDatasetForm from '../../../dataset/dataset.new' +import * as samplernnActions from '../samplernn.actions' import samplernnModule from '../samplernn.module' -export default function SampleRNNNew ({ history }) { - return ( -
- -
- ) +class SampleRNNNew extends Component { + constructor(props){ + super(props) + props.actions.load_directories() + } + render(){ + const { samplernn, history } = this.props + console.log(samplernn) + let folders + if (samplernn.data) { + folders = samplernn.data.folders.map(folder => { + console.log(folder) + const datasetCount = folder.datasets ? folder.datasets.length : 0 + const [ className, size ] = util.hush_null(datasetCount) + return ( + {folder.name}}> + {datasetCount} dataset{util.courtesy_s(datasetCount)} + + ) + }) + } + return ( +
+
+ + {folders &&
+ + {folders} + +
} +
+
+ ) + } } + +const mapStateToProps = state => ({ + samplernn: state.module.samplernn, +}) + +const mapDispatchToProps = (dispatch, ownProps) => ({ + actions: bindActionCreators(samplernnActions, dispatch), +}) + +export default connect(mapStateToProps, mapDispatchToProps)(SampleRNNNew) diff --git a/public/assets/css/css.css b/public/assets/css/css.css index f1122ea..54a0712 100644 --- a/public/assets/css/css.css +++ b/public/assets/css/css.css @@ -145,6 +145,9 @@ section { width: 250px; line-height: 1.5; } +.narrow { + width: 250px; +} .gray { color: #888; opacity: 0.5; @@ -319,6 +322,21 @@ section { font-size: 14px; } +/* folder list */ +.folderList { + margin-top: 10px; + margin-left: 7px; +} +.folderList h3 { + margin-bottom: 3px; +} +.folderList .group { + padding: 3px; +} +.folderList .param { + padding: 3px 0; +} + /* datasets */ .datasets .row.dataset { max-width: 100vw; @@ -515,13 +533,11 @@ section { transform: scaleY(-1); cursor: pointer; } - .opaque { background: white; padding: 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.2); } - .last_message { width: 250px; opacity: 0.4; diff --git a/public/bundle.js b/public/bundle.js index f119d34..0511f97 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -1,16 +1,84327 @@ -!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=375)}([function(t,e,n){(function(t){t.exports=function(){"use strict";var e,i;function r(){return e.apply(null,arguments)}function o(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function s(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function a(t){return void 0===t}function u(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function l(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function c(t,e){var n,i=[];for(n=0;n>>0,i=0;i0)for(n=0;n=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var I=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,q=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},B={};function W(t,e,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),t&&(B[t]=r),e&&(B[e[0]]=function(){return N(r.apply(this,arguments),e[1],e[2])}),n&&(B[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function U(t,e){return t.isValid()?(e=G(e,t.localeData()),z[e]=z[e]||function(t){var e,n,i,r=t.match(I);for(e=0,n=r.length;e=0&&q.test(t);)t=t.replace(q,i),q.lastIndex=0,n-=1;return t}var V=/\d/,J=/\d\d/,Z=/\d{3}/,Q=/\d{4}/,K=/[+-]?\d{6}/,$=/\d\d?/,X=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,it=/[+-]?\d{1,6}/,rt=/\d+/,ot=/[+-]?\d+/,st=/Z|[+-]\d\d:?\d\d/gi,at=/Z|[+-]\d\d(?::?\d\d)?/gi,ut=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,lt={};function ct(t,e,n){lt[t]=D(e)?e:function(t,i){return t&&n?n:e}}function dt(t,e){return d(lt,t)?lt[t](e._strict,e._locale):new RegExp(ht(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r})))}function ht(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pt={};function ft(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),u(e)&&(i=function(t,n){n[e]=k(t)}),n=0;n68?1900:2e3)};var xt,Ot=Dt("FullYear",!0);function Dt(t,e){return function(n){return null!=n?(At(this,t,n),r.updateOffset(this,e),this):Pt(this,t)}}function Pt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function At(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&Yt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Et(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function Et(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,i=(e%(n=12)+n)%n;return t+=(e-i)/12,1===i?Yt(t)?29:28:31-i%7%2}xt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function Bt(t,e,n){var i=7+e-n,r=(7+zt(t,0,i).getUTCDay()-e)%7;return-r+i-1}function Wt(t,e,n,i,r){var o,s,a=(7+n-i)%7,u=Bt(t,i,r),l=1+7*(e-1)+a+u;return l<=0?s=Lt(o=t-1)+l:l>Lt(t)?(o=t+1,s=l-Lt(t)):(o=t,s=l),{year:o,dayOfYear:s}}function Ut(t,e,n){var i,r,o=Bt(t.year(),e,n),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?(r=t.year()-1,i=s+Gt(r,e,n)):s>Gt(t.year(),e,n)?(i=s-Gt(t.year(),e,n),r=t.year()+1):(r=t.year(),i=s),{week:i,year:r}}function Gt(t,e,n){var i=Bt(t,e,n),r=Bt(t+1,e,n);return(Lt(t)-i+r)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),H("week",5),H("isoWeek",5),ct("w",$),ct("ww",$,J),ct("W",$),ct("WW",$,J),_t(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=k(t)}),W("d",0,"do","day"),W("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),W("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),W("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),H("day",11),H("weekday",11),H("isoWeekday",11),ct("d",$),ct("e",$),ct("E",$),ct("dd",function(t,e){return e.weekdaysMinRegex(t)}),ct("ddd",function(t,e){return e.weekdaysShortRegex(t)}),ct("dddd",function(t,e){return e.weekdaysRegex(t)}),_t(["dd","ddd","dddd"],function(t,e,n,i){var r=n._locale.weekdaysParse(t,i,n._strict);null!=r?e.d=r:f(n).invalidWeekday=t}),_t(["d","e","E"],function(t,e,n,i){e[i]=k(t)});var Vt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Jt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Zt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qt=ut,Kt=ut,$t=ut;function Xt(){function t(t,e){return e.length-t.length}var e,n,i,r,o,s=[],a=[],u=[],l=[];for(e=0;e<7;e++)n=p([2e3,1]).day(e),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),s.push(i),a.push(r),u.push(o),l.push(i),l.push(r),l.push(o);for(s.sort(t),a.sort(t),u.sort(t),l.sort(t),e=0;e<7;e++)a[e]=ht(a[e]),u[e]=ht(u[e]),l[e]=ht(l[e]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function te(){return this.hours()%12||12}function ee(t,e){W(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function ne(t,e){return e._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,te),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+te.apply(this)+N(this.minutes(),2)}),W("hmmss",0,0,function(){return""+te.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+N(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)}),ee("a",!0),ee("A",!1),j("hour","h"),H("hour",13),ct("a",ne),ct("A",ne),ct("H",$),ct("h",$),ct("k",$),ct("HH",$,J),ct("hh",$,J),ct("kk",$,J),ct("hmm",X),ct("hmmss",tt),ct("Hmm",X),ct("Hmmss",tt),ft(["H","HH"],bt),ft(["k","kk"],function(t,e,n){var i=k(t);e[bt]=24===i?0:i}),ft(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ft(["h","hh"],function(t,e,n){e[bt]=k(t),f(n).bigHour=!0}),ft("hmm",function(t,e,n){var i=t.length-2;e[bt]=k(t.substr(0,i)),e[wt]=k(t.substr(i)),f(n).bigHour=!0}),ft("hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[bt]=k(t.substr(0,i)),e[wt]=k(t.substr(i,2)),e[Mt]=k(t.substr(r)),f(n).bigHour=!0}),ft("Hmm",function(t,e,n){var i=t.length-2;e[bt]=k(t.substr(0,i)),e[wt]=k(t.substr(i))}),ft("Hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[bt]=k(t.substr(0,i)),e[wt]=k(t.substr(i,2)),e[Mt]=k(t.substr(r))});var ie,re=Dt("Hours",!0),oe={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ct,monthsShort:Rt,week:{dow:0,doy:6},weekdays:Vt,weekdaysMin:Zt,weekdaysShort:Jt,meridiemParse:/[ap]\.?m?\.?/i},se={},ae={};function ue(t){return t?t.toLowerCase().replace("_","-"):t}function le(e){var i=null;if(!se[e]&&void 0!==t&&t&&t.exports)try{i=ie._abbr,n(362)("./"+e),ce(i)}catch(t){}return se[e]}function ce(t,e){var n;return t&&((n=a(e)?he(t):de(t,e))?ie=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ie._abbr}function de(t,e){if(null!==e){var n,i=oe;if(e.abbr=t,null!=se[t])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=se[t]._config;else if(null!=e.parentLocale)if(null!=se[e.parentLocale])i=se[e.parentLocale]._config;else{if(null==(n=le(e.parentLocale)))return ae[e.parentLocale]||(ae[e.parentLocale]=[]),ae[e.parentLocale].push({name:t,config:e}),null;i=n._config}return se[t]=new A(P(i,e)),ae[t]&&ae[t].forEach(function(t){de(t.name,t.config)}),ce(t),se[t]}return delete se[t],null}function he(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ie;if(!o(t)){if(e=le(t))return e;t=[t]}return function(t){for(var e,n,i,r,o=0;o0;){if(i=le(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&T(r,n,!0)>=e-1)break;e--}o++}return ie}(t)}function pe(t){var e,n=t._a;return n&&-2===f(t).overflow&&(e=n[vt]<0||n[vt]>11?vt:n[gt]<1||n[gt]>Et(n[yt],n[vt])?gt:n[bt]<0||n[bt]>24||24===n[bt]&&(0!==n[wt]||0!==n[Mt]||0!==n[kt])?bt:n[wt]<0||n[wt]>59?wt:n[Mt]<0||n[Mt]>59?Mt:n[kt]<0||n[kt]>999?kt:-1,f(t)._overflowDayOfYear&&(egt)&&(e=gt),f(t)._overflowWeeks&&-1===e&&(e=Tt),f(t)._overflowWeekday&&-1===e&&(e=St),f(t).overflow=e),t}function fe(t,e,n){return null!=t?t:null!=e?e:n}function _e(t){var e,n,i,o,s,a=[];if(!t._d){for(i=function(t){var e=new Date(r.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[gt]&&null==t._a[vt]&&function(t){var e,n,i,r,o,s,a,u;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)o=1,s=4,n=fe(e.GG,t._a[yt],Ut(De(),1,4).year),i=fe(e.W,1),((r=fe(e.E,1))<1||r>7)&&(u=!0);else{o=t._locale._week.dow,s=t._locale._week.doy;var l=Ut(De(),o,s);n=fe(e.gg,t._a[yt],l.year),i=fe(e.w,l.week),null!=e.d?((r=e.d)<0||r>6)&&(u=!0):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(u=!0)):r=o}i<1||i>Gt(n,o,s)?f(t)._overflowWeeks=!0:null!=u?f(t)._overflowWeekday=!0:(a=Wt(n,i,r,o,s),t._a[yt]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(s=fe(t._a[yt],i[yt]),(t._dayOfYear>Lt(s)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),n=zt(s,0,t._dayOfYear),t._a[vt]=n.getUTCMonth(),t._a[gt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=i[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[bt]&&0===t._a[wt]&&0===t._a[Mt]&&0===t._a[kt]&&(t._nextDay=!0,t._a[bt]=0),t._d=(t._useUTC?zt:function(t,e,n,i,r,o,s){var a=new Date(t,e,n,i,r,o,s);return t<100&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}).apply(null,a),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[bt]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(f(t).weekdayMismatch=!0)}}var me=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ye=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ve=/Z|[+-]\d\d(?::?\d\d)?/,ge=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],be=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],we=/^\/?Date\((\-?\d+)/i;function Me(t){var e,n,i,r,o,s,a=t._i,u=me.exec(a)||ye.exec(a);if(u){for(f(t).iso=!0,e=0,n=ge.length;e0&&f(t).unusedInput.push(s),a=a.slice(a.indexOf(n)+n.length),l+=n.length),B[o]?(n?f(t).empty=!1:f(t).unusedTokens.push(o),mt(o,n,t)):t._strict&&!n&&f(t).unusedTokens.push(o);f(t).charsLeftOver=u-l,a.length>0&&f(t).unusedInput.push(a),t._a[bt]<=12&&!0===f(t).bigHour&&t._a[bt]>0&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[bt]=(c=t._locale,d=t._a[bt],null==(h=t._meridiem)?d:null!=c.meridiemHour?c.meridiemHour(d,h):null!=c.isPM?((p=c.isPM(h))&&d<12&&(d+=12),p||12!==d||(d=0),d):d),_e(t),pe(t)}else Le(t);else Me(t);var c,d,h,p}function xe(t){var e=t._i,n=t._f;return t._locale=t._locale||he(t._l),null===e||void 0===n&&""===e?m({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),w(e)?new b(pe(e)):(l(e)?t._d=e:o(n)?function(t){var e,n,i,r,o;if(0===t._f.length)return f(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;rthis?this:t:m()});function Ee(t,e){var n,i;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return De();for(n=e[0],i=1;io&&(e=o),function(t,e,n,i,r){var o=Wt(t,e,n,i,r),s=zt(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}.call(this,t,e,n,i,r))}W(0,["gg",2],0,function(){return this.weekYear()%100}),W(0,["GG",2],0,function(){return this.isoWeekYear()%100}),rn("gggg","weekYear"),rn("ggggg","weekYear"),rn("GGGG","isoWeekYear"),rn("GGGGG","isoWeekYear"),j("weekYear","gg"),j("isoWeekYear","GG"),H("weekYear",1),H("isoWeekYear",1),ct("G",ot),ct("g",ot),ct("GG",$,J),ct("gg",$,J),ct("GGGG",nt,Q),ct("gggg",nt,Q),ct("GGGGG",it,K),ct("ggggg",it,K),_t(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=k(t)}),_t(["gg","GG"],function(t,e,n,i){e[i]=r.parseTwoDigitYear(t)}),W("Q",0,"Qo","quarter"),j("quarter","Q"),H("quarter",7),ct("Q",V),ft("Q",function(t,e){e[vt]=3*(k(t)-1)}),W("D",["DD",2],"Do","date"),j("date","D"),H("date",9),ct("D",$),ct("DD",$,J),ct("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),ft(["D","DD"],gt),ft("Do",function(t,e){e[gt]=k(t.match($)[0])});var sn=Dt("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),j("dayOfYear","DDD"),H("dayOfYear",4),ct("DDD",et),ct("DDDD",Z),ft(["DDD","DDDD"],function(t,e,n){n._dayOfYear=k(t)}),W("m",["mm",2],0,"minute"),j("minute","m"),H("minute",14),ct("m",$),ct("mm",$,J),ft(["m","mm"],wt);var an=Dt("Minutes",!1);W("s",["ss",2],0,"second"),j("second","s"),H("second",15),ct("s",$),ct("ss",$,J),ft(["s","ss"],Mt);var un,ln=Dt("Seconds",!1);for(W("S",0,0,function(){return~~(this.millisecond()/100)}),W(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,function(){return 10*this.millisecond()}),W(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),W(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),W(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),W(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),W(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),j("millisecond","ms"),H("millisecond",16),ct("S",et,V),ct("SS",et,J),ct("SSS",et,Z),un="SSSS";un.length<=9;un+="S")ct(un,rt);function cn(t,e){e[kt]=k(1e3*("0."+t))}for(un="S";un.length<=9;un+="S")ft(un,cn);var dn=Dt("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var hn=b.prototype;function pn(t){return t}hn.add=Ke,hn.calendar=function(t,e){var n=t||De(),i=qe(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",s=e&&(D(e[o])?e[o].call(this,n):e[o]);return this.format(s||this.localeData().calendar(o,this,De(n)))},hn.clone=function(){return new b(this)},hn.diff=function(t,e,n){var i,r,o;if(!this.isValid())return NaN;if(!(i=qe(t,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),e=C(e)){case"year":o=Xe(this,i)/12;break;case"month":o=Xe(this,i);break;case"quarter":o=Xe(this,i)/3;break;case"second":o=(this-i)/1e3;break;case"minute":o=(this-i)/6e4;break;case"hour":o=(this-i)/36e5;break;case"day":o=(this-i-r)/864e5;break;case"week":o=(this-i-r)/6048e5;break;default:o=this-i}return n?o:M(o)},hn.endOf=function(t){return void 0===(t=C(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},hn.format=function(t){t||(t=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var e=U(this,t);return this.localeData().postformat(e)},hn.from=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||De(t).isValid())?Ge({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},hn.fromNow=function(t){return this.from(De(),t)},hn.to=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||De(t).isValid())?Ge({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},hn.toNow=function(t){return this.to(De(),t)},hn.get=function(t){return D(this[t=C(t)])?this[t]():this},hn.invalidAt=function(){return f(this).overflow},hn.isAfter=function(t,e){var n=w(t)?t:De(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=C(a(e)?"millisecond":e))?this.valueOf()>n.valueOf():n.valueOf()9999?U(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},hn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=e+'[")]';return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+r)},hn.toJSON=function(){return this.isValid()?this.toISOString():null},hn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},hn.unix=function(){return Math.floor(this.valueOf()/1e3)},hn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},hn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},hn.year=Ot,hn.isLeapYear=function(){return Yt(this.year())},hn.weekYear=function(t){return on.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},hn.isoWeekYear=function(t){return on.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},hn.quarter=hn.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},hn.month=Ht,hn.daysInMonth=function(){return Et(this.year(),this.month())},hn.week=hn.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},hn.isoWeek=hn.isoWeeks=function(t){var e=Ut(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},hn.weeksInYear=function(){var t=this.localeData()._week;return Gt(this.year(),t.dow,t.doy)},hn.isoWeeksInYear=function(){return Gt(this.year(),1,4)},hn.date=sn,hn.day=hn.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},hn.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},hn.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},hn.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},hn.hour=hn.hours=re,hn.minute=hn.minutes=an,hn.second=hn.seconds=ln,hn.millisecond=hn.milliseconds=dn,hn.utcOffset=function(t,e,n){var i,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Ie(at,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(i=ze(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==t&&(!e||this._changeInProgress?Qe(this,Ge(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:ze(this)},hn.utc=function(t){return this.utcOffset(0,t)},hn.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(ze(this),"m")),this},hn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ie(st,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},hn.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?De(t).utcOffset():0,(this.utcOffset()-t)%60==0)},hn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},hn.isLocal=function(){return!!this.isValid()&&!this._isUTC},hn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},hn.isUtc=Be,hn.isUTC=Be,hn.zoneAbbr=function(){return this._isUTC?"UTC":""},hn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},hn.dates=L("dates accessor is deprecated. Use date instead.",sn),hn.months=L("months accessor is deprecated. Use month instead",Ht),hn.years=L("years accessor is deprecated. Use year instead",Ot),hn.zone=L("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),hn.isDSTShifted=L("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=xe(t))._a){var e=t._isUTC?p(t._a):De(t._a);this._isDSTShifted=this.isValid()&&T(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var fn=A.prototype;function _n(t,e,n,i){var r=he(),o=p().set(i,e);return r[n](o,t)}function mn(t,e,n){if(u(t)&&(e=t,t=void 0),t=t||"",null!=e)return _n(t,e,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=_n(t,i,n,"month");return r}function yn(t,e,n,i){"boolean"==typeof t?(u(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,u(e)&&(n=e,e=void 0),e=e||"");var r,o=he(),s=t?o._week.dow:0;if(null!=n)return _n(e,(n+s)%7,i,"day");var a=[];for(r=0;r<7;r++)a[r]=_n(e,(r+s)%7,i,"day");return a}fn.calendar=function(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return D(i)?i.call(e,n):i},fn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},fn.invalidDate=function(){return this._invalidDate},fn.ordinal=function(t){return this._ordinal.replace("%d",t)},fn.preparse=pn,fn.postformat=pn,fn.relativeTime=function(t,e,n,i){var r=this._relativeTime[n];return D(r)?r(t,e,n,i):r.replace(/%d/i,t)},fn.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return D(n)?n(e):n.replace(/%s/i,e)},fn.set=function(t){var e,n;for(n in t)D(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},fn.months=function(t,e){return t?o(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||jt).test(e)?"format":"standalone"][t.month()]:o(this._months)?this._months:this._months.standalone},fn.monthsShort=function(t,e){return t?o(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[jt.test(e)?"format":"standalone"][t.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},fn.monthsParse=function(t,e,n){var i,r,o;if(this._monthsParseExact)return function(t,e,n){var i,r,o,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)o=p([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(r=xt.call(this._shortMonthsParse,s))?r:null:-1!==(r=xt.call(this._longMonthsParse,s))?r:null:"MMM"===e?-1!==(r=xt.call(this._shortMonthsParse,s))?r:-1!==(r=xt.call(this._longMonthsParse,s))?r:null:-1!==(r=xt.call(this._longMonthsParse,s))?r:-1!==(r=xt.call(this._shortMonthsParse,s))?r:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=p([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}},fn.monthsRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||qt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=It),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},fn.monthsShortRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||qt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Nt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},fn.week=function(t){return Ut(t,this._week.dow,this._week.doy).week},fn.firstDayOfYear=function(){return this._week.doy},fn.firstDayOfWeek=function(){return this._week.dow},fn.weekdays=function(t,e){return t?o(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},fn.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},fn.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},fn.weekdaysParse=function(t,e,n){var i,r,o;if(this._weekdaysParseExact)return function(t,e,n){var i,r,o,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=p([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(r=xt.call(this._weekdaysParse,s))?r:null:"ddd"===e?-1!==(r=xt.call(this._shortWeekdaysParse,s))?r:null:-1!==(r=xt.call(this._minWeekdaysParse,s))?r:null:"dddd"===e?-1!==(r=xt.call(this._weekdaysParse,s))?r:-1!==(r=xt.call(this._shortWeekdaysParse,s))?r:-1!==(r=xt.call(this._minWeekdaysParse,s))?r:null:"ddd"===e?-1!==(r=xt.call(this._shortWeekdaysParse,s))?r:-1!==(r=xt.call(this._weekdaysParse,s))?r:-1!==(r=xt.call(this._minWeekdaysParse,s))?r:null:-1!==(r=xt.call(this._minWeekdaysParse,s))?r:-1!==(r=xt.call(this._weekdaysParse,s))?r:-1!==(r=xt.call(this._shortWeekdaysParse,s))?r:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=p([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}},fn.weekdaysRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Xt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Qt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},fn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Xt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Kt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},fn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Xt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},fn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},fn.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},ce("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),r.lang=L("moment.lang is deprecated. Use moment.locale instead.",ce),r.langData=L("moment.langData is deprecated. Use moment.localeData instead.",he);var vn=Math.abs;function gn(t,e,n,i){var r=Ge(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function bn(t){return t<0?Math.floor(t):Math.ceil(t)}function wn(t){return 4800*t/146097}function Mn(t){return 146097*t/4800}function kn(t){return function(){return this.as(t)}}var Tn=kn("ms"),Sn=kn("s"),Ln=kn("m"),Yn=kn("h"),xn=kn("d"),On=kn("w"),Dn=kn("M"),Pn=kn("y");function An(t){return function(){return this.isValid()?this._data[t]:NaN}}var En=An("milliseconds"),jn=An("seconds"),Cn=An("minutes"),Rn=An("hours"),Fn=An("days"),Hn=An("months"),Nn=An("years"),In=Math.round,qn={ss:44,s:45,m:45,h:22,d:26,M:11},zn=Math.abs;function Bn(t){return(t>0)-(t<0)||+t}function Wn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=zn(this._milliseconds)/1e3,i=zn(this._days),r=zn(this._months);t=M(n/60),e=M(t/60),n%=60,t%=60;var o=M(r/12),s=r%=12,a=i,u=e,l=t,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var h=d<0?"-":"",p=Bn(this._months)!==Bn(d)?"-":"",f=Bn(this._days)!==Bn(d)?"-":"",_=Bn(this._milliseconds)!==Bn(d)?"-":"";return h+"P"+(o?p+o+"Y":"")+(s?p+s+"M":"")+(a?f+a+"D":"")+(u||l||c?"T":"")+(u?_+u+"H":"")+(l?_+l+"M":"")+(c?_+c+"S":"")}var Un=Ce.prototype;return Un.isValid=function(){return this._isValid},Un.abs=function(){var t=this._data;return this._milliseconds=vn(this._milliseconds),this._days=vn(this._days),this._months=vn(this._months),t.milliseconds=vn(t.milliseconds),t.seconds=vn(t.seconds),t.minutes=vn(t.minutes),t.hours=vn(t.hours),t.months=vn(t.months),t.years=vn(t.years),this},Un.add=function(t,e){return gn(this,t,e,1)},Un.subtract=function(t,e){return gn(this,t,e,-1)},Un.as=function(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=C(t))||"year"===t)return e=this._days+i/864e5,n=this._months+wn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(Mn(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}},Un.asMilliseconds=Tn,Un.asSeconds=Sn,Un.asMinutes=Ln,Un.asHours=Yn,Un.asDays=xn,Un.asWeeks=On,Un.asMonths=Dn,Un.asYears=Pn,Un.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},Un._bubble=function(){var t,e,n,i,r,o=this._milliseconds,s=this._days,a=this._months,u=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*bn(Mn(a)+s),s=0,a=0),u.milliseconds=o%1e3,t=M(o/1e3),u.seconds=t%60,e=M(t/60),u.minutes=e%60,n=M(e/60),u.hours=n%24,s+=M(n/24),r=M(wn(s)),a+=r,s-=bn(Mn(r)),i=M(a/12),a%=12,u.days=s,u.months=a,u.years=i,this},Un.clone=function(){return Ge(this)},Un.get=function(t){return t=C(t),this.isValid()?this[t+"s"]():NaN},Un.milliseconds=En,Un.seconds=jn,Un.minutes=Cn,Un.hours=Rn,Un.days=Fn,Un.weeks=function(){return M(this.days()/7)},Un.months=Hn,Un.years=Nn,Un.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=function(t,e,n){var i=Ge(t).abs(),r=In(i.as("s")),o=In(i.as("m")),s=In(i.as("h")),a=In(i.as("d")),u=In(i.as("M")),l=In(i.as("y")),c=r<=qn.ss&&["s",r]||r0,c[4]=n,function(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}.apply(null,c)}(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)},Un.toISOString=Wn,Un.toString=Wn,Un.toJSON=Wn,Un.locale=tn,Un.localeData=nn,Un.toIsoString=L("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Wn),Un.lang=en,W("X",0,0,"unix"),W("x",0,0,"valueOf"),ct("x",ot),ct("X",/[+-]?\d+(\.\d{1,3})?/),ft("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),ft("x",function(t,e,n){n._d=new Date(k(t))}),r.version="2.22.1",e=De,r.fn=hn,r.min=function(){return Ee("isBefore",[].slice.call(arguments,0))},r.max=function(){return Ee("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=p,r.unix=function(t){return De(1e3*t)},r.months=function(t,e){return mn(t,e,"months")},r.isDate=l,r.locale=ce,r.invalid=m,r.duration=Ge,r.isMoment=w,r.weekdays=function(t,e,n){return yn(t,e,n,"weekdays")},r.parseZone=function(){return De.apply(null,arguments).parseZone()},r.localeData=he,r.isDuration=Re,r.monthsShort=function(t,e){return mn(t,e,"monthsShort")},r.weekdaysMin=function(t,e,n){return yn(t,e,n,"weekdaysMin")},r.defineLocale=de,r.updateLocale=function(t,e){if(null!=e){var n,i,r=oe;null!=(i=le(t))&&(r=i._config),e=P(r,e),(n=new A(e)).parentLocale=se[t],se[t]=n,ce(t)}else null!=se[t]&&(null!=se[t].parentLocale?se[t]=se[t].parentLocale:null!=se[t]&&delete se[t]);return se[t]},r.locales=function(){return Y(se)},r.weekdaysShort=function(t,e,n){return yn(t,e,n,"weekdaysShort")},r.normalizeUnits=C,r.relativeTimeRounding=function(t){return void 0===t?In:"function"==typeof t&&(In=t,!0)},r.relativeTimeThreshold=function(t,e){return void 0!==qn[t]&&(void 0===e?qn[t]:(qn[t]=e,"s"===t&&(qn.ss=e-1),!0))},r.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=hn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n(363)(t))},function(t,e,n){t.exports=n(374)()},function(t,e,n){"use strict";n.r(e),n.d(e,"h",function(){return s}),n.d(e,"createElement",function(){return s}),n.d(e,"cloneElement",function(){return l}),n.d(e,"Component",function(){return j}),n.d(e,"render",function(){return C}),n.d(e,"rerender",function(){return p}),n.d(e,"options",function(){return i});var i={},r=[],o=[];function s(t,e){var n,s,a,u,l=o;for(u=arguments.length;u-- >2;)r.push(arguments[u]);for(e&&null!=e.children&&(r.length||r.push(e.children),delete e.children);r.length;)if((s=r.pop())&&void 0!==s.pop)for(u=s.length;u--;)r.push(s[u]);else"boolean"==typeof s&&(s=null),(a="function"!=typeof t)&&(null==s?s="":"number"==typeof s?s=String(s):"string"!=typeof s&&(a=!1)),a&&n?l[l.length-1]+=s:l===o?l=[s]:l.push(s),n=a;var c=new function(){};return c.nodeName=t,c.children=l,c.attributes=null==e?void 0:e,c.key=null==e?void 0:e.key,void 0!==i.vnode&&i.vnode(c),c}function a(t,e){for(var n in e)t[n]=e[n];return t}var u="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function l(t,e){return s(t.nodeName,a(a({},t.attributes),e),arguments.length>2?[].slice.call(arguments,2):t.children)}var c=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,d=[];function h(t){!t._dirty&&(t._dirty=!0)&&1==d.push(t)&&(i.debounceRendering||u)(p)}function p(){var t,e=d;for(d=[];t=e.pop();)t._dirty&&A(t)}function f(t,e){return t.normalizedNodeName===e||t.nodeName.toLowerCase()===e.toLowerCase()}function _(t){var e=a({},t.attributes);e.children=t.children;var n=t.nodeName.defaultProps;if(void 0!==n)for(var i in n)void 0===e[i]&&(e[i]=n[i]);return e}function m(t){var e=t.parentNode;e&&e.removeChild(t)}function y(t,e,n,i,r){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)n&&n(null),i&&i(t);else if("class"!==e||r)if("style"===e){if(i&&"string"!=typeof i&&"string"!=typeof n||(t.style.cssText=i||""),i&&"object"==typeof i){if("string"!=typeof n)for(var o in n)o in i||(t.style[o]="");for(var o in i)t.style[o]="number"==typeof i[o]&&!1===c.test(o)?i[o]+"px":i[o]}}else if("dangerouslySetInnerHTML"===e)i&&(t.innerHTML=i.__html||"");else if("o"==e[0]&&"n"==e[1]){var s=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),i?n||t.addEventListener(e,v,s):t.removeEventListener(e,v,s),(t._listeners||(t._listeners={}))[e]=i}else if("list"!==e&&"type"!==e&&!r&&e in t)!function(t,e,n){try{t[e]=n}catch(t){}}(t,e,null==i?"":i),null!=i&&!1!==i||t.removeAttribute(e);else{var a=r&&e!==(e=e.replace(/^xlink:?/,""));null==i||!1===i?a?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.removeAttribute(e):"function"!=typeof i&&(a?t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),i):t.setAttribute(e,i))}else t.className=i||""}function v(t){return this._listeners[t.type](i.event&&i.event(t)||t)}var g=[],b=0,w=!1,M=!1;function k(){for(var t;t=g.pop();)i.afterMount&&i.afterMount(t),t.componentDidMount&&t.componentDidMount()}function T(t,e,n,i,r,o){b++||(w=null!=r&&void 0!==r.ownerSVGElement,M=null!=t&&!("__preactattr_"in t));var s=S(t,e,n,i,o);return r&&s.parentNode!==r&&r.appendChild(s),--b||(M=!1,o||k()),s}function S(t,e,n,i,r){var o=t,s=w;if(null!=e&&"boolean"!=typeof e||(e=""),"string"==typeof e||"number"==typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||r)?t.nodeValue!=e&&(t.nodeValue=e):(o=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(o,t),L(t,!0))),o.__preactattr_=!0,o;var a,u,l=e.nodeName;if("function"==typeof l)return function(t,e,n,i){var r=t&&t._component,o=r,s=t,a=r&&t._componentConstructor===e.nodeName,u=a,l=_(e);for(;r&&!u&&(r=r._parentComponent);)u=r.constructor===e.nodeName;r&&u&&(!i||r._component)?(P(r,l,3,n,i),t=r.base):(o&&!a&&(E(o),t=s=null),r=O(e.nodeName,l,n),t&&!r.nextBase&&(r.nextBase=t,s=null),P(r,l,1,n,i),t=r.base,s&&t!==s&&(s._component=null,L(s,!1)));return t}(t,e,n,i);if(w="svg"===l||"foreignObject"!==l&&w,l=String(l),(!t||!f(t,l))&&(a=l,(u=w?document.createElementNS("http://www.w3.org/2000/svg",a):document.createElement(a)).normalizedNodeName=a,o=u,t)){for(;t.firstChild;)o.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(o,t),L(t,!0)}var c=o.firstChild,d=o.__preactattr_,h=e.children;if(null==d){d=o.__preactattr_={};for(var p=o.attributes,v=p.length;v--;)d[p[v].name]=p[v].value}return!M&&h&&1===h.length&&"string"==typeof h[0]&&null!=c&&void 0!==c.splitText&&null==c.nextSibling?c.nodeValue!=h[0]&&(c.nodeValue=h[0]):(h&&h.length||null!=c)&&function(t,e,n,i,r){var o,s,a,u,l,c=t.childNodes,d=[],h={},p=0,_=0,y=c.length,v=0,g=e?e.length:0;if(0!==y)for(var b=0;b0;)n[i]=arguments[i+2];if(!x(t))return t;var r=t.attributes||t.props,s=[Object(o.h)(t.nodeName||t.type,D({},r),t.children||r&&r.children),e];return n&&n.length?s.push(n):e&&e.children&&s.push(e.children),Y(o.cloneElement.apply(void 0,s))},isValidElement:x,findDOMNode:function(t){return t&&t.base||t},unmountComponentAtNode:function(t){var e=t._preactCompatRendered&&t._preactCompatRendered.base;return!(!e||e.parentNode!==t||(Object(o.render)(Object(o.h)(p),t,e),0))},Component:I,PureComponent:q,unstable_renderSubtreeIntoContainer:function(t,e,n,i){var r=y(Object(o.h)(v,{context:t.context},e),n),s=r._component||r.base;return i&&i.call(s,r),s},__spread:D};e.d=z}).call(this,n(35))},function(t,e,n){"use strict";t.exports=function(){}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(67);e.default={system:{load_site:"SYSTEM_LOAD_SITE",running_command:"SYSTEM_RUNNING_COMMAND",command_output:"SYSTEM_COMMAND_OUTPUT",relay_connected:"SYSTEM_RELAY_CONNECTED",relay_disconnected:"SYSTEM_RELAY_DISCONNECTED",rpc_connected:"SYSTEM_RPC_CONNECTED",rpc_disconnected:"SYSTEM_RPC_DISCONNECTED",list_directory:"SYSTEM_LIST_DIRECTORY",listing_directory:"SYSTEM_LISTING_DIRECTORY",stdout:"SYSTEM_STDOUT",stderr:"SYSTEM_STDERR"},app:{change_tool:"APP_CHANGE_TOOL",load_progress:"APP_LOAD_PROGRESS"},folder:(0,i.crud_type)("folder",[]),file:(0,i.crud_type)("file",[]),task:(0,i.crud_type)("task",["starting_task","stopping_task","task_begin","task_finish","start_queue","stop_queue","starting_queue","stopping_queue","progress","epoch"]),socket:{connect:"SOCKET_CONNECT",connect_error:"SOCKET_CONNECT_ERROR",reconnect:"SOCKET_RECONNECT",reconnecting:"SOCKET_RECONNECTING",reconnect_error:"SOCKET_RECONNECT_ERROR",reconnect_failed:"SOCKET_RECONNECT_FAILED",disconnect:"SOCKET_DISCONNECT",error:"SOCKET_ERROR",status:"SOCKET_STATUS",load_params:"SOCKET_LOAD_PARAMS",list_checkpoints:"SOCKET_LIST_CHECKPOINTS",list_sequences:"SOCKET_LIST_SEQUENCES",list_epochs:"SOCKET_LIST_EPOCHS"},player:{get_params:"GET_PARAMS",set_param:"SET_PARAM",loading_checkpoints:"LOADING_CHECKPOINTS",loading_checkpoint:"LOADING_CHECKPOINT",list_checkpoints:"LIST_CHECKPOINTS",loading_sequences:"LOADING_SEQUENCES",loading_sequence:"LOADING_SEQUENCE",load_sequence:"LOAD_SEQUENCE",loading_epochs:"LOADING_EPOCHS",load_epoch:"LOAD_EPOCH",set_fps:"SET_FPS",seeking:"SEEKING",pausing:"PAUSING",playing:"PLAYING",current_frame:"CURRENT_FRAME",start_recording:"START_RECORDING",add_record_frame:"ADD_RECORD_FRAME",save_frame:"SAVE_FRAME",saving_video:"SAVING_VIDEO",save_video:"SAVE_VIDEO"},audioPlayer:{play:"AUDIO_PLAY",pause:"AUDIO_PAUSE",resume:"AUDIO_RESUME",enqueue:"AUDIO_ENQUEUE"},dataset:{load:"DATASET_LOAD",set_folder:"DATASET_SET_FOLDER",upload_files:"DATASET_UPLOAD_FILES",file_progress:"DATASET_FILE_PROGRESS",file_uploaded:"DATASET_FILE_UPLOADED",fetch_url:"DATASET_FETCH_URL",fetch_progress:"DATASET_FETCH_PROGRESS"},samplernn:{init:"SAMPLERNN_INIT",set_folder:"SAMPLERNN_SET_FOLDER",load_loss:"SAMPLERNN_LOAD_LOSS"},pix2pix:(0,i.with_type)("pix2pix",["init","set_folder"]),pix2wav:(0,i.with_type)("pix2wav",["init","set_folder"]),wav2pix:(0,i.with_type)("wav2pix",["load","progress","finish","zip","uploading"])}},function(t,e,n){"use strict";n.r(e),n.d(e,"createStore",function(){return u}),n.d(e,"combineReducers",function(){return c}),n.d(e,"bindActionCreators",function(){return h}),n.d(e,"applyMiddleware",function(){return f}),n.d(e,"compose",function(){return p}),n.d(e,"__DO_NOT_USE__ActionTypes",function(){return r});var i=n(73),r={INIT:"@@redux/INIT"+Math.random().toString(36).substring(7).split("").join("."),REPLACE:"@@redux/REPLACE"+Math.random().toString(36).substring(7).split("").join(".")},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];if(a)throw a;for(var i=!1,r={},o=0;o0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1]||e+"Subscription",r=function(t){function r(n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n,i));return o[e]=n.store,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),r.prototype.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},r.prototype.render=function(){return i.a.only(this.props.children)},r}(i.b);return r.propTypes={store:a.isRequired,children:o.a.element.isRequired},r.childContextTypes=((t={})[e]=a.isRequired,t[n]=s,t),r}var l=u(),c=n(47),d=n.n(c),h=n(9),p=n.n(h);var f=null,_={notify:function(){}};var m=function(){function t(e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.store=e,this.parentSub=n,this.onStateChange=i,this.unsubscribe=null,this.listeners=_}return t.prototype.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},t.prototype.notifyNestedSubs=function(){this.listeners.notify()},t.prototype.isSubscribed=function(){return Boolean(this.unsubscribe)},t.prototype.trySubscribe=function(){var t,e;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(t=[],e=[],{clear:function(){e=f,t=f},notify:function(){for(var n=t=e,i=0;i1&&void 0!==arguments[1]?arguments[1]:{},o=r.getDisplayName,u=void 0===o?function(t){return"ConnectAdvanced("+t+")"}:o,l=r.methodName,c=void 0===l?"connectAdvanced":l,h=r.renderCountProp,f=void 0===h?void 0:h,_=r.shouldHandleStateChanges,w=void 0===_||_,M=r.storeKey,k=void 0===M?"store":M,T=r.withRef,S=void 0!==T&&T,L=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),Y=k+"Subscription",x=v++,O=((e={})[k]=a,e[Y]=s,e),D=((n={})[Y]=s,n);return function(e){p()("function"==typeof e,"You must pass a component to the function returned by "+c+". Instead received "+JSON.stringify(e));var n=e.displayName||e.name||"Component",r=u(n),o=y({},L,{getDisplayName:u,methodName:c,renderCountProp:f,shouldHandleStateChanges:w,storeKey:k,withRef:S,displayName:r,wrappedComponentName:n,WrappedComponent:e}),s=function(n){function s(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,n.call(this,t,e));return i.version=x,i.state={},i.renderCount=0,i.store=t[k]||e[k],i.propsMode=Boolean(t[k]),i.setWrappedInstance=i.setWrappedInstance.bind(i),p()(i.store,'Could not find "'+k+'" in either the context or props of "'+r+'". Either wrap the root component in a , or explicitly pass "'+k+'" as a prop to "'+r+'".'),i.initSelector(),i.initSubscription(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(s,n),s.prototype.getChildContext=function(){var t,e=this.propsMode?null:this.subscription;return(t={})[Y]=e||this.context[Y],t},s.prototype.componentDidMount=function(){w&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},s.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},s.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},s.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=b,this.store=null,this.selector.run=b,this.selector.shouldComponentUpdate=!1},s.prototype.getWrappedInstance=function(){return p()(S,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+c+"() call."),this.wrappedInstance},s.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},s.prototype.initSelector=function(){var e=t(this.store.dispatch,o);this.selector=function(t,e){var n={run:function(i){try{var r=t(e.getState(),i);(r!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=r,n.error=null)}catch(t){n.shouldComponentUpdate=!0,n.error=t}}};return n}(e,this.store),this.selector.run(this.props)},s.prototype.initSubscription=function(){if(w){var t=(this.propsMode?this.props:this.context)[Y];this.subscription=new m(this.store,t,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},s.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(g)):this.notifyNestedSubs()},s.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},s.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},s.prototype.addExtraProps=function(t){if(!(S||f||this.propsMode&&this.subscription))return t;var e=y({},t);return S&&(e.ref=this.setWrappedInstance),f&&(e[f]=this.renderCount++),this.propsMode&&this.subscription&&(e[Y]=this.subscription),e},s.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return Object(i.c)(e,this.addExtraProps(t.props))},s}(i.b);return s.WrappedComponent=e,s.displayName=r,s.childContextTypes=D,s.contextTypes=O,s.propTypes=O,d()(s,e)}}var M=Object.prototype.hasOwnProperty;function k(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}function T(t,e){if(k(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var r=0;r=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),s=n(t,o),a=i(t,o),u=r(t,o);return(o.pure?z:q)(s,a,u,t,o)}var W=Object.assign||function(t){for(var e=1;e=0;i--){var r=e[i](t);if(r)return r}return function(e,i){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+i.wrappedComponentName+".")}}function G(t,e){return t===e}var V=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.connectHOC,n=void 0===e?w:e,i=t.mapStateToPropsFactories,r=void 0===i?F:i,o=t.mapDispatchToPropsFactories,s=void 0===o?R:o,a=t.mergePropsFactories,u=void 0===a?I:a,l=t.selectorFactory,c=void 0===l?B:l;return function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=o.pure,l=void 0===a||a,d=o.areStatesEqual,h=void 0===d?G:d,p=o.areOwnPropsEqual,f=void 0===p?T:p,_=o.areStatePropsEqual,m=void 0===_?T:_,y=o.areMergedPropsEqual,v=void 0===y?T:y,g=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),b=U(t,r,"mapStateToProps"),w=U(e,s,"mapDispatchToProps"),M=U(i,u,"mergeProps");return n(c,W({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:b,initMapDispatchToProps:w,initMergeProps:M,pure:l,areStatesEqual:h,areOwnPropsEqual:f,areStatePropsEqual:m,areMergedPropsEqual:v},g))}}();n.d(e,"Provider",function(){return l}),n.d(e,"createProvider",function(){return u}),n.d(e,"connectAdvanced",function(){return w}),n.d(e,"connect",function(){return V})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e1;)try{return c.stringifyByChunk(t,i,n)}catch(t){n=Math.floor(n/2)}return c.stringifyByChar(t)}function h(t,e){for(var n=0;n "+t:t}},t.exports=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=Object.assign||function(t){for(var e=1;e0?"ep. "+m:""),p.has("date")&&(0,i.h)("div",{className:"date "+o.default.carbon_date(_)},(0,r.default)(_).format("YYYY-MM-DD")),p.has("datetime")&&(0,i.h)("div",{className:"datetime "+o.default.carbon_date(_)},(0,r.default)(_).format("YYYY-MM-DD h:mm a")),p.has("size")&&(0,i.h)("div",{className:"size "+f[0]},f[1]),(p.has("activity")||p.has("module"))&&(0,i.h)("div",{className:"activity"},p.has("activity")&&e.activity,p.has("module")&&e.module),p.has("delete")&&s&&e.id&&(0,i.h)("div",{className:"destroy",onClick:function(t){return s(e)}},"x"),t.options&&t.options(e))})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispatch=e.store=e.history=void 0;var i=n(6),r=n(368),o=f(n(365)),s=f(n(72)),a=f(n(364)),u=f(n(359)),l=f(n(358)),c=f(n(357)),d=f(n(356)),h=f(n(351)),p=n(350);function f(t){return t&&t.__esModule?t:{default:t}}var _=(0,i.combineReducers)({system:a.default,dashboard:u.default,live:l.default,upload:c.default,queue:d.default,router:r.routerReducer,module:p.moduleReducer,audioPlayer:h.default}),m=e.history=(0,s.default)(),y=e.store=(0,i.createStore)(_,(0,i.compose)((0,i.applyMiddleware)(o.default,(0,r.routerMiddleware)(m))));e.dispatch=y.dispatch},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(t[i]=n[i])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,n,i,r){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+i),r);else for(var o=0;o may have only one child element"),this.unlisten=i.listen(function(){t.setState({match:t.computeMatch(i.location.pathname)})})},e.prototype.componentWillReceiveProps=function(t){r()(this.props.history===t.history,"You cannot change ")},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.props.children;return t?o.d.Children.only(t):null},e}(o.d.Component);f.propTypes={history:a.a.object.isRequired,children:a.a.node},f.contextTypes={router:a.a.object},f.childContextTypes={router:a.a.object.isRequired};var _=f,m=_;function y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var v=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},e.prototype.render=function(){return o.d.createElement(m,{history:this.history,children:this.props.children})},e}(o.d.Component);v.propTypes={basename:a.a.string,forceRefresh:a.a.bool,getUserConfirmation:a.a.func,keyLength:a.a.number,children:a.a.node};var g=v,b=n(247),w=n.n(b);function M(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var k=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},e.prototype.render=function(){return o.d.createElement(m,{history:this.history,children:this.props.children})},e}(o.d.Component);k.propTypes={basename:a.a.string,getUserConfirmation:a.a.func,hashType:a.a.oneOf(["hashbang","noslash","slash"]),children:a.a.node};var T=k,S=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,["replace","to","innerRef"]);d()(this.context.router,"You should not use outside a ");var r=this.context.router.history.createHref("string"==typeof e?{pathname:e}:e);return o.d.createElement("a",S({},i,{onClick:this.handleClick,href:r,ref:n}))},e}(o.d.Component);x.propTypes={onClick:a.a.func,target:a.a.string,replace:a.a.bool,to:a.a.oneOfType([a.a.string,a.a.object]).isRequired,innerRef:a.a.oneOfType([a.a.string,a.a.func])},x.defaultProps={replace:!1},x.contextTypes={router:a.a.shape({history:a.a.shape({push:a.a.func.isRequired,replace:a.a.func.isRequired,createHref:a.a.func.isRequired}).isRequired}).isRequired};var O=x,D=n(246),P=n.n(D);function A(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var E=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},e.prototype.render=function(){return o.d.createElement(_,{history:this.history,children:this.props.children})},e}(o.d.Component);E.propTypes={initialEntries:a.a.array,initialIndex:a.a.number,getUserConfirmation:a.a.func,keyLength:a.a.number,children:a.a.node};var j=E,C=n(245),R=n.n(C),F={},H=0,N=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"==typeof e&&(e={path:e});var n=e,i=n.path,r=void 0===i?"/":i,o=n.exact,s=void 0!==o&&o,a=n.strict,u=void 0!==a&&a,l=n.sensitive,c=function(t,e){var n=""+e.end+e.strict+e.sensitive,i=F[n]||(F[n]={});if(i[t])return i[t];var r=[],o={re:R()(t,r,e),keys:r};return H<1e4&&(i[t]=o,H++),o}(r,{end:s,strict:u,sensitive:void 0!==l&&l}),d=c.re,h=c.keys,p=d.exec(t);if(!p)return null;var f=p[0],_=p.slice(1),m=t===f;return s&&!m?null:{path:r,url:"/"===r&&""===f?"/":f,isExact:m,params:h.reduce(function(t,e,n){return t[e.name]=_[n],t},{})}},I=Object.assign||function(t){for(var e=1;e or withRouter() outside a ");var u=e.route,l=(i||u.location).pathname;return r?N(l,{path:r,strict:o,exact:s,sensitive:a}):u.match},e.prototype.componentWillMount=function(){r()(!(this.props.component&&this.props.render),"You should not use and in the same route; will be ignored"),r()(!(this.props.component&&this.props.children&&!z(this.props.children)),"You should not use and in the same route; will be ignored"),r()(!(this.props.render&&this.props.children&&!z(this.props.children)),"You should not use and in the same route; will be ignored")},e.prototype.componentWillReceiveProps=function(t,e){r()(!(t.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),r()(!(!t.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(t,e.router)})},e.prototype.render=function(){var t=this.state.match,e=this.props,n=e.children,i=e.component,r=e.render,s=this.context.router,a=s.history,u=s.route,l=s.staticContext,c={match:t,location:this.props.location||u.location,history:a,staticContext:l};return i?t?o.d.createElement(i,c):null:r?t?r(c):null:n?"function"==typeof n?n(c):z(n)?null:o.d.Children.only(n):null},e}(o.d.Component);B.propTypes={computedMatch:a.a.object,path:a.a.string,exact:a.a.bool,strict:a.a.bool,sensitive:a.a.bool,component:a.a.func,render:a.a.func,children:a.a.oneOfType([a.a.func,a.a.node]),location:a.a.object},B.contextTypes={router:a.a.shape({history:a.a.object.isRequired,route:a.a.object.isRequired,staticContext:a.a.object})},B.childContextTypes={router:a.a.object.isRequired};var W=B,U=W,G=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","ariaCurrent"]);return o.d.createElement(U,{path:"object"===(void 0===e?"undefined":V(e))?e.pathname:e,exact:n,strict:i,location:r,children:function(t){var n=t.location,i=t.match,r=!!(c?c(i,n):i);return o.d.createElement(O,G({to:e,className:r?[a,s].filter(function(t){return t}).join(" "):a,style:r?G({},l,u):l,"aria-current":r&&d},h))}})};J.propTypes={to:O.propTypes.to,exact:a.a.bool,strict:a.a.bool,location:a.a.object,activeClassName:a.a.string,className:a.a.string,activeStyle:a.a.object,style:a.a.object,isActive:a.a.func,ariaCurrent:a.a.oneOf(["page","step","location","true"])},J.defaultProps={activeClassName:"active",ariaCurrent:"true"};var Z=J;var Q=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){d()(this.context.router,"You should not use outside a "),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(o.d.Component);Q.propTypes={when:a.a.bool,message:a.a.oneOfType([a.a.func,a.a.string]).isRequired},Q.defaultProps={when:!0},Q.contextTypes={router:a.a.shape({history:a.a.shape({block:a.a.func.isRequired}).isRequired}).isRequired};var K=Q,$=n(71),X=n(70),tt=Object.assign||function(t){for(var e=1;e outside a "),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=et(t.to),n=et(this.props.to);nt(e,n)?r()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"'):this.perform()},e.prototype.perform=function(){var t=this.context.router.history,e=this.props,n=e.push,i=e.to;n?t.push(i):t.replace(i)},e.prototype.render=function(){return null},e}(o.d.Component);it.propTypes={push:a.a.bool,from:a.a.string,to:a.a.oneOfType([a.a.string,a.a.object]).isRequired},it.defaultProps={push:!1},it.contextTypes={router:a.a.shape({history:a.a.shape({push:a.a.func.isRequired,replace:a.a.func.isRequired}).isRequired,staticContext:a.a.object}).isRequired};var rt=it,ot=n(14),st=Object.assign||function(t){for(var e=1;e",t)}},ht=function(){},pt=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},e.prototype.render=function(){var t=this.props,e=t.basename,n=(t.context,t.location),i=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,["basename","context","location"]),r={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=Object(ot.addLeadingSlash)(t);return 0!==e.pathname.indexOf(n)?e:st({},e,{pathname:e.pathname.substr(n.length)})}(e,lt(n)),push:this.handlePush,replace:this.handleReplace,go:dt("go"),goBack:dt("goBack"),goForward:dt("goForward"),listen:this.handleListen,block:this.handleBlock};return o.d.createElement(_,st({},i,{history:r}))},e}(o.d.Component);pt.propTypes={basename:a.a.string,context:a.a.object.isRequired,location:a.a.oneOfType([a.a.string,a.a.object])},pt.defaultProps={basename:"",location:"/"},pt.childContextTypes={router:a.a.object.isRequired};var ft=pt;var _t=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){d()(this.context.router,"You should not use outside a ")},e.prototype.componentWillReceiveProps=function(t){r()(!(t.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),r()(!(!t.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},e.prototype.render=function(){var t=this.context.router.route,e=this.props.children,n=this.props.location||t.location,i=void 0,r=void 0;return o.d.Children.forEach(e,function(e){if(o.d.isValidElement(e)){var s=e.props,a=s.path,u=s.exact,l=s.strict,c=s.sensitive,d=s.from,h=a||d;null==i&&(r=e,i=h?N(n.pathname,{path:h,exact:u,strict:l,sensitive:c}):t.match)}}),i?o.d.cloneElement(r,{location:n,computedMatch:i}):null},e}(o.d.Component);_t.contextTypes={router:a.a.shape({route:a.a.object.isRequired}).isRequired},_t.propTypes={children:a.a.node,location:a.a.object};var mt=_t,yt=N,vt=n(47),gt=n.n(vt),bt=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(e,["wrappedComponentRef"]);return o.d.createElement(W,{render:function(e){return o.d.createElement(t,bt({},i,e,{ref:n}))}})};return e.displayName="withRouter("+(t.displayName||t.name)+")",e.WrappedComponent=t,e.propTypes={wrappedComponentRef:a.a.func},gt()(e,t)};n.d(e,"BrowserRouter",function(){return g}),n.d(e,"HashRouter",function(){return T}),n.d(e,"Link",function(){return O}),n.d(e,"MemoryRouter",function(){return j}),n.d(e,"NavLink",function(){return Z}),n.d(e,"Prompt",function(){return K}),n.d(e,"Redirect",function(){return rt}),n.d(e,"Route",function(){return U}),n.d(e,"Router",function(){return m}),n.d(e,"StaticRouter",function(){return ft}),n.d(e,"Switch",function(){return mt}),n.d(e,"matchPath",function(){return yt}),n.d(e,"withRouter",function(){return wt})},function(t,e,n){"use strict";var i=n(40),r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=d;var o=n(30);o.inherits=n(24);var s=n(102),a=n(54);o.inherits(d,s);for(var u=r(a.prototype),l=0;la)&&void 0===t.nsecs&&(_=0),_>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=f,u=_,r=h;var y=(1e4*(268435455&(f+=122192928e5))+_)%4294967296;c[l++]=y>>>24&255,c[l++]=y>>>16&255,c[l++]=y>>>8&255,c[l++]=255&y;var v=f/4294967296*1e4&268435455;c[l++]=v>>>8&255,c[l++]=255&v,c[l++]=v>>>24&15|16,c[l++]=v>>>16&255,c[l++]=h>>>8|128,c[l++]=255&h;for(var g=0;g<6;++g)c[l+g]=d[g];return e||s(c)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){"use strict";for(var i=n(10),r=n(19),o=n(38),s=n(12),a=new Array(256),u=0;u<256;u++)a[u]=u>=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;a[254]=a[254]=1;function l(){s.call(this,"utf-8 decode"),this.leftOver=null}function c(){s.call(this,"utf-8 encode")}e.utf8encode=function(t){return r.nodebuffer?o.newBufferFrom(t,"utf-8"):function(t){var e,n,i,o,s,a=t.length,u=0;for(o=0;o>>6,e[s++]=128|63&n):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|63&n):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|63&n);return e}(t)},e.utf8decode=function(t){return r.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,n,r,o,s=t.length,u=new Array(2*s);for(n=0,e=0;e4)u[n++]=65533,e+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&e1?u[n++]=65533:r<65536?u[n++]=r:(r-=65536,u[n++]=55296|r>>10&1023,u[n++]=56320|1023&r)}return u.length!==n&&(u.subarray?u=u.subarray(0,n):u.length=n),i.applyFromCharCode(u)}(t=i.transformTo(r.uint8array?"uint8array":"array",t))},i.inherits(l,s),l.prototype.processChunk=function(t){var n=i.transformTo(r.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=n;(n=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),n.set(o,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var s=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;n>=0&&128==(192&t[n]);)n--;return n<0?e:0===n?e:n+a[t[n]]>e?n:e}(n),u=n;s!==n.length&&(r.uint8array?(u=n.subarray(0,s),this.leftOver=n.subarray(s,n.length)):(u=n.slice(0,s),this.leftOver=n.slice(s,n.length))),this.push({data:e.utf8decode(u),meta:t.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=l,i.inherits(c,s),c.prototype.processChunk=function(t){this.push({data:e.utf8encode(t.data),meta:t.meta})},e.Utf8EncodeWorker=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(6),o=n(7),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(46)),a=l(n(20)),u=l(n(34));function l(t){return t&&t.__esModule?t:{default:t}}e.default=(0,o.connect)(function(t){return{}},function(t,e){return{actions:(0,r.bindActionCreators)(s,t)}})(function(t){var e=t.loading,n=(t.status,t.error,t.history,t.actions),r=t.module;return e?(0,i.h)(a.default,null):(console.log(t),(0,i.h)("div",{class:"opaque"},(0,i.h)("div",{class:"heading"},(0,i.h)("h2",null,"Create a new dataset")),(0,i.h)("div",{class:"params"},(0,i.h)(u.default,{autofocus:!0,title:"Name your dataset",onSave:function(t){n.createFolder(r,t).then(function(t){window.location.href="/"+r.name+"/datasets/"+t.id+"/"})}}))))})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.play=e.pause=e.seek=e.load_epoch=e.load_sequence=e.list_sequences=e.list_epochs=e.list_checkpoints=e.set_param=e.get_params=void 0;var i=o(n(13)),r=o(n(5));function o(t){return t&&t.__esModule?t:{default:t}}e.get_params=function(){return i.default.live.get_params(),{type:r.default.player.get_params}},e.set_param=function(t,e){return console.log("set param",t,e),i.default.live.set_param(t,e),{type:r.default.player.set_param,key:t,value:e}},e.list_checkpoints=function(t){return i.default.live.list_checkpoints(t),{type:r.default.player.loading_checkpoints}},e.list_epochs=function(t,e){return i.default.live.list_epochs(t,e),{type:r.default.player.loading_epochs}},e.list_sequences=function(t){return i.default.live.list_sequences(t),{type:r.default.player.loading_sequences}},e.load_sequence=function(t){return i.default.live.load_sequence(t),{type:r.default.player.loading_sequence}},e.load_epoch=function(t,e){return i.default.live.load_epoch(t,e),{type:r.default.player.loading_checkpoint}},e.seek=function(t){return i.default.live.seek(t),{type:r.default.player.seeking}},e.pause=function t(e){return i.default.live.pause(t),{type:r.default.player.pausing}},e.play=function(t){return i.default.live.play(),{type:r.default.player.playing}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.socket=void 0;var i,r=n(16),o=n(5),s=(i=o)&&i.__esModule?i:{default:i};var a=e.socket=io.connect("/client");a.on("connect",function(){return r.store.dispatch({type:s.default.socket.connect})}),a.on("connect_error",function(t){return r.store.dispatch({type:s.default.socket.connect_error,error:t})}),a.on("reconnect",function(t){return r.store.dispatch({type:s.default.socket.reconnect,attempt:t})}),a.on("reconnecting",function(){return r.store.dispatch({type:s.default.socket.reconnecting})}),a.on("reconnect_error",function(t){return r.store.dispatch({type:s.default.socket.reconnect_error,error:t})}),a.on("reconnect_failed",function(t){return r.store.dispatch({type:s.default.socket.reconnect_failed,error:t})}),a.on("disconnect",function(){return r.store.dispatch({type:s.default.socket.disconnect})}),a.on("error",function(t){return r.store.dispatch({type:s.default.socket.error,error:t})})},function(t,e,n){"use strict";var i=null;i="undefined"!=typeof Promise?Promise:n(292),t.exports={Promise:i}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,n(31).Buffer)},function(t,e,n){"use strict";(function(t){ -/*! +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./app/client/index.jsx"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./app/client/actions.js": +/*!*******************************!*\ + !*** ./app/client/actions.js ***! + \*******************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js"); + +var _api = __webpack_require__(/*! ./api */ "./app/client/api/index.js"); + +var _live = __webpack_require__(/*! ./live/live.actions */ "./app/client/live/live.actions.js"); + +var liveActions = _interopRequireWildcard(_live); + +var _queue = __webpack_require__(/*! ./queue/queue.actions */ "./app/client/queue/queue.actions.js"); + +var queueActions = _interopRequireWildcard(_queue); + +var _system = __webpack_require__(/*! ./system/system.actions */ "./app/client/system/system.actions.js"); + +var systemActions = _interopRequireWildcard(_system); + +var _socket = __webpack_require__(/*! ./socket/socket.actions */ "./app/client/socket/socket.actions.js"); + +var socketActions = _interopRequireWildcard(_socket); + +var _dataset = __webpack_require__(/*! ./dataset/dataset.actions */ "./app/client/dataset/dataset.actions.js"); + +var datasetActions = _interopRequireWildcard(_dataset); + +var _audioPlayer = __webpack_require__(/*! ./common/audioPlayer/audioPlayer.actions */ "./app/client/common/audioPlayer/audioPlayer.actions.js"); + +var audioPlayerActions = _interopRequireWildcard(_audioPlayer); + +var _store = __webpack_require__(/*! ./store */ "./app/client/store.js"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +exports.default = Object.keys(_api.actions).map(function (a) { + return [a, _api.actions[a]]; +}).concat([['live', liveActions], ['queue', queueActions], ['system', systemActions], ['dataset', datasetActions], ['audioPlayer', audioPlayerActions]]).map(function (p) { + return [p[0], (0, _redux.bindActionCreators)(p[1], _store.store.dispatch)]; +}).concat([['socket', socketActions]]).reduce(function (a, b) { + return (a[b[0]] = b[1]) && a; +}, {}); + +/***/ }), + +/***/ "./app/client/api/crud.actions.js": +/*!****************************************!*\ + !*** ./app/client/api/crud.actions.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.crud_action = undefined; +exports.crud_actions = crud_actions; + +var _crud = __webpack_require__(/*! ./crud.fetch */ "./app/client/api/crud.fetch.js"); + +var _crud2 = __webpack_require__(/*! ./crud.types */ "./app/client/api/crud.types.js"); + +var _crud3 = __webpack_require__(/*! ./crud.upload */ "./app/client/api/crud.upload.js"); + +function crud_actions(type) { + var fetch_type = (0, _crud.crud_fetch)(type); + return ['index', 'show', 'create', 'update', 'destroy'].reduce(function (lookup, param) { + lookup[param] = crud_action(type, param, function (q) { + return fetch_type[param](q); + }); + return lookup; + }, { + action: function action(method, fn) { + return crud_action(type, method, fn); + }, + upload: function upload(id, fd) { + return (0, _crud3.upload_action)(type, id, fd); + } + }); +} + +var crud_action = exports.crud_action = function crud_action(type, method, fn) { + return function (q) { + return function (dispatch) { + return new Promise(function (resolve, reject) { + dispatch({ type: (0, _crud2.as_type)(type, method + '_loading') }); + fn(q).then(function (data) { + dispatch({ type: (0, _crud2.as_type)(type, method), data: data }); + resolve(data); + }).catch(function (e) { + dispatch({ type: (0, _crud2.as_type)(type, method + '_error') }); + reject(e); + }); + }); + }; + }; +}; + +/***/ }), + +/***/ "./app/client/api/crud.fetch.js": +/*!**************************************!*\ + !*** ./app/client/api/crud.fetch.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.crud_fetch = crud_fetch; +exports.postBody = postBody; + +var _nodeFetch = __webpack_require__(/*! node-fetch */ "./node_modules/node-fetch/browser.js"); + +var _nodeFetch2 = _interopRequireDefault(_nodeFetch); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function crud_fetch(type, tag) { + var uri = '/api/' + type + '/' + (tag || ''); + return { + index: function index(q) { + return (0, _nodeFetch2.default)(_get_url(uri, q), _get_headers()).then(function (req) { + return req.json(); + }).catch(error); + }, + + show: function show(id) { + return (0, _nodeFetch2.default)(uri + id).then(function (req) { + return req.json(); + }).catch(error); + }, + + create: function create(data) { + return (0, _nodeFetch2.default)(uri, post(data)).then(function (req) { + return req.json(); + }).catch(error); + }, + + update: function update(data) { + return (0, _nodeFetch2.default)(uri + data.id, put(data)).then(function (req) { + return req.json(); + }).catch(error); + }, + + destroy: function destroy(data) { + return (0, _nodeFetch2.default)(uri + data.id, _destroy(data)).then(function (req) { + return req.json(); + }).catch(error); + } + }; +} + +function _get_url(_url, data) { + var url = new URL(window.location.origin + _url); + if (data) { + Object.keys(data).forEach(function (key) { + return url.searchParams.append(key, data[key]); + }); + } + return url; +} +function _get_headers() { + return { + method: 'GET', + headers: { + 'Accept': 'application/json' + } + }; +} +function post(data) { + return { + method: 'POST', + body: JSON.stringify(data), + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + } + }; +} +function postBody(data) { + return { + method: 'POST', + body: data, + headers: { + 'Accept': 'application/json' + } + }; +} +function put(data) { + return { + method: 'PUT', + body: JSON.stringify(data), + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + } + }; +} +function _destroy(data) { + return { + method: 'DELETE', + body: JSON.stringify(data), + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + } + }; +} +function error(err) { + console.warn(err); +} + +/***/ }), + +/***/ "./app/client/api/crud.types.js": +/*!**************************************!*\ + !*** ./app/client/api/crud.types.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var as_type = exports.as_type = function as_type(a, b) { + return [a, b].join('_').toUpperCase(); +}; + +var with_type = exports.with_type = function with_type(type, actions) { + return actions.reduce(function (a, b) { + return (a[b] = as_type(type, b)) && a; + }, {}); +}; + +var crud_type = exports.crud_type = function crud_type(type) { + var actions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + return with_type(type, actions.concat(['index_loading', 'index', 'index_error', 'show_loading', 'show', 'show_error', 'create_loading', 'create', 'create_error', 'update_loading', 'update', 'update_error', 'destroy_loading', 'destroy', 'destroy_error', 'upload_loading', 'upload_progress', 'upload_waiting', 'upload_complete', 'upload_error', 'sort'])); +}; + +/***/ }), + +/***/ "./app/client/api/crud.upload.js": +/*!***************************************!*\ + !*** ./app/client/api/crud.upload.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.upload_action = undefined; +exports.crud_upload = crud_upload; + +var _crud = __webpack_require__(/*! ./crud.types */ "./app/client/api/crud.types.js"); + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function crud_upload(type, fd, data, dispatch) { + return new Promise(function (resolve, reject) { + var id = data.id; + + Object.keys(data).forEach(function (key) { + if (key !== 'id') { + fd.append(key, data[key]); + } + }); + + console.log('/api/' + type + '/' + id + '/upload/'); + + var xhr = new XMLHttpRequest(); + xhr.upload.addEventListener("progress", uploadProgress, false); + xhr.addEventListener("load", uploadComplete, false); + xhr.addEventListener("error", uploadFailed, false); + xhr.addEventListener("abort", uploadCancelled, false); + xhr.open("POST", '/api/' + type + '/' + id + '/upload/'); + xhr.send(fd); + + dispatch && dispatch({ type: (0, _crud.as_type)(type, 'upload_loading') }); + + var complete = false; + + function uploadProgress(e) { + if (e.lengthComputable) { + var percent = Math.round(e.loaded * 100 / e.total) || 0; + if (percent > 99) { + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_waiting'), + percent: percent + }, type, id)); + } else { + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_progress'), + percent: percent + }, type, id)); + } + } else { + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_error'), + error: 'unable to compute upload progress' + }, type, id)); + } + } + + function uploadComplete(e) { + var parsed = void 0; + try { + parsed = JSON.parse(e.target.responseText); + } catch (e) { + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_error'), + error: 'upload failed' + }, type, id)); + reject(e); + return; + } + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_complete'), + data: parsed + }, type, id)); + if (parsed.files && parsed.files.length) { + parsed.files.forEach(function (file) { + console.log(file); + dispatch && dispatch({ + type: (0, _crud.as_type)('file', 'create'), + data: file + }); + }); + } + resolve(parsed); + } + + function uploadFailed(evt) { + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_error'), + error: 'upload failed' + }, type, id)); + reject(evt); + } + + function uploadCancelled(evt) { + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_error'), + error: 'upload cancelled' + }, type, id)); + reject(evt); + } + }); +} + +var upload_action = exports.upload_action = function upload_action(type, id, fd) { + return function (dispatch) { + return crud_upload(type, id, fd, dispatch); + }; +}; + +/***/ }), + +/***/ "./app/client/api/index.js": +/*!*********************************!*\ + !*** ./app/client/api/index.js ***! + \*********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.actions = exports.parser = exports.util = undefined; + +var _crud = __webpack_require__(/*! ./crud.actions */ "./app/client/api/crud.actions.js"); + +var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js"); + +var _util2 = _interopRequireDefault(_util); + +var _parser = __webpack_require__(/*! ./parser */ "./app/client/api/parser.js"); + +var parser = _interopRequireWildcard(_parser); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* +for our crud events, create corresponding actions +the actions fire a 'loading' event, call the underlying api method, and then resolve. +so you can do ... + import { folderActions } from '../../api' + folderActions.index({ module: 'samplernn' }) + folderActions.show(12) + folderActions.create({ module: 'samplernn', name: 'foo' }) + folderActions.update(12, { module: 'pix2pix' }) + folderActions.destroy(12, { confirm: true }) + folderActions.upload(12, form_data) +*/ + +exports.util = _util2.default; +exports.parser = parser; +var actions = exports.actions = ['folder', 'file', 'dataset', 'task', 'user'].reduce(function (a, b) { + return (a[b] = (0, _crud.crud_actions)(b)) && a; +}, {}); + +/***/ }), + +/***/ "./app/client/api/parser.js": +/*!**********************************!*\ + !*** ./app/client/api/parser.js ***! + \**********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.tumblr = exports.thumbnail = exports.loadImage = exports.tag = exports.parse = exports.lookup = exports.integrations = undefined; + +var _nodeFetch = __webpack_require__(/*! node-fetch */ "./node_modules/node-fetch/browser.js"); + +var _nodeFetch2 = _interopRequireDefault(_nodeFetch); + +var _fetchJsonp = __webpack_require__(/*! fetch-jsonp */ "./node_modules/fetch-jsonp/build/fetch-jsonp.js"); + +var _fetchJsonp2 = _interopRequireDefault(_fetchJsonp); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var integrations = exports.integrations = [{ + type: 'image', + regex: /\.(jpeg|jpg|gif|png|svg)(\?.*)?$/i, + fetch: function fetch(url, done) { + var img = new Image(); + img.onload = function () { + if (!img) return; + var width = img.naturalWidth, + height = img.naturalHeight; + img = null; + done({ + url: url, + type: "image", + token: "", + thumbnail: "", + title: "", + width: width, + height: height + }); + }; + img.src = url; + if (img.complete) { + img.onload(); + } + }, + tag: function tag(media) { + return ''; + } +}, { + type: 'video', + regex: /\.(mp4|webm)(\?.*)?$/i, + fetch: function fetch(url, done) { + var video = document.createElement("video"); + var url_parts = url.replace(/\?.*$/, "").split("/"); + var filename = url_parts[url_parts.length - 1]; + video.addEventListener("loadedmetadata", function () { + var width = video.videoWidth, + height = video.videoHeight; + video = null; + done({ + url: url, + type: "video", + token: url, + thumbnail: "/public/assets/img/video-thumbnail.png", + title: filename, + width: width, + height: height + }); + }); + video.src = url; + video.load(); + }, + tag: function tag(media) { + return '