From 2736054e70358f0662611d6a407f0849c6d915d3 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Tue, 20 Mar 2018 15:57:24 -0700 Subject: [PATCH 1/8] added index to client/components/ to export them --- client/components/index.js | 27 + index.js | 8917 ----------------- index.js.map | 1 - speech.js | 13 + webpack.config.js | 4 +- webpack.dev.js | 4 +- ...ver.common.js => webpack.package.common.js | 8 +- webpack.prod.js | 4 +- 8 files changed, 51 insertions(+), 8927 deletions(-) create mode 100644 client/components/index.js delete mode 100644 index.js delete mode 100644 index.js.map create mode 100644 speech.js rename webpack.server.common.js => webpack.package.common.js (79%) diff --git a/client/components/index.js b/client/components/index.js new file mode 100644 index 00000000..5ddecb15 --- /dev/null +++ b/client/components/index.js @@ -0,0 +1,27 @@ +import ActiveStatusBar from 'components/ActiveStatusBar'; +import AssetPreview from 'components/AssetPreview'; +import ExpandingTextArea from 'components/ExpandingTextArea'; +import GAListener from 'components/GAListener'; +import InactiveStatusBar from 'components/InactiveStatusBar'; +import Logo from 'components/Logo'; +import NavBarChannelOptionsDropdown from 'components/NavBarChannelOptionsDropdown'; +import ProgressBar from 'components/ProgressBar'; +import PublishPreview from 'components/PublishPreview'; +import PublishUrlMiddleDisplay from 'components/PublishUrlMiddleDisplay'; +import SEO from 'components/SEO'; + +const components = { + ActiveStatusBar, + AssetPreview, + ExpandingTextArea, + GAListener, + InactiveStatusBar, + Logo, + NavBarChannelOptionsDropdown, + ProgressBar, + PublishPreview, + PublishUrlMiddleDisplay, + SEO, +} + +export default components; diff --git a/index.js b/index.js deleted file mode 100644 index c4d55a51..00000000 --- a/index.js +++ /dev/null @@ -1,8917 +0,0 @@ -module.exports = -/******/ (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 -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // 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 = 52); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports) { - -module.exports = require("react"); - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -module.exports = require("winston"); - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - -module.exports = require("react-redux"); - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function SiteConfig() { - var _this = this; - - this.analytics = { - googleId: 'default' - }; - this.assetDefaults = { - description: 'An asset published on Spee.ch', - thumbnail: 'https://spee.ch/assets/img/video_thumb_default.png', - title: 'Spee.ch' - }; - this.auth = { - sessionKey: 'default' - }; - this.componentsConfig = { - components: {}, - containers: {}, - pages: {} - }; - this.details = { - description: 'Open-source, decentralized image and video sharing.', - host: 'default', - port: 3000, - title: 'Spee.ch', - twitter: '@spee_ch' - }; - this.publishing = { - additionalClaimAddresses: [], - disabled: false, - disabledMessage: 'Please check back soon.', - primaryClaimAddress: 'default', - thumbnailChannel: 'default', - thumbnailChannelId: 'default', - uploadDirectory: '/home/lbry/Uploads' - }; - this.configure = function (config) { - if (!config) { - return console.log('No site config received.'); - } - var analytics = config.analytics, - assetDefaults = config.assetDefaults, - auth = config.auth, - componentsConfig = config.componentsConfig, - details = config.details, - publishing = config.publishing; - - _this.analytics = analytics; - _this.assetDefaults = assetDefaults; - _this.auth = auth; - _this.details = details; - _this.publishing = publishing; - _this.componentsConfig = componentsConfig; - }; -}; - -module.exports = new SiteConfig(); - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - -module.exports = require("react-router-dom"); - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var Sequelize = __webpack_require__(30); -var logger = __webpack_require__(1); - -console.log('exporting sequelize models'); - -var _require = __webpack_require__(27), - database = _require.database, - username = _require.username, - password = _require.password; - -var db = {}; -// set sequelize options -var sequelize = new Sequelize(database, username, password, { - host: 'localhost', - dialect: 'mysql', - dialectOptions: { decimalNumbers: true }, // fix to ensure DECIMAL will not be stored as a string - logging: false, - pool: { - max: 5, - min: 0, - idle: 10000, - acquire: 10000 - } -}); - -// establish mysql connection -sequelize.authenticate().then(function () { - logger.info('Sequelize has established mysql connection successfully.'); -}).catch(function (err) { - logger.error('Sequelize was unable to connect to the database:', err); -}); - -// manually add each model to the db object -var Certificate = __webpack_require__(68); -var Channel = __webpack_require__(69); -var Claim = __webpack_require__(70); -var File = __webpack_require__(71); -var Request = __webpack_require__(72); -var User = __webpack_require__(73); -db['Certificate'] = sequelize.import('Certificate', Certificate); -db['Channel'] = sequelize.import('Channel', Channel); -db['Claim'] = sequelize.import('Claim', Claim); -db['File'] = sequelize.import('File', File); -db['Request'] = sequelize.import('Request', Request); -db['User'] = sequelize.import('User', User); - -// run model.association for each model in the db object that has an association -Object.keys(db).forEach(function (modelName) { - if (db[modelName].associate) { - logger.info('Associating model:', modelName); - db[modelName].associate(db); - } -}); - -db.sequelize = sequelize; -db.Sequelize = Sequelize; - -// add an 'upsert' method to the db object -db.upsert = function (Model, values, condition, tableName) { - return Model.findOne({ - where: condition - }).then(function (obj) { - if (obj) { - // update - logger.debug('updating record in db.' + tableName); - return obj.update(values); - } else { - // insert - logger.debug('creating record in db.' + tableName); - return Model.create(values); - } - }).catch(function (error) { - logger.error(tableName + '.upsert error', error); - throw error; - }); -}; - -module.exports = db; - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -exports.default = request; - -__webpack_require__(90); - -/** - * Parses the JSON returned by a network request - * - * @param {object} response A response from a network request - * - * @return {object} The parsed JSON from the request - */ -function parseJSON(response) { - if (response.status === 204 || response.status === 205) { - return null; - } - return response.json(); -} - -/** - * Parses the status returned by a network request - * - * @param {object} response A response from a network request - * @param {object} response The parsed JSON from the network request - * - * @return {object | undefined} Returns object with status and statusText, or undefined - */ -function checkStatus(response, jsonResponse) { - if (response.status >= 200 && response.status < 300) { - return jsonResponse; - } - var error = new Error(jsonResponse.message); - error.response = response; - throw error; -} - -/** - * Requests a URL, returning a promise - * - * @param {string} url The URL we want to request - * @param {object} [options] The options we want to pass to "fetch" - * - * @return {object} The response data - */ - -function request(url, options) { - return fetch(url, options).then(function (response) { - return Promise.all([response, parseJSON(response)]); - }).then(function (_ref) { - var _ref2 = _slicedToArray(_ref, 2), - response = _ref2[0], - jsonResponse = _ref2[1]; - - return checkStatus(response, jsonResponse); - }); -} - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.onHandleShowPageUri = onHandleShowPageUri; -exports.onRequestError = onRequestError; -exports.onNewChannelRequest = onNewChannelRequest; -exports.onNewAssetRequest = onNewAssetRequest; -exports.onRequestUpdate = onRequestUpdate; -exports.addRequestToRequestList = addRequestToRequestList; -exports.addAssetToAssetList = addAssetToAssetList; -exports.addNewChannelToChannelList = addNewChannelToChannelList; -exports.onUpdateChannelClaims = onUpdateChannelClaims; -exports.updateChannelClaims = updateChannelClaims; -exports.fileRequested = fileRequested; -exports.updateFileAvailability = updateFileAvailability; -exports.updateDisplayAssetError = updateDisplayAssetError; - -var _show_action_types = __webpack_require__(9); - -var actions = _interopRequireWildcard(_show_action_types); - -var _show_request_types = __webpack_require__(48); - -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; } } - -// basic request parsing -function onHandleShowPageUri(params) { - return { - type: actions.HANDLE_SHOW_URI, - data: params - }; -}; - -function onRequestError(error) { - return { - type: actions.REQUEST_ERROR, - data: error - }; -}; - -function onNewChannelRequest(channelName, channelId) { - var requestType = _show_request_types.CHANNEL; - var requestId = 'cr#' + channelName + '#' + channelId; - return { - type: actions.CHANNEL_REQUEST_NEW, - data: { requestType: requestType, requestId: requestId, channelName: channelName, channelId: channelId } - }; -}; - -function onNewAssetRequest(name, id, channelName, channelId, extension) { - var requestType = extension ? _show_request_types.ASSET_LITE : _show_request_types.ASSET_DETAILS; - var requestId = 'ar#' + name + '#' + id + '#' + channelName + '#' + channelId; - return { - type: actions.ASSET_REQUEST_NEW, - data: { - requestType: requestType, - requestId: requestId, - name: name, - modifier: { - id: id, - channel: { - name: channelName, - id: channelId - } - } - } - }; -}; - -function onRequestUpdate(requestType, requestId) { - return { - type: actions.REQUEST_UPDATE, - data: { - requestType: requestType, - requestId: requestId - } - }; -}; - -function addRequestToRequestList(id, error, key) { - return { - type: actions.REQUEST_LIST_ADD, - data: { id: id, error: error, key: key } - }; -}; - -// asset actions - -function addAssetToAssetList(id, error, name, claimId, shortId, claimData) { - return { - type: actions.ASSET_ADD, - data: { id: id, error: error, name: name, claimId: claimId, shortId: shortId, claimData: claimData } - }; -} - -// channel actions - -function addNewChannelToChannelList(id, name, shortId, longId, claimsData) { - return { - type: actions.CHANNEL_ADD, - data: { id: id, name: name, shortId: shortId, longId: longId, claimsData: claimsData } - }; -}; - -function onUpdateChannelClaims(channelKey, name, longId, page) { - return { - type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC, - data: { channelKey: channelKey, name: name, longId: longId, page: page } - }; -}; - -function updateChannelClaims(channelListId, claimsData) { - return { - type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS, - data: { channelListId: channelListId, claimsData: claimsData } - }; -}; - -// display a file - -function fileRequested(name, claimId) { - return { - type: actions.FILE_REQUESTED, - data: { name: name, claimId: claimId } - }; -}; - -function updateFileAvailability(status) { - return { - type: actions.FILE_AVAILABILITY_UPDATE, - data: status - }; -}; - -function updateDisplayAssetError(error) { - return { - type: actions.DISPLAY_ASSET_ERROR, - data: error - }; -}; - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(2); - -var _channel = __webpack_require__(22); - -var _publish = __webpack_require__(23); - -var _view = __webpack_require__(92); - -var _view2 = _interopRequireDefault(_view); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(_ref) { - var channel = _ref.channel, - site = _ref.site; - - return { - channelName: channel.loggedInChannel.name, - channelShortId: channel.loggedInChannel.shortId, - channelLongId: channel.loggedInChannel.longId, - siteDescription: site.description - }; -}; - -var mapDispatchToProps = function mapDispatchToProps(dispatch) { - return { - onChannelLogin: function onChannelLogin(name, shortId, longId) { - dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId)); - dispatch((0, _publish.updateSelectedChannel)(name)); - }, - onChannelLogout: function onChannelLogout() { - dispatch((0, _channel.updateLoggedInChannel)(null, null, null)); - } - }; -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default); - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -// request actions -var HANDLE_SHOW_URI = exports.HANDLE_SHOW_URI = 'HANDLE_SHOW_URI'; -var REQUEST_ERROR = exports.REQUEST_ERROR = 'REQUEST_ERROR'; -var REQUEST_UPDATE = exports.REQUEST_UPDATE = 'REQUEST_UPDATE'; -var ASSET_REQUEST_NEW = exports.ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW'; -var CHANNEL_REQUEST_NEW = exports.CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW'; -var REQUEST_LIST_ADD = exports.REQUEST_LIST_ADD = 'REQUEST_LIST_ADD'; - -// asset actions -var ASSET_ADD = exports.ASSET_ADD = 'ASSET_ADD'; - -// channel actions -var CHANNEL_ADD = exports.CHANNEL_ADD = 'CHANNEL_ADD'; - -var CHANNEL_CLAIMS_UPDATE_ASYNC = exports.CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC'; -var CHANNEL_CLAIMS_UPDATE_SUCCESS = exports.CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS'; - -// asset/file display actions -var FILE_REQUESTED = exports.FILE_REQUESTED = 'FILE_REQUESTED'; -var FILE_AVAILABILITY_UPDATE = exports.FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE'; -var DISPLAY_ASSET_ERROR = exports.DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR'; - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(2); - -var _view = __webpack_require__(95); - -var _view2 = _interopRequireDefault(_view); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(_ref) { - var site = _ref.site; - var defaultDescription = site.defaultDescription, - defaultThumbnail = site.defaultThumbnail, - siteDescription = site.description, - siteHost = site.host, - siteTitle = site.title, - siteTwitter = site.twitter; - - return { - defaultDescription: defaultDescription, - defaultThumbnail: defaultThumbnail, - siteDescription: siteDescription, - siteHost: siteHost, - siteTitle: siteTitle, - siteTwitter: siteTwitter - }; -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var selectAsset = exports.selectAsset = function selectAsset(show) { - var request = show.requestList[show.request.id]; - var assetKey = request.key; - return show.assetList[assetKey]; -}; - -var selectShowState = exports.selectShowState = function selectShowState(state) { - return state.show; -}; - -/***/ }), -/* 12 */ -/***/ (function(module, exports) { - -module.exports = require("react-helmet"); - -/***/ }), -/* 13 */ -/***/ (function(module, exports) { - -module.exports = require("redux-saga/effects"); - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var axios = __webpack_require__(65); -var logger = __webpack_require__(1); - -var _require = __webpack_require__(66), - _require$api = _require.api, - apiHost = _require$api.apiHost, - apiPort = _require$api.apiPort; - -var lbryApiUri = 'http://' + apiHost + ':' + apiPort; - -var _require2 = __webpack_require__(15), - chooseGaLbrynetPublishLabel = _require2.chooseGaLbrynetPublishLabel, - sendGATimingEvent = _require2.sendGATimingEvent; - -var handleLbrynetResponse = function handleLbrynetResponse(_ref, resolve, reject) { - var data = _ref.data; - - logger.debug('lbry api data:', data); - if (data.result) { - // check for an error - if (data.result.error) { - logger.debug('Lbrynet api error:', data.result.error); - reject(new Error(data.result.error)); - return; - }; - resolve(data.result); - return; - } - // fallback in case it just timed out - reject(JSON.stringify(data)); -}; - -module.exports = { - publishClaim: function publishClaim(publishParams) { - logger.debug('lbryApi >> Publishing claim to "' + publishParams.name + '"'); - var gaStartTime = Date.now(); - return new Promise(function (resolve, reject) { - axios.post(lbryApiUri, { - method: 'publish', - params: publishParams - }).then(function (response) { - sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now()); - handleLbrynetResponse(response, resolve, reject); - }).catch(function (error) { - reject(error); - }); - }); - }, - getClaim: function getClaim(uri) { - logger.debug('lbryApi >> Getting Claim for "' + uri + '"'); - var gaStartTime = Date.now(); - return new Promise(function (resolve, reject) { - axios.post(lbryApiUri, { - method: 'get', - params: { uri: uri, timeout: 20 } - }).then(function (response) { - sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now()); - handleLbrynetResponse(response, resolve, reject); - }).catch(function (error) { - reject(error); - }); - }); - }, - getClaimList: function getClaimList(claimName) { - logger.debug('lbryApi >> Getting claim_list for "' + claimName + '"'); - var gaStartTime = Date.now(); - return new Promise(function (resolve, reject) { - axios.post(lbryApiUri, { - method: 'claim_list', - params: { name: claimName } - }).then(function (response) { - sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now()); - handleLbrynetResponse(response, resolve, reject); - }).catch(function (error) { - reject(error); - }); - }); - }, - resolveUri: function resolveUri(uri) { - logger.debug('lbryApi >> Resolving URI for "' + uri + '"'); - var gaStartTime = Date.now(); - return new Promise(function (resolve, reject) { - axios.post(lbryApiUri, { - method: 'resolve', - params: { uri: uri } - }).then(function (_ref2) { - var data = _ref2.data; - - sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now()); - if (data.result[uri].error) { - // check for errors - reject(data.result[uri].error); - } else { - // if no errors, resolve - resolve(data.result[uri]); - } - }).catch(function (error) { - reject(error); - }); - }); - }, - getDownloadDirectory: function getDownloadDirectory() { - logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...'); - var gaStartTime = Date.now(); - return new Promise(function (resolve, reject) { - axios.post(lbryApiUri, { - method: 'settings_get' - }).then(function (_ref3) { - var data = _ref3.data; - - sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now()); - if (data.result) { - resolve(data.result.download_directory); - } else { - return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.'); - } - }).catch(function (error) { - logger.error('Lbrynet Error:', error); - resolve('/home/lbry/Downloads/'); - }); - }); - }, - createChannel: function createChannel(name) { - logger.debug('lbryApi >> Creating channel for ' + name + '...'); - var gaStartTime = Date.now(); - return new Promise(function (resolve, reject) { - axios.post(lbryApiUri, { - method: 'channel_new', - params: { - channel_name: name, - amount: 0.1 - } - }).then(function (response) { - sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now()); - handleLbrynetResponse(response, resolve, reject); - }).catch(function (error) { - reject(error); - }); - }); - } -}; - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var logger = __webpack_require__(1); -var ua = __webpack_require__(67); - -var _require = __webpack_require__(3), - googleId = _require.analytics.googleId, - title = _require.details.title; - -function createServeEventParams(headers, ip, originalUrl) { - return { - eventCategory: 'client requests', - eventAction: 'serve request', - eventLabel: originalUrl, - ipOverride: ip, - userAgentOverride: headers['user-agent'] - }; -}; - -function createPublishTimingEventParams(category, variable, label, startTime, endTime) { - var duration = endTime - startTime; - return { - userTimingCategory: category, - userTimingVariableName: variable, - userTimingTime: duration, - userTimingLabel: label - }; -}; - -function sendGoogleAnalyticsEvent(ip, params) { - var visitorId = ip.replace(/\./g, '-'); - var visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true }); - visitor.event(params, function (err) { - if (err) { - logger.error('Google Analytics Event Error >>', err); - } - }); -}; - -function sendGoogleAnalyticsTiming(visitorId, params) { - var visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true }); - visitor.timing(params, function (err) { - if (err) { - logger.error('Google Analytics Event Error >>', err); - } - logger.debug('Timing event successfully sent to google analytics'); - }); -}; - -module.exports = { - sendGAServeEvent: function sendGAServeEvent(headers, ip, originalUrl) { - var params = createServeEventParams(headers, ip, originalUrl); - sendGoogleAnalyticsEvent(ip, params); - }, - sendGATimingEvent: function sendGATimingEvent(category, variable, label, startTime, endTime) { - var params = createPublishTimingEventParams(category, variable, label, startTime, endTime); - sendGoogleAnalyticsTiming(title, params); - }, - chooseGaLbrynetPublishLabel: function chooseGaLbrynetPublishLabel(_ref) { - var channelName = _ref.channel_name, - channelId = _ref.channel_id; - - return channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM'; - } -}; - -/***/ }), -/* 16 */ -/***/ (function(module, exports) { - -module.exports = require("redux"); - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var _require = __webpack_require__(3), - componentsConfig = _require.componentsConfig; - -function getDeepestChildValue(parent, childrenKeys) { - var childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array - var child = parent[childKey]; - if (childrenKeys.length >= 1) { - return getDeepestChildValue(child, childrenKeys); - } - return child; -} - -var dynamicImport = exports.dynamicImport = function dynamicImport(filePath) { - // validate inputs - if (!filePath) { - throw new Error('no file path provided to dynamicImport()'); - } - if (typeof filePath !== 'string') { - console.log('dynamicImport > filePath:', filePath); - console.log('dynamicImport > filePath type:', typeof filePath === 'undefined' ? 'undefined' : _typeof(filePath)); - throw new Error('file path provided to dynamicImport() must be a string'); - } - if (!componentsConfig) { - console.log('no componentsConfig found in siteConfig.js'); - return __webpack_require__(43)("" + filePath); - } - // split out the file folders // filter out any empty or white-space-only strings - var folders = filePath.split('/').filter(function (folderName) { - return folderName.replace(/\s/g, '').length; - }); - // check for the component corresponding to file path in the site config object - // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]] - var customComponent = getDeepestChildValue(componentsConfig, folders); - if (customComponent) { - return customComponent; // return custom component - } else { - return __webpack_require__(43)("" + filePath); - } -}; - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var createBasicCanonicalLink = function createBasicCanonicalLink(page, siteHost) { - return siteHost + "/" + page; -}; - -var createAssetCanonicalLink = function createAssetCanonicalLink(asset, siteHost) { - var channelName = void 0, - certificateId = void 0, - name = void 0, - claimId = void 0; - if (asset.claimData) { - var _asset$claimData = asset.claimData; - channelName = _asset$claimData.channelName; - certificateId = _asset$claimData.certificateId; - name = _asset$claimData.name; - claimId = _asset$claimData.claimId; - }; - if (channelName) { - return siteHost + "/" + channelName + ":" + certificateId + "/" + name; - }; - return siteHost + "/" + claimId + "/" + name; -}; - -var createChannelCanonicalLink = function createChannelCanonicalLink(channel, siteHost) { - var name = channel.name, - longId = channel.longId; - - return siteHost + "/" + name + ":" + longId; -}; - -var createCanonicalLink = exports.createCanonicalLink = function createCanonicalLink(asset, channel, page, siteHost) { - if (asset) { - return createAssetCanonicalLink(asset, siteHost); - } - if (channel) { - return createChannelCanonicalLink(channel, siteHost); - } - return createBasicCanonicalLink(page, siteHost); -}; - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -module.exports = { - REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g, - REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g, - REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/, - CHANNEL_CHAR: '@', - parseIdentifier: function parseIdentifier(identifier) { - var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end) - '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end) - ); - - var _componentsRegex$exec = componentsRegex // eslint-disable-line no-unused-vars - .exec(identifier).map(function (match) { - return match || null; - }), - _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4), - proto = _componentsRegex$exec2[0], - value = _componentsRegex$exec2[1], - modifierSeperator = _componentsRegex$exec2[2], - modifier = _componentsRegex$exec2[3]; - - // Validate and process name - - - if (!value) { - throw new Error('Check your URL. No channel name provided before "' + modifierSeperator + '"'); - } - var isChannel = value.startsWith(module.exports.CHANNEL_CHAR); - var channelName = isChannel ? value : null; - var claimId = void 0; - if (isChannel) { - if (!channelName) { - throw new Error('Check your URL. No channel name after "@".'); - } - var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL); - if (nameBadChars) { - throw new Error('Check your URL. Invalid characters in channel name: "' + nameBadChars.join(', ') + '".'); - } - } else { - claimId = value; - } - - // Validate and process modifier - var channelClaimId = void 0; - if (modifierSeperator) { - if (!modifier) { - throw new Error('Check your URL. No modifier provided after separator "' + modifierSeperator + '"'); - } - - if (modifierSeperator === ':') { - channelClaimId = modifier; - } else { - throw new Error('Check your URL. The "' + modifierSeperator + '" modifier is not currently supported'); - } - } - return { - isChannel: isChannel, - channelName: channelName, - channelClaimId: channelClaimId || null, - claimId: claimId || null - }; - }, - parseClaim: function parseClaim(name) { - var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first extension) - '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end) - ); - - var _componentsRegex$exec3 = componentsRegex // eslint-disable-line no-unused-vars - .exec(name).map(function (match) { - return match || null; - }), - _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4), - proto = _componentsRegex$exec4[0], - claimName = _componentsRegex$exec4[1], - extensionSeperator = _componentsRegex$exec4[2], - extension = _componentsRegex$exec4[3]; - - // Validate and process name - - - if (!claimName) { - throw new Error('Check your URL. No claim name provided before "."'); - } - var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM); - if (nameBadChars) { - throw new Error('Check your URL. Invalid characters in claim name: "' + nameBadChars.join(', ') + '".'); - } - // Validate and process extension - if (extensionSeperator) { - if (!extension) { - throw new Error('Check your URL. No file extension provided after separator "' + extensionSeperator + '".'); - } - if (extensionSeperator !== '.') { - throw new Error('Check your URL. The "' + extensionSeperator + '" separator is not supported in the claim name.'); - } - } - return { - claimName: claimName, - extension: extension || null - }; - } -}; - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var determineOgThumbnailContentType = function determineOgThumbnailContentType(thumbnail) { - if (thumbnail) { - var fileExt = thumbnail.substring(thumbnail.lastIndexOf('.')); - switch (fileExt) { - case 'jpeg': - case 'jpg': - return 'image/jpeg'; - case 'png': - return 'image/png'; - case 'gif': - return 'image/gif'; - case 'mp4': - return 'video/mp4'; - default: - return 'image/jpeg'; - } - } - return ''; -}; - -var createBasicMetaTags = function createBasicMetaTags(siteHost, siteDescription, siteTitle, siteTwitter) { - return [{ property: 'og:title', content: siteTitle }, { property: 'og:url', content: siteHost }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: siteDescription }, { property: 'twitter:site', content: siteTwitter }, { property: 'twitter:card', content: 'summary' }]; -}; - -var createChannelMetaTags = function createChannelMetaTags(siteTitle, siteHost, siteTwitter, channel) { - var name = channel.name, - longId = channel.longId; - - return [{ property: 'og:title', content: name + ' on ' + siteTitle }, { property: 'og:url', content: siteHost + '/' + name + ':' + longId }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: name + ', a channel on ' + siteTitle }, { property: 'twitter:site', content: siteTwitter }, { property: 'twitter:card', content: 'summary' }]; -}; - -var createAssetMetaTags = function createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) { - var claimData = asset.claimData; - var contentType = claimData.contentType; - - var embedUrl = siteHost + '/' + claimData.claimId + '/' + claimData.name; - var showUrl = siteHost + '/' + claimData.claimId + '/' + claimData.name; - var source = siteHost + '/' + claimData.claimId + '/' + claimData.name + '.' + claimData.fileExt; - var ogTitle = claimData.title || claimData.name; - var ogDescription = claimData.description || defaultDescription; - var ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail); - var ogThumbnail = claimData.thumbnail || defaultThumbnail; - var metaTags = [{ property: 'og:title', content: ogTitle }, { property: 'og:url', content: showUrl }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: ogDescription }, { property: 'og:image:width', content: 600 }, { property: 'og:image:height', content: 315 }, { property: 'twitter:site', content: siteTwitter }]; - if (contentType === 'video/mp4' || contentType === 'video/webm') { - metaTags.push({ property: 'og:video', content: source }); - metaTags.push({ property: 'og:video:secure_url', content: source }); - metaTags.push({ property: 'og:video:type', content: contentType }); - metaTags.push({ property: 'og:image', content: ogThumbnail }); - metaTags.push({ property: 'og:image:type', content: ogThumbnailContentType }); - metaTags.push({ property: 'og:type', content: 'video' }); - metaTags.push({ property: 'twitter:card', content: 'player' }); - metaTags.push({ property: 'twitter:player', content: embedUrl }); - metaTags.push({ property: 'twitter:player:width', content: 600 }); - metaTags.push({ property: 'twitter:text:player_width', content: 600 }); - metaTags.push({ property: 'twitter:player:height', content: 337 }); - metaTags.push({ property: 'twitter:player:stream', content: source }); - metaTags.push({ property: 'twitter:player:stream:content_type', content: contentType }); - } else { - metaTags.push({ property: 'og:image', content: source }); - metaTags.push({ property: 'og:image:type', content: contentType }); - metaTags.push({ property: 'og:type', content: 'article' }); - metaTags.push({ property: 'twitter:card', content: 'summary_large_image' }); - } - return metaTags; -}; - -var createMetaTags = exports.createMetaTags = function createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) { - if (asset) { - return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail); - }; - if (channel) { - return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel); - }; - return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter); -}; - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var createPageTitle = exports.createPageTitle = function createPageTitle(siteTitle, pageTitle) { - if (!pageTitle) { - return "" + siteTitle; - } - return siteTitle + " - " + pageTitle; -}; - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.updateLoggedInChannel = updateLoggedInChannel; - -var _channel_action_types = __webpack_require__(39); - -var actions = _interopRequireWildcard(_channel_action_types); - -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; } } - -// export action creators - -function updateLoggedInChannel(name, shortId, longId) { - return { - type: actions.CHANNEL_UPDATE, - data: { - name: name, - shortId: shortId, - longId: longId - } - }; -}; - -/***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.selectFile = selectFile; -exports.clearFile = clearFile; -exports.updateMetadata = updateMetadata; -exports.updateClaim = updateClaim; -exports.setPublishInChannel = setPublishInChannel; -exports.updatePublishStatus = updatePublishStatus; -exports.updateError = updateError; -exports.updateSelectedChannel = updateSelectedChannel; -exports.toggleMetadataInputs = toggleMetadataInputs; -exports.onNewThumbnail = onNewThumbnail; -exports.startPublish = startPublish; - -var _publish_action_types = __webpack_require__(38); - -var actions = _interopRequireWildcard(_publish_action_types); - -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; } } - -// export action creators -function selectFile(file) { - return { - type: actions.FILE_SELECTED, - data: file - }; -}; - -function clearFile() { - return { - type: actions.FILE_CLEAR - }; -}; - -function updateMetadata(name, value) { - return { - type: actions.METADATA_UPDATE, - data: { - name: name, - value: value - } - }; -}; - -function updateClaim(value) { - return { - type: actions.CLAIM_UPDATE, - data: value - }; -}; - -function setPublishInChannel(channel) { - return { - type: actions.SET_PUBLISH_IN_CHANNEL, - channel: channel - }; -}; - -function updatePublishStatus(status, message) { - return { - type: actions.PUBLISH_STATUS_UPDATE, - data: { - status: status, - message: message - } - }; -}; - -function updateError(name, value) { - return { - type: actions.ERROR_UPDATE, - data: { - name: name, - value: value - } - }; -}; - -function updateSelectedChannel(channelName) { - return { - type: actions.SELECTED_CHANNEL_UPDATE, - data: channelName - }; -}; - -function toggleMetadataInputs(showMetadataInputs) { - return { - type: actions.TOGGLE_METADATA_INPUTS, - data: showMetadataInputs - }; -}; - -function onNewThumbnail(file) { - return { - type: actions.THUMBNAIL_NEW, - data: file - }; -}; - -function startPublish(history) { - return { - type: actions.PUBLISH_START, - data: { history: history } - }; -} - -/***/ }), -/* 24 */ -/***/ (function(module, exports) { - -module.exports = require("prop-types"); - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(24); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _NavBar = __webpack_require__(8); - -var _NavBar2 = _interopRequireDefault(_NavBar); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var ErrorPage = function (_React$Component) { - _inherits(ErrorPage, _React$Component); - - function ErrorPage() { - _classCallCheck(this, ErrorPage); - - return _possibleConstructorReturn(this, (ErrorPage.__proto__ || Object.getPrototypeOf(ErrorPage)).apply(this, arguments)); - } - - _createClass(ErrorPage, [{ - key: 'render', - value: function render() { - var error = this.props.error; - - return _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_NavBar2.default, null), - _react2.default.createElement( - 'div', - { className: 'row row--padded' }, - _react2.default.createElement( - 'p', - null, - error - ) - ) - ); - } - }]); - - return ErrorPage; -}(_react2.default.Component); - -; - -ErrorPage.propTypes = { - error: _propTypes2.default.string.isRequired -}; - -exports.default = ErrorPage; - -/***/ }), -/* 26 */ -/***/ (function(module, exports) { - -module.exports = require("passport"); - -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function MysqlConfig() { - var _this = this; - - this.database = 'default'; - this.username = 'default'; - this.password = 'default'; - this.configure = function (config) { - if (!config) { - return console.log('No MySQL config received.'); - } - var database = config.database, - username = config.username, - password = config.password; - - _this.database = database; - _this.username = username; - _this.password = password; - }; -}; - -module.exports = new MysqlConfig(); - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function SlackConfig() { - var _this = this; - - this.slackWebHook = 'default'; - this.slackErrorChannel = 'default'; - this.slackInfoChannel = 'default'; - this.configure = function (config) { - if (!config) { - return console.log('No slack config received.'); - } - var slackWebHook = config.slackWebHook, - slackErrorChannel = config.slackErrorChannel, - slackInfoChannel = config.slackInfoChannel; - - _this.slackWebHook = slackWebHook; - _this.slackErrorChannel = slackErrorChannel; - _this.slackInfoChannel = slackInfoChannel; - }; -}; - -module.exports = new SlackConfig(); - -/***/ }), -/* 29 */ -/***/ (function(module, exports) { - -module.exports = require("passport-local"); - -/***/ }), -/* 30 */ -/***/ (function(module, exports) { - -module.exports = require("sequelize"); - -/***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = { - returnShortId: function returnShortId(claimsArray, longId) { - var claimIndex = void 0; - var shortId = longId.substring(0, 1); // default short id is the first letter - var shortIdLength = 0; - // find the index of this claim id - claimIndex = claimsArray.findIndex(function (element) { - return element.claimId === longId; - }); - if (claimIndex < 0) { - throw new Error('claim id not found in claims list'); - } - // get an array of all claims with lower height - var possibleMatches = claimsArray.slice(0, claimIndex); - // remove certificates with the same prefixes until none are left. - while (possibleMatches.length > 0) { - shortIdLength += 1; - shortId = longId.substring(0, shortIdLength); - possibleMatches = possibleMatches.filter(function (element) { - return element.claimId && element.claimId.substring(0, shortIdLength) === shortId; - }); - } - return shortId; - } -}; - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var logger = __webpack_require__(1); -var fs = __webpack_require__(80); - -var _require = __webpack_require__(3), - details = _require.details, - publishing = _require.publishing; - -module.exports = { - parsePublishApiRequestBody: function parsePublishApiRequestBody(_ref) { - var name = _ref.name, - nsfw = _ref.nsfw, - license = _ref.license, - title = _ref.title, - description = _ref.description, - thumbnail = _ref.thumbnail; - - // validate name - if (!name) { - throw new Error('no name field found in request'); - } - var invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name); - if (invalidNameCharacters) { - throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and "-"'); - } - // optional parameters - nsfw = nsfw === 'true'; - license = license || null; - title = title || null; - description = description || null; - thumbnail = thumbnail || null; - // return results - return { - name: name, - nsfw: nsfw, - license: license, - title: title, - description: description, - thumbnail: thumbnail - }; - }, - parsePublishApiRequestFiles: function parsePublishApiRequestFiles(_ref2) { - var file = _ref2.file, - thumbnail = _ref2.thumbnail; - - // make sure a file was provided - if (!file) { - throw new Error('no file with key of [file] found in request'); - } - if (!file.path) { - throw new Error('no file path found'); - } - if (!file.type) { - throw new Error('no file type found'); - } - if (!file.size) { - throw new Error('no file type found'); - } - // validate the file name - if (/'/.test(file.name)) { - throw new Error('apostrophes are not allowed in the file name'); - } - // validate the file - module.exports.validateFileTypeAndSize(file); - // return results - return { - fileName: file.name, - filePath: file.path, - fileType: file.type, - thumbnailFileName: thumbnail ? thumbnail.name : null, - thumbnailFilePath: thumbnail ? thumbnail.path : null, - thumbnailFileType: thumbnail ? thumbnail.type : null - }; - }, - validateFileTypeAndSize: function validateFileTypeAndSize(file) { - // check file type and size - switch (file.type) { - case 'image/jpeg': - case 'image/jpg': - case 'image/png': - if (file.size > 10000000) { - logger.debug('publish > file validation > .jpeg/.jpg/.png was too big'); - throw new Error('Sorry, images are limited to 10 megabytes.'); - } - break; - case 'image/gif': - if (file.size > 50000000) { - logger.debug('publish > file validation > .gif was too big'); - throw new Error('Sorry, .gifs are limited to 50 megabytes.'); - } - break; - case 'video/mp4': - if (file.size > 50000000) { - logger.debug('publish > file validation > .mp4 was too big'); - throw new Error('Sorry, videos are limited to 50 megabytes.'); - } - break; - default: - logger.debug('publish > file validation > unrecognized file type'); - throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.'); - } - return file; - }, - createBasicPublishParams: function createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail) { - logger.debug('Creating Publish Parameters'); - // provide defaults for title - if (title === null || title.trim() === '') { - title = name; - } - // provide default for description - if (description === null || description.trim() === '') { - description = ''; - } - // provide default for license - if (license === null || license.trim() === '') { - license = ' '; // default to empty string - } - // create the publish params - var publishParams = { - name: name, - file_path: filePath, - bid: 0.01, - metadata: { - description: description, - title: title, - author: details.title, - language: 'en', - license: license, - nsfw: nsfw - }, - claim_address: publishing.primaryClaimAddress - }; - // add thumbnail to channel if video - if (thumbnail) { - publishParams['metadata']['thumbnail'] = thumbnail; - } - return publishParams; - }, - createThumbnailPublishParams: function createThumbnailPublishParams(thumbnailFilePath, claimName, license, nsfw) { - if (!thumbnailFilePath) { - return; - } - logger.debug('Creating Thumbnail Publish Parameters'); - // create the publish params - return { - name: claimName + '-thumb', - file_path: thumbnailFilePath, - bid: 0.01, - metadata: { - title: claimName + ' thumbnail', - description: 'a thumbnail for ' + claimName, - author: details.title, - language: 'en', - license: license, - nsfw: nsfw - }, - claim_address: publishing.primaryClaimAddress, - channel_name: publishing.thumbnailChannel, - channel_id: publishing.thumbnailChannelId - }; - }, - deleteTemporaryFile: function deleteTemporaryFile(filePath) { - fs.unlink(filePath, function (err) { - if (err) { - logger.error('error deleting temporary file ' + filePath); - throw err; - } - logger.debug('successfully deleted ' + filePath); - }); - }, - addGetResultsToFileData: function addGetResultsToFileData(fileInfo, getResult) { - fileInfo.fileName = getResult.file_name; - fileInfo.filePath = getResult.download_path; - return fileInfo; - }, - createFileData: function createFileData(_ref3) { - var name = _ref3.name, - claimId = _ref3.claimId, - outpoint = _ref3.outpoint, - height = _ref3.height, - address = _ref3.address, - nsfw = _ref3.nsfw, - contentType = _ref3.contentType; - - return { - name: name, - claimId: claimId, - outpoint: outpoint, - height: height, - address: address, - fileName: '', - filePath: '', - fileType: contentType, - nsfw: nsfw - }; - } -}; - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var logger = __webpack_require__(1); - -module.exports = { - handleErrorResponse: function handleErrorResponse(originalUrl, ip, error, res) { - logger.error('Error on ' + originalUrl, module.exports.useObjectPropertiesIfNoKeys(error)); - - var _module$exports$retur = module.exports.returnErrorMessageAndStatus(error), - _module$exports$retur2 = _slicedToArray(_module$exports$retur, 2), - status = _module$exports$retur2[0], - message = _module$exports$retur2[1]; - - res.status(status).json(module.exports.createErrorResponsePayload(status, message)); - }, - returnErrorMessageAndStatus: function returnErrorMessageAndStatus(error) { - var status = void 0, - message = void 0; - // check for daemon being turned off - if (error.code === 'ECONNREFUSED') { - status = 503; - message = 'Connection refused. The daemon may not be running.'; - // fallback for everything else - } else { - status = 400; - if (error.message) { - message = error.message; - } else { - message = error; - }; - }; - return [status, message]; - }, - useObjectPropertiesIfNoKeys: function useObjectPropertiesIfNoKeys(err) { - if (Object.keys(err).length === 0) { - var newErrorObject = {}; - Object.getOwnPropertyNames(err).forEach(function (key) { - newErrorObject[key] = err[key]; - }); - return newErrorObject; - } - return err; - }, - createErrorResponsePayload: function createErrorResponsePayload(status, message) { - return { - status: status, - success: false, - message: message - }; - } -}; - -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var db = __webpack_require__(5); -var logger = __webpack_require__(1); - -var _require = __webpack_require__(82), - returnPaginatedChannelClaims = _require.returnPaginatedChannelClaims; - -var NO_CHANNEL = 'NO_CHANNEL'; -var NO_CLAIM = 'NO_CLAIM'; -var NO_FILE = 'NO_FILE'; - -module.exports = { - getClaimId: function getClaimId(channelName, channelClaimId, name, claimId) { - if (channelName) { - return module.exports.getClaimIdByChannel(channelName, channelClaimId, name); - } else { - return module.exports.getClaimIdByClaim(name, claimId); - } - }, - getClaimIdByClaim: function getClaimIdByClaim(claimName, claimId) { - logger.debug('getClaimIdByClaim(' + claimName + ', ' + claimId + ')'); - return new Promise(function (resolve, reject) { - db.Claim.getLongClaimId(claimName, claimId).then(function (longClaimId) { - if (!longClaimId) { - resolve(NO_CLAIM); - } - resolve(longClaimId); - }).catch(function (error) { - reject(error); - }); - }); - }, - getClaimIdByChannel: function getClaimIdByChannel(channelName, channelClaimId, claimName) { - logger.debug('getClaimIdByChannel(' + channelName + ', ' + channelClaimId + ', ' + claimName + ')'); - return new Promise(function (resolve, reject) { - db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id - .then(function (longChannelId) { - if (!longChannelId) { - return [null, null]; - } - return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id - }).then(function (_ref) { - var _ref2 = _slicedToArray(_ref, 2), - longChannelId = _ref2[0], - longClaimId = _ref2[1]; - - if (!longChannelId) { - return resolve(NO_CHANNEL); - } - if (!longClaimId) { - return resolve(NO_CLAIM); - } - resolve(longClaimId); - }).catch(function (error) { - reject(error); - }); - }); - }, - getChannelData: function getChannelData(channelName, channelClaimId, page) { - return new Promise(function (resolve, reject) { - // 1. get the long channel Id (make sure channel exists) - db.Certificate.getLongChannelId(channelName, channelClaimId).then(function (longChannelClaimId) { - if (!longChannelClaimId) { - return [null, null, null]; - } - // 2. get the short ID and all claims for that channel - return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]); - }).then(function (_ref3) { - var _ref4 = _slicedToArray(_ref3, 2), - longChannelClaimId = _ref4[0], - shortChannelClaimId = _ref4[1]; - - if (!longChannelClaimId) { - return resolve(NO_CHANNEL); - } - // 3. return all the channel information - resolve({ - channelName: channelName, - longChannelClaimId: longChannelClaimId, - shortChannelClaimId: shortChannelClaimId - }); - }).catch(function (error) { - reject(error); - }); - }); - }, - getChannelClaims: function getChannelClaims(channelName, channelClaimId, page) { - return new Promise(function (resolve, reject) { - // 1. get the long channel Id (make sure channel exists) - db.Certificate.getLongChannelId(channelName, channelClaimId).then(function (longChannelClaimId) { - if (!longChannelClaimId) { - return [null, null, null]; - } - // 2. get the short ID and all claims for that channel - return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]); - }).then(function (_ref5) { - var _ref6 = _slicedToArray(_ref5, 2), - longChannelClaimId = _ref6[0], - channelClaimsArray = _ref6[1]; - - if (!longChannelClaimId) { - return resolve(NO_CHANNEL); - } - // 3. format the data for the view, including pagination - var paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page); - // 4. return all the channel information and contents - resolve(paginatedChannelViewData); - }).catch(function (error) { - reject(error); - }); - }); - }, - getLocalFileRecord: function getLocalFileRecord(claimId, name) { - return db.File.findOne({ where: { claimId: claimId, name: name } }).then(function (file) { - if (!file) { - return NO_FILE; - } - return file.dataValues; - }); - } -}; - -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _server = __webpack_require__(36); - -var _redux = __webpack_require__(16); - -var _index = __webpack_require__(37); - -var _index2 = _interopRequireDefault(_index); - -var _reactRedux = __webpack_require__(2); - -var _reactRouterDom = __webpack_require__(4); - -var _index3 = __webpack_require__(41); - -var _index4 = _interopRequireDefault(_index3); - -var _app = __webpack_require__(42); - -var _app2 = _interopRequireDefault(_app); - -var _renderFullPage = __webpack_require__(50); - -var _renderFullPage2 = _interopRequireDefault(_renderFullPage); - -var _reactHelmet = __webpack_require__(12); - -var _reactHelmet2 = _interopRequireDefault(_reactHelmet); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = function (req, res) { - var context = {}; - - // create a new Redux store instance - var store = (0, _redux.createStore)(_index2.default); - - // render component to a string - var html = (0, _server.renderToString)(_react2.default.createElement( - _reactRedux.Provider, - { store: store }, - _react2.default.createElement( - _reactRouterDom.StaticRouter, - { location: req.url, context: context }, - _react2.default.createElement( - _index4.default, - null, - _react2.default.createElement(_app2.default, null) - ) - ) - )); - - // get head tags from helmet - var helmet = _reactHelmet2.default.renderStatic(); - - // check for a redirect - if (context.url) { - // Somewhere a `` was rendered - return res.redirect(301, context.url); - } else {} - // we're good, send the response - - - // get the initial state from our Redux store - var preloadedState = store.getState(); - - // send the rendered page back to the client - res.send((0, _renderFullPage2.default)(helmet, html, preloadedState)); -}; - -/***/ }), -/* 36 */ -/***/ (function(module, exports) { - -module.exports = require("react-dom/server"); - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _redux = __webpack_require__(16); - -var _publish = __webpack_require__(84); - -var _publish2 = _interopRequireDefault(_publish); - -var _channel = __webpack_require__(86); - -var _channel2 = _interopRequireDefault(_channel); - -var _show = __webpack_require__(87); - -var _show2 = _interopRequireDefault(_show); - -var _site = __webpack_require__(88); - -var _site2 = _interopRequireDefault(_site); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = (0, _redux.combineReducers)({ - channel: _channel2.default, - publish: _publish2.default, - show: _show2.default, - site: _site2.default -}); - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var FILE_SELECTED = exports.FILE_SELECTED = 'FILE_SELECTED'; -var FILE_CLEAR = exports.FILE_CLEAR = 'FILE_CLEAR'; -var METADATA_UPDATE = exports.METADATA_UPDATE = 'METADATA_UPDATE'; -var CLAIM_UPDATE = exports.CLAIM_UPDATE = 'CLAIM_UPDATE'; -var SET_PUBLISH_IN_CHANNEL = exports.SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL'; -var PUBLISH_STATUS_UPDATE = exports.PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE'; -var ERROR_UPDATE = exports.ERROR_UPDATE = 'ERROR_UPDATE'; -var SELECTED_CHANNEL_UPDATE = exports.SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE'; -var TOGGLE_METADATA_INPUTS = exports.TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS'; -var THUMBNAIL_NEW = exports.THUMBNAIL_NEW = 'THUMBNAIL_NEW'; -var PUBLISH_START = exports.PUBLISH_START = 'PUBLISH_START'; - -/***/ }), -/* 39 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var CHANNEL_UPDATE = exports.CHANNEL_UPDATE = 'CHANNEL_UPDATE'; - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var LOCAL_CHECK = exports.LOCAL_CHECK = 'LOCAL_CHECK'; -var UNAVAILABLE = exports.UNAVAILABLE = 'UNAVAILABLE'; -var ERROR = exports.ERROR = 'ERROR'; -var AVAILABLE = exports.AVAILABLE = 'AVAILABLE'; - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reactGa = __webpack_require__(89); - -var _reactGa2 = _interopRequireDefault(_reactGa); - -var _reactRouterDom = __webpack_require__(4); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _require = __webpack_require__(3), - googleId = _require.analytics.googleId; - -_reactGa2.default.initialize(googleId); - -var GAListener = function (_React$Component) { - _inherits(GAListener, _React$Component); - - function GAListener() { - _classCallCheck(this, GAListener); - - return _possibleConstructorReturn(this, (GAListener.__proto__ || Object.getPrototypeOf(GAListener)).apply(this, arguments)); - } - - _createClass(GAListener, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.sendPageView(this.props.history.location); - this.props.history.listen(this.sendPageView); - } - }, { - key: 'sendPageView', - value: function sendPageView(location) { - _reactGa2.default.set({ page: location.pathname }); - _reactGa2.default.pageview(location.pathname); - } - }, { - key: 'render', - value: function render() { - return this.props.children; - } - }]); - - return GAListener; -}(_react2.default.Component); - -exports.default = (0, _reactRouterDom.withRouter)(GAListener); - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reactRouterDom = __webpack_require__(4); - -var _dynamicImport = __webpack_require__(17); - -var _AboutPage = __webpack_require__(91); - -var _AboutPage2 = _interopRequireDefault(_AboutPage); - -var _LoginPage = __webpack_require__(96); - -var _LoginPage2 = _interopRequireDefault(_LoginPage); - -var _ShowPage = __webpack_require__(104); - -var _ShowPage2 = _interopRequireDefault(_ShowPage); - -var _FourOhFourPage = __webpack_require__(121); - -var _FourOhFourPage2 = _interopRequireDefault(_FourOhFourPage); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var HomePage = (0, _dynamicImport.dynamicImport)('pages/HomePage'); // or use the provided local homepage - -var App = function App() { - return _react2.default.createElement( - _reactRouterDom.Switch, - null, - _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/', component: HomePage }), - _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/about', component: _AboutPage2.default }), - _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/login', component: _LoginPage2.default }), - _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/:identifier/:claim', component: _ShowPage2.default }), - _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/:claim', component: _ShowPage2.default }), - _react2.default.createElement(_reactRouterDom.Route, { component: _FourOhFourPage2.default }) - ); -}; - -exports.default = App; - -/***/ }), -/* 43 */ -/***/ (function(module, exports, __webpack_require__) { - -var map = { - "./canonicalLink": 18, - "./canonicalLink.js": 18, - "./dynamicImport": 17, - "./dynamicImport.js": 17, - "./file": 44, - "./file.js": 44, - "./lbryUri": 19, - "./lbryUri.js": 19, - "./metaTags": 20, - "./metaTags.js": 20, - "./pageTitle": 21, - "./pageTitle.js": 21, - "./publish": 45, - "./publish.js": 45, - "./request": 6, - "./request.js": 6, - "./validate": 46, - "./validate.js": 46 -}; -function webpackContext(req) { - return __webpack_require__(webpackContextResolve(req)); -}; -function webpackContextResolve(req) { - var id = map[req]; - if(!(id + 1)) // check for number or string - throw new Error("Cannot find module '" + req + "'."); - return id; -}; -webpackContext.keys = function webpackContextKeys() { - return Object.keys(map); -}; -webpackContext.resolve = webpackContextResolve; -module.exports = webpackContext; -webpackContext.id = 43; - -/***/ }), -/* 44 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = { - validateFile: function validateFile(file) { - if (!file) { - throw new Error('no file provided'); - } - if (/'/.test(file.name)) { - throw new Error('apostrophes are not allowed in the file name'); - } - // validate size and type - switch (file.type) { - case 'image/jpeg': - case 'image/jpg': - case 'image/png': - if (file.size > 10000000) { - throw new Error('Sorry, images are limited to 10 megabytes.'); - } - break; - case 'image/gif': - if (file.size > 50000000) { - throw new Error('Sorry, GIFs are limited to 50 megabytes.'); - } - break; - case 'video/mp4': - if (file.size > 50000000) { - throw new Error('Sorry, videos are limited to 50 megabytes.'); - } - break; - default: - throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.'); - } - } -}; - -/***/ }), -/* 45 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var createPublishMetadata = exports.createPublishMetadata = function createPublishMetadata(claim, _ref, _ref2, publishInChannel, selectedChannel) { - var type = _ref.type; - var title = _ref2.title, - description = _ref2.description, - license = _ref2.license, - nsfw = _ref2.nsfw; - - var metadata = { - name: claim, - title: title, - description: description, - license: license, - nsfw: nsfw, - type: type - }; - if (publishInChannel) { - metadata['channelName'] = selectedChannel; - } - return metadata; -}; - -var createPublishFormData = exports.createPublishFormData = function createPublishFormData(file, thumbnail, metadata) { - var fd = new FormData(); - // append file - fd.append('file', file); - // append thumbnail - if (thumbnail) { - fd.append('thumbnail', thumbnail); - } - // append metadata - for (var key in metadata) { - if (metadata.hasOwnProperty(key)) { - fd.append(key, metadata[key]); - } - } - return fd; -}; - -var createThumbnailUrl = exports.createThumbnailUrl = function createThumbnailUrl(channel, channelId, claim, host) { - return host + '/' + channel + ':' + channelId + '/' + claim + '-thumb.png'; -}; - -/***/ }), -/* 46 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var validateChannelSelection = exports.validateChannelSelection = function validateChannelSelection(publishInChannel, selectedChannel, loggedInChannel) { - if (publishInChannel && selectedChannel !== loggedInChannel.name) { - throw new Error('Log in to a channel or select Anonymous'); - } -}; - -var validatePublishParams = exports.validatePublishParams = function validatePublishParams(file, claim, urlError) { - if (!file) { - throw new Error('Please choose a file'); - } - if (!claim) { - throw new Error('Please enter a URL'); - } - if (urlError) { - throw new Error('Fix the url'); - } -}; - -/***/ }), -/* 47 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(24); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _ActiveStatusBar = __webpack_require__(102); - -var _ActiveStatusBar2 = _interopRequireDefault(_ActiveStatusBar); - -var _InactiveStatusBar = __webpack_require__(103); - -var _InactiveStatusBar2 = _interopRequireDefault(_InactiveStatusBar); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var ProgressBar = function (_React$Component) { - _inherits(ProgressBar, _React$Component); - - function ProgressBar(props) { - _classCallCheck(this, ProgressBar); - - var _this = _possibleConstructorReturn(this, (ProgressBar.__proto__ || Object.getPrototypeOf(ProgressBar)).call(this, props)); - - _this.state = { - bars: [], - index: 0, - incrementer: 1 - }; - _this.createBars = _this.createBars.bind(_this); - _this.startProgressBar = _this.startProgressBar.bind(_this); - _this.updateProgressBar = _this.updateProgressBar.bind(_this); - _this.stopProgressBar = _this.stopProgressBar.bind(_this); - return _this; - } - - _createClass(ProgressBar, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.createBars(); - this.startProgressBar(); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.stopProgressBar(); - } - }, { - key: 'createBars', - value: function createBars() { - var bars = []; - for (var i = 0; i <= this.props.size; i++) { - bars.push({ isActive: false }); - } - this.setState({ bars: bars }); - } - }, { - key: 'startProgressBar', - value: function startProgressBar() { - this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300); - } - }, { - key: 'updateProgressBar', - value: function updateProgressBar() { - var index = this.state.index; - var incrementer = this.state.incrementer; - var bars = this.state.bars; - // flip incrementer if necessary, to stay in bounds - if (index < 0 || index > this.props.size) { - incrementer = incrementer * -1; - index += incrementer; - } - // update the indexed bar - if (incrementer > 0) { - bars[index].isActive = true; - } else { - bars[index].isActive = false; - }; - // increment index - index += incrementer; - // update state - this.setState({ - bars: bars, - incrementer: incrementer, - index: index - }); - } - }, { - key: 'stopProgressBar', - value: function stopProgressBar() { - clearInterval(this.updateInterval); - } - }, { - key: 'render', - value: function render() { - return _react2.default.createElement( - 'div', - null, - this.state.bars.map(function (bar, index) { - return bar.isActive ? _react2.default.createElement(_ActiveStatusBar2.default, { key: index }) : _react2.default.createElement(_InactiveStatusBar2.default, { key: index }); - }) - ); - } - }]); - - return ProgressBar; -}(_react2.default.Component); - -; - -ProgressBar.propTypes = { - size: _propTypes2.default.number.isRequired -}; - -exports.default = ProgressBar; - -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var CHANNEL = exports.CHANNEL = 'CHANNEL'; -var ASSET_LITE = exports.ASSET_LITE = 'ASSET_LITE'; -var ASSET_DETAILS = exports.ASSET_DETAILS = 'ASSET_DETAILS'; - -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(2); - -var _view = __webpack_require__(108); - -var _view2 = _interopRequireDefault(_view); - -var _show = __webpack_require__(7); - -var _show2 = __webpack_require__(11); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(_ref) { - var show = _ref.show; - - // select error and status - var error = show.displayAsset.error; - var status = show.displayAsset.status; - // select asset - var asset = (0, _show2.selectAsset)(show); - // return props - return { - error: error, - status: status, - asset: asset - }; -}; - -var mapDispatchToProps = function mapDispatchToProps(dispatch) { - return { - onFileRequest: function onFileRequest(name, claimId) { - dispatch((0, _show.fileRequested)(name, claimId)); - } - }; -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default); - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function (helmet, html, preloadedState) { - // take the html and preloadedState and return the full page - return '\n \n \n \n \n \n \n \n ' + helmet.title.toString() + '\n ' + helmet.meta.toString() + '\n ' + helmet.link.toString() + '\n \n \n \n \n \n \n \n \n
\n
' + html + '
\n
\n \n \n \n \n '; -}; - -/***/ }), -/* 51 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var selectSiteState = exports.selectSiteState = function selectSiteState(state) { - return state.site; -}; - -var selectSiteHost = exports.selectSiteHost = function selectSiteHost(state) { - return state.site.host; -}; - -/***/ }), -/* 52 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(53); -__webpack_require__(54); -module.exports = __webpack_require__(55); - - -/***/ }), -/* 53 */ -/***/ (function(module, exports) { - -module.exports = require("babel-polyfill"); - -/***/ }), -/* 54 */ -/***/ (function(module, exports) { - -module.exports = require("whatwg-fetch"); - -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// app dependencies -var express = __webpack_require__(56); -var bodyParser = __webpack_require__(57); -var expressHandlebars = __webpack_require__(58); -var Handlebars = __webpack_require__(59); -var helmet = __webpack_require__(60); -var passport = __webpack_require__(26); - -var _require = __webpack_require__(61), - serializeSpeechUser = _require.serializeSpeechUser, - deserializeSpeechUser = _require.deserializeSpeechUser; - -var cookieSession = __webpack_require__(62); -var http = __webpack_require__(63); -// logging dependencies -var logger = __webpack_require__(1); - -function SpeechServer() { - var _this = this; - - this.configureMysql = function (mysqlConfig) { - __webpack_require__(27).configure(mysqlConfig); - }; - this.configureSite = function (siteConfig) { - __webpack_require__(3).configure(siteConfig); - console.log(__webpack_require__(3)); - _this.sessionKey = siteConfig.auth.sessionKey; - _this.PORT = siteConfig.details.port; - }; - this.configureSlack = function (slackConfig) { - __webpack_require__(28).configure(slackConfig); - }; - this.createApp = function () { - // create an Express application - var app = express(); - - // trust the proxy to get ip address for us - app.enable('trust proxy'); - - // add middleware - app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties - app.use(express.static(__dirname + '/public')); // 'express.static' to serve static files from public directory - app.use(bodyParser.json()); // 'body parser' for parsing application/json - app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded - app.use(function (req, res, next) { - // custom logging middleware to log all incoming http requests - logger.verbose('Request on ' + req.originalUrl + ' from ' + req.ip); - next(); - }); - - // configure passport - passport.serializeUser(serializeSpeechUser); - passport.deserializeUser(deserializeSpeechUser); - var localSignupStrategy = __webpack_require__(64); - var localLoginStrategy = __webpack_require__(75); - passport.use('local-signup', localSignupStrategy); - passport.use('local-login', localLoginStrategy); - // initialize passport - app.use(cookieSession({ - name: 'session', - keys: [_this.sessionKey], - maxAge: 24 * 60 * 60 * 1000 // i.e. 24 hours - })); - app.use(passport.initialize()); - app.use(passport.session()); - - // configure handlebars & register it with express app - var hbs = expressHandlebars.create({ - defaultLayout: 'embed', - handlebars: Handlebars - }); - app.engine('handlebars', hbs.engine); - app.set('view engine', 'handlebars'); - - // set the routes on the app - __webpack_require__(76)(app); - __webpack_require__(77)(app); - __webpack_require__(83)(app); - __webpack_require__(123)(app); - __webpack_require__(133)(app); - - _this.app = app; - }; - this.initialize = function () { - __webpack_require__(134)(logger); - __webpack_require__(136)(logger); - _this.createApp(); - _this.server = http.Server(_this.app); - }; - this.start = function () { - var db = __webpack_require__(5); - // sync sequelize - db.sequelize.sync() - // start the server - .then(function () { - _this.server.listen(_this.PORT, function () { - logger.info('Server is listening on PORT ' + _this.PORT); - }); - }).catch(function (error) { - logger.error('Startup Error:', error); - }); - }; -}; - -module.exports = SpeechServer; - -/***/ }), -/* 56 */ -/***/ (function(module, exports) { - -module.exports = require("express"); - -/***/ }), -/* 57 */ -/***/ (function(module, exports) { - -module.exports = require("body-parser"); - -/***/ }), -/* 58 */ -/***/ (function(module, exports) { - -module.exports = require("express-handlebars"); - -/***/ }), -/* 59 */ -/***/ (function(module, exports) { - -module.exports = require("handlebars"); - -/***/ }), -/* 60 */ -/***/ (function(module, exports) { - -module.exports = require("helmet"); - -/***/ }), -/* 61 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var logger = __webpack_require__(1); - -module.exports = { - serializeSpeechUser: function serializeSpeechUser(user, done) { - // returns user data to be serialized into session - logger.debug('serializing user'); - done(null, user); - }, - deserializeSpeechUser: function deserializeSpeechUser(user, done) { - // deserializes session and populates additional info to req.user - logger.debug('deserializing user'); - done(null, user); - } -}; - -/***/ }), -/* 62 */ -/***/ (function(module, exports) { - -module.exports = require("cookie-session"); - -/***/ }), -/* 63 */ -/***/ (function(module, exports) { - -module.exports = require("http"); - -/***/ }), -/* 64 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var PassportLocalStrategy = __webpack_require__(29).Strategy; -var lbryApi = __webpack_require__(14); -var logger = __webpack_require__(1); -var db = __webpack_require__(5); - -module.exports = new PassportLocalStrategy({ - usernameField: 'username', - passwordField: 'password' -}, function (username, password, done) { - logger.verbose('new channel signup request. user: ' + username + ' pass: ' + password + ' .'); - var userInfo = {}; - // server-side validaton of inputs (username, password) - - // create the channel and retrieve the metadata - return lbryApi.createChannel('@' + username).then(function (tx) { - // create user record - var userData = { - userName: username, - password: password - }; - logger.verbose('userData >', userData); - // create user record - var channelData = { - channelName: '@' + username, - channelClaimId: tx.claim_id - }; - logger.verbose('channelData >', channelData); - // create certificate record - var certificateData = { - claimId: tx.claim_id, - name: '@' + username - // address, - }; - logger.verbose('certificateData >', certificateData); - // save user and certificate to db - return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]); - }).then(function (_ref) { - var _ref2 = _slicedToArray(_ref, 3), - newUser = _ref2[0], - newChannel = _ref2[1], - newCertificate = _ref2[2]; - - logger.verbose('user and certificate successfully created'); - // store the relevant newUser info to be passed back for req.User - userInfo['id'] = newUser.id; - userInfo['userName'] = newUser.userName; - userInfo['channelName'] = newChannel.channelName; - userInfo['channelClaimId'] = newChannel.channelClaimId; - // associate the instances - return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]); - }).then(function () { - logger.verbose('user and certificate successfully associated'); - return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName); - }).then(function (shortChannelId) { - userInfo['shortChannelId'] = shortChannelId; - return done(null, userInfo); - }).catch(function (error) { - logger.error('signup error', error); - return done(error); - }); -}); - -/***/ }), -/* 65 */ -/***/ (function(module, exports) { - -module.exports = require("axios"); - -/***/ }), -/* 66 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var lbryConfig = { - api: { - apiHost: 'localhost', - apiPort: '5279' - } -}; - -module.exports = lbryConfig; - -/***/ }), -/* 67 */ -/***/ (function(module, exports) { - -module.exports = require("universal-analytics"); - -/***/ }), -/* 68 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var logger = __webpack_require__(1); - -var _require = __webpack_require__(31), - returnShortId = _require.returnShortId; - -module.exports = function (sequelize, _ref) { - var STRING = _ref.STRING, - BOOLEAN = _ref.BOOLEAN, - INTEGER = _ref.INTEGER, - TEXT = _ref.TEXT, - DECIMAL = _ref.DECIMAL; - - var Certificate = sequelize.define('Certificate', { - address: { - type: STRING, - default: null - }, - amount: { - type: DECIMAL(19, 8), - default: null - }, - claimId: { - type: STRING, - default: null - }, - claimSequence: { - type: INTEGER, - default: null - }, - decodedClaim: { - type: BOOLEAN, - default: null - }, - depth: { - type: INTEGER, - default: null - }, - effectiveAmount: { - type: DECIMAL(19, 8), - default: null - }, - hasSignature: { - type: BOOLEAN, - default: null - }, - height: { - type: INTEGER, - default: null - }, - hex: { - type: TEXT('long'), - default: null - }, - name: { - type: STRING, - default: null - }, - nout: { - type: INTEGER, - default: null - }, - txid: { - type: STRING, - default: null - }, - validAtHeight: { - type: INTEGER, - default: null - }, - outpoint: { - type: STRING, - default: null - }, - valueVersion: { - type: STRING, - default: null - }, - claimType: { - type: STRING, - default: null - }, - certificateVersion: { - type: STRING, - default: null - }, - keyType: { - type: STRING, - default: null - }, - publicKey: { - type: TEXT('long'), - default: null - } - }, { - freezeTableName: true - }); - - Certificate.associate = function (db) { - Certificate.belongsTo(db.Channel, { - foreignKey: { - allowNull: true - } - }); - }; - - Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) { - var _this = this; - - logger.debug('getShortChannelIdFromLongChannelId ' + channelName + ':' + longChannelId); - return new Promise(function (resolve, reject) { - _this.findAll({ - where: { name: channelName }, - order: [['height', 'ASC']] - }).then(function (result) { - switch (result.length) { - case 0: - throw new Error('No channel(s) found with that channel name'); - default: - return resolve(returnShortId(result, longChannelId)); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) { - var _this2 = this; - - logger.debug('getLongChannelIdFromShortChannelId(' + channelName + ', ' + channelClaimId + ')'); - return new Promise(function (resolve, reject) { - _this2.findAll({ - where: { - name: channelName, - claimId: { - $like: channelClaimId + '%' - } - }, - order: [['height', 'ASC']] - }).then(function (result) { - switch (result.length) { - case 0: - return resolve(null); - default: - // note results must be sorted - return resolve(result[0].claimId); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Certificate.getLongChannelIdFromChannelName = function (channelName) { - var _this3 = this; - - logger.debug('getLongChannelIdFromChannelName(' + channelName + ')'); - return new Promise(function (resolve, reject) { - _this3.findAll({ - where: { name: channelName }, - order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] - }).then(function (result) { - switch (result.length) { - case 0: - return resolve(null); - default: - return resolve(result[0].claimId); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Certificate.validateLongChannelId = function (name, claimId) { - var _this4 = this; - - logger.debug('validateLongChannelId(' + name + ', ' + claimId + ')'); - return new Promise(function (resolve, reject) { - _this4.findOne({ - where: { name: name, claimId: claimId } - }).then(function (result) { - if (!result) { - return resolve(null); - }; - resolve(claimId); - }).catch(function (error) { - reject(error); - }); - }); - }; - - Certificate.getLongChannelId = function (channelName, channelClaimId) { - logger.debug('getLongChannelId(' + channelName + ', ' + channelClaimId + ')'); - if (channelClaimId && channelClaimId.length === 40) { - // if a full channel id is provided - return this.validateLongChannelId(channelName, channelClaimId); - } else if (channelClaimId && channelClaimId.length < 40) { - // if a short channel id is provided - return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId); - } else { - return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided - } - }; - - return Certificate; -}; - -/***/ }), -/* 69 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function (sequelize, _ref) { - var STRING = _ref.STRING; - - var Channel = sequelize.define('Channel', { - channelName: { - type: STRING, - allowNull: false - }, - channelClaimId: { - type: STRING, - allowNull: false - } - }, { - freezeTableName: true - }); - - Channel.associate = function (db) { - Channel.belongsTo(db.User); - Channel.hasOne(db.Certificate); - }; - - return Channel; -}; - -/***/ }), -/* 70 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var logger = __webpack_require__(1); - -var _require = __webpack_require__(31), - returnShortId = _require.returnShortId; - -var _require2 = __webpack_require__(3), - defaultThumbnail = _require2.assetDefaults.thumbnail, - host = _require2.details.host; - -function determineFileExtensionFromContentType(contentType) { - switch (contentType) { - case 'image/jpeg': - case 'image/jpg': - return 'jpeg'; - case 'image/png': - return 'png'; - case 'image/gif': - return 'gif'; - case 'video/mp4': - return 'mp4'; - default: - logger.debug('setting unknown file type as file extension jpeg'); - return 'jpeg'; - } -}; - -function determineThumbnail(storedThumbnail, defaultThumbnail) { - if (storedThumbnail === '') { - return defaultThumbnail; - } - return storedThumbnail; -}; - -function prepareClaimData(claim) { - // logger.debug('preparing claim data based on resolved data:', claim); - claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail); - claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType); - claim['host'] = host; - return claim; -}; - -module.exports = function (sequelize, _ref) { - var STRING = _ref.STRING, - BOOLEAN = _ref.BOOLEAN, - INTEGER = _ref.INTEGER, - TEXT = _ref.TEXT, - DECIMAL = _ref.DECIMAL; - - var Claim = sequelize.define('Claim', { - address: { - type: STRING, - default: null - }, - amount: { - type: DECIMAL(19, 8), - default: null - }, - claimId: { - type: STRING, - default: null - }, - claimSequence: { - type: INTEGER, - default: null - }, - decodedClaim: { - type: BOOLEAN, - default: null - }, - depth: { - type: INTEGER, - default: null - }, - effectiveAmount: { - type: DECIMAL(19, 8), - default: null - }, - hasSignature: { - type: BOOLEAN, - default: null - }, - height: { - type: INTEGER, - default: null - }, - hex: { - type: TEXT('long'), - default: null - }, - name: { - type: STRING, - default: null - }, - nout: { - type: INTEGER, - default: null - }, - txid: { - type: STRING, - default: null - }, - validAtHeight: { - type: INTEGER, - default: null - }, - outpoint: { - type: STRING, - default: null - }, - claimType: { - type: STRING, - default: null - }, - certificateId: { - type: STRING, - default: null - }, - author: { - type: STRING, - default: null - }, - description: { - type: TEXT('long'), - default: null - }, - language: { - type: STRING, - default: null - }, - license: { - type: STRING, - default: null - }, - licenseUrl: { - type: STRING, - default: null - }, - nsfw: { - type: BOOLEAN, - default: null - }, - preview: { - type: STRING, - default: null - }, - thumbnail: { - type: STRING, - default: null - }, - title: { - type: STRING, - default: null - }, - metadataVersion: { - type: STRING, - default: null - }, - contentType: { - type: STRING, - default: null - }, - source: { - type: STRING, - default: null - }, - sourceType: { - type: STRING, - default: null - }, - sourceVersion: { - type: STRING, - default: null - }, - streamVersion: { - type: STRING, - default: null - }, - valueVersion: { - type: STRING, - default: null - }, - channelName: { - type: STRING, - allowNull: true, - default: null - } - }, { - freezeTableName: true - }); - - Claim.associate = function (db) { - Claim.belongsTo(db.File, { - foreignKey: { - allowNull: true - } - }); - }; - - Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) { - var _this = this; - - logger.debug('Claim.getShortClaimIdFromLongClaimId for ' + claimName + '#' + claimId); - return new Promise(function (resolve, reject) { - _this.findAll({ - where: { name: claimName }, - order: [['height', 'ASC']] - }).then(function (result) { - switch (result.length) { - case 0: - throw new Error('No claim(s) found with that claim name'); - default: - resolve(returnShortId(result, claimId)); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Claim.getAllChannelClaims = function (channelClaimId) { - var _this2 = this; - - logger.debug('Claim.getAllChannelClaims for ' + channelClaimId); - return new Promise(function (resolve, reject) { - _this2.findAll({ - where: { certificateId: channelClaimId }, - order: [['height', 'ASC']], - raw: true // returns an array of only data, not an array of instances - }).then(function (channelClaimsArray) { - // logger.debug('channelclaimsarray length:', channelClaimsArray.length); - switch (channelClaimsArray.length) { - case 0: - return resolve(null); - default: - channelClaimsArray.forEach(function (claim) { - claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType); - claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail); - return claim; - }); - return resolve(channelClaimsArray); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) { - var _this3 = this; - - logger.debug('finding claim id for claim ' + claimName + ' from channel ' + channelClaimId); - return new Promise(function (resolve, reject) { - _this3.findAll({ - where: { name: claimName, certificateId: channelClaimId }, - order: [['id', 'ASC']] - }).then(function (result) { - switch (result.length) { - case 0: - return resolve(null); - case 1: - return resolve(result[0].claimId); - default: - logger.error(result.length + ' records found for "' + claimName + '" in channel "' + channelClaimId + '"'); - return resolve(result[0].claimId); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Claim.getLongClaimIdFromShortClaimId = function (name, shortId) { - var _this4 = this; - - return new Promise(function (resolve, reject) { - _this4.findAll({ - where: { - name: name, - claimId: { - $like: shortId + '%' - } }, - order: [['height', 'ASC']] - }).then(function (result) { - switch (result.length) { - case 0: - return resolve(null); - default: - // note results must be sorted - return resolve(result[0].claimId); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Claim.getTopFreeClaimIdByClaimName = function (name) { - var _this5 = this; - - return new Promise(function (resolve, reject) { - _this5.findAll({ - where: { name: name }, - order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] // note: maybe height and effective amount need to switch? - }).then(function (result) { - logger.debug('length of result', result.length); - switch (result.length) { - case 0: - return resolve(null); - default: - return resolve(result[0].dataValues.claimId); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Claim.validateLongClaimId = function (name, claimId) { - var _this6 = this; - - return new Promise(function (resolve, reject) { - _this6.findOne({ - where: { name: name, claimId: claimId } - }).then(function (result) { - if (!result) { - return resolve(null); - }; - resolve(claimId); - }).catch(function (error) { - reject(error); - }); - }); - }; - - Claim.getLongClaimId = function (claimName, claimId) { - logger.debug('getLongClaimId(' + claimName + ', ' + claimId + ')'); - if (claimId && claimId.length === 40) { - // if a full claim id is provided - return this.validateLongClaimId(claimName, claimId); - } else if (claimId && claimId.length < 40) { - return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided - } else { - return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided - } - }; - - Claim.resolveClaim = function (name, claimId) { - var _this7 = this; - - logger.debug('Claim.resolveClaim: ' + name + ' ' + claimId); - return new Promise(function (resolve, reject) { - _this7.findAll({ - where: { name: name, claimId: claimId } - }).then(function (claimArray) { - switch (claimArray.length) { - case 0: - return resolve(null); - case 1: - return resolve(prepareClaimData(claimArray[0].dataValues)); - default: - logger.error('more than one record matches ' + name + '#' + claimId + ' in db.Claim'); - return resolve(prepareClaimData(claimArray[0].dataValues)); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - return Claim; -}; - -/***/ }), -/* 71 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function (sequelize, _ref) { - var STRING = _ref.STRING, - BOOLEAN = _ref.BOOLEAN, - INTEGER = _ref.INTEGER; - - var File = sequelize.define('File', { - name: { - type: STRING, - allowNull: false - }, - claimId: { - type: STRING, - allowNull: false - }, - address: { - type: STRING, - allowNull: false - }, - outpoint: { - type: STRING, - allowNull: false - }, - height: { - type: INTEGER, - allowNull: false, - default: 0 - }, - fileName: { - type: STRING, - allowNull: false - }, - filePath: { - type: STRING, - allowNull: false - }, - fileType: { - type: STRING - }, - nsfw: { - type: BOOLEAN, - allowNull: false, - defaultValue: false - }, - trendingEligible: { - type: BOOLEAN, - allowNull: false, - defaultValue: true - } - }, { - freezeTableName: true - }); - - File.associate = function (db) { - File.hasMany(db.Request); - File.hasOne(db.Claim); - }; - - File.getRecentClaims = function () { - return this.findAll({ - where: { nsfw: false, trendingEligible: true }, - order: [['createdAt', 'DESC']], - limit: 25 - }); - }; - - return File; -}; - -/***/ }), -/* 72 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function (sequelize, _ref) { - var STRING = _ref.STRING, - BOOLEAN = _ref.BOOLEAN, - TEXT = _ref.TEXT; - - var Request = sequelize.define('Request', { - action: { - type: STRING, - allowNull: false - }, - url: { - type: STRING, - allowNull: false - }, - ipAddress: { - type: STRING, - allowNull: true - }, - result: { - type: TEXT('long'), - allowNull: true, - default: null - } - }, { - freezeTableName: true - }); - - Request.associate = function (db) { - Request.belongsTo(db.File, { - foreignKey: { - allowNull: true - } - }); - }; - - return Request; -}; - -/***/ }), -/* 73 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var bcrypt = __webpack_require__(74); -var logger = __webpack_require__(1); - -module.exports = function (sequelize, _ref) { - var STRING = _ref.STRING; - - var User = sequelize.define('User', { - userName: { - type: STRING, - allowNull: false - }, - password: { - type: STRING, - allowNull: false - } - }, { - freezeTableName: true - }); - - User.associate = function (db) { - User.hasOne(db.Channel); - }; - - User.prototype.comparePassword = function (password) { - return bcrypt.compare(password, this.password); - }; - - User.prototype.changePassword = function (newPassword) { - var _this = this; - - return new Promise(function (resolve, reject) { - // generate a salt string to use for hashing - bcrypt.genSalt(function (saltError, salt) { - if (saltError) { - logger.error('salt error', saltError); - reject(saltError); - return; - } - // generate a hashed version of the user's password - bcrypt.hash(newPassword, salt, function (hashError, hash) { - // if there is an error with the hash generation return the error - if (hashError) { - logger.error('hash error', hashError); - reject(hashError); - return; - } - // replace the current password with the new hash - _this.update({ password: hash }).then(function () { - resolve(); - }).catch(function (error) { - reject(error); - }); - }); - }); - }); - }; - - // pre-save hook method to hash the user's password before the user's info is saved to the db. - User.hook('beforeCreate', function (user, options) { - logger.debug('User.beforeCreate hook...'); - return new Promise(function (resolve, reject) { - // generate a salt string to use for hashing - bcrypt.genSalt(function (saltError, salt) { - if (saltError) { - logger.error('salt error', saltError); - reject(saltError); - return; - } - // generate a hashed version of the user's password - bcrypt.hash(user.password, salt, function (hashError, hash) { - // if there is an error with the hash generation return the error - if (hashError) { - logger.error('hash error', hashError); - reject(hashError); - return; - } - // replace the password string with the hash password value - user.password = hash; - resolve(); - }); - }); - }); - }); - - return User; -}; - -/***/ }), -/* 74 */ -/***/ (function(module, exports) { - -module.exports = require("bcrypt"); - -/***/ }), -/* 75 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var PassportLocalStrategy = __webpack_require__(29).Strategy; -var logger = __webpack_require__(1); -var db = __webpack_require__(5); - -var returnUserAndChannelInfo = function returnUserAndChannelInfo(userInstance) { - return new Promise(function (resolve, reject) { - var userInfo = {}; - userInfo['id'] = userInstance.id; - userInfo['userName'] = userInstance.userName; - userInstance.getChannel().then(function (_ref) { - var channelName = _ref.channelName, - channelClaimId = _ref.channelClaimId; - - userInfo['channelName'] = channelName; - userInfo['channelClaimId'] = channelClaimId; - return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName); - }).then(function (shortChannelId) { - userInfo['shortChannelId'] = shortChannelId; - resolve(userInfo); - }).catch(function (error) { - reject(error); - }); - }); -}; - -module.exports = new PassportLocalStrategy({ - usernameField: 'username', - passwordField: 'password' -}, function (username, password, done) { - return db.User.findOne({ - where: { userName: username } - }).then(function (user) { - if (!user) { - logger.debug('no user found'); - return done(null, false, { message: 'Incorrect username or password' }); - } - return user.comparePassword(password).then(function (isMatch) { - if (!isMatch) { - logger.debug('incorrect password'); - return done(null, false, { message: 'Incorrect username or password' }); - } - logger.debug('Password was a match, returning User'); - return returnUserAndChannelInfo(user).then(function (userInfo) { - return done(null, userInfo); - }).catch(function (error) { - return error; - }); - }).catch(function (error) { - return error; - }); - }).catch(function (error) { - return done(error); - }); -}); - -/***/ }), -/* 76 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var logger = __webpack_require__(1); -var passport = __webpack_require__(26); - -module.exports = function (app) { - // route for sign up - app.post('/signup', passport.authenticate('local-signup'), function (req, res) { - logger.verbose('successful signup for ' + req.user.channelName); - res.status(200).json({ - success: true, - channelName: req.user.channelName, - channelClaimId: req.user.channelClaimId, - shortChannelId: req.user.shortChannelId - }); - }); - // route for log in - app.post('/login', function (req, res, next) { - passport.authenticate('local-login', function (err, user, info) { - if (err) { - return next(err); - } - if (!user) { - return res.status(400).json({ - success: false, - message: info.message - }); - } - logger.debug('successful login'); - req.logIn(user, function (err) { - if (err) { - return next(err); - } - return res.status(200).json({ - success: true, - channelName: req.user.channelName, - channelClaimId: req.user.channelClaimId, - shortChannelId: req.user.shortChannelId - }); - }); - })(req, res, next); - }); - // route to log out - app.get('/logout', function (req, res) { - req.logout(); - res.status(200).json({ success: true, message: 'you successfully logged out' }); - }); - // see if user is authenticated, and return credentials if so - app.get('/user', function (req, res) { - if (req.user) { - res.status(200).json({ success: true, data: req.user }); - } else { - res.status(401).json({ success: false, message: 'user is not logged in' }); - } - }); -}; - -/***/ }), -/* 77 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var logger = __webpack_require__(1); -var multipart = __webpack_require__(78); - -var _require = __webpack_require__(3), - uploadDirectory = _require.publishing.uploadDirectory, - host = _require.details.host; - -var multipartMiddleware = multipart({ uploadDir: uploadDirectory }); -var db = __webpack_require__(5); - -var _require2 = __webpack_require__(79), - claimNameIsAvailable = _require2.claimNameIsAvailable, - checkChannelAvailability = _require2.checkChannelAvailability, - publish = _require2.publish; - -var _require3 = __webpack_require__(14), - getClaimList = _require3.getClaimList, - resolveUri = _require3.resolveUri, - getClaim = _require3.getClaim; - -var _require4 = __webpack_require__(32), - addGetResultsToFileData = _require4.addGetResultsToFileData, - createBasicPublishParams = _require4.createBasicPublishParams, - createThumbnailPublishParams = _require4.createThumbnailPublishParams, - parsePublishApiRequestBody = _require4.parsePublishApiRequestBody, - parsePublishApiRequestFiles = _require4.parsePublishApiRequestFiles, - createFileData = _require4.createFileData; - -var errorHandlers = __webpack_require__(33); - -var _require5 = __webpack_require__(15), - sendGATimingEvent = _require5.sendGATimingEvent; - -var _require6 = __webpack_require__(81), - authenticateUser = _require6.authenticateUser; - -var _require7 = __webpack_require__(34), - getChannelData = _require7.getChannelData, - getChannelClaims = _require7.getChannelClaims, - getClaimId = _require7.getClaimId; - -var NO_CHANNEL = 'NO_CHANNEL'; -var NO_CLAIM = 'NO_CLAIM'; - -module.exports = function (app) { - // route to check whether site has published to a channel - app.get('/api/channel/availability/:name', function (_ref, res) { - var ip = _ref.ip, - originalUrl = _ref.originalUrl, - name = _ref.params.name; - - var gaStartTime = Date.now(); - checkChannelAvailability(name).then(function (availableName) { - res.status(200).json(availableName); - sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now()); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to get a short channel id from long channel Id - app.get('/api/channel/short-id/:longId/:name', function (_ref2, res) { - var ip = _ref2.ip, - originalUrl = _ref2.originalUrl, - params = _ref2.params; - - db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name).then(function (shortId) { - res.status(200).json(shortId); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - app.get('/api/channel/data/:channelName/:channelClaimId', function (_ref3, res) { - var ip = _ref3.ip, - originalUrl = _ref3.originalUrl, - body = _ref3.body, - params = _ref3.params; - - var channelName = params.channelName; - var channelClaimId = params.channelClaimId; - if (channelClaimId === 'none') channelClaimId = null; - getChannelData(channelName, channelClaimId, 0).then(function (data) { - if (data === NO_CHANNEL) { - return res.status(404).json({ success: false, message: 'No matching channel was found' }); - } - res.status(200).json({ success: true, data: data }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - app.get('/api/channel/claims/:channelName/:channelClaimId/:page', function (_ref4, res) { - var ip = _ref4.ip, - originalUrl = _ref4.originalUrl, - body = _ref4.body, - params = _ref4.params; - - var channelName = params.channelName; - var channelClaimId = params.channelClaimId; - if (channelClaimId === 'none') channelClaimId = null; - var page = params.page; - getChannelClaims(channelName, channelClaimId, page).then(function (data) { - if (data === NO_CHANNEL) { - return res.status(404).json({ success: false, message: 'No matching channel was found' }); - } - res.status(200).json({ success: true, data: data }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to run a claim_list request on the daemon - app.get('/api/claim/list/:name', function (_ref5, res) { - var ip = _ref5.ip, - originalUrl = _ref5.originalUrl, - params = _ref5.params; - - getClaimList(params.name).then(function (claimsList) { - res.status(200).json(claimsList); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to get an asset - app.get('/api/claim/get/:name/:claimId', function (_ref6, res) { - var ip = _ref6.ip, - originalUrl = _ref6.originalUrl, - params = _ref6.params; - - var name = params.name; - var claimId = params.claimId; - // resolve the claim - db.Claim.resolveClaim(name, claimId).then(function (resolveResult) { - // make sure a claim actually exists at that uri - if (!resolveResult) { - throw new Error('No matching uri found in Claim table'); - } - var fileData = createFileData(resolveResult); - // get the claim - return Promise.all([fileData, getClaim(name + '#' + claimId)]); - }).then(function (_ref7) { - var _ref8 = _slicedToArray(_ref7, 2), - fileData = _ref8[0], - getResult = _ref8[1]; - - fileData = addGetResultsToFileData(fileData, getResult); - return Promise.all([db.upsert(db.File, fileData, { name: name, claimId: claimId }, 'File'), getResult]); - }).then(function (_ref9) { - var _ref10 = _slicedToArray(_ref9, 2), - fileRecord = _ref10[0], - _ref10$ = _ref10[1], - message = _ref10$.message, - completed = _ref10$.completed; - - res.status(200).json({ success: true, message: message, completed: completed }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to check whether this site published to a claim - app.get('/api/claim/availability/:name', function (_ref11, res) { - var ip = _ref11.ip, - originalUrl = _ref11.originalUrl, - name = _ref11.params.name; - - var gaStartTime = Date.now(); - claimNameIsAvailable(name).then(function (result) { - res.status(200).json(result); - sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now()); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to run a resolve request on the daemon - app.get('/api/claim/resolve/:name/:claimId', function (_ref12, res) { - var headers = _ref12.headers, - ip = _ref12.ip, - originalUrl = _ref12.originalUrl, - params = _ref12.params; - - resolveUri(params.name + '#' + params.claimId).then(function (resolvedUri) { - res.status(200).json(resolvedUri); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to run a publish request on the daemon - app.post('/api/claim/publish', multipartMiddleware, function (_ref13, res) { - var body = _ref13.body, - files = _ref13.files, - headers = _ref13.headers, - ip = _ref13.ip, - originalUrl = _ref13.originalUrl, - user = _ref13.user; - - // define variables - var channelName = void 0, - channelId = void 0, - channelPassword = void 0, - description = void 0, - fileName = void 0, - filePath = void 0, - fileType = void 0, - gaStartTime = void 0, - license = void 0, - name = void 0, - nsfw = void 0, - thumbnail = void 0, - thumbnailFileName = void 0, - thumbnailFilePath = void 0, - thumbnailFileType = void 0, - title = void 0; - // record the start time of the request - gaStartTime = Date.now(); - // validate the body and files of the request - try { - var _parsePublishApiReque = parsePublishApiRequestBody(body); - // validateApiPublishRequest(body, files); - - - name = _parsePublishApiReque.name; - nsfw = _parsePublishApiReque.nsfw; - license = _parsePublishApiReque.license; - title = _parsePublishApiReque.title; - description = _parsePublishApiReque.description; - thumbnail = _parsePublishApiReque.thumbnail; - - var _parsePublishApiReque2 = parsePublishApiRequestFiles(files); - - fileName = _parsePublishApiReque2.fileName; - filePath = _parsePublishApiReque2.filePath; - fileType = _parsePublishApiReque2.fileType; - thumbnailFileName = _parsePublishApiReque2.thumbnailFileName; - thumbnailFilePath = _parsePublishApiReque2.thumbnailFilePath; - thumbnailFileType = _parsePublishApiReque2.thumbnailFileType; - channelName = body.channelName; - channelId = body.channelId; - channelPassword = body.channelPassword; - } catch (error) { - return res.status(400).json({ success: false, message: error.message }); - } - // check channel authorization - Promise.all([authenticateUser(channelName, channelId, channelPassword, user), claimNameIsAvailable(name), createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail), createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw)]).then(function (_ref14) { - var _ref15 = _slicedToArray(_ref14, 4), - _ref15$ = _ref15[0], - channelName = _ref15$.channelName, - channelClaimId = _ref15$.channelClaimId, - validatedClaimName = _ref15[1], - publishParams = _ref15[2], - thumbnailPublishParams = _ref15[3]; - - // add channel details to the publish params - if (channelName && channelClaimId) { - publishParams['channel_name'] = channelName; - publishParams['channel_id'] = channelClaimId; - } - // publish the thumbnail - if (thumbnailPublishParams) { - publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType); - } - // publish the asset - return publish(publishParams, fileName, fileType); - }).then(function (result) { - res.status(200).json({ - success: true, - message: 'publish completed successfully', - data: { - name: name, - claimId: result.claim_id, - url: host + '/' + result.claim_id + '/' + name, - lbryTx: result - } - }); - // record the publish end time and send to google analytics - sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now()); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to get a short claim id from long claim Id - app.get('/api/claim/short-id/:longId/:name', function (_ref16, res) { - var ip = _ref16.ip, - originalUrl = _ref16.originalUrl, - body = _ref16.body, - params = _ref16.params; - - db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name).then(function (shortId) { - res.status(200).json({ success: true, data: shortId }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - app.post('/api/claim/long-id', function (_ref17, res) { - var ip = _ref17.ip, - originalUrl = _ref17.originalUrl, - body = _ref17.body, - params = _ref17.params; - - logger.debug('body:', body); - var channelName = body.channelName; - var channelClaimId = body.channelClaimId; - var claimName = body.claimName; - var claimId = body.claimId; - getClaimId(channelName, channelClaimId, claimName, claimId).then(function (result) { - if (result === NO_CHANNEL) { - return res.status(404).json({ success: false, message: 'No matching channel could be found' }); - } - if (result === NO_CLAIM) { - return res.status(404).json({ success: false, message: 'No matching claim id could be found' }); - } - res.status(200).json({ success: true, data: result }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - app.get('/api/claim/data/:claimName/:claimId', function (_ref18, res) { - var ip = _ref18.ip, - originalUrl = _ref18.originalUrl, - body = _ref18.body, - params = _ref18.params; - - var claimName = params.claimName; - var claimId = params.claimId; - if (claimId === 'none') claimId = null; - db.Claim.resolveClaim(claimName, claimId).then(function (claimInfo) { - if (!claimInfo) { - return res.status(404).json({ success: false, message: 'No claim could be found' }); - } - res.status(200).json({ success: true, data: claimInfo }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to see if asset is available locally - app.get('/api/file/availability/:name/:claimId', function (_ref19, res) { - var ip = _ref19.ip, - originalUrl = _ref19.originalUrl, - params = _ref19.params; - - var name = params.name; - var claimId = params.claimId; - db.File.findOne({ where: { name: name, claimId: claimId } }).then(function (result) { - if (result) { - return res.status(200).json({ success: true, data: true }); - } - res.status(200).json({ success: true, data: false }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); -}; - -/***/ }), -/* 78 */ -/***/ (function(module, exports) { - -module.exports = require("connect-multiparty"); - -/***/ }), -/* 79 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -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; } - -var logger = __webpack_require__(1); -var db = __webpack_require__(5); -var lbryApi = __webpack_require__(14); -var publishHelpers = __webpack_require__(32); - -var _require = __webpack_require__(3), - _require$publishing = _require.publishing, - primaryClaimAddress = _require$publishing.primaryClaimAddress, - additionalClaimAddresses = _require$publishing.additionalClaimAddresses; - -var Sequelize = __webpack_require__(30); -var Op = Sequelize.Op; - -module.exports = { - publish: function publish(publishParams, fileName, fileType) { - return new Promise(function (resolve, reject) { - var publishResults = void 0, - certificateId = void 0, - channelName = void 0; - // publish the file - return lbryApi.publishClaim(publishParams).then(function (tx) { - logger.info('Successfully published ' + publishParams.name + ' ' + fileName, tx); - publishResults = tx; - // get the channel information - if (publishParams.channel_name) { - logger.debug('this claim was published in channel: ' + publishParams.channel_name); - return db.Channel.findOne({ where: { channelName: publishParams.channel_name } }); - } else { - logger.debug('this claim was not published in a channel'); - return null; - } - }).then(function (channel) { - // set channel information - certificateId = null; - channelName = null; - if (channel) { - certificateId = channel.channelClaimId; - channelName = channel.channelName; - } - logger.debug('certificateId: ' + certificateId); - }).then(function () { - // create the File record - var fileRecord = { - name: publishParams.name, - claimId: publishResults.claim_id, - title: publishParams.metadata.title, - description: publishParams.metadata.description, - address: publishParams.claim_address, - outpoint: publishResults.txid + ':' + publishResults.nout, - height: 0, - fileName: fileName, - filePath: publishParams.file_path, - fileType: fileType, - nsfw: publishParams.metadata.nsfw - }; - // create the Claim record - var claimRecord = { - name: publishParams.name, - claimId: publishResults.claim_id, - title: publishParams.metadata.title, - description: publishParams.metadata.description, - address: publishParams.claim_address, - thumbnail: publishParams.metadata.thumbnail, - outpoint: publishResults.txid + ':' + publishResults.nout, - height: 0, - contentType: fileType, - nsfw: publishParams.metadata.nsfw, - amount: publishParams.bid, - certificateId: certificateId, - channelName: channelName - }; - // upsert criteria - var upsertCriteria = { - name: publishParams.name, - claimId: publishResults.claim_id - }; - // upsert the records - return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]); - }).then(function (_ref) { - var _ref2 = _slicedToArray(_ref, 2), - file = _ref2[0], - claim = _ref2[1]; - - logger.debug('File and Claim records successfully created'); - return Promise.all([file.setClaim(claim), claim.setFile(file)]); - }).then(function () { - logger.debug('File and Claim records successfully associated'); - resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim; - }).catch(function (error) { - logger.error('PUBLISH ERROR', error); - publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file - reject(error); - }); - }); - }, - claimNameIsAvailable: function claimNameIsAvailable(name) { - var claimAddresses = additionalClaimAddresses || []; - claimAddresses.push(primaryClaimAddress); - // find any records where the name is used - return db.Claim.findAll({ - attributes: ['address'], - where: { - name: name, - address: _defineProperty({}, Op.or, claimAddresses) - } - }).then(function (result) { - if (result.length >= 1) { - throw new Error('That claim is already in use'); - }; - return name; - }).catch(function (error) { - throw error; - }); - }, - checkChannelAvailability: function checkChannelAvailability(name) { - return db.Channel.findAll({ - where: { channelName: name } - }).then(function (result) { - if (result.length >= 1) { - throw new Error('That channel has already been claimed'); - } - return name; - }).catch(function (error) { - throw error; - }); - } -}; - -/***/ }), -/* 80 */ -/***/ (function(module, exports) { - -module.exports = require("fs"); - -/***/ }), -/* 81 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var db = __webpack_require__(5); -var logger = __webpack_require__(1); - -module.exports = { - authenticateUser: function authenticateUser(channelName, channelId, channelPassword, user) { - // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided - if (!channelName && !channelId) { - return { - channelName: null, - channelClaimId: null - }; - } - // case: channelName or channel Id are provided with user token - if (user) { - if (channelName && channelName !== user.channelName) { - throw new Error('the provided channel name does not match user credentials'); - } - if (channelId && channelId !== user.channelClaimId) { - throw new Error('the provided channel id does not match user credentials'); - } - return { - channelName: user.channelName, - channelClaimId: user.channelClaimId - }; - } - // case: channelName or channel Id are provided with password instead of user token - if (!channelPassword) throw new Error('no channel password provided'); - return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword); - }, - authenticateChannelCredentials: function authenticateChannelCredentials(channelName, channelId, userPassword) { - return new Promise(function (resolve, reject) { - // hoisted variables - var channelData = void 0; - // build the params for finding the channel - var channelFindParams = {}; - if (channelName) channelFindParams['channelName'] = channelName; - if (channelId) channelFindParams['channelClaimId'] = channelId; - // find the channel - db.Channel.findOne({ - where: channelFindParams - }).then(function (channel) { - if (!channel) { - logger.debug('no channel found'); - throw new Error('Authentication failed, you do not have access to that channel'); - } - channelData = channel.get(); - logger.debug('channel data:', channelData); - return db.User.findOne({ - where: { userName: channelData.channelName.substring(1) } - }); - }).then(function (user) { - if (!user) { - logger.debug('no user found'); - throw new Error('Authentication failed, you do not have access to that channel'); - } - return user.comparePassword(userPassword); - }).then(function (isMatch) { - if (!isMatch) { - logger.debug('incorrect password'); - throw new Error('Authentication failed, you do not have access to that channel'); - } - logger.debug('...password was a match...'); - resolve(channelData); - }).catch(function (error) { - reject(error); - }); - }); - } -}; - -/***/ }), -/* 82 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var CLAIMS_PER_PAGE = 12; - -module.exports = { - returnPaginatedChannelClaims: function returnPaginatedChannelClaims(channelName, longChannelClaimId, claims, page) { - var totalPages = module.exports.determineTotalPages(claims); - var paginationPage = module.exports.getPageFromQuery(page); - var viewData = { - channelName: channelName, - longChannelClaimId: longChannelClaimId, - claims: module.exports.extractPageFromClaims(claims, paginationPage), - previousPage: module.exports.determinePreviousPage(paginationPage), - currentPage: paginationPage, - nextPage: module.exports.determineNextPage(totalPages, paginationPage), - totalPages: totalPages, - totalResults: module.exports.determineTotalClaims(claims) - }; - return viewData; - }, - getPageFromQuery: function getPageFromQuery(page) { - if (page) { - return parseInt(page); - } - return 1; - }, - extractPageFromClaims: function extractPageFromClaims(claims, pageNumber) { - if (!claims) { - return []; // if no claims, return this default - } - // logger.debug('claims is array?', Array.isArray(claims)); - // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber)); - var claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE; - var claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE; - var pageOfClaims = claims.slice(claimStartIndex, claimEndIndex); - return pageOfClaims; - }, - determineTotalPages: function determineTotalPages(claims) { - if (!claims) { - return 0; - } else { - var totalClaims = claims.length; - if (totalClaims < CLAIMS_PER_PAGE) { - return 1; - } - var fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE); - var remainder = totalClaims % CLAIMS_PER_PAGE; - if (remainder === 0) { - return fullPages; - } - return fullPages + 1; - } - }, - determinePreviousPage: function determinePreviousPage(currentPage) { - if (currentPage === 1) { - return null; - } - return currentPage - 1; - }, - determineNextPage: function determineNextPage(totalPages, currentPage) { - if (currentPage === totalPages) { - return null; - } - return currentPage + 1; - }, - determineTotalClaims: function determineTotalClaims(claims) { - if (!claims) { - return 0; - } - return claims.length; - } -}; - -/***/ }), -/* 83 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _require = __webpack_require__(3), - host = _require.details; - -var handlePageRender = __webpack_require__(35); - -module.exports = function (app) { - // route for the home page - app.get('/', function (req, res) { - handlePageRender(req, res); - }); - // route to display login page - app.get('/login', function (req, res) { - handlePageRender(req, res); - }); - // route to show 'about' page - app.get('/about', function (req, res) { - handlePageRender(req, res); - }); - // route to display a list of the trending images - app.get('/trending', function (req, res) { - res.status(301).redirect('/popular'); - }); - app.get('/popular', function (req, res) { - handlePageRender(req, res); - }); - // route to display a list of the trending images - app.get('/new', function (req, res) { - handlePageRender(req, res); - }); - // route to send embedable video player (for twitter) - app.get('/embed/:claimId/:name', function (_ref, res) { - var params = _ref.params; - - var claimId = params.claimId; - var name = params.name; - // get and render the content - res.status(200).render('embed', { layout: 'embed', host: host, claimId: claimId, name: name }); - }); -}; - -/***/ }), -/* 84 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - - switch (action.type) { - case actions.FILE_SELECTED: - return Object.assign({}, initialState, { // note: clears to initial state - file: action.data - }); - case actions.FILE_CLEAR: - return initialState; - case actions.METADATA_UPDATE: - return Object.assign({}, state, { - metadata: Object.assign({}, state.metadata, _defineProperty({}, action.data.name, action.data.value)) - }); - case actions.CLAIM_UPDATE: - return Object.assign({}, state, { - claim: action.data - }); - case actions.SET_PUBLISH_IN_CHANNEL: - return Object.assign({}, state, { - publishInChannel: action.channel - }); - case actions.PUBLISH_STATUS_UPDATE: - return Object.assign({}, state, { - status: action.data - }); - case actions.ERROR_UPDATE: - return Object.assign({}, state, { - error: Object.assign({}, state.error, _defineProperty({}, action.data.name, action.data.value)) - }); - case actions.SELECTED_CHANNEL_UPDATE: - return Object.assign({}, state, { - selectedChannel: action.data - }); - case actions.TOGGLE_METADATA_INPUTS: - return Object.assign({}, state, { - showMetadataInputs: action.data - }); - case actions.THUMBNAIL_NEW: - return Object.assign({}, state, { - thumbnail: action.data - }); - default: - return state; - } -}; - -var _publish_action_types = __webpack_require__(38); - -var actions = _interopRequireWildcard(_publish_action_types); - -var _publish_channel_select_states = __webpack_require__(85); - -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 _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; } - -var _require = __webpack_require__(3), - publishing = _require.publishing; - -var initialState = { - disabled: publishing.disabled, - disabledMessage: publishing.disabledMessage, - publishInChannel: false, - selectedChannel: _publish_channel_select_states.LOGIN, - showMetadataInputs: false, - status: { - status: null, - message: null - }, - error: { - file: null, - url: null, - channel: null, - publishSubmit: null - }, - file: null, - claim: '', - metadata: { - title: '', - description: '', - license: '', - nsfw: false - }, - thumbnail: null -}; - -/***/ }), -/* 85 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var LOGIN = exports.LOGIN = 'Existing'; -var CREATE = exports.CREATE = 'New'; - -/***/ }), -/* 86 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - - switch (action.type) { - case actions.CHANNEL_UPDATE: - return Object.assign({}, state, { - loggedInChannel: action.data - }); - default: - return state; - } -}; - -var _channel_action_types = __webpack_require__(39); - -var actions = _interopRequireWildcard(_channel_action_types); - -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; } } - -var initialState = { - loggedInChannel: { - name: null, - shortId: null, - longId: null - } -}; - -/***/ }), -/* 87 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - - switch (action.type) { - // handle request - case actions.REQUEST_ERROR: - return Object.assign({}, state, { - request: Object.assign({}, state.request, { - error: action.data - }) - }); - case actions.REQUEST_UPDATE: - return Object.assign({}, state, { - request: Object.assign({}, state.request, { - type: action.data.requestType, - id: action.data.requestId - }) - }); - // store requests - case actions.REQUEST_LIST_ADD: - return Object.assign({}, state, { - requestList: Object.assign({}, state.requestList, _defineProperty({}, action.data.id, { - error: action.data.error, - key: action.data.key - })) - }); - // asset data - case actions.ASSET_ADD: - return Object.assign({}, state, { - assetList: Object.assign({}, state.assetList, _defineProperty({}, action.data.id, { - error: action.data.error, - name: action.data.name, - claimId: action.data.claimId, - shortId: action.data.shortId, - claimData: action.data.claimData - })) - }); - // channel data - case actions.CHANNEL_ADD: - return Object.assign({}, state, { - channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.id, { - name: action.data.name, - longId: action.data.longId, - shortId: action.data.shortId, - claimsData: action.data.claimsData - })) - }); - case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS: - return Object.assign({}, state, { - channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.channelListId, Object.assign({}, state.channelList[action.data.channelListId], { - claimsData: action.data.claimsData - }))) - }); - // display an asset - case actions.FILE_AVAILABILITY_UPDATE: - return Object.assign({}, state, { - displayAsset: Object.assign({}, state.displayAsset, { - status: action.data - }) - }); - case actions.DISPLAY_ASSET_ERROR: - return Object.assign({}, state, { - displayAsset: Object.assign({}, state.displayAsset, { - error: action.data, - status: _asset_display_states.ERROR - }) - }); - default: - return state; - } -}; - -var _show_action_types = __webpack_require__(9); - -var actions = _interopRequireWildcard(_show_action_types); - -var _asset_display_states = __webpack_require__(40); - -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 _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; } - -var initialState = { - request: { - error: null, - type: null, - id: null - }, - requestList: {}, - channelList: {}, - assetList: {}, - displayAsset: { - error: null, - status: _asset_display_states.LOCAL_CHECK - } -}; - -/***/ }), -/* 88 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - - switch (action.type) { - default: - return state; - } -}; - -var siteConfig = __webpack_require__(3); - -var googleAnalyticsId = siteConfig.analytics.googleId, - _siteConfig$assetDefa = siteConfig.assetDefaults, - defaultThumbnail = _siteConfig$assetDefa.thumbnail, - defaultDescription = _siteConfig$assetDefa.description, - _siteConfig$details = siteConfig.details, - description = _siteConfig$details.description, - host = _siteConfig$details.host, - title = _siteConfig$details.title, - twitter = _siteConfig$details.twitter; - - -var initialState = { - description: description, - googleAnalyticsId: googleAnalyticsId, - host: host, - title: title, - twitter: twitter, - defaultDescription: defaultDescription, - defaultThumbnail: defaultThumbnail -}; - -/***/ }), -/* 89 */ -/***/ (function(module, exports) { - -module.exports = require("react-ga"); - -/***/ }), -/* 90 */ -/***/ (function(module, exports) { - -module.exports = require("cross-fetch/polyfill"); - -/***/ }), -/* 91 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _NavBar = __webpack_require__(8); - -var _NavBar2 = _interopRequireDefault(_NavBar); - -var _SEO = __webpack_require__(10); - -var _SEO2 = _interopRequireDefault(_SEO); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var AboutPage = function (_React$Component) { - _inherits(AboutPage, _React$Component); - - function AboutPage() { - _classCallCheck(this, AboutPage); - - return _possibleConstructorReturn(this, (AboutPage.__proto__ || Object.getPrototypeOf(AboutPage)).apply(this, arguments)); - } - - _createClass(AboutPage, [{ - key: 'render', - value: function render() { - return _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_SEO2.default, { pageTitle: 'About', pageUri: 'about' }), - _react2.default.createElement(_NavBar2.default, null), - _react2.default.createElement( - 'div', - { className: 'row row--padded' }, - _react2.default.createElement( - 'div', - { className: 'column column--5 column--med-10 align-content-top' }, - _react2.default.createElement( - 'div', - { className: 'column column--8 column--med-10' }, - _react2.default.createElement( - 'p', - { className: 'pull-quote' }, - 'Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.' - ), - _react2.default.createElement( - 'p', - null, - _react2.default.createElement( - 'a', - { className: 'link--primary', target: '_blank', href: 'https://twitter.com/spee_ch' }, - 'TWITTER' - ) - ), - _react2.default.createElement( - 'p', - null, - _react2.default.createElement( - 'a', - { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch' }, - 'GITHUB' - ) - ), - _react2.default.createElement( - 'p', - null, - _react2.default.createElement( - 'a', - { className: 'link--primary', target: '_blank', href: 'https://discord.gg/YjYbwhS' }, - 'DISCORD CHANNEL' - ) - ), - _react2.default.createElement( - 'p', - null, - _react2.default.createElement( - 'a', - { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch/blob/master/README.md' }, - 'DOCUMENTATION' - ) - ) - ) - ), - _react2.default.createElement( - 'div', - { className: 'column column--5 column--med-10 align-content-top' }, - _react2.default.createElement( - 'div', - { className: 'column column--8 column--med-10' }, - _react2.default.createElement( - 'p', - null, - 'Spee.ch is a media-hosting site that reads from and publishes content to the ', - _react2.default.createElement( - 'a', - { className: 'link--primary', href: 'https://lbry.io' }, - 'LBRY' - ), - ' blockchain.' - ), - _react2.default.createElement( - 'p', - null, - 'Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the ', - _react2.default.createElement( - 'a', - { className: 'link--primary', href: 'https://lbry.io/get' }, - 'LBRY' - ), - ' network. This means that your images are stored in multiple locations without a single point of failure.' - ), - _react2.default.createElement( - 'h3', - null, - 'Contribute' - ), - _react2.default.createElement( - 'p', - null, - 'If you have an idea for your own spee.ch-like site on top of LBRY, fork our ', - _react2.default.createElement( - 'a', - { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch' }, - 'github repo' - ), - ' and go to town!' - ), - _react2.default.createElement( - 'p', - null, - 'If you want to improve spee.ch, join our ', - _react2.default.createElement( - 'a', - { className: 'link--primary', href: 'https://discord.gg/YjYbwhS' }, - 'discord channel' - ), - ' or solve one of our ', - _react2.default.createElement( - 'a', - { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch/issues' }, - 'github issues' - ), - '.' - ) - ) - ) - ) - ); - } - }]); - - return AboutPage; -}(_react2.default.Component); - -; - -exports.default = AboutPage; - -/***/ }), -/* 92 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reactRouterDom = __webpack_require__(4); - -var _Logo = __webpack_require__(93); - -var _Logo2 = _interopRequireDefault(_Logo); - -var _NavBarChannelOptionsDropdown = __webpack_require__(94); - -var _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown); - -var _request = __webpack_require__(6); - -var _request2 = _interopRequireDefault(_request); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var VIEW = 'VIEW'; -var LOGOUT = 'LOGOUT'; - -var NavBar = function (_React$Component) { - _inherits(NavBar, _React$Component); - - function NavBar(props) { - _classCallCheck(this, NavBar); - - var _this = _possibleConstructorReturn(this, (NavBar.__proto__ || Object.getPrototypeOf(NavBar)).call(this, props)); - - _this.checkForLoggedInUser = _this.checkForLoggedInUser.bind(_this); - _this.logoutUser = _this.logoutUser.bind(_this); - _this.handleSelection = _this.handleSelection.bind(_this); - return _this; - } - - _createClass(NavBar, [{ - key: 'componentDidMount', - value: function componentDidMount() { - // check to see if the user is already logged in - this.checkForLoggedInUser(); - } - }, { - key: 'checkForLoggedInUser', - value: function checkForLoggedInUser() { - var _this2 = this; - - var params = { credentials: 'include' }; - (0, _request2.default)('/user', params).then(function (_ref) { - var data = _ref.data; - - _this2.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId); - }).catch(function (error) { - console.log('/user error:', error.message); - }); - } - }, { - key: 'logoutUser', - value: function logoutUser() { - var _this3 = this; - - var params = { credentials: 'include' }; - (0, _request2.default)('/logout', params).then(function () { - _this3.props.onChannelLogout(); - }).catch(function (error) { - console.log('/logout error', error.message); - }); - } - }, { - key: 'handleSelection', - value: function handleSelection(event) { - var value = event.target.selectedOptions[0].value; - switch (value) { - case LOGOUT: - this.logoutUser(); - break; - case VIEW: - // redirect to channel page - this.props.history.push('/' + this.props.channelName + ':' + this.props.channelLongId); - break; - default: - break; - } - } - }, { - key: 'render', - value: function render() { - var siteDescription = this.props.siteDescription; - - return _react2.default.createElement( - 'div', - { className: 'row row--wide nav-bar' }, - _react2.default.createElement( - 'div', - { className: 'row row--padded row--short flex-container--row flex-container--space-between-center' }, - _react2.default.createElement(_Logo2.default, null), - _react2.default.createElement( - 'div', - { className: 'nav-bar--center' }, - _react2.default.createElement( - 'span', - { className: 'nav-bar-tagline' }, - siteDescription - ) - ), - _react2.default.createElement( - 'div', - { className: 'nav-bar--right' }, - _react2.default.createElement( - _reactRouterDom.NavLink, - { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/', exact: true }, - 'Publish' - ), - _react2.default.createElement( - _reactRouterDom.NavLink, - { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/about' }, - 'About' - ), - this.props.channelName ? _react2.default.createElement(_NavBarChannelOptionsDropdown2.default, { - channelName: this.props.channelName, - handleSelection: this.handleSelection, - defaultSelection: this.props.channelName, - VIEW: VIEW, - LOGOUT: LOGOUT - }) : _react2.default.createElement( - _reactRouterDom.NavLink, - { id: 'nav-bar-login-link', className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/login' }, - 'Channel' - ) - ) - ) - ); - } - }]); - - return NavBar; -}(_react2.default.Component); - -exports.default = (0, _reactRouterDom.withRouter)(NavBar); - -/***/ }), -/* 93 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reactRouterDom = __webpack_require__(4); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function Logo() { - return _react2.default.createElement( - 'svg', - { version: '1.1', id: 'Layer_1', x: '0px', y: '0px', height: '24px', viewBox: '0 0 80 31', enableBackground: 'new 0 0 80 31', className: 'nav-bar-logo' }, - _react2.default.createElement( - _reactRouterDom.Link, - { to: '/' }, - _react2.default.createElement( - 'title', - null, - 'Logo' - ), - _react2.default.createElement( - 'desc', - null, - 'Spee.ch logo' - ), - _react2.default.createElement( - 'g', - { id: 'About' }, - _react2.default.createElement( - 'g', - { id: 'Publish-Form-V2-_x28_filled_x29_', transform: 'translate(-42.000000, -23.000000)' }, - _react2.default.createElement( - 'g', - { id: 'Group-17', transform: 'translate(42.000000, 22.000000)' }, - _react2.default.createElement( - 'text', - { transform: 'matrix(1 0 0 1 0 20)', fontSize: '25', fontFamily: 'Roboto' }, - 'Spee' }) : _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true, - onClick: this.select, spellCheck: 'false', - value: '' - }) - ), - _react2.default.createElement('div', { className: 'column column--1' }), - _react2.default.createElement( - 'div', - { className: 'column column--2' }, - _react2.default.createElement( - 'button', - { className: 'button--primary button--wide', 'data-elementtocopy': 'embed-text', - onClick: this.copyToClipboard }, - 'copy' - ) - ) - ) - ) - ) - ), - _react2.default.createElement( - 'div', - { className: 'flex-container--row flex-container--space-between-bottom' }, - _react2.default.createElement( - _reactRouterDom.Link, - { className: 'link--primary', to: '/' + shortId + '/' + name + '.' + fileExt }, - _react2.default.createElement( - 'span', - { - className: 'text' }, - 'Direct Link' - ) - ), - _react2.default.createElement( - 'a', - { className: 'link--primary', href: host + '/' + claimId + '/' + name + '.' + fileExt, download: name }, - 'Download' - ), - _react2.default.createElement( - 'a', - { className: 'link--primary', target: '_blank', href: 'https://lbry.io/dmca' }, - 'Report' - ) - ) - ); - } - }]); - - return AssetInfo; -}(_react2.default.Component); - -; - -exports.default = AssetInfo; - -/***/ }), -/* 115 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(2); - -var _view = __webpack_require__(116); - -var _view2 = _interopRequireDefault(_view); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(_ref) { - var show = _ref.show; - - // select request info - var requestId = show.request.id; - // select request - var previousRequest = show.requestList[requestId] || null; - // select channel - var channel = void 0; - if (previousRequest) { - var channelKey = previousRequest.key; - channel = show.channelList[channelKey] || null; - } - return { - channel: channel - }; -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); - -/***/ }), -/* 116 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _SEO = __webpack_require__(10); - -var _SEO2 = _interopRequireDefault(_SEO); - -var _ErrorPage = __webpack_require__(25); - -var _ErrorPage2 = _interopRequireDefault(_ErrorPage); - -var _NavBar = __webpack_require__(8); - -var _NavBar2 = _interopRequireDefault(_NavBar); - -var _ChannelClaimsDisplay = __webpack_require__(117); - -var _ChannelClaimsDisplay2 = _interopRequireDefault(_ChannelClaimsDisplay); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var ShowChannel = function (_React$Component) { - _inherits(ShowChannel, _React$Component); - - function ShowChannel() { - _classCallCheck(this, ShowChannel); - - return _possibleConstructorReturn(this, (ShowChannel.__proto__ || Object.getPrototypeOf(ShowChannel)).apply(this, arguments)); - } - - _createClass(ShowChannel, [{ - key: 'render', - value: function render() { - var channel = this.props.channel; - - if (channel) { - var name = channel.name, - longId = channel.longId, - shortId = channel.shortId; - - return _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_SEO2.default, { pageTitle: name, channel: channel }), - _react2.default.createElement(_NavBar2.default, null), - _react2.default.createElement( - 'div', - { className: 'row row--tall row--padded' }, - _react2.default.createElement( - 'div', - { className: 'column column--10' }, - _react2.default.createElement( - 'h2', - null, - 'channel name: ', - name - ), - _react2.default.createElement( - 'p', - { className: 'fine-print' }, - 'full channel id: ', - longId - ), - _react2.default.createElement( - 'p', - { className: 'fine-print' }, - 'short channel id: ', - shortId - ) - ), - _react2.default.createElement( - 'div', - { className: 'column column--10' }, - _react2.default.createElement(_ChannelClaimsDisplay2.default, null) - ) - ) - ); - }; - return _react2.default.createElement(_ErrorPage2.default, { error: 'loading channel data...' }); - } - }]); - - return ShowChannel; -}(_react2.default.Component); - -; - -exports.default = ShowChannel; - -/***/ }), -/* 117 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(2); - -var _show = __webpack_require__(7); - -var _view = __webpack_require__(118); - -var _view2 = _interopRequireDefault(_view); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(_ref) { - var show = _ref.show; - - // select channel key - var request = show.requestList[show.request.id]; - var channelKey = request.key; - // select channel claims - var channel = show.channelList[channelKey] || null; - // return props - return { - channelKey: channelKey, - channel: channel - }; -}; - -var mapDispatchToProps = { - onUpdateChannelClaims: _show.onUpdateChannelClaims -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default); - -/***/ }), -/* 118 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _AssetPreview = __webpack_require__(119); - -var _AssetPreview2 = _interopRequireDefault(_AssetPreview); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var ChannelClaimsDisplay = function (_React$Component) { - _inherits(ChannelClaimsDisplay, _React$Component); - - function ChannelClaimsDisplay(props) { - _classCallCheck(this, ChannelClaimsDisplay); - - var _this = _possibleConstructorReturn(this, (ChannelClaimsDisplay.__proto__ || Object.getPrototypeOf(ChannelClaimsDisplay)).call(this, props)); - - _this.showNextResultsPage = _this.showNextResultsPage.bind(_this); - _this.showPreviousResultsPage = _this.showPreviousResultsPage.bind(_this); - return _this; - } - - _createClass(ChannelClaimsDisplay, [{ - key: 'showPreviousResultsPage', - value: function showPreviousResultsPage() { - var currentPage = this.props.channel.claimsData.currentPage; - - var previousPage = parseInt(currentPage) - 1; - this.showNewPage(previousPage); - } - }, { - key: 'showNextResultsPage', - value: function showNextResultsPage() { - var currentPage = this.props.channel.claimsData.currentPage; - - var nextPage = parseInt(currentPage) + 1; - this.showNewPage(nextPage); - } - }, { - key: 'showNewPage', - value: function showNewPage(page) { - var _props = this.props, - channelKey = _props.channelKey, - _props$channel = _props.channel, - name = _props$channel.name, - longId = _props$channel.longId; - - this.props.onUpdateChannelClaims(channelKey, name, longId, page); - } - }, { - key: 'render', - value: function render() { - var _props$channel$claims = this.props.channel.claimsData, - claims = _props$channel$claims.claims, - currentPage = _props$channel$claims.currentPage, - totalPages = _props$channel$claims.totalPages; - - return _react2.default.createElement( - 'div', - { className: 'row row--tall' }, - claims.length > 0 ? _react2.default.createElement( - 'div', - null, - claims.map(function (claim, index) { - return _react2.default.createElement(_AssetPreview2.default, { - claimData: claim, - key: claim.name + '-' + index - }); - }), - _react2.default.createElement( - 'div', - null, - currentPage > 1 && _react2.default.createElement( - 'button', - { className: 'button--secondary', onClick: this.showPreviousResultsPage }, - 'Previous Page' - ), - currentPage < totalPages && _react2.default.createElement( - 'button', - { className: 'button--secondary', onClick: this.showNextResultsPage }, - 'Next Page' - ) - ) - ) : _react2.default.createElement( - 'p', - null, - 'There are no claims in this channel' - ) - ); - } - }]); - - return ChannelClaimsDisplay; -}(_react2.default.Component); - -; - -exports.default = ChannelClaimsDisplay; - -/***/ }), -/* 119 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(2); - -var _view = __webpack_require__(120); - -var _view2 = _interopRequireDefault(_view); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(_ref) { - var defaultThumbnail = _ref.site.defaults.defaultThumbnail; - - return { - defaultThumbnail: defaultThumbnail - }; -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); - -/***/ }), -/* 120 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reactRouterDom = __webpack_require__(4); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var AssetPreview = function AssetPreview(_ref) { - var defaultThumbnail = _ref.defaultThumbnail, - _ref$claimData = _ref.claimData, - name = _ref$claimData.name, - claimId = _ref$claimData.claimId, - fileExt = _ref$claimData.fileExt, - contentType = _ref$claimData.contentType, - thumbnail = _ref$claimData.thumbnail; - - var directSourceLink = claimId + '/' + name + '.' + fileExt; - var showUrlLink = '/' + claimId + '/' + name; - return _react2.default.createElement( - 'div', - { className: 'asset-holder' }, - _react2.default.createElement( - _reactRouterDom.Link, - { to: showUrlLink }, - function () { - switch (contentType) { - case 'image/jpeg': - case 'image/jpg': - case 'image/png': - case 'image/gif': - return _react2.default.createElement('img', { - className: 'asset-preview', - src: directSourceLink, - alt: name - }); - case 'video/mp4': - return _react2.default.createElement('img', { - className: 'asset-preview video', - src: thumbnail || defaultThumbnail, - alt: name - }); - default: - return _react2.default.createElement( - 'p', - null, - 'unsupported file type' - ); - } - }() - ) - ); -}; - -exports.default = AssetPreview; - -/***/ }), -/* 121 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(2); - -var _view = __webpack_require__(122); - -var _view2 = _interopRequireDefault(_view); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(_ref) { - var _ref$site = _ref.site, - host = _ref$site.host, - title = _ref$site.title; - - return { - host: host, - title: title - }; -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); - -/***/ }), -/* 122 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _NavBar = __webpack_require__(8); - -var _NavBar2 = _interopRequireDefault(_NavBar); - -var _reactHelmet = __webpack_require__(12); - -var _reactHelmet2 = _interopRequireDefault(_reactHelmet); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var FourOhForPage = function (_React$Component) { - _inherits(FourOhForPage, _React$Component); - - function FourOhForPage() { - _classCallCheck(this, FourOhForPage); - - return _possibleConstructorReturn(this, (FourOhForPage.__proto__ || Object.getPrototypeOf(FourOhForPage)).apply(this, arguments)); - } - - _createClass(FourOhForPage, [{ - key: 'render', - value: function render() { - var _props = this.props, - title = _props.title, - host = _props.host; - - return _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reactHelmet2.default, - null, - _react2.default.createElement( - 'title', - null, - title, - ' - 404' - ), - _react2.default.createElement('link', { rel: 'canonical', href: host + '/404' }) - ), - _react2.default.createElement(_NavBar2.default, null), - _react2.default.createElement( - 'div', - { className: 'row row--padded' }, - _react2.default.createElement( - 'h2', - null, - '404' - ), - _react2.default.createElement( - 'p', - null, - 'That page does not exist' - ) - ) - ); - } - }]); - - return FourOhForPage; -}(_react2.default.Component); - -; - -exports.default = FourOhForPage; - -/***/ }), -/* 123 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var _require = __webpack_require__(15), - sendGAServeEvent = _require.sendGAServeEvent; - -var _require2 = __webpack_require__(124), - determineResponseType = _require2.determineResponseType, - flipClaimNameAndIdForBackwardsCompatibility = _require2.flipClaimNameAndIdForBackwardsCompatibility, - logRequestData = _require2.logRequestData, - getClaimIdAndServeAsset = _require2.getClaimIdAndServeAsset; - -var lbryUri = __webpack_require__(125); -var handleShowRender = __webpack_require__(126); -var SERVE = 'SERVE'; - -module.exports = function (app) { - // route to serve a specific asset using the channel or claim id - app.get('/:identifier/:claim', function (req, res) { - var headers = req.headers, - ip = req.ip, - originalUrl = req.originalUrl, - params = req.params; - // decide if this is a show request - - var hasFileExtension = void 0; - try { - var _lbryUri$parseModifie = lbryUri.parseModifier(params.claim); - - hasFileExtension = _lbryUri$parseModifie.hasFileExtension; - } catch (error) { - return res.status(400).json({ success: false, message: error.message }); - } - var responseType = determineResponseType(hasFileExtension, headers); - if (responseType !== SERVE) { - return handleShowRender(req, res); - } - // handle serve request - // send google analytics - sendGAServeEvent(headers, ip, originalUrl); - // parse the claim - var claimName = void 0; - try { - var _lbryUri$parseClaim = lbryUri.parseClaim(params.claim); - - claimName = _lbryUri$parseClaim.claimName; - } catch (error) { - return res.status(400).json({ success: false, message: error.message }); - } - // parse the identifier - var isChannel = void 0, - channelName = void 0, - channelClaimId = void 0, - claimId = void 0; - try { - var _lbryUri$parseIdentif = lbryUri.parseIdentifier(params.identifier); - - isChannel = _lbryUri$parseIdentif.isChannel; - channelName = _lbryUri$parseIdentif.channelName; - channelClaimId = _lbryUri$parseIdentif.channelClaimId; - claimId = _lbryUri$parseIdentif.claimId; - } catch (error) { - return res.status(400).json({ success: false, message: error.message }); - } - if (!isChannel) { - var _flipClaimNameAndIdFo = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName); - - var _flipClaimNameAndIdFo2 = _slicedToArray(_flipClaimNameAndIdFo, 2); - - claimId = _flipClaimNameAndIdFo2[0]; - claimName = _flipClaimNameAndIdFo2[1]; - } - // log the request data for debugging - logRequestData(responseType, claimName, channelName, claimId); - // get the claim Id and then serve the asset - getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res); - }); - // route to serve the winning asset at a claim or a channel page - app.get('/:claim', function (req, res) { - var headers = req.headers, - ip = req.ip, - originalUrl = req.originalUrl, - params = req.params; - // decide if this is a show request - - var hasFileExtension = void 0; - try { - var _lbryUri$parseModifie2 = lbryUri.parseModifier(params.claim); - - hasFileExtension = _lbryUri$parseModifie2.hasFileExtension; - } catch (error) { - return res.status(400).json({ success: false, message: error.message }); - } - var responseType = determineResponseType(hasFileExtension, headers); - if (responseType !== SERVE) { - return handleShowRender(req, res); - } - // handle serve request - // send google analytics - sendGAServeEvent(headers, ip, originalUrl); - // parse the claim - var claimName = void 0; - try { - var _lbryUri$parseClaim2 = lbryUri.parseClaim(params.claim); - - claimName = _lbryUri$parseClaim2.claimName; - } catch (error) { - return res.status(400).json({ success: false, message: error.message }); - } - // log the request data for debugging - logRequestData(responseType, claimName, null, null); - // get the claim Id and then serve the asset - getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res); - }); -}; - -/***/ }), -/* 124 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var logger = __webpack_require__(1); - -var _require = __webpack_require__(34), - getClaimId = _require.getClaimId, - getLocalFileRecord = _require.getLocalFileRecord; - -var _require2 = __webpack_require__(33), - handleErrorResponse = _require2.handleErrorResponse; - -var SERVE = 'SERVE'; -var SHOW = 'SHOW'; -var NO_FILE = 'NO_FILE'; -var NO_CHANNEL = 'NO_CHANNEL'; -var NO_CLAIM = 'NO_CLAIM'; - -function clientAcceptsHtml(_ref) { - var accept = _ref.accept; - - return accept && accept.match(/text\/html/); -}; - -function requestIsFromBrowser(headers) { - return headers['user-agent'] && headers['user-agent'].match(/Mozilla/); -}; - -function clientWantsAsset(_ref2) { - var accept = _ref2.accept, - range = _ref2.range; - - var imageIsWanted = accept && accept.match(/image\/.*/) && !accept.match(/text\/html/) && !accept.match(/text\/\*/); - var videoIsWanted = accept && range; - return imageIsWanted || videoIsWanted; -}; - -function isValidClaimId(claimId) { - return claimId.length === 40 && !/[^A-Za-z0-9]/g.test(claimId); -}; - -function isValidShortId(claimId) { - return claimId.length === 1; // it should really evaluate the short url itself -}; - -function isValidShortIdOrClaimId(input) { - return isValidClaimId(input) || isValidShortId(input); -}; - -function serveAssetToClient(claimId, name, res) { - return getLocalFileRecord(claimId, name).then(function (fileRecord) { - // check that a local record was found - if (fileRecord === NO_FILE) { - return res.status(307).redirect('/api/claim/get/' + name + '/' + claimId); - } - // serve the file - var filePath = fileRecord.filePath, - fileType = fileRecord.fileType; - - logger.verbose('serving file: ' + filePath); - var sendFileOptions = { - headers: { - 'X-Content-Type-Options': 'nosniff', - 'Content-Type': fileType || 'image/jpeg' - } - }; - res.status(200).sendFile(filePath, sendFileOptions); - }).catch(function (error) { - throw error; - }); -}; - -module.exports = { - getClaimIdAndServeAsset: function getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) { - // get the claim Id and then serve the asset - getClaimId(channelName, channelClaimId, claimName, claimId).then(function (fullClaimId) { - if (fullClaimId === NO_CLAIM) { - return res.status(404).json({ success: false, message: 'no claim id could be found' }); - } else if (fullClaimId === NO_CHANNEL) { - return res.status(404).json({ success: false, message: 'no channel id could be found' }); - } - serveAssetToClient(fullClaimId, claimName, res); - // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success'); - }).catch(function (error) { - handleErrorResponse(originalUrl, ip, error, res); - // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail'); - }); - }, - determineResponseType: function determineResponseType(hasFileExtension, headers) { - var responseType = void 0; - if (hasFileExtension) { - responseType = SERVE; // assume a serve request if file extension is present - if (clientAcceptsHtml(headers)) { - // if the request comes from a browser, change it to a show request - responseType = SHOW; - } - } else { - responseType = SHOW; - if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) { - // this is in case someone embeds a show url - logger.debug('Show request came from browser but wants an image/video. Changing response to serve...'); - responseType = SERVE; - } - } - return responseType; - }, - flipClaimNameAndIdForBackwardsCompatibility: function flipClaimNameAndIdForBackwardsCompatibility(identifier, name) { - // this is a patch for backwards compatability with '/name/claim_id' url format - if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) { - var tempName = name; - name = identifier; - identifier = tempName; - } - return [identifier, name]; - }, - logRequestData: function logRequestData(responseType, claimName, channelName, claimId) { - logger.debug('responseType ===', responseType); - logger.debug('claim name === ', claimName); - logger.debug('channel name ===', channelName); - logger.debug('claim id ===', claimId); - } -}; - -/***/ }), -/* 125 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var logger = __webpack_require__(1); - -module.exports = { - REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g, - REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g, - REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/, - CHANNEL_CHAR: '@', - parseIdentifier: function parseIdentifier(identifier) { - logger.debug('parsing identifier:', identifier); - var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end) - '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end) - ); - - var _componentsRegex$exec = componentsRegex.exec(identifier).map(function (match) { - return match || null; - }), - _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4), - proto = _componentsRegex$exec2[0], - value = _componentsRegex$exec2[1], - modifierSeperator = _componentsRegex$exec2[2], - modifier = _componentsRegex$exec2[3]; - - logger.debug(proto + ', ' + value + ', ' + modifierSeperator + ', ' + modifier); - - // Validate and process name - if (!value) { - throw new Error('Check your url. No channel name provided before "' + modifierSeperator + '"'); - } - var isChannel = value.startsWith(module.exports.CHANNEL_CHAR); - var channelName = isChannel ? value : null; - var claimId = void 0; - if (isChannel) { - if (!channelName) { - throw new Error('No channel name after @.'); - } - var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL); - if (nameBadChars) { - throw new Error('Invalid characters in channel name: ' + nameBadChars.join(', ') + '.'); - } - } else { - claimId = value; - } - - // Validate and process modifier - var channelClaimId = void 0; - if (modifierSeperator) { - if (!modifier) { - throw new Error('No modifier provided after separator "' + modifierSeperator + '"'); - } - - if (modifierSeperator === ':') { - channelClaimId = modifier; - } else { - throw new Error('The "' + modifierSeperator + '" modifier is not currently supported'); - } - } - return { - isChannel: isChannel, - channelName: channelName, - channelClaimId: channelClaimId, - claimId: claimId - }; - }, - parseClaim: function parseClaim(claim) { - logger.debug('parsing name:', claim); - var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier) - '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end) - ); - - var _componentsRegex$exec3 = componentsRegex.exec(claim).map(function (match) { - return match || null; - }), - _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4), - proto = _componentsRegex$exec4[0], - claimName = _componentsRegex$exec4[1], - modifierSeperator = _componentsRegex$exec4[2], - modifier = _componentsRegex$exec4[3]; - - logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier); - - // Validate and process name - if (!claimName) { - throw new Error('No claim name provided before .'); - } - var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM); - if (nameBadChars) { - throw new Error('Invalid characters in claim name: ' + nameBadChars.join(', ') + '.'); - } - // Validate and process modifier - if (modifierSeperator) { - if (!modifier) { - throw new Error('No file extension provided after separator ' + modifierSeperator + '.'); - } - if (modifierSeperator !== '.') { - throw new Error('The ' + modifierSeperator + ' modifier is not supported in the claim name'); - } - } - // return results - return { - claimName: claimName - }; - }, - parseModifier: function parseModifier(claim) { - logger.debug('parsing modifier:', claim); - var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier) - '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end) - ); - - var _componentsRegex$exec5 = componentsRegex.exec(claim).map(function (match) { - return match || null; - }), - _componentsRegex$exec6 = _slicedToArray(_componentsRegex$exec5, 4), - proto = _componentsRegex$exec6[0], - claimName = _componentsRegex$exec6[1], - modifierSeperator = _componentsRegex$exec6[2], - modifier = _componentsRegex$exec6[3]; - - logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier); - // Validate and process modifier - var hasFileExtension = false; - if (modifierSeperator) { - hasFileExtension = true; - } - return { - hasFileExtension: hasFileExtension - }; - } -}; - -/***/ }), -/* 126 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _server = __webpack_require__(36); - -var _redux = __webpack_require__(16); - -var _index = __webpack_require__(37); - -var _index2 = _interopRequireDefault(_index); - -var _reactRedux = __webpack_require__(2); - -var _reactRouterDom = __webpack_require__(4); - -var _index3 = __webpack_require__(41); - -var _index4 = _interopRequireDefault(_index3); - -var _app = __webpack_require__(42); - -var _app2 = _interopRequireDefault(_app); - -var _renderFullPage = __webpack_require__(50); - -var _renderFullPage2 = _interopRequireDefault(_renderFullPage); - -var _reduxSaga = __webpack_require__(127); - -var _reduxSaga2 = _interopRequireDefault(_reduxSaga); - -var _effects = __webpack_require__(13); - -var _show_uri = __webpack_require__(128); - -var _show = __webpack_require__(7); - -var _reactHelmet = __webpack_require__(12); - -var _reactHelmet2 = _interopRequireDefault(_reactHelmet); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var returnSagaWithParams = function returnSagaWithParams(saga, params) { - return (/*#__PURE__*/regeneratorRuntime.mark(function _callee() { - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return (0, _effects.call)(saga, params); - - case 2: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - }) - ); -}; - -module.exports = function (req, res) { - var context = {}; - - // create and apply middleware - var sagaMiddleware = (0, _reduxSaga2.default)(); - var middleware = (0, _redux.applyMiddleware)(sagaMiddleware); - - // create a new Redux store instance - var store = (0, _redux.createStore)(_index2.default, middleware); - - // create saga - var action = (0, _show.onHandleShowPageUri)(req.params); - var saga = returnSagaWithParams(_show_uri.handleShowPageUri, action); - - // run the saga middleware - sagaMiddleware.run(saga).done.then(function () { - // render component to a string - var html = (0, _server.renderToString)(_react2.default.createElement( - _reactRedux.Provider, - { store: store }, - _react2.default.createElement( - _reactRouterDom.StaticRouter, - { location: req.url, context: context }, - _react2.default.createElement( - _index4.default, - null, - _react2.default.createElement(_app2.default, null) - ) - ) - )); - - // get head tags from helmet - var helmet = _reactHelmet2.default.renderStatic(); - - // check for a redirect - if (context.url) { - return res.redirect(301, context.url); - } - - // get the initial state from our Redux store - var preloadedState = store.getState(); - - // send the rendered page back to the client - res.send((0, _renderFullPage2.default)(helmet, html, preloadedState)); - }); -}; - -/***/ }), -/* 127 */ -/***/ (function(module, exports) { - -module.exports = require("redux-saga"); - -/***/ }), -/* 128 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.handleShowPageUri = handleShowPageUri; -exports.watchHandleShowPageUri = watchHandleShowPageUri; - -var _effects = __webpack_require__(13); - -var _show_action_types = __webpack_require__(9); - -var actions = _interopRequireWildcard(_show_action_types); - -var _show = __webpack_require__(7); - -var _show_asset = __webpack_require__(129); - -var _show_channel = __webpack_require__(131); - -var _lbryUri = __webpack_require__(19); - -var _lbryUri2 = _interopRequireDefault(_lbryUri); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -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; } } - -var _marked = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateIdentifierAndClaim), - _marked2 = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateClaimOnly), - _marked3 = /*#__PURE__*/regeneratorRuntime.mark(handleShowPageUri), - _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchHandleShowPageUri); - -function parseAndUpdateIdentifierAndClaim(modifier, claim) { - var isChannel, channelName, channelClaimId, claimId, claimName, extension, _lbryUri$parseIdentif, _lbryUri$parseClaim; - - return regeneratorRuntime.wrap(function parseAndUpdateIdentifierAndClaim$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - // this is a request for an asset - // claim will be an asset claim - // the identifier could be a channel or a claim id - isChannel = void 0, channelName = void 0, channelClaimId = void 0, claimId = void 0, claimName = void 0, extension = void 0; - _context.prev = 1; - _lbryUri$parseIdentif = _lbryUri2.default.parseIdentifier(modifier); - isChannel = _lbryUri$parseIdentif.isChannel; - channelName = _lbryUri$parseIdentif.channelName; - channelClaimId = _lbryUri$parseIdentif.channelClaimId; - claimId = _lbryUri$parseIdentif.claimId; - _lbryUri$parseClaim = _lbryUri2.default.parseClaim(claim); - claimName = _lbryUri$parseClaim.claimName; - extension = _lbryUri$parseClaim.extension; - _context.next = 17; - break; - - case 12: - _context.prev = 12; - _context.t0 = _context['catch'](1); - _context.next = 16; - return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message)); - - case 16: - return _context.abrupt('return', _context.sent); - - case 17: - if (!isChannel) { - _context.next = 21; - break; - } - - _context.next = 20; - return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, channelName, channelClaimId, extension)); - - case 20: - return _context.abrupt('return', _context.sent); - - case 21: - ; - _context.next = 24; - return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, claimId, null, null, extension)); - - case 24: - case 'end': - return _context.stop(); - } - } - }, _marked, this, [[1, 12]]); -} -function parseAndUpdateClaimOnly(claim) { - var isChannel, channelName, channelClaimId, _lbryUri$parseIdentif2, claimName, extension, _lbryUri$parseClaim2; - - return regeneratorRuntime.wrap(function parseAndUpdateClaimOnly$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - // this could be a request for an asset or a channel page - // claim could be an asset claim or a channel claim - isChannel = void 0, channelName = void 0, channelClaimId = void 0; - _context2.prev = 1; - _lbryUri$parseIdentif2 = _lbryUri2.default.parseIdentifier(claim); - isChannel = _lbryUri$parseIdentif2.isChannel; - channelName = _lbryUri$parseIdentif2.channelName; - channelClaimId = _lbryUri$parseIdentif2.channelClaimId; - _context2.next = 13; - break; - - case 8: - _context2.prev = 8; - _context2.t0 = _context2['catch'](1); - _context2.next = 12; - return (0, _effects.put)((0, _show.onRequestError)(_context2.t0.message)); - - case 12: - return _context2.abrupt('return', _context2.sent); - - case 13: - if (!isChannel) { - _context2.next = 17; - break; - } - - _context2.next = 16; - return (0, _effects.call)(_show_channel.newChannelRequest, (0, _show.onNewChannelRequest)(channelName, channelClaimId)); - - case 16: - return _context2.abrupt('return', _context2.sent); - - case 17: - // if not for a channel, parse the claim request - claimName = void 0, extension = void 0; - _context2.prev = 18; - _lbryUri$parseClaim2 = _lbryUri2.default.parseClaim(claim); - claimName = _lbryUri$parseClaim2.claimName; - extension = _lbryUri$parseClaim2.extension; - _context2.next = 29; - break; - - case 24: - _context2.prev = 24; - _context2.t1 = _context2['catch'](18); - _context2.next = 28; - return (0, _effects.put)((0, _show.onRequestError)(_context2.t1.message)); - - case 28: - return _context2.abrupt('return', _context2.sent); - - case 29: - _context2.next = 31; - return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, null, null, extension)); - - case 31: - case 'end': - return _context2.stop(); - } - } - }, _marked2, this, [[1, 8], [18, 24]]); -} - -function handleShowPageUri(action) { - var _action$data, identifier, claim; - - return regeneratorRuntime.wrap(function handleShowPageUri$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - _action$data = action.data, identifier = _action$data.identifier, claim = _action$data.claim; - - if (!identifier) { - _context3.next = 5; - break; - } - - _context3.next = 4; - return (0, _effects.call)(parseAndUpdateIdentifierAndClaim, identifier, claim); - - case 4: - return _context3.abrupt('return', _context3.sent); - - case 5: - _context3.next = 7; - return (0, _effects.call)(parseAndUpdateClaimOnly, claim); - - case 7: - case 'end': - return _context3.stop(); - } - } - }, _marked3, this); -}; - -function watchHandleShowPageUri() { - return regeneratorRuntime.wrap(function watchHandleShowPageUri$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - _context4.next = 2; - return (0, _effects.takeLatest)(actions.HANDLE_SHOW_URI, handleShowPageUri); - - case 2: - case 'end': - return _context4.stop(); - } - } - }, _marked4, this); -}; - -/***/ }), -/* 129 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.newAssetRequest = newAssetRequest; -exports.watchNewAssetRequest = watchNewAssetRequest; - -var _effects = __webpack_require__(13); - -var _show_action_types = __webpack_require__(9); - -var actions = _interopRequireWildcard(_show_action_types); - -var _show = __webpack_require__(7); - -var _assetApi = __webpack_require__(130); - -var _show2 = __webpack_require__(11); - -var _site = __webpack_require__(51); - -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; } } - -var _marked = /*#__PURE__*/regeneratorRuntime.mark(newAssetRequest), - _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewAssetRequest); - -function newAssetRequest(action) { - var _action$data, requestType, requestId, name, modifier, state, host, longId, _ref, assetKey, shortId, _ref2, claimData, _ref3; - - return regeneratorRuntime.wrap(function newAssetRequest$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, name = _action$data.name, modifier = _action$data.modifier; - // put an action to update the request in redux - - _context.next = 3; - return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId)); - - case 3: - _context.next = 5; - return (0, _effects.select)(_show2.selectShowState); - - case 5: - state = _context.sent; - _context.next = 8; - return (0, _effects.select)(_site.selectSiteHost); - - case 8: - host = _context.sent; - - if (!state.requestList[requestId]) { - _context.next = 11; - break; - } - - return _context.abrupt('return', null); - - case 11: - // get long id && add request to request list - longId = void 0; - _context.prev = 12; - _context.next = 15; - return (0, _effects.call)(_assetApi.getLongClaimId, host, name, modifier); - - case 15: - _ref = _context.sent; - longId = _ref.data; - _context.next = 24; - break; - - case 19: - _context.prev = 19; - _context.t0 = _context['catch'](12); - _context.next = 23; - return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message)); - - case 23: - return _context.abrupt('return', _context.sent); - - case 24: - assetKey = 'a#' + name + '#' + longId; - _context.next = 27; - return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, assetKey)); - - case 27: - if (!state.assetList[assetKey]) { - _context.next = 29; - break; - } - - return _context.abrupt('return', null); - - case 29: - // get short Id - shortId = void 0; - _context.prev = 30; - _context.next = 33; - return (0, _effects.call)(_assetApi.getShortId, host, name, longId); - - case 33: - _ref2 = _context.sent; - shortId = _ref2.data; - _context.next = 42; - break; - - case 37: - _context.prev = 37; - _context.t1 = _context['catch'](30); - _context.next = 41; - return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message)); - - case 41: - return _context.abrupt('return', _context.sent); - - case 42: - // get asset claim data - claimData = void 0; - _context.prev = 43; - _context.next = 46; - return (0, _effects.call)(_assetApi.getClaimData, host, name, longId); - - case 46: - _ref3 = _context.sent; - claimData = _ref3.data; - _context.next = 55; - break; - - case 50: - _context.prev = 50; - _context.t2 = _context['catch'](43); - _context.next = 54; - return (0, _effects.put)((0, _show.onRequestError)(_context.t2.message)); - - case 54: - return _context.abrupt('return', _context.sent); - - case 55: - _context.next = 57; - return (0, _effects.put)((0, _show.addAssetToAssetList)(assetKey, null, name, longId, shortId, claimData)); - - case 57: - _context.next = 59; - return (0, _effects.put)((0, _show.onRequestError)(null)); - - case 59: - case 'end': - return _context.stop(); - } - } - }, _marked, this, [[12, 19], [30, 37], [43, 50]]); -}; - -function watchNewAssetRequest() { - return regeneratorRuntime.wrap(function watchNewAssetRequest$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - _context2.next = 2; - return (0, _effects.takeLatest)(actions.ASSET_REQUEST_NEW, newAssetRequest); - - case 2: - case 'end': - return _context2.stop(); - } - } - }, _marked2, this); -}; - -/***/ }), -/* 130 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getLongClaimId = getLongClaimId; -exports.getShortId = getShortId; -exports.getClaimData = getClaimData; - -var _request = __webpack_require__(6); - -var _request2 = _interopRequireDefault(_request); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getLongClaimId(host, name, modifier) { - var body = {}; - // create request params - if (modifier) { - if (modifier.id) { - body['claimId'] = modifier.id; - } else { - body['channelName'] = modifier.channel.name; - body['channelClaimId'] = modifier.channel.id; - } - } - body['claimName'] = name; - var params = { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(body) - }; - // create url - var url = host + '/api/claim/long-id'; - // return the request promise - return (0, _request2.default)(url, params); -}; - -function getShortId(host, name, claimId) { - var url = host + '/api/claim/short-id/' + claimId + '/' + name; - return (0, _request2.default)(url); -}; - -function getClaimData(host, name, claimId) { - var url = host + '/api/claim/data/' + name + '/' + claimId; - return (0, _request2.default)(url); -}; - -/***/ }), -/* 131 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.newChannelRequest = newChannelRequest; -exports.watchNewChannelRequest = watchNewChannelRequest; -exports.watchUpdateChannelClaims = watchUpdateChannelClaims; - -var _effects = __webpack_require__(13); - -var _show_action_types = __webpack_require__(9); - -var actions = _interopRequireWildcard(_show_action_types); - -var _show = __webpack_require__(7); - -var _channelApi = __webpack_require__(132); - -var _show2 = __webpack_require__(11); - -var _site = __webpack_require__(51); - -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; } } - -var _marked = /*#__PURE__*/regeneratorRuntime.mark(newChannelRequest), - _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewChannelRequest), - _marked3 = /*#__PURE__*/regeneratorRuntime.mark(getNewClaimsAndUpdateChannel), - _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchUpdateChannelClaims); - -function newChannelRequest(action) { - var _action$data, requestType, requestId, channelName, channelId, state, host, longId, shortId, _ref, _ref$data, channelKey, claimsData, _ref2; - - return regeneratorRuntime.wrap(function newChannelRequest$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, channelName = _action$data.channelName, channelId = _action$data.channelId; - // put an action to update the request in redux - - _context.next = 3; - return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId)); - - case 3: - _context.next = 5; - return (0, _effects.select)(_show2.selectShowState); - - case 5: - state = _context.sent; - _context.next = 8; - return (0, _effects.select)(_site.selectSiteHost); - - case 8: - host = _context.sent; - - if (!state.requestList[requestId]) { - _context.next = 11; - break; - } - - return _context.abrupt('return', null); - - case 11: - // get channel long id - longId = void 0, shortId = void 0; - _context.prev = 12; - _context.next = 15; - return (0, _effects.call)(_channelApi.getChannelData, host, channelName, channelId); - - case 15: - _ref = _context.sent; - _ref$data = _ref.data; - longId = _ref$data.longChannelClaimId; - shortId = _ref$data.shortChannelClaimId; - _context.next = 26; - break; - - case 21: - _context.prev = 21; - _context.t0 = _context['catch'](12); - _context.next = 25; - return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message)); - - case 25: - return _context.abrupt('return', _context.sent); - - case 26: - // store the request in the channel requests list - channelKey = 'c#' + channelName + '#' + longId; - _context.next = 29; - return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, channelKey)); - - case 29: - if (!state.channelList[channelKey]) { - _context.next = 31; - break; - } - - return _context.abrupt('return', null); - - case 31: - // get channel claims data - claimsData = void 0; - _context.prev = 32; - _context.next = 35; - return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, channelName, 1); - - case 35: - _ref2 = _context.sent; - claimsData = _ref2.data; - _context.next = 44; - break; - - case 39: - _context.prev = 39; - _context.t1 = _context['catch'](32); - _context.next = 43; - return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message)); - - case 43: - return _context.abrupt('return', _context.sent); - - case 44: - _context.next = 46; - return (0, _effects.put)((0, _show.addNewChannelToChannelList)(channelKey, channelName, shortId, longId, claimsData)); - - case 46: - _context.next = 48; - return (0, _effects.put)((0, _show.onRequestError)(null)); - - case 48: - case 'end': - return _context.stop(); - } - } - }, _marked, this, [[12, 21], [32, 39]]); -} - -function watchNewChannelRequest() { - return regeneratorRuntime.wrap(function watchNewChannelRequest$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - _context2.next = 2; - return (0, _effects.takeLatest)(actions.CHANNEL_REQUEST_NEW, newChannelRequest); - - case 2: - case 'end': - return _context2.stop(); - } - } - }, _marked2, this); -}; - -function getNewClaimsAndUpdateChannel(action) { - var _action$data2, channelKey, name, longId, page, host, claimsData, _ref3; - - return regeneratorRuntime.wrap(function getNewClaimsAndUpdateChannel$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - _action$data2 = action.data, channelKey = _action$data2.channelKey, name = _action$data2.name, longId = _action$data2.longId, page = _action$data2.page; - _context3.next = 3; - return (0, _effects.select)(_site.selectSiteHost); - - case 3: - host = _context3.sent; - claimsData = void 0; - _context3.prev = 5; - _context3.next = 8; - return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, name, page); - - case 8: - _ref3 = _context3.sent; - claimsData = _ref3.data; - _context3.next = 17; - break; - - case 12: - _context3.prev = 12; - _context3.t0 = _context3['catch'](5); - _context3.next = 16; - return (0, _effects.put)((0, _show.onRequestError)(_context3.t0.message)); - - case 16: - return _context3.abrupt('return', _context3.sent); - - case 17: - _context3.next = 19; - return (0, _effects.put)((0, _show.updateChannelClaims)(channelKey, claimsData)); - - case 19: - case 'end': - return _context3.stop(); - } - } - }, _marked3, this, [[5, 12]]); -} - -function watchUpdateChannelClaims() { - return regeneratorRuntime.wrap(function watchUpdateChannelClaims$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - _context4.next = 2; - return (0, _effects.takeLatest)(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel); - - case 2: - case 'end': - return _context4.stop(); - } - } - }, _marked4, this); -} - -/***/ }), -/* 132 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getChannelData = getChannelData; -exports.getChannelClaims = getChannelClaims; - -var _request = __webpack_require__(6); - -var _request2 = _interopRequireDefault(_request); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getChannelData(host, id, name) { - if (!id) id = 'none'; - var url = host + '/api/channel/data/' + name + '/' + id; - return (0, _request2.default)(url); -}; - -function getChannelClaims(host, longId, name, page) { - if (!page) page = 1; - var url = host + '/api/channel/claims/' + name + '/' + longId + '/' + page; - return (0, _request2.default)(url); -}; - -/***/ }), -/* 133 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var handlePageRender = __webpack_require__(35); - -module.exports = function (app) { - // a catch-all route if someone visits a page that does not exist - app.use('*', function (req, res) { - // send response - handlePageRender(req, res); - }); -}; - -/***/ }), -/* 134 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _require = __webpack_require__(135), - logLevel = _require.logLevel; - -module.exports = function (winston) { - // configure - winston.configure({ - transports: [new winston.transports.Console({ - level: logLevel, - timestamp: false, - colorize: true, - prettyPrint: true, - handleExceptions: true, - humanReadableUnhandledException: true - })] - }); - // test all the log levels - winston.error('Level 0'); - winston.warn('Level 1'); - winston.info('Level 2'); - winston.verbose('Level 3'); - winston.debug('Level 4'); - winston.silly('Level 5'); -}; - -/***/ }), -/* 135 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var loggerConfig = { - logLevel: 'debug' // options: silly, debug, verbose, info -}; - -module.exports = loggerConfig; - -/***/ }), -/* 136 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var winstonSlackWebHook = __webpack_require__(137).SlackWebHook; -var slackConfig = __webpack_require__(28); - -module.exports = function (winston) { - var slackWebHook = slackConfig.slackWebHook, - slackErrorChannel = slackConfig.slackErrorChannel, - slackInfoChannel = slackConfig.slackInfoChannel; - - if (slackWebHook) { - // add a transport for errors to slack - if (slackErrorChannel) { - winston.add(winstonSlackWebHook, { - name: 'slack-errors-transport', - level: 'warn', - webhookUrl: slackWebHook, - channel: slackErrorChannel, - username: 'spee.ch', - iconEmoji: ':face_with_head_bandage:' - }); - }; - if (slackInfoChannel) { - winston.add(winstonSlackWebHook, { - name: 'slack-info-transport', - level: 'info', - webhookUrl: slackWebHook, - channel: slackInfoChannel, - username: 'spee.ch', - iconEmoji: ':nerd_face:' - }); - }; - // send test message - winston.error('Slack "error" logging is online.'); - winston.info('Slack "info" logging is online.'); - } else { - winston.warn('Slack logging is not enabled because no slackWebHook config var provided.'); - } -}; - -/***/ }), -/* 137 */ -/***/ (function(module, exports) { - -module.exports = require("winston-slack-webhook"); - -/***/ }) -/******/ ]); -//# source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AgICAgICB0eXBlICAgOiBERUNJTUFMKDE5LCA4KSxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBoYXNTaWduYXR1cmU6IHtcbiAgICAgICAgdHlwZSAgIDogQk9PTEVBTixcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBoZWlnaHQ6IHtcbiAgICAgICAgdHlwZSAgIDogSU5URUdFUixcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBoZXg6IHtcbiAgICAgICAgdHlwZSAgIDogVEVYVCgnbG9uZycpLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIG5hbWU6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIG5vdXQ6IHtcbiAgICAgICAgdHlwZSAgIDogSU5URUdFUixcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICB0eGlkOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICB2YWxpZEF0SGVpZ2h0OiB7XG4gICAgICAgIHR5cGUgICA6IElOVEVHRVIsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgb3V0cG9pbnQ6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIHZhbHVlVmVyc2lvbjoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgY2xhaW1UeXBlOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxc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gICAgIH0sXG4gICAgICBjbGFpbUlkOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBjbGFpbVNlcXVlbmNlOiB7XG4gICAgICAgIHR5cGUgICA6IElOVEVHRVIsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgZGVjb2RlZENsYWltOiB7XG4gICAgICAgIHR5cGUgICA6IEJPT0xFQU4sXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgZGVwdGg6IHtcbiAgICAgICAgdHlwZSAgIDogSU5URUdFUixcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBlZmZlY3RpdmVBbW91bnQ6IHtcbiAgICAgICAgdHlwZSAgIDogREVDSU1BTCgxOSwgOCksXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgaGFzU2lnbmF0dXJlOiB7XG4gICAgICAgIHR5cGUgICA6IEJPT0xFQU4sXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgaGVpZ2h0OiB7XG4gICAgICAgIHR5cGUgICA6IElOVEVHRVIsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgaGV4OiB7XG4gICAgICAgIHR5cGUgICA6IFRFWFQoJ2xvbmcnKSxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBuYW1lOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBub3V0OiB7XG4gICAgICAgIHR5cGUgICA6IElOVEVHRVIsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgdHhpZDoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgdmFsaWRBdEhlaWdodDoge1xuICAgICAgICB0eXBlICAgOiBJTlRFR0VSLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIG91dHBvaW50OiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBjbGFpbVR5cGU6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGNlcnRpZmljYXRlSWQ6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGF1dGhvcjoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgZGVzY3JpcHRpb246IHtcbiAgICAgICAgdHlwZSAgIDogVEVYVCgnbG9uZycpLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGxhbmd1YWdlOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBsaWNlbnNlOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBsaWNlbnNlVXJsOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBuc2Z3OiB7XG4gICAgICAgIHR5cGUgICA6IEJPT0xFQU4sXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgcHJldmlldzoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgdGh1bWJuYWlsOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICB0aXRsZToge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgbWV0YWRhdGFWZXJzaW9uOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBjb250ZW50VHlwZToge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgc291cmNlOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBzb3VyY2VUeXBlOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBzb3VyY2VWZXJzaW9uOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBzdHJlYW1WZXJzaW9uOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICB2YWx1ZVZlcnNpb246IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGNoYW5uZWxOYW1lOiB7XG4gICAgICAgIHR5cGUgICAgIDogU1RSSU5HLFxuICAgICAgICBhbGxvd051bGw6IHRydWUsXG4gICAgICAgIGRlZmF1bHQgIDogbnVsbCxcbiAgICAgIH0sXG4gICAgfSxcbiAgICB7XG4gICAgICBmcmVlemVUYWJsZU5hbWU6IHRydWUsXG4gICAgfVxuICApO1xuXG4gIENsYWltLmFzc29jaWF0ZSA9IGRiID0+IHtcbiAgICBDbGFpbS5iZWxvbmdzVG8oZGIuRmlsZSwge1xuICAgICAgZm9yZWlnbktleToge1xuICAgICAgICBhbGxvd051bGw6IHRydWUsXG4gICAgICB9LFxuICAgIH0pO1xuICB9O1xuXG4gIENsYWltLmdldFNob3J0Q2xhaW1JZEZyb21Mb25nQ2xhaW1JZCA9IGZ1bmN0aW9uIChjbGFpbUlkLCBjbGFpbU5hbWUpIHtcbiAgICBsb2dnZXIuZGVidWcoYENsYWltLmdldFNob3J0Q2xhaW1JZEZyb21Mb25nQ2xhaW1JZCBmb3IgJHtjbGFpbU5hbWV9IyR7Y2xhaW1JZH1gKTtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgdGhpc1xuICAgICAgICAuZmluZEFsbCh7XG4gICAgICAgICAgd2hlcmU6IHsgbmFtZTogY2xhaW1OYW1lIH0sXG4gICAgICAgICAgb3JkZXI6IFtbJ2hlaWdodCcsICdBU0MnXV0sXG4gICAgICAgIH0pXG4gICAgICAgIC50aGVuKHJlc3VsdCA9PiB7XG4gICAgICAgICAgc3dpdGNoIChyZXN1bHQubGVuZ3RoKSB7XG4gICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTm8gY2xhaW0ocykgZm91bmQgd2l0aCB0aGF0IGNsYWltIG5hbWUnKTtcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgIHJlc29sdmUocmV0dXJuU2hvcnRJZChyZXN1bHQsIGNsYWltSWQpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICA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AgIGNhc2UgMTpcbiAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUocmVzdWx0WzBdLmNsYWltSWQpO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgbG9nZ2VyLmVycm9yKGAke3Jlc3VsdC5sZW5ndGh9IHJlY29yZHMgZm91bmQgZm9yIFwiJHtjbGFpbU5hbWV9XCIgaW4gY2hhbm5lbCBcIiR7Y2hhbm5lbENsYWltSWR9XCJgKTtcbiAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUocmVzdWx0WzBdLmNsYWltSWQpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICB9KTtcbiAgICB9KTtcbiAgfTtcblxuICBDbGFpbS5nZXRMb25nQ2xhaW1JZEZyb21TaG9ydENsYWltSWQgPSBmdW5jdGlvbiAobmFtZSwgc2hvcnRJZCkge1xuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICB0aGlzXG4gICAgICAgIC5maW5kQWxsKHtcbiAgICAgICAgICB3aGVyZToge1xuICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgIGNsYWltSWQ6IHtcbiAgICAgICAgICAgICAgJGxpa2U6IGAke3Nob3J0SWR9JWAsXG4gICAgICAgICAgICB9fSxcbiAgICAgICAgICBvcmRlcjogW1snaGVpZ2h0JywgJ0FTQyddXSxcbiAgICAgICAgfSlcbiAgICAgICAgLnRoZW4ocmVzdWx0ID0+IHtcbiAgICAgICAgICBzd2l0Y2ggKHJlc3VsdC5sZW5ndGgpIHtcbiAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUobnVsbCk7XG4gICAgICAgICAgICBkZWZhdWx0OiAvLyBub3RlIHJlc3VsdHMgbXVzdCBiZSBzb3J0ZWRcbiAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUocmVzdWx0WzBdLmNsYWltSWQpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICB9KTtcbiAgICB9KTtcbiAgfTtcblxuICBDbGFpbS5nZXRUb3BGcmVlQ2xhaW1JZEJ5Q2xhaW1OYW1lID0gZnVuY3Rpb24gKG5hbWUpIHtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgdGhpc1xuICAgICAgICAuZmluZEFsbCh7XG4gICAgICAgICAgd2hlcmU6IHsgbmFtZSB9LFxuICAgICAgICAgIG9yZGVyOiBbWydlZmZlY3RpdmVBbW91bnQnLCAnREVTQyddLCBbJ2hlaWdodCcsICdBU0MnXV0sICAvLyBub3RlOiBtYXliZSBoZWlnaHQgYW5kIGVmZmVjdGl2ZSBhbW91bnQgbmVlZCB0byBzd2l0Y2g/XG4gICAgICAgIH0pXG4gICAgICAgIC50aGVuKHJlc3VsdCA9PiB7XG4gICAgICAgICAgbG9nZ2VyLmRlYnVnKCdsZW5ndGggb2YgcmVzdWx0JywgcmVzdWx0Lmxlbmd0aCk7XG4gICAgICAgICAgc3dpdGNoIChyZXN1bHQubGVuZ3RoKSB7XG4gICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKG51bGwpO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUocmVzdWx0WzBdLmRhdGFWYWx1ZXMuY2xhaW1JZCk7XG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgIH0pO1xuICAgIH0pO1xuICB9O1xuXG4gIENsYWltLn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IH0pO1xuICAgIH0pO1xuICB9O1xuXG4gIHJldHVybiBDbGFpbTtcbn07XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zZXJ2ZXIvbW9kZWxzL2NsYWltLmpzIiwibW9kdWxlLmV4cG9ydHMgPSAoc2VxdWVsaXplLCB7IFNUUklORywgQk9PTEVBTiwgSU5URUdFUiB9KSA9PiB7XG4gIGNvbnN0IEZpbGUgPSBzZXF1ZWxpemUuZGVmaW5lKFxuICAgICdGaWxlJyxcbiAgICB7XG4gICAgICBuYW1lOiB7XG4gICAgICAgIHR5cGUgICAgIDogU1RSSU5HLFxuICAgICAgICBhbGxvd051bGw6IGZhbHNlLFxuICAgICAgfSxcbiAgICAgIGNsYWltSWQ6IHtcbiAgICAgICAgdHlwZSAgICAgOiBTVFJJTkcsXG4gICAgICAgIGFsbG93TnVsbDogZmFsc2UsXG4gICAgICB9LFxuICAgICAgYWRkcmVzczoge1xuICAgICAgICB0eXBlICAgICA6IFNUUklORyxcbiAgICAgICAgYWxsb3dOdWxsOiBmYWxzZSxcbiAgICAgIH0sXG4gICAgICBvdXRwb2ludDoge1xuICAgICAgICB0eXBlICAgICA6IFNUUklORyxcbiAgICAgICAgYWxsb3dOdWxsOiBmYWxzZSxcbiAgICAgIH0sXG4gICAgICBoZWlnaHQ6IHtcbiAgICAgICAgdHlwZSAgICAgOiBJTlRFR0VSLFxuICAgICAgICBhbGxvd051bGw6IGZhbHNlLFxuICAgICAgICBkZWZhdWx0ICA6IDAsXG4gICAgICB9LFxuICAgICAgZmlsZU5hbWU6IHtcbiAgICAgICAgdHlwZSAgICAgOiBTVFJJTkcsXG4gICAgICAgIGFsbG93TnVsbDogZmFsc2UsXG4gICAgICB9LFxuICAgICAgZmlsZVBhdGg6IHtcbiAgICAgICAgdHlwZSAgICAgOiBTVFJJTkcsXG4gICAgICAgIGFsbG93TnVsbDogZmFsc2UsXG4gICAgICB9LFxuICAgICAgZmlsZVR5cGU6IHtcbiA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IHRydWUsXG4gICAgICBjaGFubmVsTmFtZSAgIDogcmVxLnVzZXIuY2hhbm5lbE5hbWUsXG4gICAgICBjaGFubmVsQ2xhaW1JZDogcmVxLnVzZXIuY2hhbm5lbENsYWltSWQsXG4gICAgICBzaG9ydENoYW5uZWxJZDogcmVxLnVzZXIuc2hvcnRDaGFubmVsSWQsXG4gICAgfSk7XG4gIH0pO1xuICAvLyByb3V0ZSBmb3IgbG9nIGluXG4gIGFwcC5wb3N0KCcvbG9naW4nLCAocmVxLCByZXMsIG5leHQpID0+IHtcbiAgICBwYXNzcG9ydC5hdXRoZW50aWNhdGUoJ2xvY2FsLWxvZ2luJywgKGVyciwgdXNlciwgaW5mbykgPT4ge1xuICAgICAgaWYgKGVycikge1xuICAgICAgICByZXR1cm4gbmV4dChlcnIpO1xuICAgICAgfVxuICAgICAgaWYgKCF1c2VyKSB7XG4gICAgICAgIHJldHVybiByZXMuc3RhdHVzKDQwMCkuanNvbih7XG4gICAgICAgICAgc3VjY2VzczogZmFsc2UsXG4gICAgICAgICAgbWVzc2FnZTogaW5mby5tZXNzYWdlLFxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICAgIGxvZ2dlci5kZWJ1Zygnc3VjY2Vzc2Z1bCBsb2dpbicpO1xuICAgICAgcmVxLmxvZ0luKHVzZXIsIChlcnIpID0+IHtcbiAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgIHJldHVybiBuZXh0KGVycik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJlcy5zdGF0dXMoMjAwKS5qc29uKHtcbiAgICAgICAgICBzdWNjZXNzICAgICAgIDogdHJ1ZSxcbiAgICAgICAgICBjaGFubmVsTmFtZSAgIDogcmVxLnVzZXIuY2hhbm5lbE5hbWUsXG4gICAgICAgICAgY2hhbm5lbENsYWltSWQ6IHJlcS51c2VyLmNoYW5uZWxDbGFpbUlkLFxuICAgICAgICAgIHNob3J0Q2hhbm5lbElkOiByZXEudXNlci5zaG9ydENoYW5uZ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QgY2xhaW1SZWNvcmQgPSB7XG4gICAgICAgICAgICBuYW1lICAgICAgIDogcHVibGlzaFBhcmFtcy5uYW1lLFxuICAgICAgICAgICAgY2xhaW1JZCAgICA6IHB1Ymxpc2hSZXN1bHRzLmNsYWltX2lkLFxuICAgICAgICAgICAgdGl0bGUgICAgICA6IHB1Ymxpc2hQYXJhbXMubWV0YWRhdGEudGl0bGUsXG4gICAgICAgICAgICBkZXNjcmlwdGlvbjogcHVibGlzaFBhcmFtcy5tZXRhZGF0YS5kZXNjcmlwdGlvbixcbiAgICAgICAgICAgIGFkZHJlc3MgICAgOiBwdWJsaXNoUGFyYW1zLmNsYWltX2FkZHJlc3MsXG4gICAgICAgICAgICB0aHVtYm5haWwgIDogcHVibGlzaFBhcmFtcy5tZXRhZGF0YS50aHVtYm5haWwsXG4gICAgICAgICAgICBvdXRwb2ludCAgIDogYCR7cHVibGlzaFJlc3VsdHMudHhpZH06JHtwdWJsaXNoUmVzdWx0cy5ub3V0fWAsXG4gICAgICAgICAgICBoZWlnaHQgICAgIDogMCxcbiAgICAgICAgICAgIGNvbnRlbnRUeXBlOiBmaWxlVHlwZSxcbiAgICAgICAgICAgIG5zZncgICAgICAgOiBwdWJsaXNoUGFyYW1zLm1ldGFkYXRhLm5zZncsXG4gICAgICAgICAgICBhbW91bnQgICAgIDogcHVibGlzaFBhcmFtcy5iaWQsXG4gICAgICAgICAgICBjZXJ0aWZpY2F0ZUlkLFxuICAgICAgICAgICAgY2hhbm5lbE5hbWUsXG4gICAgICAgICAgfTtcbiAgICAgICAgICAvLyB1cHNlcnQgY3JpdGVyaWFcbiAgICAgICAgICBjb25zdCB1cHNlcnRDcml0ZXJpYSA9IHtcbiAgICAgICAgICAgIG5hbWUgICA6IHB1Ymxpc2hQYXJhbXMubmFtZSxcbiAgICAgICAgICAgIGNsYWltSWQ6IHB1Ymxpc2hSZXN1bHRzLmNsYWltX2lkLFxuICAgICAgICAgIH07XG4gICAgICAgICAgLy8gdXBzZXJ0I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ICAgICAgfSksXG4gICAgICB9KTtcbiAgICAvLyBzdG9yZSByZXF1ZXN0c1xuICAgIGNhc2UgYWN0aW9ucy5SRVFVRVNUX0xJU1RfQUREOlxuICAgICAgcmV0dXJuIE9iamVjdC5hc3NpZ24oe30sIHN0YXRlLCB7XG4gICAgICAgIHJlcXVlc3RMaXN0OiBPYmplY3QuYXNzaWduKHt9LCBzdGF0ZS5yZXF1ZXN0TGlzdCwge1xuICAgICAgICAgIFthY3Rpb24uZGF0YS5pZF06IHtcbiAgICAgICAgICAgIGVycm9yOiBhY3Rpb24uZGF0YS5lcnJvcixcbiAgICAgICAgICAgIGtleSAgOiBhY3Rpb24uZGF0YS5rZXksXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICAgICB9KTtcbiAgICAvLyBhc3NldCBkYXRhXG4gICAgY2FzZSBhY3Rpb25zLkFTU0VUX0FERDpcbiAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKHt9LCBzdGF0ZSwge1xuICAgICAgICBhc3NldExpc3Q6IE9iamVjdC5hc3NpZ24oe30sIHN0YXRlLmFzc2V0TGlzdCwge1xuICAgICAgICAgIFthY3Rpb24uZGF0YS5pZF06IHtcbiAgICAgICAgICAgIGVycm9yICAgIDogYWN0aW9uLmRhdGEuZXJyb3IsXG4gICAgICAgICAgICBuYW1lICAgICA6IGFjdGlvbi5kYXRhLm5hbWUsXG4gICAgICAgICAgICBjbGFpbUlkICA6IGFjdGlvbi5kYXRhLmNsYWltSWQsXG4gICAgICAgICAgICBzaG9ydElkICA6IGFjdGlvbi5kYXRhLnNob3J0SWQsXG4gICAgICAgICAgICBjbGFpbURhdGE6IGFjdGlvbi5kYXRhLmNsYWltRGF0YSxcbiAgICAgICAgICB9LFxuICAgICAgICB9KSxcbiAgICAgIH0pO1xuICAgIC8vIGNoYW5uZWwgZGF0YVxuICAgIGNhc2UgYWN0aW9ucy5DSEFOTkVMX0FERDpcbiAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKHt9L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nbGluay0tcHJpbWFyeScgaHJlZj0naHR0cHM6Ly9kaXNjb3JkLmdnL1lqWWJ3aFMnIHRhcmdldD0nX2JsYW5rJz5MQlJZIGRpc2NvcmQ8L2E+LjwvcD5cbiAgICAgICAgICA8aT48cCBpZD0nZXJyb3ItbWVzc2FnZSc+e2Vycm9yfTwvcD48L2k+XG4gICAgICAgIDwvZGl2PlxuICAgICAgICB9XG4gICAgICAgIHsoc3RhdHVzID09PSBBVkFJTEFCTEUpICYmXG4gICAgICAgICgoKSA9PiB7XG4gICAgICAgICAgc3dpdGNoIChjb250ZW50VHlwZSkge1xuICAgICAgICAgICAgY2FzZSAnaW1hZ2UvanBlZyc6XG4gICAgICAgICAgICBjYXNlICdpbWFnZS9qcGcnOlxuICAgICAgICAgICAgY2FzZSAnaW1hZ2UvcG5nJzpcbiAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8aW1nXG4gICAgICAgICAgICAgICAgICBjbGFzc05hbWU9J2Fzc2V0J1xuICAgICAgICAgICAgICAgICAgc3JjPXtgLyR7Y2xhaW1JZH0vJHtuYW1lfS4ke2ZpbGVFeHR9YH1cbiAgICAgICAgICAgICAgICAgIGFsdD17bmFtZX0gLz5cbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNhc2UgJ2ltYWdlL2dpZic6XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGltZ1xuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPSdhc3NldCdcbiAgICAgICAgICAgICAgICAgIHNyYz17YC8ke2NsYWltSWR9LyR7bmFtZX0uJHtmaWxlRXh0fWB9XG4gICAgICAgICAgICAgICAgICBhbHQ9e25hbWV9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNhc2UgJ3ZpZGVvL21wNCc6XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPHZpZGVvIGNs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gICAgICAgICAgICk7XG4gICAgICAgICAgICBjYXNlICd2aWRlby9tcDQnOlxuICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxpbWdcbiAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17J2Fzc2V0LXByZXZpZXcgdmlkZW8nfVxuICAgICAgICAgICAgICAgICAgc3JjPXt0aHVtYm5haWwgfHwgZGVmYXVsdFRodW1ibmFpbH1cbiAgICAgICAgICAgICAgICAgIGFsdD17bmFtZX1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8cD51bnN1cHBvcnRlZCBmaWxlIHR5cGU8L3A+XG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSgpfVxuICAgICAgPC9MaW5rPlxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQXNzZXRQcmV2aWV3O1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vY2xpZW50L2NvbXBvbmVudHMvQXNzZXRQcmV2aWV3L3ZpZXcuanN4IiwiaW1wb3J0IHsgY29ubmVjdCB9IGZyb20gJ3JlYWN0LXJlZHV4JztcbmltcG9ydCBWaWV3IGZyb20gJy4vdmlldyc7XG5cbmNvbnN0IG1hcFN0YXRlVG9Qcm9wcyA9ICh7IHNpdGU6IHsgaG9zdCwgdGl0bGUgfSB9KSA9PiB7XG4gIHJldHVybiB7XG4gICAgaG9zdCxcbiAgICB0aXRsZSxcbiAgfTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IGNvbm5lY3QobWFwU3RhdGVUb1Byb3BzLCBudWxsKShWaWV3KTtcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL2NsaWVudC9jb250YWluZXJzL0ZvdXJPaEZvdXJQYWdlL2luZ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UJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zZXJ2ZXIvaGVscGVycy9jb25maWd1cmVTbGFjay5qcyIsIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcIndpbnN0b24tc2xhY2std2ViaG9va1wiKTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyBleHRlcm5hbCBcIndpbnN0b24tc2xhY2std2ViaG9va1wiXG4vLyBtb2R1bGUgaWQgPSAxMzdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/index.js.map b/index.js.map deleted file mode 100644 index cf03e927..00000000 --- a/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///index.js","webpack:///webpack/bootstrap f46abd84bf13c041d58d","webpack:///external \"react\"","webpack:///external \"winston\"","webpack:///external \"react-redux\"","webpack:///./config/siteConfig.js","webpack:///external \"react-router-dom\"","webpack:///./server/models/index.js","webpack:///./client/utils/request.js","webpack:///./client/actions/show.js","webpack:///./client/containers/NavBar/index.js","webpack:///./client/constants/show_action_types.js","webpack:///./client/components/SEO/index.js","webpack:///./client/selectors/show.js","webpack:///external \"react-helmet\"","webpack:///external \"redux-saga/effects\"","webpack:///./server/helpers/lbryApi.js","webpack:///./server/helpers/googleAnalytics.js","webpack:///external \"redux\"","webpack:///./client/utils/dynamicImport.js","webpack:///./client/utils/canonicalLink.js","webpack:///./client/utils/lbryUri.js","webpack:///./client/utils/metaTags.js","webpack:///./client/utils/pageTitle.js","webpack:///./client/actions/channel.js","webpack:///./client/actions/publish.js","webpack:///external \"prop-types\"","webpack:///./client/pages/ErrorPage/index.jsx","webpack:///external \"passport\"","webpack:///./config/mysqlConfig.js","webpack:///./config/slackConfig.js","webpack:///external \"passport-local\"","webpack:///external \"sequelize\"","webpack:///./server/helpers/sequelizeHelpers.js","webpack:///./server/helpers/publishHelpers.js","webpack:///./server/helpers/errorHandlers.js","webpack:///./server/controllers/serveController.js","webpack:///./server/helpers/handlePageRender.jsx","webpack:///external \"react-dom/server\"","webpack:///./client/reducers/index.js","webpack:///./client/constants/publish_action_types.js","webpack:///./client/constants/channel_action_types.js","webpack:///./client/constants/asset_display_states.js","webpack:///./client/components/GAListener/index.jsx","webpack:///./client/app.js","webpack:///./client/utils/file.js","webpack:///./client/utils/publish.js","webpack:///./client/utils/validate.js","webpack:///./client/components/ProgressBar/index.jsx","webpack:///./client/constants/show_request_types.js","webpack:///./client/containers/AssetDisplay/index.js","webpack:///./server/helpers/renderFullPage.js","webpack:///./client/selectors/site.js","webpack:///external \"babel-polyfill\"","webpack:///external \"whatwg-fetch\"","webpack:///./server/server.js","webpack:///external \"express\"","webpack:///external \"body-parser\"","webpack:///external \"express-handlebars\"","webpack:///external \"handlebars\"","webpack:///external \"helmet\"","webpack:///./server/helpers/authHelpers.js","webpack:///external \"cookie-session\"","webpack:///external \"http\"","webpack:///./server/passport/local-signup.js","webpack:///external \"axios\"","webpack:///./config/lbryConfig.js","webpack:///external \"universal-analytics\"","webpack:///./server/models/certificate.js","webpack:///./server/models/channel.js","webpack:///./server/models/claim.js","webpack:///./server/models/file.js","webpack:///./server/models/request.js","webpack:///./server/models/user.js","webpack:///external \"bcrypt\"","webpack:///./server/passport/local-login.js","webpack:///./server/routes/auth-routes.js","webpack:///./server/routes/api-routes.js","webpack:///external \"connect-multiparty\"","webpack:///./server/controllers/publishController.js","webpack:///external \"fs\"","webpack:///./server/auth/authentication.js","webpack:///./server/helpers/channelPagination.js","webpack:///./server/routes/page-routes.js","webpack:///./client/reducers/publish.js","webpack:///./client/constants/publish_channel_select_states.js","webpack:///./client/reducers/channel.js","webpack:///./client/reducers/show.js","webpack:///./client/reducers/site.js","webpack:///external \"react-ga\"","webpack:///./client/utils ^.*$","webpack:///external \"cross-fetch/polyfill\"","webpack:///./client/pages/AboutPage/index.jsx","webpack:///./client/containers/NavBar/view.jsx","webpack:///./client/components/Logo/index.jsx","webpack:///./client/components/NavBarChannelOptionsDropdown/index.jsx","webpack:///./client/components/SEO/view.jsx","webpack:///./client/pages/LoginPage/index.js","webpack:///./client/pages/LoginPage/view.jsx","webpack:///./client/containers/ChannelLoginForm/index.js","webpack:///./client/containers/ChannelLoginForm/view.jsx","webpack:///./client/containers/ChannelCreateForm/index.js","webpack:///./client/containers/ChannelCreateForm/view.jsx","webpack:///./client/components/ActiveStatusBar/index.jsx","webpack:///./client/components/InactiveStatusBar/index.jsx","webpack:///./client/pages/ShowPage/index.js","webpack:///./client/pages/ShowPage/view.jsx","webpack:///./client/containers/ShowAssetLite/index.js","webpack:///./client/containers/ShowAssetLite/view.jsx","webpack:///./client/containers/AssetDisplay/view.jsx","webpack:///./client/containers/ShowAssetDetails/index.js","webpack:///./client/containers/ShowAssetDetails/view.jsx","webpack:///./client/containers/AssetTitle/index.js","webpack:///./client/containers/AssetTitle/view.jsx","webpack:///./client/containers/AssetInfo/index.js","webpack:///./client/containers/AssetInfo/view.jsx","webpack:///./client/containers/ShowChannel/index.js","webpack:///./client/containers/ShowChannel/view.jsx","webpack:///./client/containers/ChannelClaimsDisplay/index.js","webpack:///./client/containers/ChannelClaimsDisplay/view.jsx","webpack:///./client/components/AssetPreview/index.js","webpack:///./client/components/AssetPreview/view.jsx","webpack:///./client/containers/FourOhFourPage/index.jsx","webpack:///./client/containers/FourOhFourPage/view.jsx","webpack:///./server/routes/asset-routes.js","webpack:///./server/helpers/serveHelpers.js","webpack:///./server/helpers/lbryUri.js","webpack:///./server/helpers/handleShowRender.jsx","webpack:///external \"redux-saga\"","webpack:///./client/sagas/show_uri.js","webpack:///./client/sagas/show_asset.js","webpack:///./client/api/assetApi.js","webpack:///./client/sagas/show_channel.js","webpack:///./client/api/channelApi.js","webpack:///./server/routes/fallback-routes.js","webpack:///./server/helpers/configureLogger.js","webpack:///./config/loggerConfig.js","webpack:///./server/helpers/configureSlack.js","webpack:///external \"winston-slack-webhook\""],"names":["module","exports","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","require","SiteConfig","_this","this","analytics","googleId","assetDefaults","description","thumbnail","title","auth","sessionKey","customComponents","components","containers","pages","details","host","port","twitter","publishing","additionalClaimAddresses","disabled","disabledMessage","primaryClaimAddress","thumbnailChannel","thumbnailChannelId","uploadDirectory","configure","config","console","log","Sequelize","logger","_require","database","username","password","db","sequelize","dialect","dialectOptions","decimalNumbers","logging","pool","max","min","idle","acquire","authenticate","then","info","catch","err","error","Certificate","Channel","Claim","File","Request","User","import","keys","forEach","modelName","associate","upsert","Model","values","condition","tableName","findOne","where","obj","debug","update","create","parseJSON","response","status","json","checkStatus","jsonResponse","Error","message","request","url","options","fetch","Promise","all","_ref","_ref2","_slicedToArray","value","sliceIterator","arr","_arr","_n","_d","_e","undefined","_s","_i","Symbol","iterator","next","done","push","length","Array","isArray","TypeError","default","onHandleShowPageUri","params","type","actions","HANDLE_SHOW_URI","data","onRequestError","REQUEST_ERROR","onNewChannelRequest","channelName","channelId","requestType","requestId","CHANNEL_REQUEST_NEW","onNewAssetRequest","id","extension","ASSET_REQUEST_NEW","modifier","channel","onRequestUpdate","REQUEST_UPDATE","addRequestToRequestList","key","REQUEST_LIST_ADD","addAssetToAssetList","claimId","shortId","claimData","ASSET_ADD","addNewChannelToChannelList","longId","claimsData","CHANNEL_ADD","onUpdateChannelClaims","channelKey","page","CHANNEL_CLAIMS_UPDATE_ASYNC","updateChannelClaims","channelListId","CHANNEL_CLAIMS_UPDATE_SUCCESS","fileRequested","FILE_REQUESTED","updateFileAvailability","FILE_AVAILABILITY_UPDATE","updateDisplayAssetError","DISPLAY_ASSET_ERROR","_show_action_types","newObj","_show_request_types","_reactRedux","_channel","_publish","_view","_view2","mapStateToProps","site","loggedInChannel","channelShortId","channelLongId","siteDescription","mapDispatchToProps","dispatch","onChannelLogin","updateLoggedInChannel","updateSelectedChannel","onChannelLogout","connect","defaultDescription","defaultThumbnail","siteHost","siteTitle","siteTwitter","selectAsset","show","requestList","assetKey","assetList","selectShowState","state","axios","_require$api","api","apiHost","apiPort","lbryApiUri","_require2","chooseGaLbrynetPublishLabel","sendGATimingEvent","handleLbrynetResponse","resolve","reject","result","JSON","stringify","publishClaim","publishParams","gaStartTime","Date","now","post","method","getClaim","uri","timeout","getClaimList","claimName","resolveUri","getDownloadDirectory","_ref3","download_directory","createChannel","channel_name","amount","createServeEventParams","headers","ip","originalUrl","eventCategory","eventAction","eventLabel","ipOverride","userAgentOverride","createPublishTimingEventParams","category","variable","label","startTime","endTime","userTimingCategory","userTimingVariableName","userTimingTime","userTimingLabel","sendGoogleAnalyticsEvent","visitorId","replace","ua","strictCidFormat","https","event","sendGoogleAnalyticsTiming","timing","sendGAServeEvent","channel_id","getDeepestChildValue","parent","childrenKeys","childKey","shift","child","_typeof","constructor","componentsConfig","dynamicImport","filePath","folders","split","filter","folderName","customComponent","createBasicCanonicalLink","createAssetCanonicalLink","asset","certificateId","_asset$claimData","createChannelCanonicalLink","createCanonicalLink","REGEXP_INVALID_CLAIM","REGEXP_INVALID_CHANNEL","REGEXP_ADDRESS","CHANNEL_CHAR","parseIdentifier","identifier","componentsRegex","RegExp","_componentsRegex$exec","exec","map","match","_componentsRegex$exec2","modifierSeperator","isChannel","startsWith","nameBadChars","join","channelClaimId","parseClaim","_componentsRegex$exec3","_componentsRegex$exec4","extensionSeperator","determineOgThumbnailContentType","substring","lastIndexOf","createBasicMetaTags","content","createChannelMetaTags","createAssetMetaTags","contentType","embedUrl","showUrl","source","fileExt","ogTitle","ogDescription","ogThumbnailContentType","ogThumbnail","metaTags","createMetaTags","createPageTitle","pageTitle","CHANNEL_UPDATE","_channel_action_types","selectFile","file","FILE_SELECTED","clearFile","FILE_CLEAR","updateMetadata","METADATA_UPDATE","updateClaim","CLAIM_UPDATE","setPublishInChannel","SET_PUBLISH_IN_CHANNEL","updatePublishStatus","PUBLISH_STATUS_UPDATE","updateError","ERROR_UPDATE","SELECTED_CHANNEL_UPDATE","toggleMetadataInputs","showMetadataInputs","TOGGLE_METADATA_INPUTS","onNewThumbnail","THUMBNAIL_NEW","startPublish","history","PUBLISH_START","_publish_action_types","_interopRequireDefault","_classCallCheck","instance","Constructor","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","writable","setPrototypeOf","__proto__","_createClass","defineProperties","target","props","descriptor","protoProps","staticProps","_react","_react2","_propTypes","_propTypes2","_NavBar","_NavBar2","ErrorPage","_React$Component","getPrototypeOf","apply","arguments","createElement","className","Component","propTypes","string","isRequired","MysqlConfig","SlackConfig","slackWebHook","slackErrorChannel","slackInfoChannel","returnShortId","claimsArray","claimIndex","shortIdLength","findIndex","element","possibleMatches","slice","fs","parsePublishApiRequestBody","nsfw","license","parsePublishApiRequestFiles","path","size","test","validateFileTypeAndSize","fileName","fileType","thumbnailFileName","thumbnailFilePath","thumbnailFileType","createBasicPublishParams","trim","file_path","bid","metadata","author","language","claim_address","createThumbnailPublishParams","deleteTemporaryFile","unlink","addGetResultsToFileData","fileInfo","getResult","file_name","download_path","createFileData","outpoint","height","address","handleErrorResponse","res","useObjectPropertiesIfNoKeys","_module$exports$retur","returnErrorMessageAndStatus","_module$exports$retur2","createErrorResponsePayload","code","newErrorObject","getOwnPropertyNames","success","returnPaginatedChannelClaims","getClaimId","getClaimIdByChannel","getClaimIdByClaim","getLongClaimId","longClaimId","getLongChannelId","longChannelId","getClaimIdByLongChannelId","getChannelData","longChannelClaimId","getShortChannelIdFromLongChannelId","_ref4","shortChannelClaimId","getChannelClaims","getAllChannelClaims","_ref5","_ref6","channelClaimsArray","paginatedChannelViewData","getLocalFileRecord","dataValues","_server","_redux","_index","_index2","_reactRouterDom","_index3","_index4","_app","_app2","_renderFullPage","_renderFullPage2","_reactHelmet","_reactHelmet2","req","context","store","createStore","html","renderToString","Provider","StaticRouter","location","helmet","renderStatic","redirect","preloadedState","getState","send","_publish2","_channel2","_show","_show2","_site","_site2","combineReducers","publish","LOCAL_CHECK","UNAVAILABLE","ERROR","AVAILABLE","_reactGa","_reactGa2","initialize","GAListener","sendPageView","listen","set","pathname","pageview","children","withRouter","_dynamicImport","_AboutPage","_AboutPage2","_LoginPage","_LoginPage2","_ShowPage","_ShowPage2","_FourOhFourPage","_FourOhFourPage2","HomePage","App","Switch","Route","exact","component","validateFile","createPublishMetadata","claim","publishInChannel","selectedChannel","createPublishFormData","fd","FormData","append","createThumbnailUrl","validateChannelSelection","validatePublishParams","urlError","_ActiveStatusBar","_ActiveStatusBar2","_InactiveStatusBar","_InactiveStatusBar2","ProgressBar","bars","index","incrementer","createBars","bind","startProgressBar","updateProgressBar","stopProgressBar","isActive","setState","updateInterval","setInterval","clearInterval","bar","number","CHANNEL","ASSET_LITE","ASSET_DETAILS","displayAsset","onFileRequest","toString","meta","link","selectSiteState","selectSiteHost","SpeechServer","configureMysql","mysqlConfig","configureSite","siteConfig","PORT","configureSlack","slackConfig","createApp","app","express","enable","use","static","__dirname","bodyParser","urlencoded","extended","verbose","passport","serializeUser","serializeSpeechUser","deserializeUser","deserializeSpeechUser","localSignupStrategy","localLoginStrategy","cookieSession","maxAge","session","hbs","expressHandlebars","defaultLayout","handlebars","Handlebars","engine","server","http","Server","start","sync","user","PassportLocalStrategy","Strategy","lbryApi","usernameField","passwordField","userInfo","tx","userData","userName","channelData","claim_id","certificateData","newUser","newChannel","newCertificate","setChannel","setUser","shortChannelId","lbryConfig","STRING","BOOLEAN","INTEGER","TEXT","DECIMAL","define","claimSequence","decodedClaim","depth","effectiveAmount","hasSignature","hex","nout","txid","validAtHeight","valueVersion","claimType","certificateVersion","keyType","publicKey","freezeTableName","belongsTo","foreignKey","allowNull","findAll","order","getLongChannelIdFromShortChannelId","_this2","$like","getLongChannelIdFromChannelName","_this3","validateLongChannelId","_this4","hasOne","determineFileExtensionFromContentType","determineThumbnail","storedThumbnail","prepareClaimData","licenseUrl","preview","metadataVersion","sourceType","sourceVersion","streamVersion","getShortClaimIdFromLongClaimId","raw","getLongClaimIdFromShortClaimId","getTopFreeClaimIdByClaimName","_this5","validateLongClaimId","_this6","resolveClaim","_this7","claimArray","defaultValue","trendingEligible","hasMany","getRecentClaims","limit","action","ipAddress","bcrypt","comparePassword","compare","changePassword","newPassword","genSalt","saltError","salt","hash","hashError","hook","returnUserAndChannelInfo","userInstance","getChannel","isMatch","logIn","logout","multipart","multipartMiddleware","uploadDir","claimNameIsAvailable","checkChannelAvailability","_require3","_require4","errorHandlers","_require5","_require6","authenticateUser","_require7","availableName","body","claimsList","resolveResult","fileData","_ref7","_ref8","_ref9","_ref10","_ref10$","completed","_ref11","_ref12","resolvedUri","_ref13","files","channelPassword","_parsePublishApiReque","_parsePublishApiReque2","_ref14","_ref15","_ref15$","thumbnailPublishParams","lbryTx","_ref16","_ref17","_ref18","claimInfo","_ref19","_defineProperty","publishHelpers","_require$publishing","Op","publishResults","fileRecord","claimRecord","upsertCriteria","setClaim","setFile","claimAddresses","attributes","or","authenticateChannelCredentials","userPassword","channelFindParams","claims","totalPages","determineTotalPages","paginationPage","getPageFromQuery","extractPageFromClaims","previousPage","determinePreviousPage","currentPage","nextPage","determineNextPage","totalResults","determineTotalClaims","parseInt","pageNumber","claimStartIndex","claimEndIndex","totalClaims","fullPages","Math","floor","handlePageRender","render","layout","initialState","assign","_publish_channel_select_states","publishSubmit","LOGIN","CREATE","channelList","_asset_display_states","googleAnalyticsId","_siteConfig$assetDefa","_siteConfig$details","webpackContext","webpackContextResolve","./canonicalLink","./canonicalLink.js","./dynamicImport","./dynamicImport.js","./file","./file.js","./lbryUri","./lbryUri.js","./metaTags","./metaTags.js","./pageTitle","./pageTitle.js","./publish","./publish.js","./request","./request.js","./validate","./validate.js","_SEO","_SEO2","AboutPage","pageUri","href","_Logo","_Logo2","_NavBarChannelOptionsDropdown","_NavBarChannelOptionsDropdown2","_request","_request2","NavBar","checkForLoggedInUser","logoutUser","handleSelection","credentials","selectedOptions","NavLink","activeClassName","to","defaultSelection","VIEW","LOGOUT","Logo","version","x","y","viewBox","enableBackground","Link","transform","fontSize","fontFamily","fill","stroke","strokeWidth","strokeLinecap","NavBarChannelDropdown","onChange","_pageTitle","_metaTags","_canonicalLink","SEO","_props","_props2","canonicalLink","rel","loggedInChannelName","_ChannelLoginForm","_ChannelLoginForm2","_ChannelCreateForm","_ChannelCreateForm2","LoginPage","newProps","ChannelLoginForm","handleInput","loginToChannel","preventDefault","Headers","Content-Type","htmlFor","placeholder","onClick","_ProgressBar","_ProgressBar2","ChannelCreateForm","handleChannelInput","input","cleanseChannelInput","updateIsChannelAvailable","channelWithAtSymbol","checkIsPasswordProvided","checkIsChannelAvailable","makePublishChannelRequest","ActiveStatusBar","InactiveStatusBar","_ErrorPage","_ErrorPage2","_ShowAssetLite","_ShowAssetLite2","_ShowAssetDetails","_ShowAssetDetails2","_ShowChannel","_ShowChannel2","ShowPage","nextProps","_AssetDisplay","_AssetDisplay2","ShowLite","AssetDisplay","_props$asset$claimDat","_props$asset$claimDat2","src","alt","controls","poster","_AssetTitle","_AssetTitle2","_AssetInfo","_AssetInfo2","ShowAssetDetails","AssetTitle","AssetInfo","copyToClipboard","elementToCopy","dataset","elementtocopy","document","getElementById","select","execCommand","_props$asset","hidden","readOnly","spellCheck","data-elementtocopy","download","previousRequest","_ChannelClaimsDisplay","_ChannelClaimsDisplay2","ShowChannel","_AssetPreview","_AssetPreview2","ChannelClaimsDisplay","showNextResultsPage","showPreviousResultsPage","showNewPage","_props$channel","_props$channel$claims","defaults","AssetPreview","_ref$claimData","directSourceLink","showUrlLink","_ref$site","FourOhForPage","determineResponseType","flipClaimNameAndIdForBackwardsCompatibility","logRequestData","getClaimIdAndServeAsset","lbryUri","handleShowRender","hasFileExtension","parseModifier","responseType","_lbryUri$parseIdentif","_flipClaimNameAndIdFo","_flipClaimNameAndIdFo2","clientAcceptsHtml","accept","requestIsFromBrowser","clientWantsAsset","range","imageIsWanted","videoIsWanted","isValidClaimId","isValidShortId","isValidShortIdOrClaimId","serveAssetToClient","NO_FILE","sendFileOptions","X-Content-Type-Options","sendFile","fullClaimId","tempName","proto","_componentsRegex$exec5","_componentsRegex$exec6","_reduxSaga","_reduxSaga2","_effects","_show_uri","returnSagaWithParams","saga","regeneratorRuntime","mark","_callee","wrap","_context","prev","stop","sagaMiddleware","middleware","applyMiddleware","run","parseAndUpdateIdentifierAndClaim","_lbryUri$parseClaim","_lbryUri2","t0","put","abrupt","sent","_show_asset","newAssetRequest","_marked","parseAndUpdateClaimOnly","_lbryUri$parseIdentif2","_lbryUri$parseClaim2","_context2","_show_channel","newChannelRequest","t1","_marked2","handleShowPageUri","_action$data","_context3","_marked3","watchHandleShowPageUri","_context4","takeLatest","_marked4","_lbryUri","_assetApi","getShortId","getClaimData","t2","watchNewAssetRequest","_ref$data","_channelApi","watchNewChannelRequest","getNewClaimsAndUpdateChannel","_action$data2","watchUpdateChannelClaims","logLevel","winston","transports","Console","level","timestamp","colorize","prettyPrint","handleExceptions","humanReadableUnhandledException","warn","silly","loggerConfig","winstonSlackWebHook","SlackWebHook","add","webhookUrl","iconEmoji"],"mappings":"AAAAA,OAAOC,QACE,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAH,OAGA,IAAAD,GAAAK,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAN,WAUA,OANAC,GAAAE,GAAAI,KAAAR,EAAAC,QAAAD,IAAAC,QAAAE,GAGAH,EAAAO,GAAA,EAGAP,EAAAC,QAvBA,GAAAI,KA4DA,OAhCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,SAAAV,EAAAW,EAAAC,GACAV,EAAAW,EAAAb,EAAAW,IACAG,OAAAC,eAAAf,EAAAW,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAApB,GACA,GAAAa,GAAAb,KAAAqB,WACA,WAA2B,MAAArB,GAAA,SAC3B,WAAiC,MA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,EAAQj9B,MAAM,WACdi9B,EAAQU,MAAM,avI0nRV,SAAUjkC,EAAQC,EAASE,GAEjC,YwIlpRA,IAAM+jC,IACJZ,SAAU,QAGZtjC,GAAOC,QAAUikC,GxIypRX,SAAUlkC,EAAQC,EAASE,GAEjC,YyI/pRA,IAAMgkC,GAAsBhkC,EAAQ,KAAyBikC,aACvDhe,EAAcjmB,EAAQ,GAE5BH,GAAOC,QAAU,SAACsjC,GAAY,GACrBrpB,GAAqDkM,EAArDlM,aAAcC,EAAuCiM,EAAvCjM,kBAAmBC,EAAoBgM,EAApBhM,gBACpCF,IAEEC,GACFopB,EAAQc,IAAIF,GACVvjC,KAAY,yBACZ8iC,MAAY,OACZY,WAAYpqB,EACZjQ,QAAYkQ,EACZnW,SAAY,UACZugC,UAAY,6BAGZnqB,GACFmpB,EAAQc,IAAIF,GACVvjC,KAAY,uBACZ8iC,MAAY,OACZY,WAAYpqB,EACZjQ,QAAYmQ,EACZpW,SAAY,UACZugC,UAAY,gBAIhBhB,EAAQr+B,MAAM,oCACdq+B,EAAQx+B,KAAK,oCAEbw+B,EAAQS,KAAK,+EzI2qRX,SAAUhkC,EAAQC,G0I1sRxBD,EAAAC,QAAA2B,QAAA","file":"index.js","sourcesContent":["module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 51);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react\");\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston\");\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-redux\");\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction SiteConfig() {\n var _this = this;\n\n this.analytics = {\n googleId: 'default'\n };\n this.assetDefaults = {\n description: 'An asset published on Spee.ch',\n thumbnail: 'https://spee.ch/assets/img/video_thumb_default.png',\n title: 'Spee.ch'\n };\n this.auth = {\n sessionKey: 'default'\n };\n this.customComponents = {\n components: {},\n containers: {},\n pages: {}\n };\n this.details = {\n description: 'Open-source, decentralized image and video sharing.',\n host: 'default',\n port: 3000,\n title: 'Spee.ch',\n twitter: '@spee_ch'\n };\n this.publishing = {\n additionalClaimAddresses: [],\n disabled: false,\n disabledMessage: 'Please check back soon.',\n primaryClaimAddress: 'default',\n thumbnailChannel: 'default',\n thumbnailChannelId: 'default',\n uploadDirectory: '/home/lbry/Uploads'\n };\n this.configure = function (config) {\n if (!config) {\n return console.log('No site config received.');\n }\n var analytics = config.analytics,\n assetDefaults = config.assetDefaults,\n auth = config.auth,\n customComponents = config.customComponents,\n details = config.details,\n publishing = config.publishing;\n\n _this.analytics = analytics;\n _this.assetDefaults = assetDefaults;\n _this.auth = auth;\n _this.details = details;\n _this.publishing = publishing;\n _this.customComponents = customComponents;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-router-dom\");\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Sequelize = __webpack_require__(30);\nvar logger = __webpack_require__(1);\n\nconsole.log('exporting sequelize models');\n\nvar _require = __webpack_require__(27),\n database = _require.database,\n username = _require.username,\n password = _require.password;\n\nvar db = {};\n// set sequelize options\nvar sequelize = new Sequelize(database, username, password, {\n host: 'localhost',\n dialect: 'mysql',\n dialectOptions: { decimalNumbers: true }, // fix to ensure DECIMAL will not be stored as a string\n logging: false,\n pool: {\n max: 5,\n min: 0,\n idle: 10000,\n acquire: 10000\n }\n});\n\n// establish mysql connection\nsequelize.authenticate().then(function () {\n logger.info('Sequelize has established mysql connection successfully.');\n}).catch(function (err) {\n logger.error('Sequelize was unable to connect to the database:', err);\n});\n\n// manually add each model to the db object\nvar Certificate = __webpack_require__(67);\nvar Channel = __webpack_require__(68);\nvar Claim = __webpack_require__(69);\nvar File = __webpack_require__(70);\nvar Request = __webpack_require__(71);\nvar User = __webpack_require__(72);\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(function (modelName) {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = function (Model, values, condition, tableName) {\n return Model.findOne({\n where: condition\n }).then(function (obj) {\n if (obj) {\n // update\n logger.debug('updating record in db.' + tableName);\n return obj.update(values);\n } else {\n // insert\n logger.debug('creating record in db.' + tableName);\n return Model.create(values);\n }\n }).catch(function (error) {\n logger.error(tableName + '.upsert error', error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.default = request;\n\n__webpack_require__(90);\n\n/**\n * Parses the JSON returned by a network request\n *\n * @param {object} response A response from a network request\n *\n * @return {object} The parsed JSON from the request\n */\nfunction parseJSON(response) {\n if (response.status === 204 || response.status === 205) {\n return null;\n }\n return response.json();\n}\n\n/**\n * Parses the status returned by a network request\n *\n * @param {object} response A response from a network request\n * @param {object} response The parsed JSON from the network request\n *\n * @return {object | undefined} Returns object with status and statusText, or undefined\n */\nfunction checkStatus(response, jsonResponse) {\n if (response.status >= 200 && response.status < 300) {\n return jsonResponse;\n }\n var error = new Error(jsonResponse.message);\n error.response = response;\n throw error;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @param {string} url The URL we want to request\n * @param {object} [options] The options we want to pass to \"fetch\"\n *\n * @return {object} The response data\n */\n\nfunction request(url, options) {\n return fetch(url, options).then(function (response) {\n return Promise.all([response, parseJSON(response)]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n response = _ref2[0],\n jsonResponse = _ref2[1];\n\n return checkStatus(response, jsonResponse);\n });\n}\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.onHandleShowPageUri = onHandleShowPageUri;\nexports.onRequestError = onRequestError;\nexports.onNewChannelRequest = onNewChannelRequest;\nexports.onNewAssetRequest = onNewAssetRequest;\nexports.onRequestUpdate = onRequestUpdate;\nexports.addRequestToRequestList = addRequestToRequestList;\nexports.addAssetToAssetList = addAssetToAssetList;\nexports.addNewChannelToChannelList = addNewChannelToChannelList;\nexports.onUpdateChannelClaims = onUpdateChannelClaims;\nexports.updateChannelClaims = updateChannelClaims;\nexports.fileRequested = fileRequested;\nexports.updateFileAvailability = updateFileAvailability;\nexports.updateDisplayAssetError = updateDisplayAssetError;\n\nvar _show_action_types = __webpack_require__(9);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show_request_types = __webpack_require__(47);\n\nfunction _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; } }\n\n// basic request parsing\nfunction onHandleShowPageUri(params) {\n return {\n type: actions.HANDLE_SHOW_URI,\n data: params\n };\n};\n\nfunction onRequestError(error) {\n return {\n type: actions.REQUEST_ERROR,\n data: error\n };\n};\n\nfunction onNewChannelRequest(channelName, channelId) {\n var requestType = _show_request_types.CHANNEL;\n var requestId = 'cr#' + channelName + '#' + channelId;\n return {\n type: actions.CHANNEL_REQUEST_NEW,\n data: { requestType: requestType, requestId: requestId, channelName: channelName, channelId: channelId }\n };\n};\n\nfunction onNewAssetRequest(name, id, channelName, channelId, extension) {\n var requestType = extension ? _show_request_types.ASSET_LITE : _show_request_types.ASSET_DETAILS;\n var requestId = 'ar#' + name + '#' + id + '#' + channelName + '#' + channelId;\n return {\n type: actions.ASSET_REQUEST_NEW,\n data: {\n requestType: requestType,\n requestId: requestId,\n name: name,\n modifier: {\n id: id,\n channel: {\n name: channelName,\n id: channelId\n }\n }\n }\n };\n};\n\nfunction onRequestUpdate(requestType, requestId) {\n return {\n type: actions.REQUEST_UPDATE,\n data: {\n requestType: requestType,\n requestId: requestId\n }\n };\n};\n\nfunction addRequestToRequestList(id, error, key) {\n return {\n type: actions.REQUEST_LIST_ADD,\n data: { id: id, error: error, key: key }\n };\n};\n\n// asset actions\n\nfunction addAssetToAssetList(id, error, name, claimId, shortId, claimData) {\n return {\n type: actions.ASSET_ADD,\n data: { id: id, error: error, name: name, claimId: claimId, shortId: shortId, claimData: claimData }\n };\n}\n\n// channel actions\n\nfunction addNewChannelToChannelList(id, name, shortId, longId, claimsData) {\n return {\n type: actions.CHANNEL_ADD,\n data: { id: id, name: name, shortId: shortId, longId: longId, claimsData: claimsData }\n };\n};\n\nfunction onUpdateChannelClaims(channelKey, name, longId, page) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,\n data: { channelKey: channelKey, name: name, longId: longId, page: page }\n };\n};\n\nfunction updateChannelClaims(channelListId, claimsData) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,\n data: { channelListId: channelListId, claimsData: claimsData }\n };\n};\n\n// display a file\n\nfunction fileRequested(name, claimId) {\n return {\n type: actions.FILE_REQUESTED,\n data: { name: name, claimId: claimId }\n };\n};\n\nfunction updateFileAvailability(status) {\n return {\n type: actions.FILE_AVAILABILITY_UPDATE,\n data: status\n };\n};\n\nfunction updateDisplayAssetError(error) {\n return {\n type: actions.DISPLAY_ASSET_ERROR,\n data: error\n };\n};\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _channel = __webpack_require__(22);\n\nvar _publish = __webpack_require__(23);\n\nvar _view = __webpack_require__(92);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel,\n site = _ref.site;\n\n return {\n channelName: channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId: channel.loggedInChannel.longId,\n siteDescription: site.description\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n },\n onChannelLogout: function onChannelLogout() {\n dispatch((0, _channel.updateLoggedInChannel)(null, null, null));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n// request actions\nvar HANDLE_SHOW_URI = exports.HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nvar REQUEST_ERROR = exports.REQUEST_ERROR = 'REQUEST_ERROR';\nvar REQUEST_UPDATE = exports.REQUEST_UPDATE = 'REQUEST_UPDATE';\nvar ASSET_REQUEST_NEW = exports.ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nvar CHANNEL_REQUEST_NEW = exports.CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nvar REQUEST_LIST_ADD = exports.REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nvar ASSET_ADD = exports.ASSET_ADD = 'ASSET_ADD';\n\n// channel actions\nvar CHANNEL_ADD = exports.CHANNEL_ADD = 'CHANNEL_ADD';\n\nvar CHANNEL_CLAIMS_UPDATE_ASYNC = exports.CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nvar CHANNEL_CLAIMS_UPDATE_SUCCESS = exports.CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nvar FILE_REQUESTED = exports.FILE_REQUESTED = 'FILE_REQUESTED';\nvar FILE_AVAILABILITY_UPDATE = exports.FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nvar DISPLAY_ASSET_ERROR = exports.DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(95);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var site = _ref.site;\n var defaultDescription = site.defaultDescription,\n defaultThumbnail = site.defaultThumbnail,\n siteDescription = site.description,\n siteHost = site.host,\n siteTitle = site.title,\n siteTwitter = site.twitter;\n\n return {\n defaultDescription: defaultDescription,\n defaultThumbnail: defaultThumbnail,\n siteDescription: siteDescription,\n siteHost: siteHost,\n siteTitle: siteTitle,\n siteTwitter: siteTwitter\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar selectAsset = exports.selectAsset = function selectAsset(show) {\n var request = show.requestList[show.request.id];\n var assetKey = request.key;\n return show.assetList[assetKey];\n};\n\nvar selectShowState = exports.selectShowState = function selectShowState(state) {\n return state.show;\n};\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-helmet\");\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga/effects\");\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar axios = __webpack_require__(64);\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(65),\n _require$api = _require.api,\n apiHost = _require$api.apiHost,\n apiPort = _require$api.apiPort;\n\nvar lbryApiUri = 'http://' + apiHost + ':' + apiPort;\n\nvar _require2 = __webpack_require__(15),\n chooseGaLbrynetPublishLabel = _require2.chooseGaLbrynetPublishLabel,\n sendGATimingEvent = _require2.sendGATimingEvent;\n\nvar handleLbrynetResponse = function handleLbrynetResponse(_ref, resolve, reject) {\n var data = _ref.data;\n\n logger.debug('lbry api data:', data);\n if (data.result) {\n // check for an error\n if (data.result.error) {\n logger.debug('Lbrynet api error:', data.result.error);\n reject(new Error(data.result.error));\n return;\n };\n resolve(data.result);\n return;\n }\n // fallback in case it just timed out\n reject(JSON.stringify(data));\n};\n\nmodule.exports = {\n publishClaim: function publishClaim(publishParams) {\n logger.debug('lbryApi >> Publishing claim to \"' + publishParams.name + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'publish',\n params: publishParams\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getClaim: function getClaim(uri) {\n logger.debug('lbryApi >> Getting Claim for \"' + uri + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'get',\n params: { uri: uri, timeout: 20 }\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getClaimList: function getClaimList(claimName) {\n logger.debug('lbryApi >> Getting claim_list for \"' + claimName + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'claim_list',\n params: { name: claimName }\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n resolveUri: function resolveUri(uri) {\n logger.debug('lbryApi >> Resolving URI for \"' + uri + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'resolve',\n params: { uri: uri }\n }).then(function (_ref2) {\n var data = _ref2.data;\n\n sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now());\n if (data.result[uri].error) {\n // check for errors\n reject(data.result[uri].error);\n } else {\n // if no errors, resolve\n resolve(data.result[uri]);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getDownloadDirectory: function getDownloadDirectory() {\n logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'settings_get'\n }).then(function (_ref3) {\n var data = _ref3.data;\n\n sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now());\n if (data.result) {\n resolve(data.result.download_directory);\n } else {\n return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.');\n }\n }).catch(function (error) {\n logger.error('Lbrynet Error:', error);\n resolve('/home/lbry/Downloads/');\n });\n });\n },\n createChannel: function createChannel(name) {\n logger.debug('lbryApi >> Creating channel for ' + name + '...');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'channel_new',\n params: {\n channel_name: name,\n amount: 0.1\n }\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\nvar ua = __webpack_require__(66);\n\nvar _require = __webpack_require__(3),\n googleId = _require.analytics.googleId,\n title = _require.details.title;\n\nfunction createServeEventParams(headers, ip, originalUrl) {\n return {\n eventCategory: 'client requests',\n eventAction: 'serve request',\n eventLabel: originalUrl,\n ipOverride: ip,\n userAgentOverride: headers['user-agent']\n };\n};\n\nfunction createPublishTimingEventParams(category, variable, label, startTime, endTime) {\n var duration = endTime - startTime;\n return {\n userTimingCategory: category,\n userTimingVariableName: variable,\n userTimingTime: duration,\n userTimingLabel: label\n };\n};\n\nfunction sendGoogleAnalyticsEvent(ip, params) {\n var visitorId = ip.replace(/\\./g, '-');\n var visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.event(params, function (err) {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n });\n};\n\nfunction sendGoogleAnalyticsTiming(visitorId, params) {\n var visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.timing(params, function (err) {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n logger.debug('Timing event successfully sent to google analytics');\n });\n};\n\nmodule.exports = {\n sendGAServeEvent: function sendGAServeEvent(headers, ip, originalUrl) {\n var params = createServeEventParams(headers, ip, originalUrl);\n sendGoogleAnalyticsEvent(ip, params);\n },\n sendGATimingEvent: function sendGATimingEvent(category, variable, label, startTime, endTime) {\n var params = createPublishTimingEventParams(category, variable, label, startTime, endTime);\n sendGoogleAnalyticsTiming(title, params);\n },\n chooseGaLbrynetPublishLabel: function chooseGaLbrynetPublishLabel(_ref) {\n var channelName = _ref.channel_name,\n channelId = _ref.channel_id;\n\n return channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM';\n }\n};\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux\");\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _require = __webpack_require__(3),\n componentsConfig = _require.componentsConfig;\n\nfunction getDeepestChildValue(parent, childrenKeys) {\n var childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array\n var child = parent[childKey];\n if (childrenKeys.length >= 1) {\n return getDeepestChildValue(child, childrenKeys);\n }\n return child;\n}\n\nvar dynamicImport = exports.dynamicImport = function dynamicImport(filePath) {\n // validate inputs\n if (!filePath) {\n throw new Error('no file path provided to dynamicImport()');\n }\n if (typeof filePath !== 'string') {\n console.log('dynamicImport > filePath:', filePath);\n console.log('dynamicImport > filePath type:', typeof filePath === 'undefined' ? 'undefined' : _typeof(filePath));\n throw new Error('file path provided to dynamicImport() must be a string');\n }\n // split out the file folders // filter out any empty or white-space-only strings\n var folders = filePath.split('/').filter(function (folderName) {\n return folderName.replace(/\\s/g, '').length;\n });\n // check for the component corresponding to file path in the site config object\n // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]]\n var customComponent = getDeepestChildValue(componentsConfig, folders);\n if (customComponent) {\n return customComponent; // return custom component\n } else {\n return __webpack_require__(89)(\"\" + filePath);\n }\n};\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createBasicCanonicalLink = function createBasicCanonicalLink(page, siteHost) {\n return siteHost + \"/\" + page;\n};\n\nvar createAssetCanonicalLink = function createAssetCanonicalLink(asset, siteHost) {\n var channelName = void 0,\n certificateId = void 0,\n name = void 0,\n claimId = void 0;\n if (asset.claimData) {\n var _asset$claimData = asset.claimData;\n channelName = _asset$claimData.channelName;\n certificateId = _asset$claimData.certificateId;\n name = _asset$claimData.name;\n claimId = _asset$claimData.claimId;\n };\n if (channelName) {\n return siteHost + \"/\" + channelName + \":\" + certificateId + \"/\" + name;\n };\n return siteHost + \"/\" + claimId + \"/\" + name;\n};\n\nvar createChannelCanonicalLink = function createChannelCanonicalLink(channel, siteHost) {\n var name = channel.name,\n longId = channel.longId;\n\n return siteHost + \"/\" + name + \":\" + longId;\n};\n\nvar createCanonicalLink = exports.createCanonicalLink = function createCanonicalLink(asset, channel, page, siteHost) {\n if (asset) {\n return createAssetCanonicalLink(asset, siteHost);\n }\n if (channel) {\n return createChannelCanonicalLink(channel, siteHost);\n }\n return createBasicCanonicalLink(page, siteHost);\n};\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex // eslint-disable-line no-unused-vars\n .exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n // Validate and process name\n\n\n if (!value) {\n throw new Error('Check your URL. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('Check your URL. No channel name after \"@\".');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Check your URL. Invalid characters in channel name: \"' + nameBadChars.join(', ') + '\".');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('Check your URL. No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('Check your URL. The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId || null,\n claimId: claimId || null\n };\n },\n parseClaim: function parseClaim(name) {\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first extension)\n '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex // eslint-disable-line no-unused-vars\n .exec(name).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n extensionSeperator = _componentsRegex$exec4[2],\n extension = _componentsRegex$exec4[3];\n\n // Validate and process name\n\n\n if (!claimName) {\n throw new Error('Check your URL. No claim name provided before \".\"');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Check your URL. Invalid characters in claim name: \"' + nameBadChars.join(', ') + '\".');\n }\n // Validate and process extension\n if (extensionSeperator) {\n if (!extension) {\n throw new Error('Check your URL. No file extension provided after separator \"' + extensionSeperator + '\".');\n }\n if (extensionSeperator !== '.') {\n throw new Error('Check your URL. The \"' + extensionSeperator + '\" separator is not supported in the claim name.');\n }\n }\n return {\n claimName: claimName,\n extension: extension || null\n };\n }\n};\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar determineOgThumbnailContentType = function determineOgThumbnailContentType(thumbnail) {\n if (thumbnail) {\n var fileExt = thumbnail.substring(thumbnail.lastIndexOf('.'));\n switch (fileExt) {\n case 'jpeg':\n case 'jpg':\n return 'image/jpeg';\n case 'png':\n return 'image/png';\n case 'gif':\n return 'image/gif';\n case 'mp4':\n return 'video/mp4';\n default:\n return 'image/jpeg';\n }\n }\n return '';\n};\n\nvar createBasicMetaTags = function createBasicMetaTags(siteHost, siteDescription, siteTitle, siteTwitter) {\n return [{ property: 'og:title', content: siteTitle }, { property: 'og:url', content: siteHost }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: siteDescription }, { property: 'twitter:site', content: siteTwitter }, { property: 'twitter:card', content: 'summary' }];\n};\n\nvar createChannelMetaTags = function createChannelMetaTags(siteTitle, siteHost, siteTwitter, channel) {\n var name = channel.name,\n longId = channel.longId;\n\n return [{ property: 'og:title', content: name + ' on ' + siteTitle }, { property: 'og:url', content: siteHost + '/' + name + ':' + longId }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: name + ', a channel on ' + siteTitle }, { property: 'twitter:site', content: siteTwitter }, { property: 'twitter:card', content: 'summary' }];\n};\n\nvar createAssetMetaTags = function createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) {\n var claimData = asset.claimData;\n var contentType = claimData.contentType;\n\n var embedUrl = siteHost + '/' + claimData.claimId + '/' + claimData.name;\n var showUrl = siteHost + '/' + claimData.claimId + '/' + claimData.name;\n var source = siteHost + '/' + claimData.claimId + '/' + claimData.name + '.' + claimData.fileExt;\n var ogTitle = claimData.title || claimData.name;\n var ogDescription = claimData.description || defaultDescription;\n var ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);\n var ogThumbnail = claimData.thumbnail || defaultThumbnail;\n var metaTags = [{ property: 'og:title', content: ogTitle }, { property: 'og:url', content: showUrl }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: ogDescription }, { property: 'og:image:width', content: 600 }, { property: 'og:image:height', content: 315 }, { property: 'twitter:site', content: siteTwitter }];\n if (contentType === 'video/mp4' || contentType === 'video/webm') {\n metaTags.push({ property: 'og:video', content: source });\n metaTags.push({ property: 'og:video:secure_url', content: source });\n metaTags.push({ property: 'og:video:type', content: contentType });\n metaTags.push({ property: 'og:image', content: ogThumbnail });\n metaTags.push({ property: 'og:image:type', content: ogThumbnailContentType });\n metaTags.push({ property: 'og:type', content: 'video' });\n metaTags.push({ property: 'twitter:card', content: 'player' });\n metaTags.push({ property: 'twitter:player', content: embedUrl });\n metaTags.push({ property: 'twitter:player:width', content: 600 });\n metaTags.push({ property: 'twitter:text:player_width', content: 600 });\n metaTags.push({ property: 'twitter:player:height', content: 337 });\n metaTags.push({ property: 'twitter:player:stream', content: source });\n metaTags.push({ property: 'twitter:player:stream:content_type', content: contentType });\n } else {\n metaTags.push({ property: 'og:image', content: source });\n metaTags.push({ property: 'og:image:type', content: contentType });\n metaTags.push({ property: 'og:type', content: 'article' });\n metaTags.push({ property: 'twitter:card', content: 'summary_large_image' });\n }\n return metaTags;\n};\n\nvar createMetaTags = exports.createMetaTags = function createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) {\n if (asset) {\n return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail);\n };\n if (channel) {\n return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel);\n };\n return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter);\n};\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createPageTitle = exports.createPageTitle = function createPageTitle(siteTitle, pageTitle) {\n if (!pageTitle) {\n return \"\" + siteTitle;\n }\n return siteTitle + \" - \" + pageTitle;\n};\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.updateLoggedInChannel = updateLoggedInChannel;\n\nvar _channel_action_types = __webpack_require__(39);\n\nvar actions = _interopRequireWildcard(_channel_action_types);\n\nfunction _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; } }\n\n// export action creators\n\nfunction updateLoggedInChannel(name, shortId, longId) {\n return {\n type: actions.CHANNEL_UPDATE,\n data: {\n name: name,\n shortId: shortId,\n longId: longId\n }\n };\n};\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.selectFile = selectFile;\nexports.clearFile = clearFile;\nexports.updateMetadata = updateMetadata;\nexports.updateClaim = updateClaim;\nexports.setPublishInChannel = setPublishInChannel;\nexports.updatePublishStatus = updatePublishStatus;\nexports.updateError = updateError;\nexports.updateSelectedChannel = updateSelectedChannel;\nexports.toggleMetadataInputs = toggleMetadataInputs;\nexports.onNewThumbnail = onNewThumbnail;\nexports.startPublish = startPublish;\n\nvar _publish_action_types = __webpack_require__(38);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nfunction _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; } }\n\n// export action creators\nfunction selectFile(file) {\n return {\n type: actions.FILE_SELECTED,\n data: file\n };\n};\n\nfunction clearFile() {\n return {\n type: actions.FILE_CLEAR\n };\n};\n\nfunction updateMetadata(name, value) {\n return {\n type: actions.METADATA_UPDATE,\n data: {\n name: name,\n value: value\n }\n };\n};\n\nfunction updateClaim(value) {\n return {\n type: actions.CLAIM_UPDATE,\n data: value\n };\n};\n\nfunction setPublishInChannel(channel) {\n return {\n type: actions.SET_PUBLISH_IN_CHANNEL,\n channel: channel\n };\n};\n\nfunction updatePublishStatus(status, message) {\n return {\n type: actions.PUBLISH_STATUS_UPDATE,\n data: {\n status: status,\n message: message\n }\n };\n};\n\nfunction updateError(name, value) {\n return {\n type: actions.ERROR_UPDATE,\n data: {\n name: name,\n value: value\n }\n };\n};\n\nfunction updateSelectedChannel(channelName) {\n return {\n type: actions.SELECTED_CHANNEL_UPDATE,\n data: channelName\n };\n};\n\nfunction toggleMetadataInputs(showMetadataInputs) {\n return {\n type: actions.TOGGLE_METADATA_INPUTS,\n data: showMetadataInputs\n };\n};\n\nfunction onNewThumbnail(file) {\n return {\n type: actions.THUMBNAIL_NEW,\n data: file\n };\n};\n\nfunction startPublish(history) {\n return {\n type: actions.PUBLISH_START,\n data: { history: history }\n };\n}\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"prop-types\");\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(24);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ErrorPage = function (_React$Component) {\n _inherits(ErrorPage, _React$Component);\n\n function ErrorPage() {\n _classCallCheck(this, ErrorPage);\n\n return _possibleConstructorReturn(this, (ErrorPage.__proto__ || Object.getPrototypeOf(ErrorPage)).apply(this, arguments));\n }\n\n _createClass(ErrorPage, [{\n key: 'render',\n value: function render() {\n var error = this.props.error;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'p',\n null,\n error\n )\n )\n );\n }\n }]);\n\n return ErrorPage;\n}(_react2.default.Component);\n\n;\n\nErrorPage.propTypes = {\n error: _propTypes2.default.string.isRequired\n};\n\nexports.default = ErrorPage;\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"passport\");\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction MysqlConfig() {\n var _this = this;\n\n this.database = 'default';\n this.username = 'default';\n this.password = 'default';\n this.configure = function (config) {\n if (!config) {\n return console.log('No MySQL config received.');\n }\n var database = config.database,\n username = config.username,\n password = config.password;\n\n _this.database = database;\n _this.username = username;\n _this.password = password;\n };\n};\n\nmodule.exports = new MysqlConfig();\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction SlackConfig() {\n var _this = this;\n\n this.slackWebHook = 'default';\n this.slackErrorChannel = 'default';\n this.slackInfoChannel = 'default';\n this.configure = function (config) {\n if (!config) {\n return console.log('No slack config received.');\n }\n var slackWebHook = config.slackWebHook,\n slackErrorChannel = config.slackErrorChannel,\n slackInfoChannel = config.slackInfoChannel;\n\n _this.slackWebHook = slackWebHook;\n _this.slackErrorChannel = slackErrorChannel;\n _this.slackInfoChannel = slackInfoChannel;\n };\n};\n\nmodule.exports = new SlackConfig();\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"passport-local\");\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"sequelize\");\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n returnShortId: function returnShortId(claimsArray, longId) {\n var claimIndex = void 0;\n var shortId = longId.substring(0, 1); // default short id is the first letter\n var shortIdLength = 0;\n // find the index of this claim id\n claimIndex = claimsArray.findIndex(function (element) {\n return element.claimId === longId;\n });\n if (claimIndex < 0) {\n throw new Error('claim id not found in claims list');\n }\n // get an array of all claims with lower height\n var possibleMatches = claimsArray.slice(0, claimIndex);\n // remove certificates with the same prefixes until none are left.\n while (possibleMatches.length > 0) {\n shortIdLength += 1;\n shortId = longId.substring(0, shortIdLength);\n possibleMatches = possibleMatches.filter(function (element) {\n return element.claimId && element.claimId.substring(0, shortIdLength) === shortId;\n });\n }\n return shortId;\n }\n};\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\nvar fs = __webpack_require__(79);\n\nvar _require = __webpack_require__(3),\n details = _require.details,\n publishing = _require.publishing;\n\nmodule.exports = {\n parsePublishApiRequestBody: function parsePublishApiRequestBody(_ref) {\n var name = _ref.name,\n nsfw = _ref.nsfw,\n license = _ref.license,\n title = _ref.title,\n description = _ref.description,\n thumbnail = _ref.thumbnail;\n\n // validate name\n if (!name) {\n throw new Error('no name field found in request');\n }\n var invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name);\n if (invalidNameCharacters) {\n throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and \"-\"');\n }\n // optional parameters\n nsfw = nsfw === 'true';\n license = license || null;\n title = title || null;\n description = description || null;\n thumbnail = thumbnail || null;\n // return results\n return {\n name: name,\n nsfw: nsfw,\n license: license,\n title: title,\n description: description,\n thumbnail: thumbnail\n };\n },\n parsePublishApiRequestFiles: function parsePublishApiRequestFiles(_ref2) {\n var file = _ref2.file,\n thumbnail = _ref2.thumbnail;\n\n // make sure a file was provided\n if (!file) {\n throw new Error('no file with key of [file] found in request');\n }\n if (!file.path) {\n throw new Error('no file path found');\n }\n if (!file.type) {\n throw new Error('no file type found');\n }\n if (!file.size) {\n throw new Error('no file type found');\n }\n // validate the file name\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate the file\n module.exports.validateFileTypeAndSize(file);\n // return results\n return {\n fileName: file.name,\n filePath: file.path,\n fileType: file.type,\n thumbnailFileName: thumbnail ? thumbnail.name : null,\n thumbnailFilePath: thumbnail ? thumbnail.path : null,\n thumbnailFileType: thumbnail ? thumbnail.type : null\n };\n },\n validateFileTypeAndSize: function validateFileTypeAndSize(file) {\n // check file type and size\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n logger.debug('publish > file validation > .jpeg/.jpg/.png was too big');\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .gif was too big');\n throw new Error('Sorry, .gifs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .mp4 was too big');\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n logger.debug('publish > file validation > unrecognized file type');\n throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n return file;\n },\n createBasicPublishParams: function createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail) {\n logger.debug('Creating Publish Parameters');\n // provide defaults for title\n if (title === null || title.trim() === '') {\n title = name;\n }\n // provide default for description\n if (description === null || description.trim() === '') {\n description = '';\n }\n // provide default for license\n if (license === null || license.trim() === '') {\n license = ' '; // default to empty string\n }\n // create the publish params\n var publishParams = {\n name: name,\n file_path: filePath,\n bid: 0.01,\n metadata: {\n description: description,\n title: title,\n author: details.title,\n language: 'en',\n license: license,\n nsfw: nsfw\n },\n claim_address: publishing.primaryClaimAddress\n };\n // add thumbnail to channel if video\n if (thumbnail) {\n publishParams['metadata']['thumbnail'] = thumbnail;\n }\n return publishParams;\n },\n createThumbnailPublishParams: function createThumbnailPublishParams(thumbnailFilePath, claimName, license, nsfw) {\n if (!thumbnailFilePath) {\n return;\n }\n logger.debug('Creating Thumbnail Publish Parameters');\n // create the publish params\n return {\n name: claimName + '-thumb',\n file_path: thumbnailFilePath,\n bid: 0.01,\n metadata: {\n title: claimName + ' thumbnail',\n description: 'a thumbnail for ' + claimName,\n author: details.title,\n language: 'en',\n license: license,\n nsfw: nsfw\n },\n claim_address: publishing.primaryClaimAddress,\n channel_name: publishing.thumbnailChannel,\n channel_id: publishing.thumbnailChannelId\n };\n },\n deleteTemporaryFile: function deleteTemporaryFile(filePath) {\n fs.unlink(filePath, function (err) {\n if (err) {\n logger.error('error deleting temporary file ' + filePath);\n throw err;\n }\n logger.debug('successfully deleted ' + filePath);\n });\n },\n addGetResultsToFileData: function addGetResultsToFileData(fileInfo, getResult) {\n fileInfo.fileName = getResult.file_name;\n fileInfo.filePath = getResult.download_path;\n return fileInfo;\n },\n createFileData: function createFileData(_ref3) {\n var name = _ref3.name,\n claimId = _ref3.claimId,\n outpoint = _ref3.outpoint,\n height = _ref3.height,\n address = _ref3.address,\n nsfw = _ref3.nsfw,\n contentType = _ref3.contentType;\n\n return {\n name: name,\n claimId: claimId,\n outpoint: outpoint,\n height: height,\n address: address,\n fileName: '',\n filePath: '',\n fileType: contentType,\n nsfw: nsfw\n };\n }\n};\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n handleErrorResponse: function handleErrorResponse(originalUrl, ip, error, res) {\n logger.error('Error on ' + originalUrl, module.exports.useObjectPropertiesIfNoKeys(error));\n\n var _module$exports$retur = module.exports.returnErrorMessageAndStatus(error),\n _module$exports$retur2 = _slicedToArray(_module$exports$retur, 2),\n status = _module$exports$retur2[0],\n message = _module$exports$retur2[1];\n\n res.status(status).json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function returnErrorMessageAndStatus(error) {\n var status = void 0,\n message = void 0;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function useObjectPropertiesIfNoKeys(err) {\n if (Object.keys(err).length === 0) {\n var newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach(function (key) {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload: function createErrorResponsePayload(status, message) {\n return {\n status: status,\n success: false,\n message: message\n };\n }\n};\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar db = __webpack_require__(5);\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(81),\n returnPaginatedChannelClaims = _require.returnPaginatedChannelClaims;\n\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\nvar NO_FILE = 'NO_FILE';\n\nmodule.exports = {\n getClaimId: function getClaimId(channelName, channelClaimId, name, claimId) {\n if (channelName) {\n return module.exports.getClaimIdByChannel(channelName, channelClaimId, name);\n } else {\n return module.exports.getClaimIdByClaim(name, claimId);\n }\n },\n getClaimIdByClaim: function getClaimIdByClaim(claimName, claimId) {\n logger.debug('getClaimIdByClaim(' + claimName + ', ' + claimId + ')');\n return new Promise(function (resolve, reject) {\n db.Claim.getLongClaimId(claimName, claimId).then(function (longClaimId) {\n if (!longClaimId) {\n resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getClaimIdByChannel: function getClaimIdByChannel(channelName, channelClaimId, claimName) {\n logger.debug('getClaimIdByChannel(' + channelName + ', ' + channelClaimId + ', ' + claimName + ')');\n return new Promise(function (resolve, reject) {\n db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id\n .then(function (longChannelId) {\n if (!longChannelId) {\n return [null, null];\n }\n return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n longChannelId = _ref2[0],\n longClaimId = _ref2[1];\n\n if (!longChannelId) {\n return resolve(NO_CHANNEL);\n }\n if (!longClaimId) {\n return resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getChannelData: function getChannelData(channelName, channelClaimId, page) {\n return new Promise(function (resolve, reject) {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId).then(function (longChannelClaimId) {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]);\n }).then(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n longChannelClaimId = _ref4[0],\n shortChannelClaimId = _ref4[1];\n\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. return all the channel information\n resolve({\n channelName: channelName,\n longChannelClaimId: longChannelClaimId,\n shortChannelClaimId: shortChannelClaimId\n });\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getChannelClaims: function getChannelClaims(channelName, channelClaimId, page) {\n return new Promise(function (resolve, reject) {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId).then(function (longChannelClaimId) {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]);\n }).then(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n longChannelClaimId = _ref6[0],\n channelClaimsArray = _ref6[1];\n\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. format the data for the view, including pagination\n var paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);\n // 4. return all the channel information and contents\n resolve(paginatedChannelViewData);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getLocalFileRecord: function getLocalFileRecord(claimId, name) {\n return db.File.findOne({ where: { claimId: claimId, name: name } }).then(function (file) {\n if (!file) {\n return NO_FILE;\n }\n return file.dataValues;\n });\n }\n};\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(36);\n\nvar _redux = __webpack_require__(16);\n\nvar _index = __webpack_require__(37);\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _index3 = __webpack_require__(41);\n\nvar _index4 = _interopRequireDefault(_index3);\n\nvar _app = __webpack_require__(42);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(49);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reactHelmet = __webpack_require__(12);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_index2.default);\n\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _index4.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `` was rendered\n return res.redirect(301, context.url);\n } else {}\n // we're good, send the response\n\n\n // get the initial state from our Redux store\n var preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send((0, _renderFullPage2.default)(helmet, html, preloadedState));\n};\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-dom/server\");\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _redux = __webpack_require__(16);\n\nvar _publish = __webpack_require__(83);\n\nvar _publish2 = _interopRequireDefault(_publish);\n\nvar _channel = __webpack_require__(85);\n\nvar _channel2 = _interopRequireDefault(_channel);\n\nvar _show = __webpack_require__(86);\n\nvar _show2 = _interopRequireDefault(_show);\n\nvar _site = __webpack_require__(87);\n\nvar _site2 = _interopRequireDefault(_site);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = (0, _redux.combineReducers)({\n channel: _channel2.default,\n publish: _publish2.default,\n show: _show2.default,\n site: _site2.default\n});\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar FILE_SELECTED = exports.FILE_SELECTED = 'FILE_SELECTED';\nvar FILE_CLEAR = exports.FILE_CLEAR = 'FILE_CLEAR';\nvar METADATA_UPDATE = exports.METADATA_UPDATE = 'METADATA_UPDATE';\nvar CLAIM_UPDATE = exports.CLAIM_UPDATE = 'CLAIM_UPDATE';\nvar SET_PUBLISH_IN_CHANNEL = exports.SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';\nvar PUBLISH_STATUS_UPDATE = exports.PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';\nvar ERROR_UPDATE = exports.ERROR_UPDATE = 'ERROR_UPDATE';\nvar SELECTED_CHANNEL_UPDATE = exports.SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';\nvar TOGGLE_METADATA_INPUTS = exports.TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';\nvar THUMBNAIL_NEW = exports.THUMBNAIL_NEW = 'THUMBNAIL_NEW';\nvar PUBLISH_START = exports.PUBLISH_START = 'PUBLISH_START';\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar CHANNEL_UPDATE = exports.CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOCAL_CHECK = exports.LOCAL_CHECK = 'LOCAL_CHECK';\nvar UNAVAILABLE = exports.UNAVAILABLE = 'UNAVAILABLE';\nvar ERROR = exports.ERROR = 'ERROR';\nvar AVAILABLE = exports.AVAILABLE = 'AVAILABLE';\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactGa = __webpack_require__(88);\n\nvar _reactGa2 = _interopRequireDefault(_reactGa);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _require = __webpack_require__(3),\n googleId = _require.analytics.googleId;\n\n_reactGa2.default.initialize(googleId);\n\nvar GAListener = function (_React$Component) {\n _inherits(GAListener, _React$Component);\n\n function GAListener() {\n _classCallCheck(this, GAListener);\n\n return _possibleConstructorReturn(this, (GAListener.__proto__ || Object.getPrototypeOf(GAListener)).apply(this, arguments));\n }\n\n _createClass(GAListener, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n }, {\n key: 'sendPageView',\n value: function sendPageView(location) {\n _reactGa2.default.set({ page: location.pathname });\n _reactGa2.default.pageview(location.pathname);\n }\n }, {\n key: 'render',\n value: function render() {\n return this.props.children;\n }\n }]);\n\n return GAListener;\n}(_react2.default.Component);\n\nexports.default = (0, _reactRouterDom.withRouter)(GAListener);\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _dynamicImport = __webpack_require__(17);\n\nvar _AboutPage = __webpack_require__(91);\n\nvar _AboutPage2 = _interopRequireDefault(_AboutPage);\n\nvar _LoginPage = __webpack_require__(96);\n\nvar _LoginPage2 = _interopRequireDefault(_LoginPage);\n\nvar _ShowPage = __webpack_require__(104);\n\nvar _ShowPage2 = _interopRequireDefault(_ShowPage);\n\nvar _FourOhFourPage = __webpack_require__(121);\n\nvar _FourOhFourPage2 = _interopRequireDefault(_FourOhFourPage);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HomePage = (0, _dynamicImport.dynamicImport)('pages/HomePage'); // or use the provided local homepage\n\nvar App = function App() {\n return _react2.default.createElement(\n _reactRouterDom.Switch,\n null,\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/', component: HomePage }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/about', component: _AboutPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/login', component: _LoginPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/:identifier/:claim', component: _ShowPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/:claim', component: _ShowPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { component: _FourOhFourPage2.default })\n );\n};\n\nexports.default = App;\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n validateFile: function validateFile(file) {\n if (!file) {\n throw new Error('no file provided');\n }\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate size and type\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n throw new Error('Sorry, GIFs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n }\n};\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createPublishMetadata = exports.createPublishMetadata = function createPublishMetadata(claim, _ref, _ref2, publishInChannel, selectedChannel) {\n var type = _ref.type;\n var title = _ref2.title,\n description = _ref2.description,\n license = _ref2.license,\n nsfw = _ref2.nsfw;\n\n var metadata = {\n name: claim,\n title: title,\n description: description,\n license: license,\n nsfw: nsfw,\n type: type\n };\n if (publishInChannel) {\n metadata['channelName'] = selectedChannel;\n }\n return metadata;\n};\n\nvar createPublishFormData = exports.createPublishFormData = function createPublishFormData(file, thumbnail, metadata) {\n var fd = new FormData();\n // append file\n fd.append('file', file);\n // append thumbnail\n if (thumbnail) {\n fd.append('thumbnail', thumbnail);\n }\n // append metadata\n for (var key in metadata) {\n if (metadata.hasOwnProperty(key)) {\n fd.append(key, metadata[key]);\n }\n }\n return fd;\n};\n\nvar createThumbnailUrl = exports.createThumbnailUrl = function createThumbnailUrl(channel, channelId, claim, host) {\n return host + '/' + channel + ':' + channelId + '/' + claim + '-thumb.png';\n};\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar validateChannelSelection = exports.validateChannelSelection = function validateChannelSelection(publishInChannel, selectedChannel, loggedInChannel) {\n if (publishInChannel && selectedChannel !== loggedInChannel.name) {\n throw new Error('Log in to a channel or select Anonymous');\n }\n};\n\nvar validatePublishParams = exports.validatePublishParams = function validatePublishParams(file, claim, urlError) {\n if (!file) {\n throw new Error('Please choose a file');\n }\n if (!claim) {\n throw new Error('Please enter a URL');\n }\n if (urlError) {\n throw new Error('Fix the url');\n }\n};\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(24);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _ActiveStatusBar = __webpack_require__(102);\n\nvar _ActiveStatusBar2 = _interopRequireDefault(_ActiveStatusBar);\n\nvar _InactiveStatusBar = __webpack_require__(103);\n\nvar _InactiveStatusBar2 = _interopRequireDefault(_InactiveStatusBar);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ProgressBar = function (_React$Component) {\n _inherits(ProgressBar, _React$Component);\n\n function ProgressBar(props) {\n _classCallCheck(this, ProgressBar);\n\n var _this = _possibleConstructorReturn(this, (ProgressBar.__proto__ || Object.getPrototypeOf(ProgressBar)).call(this, props));\n\n _this.state = {\n bars: [],\n index: 0,\n incrementer: 1\n };\n _this.createBars = _this.createBars.bind(_this);\n _this.startProgressBar = _this.startProgressBar.bind(_this);\n _this.updateProgressBar = _this.updateProgressBar.bind(_this);\n _this.stopProgressBar = _this.stopProgressBar.bind(_this);\n return _this;\n }\n\n _createClass(ProgressBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.createBars();\n this.startProgressBar();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.stopProgressBar();\n }\n }, {\n key: 'createBars',\n value: function createBars() {\n var bars = [];\n for (var i = 0; i <= this.props.size; i++) {\n bars.push({ isActive: false });\n }\n this.setState({ bars: bars });\n }\n }, {\n key: 'startProgressBar',\n value: function startProgressBar() {\n this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);\n }\n }, {\n key: 'updateProgressBar',\n value: function updateProgressBar() {\n var index = this.state.index;\n var incrementer = this.state.incrementer;\n var bars = this.state.bars;\n // flip incrementer if necessary, to stay in bounds\n if (index < 0 || index > this.props.size) {\n incrementer = incrementer * -1;\n index += incrementer;\n }\n // update the indexed bar\n if (incrementer > 0) {\n bars[index].isActive = true;\n } else {\n bars[index].isActive = false;\n };\n // increment index\n index += incrementer;\n // update state\n this.setState({\n bars: bars,\n incrementer: incrementer,\n index: index\n });\n }\n }, {\n key: 'stopProgressBar',\n value: function stopProgressBar() {\n clearInterval(this.updateInterval);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n this.state.bars.map(function (bar, index) {\n return bar.isActive ? _react2.default.createElement(_ActiveStatusBar2.default, { key: index }) : _react2.default.createElement(_InactiveStatusBar2.default, { key: index });\n })\n );\n }\n }]);\n\n return ProgressBar;\n}(_react2.default.Component);\n\n;\n\nProgressBar.propTypes = {\n size: _propTypes2.default.number.isRequired\n};\n\nexports.default = ProgressBar;\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar CHANNEL = exports.CHANNEL = 'CHANNEL';\nvar ASSET_LITE = exports.ASSET_LITE = 'ASSET_LITE';\nvar ASSET_DETAILS = exports.ASSET_DETAILS = 'ASSET_DETAILS';\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(108);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(7);\n\nvar _show2 = __webpack_require__(11);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select error and status\n var error = show.displayAsset.error;\n var status = show.displayAsset.status;\n // select asset\n var asset = (0, _show2.selectAsset)(show);\n // return props\n return {\n error: error,\n status: status,\n asset: asset\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onFileRequest: function onFileRequest(name, claimId) {\n dispatch((0, _show.fileRequested)(name, claimId));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (helmet, html, preloadedState) {\n // take the html and preloadedState and return the full page\n return '\\n \\n \\n \\n \\n \\n \\n \\n ' + helmet.title.toString() + '\\n ' + helmet.meta.toString() + '\\n ' + helmet.link.toString() + '\\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n
' + html + '
\\n
\\n \\n \\n \\n \\n ';\n};\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar selectSiteState = exports.selectSiteState = function selectSiteState(state) {\n return state.site;\n};\n\nvar selectSiteHost = exports.selectSiteHost = function selectSiteHost(state) {\n return state.site.host;\n};\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(52);\n__webpack_require__(53);\nmodule.exports = __webpack_require__(54);\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"babel-polyfill\");\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"whatwg-fetch\");\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// app dependencies\nvar express = __webpack_require__(55);\nvar bodyParser = __webpack_require__(56);\nvar expressHandlebars = __webpack_require__(57);\nvar Handlebars = __webpack_require__(58);\nvar helmet = __webpack_require__(59);\nvar passport = __webpack_require__(26);\n\nvar _require = __webpack_require__(60),\n serializeSpeechUser = _require.serializeSpeechUser,\n deserializeSpeechUser = _require.deserializeSpeechUser;\n\nvar cookieSession = __webpack_require__(61);\nvar http = __webpack_require__(62);\n// logging dependencies\nvar logger = __webpack_require__(1);\n\nfunction SpeechServer() {\n var _this = this;\n\n this.configureMysql = function (mysqlConfig) {\n __webpack_require__(27).configure(mysqlConfig);\n };\n this.configureSite = function (siteConfig) {\n __webpack_require__(3).configure(siteConfig);\n console.log(__webpack_require__(3));\n _this.sessionKey = siteConfig.auth.sessionKey;\n _this.PORT = siteConfig.details.port;\n };\n this.configureSlack = function (slackConfig) {\n __webpack_require__(28).configure(slackConfig);\n };\n this.createApp = function () {\n // create an Express application\n var app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(__dirname + '/public')); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use(function (req, res, next) {\n // custom logging middleware to log all incoming http requests\n logger.verbose('Request on ' + req.originalUrl + ' from ' + req.ip);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n var localSignupStrategy = __webpack_require__(63);\n var localLoginStrategy = __webpack_require__(74);\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name: 'session',\n keys: [_this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000 // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n var hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars: Handlebars\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n __webpack_require__(75)(app);\n __webpack_require__(76)(app);\n __webpack_require__(82)(app);\n __webpack_require__(123)(app);\n __webpack_require__(133)(app);\n\n _this.app = app;\n };\n this.initialize = function () {\n __webpack_require__(134)(logger);\n __webpack_require__(136)(logger);\n _this.createApp();\n _this.server = http.Server(_this.app);\n };\n this.start = function () {\n var db = __webpack_require__(5);\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(function () {\n _this.server.listen(_this.PORT, function () {\n logger.info('Server is listening on PORT ' + _this.PORT);\n });\n }).catch(function (error) {\n logger.error('Startup Error:', error);\n });\n };\n};\n\nmodule.exports = SpeechServer;\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express\");\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"body-parser\");\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express-handlebars\");\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"handlebars\");\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"helmet\");\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n serializeSpeechUser: function serializeSpeechUser(user, done) {\n // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser: function deserializeSpeechUser(user, done) {\n // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n }\n};\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cookie-session\");\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"http\");\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar PassportLocalStrategy = __webpack_require__(29).Strategy;\nvar lbryApi = __webpack_require__(14);\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n logger.verbose('new channel signup request. user: ' + username + ' pass: ' + password + ' .');\n var userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel('@' + username).then(function (tx) {\n // create user record\n var userData = {\n userName: username,\n password: password\n };\n logger.verbose('userData >', userData);\n // create user record\n var channelData = {\n channelName: '@' + username,\n channelClaimId: tx.claim_id\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n var certificateData = {\n claimId: tx.claim_id,\n name: '@' + username\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 3),\n newUser = _ref2[0],\n newChannel = _ref2[1],\n newCertificate = _ref2[2];\n\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n }).then(function () {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n }).catch(function (error) {\n logger.error('signup error', error);\n return done(error);\n });\n});\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"axios\");\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279'\n }\n};\n\nmodule.exports = lbryConfig;\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"universal-analytics\");\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(31),\n returnShortId = _require.returnShortId;\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Certificate = sequelize.define('Certificate', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateVersion: {\n type: STRING,\n default: null\n },\n keyType: {\n type: STRING,\n default: null\n },\n publicKey: {\n type: TEXT('long'),\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Certificate.associate = function (db) {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n var _this = this;\n\n logger.debug('getShortChannelIdFromLongChannelId ' + channelName + ':' + longChannelId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: channelName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n var _this2 = this;\n\n logger.debug('getLongChannelIdFromShortChannelId(' + channelName + ', ' + channelClaimId + ')');\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: {\n name: channelName,\n claimId: {\n $like: channelClaimId + '%'\n }\n },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n var _this3 = this;\n\n logger.debug('getLongChannelIdFromChannelName(' + channelName + ')');\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n var _this4 = this;\n\n logger.debug('validateLongChannelId(' + name + ', ' + claimId + ')');\n return new Promise(function (resolve, reject) {\n _this4.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug('getLongChannelId(' + channelName + ', ' + channelClaimId + ')');\n if (channelClaimId && channelClaimId.length === 40) {\n // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) {\n // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var Channel = sequelize.define('Channel', {\n channelName: {\n type: STRING,\n allowNull: false\n },\n channelClaimId: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n Channel.associate = function (db) {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(31),\n returnShortId = _require.returnShortId;\n\nvar _require2 = __webpack_require__(3),\n defaultThumbnail = _require2.assetDefaults.thumbnail,\n host = _require2.details.host;\n\nfunction determineFileExtensionFromContentType(contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail(storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData(claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Claim = sequelize.define('Claim', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateId: {\n type: STRING,\n default: null\n },\n author: {\n type: STRING,\n default: null\n },\n description: {\n type: TEXT('long'),\n default: null\n },\n language: {\n type: STRING,\n default: null\n },\n license: {\n type: STRING,\n default: null\n },\n licenseUrl: {\n type: STRING,\n default: null\n },\n nsfw: {\n type: BOOLEAN,\n default: null\n },\n preview: {\n type: STRING,\n default: null\n },\n thumbnail: {\n type: STRING,\n default: null\n },\n title: {\n type: STRING,\n default: null\n },\n metadataVersion: {\n type: STRING,\n default: null\n },\n contentType: {\n type: STRING,\n default: null\n },\n source: {\n type: STRING,\n default: null\n },\n sourceType: {\n type: STRING,\n default: null\n },\n sourceVersion: {\n type: STRING,\n default: null\n },\n streamVersion: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n channelName: {\n type: STRING,\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Claim.associate = function (db) {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n var _this = this;\n\n logger.debug('Claim.getShortClaimIdFromLongClaimId for ' + claimName + '#' + claimId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: claimName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n var _this2 = this;\n\n logger.debug('Claim.getAllChannelClaims for ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw: true // returns an array of only data, not an array of instances\n }).then(function (channelClaimsArray) {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(function (claim) {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n var _this3 = this;\n\n logger.debug('finding claim id for claim ' + claimName + ' from channel ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(result.length + ' records found for \"' + claimName + '\" in channel \"' + channelClaimId + '\"');\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n var _this4 = this;\n\n return new Promise(function (resolve, reject) {\n _this4.findAll({\n where: {\n name: name,\n claimId: {\n $like: shortId + '%'\n } },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n var _this5 = this;\n\n return new Promise(function (resolve, reject) {\n _this5.findAll({\n where: { name: name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] // note: maybe height and effective amount need to switch?\n }).then(function (result) {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n var _this6 = this;\n\n return new Promise(function (resolve, reject) {\n _this6.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug('getLongClaimId(' + claimName + ', ' + claimId + ')');\n if (claimId && claimId.length === 40) {\n // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n var _this7 = this;\n\n logger.debug('Claim.resolveClaim: ' + name + ' ' + claimId);\n return new Promise(function (resolve, reject) {\n _this7.findAll({\n where: { name: name, claimId: claimId }\n }).then(function (claimArray) {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error('more than one record matches ' + name + '#' + claimId + ' in db.Claim');\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER;\n\n var File = sequelize.define('File', {\n name: {\n type: STRING,\n allowNull: false\n },\n claimId: {\n type: STRING,\n allowNull: false\n },\n address: {\n type: STRING,\n allowNull: false\n },\n outpoint: {\n type: STRING,\n allowNull: false\n },\n height: {\n type: INTEGER,\n allowNull: false,\n default: 0\n },\n fileName: {\n type: STRING,\n allowNull: false\n },\n filePath: {\n type: STRING,\n allowNull: false\n },\n fileType: {\n type: STRING\n },\n nsfw: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: false\n },\n trendingEligible: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: true\n }\n }, {\n freezeTableName: true\n });\n\n File.associate = function (db) {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25\n });\n };\n\n return File;\n};\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n TEXT = _ref.TEXT;\n\n var Request = sequelize.define('Request', {\n action: {\n type: STRING,\n allowNull: false\n },\n url: {\n type: STRING,\n allowNull: false\n },\n ipAddress: {\n type: STRING,\n allowNull: true\n },\n result: {\n type: TEXT('long'),\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Request.associate = function (db) {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n return Request;\n};\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar bcrypt = __webpack_require__(73);\nvar logger = __webpack_require__(1);\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var User = sequelize.define('User', {\n userName: {\n type: STRING,\n allowNull: false\n },\n password: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n User.associate = function (db) {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n _this.update({ password: hash }).then(function () {\n resolve();\n }).catch(function (error) {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', function (user, options) {\n logger.debug('User.beforeCreate hook...');\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"bcrypt\");\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PassportLocalStrategy = __webpack_require__(29).Strategy;\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\n\nvar returnUserAndChannelInfo = function returnUserAndChannelInfo(userInstance) {\n return new Promise(function (resolve, reject) {\n var userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance.getChannel().then(function (_ref) {\n var channelName = _ref.channelName,\n channelClaimId = _ref.channelClaimId;\n\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n }).catch(function (error) {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n return db.User.findOne({\n where: { userName: username }\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n return user.comparePassword(password).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user).then(function (userInfo) {\n return done(null, userInfo);\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return done(error);\n });\n});\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\nvar passport = __webpack_require__(26);\n\nmodule.exports = function (app) {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), function (req, res) {\n logger.verbose('successful signup for ' + req.user.channelName);\n res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n // route for log in\n app.post('/login', function (req, res, next) {\n passport.authenticate('local-login', function (err, user, info) {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message\n });\n }\n logger.debug('successful login');\n req.logIn(user, function (err) {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', function (req, res) {\n req.logout();\n res.status(200).json({ success: true, message: 'you successfully logged out' });\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', function (req, res) {\n if (req.user) {\n res.status(200).json({ success: true, data: req.user });\n } else {\n res.status(401).json({ success: false, message: 'user is not logged in' });\n }\n });\n};\n\n/***/ }),\n/* 76 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(1);\nvar multipart = __webpack_require__(77);\n\nvar _require = __webpack_require__(3),\n uploadDirectory = _require.publishing.uploadDirectory,\n host = _require.details.host;\n\nvar multipartMiddleware = multipart({ uploadDir: uploadDirectory });\nvar db = __webpack_require__(5);\n\nvar _require2 = __webpack_require__(78),\n claimNameIsAvailable = _require2.claimNameIsAvailable,\n checkChannelAvailability = _require2.checkChannelAvailability,\n publish = _require2.publish;\n\nvar _require3 = __webpack_require__(14),\n getClaimList = _require3.getClaimList,\n resolveUri = _require3.resolveUri,\n getClaim = _require3.getClaim;\n\nvar _require4 = __webpack_require__(32),\n addGetResultsToFileData = _require4.addGetResultsToFileData,\n createBasicPublishParams = _require4.createBasicPublishParams,\n createThumbnailPublishParams = _require4.createThumbnailPublishParams,\n parsePublishApiRequestBody = _require4.parsePublishApiRequestBody,\n parsePublishApiRequestFiles = _require4.parsePublishApiRequestFiles,\n createFileData = _require4.createFileData;\n\nvar errorHandlers = __webpack_require__(33);\n\nvar _require5 = __webpack_require__(15),\n sendGATimingEvent = _require5.sendGATimingEvent;\n\nvar _require6 = __webpack_require__(80),\n authenticateUser = _require6.authenticateUser;\n\nvar _require7 = __webpack_require__(34),\n getChannelData = _require7.getChannelData,\n getChannelClaims = _require7.getChannelClaims,\n getClaimId = _require7.getClaimId;\n\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = function (app) {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', function (_ref, res) {\n var ip = _ref.ip,\n originalUrl = _ref.originalUrl,\n name = _ref.params.name;\n\n var gaStartTime = Date.now();\n checkChannelAvailability(name).then(function (availableName) {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', function (_ref2, res) {\n var ip = _ref2.ip,\n originalUrl = _ref2.originalUrl,\n params = _ref2.params;\n\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name).then(function (shortId) {\n res.status(200).json(shortId);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', function (_ref3, res) {\n var ip = _ref3.ip,\n originalUrl = _ref3.originalUrl,\n body = _ref3.body,\n params = _ref3.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', function (_ref4, res) {\n var ip = _ref4.ip,\n originalUrl = _ref4.originalUrl,\n body = _ref4.body,\n params = _ref4.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n var page = params.page;\n getChannelClaims(channelName, channelClaimId, page).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', function (_ref5, res) {\n var ip = _ref5.ip,\n originalUrl = _ref5.originalUrl,\n params = _ref5.params;\n\n getClaimList(params.name).then(function (claimsList) {\n res.status(200).json(claimsList);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', function (_ref6, res) {\n var ip = _ref6.ip,\n originalUrl = _ref6.originalUrl,\n params = _ref6.params;\n\n var name = params.name;\n var claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId).then(function (resolveResult) {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n var fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(name + '#' + claimId)]);\n }).then(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n fileData = _ref8[0],\n getResult = _ref8[1];\n\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, { name: name, claimId: claimId }, 'File'), getResult]);\n }).then(function (_ref9) {\n var _ref10 = _slicedToArray(_ref9, 2),\n fileRecord = _ref10[0],\n _ref10$ = _ref10[1],\n message = _ref10$.message,\n completed = _ref10$.completed;\n\n res.status(200).json({ success: true, message: message, completed: completed });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', function (_ref11, res) {\n var ip = _ref11.ip,\n originalUrl = _ref11.originalUrl,\n name = _ref11.params.name;\n\n var gaStartTime = Date.now();\n claimNameIsAvailable(name).then(function (result) {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', function (_ref12, res) {\n var headers = _ref12.headers,\n ip = _ref12.ip,\n originalUrl = _ref12.originalUrl,\n params = _ref12.params;\n\n resolveUri(params.name + '#' + params.claimId).then(function (resolvedUri) {\n res.status(200).json(resolvedUri);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, function (_ref13, res) {\n var body = _ref13.body,\n files = _ref13.files,\n headers = _ref13.headers,\n ip = _ref13.ip,\n originalUrl = _ref13.originalUrl,\n user = _ref13.user;\n\n // define variables\n var channelName = void 0,\n channelId = void 0,\n channelPassword = void 0,\n description = void 0,\n fileName = void 0,\n filePath = void 0,\n fileType = void 0,\n gaStartTime = void 0,\n license = void 0,\n name = void 0,\n nsfw = void 0,\n thumbnail = void 0,\n thumbnailFileName = void 0,\n thumbnailFilePath = void 0,\n thumbnailFileType = void 0,\n title = void 0;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n var _parsePublishApiReque = parsePublishApiRequestBody(body);\n // validateApiPublishRequest(body, files);\n\n\n name = _parsePublishApiReque.name;\n nsfw = _parsePublishApiReque.nsfw;\n license = _parsePublishApiReque.license;\n title = _parsePublishApiReque.title;\n description = _parsePublishApiReque.description;\n thumbnail = _parsePublishApiReque.thumbnail;\n\n var _parsePublishApiReque2 = parsePublishApiRequestFiles(files);\n\n fileName = _parsePublishApiReque2.fileName;\n filePath = _parsePublishApiReque2.filePath;\n fileType = _parsePublishApiReque2.fileType;\n thumbnailFileName = _parsePublishApiReque2.thumbnailFileName;\n thumbnailFilePath = _parsePublishApiReque2.thumbnailFilePath;\n thumbnailFileType = _parsePublishApiReque2.thumbnailFileType;\n channelName = body.channelName;\n channelId = body.channelId;\n channelPassword = body.channelPassword;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // check channel authorization\n Promise.all([authenticateUser(channelName, channelId, channelPassword, user), claimNameIsAvailable(name), createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail), createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw)]).then(function (_ref14) {\n var _ref15 = _slicedToArray(_ref14, 4),\n _ref15$ = _ref15[0],\n channelName = _ref15$.channelName,\n channelClaimId = _ref15$.channelClaimId,\n validatedClaimName = _ref15[1],\n publishParams = _ref15[2],\n thumbnailPublishParams = _ref15[3];\n\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n }).then(function (result) {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data: {\n name: name,\n claimId: result.claim_id,\n url: host + '/' + result.claim_id + '/' + name,\n lbryTx: result\n }\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', function (_ref16, res) {\n var ip = _ref16.ip,\n originalUrl = _ref16.originalUrl,\n body = _ref16.body,\n params = _ref16.params;\n\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name).then(function (shortId) {\n res.status(200).json({ success: true, data: shortId });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', function (_ref17, res) {\n var ip = _ref17.ip,\n originalUrl = _ref17.originalUrl,\n body = _ref17.body,\n params = _ref17.params;\n\n logger.debug('body:', body);\n var channelName = body.channelName;\n var channelClaimId = body.channelClaimId;\n var claimName = body.claimName;\n var claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (result) {\n if (result === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel could be found' });\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'No matching claim id could be found' });\n }\n res.status(200).json({ success: true, data: result });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', function (_ref18, res) {\n var ip = _ref18.ip,\n originalUrl = _ref18.originalUrl,\n body = _ref18.body,\n params = _ref18.params;\n\n var claimName = params.claimName;\n var claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId).then(function (claimInfo) {\n if (!claimInfo) {\n return res.status(404).json({ success: false, message: 'No claim could be found' });\n }\n res.status(200).json({ success: true, data: claimInfo });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', function (_ref19, res) {\n var ip = _ref19.ip,\n originalUrl = _ref19.originalUrl,\n params = _ref19.params;\n\n var name = params.name;\n var claimId = params.claimId;\n db.File.findOne({ where: { name: name, claimId: claimId } }).then(function (result) {\n if (result) {\n return res.status(200).json({ success: true, data: true });\n }\n res.status(200).json({ success: true, data: false });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"connect-multiparty\");\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _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; }\n\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\nvar lbryApi = __webpack_require__(14);\nvar publishHelpers = __webpack_require__(32);\n\nvar _require = __webpack_require__(3),\n _require$publishing = _require.publishing,\n primaryClaimAddress = _require$publishing.primaryClaimAddress,\n additionalClaimAddresses = _require$publishing.additionalClaimAddresses;\n\nvar Sequelize = __webpack_require__(30);\nvar Op = Sequelize.Op;\n\nmodule.exports = {\n publish: function publish(publishParams, fileName, fileType) {\n return new Promise(function (resolve, reject) {\n var publishResults = void 0,\n certificateId = void 0,\n channelName = void 0;\n // publish the file\n return lbryApi.publishClaim(publishParams).then(function (tx) {\n logger.info('Successfully published ' + publishParams.name + ' ' + fileName, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug('this claim was published in channel: ' + publishParams.channel_name);\n return db.Channel.findOne({ where: { channelName: publishParams.channel_name } });\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n }).then(function (channel) {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug('certificateId: ' + certificateId);\n }).then(function () {\n // create the File record\n var fileRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n fileName: fileName,\n filePath: publishParams.file_path,\n fileType: fileType,\n nsfw: publishParams.metadata.nsfw\n };\n // create the Claim record\n var claimRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n thumbnail: publishParams.metadata.thumbnail,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n contentType: fileType,\n nsfw: publishParams.metadata.nsfw,\n amount: publishParams.bid,\n certificateId: certificateId,\n channelName: channelName\n };\n // upsert criteria\n var upsertCriteria = {\n name: publishParams.name,\n claimId: publishResults.claim_id\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n file = _ref2[0],\n claim = _ref2[1];\n\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n }).then(function () {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n }).catch(function (error) {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable: function claimNameIsAvailable(name) {\n var claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim.findAll({\n attributes: ['address'],\n where: {\n name: name,\n address: _defineProperty({}, Op.or, claimAddresses)\n }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n }).catch(function (error) {\n throw error;\n });\n },\n checkChannelAvailability: function checkChannelAvailability(name) {\n return db.Channel.findAll({\n where: { channelName: name }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n }).catch(function (error) {\n throw error;\n });\n }\n};\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"fs\");\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar db = __webpack_require__(5);\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n authenticateUser: function authenticateUser(channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName: null,\n channelClaimId: null\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName: user.channelName,\n channelClaimId: user.channelClaimId\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials: function authenticateChannelCredentials(channelName, channelId, userPassword) {\n return new Promise(function (resolve, reject) {\n // hoisted variables\n var channelData = void 0;\n // build the params for finding the channel\n var channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel.findOne({\n where: channelFindParams\n }).then(function (channel) {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) }\n });\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n }).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims: function returnPaginatedChannelClaims(channelName, longChannelClaimId, claims, page) {\n var totalPages = module.exports.determineTotalPages(claims);\n var paginationPage = module.exports.getPageFromQuery(page);\n var viewData = {\n channelName: channelName,\n longChannelClaimId: longChannelClaimId,\n claims: module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage: module.exports.determinePreviousPage(paginationPage),\n currentPage: paginationPage,\n nextPage: module.exports.determineNextPage(totalPages, paginationPage),\n totalPages: totalPages,\n totalResults: module.exports.determineTotalClaims(claims)\n };\n return viewData;\n },\n getPageFromQuery: function getPageFromQuery(page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims: function extractPageFromClaims(claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n var claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n var claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n var pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages: function determineTotalPages(claims) {\n if (!claims) {\n return 0;\n } else {\n var totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n var fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n var remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage: function determinePreviousPage(currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage: function determineNextPage(totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims: function determineTotalClaims(claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n }\n};\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(3),\n host = _require.details;\n\nvar handlePageRender = __webpack_require__(35);\n\nmodule.exports = function (app) {\n // route for the home page\n app.get('/', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', function (req, res) {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', function (req, res) {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', function (req, res) {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', function (_ref, res) {\n var params = _ref.params;\n\n var claimId = params.claimId;\n var name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host: host, claimId: claimId, name: name });\n });\n};\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data\n });\n default:\n return state;\n }\n};\n\nvar _publish_action_types = __webpack_require__(38);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nvar _publish_channel_select_states = __webpack_require__(84);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar _require = __webpack_require__(3),\n publishing = _require.publishing;\n\nvar initialState = {\n disabled: publishing.disabled,\n disabledMessage: publishing.disabledMessage,\n publishInChannel: false,\n selectedChannel: _publish_channel_select_states.LOGIN,\n showMetadataInputs: false,\n status: {\n status: null,\n message: null\n },\n error: {\n file: null,\n url: null,\n channel: null,\n publishSubmit: null\n },\n file: null,\n claim: '',\n metadata: {\n title: '',\n description: '',\n license: '',\n nsfw: false\n },\n thumbnail: null\n};\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOGIN = exports.LOGIN = 'Existing';\nvar CREATE = exports.CREATE = 'New';\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data\n });\n default:\n return state;\n }\n};\n\nvar _channel_action_types = __webpack_require__(39);\n\nvar actions = _interopRequireWildcard(_channel_action_types);\n\nfunction _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; } }\n\nvar initialState = {\n loggedInChannel: {\n name: null,\n shortId: null,\n longId: null\n }\n};\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data\n })\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id: action.data.requestId\n })\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n key: action.data.key\n }))\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n name: action.data.name,\n claimId: action.data.claimId,\n shortId: action.data.shortId,\n claimData: action.data.claimData\n }))\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.id, {\n name: action.data.name,\n longId: action.data.longId,\n shortId: action.data.shortId,\n claimsData: action.data.claimsData\n }))\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.channelListId, Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData\n })))\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data\n })\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error: action.data,\n status: _asset_display_states.ERROR\n })\n });\n default:\n return state;\n }\n};\n\nvar _show_action_types = __webpack_require__(9);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _asset_display_states = __webpack_require__(40);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar initialState = {\n request: {\n error: null,\n type: null,\n id: null\n },\n requestList: {},\n channelList: {},\n assetList: {},\n displayAsset: {\n error: null,\n status: _asset_display_states.LOCAL_CHECK\n }\n};\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n default:\n return state;\n }\n};\n\nvar siteConfig = __webpack_require__(3);\n\nvar googleAnalyticsId = siteConfig.analytics.googleId,\n _siteConfig$assetDefa = siteConfig.assetDefaults,\n defaultThumbnail = _siteConfig$assetDefa.thumbnail,\n defaultDescription = _siteConfig$assetDefa.description,\n _siteConfig$details = siteConfig.details,\n description = _siteConfig$details.description,\n host = _siteConfig$details.host,\n title = _siteConfig$details.title,\n twitter = _siteConfig$details.twitter;\n\n\nvar initialState = {\n description: description,\n googleAnalyticsId: googleAnalyticsId,\n host: host,\n title: title,\n twitter: twitter,\n defaultDescription: defaultDescription,\n defaultThumbnail: defaultThumbnail\n};\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-ga\");\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./canonicalLink\": 18,\n\t\"./canonicalLink.js\": 18,\n\t\"./dynamicImport\": 17,\n\t\"./dynamicImport.js\": 17,\n\t\"./file\": 43,\n\t\"./file.js\": 43,\n\t\"./lbryUri\": 19,\n\t\"./lbryUri.js\": 19,\n\t\"./metaTags\": 20,\n\t\"./metaTags.js\": 20,\n\t\"./pageTitle\": 21,\n\t\"./pageTitle.js\": 21,\n\t\"./publish\": 44,\n\t\"./publish.js\": 44,\n\t\"./request\": 6,\n\t\"./request.js\": 6,\n\t\"./validate\": 45,\n\t\"./validate.js\": 45\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 89;\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cross-fetch/polyfill\");\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _SEO = __webpack_require__(10);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AboutPage = function (_React$Component) {\n _inherits(AboutPage, _React$Component);\n\n function AboutPage() {\n _classCallCheck(this, AboutPage);\n\n return _possibleConstructorReturn(this, (AboutPage.__proto__ || Object.getPrototypeOf(AboutPage)).apply(this, arguments));\n }\n\n _createClass(AboutPage, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'About', pageUri: 'about' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n { className: 'pull-quote' },\n 'Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/spee_ch' },\n 'TWITTER'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch' },\n 'GITHUB'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://discord.gg/YjYbwhS' },\n 'DISCORD CHANNEL'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch/blob/master/README.md' },\n 'DOCUMENTATION'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a media-hosting site that reads from and publishes content to the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io' },\n 'LBRY'\n ),\n ' blockchain.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io/get' },\n 'LBRY'\n ),\n ' network. This means that your images are stored in multiple locations without a single point of failure.'\n ),\n _react2.default.createElement(\n 'h3',\n null,\n 'Contribute'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you have an idea for your own spee.ch-like site on top of LBRY, fork our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch' },\n 'github repo'\n ),\n ' and go to town!'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you want to improve spee.ch, join our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS' },\n 'discord channel'\n ),\n ' or solve one of our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch/issues' },\n 'github issues'\n ),\n '.'\n )\n )\n )\n )\n );\n }\n }]);\n\n return AboutPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = AboutPage;\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _Logo = __webpack_require__(93);\n\nvar _Logo2 = _interopRequireDefault(_Logo);\n\nvar _NavBarChannelOptionsDropdown = __webpack_require__(94);\n\nvar _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar VIEW = 'VIEW';\nvar LOGOUT = 'LOGOUT';\n\nvar NavBar = function (_React$Component) {\n _inherits(NavBar, _React$Component);\n\n function NavBar(props) {\n _classCallCheck(this, NavBar);\n\n var _this = _possibleConstructorReturn(this, (NavBar.__proto__ || Object.getPrototypeOf(NavBar)).call(this, props));\n\n _this.checkForLoggedInUser = _this.checkForLoggedInUser.bind(_this);\n _this.logoutUser = _this.logoutUser.bind(_this);\n _this.handleSelection = _this.handleSelection.bind(_this);\n return _this;\n }\n\n _createClass(NavBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n }, {\n key: 'checkForLoggedInUser',\n value: function checkForLoggedInUser() {\n var _this2 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/user', params).then(function (_ref) {\n var data = _ref.data;\n\n _this2.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n }).catch(function (error) {\n console.log('/user error:', error.message);\n });\n }\n }, {\n key: 'logoutUser',\n value: function logoutUser() {\n var _this3 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/logout', params).then(function () {\n _this3.props.onChannelLogout();\n }).catch(function (error) {\n console.log('/logout error', error.message);\n });\n }\n }, {\n key: 'handleSelection',\n value: function handleSelection(event) {\n var value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push('/' + this.props.channelName + ':' + this.props.channelLongId);\n break;\n default:\n break;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var siteDescription = this.props.siteDescription;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--wide nav-bar' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--short flex-container--row flex-container--space-between-center' },\n _react2.default.createElement(_Logo2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--center' },\n _react2.default.createElement(\n 'span',\n { className: 'nav-bar-tagline' },\n siteDescription\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--right' },\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/', exact: true },\n 'Publish'\n ),\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/about' },\n 'About'\n ),\n this.props.channelName ? _react2.default.createElement(_NavBarChannelOptionsDropdown2.default, {\n channelName: this.props.channelName,\n handleSelection: this.handleSelection,\n defaultSelection: this.props.channelName,\n VIEW: VIEW,\n LOGOUT: LOGOUT\n }) : _react2.default.createElement(\n _reactRouterDom.NavLink,\n { id: 'nav-bar-login-link', className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/login' },\n 'Channel'\n )\n )\n )\n );\n }\n }]);\n\n return NavBar;\n}(_react2.default.Component);\n\nexports.default = (0, _reactRouterDom.withRouter)(NavBar);\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Logo() {\n return _react2.default.createElement(\n 'svg',\n { version: '1.1', id: 'Layer_1', x: '0px', y: '0px', height: '24px', viewBox: '0 0 80 31', enableBackground: 'new 0 0 80 31', className: 'nav-bar-logo' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: '/' },\n _react2.default.createElement(\n 'title',\n null,\n 'Logo'\n ),\n _react2.default.createElement(\n 'desc',\n null,\n 'Spee.ch logo'\n ),\n _react2.default.createElement(\n 'g',\n { id: 'About' },\n _react2.default.createElement(\n 'g',\n { id: 'Publish-Form-V2-_x28_filled_x29_', transform: 'translate(-42.000000, -23.000000)' },\n _react2.default.createElement(\n 'g',\n { id: 'Group-17', transform: 'translate(42.000000, 22.000000)' },\n _react2.default.createElement(\n 'text',\n { transform: 'matrix(1 0 0 1 0 20)', fontSize: '25', fontFamily: 'Roboto' },\n 'Spee' }) : _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: ''\n })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'embed-text',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex-container--row flex-container--space-between-bottom' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { className: 'link--primary', to: '/' + shortId + '/' + name + '.' + fileExt },\n _react2.default.createElement(\n 'span',\n {\n className: 'text' },\n 'Direct Link'\n )\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: host + '/' + claimId + '/' + name + '.' + fileExt, download: name },\n 'Download'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://lbry.io/dmca' },\n 'Report'\n )\n )\n );\n }\n }]);\n\n return AssetInfo;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetInfo;\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(116);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select request\n var previousRequest = show.requestList[requestId] || null;\n // select channel\n var channel = void 0;\n if (previousRequest) {\n var channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel: channel\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 116 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(10);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _ErrorPage = __webpack_require__(25);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelClaimsDisplay = __webpack_require__(117);\n\nvar _ChannelClaimsDisplay2 = _interopRequireDefault(_ChannelClaimsDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowChannel = function (_React$Component) {\n _inherits(ShowChannel, _React$Component);\n\n function ShowChannel() {\n _classCallCheck(this, ShowChannel);\n\n return _possibleConstructorReturn(this, (ShowChannel.__proto__ || Object.getPrototypeOf(ShowChannel)).apply(this, arguments));\n }\n\n _createClass(ShowChannel, [{\n key: 'render',\n value: function render() {\n var channel = this.props.channel;\n\n if (channel) {\n var name = channel.name,\n longId = channel.longId,\n shortId = channel.shortId;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name, channel: channel }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(\n 'h2',\n null,\n 'channel name: ',\n name\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'full channel id: ',\n longId\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'short channel id: ',\n shortId\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_ChannelClaimsDisplay2.default, null)\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading channel data...' });\n }\n }]);\n\n return ShowChannel;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowChannel;\n\n/***/ }),\n/* 117 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _show = __webpack_require__(7);\n\nvar _view = __webpack_require__(118);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select channel key\n var request = show.requestList[show.request.id];\n var channelKey = request.key;\n // select channel claims\n var channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey: channelKey,\n channel: channel\n };\n};\n\nvar mapDispatchToProps = {\n onUpdateChannelClaims: _show.onUpdateChannelClaims\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 118 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _AssetPreview = __webpack_require__(119);\n\nvar _AssetPreview2 = _interopRequireDefault(_AssetPreview);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelClaimsDisplay = function (_React$Component) {\n _inherits(ChannelClaimsDisplay, _React$Component);\n\n function ChannelClaimsDisplay(props) {\n _classCallCheck(this, ChannelClaimsDisplay);\n\n var _this = _possibleConstructorReturn(this, (ChannelClaimsDisplay.__proto__ || Object.getPrototypeOf(ChannelClaimsDisplay)).call(this, props));\n\n _this.showNextResultsPage = _this.showNextResultsPage.bind(_this);\n _this.showPreviousResultsPage = _this.showPreviousResultsPage.bind(_this);\n return _this;\n }\n\n _createClass(ChannelClaimsDisplay, [{\n key: 'showPreviousResultsPage',\n value: function showPreviousResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n }, {\n key: 'showNextResultsPage',\n value: function showNextResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n }, {\n key: 'showNewPage',\n value: function showNewPage(page) {\n var _props = this.props,\n channelKey = _props.channelKey,\n _props$channel = _props.channel,\n name = _props$channel.name,\n longId = _props$channel.longId;\n\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$channel$claims = this.props.channel.claimsData,\n claims = _props$channel$claims.claims,\n currentPage = _props$channel$claims.currentPage,\n totalPages = _props$channel$claims.totalPages;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall' },\n claims.length > 0 ? _react2.default.createElement(\n 'div',\n null,\n claims.map(function (claim, index) {\n return _react2.default.createElement(_AssetPreview2.default, {\n claimData: claim,\n key: claim.name + '-' + index\n });\n }),\n _react2.default.createElement(\n 'div',\n null,\n currentPage > 1 && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showPreviousResultsPage },\n 'Previous Page'\n ),\n currentPage < totalPages && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showNextResultsPage },\n 'Next Page'\n )\n )\n ) : _react2.default.createElement(\n 'p',\n null,\n 'There are no claims in this channel'\n )\n );\n }\n }]);\n\n return ChannelClaimsDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = ChannelClaimsDisplay;\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(120);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var defaultThumbnail = _ref.site.defaults.defaultThumbnail;\n\n return {\n defaultThumbnail: defaultThumbnail\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 120 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetPreview = function AssetPreview(_ref) {\n var defaultThumbnail = _ref.defaultThumbnail,\n _ref$claimData = _ref.claimData,\n name = _ref$claimData.name,\n claimId = _ref$claimData.claimId,\n fileExt = _ref$claimData.fileExt,\n contentType = _ref$claimData.contentType,\n thumbnail = _ref$claimData.thumbnail;\n\n var directSourceLink = claimId + '/' + name + '.' + fileExt;\n var showUrlLink = '/' + claimId + '/' + name;\n return _react2.default.createElement(\n 'div',\n { className: 'asset-holder' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: showUrlLink },\n function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset-preview',\n src: directSourceLink,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement('img', {\n className: 'asset-preview video',\n src: thumbnail || defaultThumbnail,\n alt: name\n });\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'unsupported file type'\n );\n }\n }()\n )\n );\n};\n\nexports.default = AssetPreview;\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(122);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var _ref$site = _ref.site,\n host = _ref$site.host,\n title = _ref$site.title;\n\n return {\n host: host,\n title: title\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 122 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _reactHelmet = __webpack_require__(12);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar FourOhForPage = function (_React$Component) {\n _inherits(FourOhForPage, _React$Component);\n\n function FourOhForPage() {\n _classCallCheck(this, FourOhForPage);\n\n return _possibleConstructorReturn(this, (FourOhForPage.__proto__ || Object.getPrototypeOf(FourOhForPage)).apply(this, arguments));\n }\n\n _createClass(FourOhForPage, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n title = _props.title,\n host = _props.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n _reactHelmet2.default,\n null,\n _react2.default.createElement(\n 'title',\n null,\n title,\n ' - 404'\n ),\n _react2.default.createElement('link', { rel: 'canonical', href: host + '/404' })\n ),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'h2',\n null,\n '404'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'That page does not exist'\n )\n )\n );\n }\n }]);\n\n return FourOhForPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = FourOhForPage;\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _require = __webpack_require__(15),\n sendGAServeEvent = _require.sendGAServeEvent;\n\nvar _require2 = __webpack_require__(124),\n determineResponseType = _require2.determineResponseType,\n flipClaimNameAndIdForBackwardsCompatibility = _require2.flipClaimNameAndIdForBackwardsCompatibility,\n logRequestData = _require2.logRequestData,\n getClaimIdAndServeAsset = _require2.getClaimIdAndServeAsset;\n\nvar lbryUri = __webpack_require__(125);\nvar handleShowRender = __webpack_require__(126);\nvar SERVE = 'SERVE';\n\nmodule.exports = function (app) {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // parse the identifier\n var isChannel = void 0,\n channelName = void 0,\n channelClaimId = void 0,\n claimId = void 0;\n try {\n var _lbryUri$parseIdentif = lbryUri.parseIdentifier(params.identifier);\n\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n if (!isChannel) {\n var _flipClaimNameAndIdFo = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n\n var _flipClaimNameAndIdFo2 = _slicedToArray(_flipClaimNameAndIdFo, 2);\n\n claimId = _flipClaimNameAndIdFo2[0];\n claimName = _flipClaimNameAndIdFo2[1];\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie2 = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie2.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim2 = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim2.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n/***/ }),\n/* 124 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(34),\n getClaimId = _require.getClaimId,\n getLocalFileRecord = _require.getLocalFileRecord;\n\nvar _require2 = __webpack_require__(33),\n handleErrorResponse = _require2.handleErrorResponse;\n\nvar SERVE = 'SERVE';\nvar SHOW = 'SHOW';\nvar NO_FILE = 'NO_FILE';\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml(_ref) {\n var accept = _ref.accept;\n\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser(headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset(_ref2) {\n var accept = _ref2.accept,\n range = _ref2.range;\n\n var imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n var videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId(claimId) {\n return claimId.length === 40 && !/[^A-Za-z0-9]/g.test(claimId);\n};\n\nfunction isValidShortId(claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId(input) {\n return isValidClaimId(input) || isValidShortId(input);\n};\n\nfunction serveAssetToClient(claimId, name, res) {\n return getLocalFileRecord(claimId, name).then(function (fileRecord) {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect('/api/claim/get/' + name + '/' + claimId);\n }\n // serve the file\n var filePath = fileRecord.filePath,\n fileType = fileRecord.fileType;\n\n logger.verbose('serving file: ' + filePath);\n var sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type': fileType || 'image/jpeg'\n }\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n }).catch(function (error) {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset: function getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (fullClaimId) {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'no claim id could be found' });\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'no channel id could be found' });\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n }).catch(function (error) {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType: function determineResponseType(hasFileExtension, headers) {\n var responseType = void 0;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) {\n // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) {\n // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility: function flipClaimNameAndIdForBackwardsCompatibility(identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n var tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData: function logRequestData(responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n }\n};\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n logger.debug('parsing identifier:', identifier);\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex.exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n logger.debug(proto + ', ' + value + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!value) {\n throw new Error('Check your url. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Invalid characters in channel name: ' + nameBadChars.join(', ') + '.');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId,\n claimId: claimId\n };\n },\n parseClaim: function parseClaim(claim) {\n logger.debug('parsing name:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n modifierSeperator = _componentsRegex$exec4[2],\n modifier = _componentsRegex$exec4[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Invalid characters in claim name: ' + nameBadChars.join(', ') + '.');\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No file extension provided after separator ' + modifierSeperator + '.');\n }\n if (modifierSeperator !== '.') {\n throw new Error('The ' + modifierSeperator + ' modifier is not supported in the claim name');\n }\n }\n // return results\n return {\n claimName: claimName\n };\n },\n parseModifier: function parseModifier(claim) {\n logger.debug('parsing modifier:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec5 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec6 = _slicedToArray(_componentsRegex$exec5, 4),\n proto = _componentsRegex$exec6[0],\n claimName = _componentsRegex$exec6[1],\n modifierSeperator = _componentsRegex$exec6[2],\n modifier = _componentsRegex$exec6[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n // Validate and process modifier\n var hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension: hasFileExtension\n };\n }\n};\n\n/***/ }),\n/* 126 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(36);\n\nvar _redux = __webpack_require__(16);\n\nvar _index = __webpack_require__(37);\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _index3 = __webpack_require__(41);\n\nvar _index4 = _interopRequireDefault(_index3);\n\nvar _app = __webpack_require__(42);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(49);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reduxSaga = __webpack_require__(127);\n\nvar _reduxSaga2 = _interopRequireDefault(_reduxSaga);\n\nvar _effects = __webpack_require__(13);\n\nvar _show_uri = __webpack_require__(128);\n\nvar _show = __webpack_require__(7);\n\nvar _reactHelmet = __webpack_require__(12);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar returnSagaWithParams = function returnSagaWithParams(saga, params) {\n return (/*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return (0, _effects.call)(saga, params);\n\n case 2:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n })\n );\n};\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create and apply middleware\n var sagaMiddleware = (0, _reduxSaga2.default)();\n var middleware = (0, _redux.applyMiddleware)(sagaMiddleware);\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_index2.default, middleware);\n\n // create saga\n var action = (0, _show.onHandleShowPageUri)(req.params);\n var saga = returnSagaWithParams(_show_uri.handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware.run(saga).done.then(function () {\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _index4.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n var preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send((0, _renderFullPage2.default)(helmet, html, preloadedState));\n });\n};\n\n/***/ }),\n/* 127 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga\");\n\n/***/ }),\n/* 128 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleShowPageUri = handleShowPageUri;\nexports.watchHandleShowPageUri = watchHandleShowPageUri;\n\nvar _effects = __webpack_require__(13);\n\nvar _show_action_types = __webpack_require__(9);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _show_asset = __webpack_require__(129);\n\nvar _show_channel = __webpack_require__(131);\n\nvar _lbryUri = __webpack_require__(19);\n\nvar _lbryUri2 = _interopRequireDefault(_lbryUri);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateIdentifierAndClaim),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateClaimOnly),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(handleShowPageUri),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchHandleShowPageUri);\n\nfunction parseAndUpdateIdentifierAndClaim(modifier, claim) {\n var isChannel, channelName, channelClaimId, claimId, claimName, extension, _lbryUri$parseIdentif, _lbryUri$parseClaim;\n\n return regeneratorRuntime.wrap(function parseAndUpdateIdentifierAndClaim$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n isChannel = void 0, channelName = void 0, channelClaimId = void 0, claimId = void 0, claimName = void 0, extension = void 0;\n _context.prev = 1;\n _lbryUri$parseIdentif = _lbryUri2.default.parseIdentifier(modifier);\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n _lbryUri$parseClaim = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim.claimName;\n extension = _lbryUri$parseClaim.extension;\n _context.next = 17;\n break;\n\n case 12:\n _context.prev = 12;\n _context.t0 = _context['catch'](1);\n _context.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 16:\n return _context.abrupt('return', _context.sent);\n\n case 17:\n if (!isChannel) {\n _context.next = 21;\n break;\n }\n\n _context.next = 20;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, channelName, channelClaimId, extension));\n\n case 20:\n return _context.abrupt('return', _context.sent);\n\n case 21:\n ;\n _context.next = 24;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, claimId, null, null, extension));\n\n case 24:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[1, 12]]);\n}\nfunction parseAndUpdateClaimOnly(claim) {\n var isChannel, channelName, channelClaimId, _lbryUri$parseIdentif2, claimName, extension, _lbryUri$parseClaim2;\n\n return regeneratorRuntime.wrap(function parseAndUpdateClaimOnly$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n isChannel = void 0, channelName = void 0, channelClaimId = void 0;\n _context2.prev = 1;\n _lbryUri$parseIdentif2 = _lbryUri2.default.parseIdentifier(claim);\n isChannel = _lbryUri$parseIdentif2.isChannel;\n channelName = _lbryUri$parseIdentif2.channelName;\n channelClaimId = _lbryUri$parseIdentif2.channelClaimId;\n _context2.next = 13;\n break;\n\n case 8:\n _context2.prev = 8;\n _context2.t0 = _context2['catch'](1);\n _context2.next = 12;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t0.message));\n\n case 12:\n return _context2.abrupt('return', _context2.sent);\n\n case 13:\n if (!isChannel) {\n _context2.next = 17;\n break;\n }\n\n _context2.next = 16;\n return (0, _effects.call)(_show_channel.newChannelRequest, (0, _show.onNewChannelRequest)(channelName, channelClaimId));\n\n case 16:\n return _context2.abrupt('return', _context2.sent);\n\n case 17:\n // if not for a channel, parse the claim request\n claimName = void 0, extension = void 0;\n _context2.prev = 18;\n _lbryUri$parseClaim2 = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim2.claimName;\n extension = _lbryUri$parseClaim2.extension;\n _context2.next = 29;\n break;\n\n case 24:\n _context2.prev = 24;\n _context2.t1 = _context2['catch'](18);\n _context2.next = 28;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t1.message));\n\n case 28:\n return _context2.abrupt('return', _context2.sent);\n\n case 29:\n _context2.next = 31;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, null, null, extension));\n\n case 31:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this, [[1, 8], [18, 24]]);\n}\n\nfunction handleShowPageUri(action) {\n var _action$data, identifier, claim;\n\n return regeneratorRuntime.wrap(function handleShowPageUri$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data = action.data, identifier = _action$data.identifier, claim = _action$data.claim;\n\n if (!identifier) {\n _context3.next = 5;\n break;\n }\n\n _context3.next = 4;\n return (0, _effects.call)(parseAndUpdateIdentifierAndClaim, identifier, claim);\n\n case 4:\n return _context3.abrupt('return', _context3.sent);\n\n case 5:\n _context3.next = 7;\n return (0, _effects.call)(parseAndUpdateClaimOnly, claim);\n\n case 7:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this);\n};\n\nfunction watchHandleShowPageUri() {\n return regeneratorRuntime.wrap(function watchHandleShowPageUri$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.HANDLE_SHOW_URI, handleShowPageUri);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n};\n\n/***/ }),\n/* 129 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newAssetRequest = newAssetRequest;\nexports.watchNewAssetRequest = watchNewAssetRequest;\n\nvar _effects = __webpack_require__(13);\n\nvar _show_action_types = __webpack_require__(9);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _assetApi = __webpack_require__(130);\n\nvar _show2 = __webpack_require__(11);\n\nvar _site = __webpack_require__(50);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newAssetRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewAssetRequest);\n\nfunction newAssetRequest(action) {\n var _action$data, requestType, requestId, name, modifier, state, host, longId, _ref, assetKey, shortId, _ref2, claimData, _ref3;\n\n return regeneratorRuntime.wrap(function newAssetRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, name = _action$data.name, modifier = _action$data.modifier;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get long id && add request to request list\n longId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_assetApi.getLongClaimId, host, name, modifier);\n\n case 15:\n _ref = _context.sent;\n longId = _ref.data;\n _context.next = 24;\n break;\n\n case 19:\n _context.prev = 19;\n _context.t0 = _context['catch'](12);\n _context.next = 23;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 23:\n return _context.abrupt('return', _context.sent);\n\n case 24:\n assetKey = 'a#' + name + '#' + longId;\n _context.next = 27;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, assetKey));\n\n case 27:\n if (!state.assetList[assetKey]) {\n _context.next = 29;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 29:\n // get short Id\n shortId = void 0;\n _context.prev = 30;\n _context.next = 33;\n return (0, _effects.call)(_assetApi.getShortId, host, name, longId);\n\n case 33:\n _ref2 = _context.sent;\n shortId = _ref2.data;\n _context.next = 42;\n break;\n\n case 37:\n _context.prev = 37;\n _context.t1 = _context['catch'](30);\n _context.next = 41;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 41:\n return _context.abrupt('return', _context.sent);\n\n case 42:\n // get asset claim data\n claimData = void 0;\n _context.prev = 43;\n _context.next = 46;\n return (0, _effects.call)(_assetApi.getClaimData, host, name, longId);\n\n case 46:\n _ref3 = _context.sent;\n claimData = _ref3.data;\n _context.next = 55;\n break;\n\n case 50:\n _context.prev = 50;\n _context.t2 = _context['catch'](43);\n _context.next = 54;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t2.message));\n\n case 54:\n return _context.abrupt('return', _context.sent);\n\n case 55:\n _context.next = 57;\n return (0, _effects.put)((0, _show.addAssetToAssetList)(assetKey, null, name, longId, shortId, claimData));\n\n case 57:\n _context.next = 59;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 59:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 19], [30, 37], [43, 50]]);\n};\n\nfunction watchNewAssetRequest() {\n return regeneratorRuntime.wrap(function watchNewAssetRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.ASSET_REQUEST_NEW, newAssetRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getLongClaimId = getLongClaimId;\nexports.getShortId = getShortId;\nexports.getClaimData = getClaimData;\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getLongClaimId(host, name, modifier) {\n var body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n var params = {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body)\n };\n // create url\n var url = host + '/api/claim/long-id';\n // return the request promise\n return (0, _request2.default)(url, params);\n};\n\nfunction getShortId(host, name, claimId) {\n var url = host + '/api/claim/short-id/' + claimId + '/' + name;\n return (0, _request2.default)(url);\n};\n\nfunction getClaimData(host, name, claimId) {\n var url = host + '/api/claim/data/' + name + '/' + claimId;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 131 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newChannelRequest = newChannelRequest;\nexports.watchNewChannelRequest = watchNewChannelRequest;\nexports.watchUpdateChannelClaims = watchUpdateChannelClaims;\n\nvar _effects = __webpack_require__(13);\n\nvar _show_action_types = __webpack_require__(9);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _channelApi = __webpack_require__(132);\n\nvar _show2 = __webpack_require__(11);\n\nvar _site = __webpack_require__(50);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newChannelRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewChannelRequest),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(getNewClaimsAndUpdateChannel),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchUpdateChannelClaims);\n\nfunction newChannelRequest(action) {\n var _action$data, requestType, requestId, channelName, channelId, state, host, longId, shortId, _ref, _ref$data, channelKey, claimsData, _ref2;\n\n return regeneratorRuntime.wrap(function newChannelRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, channelName = _action$data.channelName, channelId = _action$data.channelId;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get channel long id\n longId = void 0, shortId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_channelApi.getChannelData, host, channelName, channelId);\n\n case 15:\n _ref = _context.sent;\n _ref$data = _ref.data;\n longId = _ref$data.longChannelClaimId;\n shortId = _ref$data.shortChannelClaimId;\n _context.next = 26;\n break;\n\n case 21:\n _context.prev = 21;\n _context.t0 = _context['catch'](12);\n _context.next = 25;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 25:\n return _context.abrupt('return', _context.sent);\n\n case 26:\n // store the request in the channel requests list\n channelKey = 'c#' + channelName + '#' + longId;\n _context.next = 29;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, channelKey));\n\n case 29:\n if (!state.channelList[channelKey]) {\n _context.next = 31;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 31:\n // get channel claims data\n claimsData = void 0;\n _context.prev = 32;\n _context.next = 35;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, channelName, 1);\n\n case 35:\n _ref2 = _context.sent;\n claimsData = _ref2.data;\n _context.next = 44;\n break;\n\n case 39:\n _context.prev = 39;\n _context.t1 = _context['catch'](32);\n _context.next = 43;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 43:\n return _context.abrupt('return', _context.sent);\n\n case 44:\n _context.next = 46;\n return (0, _effects.put)((0, _show.addNewChannelToChannelList)(channelKey, channelName, shortId, longId, claimsData));\n\n case 46:\n _context.next = 48;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 48:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 21], [32, 39]]);\n}\n\nfunction watchNewChannelRequest() {\n return regeneratorRuntime.wrap(function watchNewChannelRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\nfunction getNewClaimsAndUpdateChannel(action) {\n var _action$data2, channelKey, name, longId, page, host, claimsData, _ref3;\n\n return regeneratorRuntime.wrap(function getNewClaimsAndUpdateChannel$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data2 = action.data, channelKey = _action$data2.channelKey, name = _action$data2.name, longId = _action$data2.longId, page = _action$data2.page;\n _context3.next = 3;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 3:\n host = _context3.sent;\n claimsData = void 0;\n _context3.prev = 5;\n _context3.next = 8;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, name, page);\n\n case 8:\n _ref3 = _context3.sent;\n claimsData = _ref3.data;\n _context3.next = 17;\n break;\n\n case 12:\n _context3.prev = 12;\n _context3.t0 = _context3['catch'](5);\n _context3.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context3.t0.message));\n\n case 16:\n return _context3.abrupt('return', _context3.sent);\n\n case 17:\n _context3.next = 19;\n return (0, _effects.put)((0, _show.updateChannelClaims)(channelKey, claimsData));\n\n case 19:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this, [[5, 12]]);\n}\n\nfunction watchUpdateChannelClaims() {\n return regeneratorRuntime.wrap(function watchUpdateChannelClaims$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n}\n\n/***/ }),\n/* 132 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getChannelData = getChannelData;\nexports.getChannelClaims = getChannelClaims;\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getChannelData(host, id, name) {\n if (!id) id = 'none';\n var url = host + '/api/channel/data/' + name + '/' + id;\n return (0, _request2.default)(url);\n};\n\nfunction getChannelClaims(host, longId, name, page) {\n if (!page) page = 1;\n var url = host + '/api/channel/claims/' + name + '/' + longId + '/' + page;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 133 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar handlePageRender = __webpack_require__(35);\n\nmodule.exports = function (app) {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', function (req, res) {\n // send response\n handlePageRender(req, res);\n });\n};\n\n/***/ }),\n/* 134 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(135),\n logLevel = _require.logLevel;\n\nmodule.exports = function (winston) {\n // configure\n winston.configure({\n transports: [new winston.transports.Console({\n level: logLevel,\n timestamp: false,\n colorize: true,\n prettyPrint: true,\n handleExceptions: true,\n humanReadableUnhandledException: true\n })]\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n/***/ }),\n/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar loggerConfig = {\n logLevel: 'debug' // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n/***/ }),\n/* 136 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar winstonSlackWebHook = __webpack_require__(137).SlackWebHook;\nvar slackConfig = __webpack_require__(28);\n\nmodule.exports = function (winston) {\n var slackWebHook = slackConfig.slackWebHook,\n slackErrorChannel = slackConfig.slackErrorChannel,\n slackInfoChannel = slackConfig.slackInfoChannel;\n\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-errors-transport',\n level: 'warn',\n webhookUrl: slackWebHook,\n channel: slackErrorChannel,\n username: 'spee.ch',\n iconEmoji: ':face_with_head_bandage:'\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-info-transport',\n level: 'info',\n webhookUrl: slackWebHook,\n channel: slackInfoChannel,\n username: 'spee.ch',\n iconEmoji: ':nerd_face:'\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n/***/ }),\n/* 137 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston-slack-webhook\");\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// index.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 51);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap f46abd84bf13c041d58d","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 0\n// module chunks = 0","module.exports = require(\"winston\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston\"\n// module id = 1\n// module chunks = 0","module.exports = require(\"react-redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-redux\"\n// module id = 2\n// module chunks = 0","function SiteConfig () {\n this.analytics = {\n googleId: 'default',\n };\n this.assetDefaults = {\n description: 'An asset published on Spee.ch',\n thumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',\n title : 'Spee.ch',\n };\n this.auth = {\n sessionKey: 'default',\n };\n this.customComponents = {\n components: {},\n containers: {},\n pages : {},\n };\n this.details = {\n description: 'Open-source, decentralized image and video sharing.',\n host : 'default',\n port : 3000,\n title : 'Spee.ch',\n twitter : '@spee_ch',\n };\n this.publishing = {\n additionalClaimAddresses: [],\n disabled : false,\n disabledMessage : 'Please check back soon.',\n primaryClaimAddress : 'default',\n thumbnailChannel : 'default',\n thumbnailChannelId : 'default',\n uploadDirectory : '/home/lbry/Uploads',\n };\n this.configure = (config) => {\n if (!config) {\n return console.log('No site config received.');\n }\n const { analytics, assetDefaults, auth, customComponents, details, publishing } = config;\n this.analytics = analytics;\n this.assetDefaults = assetDefaults;\n this.auth = auth;\n this.details = details;\n this.publishing = publishing;\n this.customComponents = customComponents;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/siteConfig.js","module.exports = require(\"react-router-dom\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-router-dom\"\n// module id = 4\n// module chunks = 0","const Sequelize = require('sequelize');\nconst logger = require('winston');\n\nconsole.log('exporting sequelize models');\nconst { database, username, password } = require('../../config/mysqlConfig');\nconst db = {};\n// set sequelize options\nconst sequelize = new Sequelize(database, username, password, {\n host : 'localhost',\n dialect : 'mysql',\n dialectOptions: {decimalNumbers: true}, // fix to ensure DECIMAL will not be stored as a string\n logging : false,\n pool : {\n max : 5,\n min : 0,\n idle : 10000,\n acquire: 10000,\n },\n});\n\n// establish mysql connection\nsequelize\n .authenticate()\n .then(() => {\n logger.info('Sequelize has established mysql connection successfully.');\n })\n .catch(err => {\n logger.error('Sequelize was unable to connect to the database:', err);\n });\n\n// manually add each model to the db object\nconst Certificate = require('./certificate.js');\nconst Channel = require('./channel.js');\nconst Claim = require('./claim.js');\nconst File = require('./file.js');\nconst Request = require('./request.js');\nconst User = require('./user.js');\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(modelName => {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = (Model, values, condition, tableName) => {\n return Model\n .findOne({\n where: condition,\n })\n .then(obj => {\n if (obj) { // update\n logger.debug(`updating record in db.${tableName}`);\n return obj.update(values);\n } else { // insert\n logger.debug(`creating record in db.${tableName}`);\n return Model.create(values);\n }\n })\n .catch(function (error) {\n logger.error(`${tableName}.upsert error`, error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/index.js","import 'cross-fetch/polyfill';\n\n/**\n * Parses the JSON returned by a network request\n *\n * @param {object} response A response from a network request\n *\n * @return {object} The parsed JSON from the request\n */\nfunction parseJSON (response) {\n if (response.status === 204 || response.status === 205) {\n return null;\n }\n return response.json();\n}\n\n/**\n * Parses the status returned by a network request\n *\n * @param {object} response A response from a network request\n * @param {object} response The parsed JSON from the network request\n *\n * @return {object | undefined} Returns object with status and statusText, or undefined\n */\nfunction checkStatus (response, jsonResponse) {\n if (response.status >= 200 && response.status < 300) {\n return jsonResponse;\n }\n const error = new Error(jsonResponse.message);\n error.response = response;\n throw error;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @param {string} url The URL we want to request\n * @param {object} [options] The options we want to pass to \"fetch\"\n *\n * @return {object} The response data\n */\n\nexport default function request (url, options) {\n return fetch(url, options)\n .then(response => {\n return Promise.all([response, parseJSON(response)]);\n })\n .then(([response, jsonResponse]) => {\n return checkStatus(response, jsonResponse);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/request.js","import * as actions from 'constants/show_action_types';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\n// basic request parsing\nexport function onHandleShowPageUri (params) {\n return {\n type: actions.HANDLE_SHOW_URI,\n data: params,\n };\n};\n\nexport function onRequestError (error) {\n return {\n type: actions.REQUEST_ERROR,\n data: error,\n };\n};\n\nexport function onNewChannelRequest (channelName, channelId) {\n const requestType = CHANNEL;\n const requestId = `cr#${channelName}#${channelId}`;\n return {\n type: actions.CHANNEL_REQUEST_NEW,\n data: { requestType, requestId, channelName, channelId },\n };\n};\n\nexport function onNewAssetRequest (name, id, channelName, channelId, extension) {\n const requestType = extension ? ASSET_LITE : ASSET_DETAILS;\n const requestId = `ar#${name}#${id}#${channelName}#${channelId}`;\n return {\n type: actions.ASSET_REQUEST_NEW,\n data: {\n requestType,\n requestId,\n name,\n modifier: {\n id,\n channel: {\n name: channelName,\n id : channelId,\n },\n },\n },\n };\n};\n\nexport function onRequestUpdate (requestType, requestId) {\n return {\n type: actions.REQUEST_UPDATE,\n data: {\n requestType,\n requestId,\n },\n };\n};\n\nexport function addRequestToRequestList (id, error, key) {\n return {\n type: actions.REQUEST_LIST_ADD,\n data: { id, error, key },\n };\n};\n\n// asset actions\n\nexport function addAssetToAssetList (id, error, name, claimId, shortId, claimData) {\n return {\n type: actions.ASSET_ADD,\n data: { id, error, name, claimId, shortId, claimData },\n };\n}\n\n// channel actions\n\nexport function addNewChannelToChannelList (id, name, shortId, longId, claimsData) {\n return {\n type: actions.CHANNEL_ADD,\n data: { id, name, shortId, longId, claimsData },\n };\n};\n\nexport function onUpdateChannelClaims (channelKey, name, longId, page) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,\n data: {channelKey, name, longId, page},\n };\n};\n\nexport function updateChannelClaims (channelListId, claimsData) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,\n data: {channelListId, claimsData},\n };\n};\n\n// display a file\n\nexport function fileRequested (name, claimId) {\n return {\n type: actions.FILE_REQUESTED,\n data: { name, claimId },\n };\n};\n\nexport function updateFileAvailability (status) {\n return {\n type: actions.FILE_AVAILABILITY_UPDATE,\n data: status,\n };\n};\n\nexport function updateDisplayAssetError (error) {\n return {\n type: actions.DISPLAY_ASSET_ERROR,\n data: error,\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/show.js","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport {updateSelectedChannel} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, site }) => {\n return {\n channelName : channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId : channel.loggedInChannel.longId,\n siteDescription: site.description,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n onChannelLogout: () => {\n dispatch(updateLoggedInChannel(null, null, null));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/index.js","// request actions\nexport const HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nexport const REQUEST_ERROR = 'REQUEST_ERROR';\nexport const REQUEST_UPDATE = 'REQUEST_UPDATE';\nexport const ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nexport const CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nexport const REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nexport const ASSET_ADD = `ASSET_ADD`;\n\n// channel actions\nexport const CHANNEL_ADD = 'CHANNEL_ADD';\n\nexport const CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nexport const CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nexport const FILE_REQUESTED = 'FILE_REQUESTED';\nexport const FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nexport const DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_action_types.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site }) => {\n const { defaultDescription, defaultThumbnail, description: siteDescription, host: siteHost, title: siteTitle, twitter: siteTwitter } = site;\n return {\n defaultDescription,\n defaultThumbnail,\n siteDescription,\n siteHost,\n siteTitle,\n siteTwitter,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/index.js","export const selectAsset = (show) => {\n const request = show.requestList[show.request.id];\n const assetKey = request.key;\n return show.assetList[assetKey];\n};\n\nexport const selectShowState = (state) => {\n return state.show;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/show.js","module.exports = require(\"react-helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-helmet\"\n// module id = 12\n// module chunks = 0","module.exports = require(\"redux-saga/effects\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga/effects\"\n// module id = 13\n// module chunks = 0","const axios = require('axios');\nconst logger = require('winston');\nconst { api: { apiHost, apiPort } } = require('../../config/lbryConfig.js');\nconst lbryApiUri = 'http://' + apiHost + ':' + apiPort;\nconst { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('./googleAnalytics.js');\n\nconst handleLbrynetResponse = ({ data }, resolve, reject) => {\n logger.debug('lbry api data:', data);\n if (data.result) {\n // check for an error\n if (data.result.error) {\n logger.debug('Lbrynet api error:', data.result.error);\n reject(new Error(data.result.error));\n return;\n };\n resolve(data.result);\n return;\n }\n // fallback in case it just timed out\n reject(JSON.stringify(data));\n};\n\nmodule.exports = {\n publishClaim (publishParams) {\n logger.debug(`lbryApi >> Publishing claim to \"${publishParams.name}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'publish',\n params: publishParams,\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaim (uri) {\n logger.debug(`lbryApi >> Getting Claim for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'get',\n params: { uri, timeout: 20 },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimList (claimName) {\n logger.debug(`lbryApi >> Getting claim_list for \"${claimName}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'claim_list',\n params: { name: claimName },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n resolveUri (uri) {\n logger.debug(`lbryApi >> Resolving URI for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'resolve',\n params: { uri },\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now());\n if (data.result[uri].error) { // check for errors\n reject(data.result[uri].error);\n } else { // if no errors, resolve\n resolve(data.result[uri]);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getDownloadDirectory () {\n logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'settings_get',\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now());\n if (data.result) {\n resolve(data.result.download_directory);\n } else {\n return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.');\n }\n })\n .catch(error => {\n logger.error('Lbrynet Error:', error);\n resolve('/home/lbry/Downloads/');\n });\n });\n },\n createChannel (name) {\n logger.debug(`lbryApi >> Creating channel for ${name}...`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'channel_new',\n params: {\n channel_name: name,\n amount : 0.1,\n },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryApi.js","const logger = require('winston');\nconst ua = require('universal-analytics');\nconst { analytics : { googleId }, details: { title } } = require('../../config/siteConfig.js');\n\nfunction createServeEventParams (headers, ip, originalUrl) {\n return {\n eventCategory : 'client requests',\n eventAction : 'serve request',\n eventLabel : originalUrl,\n ipOverride : ip,\n userAgentOverride: headers['user-agent'],\n };\n};\n\nfunction createPublishTimingEventParams (category, variable, label, startTime, endTime) {\n const duration = endTime - startTime;\n return {\n userTimingCategory : category,\n userTimingVariableName: variable,\n userTimingTime : duration,\n userTimingLabel : label,\n };\n};\n\nfunction sendGoogleAnalyticsEvent (ip, params) {\n const visitorId = ip.replace(/\\./g, '-');\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.event(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n });\n};\n\nfunction sendGoogleAnalyticsTiming (visitorId, params) {\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.timing(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n logger.debug(`Timing event successfully sent to google analytics`);\n });\n};\n\nmodule.exports = {\n sendGAServeEvent (headers, ip, originalUrl) {\n const params = createServeEventParams(headers, ip, originalUrl);\n sendGoogleAnalyticsEvent(ip, params);\n },\n sendGATimingEvent (category, variable, label, startTime, endTime) {\n const params = createPublishTimingEventParams(category, variable, label, startTime, endTime);\n sendGoogleAnalyticsTiming(title, params);\n },\n chooseGaLbrynetPublishLabel ({ channel_name: channelName, channel_id: channelId }) {\n return (channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM');\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/googleAnalytics.js","module.exports = require(\"redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux\"\n// module id = 16\n// module chunks = 0","const { componentsConfig } = require('../../config/siteConfig.js');\n\nfunction getDeepestChildValue (parent, childrenKeys) {\n let childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array\n let child = parent[childKey];\n if (childrenKeys.length >= 1) {\n return getDeepestChildValue(child, childrenKeys);\n }\n return child;\n}\n\nexport const dynamicImport = (filePath) => {\n // validate inputs\n if (!filePath) {\n throw new Error('no file path provided to dynamicImport()');\n }\n if (typeof filePath !== 'string') {\n console.log('dynamicImport > filePath:', filePath);\n console.log('dynamicImport > filePath type:', typeof filePath);\n throw new Error('file path provided to dynamicImport() must be a string');\n }\n // split out the file folders // filter out any empty or white-space-only strings\n const folders = filePath.split('/').filter(folderName => folderName.replace(/\\s/g, '').length);\n // check for the component corresponding to file path in the site config object\n // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]]\n const customComponent = getDeepestChildValue(componentsConfig, folders);\n if (customComponent) {\n return customComponent; // return custom component\n } else {\n return require(`${filePath}`);\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/dynamicImport.js","const createBasicCanonicalLink = (page, siteHost) => {\n return `${siteHost}/${page}`;\n};\n\nconst createAssetCanonicalLink = (asset, siteHost) => {\n let channelName, certificateId, name, claimId;\n if (asset.claimData) {\n ({ channelName, certificateId, name, claimId } = asset.claimData);\n };\n if (channelName) {\n return `${siteHost}/${channelName}:${certificateId}/${name}`;\n };\n return `${siteHost}/${claimId}/${name}`;\n};\n\nconst createChannelCanonicalLink = (channel, siteHost) => {\n const { name, longId } = channel;\n return `${siteHost}/${name}:${longId}`;\n};\n\nexport const createCanonicalLink = (asset, channel, page, siteHost) => {\n if (asset) {\n return createAssetCanonicalLink(asset, siteHost);\n }\n if (channel) {\n return createChannelCanonicalLink(channel, siteHost);\n }\n return createBasicCanonicalLink(page, siteHost);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/canonicalLink.js","module.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(identifier)\n .map(match => match || null);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your URL. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('Check your URL. No channel name after \"@\".');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in channel name: \"${nameBadChars.join(', ')}\".`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`Check your URL. No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`Check your URL. The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId: channelClaimId || null,\n claimId : claimId || null,\n };\n },\n parseClaim: function (name) {\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first extension)\n '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end)\n );\n const [proto, claimName, extensionSeperator, extension] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(name)\n .map(match => match || null);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('Check your URL. No claim name provided before \".\"');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in claim name: \"${nameBadChars.join(', ')}\".`);\n }\n // Validate and process extension\n if (extensionSeperator) {\n if (!extension) {\n throw new Error(`Check your URL. No file extension provided after separator \"${extensionSeperator}\".`);\n }\n if (extensionSeperator !== '.') {\n throw new Error(`Check your URL. The \"${extensionSeperator}\" separator is not supported in the claim name.`);\n }\n }\n return {\n claimName,\n extension: extension || null,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/lbryUri.js","const determineOgThumbnailContentType = (thumbnail) => {\n if (thumbnail) {\n const fileExt = thumbnail.substring(thumbnail.lastIndexOf('.'));\n switch (fileExt) {\n case 'jpeg':\n case 'jpg':\n return 'image/jpeg';\n case 'png':\n return 'image/png';\n case 'gif':\n return 'image/gif';\n case 'mp4':\n return 'video/mp4';\n default:\n return 'image/jpeg';\n }\n }\n return '';\n};\n\nconst createBasicMetaTags = (siteHost, siteDescription, siteTitle, siteTwitter) => {\n return [\n {property: 'og:title', content: siteTitle},\n {property: 'og:url', content: siteHost},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: siteDescription},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createChannelMetaTags = (siteTitle, siteHost, siteTwitter, channel) => {\n const { name, longId } = channel;\n return [\n {property: 'og:title', content: `${name} on ${siteTitle}`},\n {property: 'og:url', content: `${siteHost}/${name}:${longId}`},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: `${name}, a channel on ${siteTitle}`},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createAssetMetaTags = (siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) => {\n const { claimData } = asset;\n const { contentType } = claimData;\n const embedUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const showUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const source = `${siteHost}/${claimData.claimId}/${claimData.name}.${claimData.fileExt}`;\n const ogTitle = claimData.title || claimData.name;\n const ogDescription = claimData.description || defaultDescription;\n const ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);\n const ogThumbnail = claimData.thumbnail || defaultThumbnail;\n const metaTags = [\n {property: 'og:title', content: ogTitle},\n {property: 'og:url', content: showUrl},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: ogDescription},\n {property: 'og:image:width', content: 600},\n {property: 'og:image:height', content: 315},\n {property: 'twitter:site', content: siteTwitter},\n ];\n if (contentType === 'video/mp4' || contentType === 'video/webm') {\n metaTags.push({property: 'og:video', content: source});\n metaTags.push({property: 'og:video:secure_url', content: source});\n metaTags.push({property: 'og:video:type', content: contentType});\n metaTags.push({property: 'og:image', content: ogThumbnail});\n metaTags.push({property: 'og:image:type', content: ogThumbnailContentType});\n metaTags.push({property: 'og:type', content: 'video'});\n metaTags.push({property: 'twitter:card', content: 'player'});\n metaTags.push({property: 'twitter:player', content: embedUrl});\n metaTags.push({property: 'twitter:player:width', content: 600});\n metaTags.push({property: 'twitter:text:player_width', content: 600});\n metaTags.push({property: 'twitter:player:height', content: 337});\n metaTags.push({property: 'twitter:player:stream', content: source});\n metaTags.push({property: 'twitter:player:stream:content_type', content: contentType});\n } else {\n metaTags.push({property: 'og:image', content: source});\n metaTags.push({property: 'og:image:type', content: contentType});\n metaTags.push({property: 'og:type', content: 'article'});\n metaTags.push({property: 'twitter:card', content: 'summary_large_image'});\n }\n return metaTags;\n};\n\nexport const createMetaTags = (siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) => {\n if (asset) {\n return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail);\n };\n if (channel) {\n return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel);\n };\n return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/metaTags.js","export const createPageTitle = (siteTitle, pageTitle) => {\n if (!pageTitle) {\n return `${siteTitle}`;\n }\n return `${siteTitle} - ${pageTitle}`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/pageTitle.js","import * as actions from 'constants/channel_action_types';\n\n// export action creators\n\nexport function updateLoggedInChannel (name, shortId, longId) {\n return {\n type: actions.CHANNEL_UPDATE,\n data: {\n name,\n shortId,\n longId,\n },\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/channel.js","import * as actions from 'constants/publish_action_types';\n\n// export action creators\nexport function selectFile (file) {\n return {\n type: actions.FILE_SELECTED,\n data: file,\n };\n};\n\nexport function clearFile () {\n return {\n type: actions.FILE_CLEAR,\n };\n};\n\nexport function updateMetadata (name, value) {\n return {\n type: actions.METADATA_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateClaim (value) {\n return {\n type: actions.CLAIM_UPDATE,\n data: value,\n };\n};\n\nexport function setPublishInChannel (channel) {\n return {\n type: actions.SET_PUBLISH_IN_CHANNEL,\n channel,\n };\n};\n\nexport function updatePublishStatus (status, message) {\n return {\n type: actions.PUBLISH_STATUS_UPDATE,\n data: {\n status,\n message,\n },\n };\n};\n\nexport function updateError (name, value) {\n return {\n type: actions.ERROR_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateSelectedChannel (channelName) {\n return {\n type: actions.SELECTED_CHANNEL_UPDATE,\n data: channelName,\n };\n};\n\nexport function toggleMetadataInputs (showMetadataInputs) {\n return {\n type: actions.TOGGLE_METADATA_INPUTS,\n data: showMetadataInputs,\n };\n};\n\nexport function onNewThumbnail (file) {\n return {\n type: actions.THUMBNAIL_NEW,\n data: file,\n };\n};\n\nexport function startPublish (history) {\n return {\n type: actions.PUBLISH_START,\n data: { history },\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/publish.js","module.exports = require(\"prop-types\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 24\n// module chunks = 0","import React from 'react';\nimport PropTypes from 'prop-types';\nimport NavBar from 'containers/NavBar';\n\nclass ErrorPage extends React.Component {\n render () {\n const { error } = this.props;\n return (\n
\n \n
\n

{error}

\n
\n
\n );\n }\n};\n\nErrorPage.propTypes = {\n error: PropTypes.string.isRequired,\n};\n\nexport default ErrorPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ErrorPage/index.jsx","module.exports = require(\"passport\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport\"\n// module id = 26\n// module chunks = 0","function MysqlConfig () {\n this.database = 'default';\n this.username = 'default';\n this.password = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No MySQL config received.');\n }\n const {database, username, password} = config;\n this.database = database;\n this.username = username;\n this.password = password;\n };\n};\n\nmodule.exports = new MysqlConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/mysqlConfig.js","function SlackConfig () {\n this.slackWebHook = 'default';\n this.slackErrorChannel = 'default';\n this.slackInfoChannel = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No slack config received.');\n }\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = config;\n this.slackWebHook = slackWebHook;\n this.slackErrorChannel = slackErrorChannel;\n this.slackInfoChannel = slackInfoChannel;\n };\n};\n\nmodule.exports = new SlackConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/slackConfig.js","module.exports = require(\"passport-local\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport-local\"\n// module id = 29\n// module chunks = 0","module.exports = require(\"sequelize\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"sequelize\"\n// module id = 30\n// module chunks = 0","module.exports = {\n returnShortId: function (claimsArray, longId) {\n let claimIndex;\n let shortId = longId.substring(0, 1); // default short id is the first letter\n let shortIdLength = 0;\n // find the index of this claim id\n claimIndex = claimsArray.findIndex(element => {\n return element.claimId === longId;\n });\n if (claimIndex < 0) {\n throw new Error('claim id not found in claims list');\n }\n // get an array of all claims with lower height\n let possibleMatches = claimsArray.slice(0, claimIndex);\n // remove certificates with the same prefixes until none are left.\n while (possibleMatches.length > 0) {\n shortIdLength += 1;\n shortId = longId.substring(0, shortIdLength);\n possibleMatches = possibleMatches.filter(element => {\n return (element.claimId && (element.claimId.substring(0, shortIdLength) === shortId));\n });\n }\n return shortId;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/sequelizeHelpers.js","const logger = require('winston');\nconst fs = require('fs');\n\nconst { details, publishing } = require('../../config/siteConfig.js');\n\nmodule.exports = {\n parsePublishApiRequestBody ({name, nsfw, license, title, description, thumbnail}) {\n // validate name\n if (!name) {\n throw new Error('no name field found in request');\n }\n const invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name);\n if (invalidNameCharacters) {\n throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and \"-\"');\n }\n // optional parameters\n nsfw = (nsfw === 'true');\n license = license || null;\n title = title || null;\n description = description || null;\n thumbnail = thumbnail || null;\n // return results\n return {\n name,\n nsfw,\n license,\n title,\n description,\n thumbnail,\n };\n },\n parsePublishApiRequestFiles ({file, thumbnail}) {\n // make sure a file was provided\n if (!file) {\n throw new Error('no file with key of [file] found in request');\n }\n if (!file.path) {\n throw new Error('no file path found');\n }\n if (!file.type) {\n throw new Error('no file type found');\n }\n if (!file.size) {\n throw new Error('no file type found');\n }\n // validate the file name\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate the file\n module.exports.validateFileTypeAndSize(file);\n // return results\n return {\n fileName : file.name,\n filePath : file.path,\n fileType : file.type,\n thumbnailFileName: (thumbnail ? thumbnail.name : null),\n thumbnailFilePath: (thumbnail ? thumbnail.path : null),\n thumbnailFileType: (thumbnail ? thumbnail.type : null),\n };\n },\n validateFileTypeAndSize (file) {\n // check file type and size\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n logger.debug('publish > file validation > .jpeg/.jpg/.png was too big');\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .gif was too big');\n throw new Error('Sorry, .gifs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .mp4 was too big');\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n logger.debug('publish > file validation > unrecognized file type');\n throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n return file;\n },\n createBasicPublishParams (filePath, name, title, description, license, nsfw, thumbnail) {\n logger.debug(`Creating Publish Parameters`);\n // provide defaults for title\n if (title === null || title.trim() === '') {\n title = name;\n }\n // provide default for description\n if (description === null || description.trim() === '') {\n description = '';\n }\n // provide default for license\n if (license === null || license.trim() === '') {\n license = ' '; // default to empty string\n }\n // create the publish params\n const publishParams = {\n name,\n file_path: filePath,\n bid : 0.01,\n metadata : {\n description,\n title,\n author : details.title,\n language: 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n };\n // add thumbnail to channel if video\n if (thumbnail) {\n publishParams['metadata']['thumbnail'] = thumbnail;\n }\n return publishParams;\n },\n createThumbnailPublishParams (thumbnailFilePath, claimName, license, nsfw) {\n if (!thumbnailFilePath) {\n return;\n }\n logger.debug(`Creating Thumbnail Publish Parameters`);\n // create the publish params\n return {\n name : `${claimName}-thumb`,\n file_path: thumbnailFilePath,\n bid : 0.01,\n metadata : {\n title : `${claimName} thumbnail`,\n description: `a thumbnail for ${claimName}`,\n author : details.title,\n language : 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n channel_name : publishing.thumbnailChannel,\n channel_id : publishing.thumbnailChannelId,\n };\n },\n deleteTemporaryFile (filePath) {\n fs.unlink(filePath, err => {\n if (err) {\n logger.error(`error deleting temporary file ${filePath}`);\n throw err;\n }\n logger.debug(`successfully deleted ${filePath}`);\n });\n },\n addGetResultsToFileData (fileInfo, getResult) {\n fileInfo.fileName = getResult.file_name;\n fileInfo.filePath = getResult.download_path;\n return fileInfo;\n },\n createFileData ({ name, claimId, outpoint, height, address, nsfw, contentType }) {\n return {\n name,\n claimId,\n outpoint,\n height,\n address,\n fileName: '',\n filePath: '',\n fileType: contentType,\n nsfw,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/publishHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n handleErrorResponse: function (originalUrl, ip, error, res) {\n logger.error(`Error on ${originalUrl}`, module.exports.useObjectPropertiesIfNoKeys(error));\n const [status, message] = module.exports.returnErrorMessageAndStatus(error);\n res\n .status(status)\n .json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function (error) {\n let status, message;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function (err) {\n if (Object.keys(err).length === 0) {\n let newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach((key) => {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload (status, message) {\n return {\n status,\n success: false,\n message,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/errorHandlers.js","const db = require('../models/index');\nconst logger = require('winston');\nconst { returnPaginatedChannelClaims } = require('../helpers/channelPagination.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\nconst NO_FILE = 'NO_FILE';\n\nmodule.exports = {\n getClaimId (channelName, channelClaimId, name, claimId) {\n if (channelName) {\n return module.exports.getClaimIdByChannel(channelName, channelClaimId, name);\n } else {\n return module.exports.getClaimIdByClaim(name, claimId);\n }\n },\n getClaimIdByClaim (claimName, claimId) {\n logger.debug(`getClaimIdByClaim(${claimName}, ${claimId})`);\n return new Promise((resolve, reject) => {\n db.Claim.getLongClaimId(claimName, claimId)\n .then(longClaimId => {\n if (!longClaimId) {\n resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimIdByChannel (channelName, channelClaimId, claimName) {\n logger.debug(`getClaimIdByChannel(${channelName}, ${channelClaimId}, ${claimName})`);\n return new Promise((resolve, reject) => {\n db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id\n .then(longChannelId => {\n if (!longChannelId) {\n return [null, null];\n }\n return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id\n })\n .then(([longChannelId, longClaimId]) => {\n if (!longChannelId) {\n return resolve(NO_CHANNEL);\n }\n if (!longClaimId) {\n return resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelData (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]);\n })\n .then(([longChannelClaimId, shortChannelClaimId]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. return all the channel information\n resolve({\n channelName,\n longChannelClaimId,\n shortChannelClaimId,\n });\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelClaims (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]);\n })\n .then(([longChannelClaimId, channelClaimsArray]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. format the data for the view, including pagination\n let paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);\n // 4. return all the channel information and contents\n resolve(paginatedChannelViewData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getLocalFileRecord (claimId, name) {\n return db.File.findOne({where: {claimId, name}})\n .then(file => {\n if (!file) {\n return NO_FILE;\n }\n return file.dataValues;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/serveController.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage.js';\nimport Helmet from 'react-helmet';\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create a new Redux store instance\n const store = createStore(Reducer);\n\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `` was rendered\n return res.redirect(301, context.url);\n } else {\n // we're good, send the response\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handlePageRender.jsx","module.exports = require(\"react-dom/server\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-dom/server\"\n// module id = 36\n// module chunks = 0","import { combineReducers } from 'redux';\nimport PublishReducer from 'reducers/publish';\nimport ChannelReducer from 'reducers/channel';\nimport ShowReducer from 'reducers/show';\nimport SiteReducer from 'reducers/site';\n\nexport default combineReducers({\n channel: ChannelReducer,\n publish: PublishReducer,\n show : ShowReducer,\n site : SiteReducer,\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/index.js","export const FILE_SELECTED = 'FILE_SELECTED';\nexport const FILE_CLEAR = 'FILE_CLEAR';\nexport const METADATA_UPDATE = 'METADATA_UPDATE';\nexport const CLAIM_UPDATE = 'CLAIM_UPDATE';\nexport const SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';\nexport const PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';\nexport const ERROR_UPDATE = 'ERROR_UPDATE';\nexport const SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';\nexport const TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';\nexport const THUMBNAIL_NEW = 'THUMBNAIL_NEW';\nexport const PUBLISH_START = 'PUBLISH_START';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_action_types.js","export const CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/channel_action_types.js","export const LOCAL_CHECK = 'LOCAL_CHECK';\nexport const UNAVAILABLE = 'UNAVAILABLE';\nexport const ERROR = 'ERROR';\nexport const AVAILABLE = 'AVAILABLE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/asset_display_states.js","import React from 'react';\nimport GoogleAnalytics from 'react-ga';\nimport { withRouter } from 'react-router-dom';\nconst { analytics: { googleId } } = require('../../../config/siteConfig.js');\n\nGoogleAnalytics.initialize(googleId);\n\nclass GAListener extends React.Component {\n componentDidMount () {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n\n sendPageView (location) {\n GoogleAnalytics.set({ page: location.pathname });\n GoogleAnalytics.pageview(location.pathname);\n }\n\n render () {\n return this.props.children;\n }\n}\n\nexport default withRouter(GAListener);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/GAListener/index.jsx","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport { dynamicImport } from 'utils/dynamicImport';\nimport AboutPage from 'pages/AboutPage';\nimport LoginPage from 'pages/LoginPage';\nimport ShowPage from 'pages/ShowPage';\nimport FourOhFourPage from 'containers/FourOhFourPage';\nconst HomePage = dynamicImport('pages/HomePage'); // or use the provided local homepage\n\nconst App = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default App;\n\n\n\n// WEBPACK FOOTER //\n// ./client/app.js","module.exports = {\n validateFile (file) {\n if (!file) {\n throw new Error('no file provided');\n }\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate size and type\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n throw new Error('Sorry, GIFs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/file.js","export const createPublishMetadata = (claim, { type }, { title, description, license, nsfw }, publishInChannel, selectedChannel) => {\n let metadata = {\n name: claim,\n title,\n description,\n license,\n nsfw,\n type,\n };\n if (publishInChannel) {\n metadata['channelName'] = selectedChannel;\n }\n return metadata;\n};\n\nexport const createPublishFormData = (file, thumbnail, metadata) => {\n let fd = new FormData();\n // append file\n fd.append('file', file);\n // append thumbnail\n if (thumbnail) {\n fd.append('thumbnail', thumbnail);\n }\n // append metadata\n for (let key in metadata) {\n if (metadata.hasOwnProperty(key)) {\n fd.append(key, metadata[key]);\n }\n }\n return fd;\n};\n\nexport const createThumbnailUrl = (channel, channelId, claim, host) => {\n return `${host}/${channel}:${channelId}/${claim}-thumb.png`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/publish.js","export const validateChannelSelection = (publishInChannel, selectedChannel, loggedInChannel) => {\n if (publishInChannel && (selectedChannel !== loggedInChannel.name)) {\n throw new Error('Log in to a channel or select Anonymous');\n }\n};\n\nexport const validatePublishParams = (file, claim, urlError) => {\n if (!file) {\n throw new Error('Please choose a file');\n }\n if (!claim) {\n throw new Error('Please enter a URL');\n }\n if (urlError) {\n throw new Error('Fix the url');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/validate.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ActiveStatusBar from 'components/ActiveStatusBar';\nimport InactiveStatusBar from 'components/InactiveStatusBar';\n\nclass ProgressBar extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n bars : [],\n index : 0,\n incrementer: 1,\n };\n this.createBars = this.createBars.bind(this);\n this.startProgressBar = this.startProgressBar.bind(this);\n this.updateProgressBar = this.updateProgressBar.bind(this);\n this.stopProgressBar = this.stopProgressBar.bind(this);\n }\n componentDidMount () {\n this.createBars();\n this.startProgressBar();\n }\n componentWillUnmount () {\n this.stopProgressBar();\n }\n createBars () {\n const bars = [];\n for (let i = 0; i <= this.props.size; i++) {\n bars.push({isActive: false});\n }\n this.setState({ bars });\n }\n startProgressBar () {\n this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);\n };\n updateProgressBar () {\n let index = this.state.index;\n let incrementer = this.state.incrementer;\n let bars = this.state.bars;\n // flip incrementer if necessary, to stay in bounds\n if ((index < 0) || (index > this.props.size)) {\n incrementer = incrementer * -1;\n index += incrementer;\n }\n // update the indexed bar\n if (incrementer > 0) {\n bars[index].isActive = true;\n } else {\n bars[index].isActive = false;\n };\n // increment index\n index += incrementer;\n // update state\n this.setState({\n bars,\n incrementer,\n index,\n });\n };\n stopProgressBar () {\n clearInterval(this.updateInterval);\n };\n render () {\n return (\n
\n {this.state.bars.map((bar, index) => bar.isActive ? : )}\n
\n );\n }\n};\n\nProgressBar.propTypes = {\n size: PropTypes.number.isRequired,\n};\n\nexport default ProgressBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ProgressBar/index.jsx","export const CHANNEL = 'CHANNEL';\nexport const ASSET_LITE = 'ASSET_LITE';\nexport const ASSET_DETAILS = 'ASSET_DETAILS';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_request_types.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { fileRequested } from 'actions/show';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select error and status\n const error = show.displayAsset.error;\n const status = show.displayAsset.status;\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n error,\n status,\n asset,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onFileRequest: (name, claimId) => {\n dispatch(fileRequested(name, claimId));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/index.js","module.exports = (helmet, html, preloadedState) => {\n // take the html and preloadedState and return the full page\n return `\n \n \n \n \n \n \n \n ${helmet.title.toString()}\n ${helmet.meta.toString()}\n ${helmet.link.toString()}\n \n \n \n \n \n \n \n \n
\n
${html}
\n
\n \n \n \n \n `;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/renderFullPage.js","export const selectSiteState = (state) => {\n return state.site;\n};\n\nexport const selectSiteHost = (state) => {\n return state.site.host;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/site.js","module.exports = require(\"babel-polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-polyfill\"\n// module id = 52\n// module chunks = 0","module.exports = require(\"whatwg-fetch\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"whatwg-fetch\"\n// module id = 53\n// module chunks = 0","// app dependencies\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst expressHandlebars = require('express-handlebars');\nconst Handlebars = require('handlebars');\nconst helmet = require('helmet');\nconst passport = require('passport');\nconst { serializeSpeechUser, deserializeSpeechUser } = require('./helpers/authHelpers.js');\nconst cookieSession = require('cookie-session');\nconst http = require('http');\n// logging dependencies\nconst logger = require('winston');\n\nfunction SpeechServer () {\n this.configureMysql = (mysqlConfig) => {\n require('../config/mysqlConfig.js').configure(mysqlConfig);\n };\n this.configureSite = (siteConfig) => {\n require('../config/siteConfig.js').configure(siteConfig);\n console.log(require('../config/siteConfig.js'));\n this.sessionKey = siteConfig.auth.sessionKey;\n this.PORT = siteConfig.details.port;\n };\n this.configureSlack = (slackConfig) => {\n require('../config/slackConfig.js').configure(slackConfig);\n };\n this.createApp = () => {\n // create an Express application\n const app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(`${__dirname}/public`)); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use((req, res, next) => { // custom logging middleware to log all incoming http requests\n logger.verbose(`Request on ${req.originalUrl} from ${req.ip}`);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n const localSignupStrategy = require('./passport/local-signup.js');\n const localLoginStrategy = require('./passport/local-login.js');\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name : 'session',\n keys : [this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000, // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n const hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars : Handlebars,\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n require('./routes/auth-routes.js')(app);\n require('./routes/api-routes.js')(app);\n require('./routes/page-routes.js')(app);\n require('./routes/asset-routes.js')(app);\n require('./routes/fallback-routes.js')(app);\n\n this.app = app;\n };\n this.initialize = () => {\n require('./helpers/configureLogger.js')(logger);\n require('./helpers/configureSlack.js')(logger);\n this.createApp();\n this.server = http.Server(this.app);\n };\n this.start = () => {\n const db = require('./models/index');\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(() => {\n this.server.listen(this.PORT, () => {\n logger.info(`Server is listening on PORT ${this.PORT}`);\n });\n })\n .catch((error) => {\n logger.error(`Startup Error:`, error);\n });\n };\n};\n\nmodule.exports = SpeechServer;\n\n\n\n// WEBPACK FOOTER //\n// ./server/server.js","module.exports = require(\"express\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express\"\n// module id = 55\n// module chunks = 0","module.exports = require(\"body-parser\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"body-parser\"\n// module id = 56\n// module chunks = 0","module.exports = require(\"express-handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express-handlebars\"\n// module id = 57\n// module chunks = 0","module.exports = require(\"handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"handlebars\"\n// module id = 58\n// module chunks = 0","module.exports = require(\"helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"helmet\"\n// module id = 59\n// module chunks = 0","const logger = require('winston');\n\nmodule.exports = {\n serializeSpeechUser (user, done) { // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser (user, done) { // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/authHelpers.js","module.exports = require(\"cookie-session\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cookie-session\"\n// module id = 61\n// module chunks = 0","module.exports = require(\"http\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"http\"\n// module id = 62\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst lbryApi = require('../helpers/lbryApi.js');\nconst logger = require('winston');\nconst db = require('../models/index');\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`);\n let userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel(`@${username}`)\n .then(tx => {\n // create user record\n const userData = {\n userName: username,\n password: password,\n };\n logger.verbose('userData >', userData);\n // create user record\n const channelData = {\n channelName : `@${username}`,\n channelClaimId: tx.claim_id,\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n const certificateData = {\n claimId: tx.claim_id,\n name : `@${username}`,\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n })\n .then(([newUser, newChannel, newCertificate]) => {\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n })\n .then(() => {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n })\n .catch(error => {\n logger.error('signup error', error);\n return done(error);\n });\n }\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-signup.js","module.exports = require(\"axios\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"axios\"\n// module id = 64\n// module chunks = 0","const lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279',\n },\n};\n\nmodule.exports = lbryConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/lbryConfig.js","module.exports = require(\"universal-analytics\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"universal-analytics\"\n// module id = 66\n// module chunks = 0","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Certificate = sequelize.define(\n 'Certificate',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateVersion: {\n type : STRING,\n default: null,\n },\n keyType: {\n type : STRING,\n default: null,\n },\n publicKey: {\n type : TEXT('long'),\n default: null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Certificate.associate = db => {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n logger.debug(`getShortChannelIdFromLongChannelId ${channelName}:${longChannelId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {name: channelName},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelIdFromShortChannelId(${channelName}, ${channelClaimId})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name : channelName,\n claimId: {\n $like: `${channelClaimId}%`,\n },\n },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n logger.debug(`getLongChannelIdFromChannelName(${channelName})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n logger.debug(`validateLongChannelId(${name}, ${claimId})`);\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelId(${channelName}, ${channelClaimId})`);\n if (channelClaimId && (channelClaimId.length === 40)) { // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) { // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/certificate.js","module.exports = (sequelize, { STRING }) => {\n const Channel = sequelize.define(\n 'Channel',\n {\n channelName: {\n type : STRING,\n allowNull: false,\n },\n channelClaimId: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Channel.associate = db => {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/channel.js","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\nconst { assetDefaults: { thumbnail: defaultThumbnail }, details: { host } } = require('../../config/siteConfig.js');\n\nfunction determineFileExtensionFromContentType (contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail (storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData (claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Claim = sequelize.define(\n 'Claim',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateId: {\n type : STRING,\n default: null,\n },\n author: {\n type : STRING,\n default: null,\n },\n description: {\n type : TEXT('long'),\n default: null,\n },\n language: {\n type : STRING,\n default: null,\n },\n license: {\n type : STRING,\n default: null,\n },\n licenseUrl: {\n type : STRING,\n default: null,\n },\n nsfw: {\n type : BOOLEAN,\n default: null,\n },\n preview: {\n type : STRING,\n default: null,\n },\n thumbnail: {\n type : STRING,\n default: null,\n },\n title: {\n type : STRING,\n default: null,\n },\n metadataVersion: {\n type : STRING,\n default: null,\n },\n contentType: {\n type : STRING,\n default: null,\n },\n source: {\n type : STRING,\n default: null,\n },\n sourceType: {\n type : STRING,\n default: null,\n },\n sourceVersion: {\n type : STRING,\n default: null,\n },\n streamVersion: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n channelName: {\n type : STRING,\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Claim.associate = db => {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n logger.debug(`Claim.getShortClaimIdFromLongClaimId for ${claimName}#${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n logger.debug(`Claim.getAllChannelClaims for ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw : true, // returns an array of only data, not an array of instances\n })\n .then(channelClaimsArray => {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(claim => {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n logger.debug(`finding claim id for claim ${claimName} from channel ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(`${result.length} records found for \"${claimName}\" in channel \"${channelClaimId}\"`);\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name,\n claimId: {\n $like: `${shortId}%`,\n }},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']], // note: maybe height and effective amount need to switch?\n })\n .then(result => {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug(`getLongClaimId(${claimName}, ${claimId})`);\n if (claimId && (claimId.length === 40)) { // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n logger.debug(`Claim.resolveClaim: ${name} ${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name, claimId },\n })\n .then(claimArray => {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error(`more than one record matches ${name}#${claimId} in db.Claim`);\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/claim.js","module.exports = (sequelize, { STRING, BOOLEAN, INTEGER }) => {\n const File = sequelize.define(\n 'File',\n {\n name: {\n type : STRING,\n allowNull: false,\n },\n claimId: {\n type : STRING,\n allowNull: false,\n },\n address: {\n type : STRING,\n allowNull: false,\n },\n outpoint: {\n type : STRING,\n allowNull: false,\n },\n height: {\n type : INTEGER,\n allowNull: false,\n default : 0,\n },\n fileName: {\n type : STRING,\n allowNull: false,\n },\n filePath: {\n type : STRING,\n allowNull: false,\n },\n fileType: {\n type: STRING,\n },\n nsfw: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: false,\n },\n trendingEligible: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: true,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n File.associate = db => {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25,\n });\n };\n\n return File;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/file.js","module.exports = (sequelize, { STRING, BOOLEAN, TEXT }) => {\n const Request = sequelize.define(\n 'Request',\n {\n action: {\n type : STRING,\n allowNull: false,\n },\n url: {\n type : STRING,\n allowNull: false,\n },\n ipAddress: {\n type : STRING,\n allowNull: true,\n },\n result: {\n type : TEXT('long'),\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Request.associate = db => {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n return Request;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/request.js","'use strict';\nconst bcrypt = require('bcrypt');\nconst logger = require('winston');\n\nmodule.exports = (sequelize, { STRING }) => {\n const User = sequelize.define(\n 'User',\n {\n userName: {\n type : STRING,\n allowNull: false,\n },\n password: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n User.associate = db => {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n this\n .update({password: hash})\n .then(() => {\n resolve();\n })\n .catch(error => {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', (user, options) => {\n logger.debug('User.beforeCreate hook...');\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/user.js","module.exports = require(\"bcrypt\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"bcrypt\"\n// module id = 73\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst logger = require('winston');\nconst db = require('../models/index');\n\nconst returnUserAndChannelInfo = (userInstance) => {\n return new Promise((resolve, reject) => {\n let userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance\n .getChannel()\n .then(({channelName, channelClaimId}) => {\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n })\n .catch(error => {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n return db.User\n .findOne({\n where: {userName: username},\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n return user.comparePassword(password)\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user)\n .then(userInfo => {\n return done(null, userInfo);\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return done(error);\n });\n },\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-login.js","const logger = require('winston');\nconst passport = require('passport');\n\nmodule.exports = (app) => {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), (req, res) => {\n logger.verbose(`successful signup for ${req.user.channelName}`);\n res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n // route for log in\n app.post('/login', (req, res, next) => {\n passport.authenticate('local-login', (err, user, info) => {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message,\n });\n }\n logger.debug('successful login');\n req.logIn(user, (err) => {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', (req, res) => {\n req.logout();\n res.status(200).json({success: true, message: 'you successfully logged out'});\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', (req, res) => {\n if (req.user) {\n res.status(200).json({success: true, data: req.user});\n } else {\n res.status(401).json({success: false, message: 'user is not logged in'});\n }\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/auth-routes.js","const logger = require('winston');\nconst multipart = require('connect-multiparty');\nconst { publishing: { uploadDirectory }, details: { host } } = require('../../config/siteConfig.js');\nconst multipartMiddleware = multipart({uploadDir: uploadDirectory});\nconst db = require('../models/index');\nconst { claimNameIsAvailable, checkChannelAvailability, publish } = require('../controllers/publishController.js');\nconst { getClaimList, resolveUri, getClaim } = require('../helpers/lbryApi.js');\nconst { addGetResultsToFileData, createBasicPublishParams, createThumbnailPublishParams, parsePublishApiRequestBody, parsePublishApiRequestFiles, createFileData } = require('../helpers/publishHelpers.js');\nconst errorHandlers = require('../helpers/errorHandlers.js');\nconst { sendGATimingEvent } = require('../helpers/googleAnalytics.js');\nconst { authenticateUser } = require('../auth/authentication.js');\nconst { getChannelData, getChannelClaims, getClaimId } = require('../controllers/serveController.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = (app) => {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n checkChannelAvailability(name)\n .then(availableName => {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', ({ ip, originalUrl, params }, res) => {\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json(shortId);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n const page = params.page;\n getChannelClaims(channelName, channelClaimId, page)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', ({ ip, originalUrl, params }, res) => {\n getClaimList(params.name)\n .then(claimsList => {\n res.status(200).json(claimsList);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId)\n .then(resolveResult => {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n let fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(`${name}#${claimId}`)]);\n })\n .then(([ fileData, getResult ]) => {\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, {name, claimId}, 'File'), getResult]);\n })\n .then(([ fileRecord, {message, completed} ]) => {\n res.status(200).json({ success: true, message, completed });\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n claimNameIsAvailable(name)\n .then(result => {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', ({ headers, ip, originalUrl, params }, res) => {\n resolveUri(`${params.name}#${params.claimId}`)\n .then(resolvedUri => {\n res.status(200).json(resolvedUri);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, ({ body, files, headers, ip, originalUrl, user }, res) => {\n // define variables\n let channelName, channelId, channelPassword, description, fileName, filePath, fileType, gaStartTime, license, name, nsfw, thumbnail, thumbnailFileName, thumbnailFilePath, thumbnailFileType, title;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n // validateApiPublishRequest(body, files);\n ({name, nsfw, license, title, description, thumbnail} = parsePublishApiRequestBody(body));\n ({fileName, filePath, fileType, thumbnailFileName, thumbnailFilePath, thumbnailFileType} = parsePublishApiRequestFiles(files));\n ({channelName, channelId, channelPassword} = body);\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // check channel authorization\n Promise.all([\n authenticateUser(channelName, channelId, channelPassword, user),\n claimNameIsAvailable(name),\n createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail),\n createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw),\n ])\n .then(([{channelName, channelClaimId}, validatedClaimName, publishParams, thumbnailPublishParams]) => {\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n })\n .then(result => {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data : {\n name,\n claimId: result.claim_id,\n url : `${host}/${result.claim_id}/${name}`,\n lbryTx : result,\n },\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', ({ ip, originalUrl, body, params }, res) => {\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json({success: true, data: shortId});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', ({ ip, originalUrl, body, params }, res) => {\n logger.debug('body:', body);\n const channelName = body.channelName;\n const channelClaimId = body.channelClaimId;\n const claimName = body.claimName;\n const claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(result => {\n if (result === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel could be found'});\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'No matching claim id could be found'});\n }\n res.status(200).json({success: true, data: result});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', ({ ip, originalUrl, body, params }, res) => {\n const claimName = params.claimName;\n let claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId)\n .then(claimInfo => {\n if (!claimInfo) {\n return res.status(404).json({success: false, message: 'No claim could be found'});\n }\n res.status(200).json({success: true, data: claimInfo});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n db.File.findOne({where: {name, claimId}})\n .then(result => {\n if (result) {\n return res.status(200).json({success: true, data: true});\n }\n res.status(200).json({success: true, data: false});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/api-routes.js","module.exports = require(\"connect-multiparty\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"connect-multiparty\"\n// module id = 77\n// module chunks = 0","const logger = require('winston');\nconst db = require('../models/index');\nconst lbryApi = require('../helpers/lbryApi.js');\nconst publishHelpers = require('../helpers/publishHelpers.js');\nconst { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('../../config/siteConfig.js');\nconst Sequelize = require('sequelize');\nconst Op = Sequelize.Op;\n\nmodule.exports = {\n publish (publishParams, fileName, fileType) {\n return new Promise((resolve, reject) => {\n let publishResults, certificateId, channelName;\n // publish the file\n return lbryApi.publishClaim(publishParams)\n .then(tx => {\n logger.info(`Successfully published ${publishParams.name} ${fileName}`, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug(`this claim was published in channel: ${publishParams.channel_name}`);\n return db.Channel.findOne({where: {channelName: publishParams.channel_name}});\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n })\n .then(channel => {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug(`certificateId: ${certificateId}`);\n })\n .then(() => {\n // create the File record\n const fileRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n fileName,\n filePath : publishParams.file_path,\n fileType,\n nsfw : publishParams.metadata.nsfw,\n };\n // create the Claim record\n const claimRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n thumbnail : publishParams.metadata.thumbnail,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n contentType: fileType,\n nsfw : publishParams.metadata.nsfw,\n amount : publishParams.bid,\n certificateId,\n channelName,\n };\n // upsert criteria\n const upsertCriteria = {\n name : publishParams.name,\n claimId: publishResults.claim_id,\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n })\n .then(([file, claim]) => {\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n })\n .then(() => {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n })\n .catch(error => {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable (name) {\n const claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim\n .findAll({\n attributes: ['address'],\n where : {\n name,\n address: {\n [Op.or]: claimAddresses,\n },\n },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n checkChannelAvailability (name) {\n return db.Channel\n .findAll({\n where: { channelName: name },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/publishController.js","module.exports = require(\"fs\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"fs\"\n// module id = 79\n// module chunks = 0","const db = require('../models/index');\nconst logger = require('winston');\n\nmodule.exports = {\n authenticateUser (channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName : null,\n channelClaimId: null,\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName : user.channelName,\n channelClaimId: user.channelClaimId,\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials (channelName, channelId, userPassword) {\n return new Promise((resolve, reject) => {\n // hoisted variables\n let channelData;\n // build the params for finding the channel\n let channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel\n .findOne({\n where: channelFindParams,\n })\n .then(channel => {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) },\n });\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n })\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/auth/authentication.js","const CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims (channelName, longChannelClaimId, claims, page) {\n const totalPages = module.exports.determineTotalPages(claims);\n const paginationPage = module.exports.getPageFromQuery(page);\n const viewData = {\n channelName : channelName,\n longChannelClaimId: longChannelClaimId,\n claims : module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage : module.exports.determinePreviousPage(paginationPage),\n currentPage : paginationPage,\n nextPage : module.exports.determineNextPage(totalPages, paginationPage),\n totalPages : totalPages,\n totalResults : module.exports.determineTotalClaims(claims),\n };\n return viewData;\n },\n getPageFromQuery (page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims (claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n const claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n const claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n const pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages (claims) {\n if (!claims) {\n return 0;\n } else {\n const totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n const fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n const remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage (currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage (totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims (claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/channelPagination.js","const { details: host } = require('../../config/siteConfig.js');\nconst handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = (app) => {\n // route for the home page\n app.get('/', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', (req, res) => {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', (req, res) => {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', (req, res) => {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', ({ params }, res) => {\n const claimId = params.claimId;\n const name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host, claimId, name });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/page-routes.js","import * as actions from 'constants/publish_action_types';\nimport { LOGIN } from 'constants/publish_channel_select_states';\nconst { publishing } = require('../../config/siteConfig.js');\n\nconst initialState = {\n disabled : publishing.disabled,\n disabledMessage : publishing.disabledMessage,\n publishInChannel : false,\n selectedChannel : LOGIN,\n showMetadataInputs: false,\n status : {\n status : null,\n message: null,\n },\n error: {\n file : null,\n url : null,\n channel : null,\n publishSubmit: null,\n },\n file : null,\n claim : '',\n metadata: {\n title : '',\n description: '',\n license : '',\n nsfw : false,\n },\n thumbnail: null,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data,\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data,\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel,\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data,\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data,\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data,\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/publish.js","export const LOGIN = 'Existing';\nexport const CREATE = 'New';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_channel_select_states.js","import * as actions from 'constants/channel_action_types';\n\nconst initialState = {\n loggedInChannel: {\n name : null,\n shortId: null,\n longId : null,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/channel.js","import * as actions from 'constants/show_action_types';\nimport { LOCAL_CHECK, ERROR } from 'constants/asset_display_states';\n\nconst initialState = {\n request: {\n error: null,\n type : null,\n id : null,\n },\n requestList : {},\n channelList : {},\n assetList : {},\n displayAsset: {\n error : null,\n status: LOCAL_CHECK,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data,\n }),\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id : action.data.requestId,\n }),\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, {\n [action.data.id]: {\n error: action.data.error,\n key : action.data.key,\n },\n }),\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, {\n [action.data.id]: {\n error : action.data.error,\n name : action.data.name,\n claimId : action.data.claimId,\n shortId : action.data.shortId,\n claimData: action.data.claimData,\n },\n }),\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.id]: {\n name : action.data.name,\n longId : action.data.longId,\n shortId : action.data.shortId,\n claimsData: action.data.claimsData,\n },\n }),\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.channelListId]: Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData,\n }),\n }),\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data,\n }),\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error : action.data,\n status: ERROR,\n }),\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/show.js","const siteConfig = require('../../config/siteConfig.js');\n\nconst {\n analytics: {\n googleId: googleAnalyticsId,\n },\n assetDefaults: {\n thumbnail: defaultThumbnail,\n description: defaultDescription,\n },\n details: {\n description,\n host,\n title,\n twitter,\n },\n} = siteConfig;\n\nconst initialState = {\n description,\n googleAnalyticsId,\n host,\n title,\n twitter,\n defaultDescription,\n defaultThumbnail,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/site.js","module.exports = require(\"react-ga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-ga\"\n// module id = 88\n// module chunks = 0","var map = {\n\t\"./canonicalLink\": 18,\n\t\"./canonicalLink.js\": 18,\n\t\"./dynamicImport\": 17,\n\t\"./dynamicImport.js\": 17,\n\t\"./file\": 43,\n\t\"./file.js\": 43,\n\t\"./lbryUri\": 19,\n\t\"./lbryUri.js\": 19,\n\t\"./metaTags\": 20,\n\t\"./metaTags.js\": 20,\n\t\"./pageTitle\": 21,\n\t\"./pageTitle.js\": 21,\n\t\"./publish\": 44,\n\t\"./publish.js\": 44,\n\t\"./request\": 6,\n\t\"./request.js\": 6,\n\t\"./validate\": 45,\n\t\"./validate.js\": 45\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 89;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/utils ^.*$\n// module id = 89\n// module chunks = 0","module.exports = require(\"cross-fetch/polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cross-fetch/polyfill\"\n// module id = 90\n// module chunks = 0","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport SEO from 'components/SEO';\n\nclass AboutPage extends React.Component {\n render () {\n return (\n
\n \n \n
\n
\n
\n

Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.

\n

TWITTER

\n

GITHUB

\n

DISCORD CHANNEL

\n

DOCUMENTATION

\n
\n
\n
\n

Spee.ch is a media-hosting site that reads from and publishes content to the LBRY blockchain.

\n

Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the LBRY network. This means that your images are stored in multiple locations without a single point of failure.

\n

Contribute

\n

If you have an idea for your own spee.ch-like site on top of LBRY, fork our github repo and go to town!

\n

If you want to improve spee.ch, join our discord channel or solve one of our github issues.

\n
\n
\n
\n
\n );\n }\n};\n\nexport default AboutPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/AboutPage/index.jsx","import React from 'react';\nimport { NavLink, withRouter } from 'react-router-dom';\nimport Logo from 'components/Logo';\nimport NavBarChannelDropdown from 'components/NavBarChannelOptionsDropdown';\nimport request from 'utils/request';\n\nconst VIEW = 'VIEW';\nconst LOGOUT = 'LOGOUT';\n\nclass NavBar extends React.Component {\n constructor (props) {\n super(props);\n this.checkForLoggedInUser = this.checkForLoggedInUser.bind(this);\n this.logoutUser = this.logoutUser.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n componentDidMount () {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n checkForLoggedInUser () {\n const params = {credentials: 'include'};\n request('/user', params)\n .then(({ data }) => {\n this.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n })\n .catch(error => {\n console.log('/user error:', error.message);\n });\n }\n logoutUser () {\n const params = {credentials: 'include'};\n request('/logout', params)\n .then(() => {\n this.props.onChannelLogout();\n })\n .catch(error => {\n console.log('/logout error', error.message);\n });\n }\n handleSelection (event) {\n const value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push(`/${this.props.channelName}:${this.props.channelLongId}`);\n break;\n default:\n break;\n }\n }\n render () {\n const { siteDescription } = this.props;\n return (\n
\n
\n \n
\n {siteDescription}\n
\n
\n Publish\n About\n { this.props.channelName ? (\n \n ) : (\n Channel\n )}\n
\n
\n
\n );\n }\n}\n\nexport default withRouter(NavBar);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/view.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nfunction Logo () {\n return (\n \n \n Logo\n Spee.ch logo\n \n \n \n Spee<h\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default Logo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/Logo/index.jsx","import React from 'react';\n\nfunction NavBarChannelDropdown ({ channelName, handleSelection, defaultSelection, VIEW, LOGOUT }) {\n return (\n \n );\n};\n\nexport default NavBarChannelDropdown;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/NavBarChannelOptionsDropdown/index.jsx","import React from 'react';\nimport Helmet from 'react-helmet';\nimport PropTypes from 'prop-types';\n\nimport { createPageTitle } from 'utils/pageTitle';\nimport { createMetaTags } from 'utils/metaTags';\nimport { createCanonicalLink } from 'utils/canonicalLink';\n\nclass SEO extends React.Component {\n render () {\n // props from state\n const { defaultDescription, defaultThumbnail, siteDescription, siteHost, siteTitle, siteTwitter } = this.props;\n // props from parent\n const { asset, channel, pageUri } = this.props;\n let { pageTitle } = this.props;\n // create page title, tags, and canonical link\n pageTitle = createPageTitle(siteTitle, pageTitle);\n const metaTags = createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n const canonicalLink = createCanonicalLink(asset, channel, pageUri, siteHost);\n // render results\n return (\n \n );\n }\n};\n\nSEO.propTypes = {\n pageTitle: PropTypes.string,\n pageUri : PropTypes.string,\n channel : PropTypes.object,\n asset : PropTypes.object,\n};\n\nexport default SEO;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/view.jsx","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/index.js","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ChannelLoginForm from 'containers/ChannelLoginForm';\nimport ChannelCreateForm from 'containers/ChannelCreateForm';\n\nclass LoginPage extends React.Component {\n componentWillReceiveProps (newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push(`/`);\n }\n }\n render () {\n return (\n
\n \n \n
\n
\n
\n

Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you're documenting important events, or making a public repository for cat gifs (password: '1234'), try creating a channel for it!

\n
\n
\n
\n

Log in to an existing channel:

\n \n

Create a brand new channel:

\n \n
\n
\n
\n
\n );\n }\n};\n\nexport default withRouter(LoginPage);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/view.jsx","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from '../../actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/index.js","import React from 'react';\nimport request from 'utils/request';\n\nclass ChannelLoginForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n name : '',\n password: '',\n };\n this.handleInput = this.handleInput.bind(this);\n this.loginToChannel = this.loginToChannel.bind(this);\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n loginToChannel (event) {\n event.preventDefault();\n const params = {\n method : 'POST',\n body : JSON.stringify({username: this.state.name, password: this.state.password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n request('login', params)\n .then(({success, channelName, shortChannelId, channelClaimId, message}) => {\n if (success) {\n this.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n this.setState({'error': message});\n };\n })\n .catch(error => {\n if (error.message) {\n this.setState({'error': error.message});\n } else {\n this.setState({'error': error});\n }\n });\n }\n render () {\n return (\n
\n
\n
\n \n
\n
\n @\n \n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n { this.state.error ? (\n

{this.state.error}

\n ) : (\n

Enter the name and password for your channel

\n )}\n
\n \n
\n
\n );\n }\n}\n\nexport default ChannelLoginForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/view.jsx","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from 'actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/index.js","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport request from 'utils/request';\n\nclass ChannelCreateForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n channel : '',\n password: '',\n status : null,\n };\n this.handleChannelInput = this.handleChannelInput.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.createChannel = this.createChannel.bind(this);\n }\n cleanseChannelInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n handleChannelInput (event) {\n let value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({channel: value});\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({error: 'Please enter a channel name'});\n }\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n updateIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n request(`/api/channel/availability/${channelWithAtSymbol}`)\n .then(() => {\n this.setState({'error': null});\n })\n .catch((error) => {\n this.setState({'error': error.message});\n });\n }\n checkIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n return request(`/api/channel/availability/${channelWithAtSymbol}`);\n }\n checkIsPasswordProvided (password) {\n return new Promise((resolve, reject) => {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n makePublishChannelRequest (username, password) {\n const params = {\n method : 'POST',\n body : JSON.stringify({username, password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n return new Promise((resolve, reject) => {\n request('/signup', params)\n .then(result => {\n return resolve(result);\n })\n .catch(error => {\n reject(new Error(`Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ${error.message}`));\n });\n });\n }\n createChannel (event) {\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password)\n .then(() => {\n return this.checkIsChannelAvailable(this.state.channel);\n })\n .then(() => {\n this.setState({status: 'We are publishing your new channel. Sit tight...'});\n return this.makePublishChannelRequest(this.state.channel, this.state.password);\n })\n .then(result => {\n this.setState({status: null});\n this.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n })\n .catch((error) => {\n if (error.message) {\n this.setState({'error': error.message, status: null});\n } else {\n this.setState({'error': error, status: null});\n };\n });\n }\n render () {\n return (\n
\n { !this.state.status ? (\n
\n
\n
\n \n
\n
\n @\n \n { (this.state.channel && !this.state.error) && {'\\u2713'} }\n { this.state.error && {'\\u2716'} }\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n {this.state.error ? (\n

{this.state.error}

\n ) : (\n

Choose a name and password for your channel

\n )}\n
\n \n
\n
\n ) : (\n
\n

{this.state.status}

\n \n
\n )}\n
\n );\n }\n}\n\nexport default ChannelCreateForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/view.jsx","import React from 'react';\n\nconst ActiveStatusBar = () => {\n return | ;\n};\n\nexport default ActiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ActiveStatusBar/index.jsx","import React from 'react';\n\nconst InactiveStatusBar = () => {\n return | ;\n};\n\nexport default InactiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/InactiveStatusBar/index.jsx","import { connect } from 'react-redux';\nimport { onHandleShowPageUri } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n return {\n error : show.request.error,\n requestType: show.request.type,\n };\n};\n\nconst mapDispatchToProps = {\n onHandleShowPageUri,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/index.js","import React from 'react';\nimport ErrorPage from 'pages/ErrorPage';\nimport ShowAssetLite from 'containers/ShowAssetLite';\nimport ShowAssetDetails from 'containers/ShowAssetDetails';\nimport ShowChannel from 'containers/ShowChannel';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\nclass ShowPage extends React.Component {\n componentDidMount () {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n componentWillReceiveProps (nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n render () {\n const { error, requestType } = this.props;\n if (error) {\n return (\n \n );\n }\n switch (requestType) {\n case CHANNEL:\n return ;\n case ASSET_LITE:\n return ;\n case ASSET_DETAILS:\n return ;\n default:\n return

loading...

;\n }\n }\n};\n\nexport default ShowPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport { Link } from 'react-router-dom';\nimport AssetDisplay from 'containers/AssetDisplay';\n\nclass ShowLite extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { name, claimId } = asset.claimData;\n return (\n
\n \n \n hosted\n via Spee.ch\n
\n );\n }\n return (\n
\n

loading asset data...

\n
\n );\n }\n};\n\nexport default ShowLite;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport { LOCAL_CHECK, UNAVAILABLE, ERROR, AVAILABLE } from 'constants/asset_display_states';\n\nclass AssetDisplay extends React.Component {\n componentDidMount () {\n const { asset: { claimData: { name, claimId } } } = this.props;\n this.props.onFileRequest(name, claimId);\n }\n render () {\n const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props;\n return (\n
\n {(status === LOCAL_CHECK) &&\n
\n

Checking to see if Spee.ch has your asset locally...

\n
\n }\n {(status === UNAVAILABLE) &&\n
\n

Sit tight, we're searching the LBRY blockchain for your asset!

\n \n

Curious what magic is happening here? Learn more.

\n
\n }\n {(status === ERROR) &&\n
\n

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the LBRY discord.

\n

{error}

\n
\n }\n {(status === AVAILABLE) &&\n (() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return (\n \n );\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

Unsupported file type

\n );\n }\n })()\n }\n
\n );\n }\n};\n\nexport default AssetDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ErrorPage from 'pages/ErrorPage';\nimport AssetTitle from 'containers/AssetTitle';\nimport AssetDisplay from 'containers/AssetDisplay';\nimport AssetInfo from 'containers/AssetInfo';\n\nclass ShowAssetDetails extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { claimData: { name } } = asset;\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowAssetDetails;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n const { claimData: { title } } = selectAsset(show);\n return {\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/index.js","import React from 'react';\n\nconst AssetTitle = ({ title }) => {\n return (\n
\n {title}\n
\n );\n};\n\nexport default AssetTitle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/index.js","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nclass AssetInfo extends React.Component {\n constructor (props) {\n super(props);\n this.copyToClipboard = this.copyToClipboard.bind(this);\n }\n copyToClipboard (event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({error: 'Oops, unable to copy'});\n }\n }\n render () {\n const { asset: { shortId, claimData : { channelName, certificateId, description, name, claimId, fileExt, contentType, thumbnail, host } } } = this.props;\n return (\n
\n {channelName &&\n
\n
\n Channel:\n
\n
\n {channelName}\n
\n
\n }\n\n {description &&\n
\n {description}\n
\n }\n\n
\n
\n
\n Share:\n
\n
\n \n twitter\n facebook\n tumblr\n reddit\n
\n
\n
\n
\n\n
\n \n );\n }\n};\n\nexport default AssetInfo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select request\n const previousRequest = show.requestList[requestId] || null;\n // select channel\n let channel;\n if (previousRequest) {\n const channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport ErrorPage from 'pages/ErrorPage';\nimport NavBar from 'containers/NavBar';\nimport ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay';\n\nclass ShowChannel extends React.Component {\n render () {\n const { channel } = this.props;\n if (channel) {\n const { name, longId, shortId } = channel;\n return (\n
\n \n \n
\n
\n

channel name: {name}

\n

full channel id: {longId}

\n

short channel id: {shortId}

\n
\n
\n \n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowChannel;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/view.jsx","import { connect } from 'react-redux';\nimport { onUpdateChannelClaims } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select channel key\n const request = show.requestList[show.request.id];\n const channelKey = request.key;\n // select channel claims\n const channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey,\n channel,\n };\n};\n\nconst mapDispatchToProps = {\n onUpdateChannelClaims,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/index.js","import React from 'react';\nimport AssetPreview from 'components/AssetPreview';\n\nclass ChannelClaimsDisplay extends React.Component {\n constructor (props) {\n super(props);\n this.showNextResultsPage = this.showNextResultsPage.bind(this);\n this.showPreviousResultsPage = this.showPreviousResultsPage.bind(this);\n }\n showPreviousResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n showNextResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n showNewPage (page) {\n const { channelKey, channel: { name, longId } } = this.props;\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n render () {\n const { channel: { claimsData: { claims, currentPage, totalPages } } } = this.props;\n return (\n
\n {(claims.length > 0) ? (\n
\n {claims.map((claim, index) => )}\n
\n {(currentPage > 1) &&\n \n }\n {(currentPage < totalPages) &&\n \n }\n
\n
\n ) : (\n

There are no claims in this channel

\n )}\n
\n );\n }\n};\n\nexport default ChannelClaimsDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({site: {defaults: { defaultThumbnail }}}) => {\n return {\n defaultThumbnail,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/index.js","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nconst AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail } }) => {\n const directSourceLink = `${claimId}/${name}.${fileExt}`;\n const showUrlLink = `/${claimId}/${name}`;\n return (\n
\n \n {(() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

unsupported file type

\n );\n }\n })()}\n \n
\n );\n};\n\nexport default AssetPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site: { host, title } }) => {\n return {\n host,\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/index.jsx","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport Helmet from 'react-helmet';\n\nclass FourOhForPage extends React.Component {\n render () {\n const {title, host} = this.props;\n return (\n
\n \n {title} - 404\n \n \n \n
\n

404

\n

That page does not exist

\n
\n
\n );\n }\n};\n\nexport default FourOhForPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/view.jsx","const { sendGAServeEvent } = require('../helpers/googleAnalytics');\nconst { determineResponseType, flipClaimNameAndIdForBackwardsCompatibility, logRequestData, getClaimIdAndServeAsset } = require('../helpers/serveHelpers.js');\nconst lbryUri = require('../helpers/lbryUri.js');\nconst handleShowRender = require('../helpers/handleShowRender.jsx');\nconst SERVE = 'SERVE';\n\nmodule.exports = (app) => {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({ claimName } = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // parse the identifier\n let isChannel, channelName, channelClaimId, claimId;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(params.identifier));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n if (!isChannel) {\n [claimId, claimName] = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({claimName} = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/asset-routes.js","const logger = require('winston');\nconst { getClaimId, getLocalFileRecord } = require('../controllers/serveController.js');\nconst { handleErrorResponse } = require('./errorHandlers.js');\n\nconst SERVE = 'SERVE';\nconst SHOW = 'SHOW';\nconst NO_FILE = 'NO_FILE';\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml ({accept}) {\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser (headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset ({accept, range}) {\n const imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n const videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId (claimId) {\n return ((claimId.length === 40) && !/[^A-Za-z0-9]/g.test(claimId));\n};\n\nfunction isValidShortId (claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId (input) {\n return (isValidClaimId(input) || isValidShortId(input));\n};\n\nfunction serveAssetToClient (claimId, name, res) {\n return getLocalFileRecord(claimId, name)\n .then(fileRecord => {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect(`/api/claim/get/${name}/${claimId}`);\n }\n // serve the file\n const {filePath, fileType} = fileRecord;\n logger.verbose(`serving file: ${filePath}`);\n const sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type' : fileType || 'image/jpeg',\n },\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n })\n .catch(error => {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset (channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(fullClaimId => {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'no claim id could be found'});\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'no channel id could be found'});\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n })\n .catch(error => {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType (hasFileExtension, headers) {\n let responseType;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) { // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) { // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility (identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n const tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData (responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/serveHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n logger.debug('parsing identifier:', identifier);\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex\n .exec(identifier)\n .map(match => match || null);\n logger.debug(`${proto}, ${value}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your url. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Invalid characters in channel name: ${nameBadChars.join(', ')}.`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId,\n claimId,\n };\n },\n parseClaim: function (claim) {\n logger.debug('parsing name:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Invalid characters in claim name: ${nameBadChars.join(', ')}.`);\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No file extension provided after separator ${modifierSeperator}.`);\n }\n if (modifierSeperator !== '.') {\n throw new Error(`The ${modifierSeperator} modifier is not supported in the claim name`);\n }\n }\n // return results\n return {\n claimName,\n };\n },\n parseModifier: function (claim) {\n logger.debug('parsing modifier:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n // Validate and process modifier\n let hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryUri.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore, applyMiddleware } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage';\nimport createSagaMiddleware from 'redux-saga';\nimport { call } from 'redux-saga/effects';\nimport { handleShowPageUri } from '../../client/sagas/show_uri';\nimport { onHandleShowPageUri } from '../../client/actions/show';\n\nimport Helmet from 'react-helmet';\n\nconst returnSagaWithParams = (saga, params) => {\n return function * () {\n yield call(saga, params);\n };\n};\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create and apply middleware\n const sagaMiddleware = createSagaMiddleware();\n const middleware = applyMiddleware(sagaMiddleware);\n\n // create a new Redux store instance\n const store = createStore(Reducer, middleware);\n\n // create saga\n const action = onHandleShowPageUri(req.params);\n const saga = returnSagaWithParams(handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware\n .run(saga)\n .done\n .then(() => {\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handleShowRender.jsx","module.exports = require(\"redux-saga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga\"\n// module id = 127\n// module chunks = 0","import { call, put, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { onRequestError, onNewChannelRequest, onNewAssetRequest } from 'actions/show';\nimport { newAssetRequest } from 'sagas/show_asset';\nimport { newChannelRequest } from 'sagas/show_channel';\nimport lbryUri from 'utils/lbryUri';\n\nfunction * parseAndUpdateIdentifierAndClaim (modifier, claim) {\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n let isChannel, channelName, channelClaimId, claimId, claimName, extension;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(modifier));\n ({ claimName, extension } = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n if (isChannel) {\n return yield call(newAssetRequest, onNewAssetRequest(claimName, null, channelName, channelClaimId, extension));\n };\n yield call(newAssetRequest, onNewAssetRequest(claimName, claimId, null, null, extension));\n}\nfunction * parseAndUpdateClaimOnly (claim) {\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n let isChannel, channelName, channelClaimId;\n try {\n ({ isChannel, channelName, channelClaimId } = lbryUri.parseIdentifier(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n // return early if this request is for a channel\n if (isChannel) {\n return yield call(newChannelRequest, onNewChannelRequest(channelName, channelClaimId));\n }\n // if not for a channel, parse the claim request\n let claimName, extension;\n try {\n ({claimName, extension} = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield call(newAssetRequest, onNewAssetRequest(claimName, null, null, null, extension));\n}\n\nexport function * handleShowPageUri (action) {\n const { identifier, claim } = action.data;\n if (identifier) {\n return yield call(parseAndUpdateIdentifierAndClaim, identifier, claim);\n }\n yield call(parseAndUpdateClaimOnly, claim);\n};\n\nexport function * watchHandleShowPageUri () {\n yield takeLatest(actions.HANDLE_SHOW_URI, handleShowPageUri);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_uri.js","import { call, put, select, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addRequestToRequestList, onRequestError, onRequestUpdate, addAssetToAssetList } from 'actions/show';\nimport { getLongClaimId, getShortId, getClaimData } from 'api/assetApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newAssetRequest (action) {\n const { requestType, requestId, name, modifier } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get long id && add request to request list\n let longId;\n try {\n ({data: longId} = yield call(getLongClaimId, host, name, modifier));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n const assetKey = `a#${name}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, assetKey));\n // is this an existing asset?\n // If this asset is in the asset list, it's already been fetched\n if (state.assetList[assetKey]) {\n return null;\n }\n // get short Id\n let shortId;\n try {\n ({data: shortId} = yield call(getShortId, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // get asset claim data\n let claimData;\n try {\n ({data: claimData} = yield call(getClaimData, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // add asset to asset list\n yield put(addAssetToAssetList(assetKey, null, name, longId, shortId, claimData));\n // clear any errors in request error\n yield put(onRequestError(null));\n};\n\nexport function * watchNewAssetRequest () {\n yield takeLatest(actions.ASSET_REQUEST_NEW, newAssetRequest);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_asset.js","import Request from 'utils/request';\n\nexport function getLongClaimId (host, name, modifier) {\n let body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n const params = {\n method : 'POST',\n headers: { 'Content-Type': 'application/json' },\n body : JSON.stringify(body),\n };\n // create url\n const url = `${host}/api/claim/long-id`;\n // return the request promise\n return Request(url, params);\n};\n\nexport function getShortId (host, name, claimId) {\n const url = `${host}/api/claim/short-id/${claimId}/${name}`;\n return Request(url);\n};\n\nexport function getClaimData (host, name, claimId) {\n const url = `${host}/api/claim/data/${name}/${claimId}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/assetApi.js","import {call, put, select, takeLatest} from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addNewChannelToChannelList, addRequestToRequestList, onRequestError, onRequestUpdate, updateChannelClaims } from 'actions/show';\nimport { getChannelClaims, getChannelData } from 'api/channelApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newChannelRequest (action) {\n const { requestType, requestId, channelName, channelId } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get channel long id\n let longId, shortId;\n try {\n ({ data: {longChannelClaimId: longId, shortChannelClaimId: shortId} } = yield call(getChannelData, host, channelName, channelId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the request in the channel requests list\n const channelKey = `c#${channelName}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, channelKey));\n // is this an existing channel?\n // If this channel is in the channel list, it's already been fetched\n if (state.channelList[channelKey]) {\n return null;\n }\n // get channel claims data\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, channelName, 1));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the channel data in the channel list\n yield put(addNewChannelToChannelList(channelKey, channelName, shortId, longId, claimsData));\n // clear any request errors\n yield put(onRequestError(null));\n}\n\nexport function * watchNewChannelRequest () {\n yield takeLatest(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n};\n\nfunction * getNewClaimsAndUpdateChannel (action) {\n const { channelKey, name, longId, page } = action.data;\n const host = yield select(selectSiteHost);\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, name, page));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield put(updateChannelClaims(channelKey, claimsData));\n}\n\nexport function * watchUpdateChannelClaims () {\n yield takeLatest(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_channel.js","import Request from 'utils/request';\n\nexport function getChannelData (host, id, name) {\n if (!id) id = 'none';\n const url = `${host}/api/channel/data/${name}/${id}`;\n return Request(url);\n};\n\nexport function getChannelClaims (host, longId, name, page) {\n if (!page) page = 1;\n const url = `${host}/api/channel/claims/${name}/${longId}/${page}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/channelApi.js","const handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = app => {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', (req, res) => {\n // send response\n handlePageRender(req, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/fallback-routes.js","const { logLevel } = require('../../config/loggerConfig');\n\nmodule.exports = (winston) => {\n // configure\n winston.configure({\n transports: [\n new (winston.transports.Console)({\n level : logLevel,\n timestamp : false,\n colorize : true,\n prettyPrint : true,\n handleExceptions : true,\n humanReadableUnhandledException: true,\n }),\n ],\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureLogger.js","const loggerConfig = {\n logLevel: 'debug', // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/loggerConfig.js","const winstonSlackWebHook = require('winston-slack-webhook').SlackWebHook;\nconst slackConfig = require('../../config/slackConfig.js');\n\nmodule.exports = (winston) => {\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = slackConfig;\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-errors-transport',\n level : 'warn',\n webhookUrl: slackWebHook,\n channel : slackErrorChannel,\n username : 'spee.ch',\n iconEmoji : ':face_with_head_bandage:',\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-info-transport',\n level : 'info',\n webhookUrl: slackWebHook,\n channel : slackInfoChannel,\n username : 'spee.ch',\n iconEmoji : ':nerd_face:',\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureSlack.js","module.exports = require(\"winston-slack-webhook\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston-slack-webhook\"\n// module id = 137\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/speech.js b/speech.js new file mode 100644 index 00000000..1a773343 --- /dev/null +++ b/speech.js @@ -0,0 +1,13 @@ +const server = require('server/server.js'); +const components = require('client/components'); +// const containers = require('client/containers'); +// const pages = require('client/pages'); + +const exports = { + server, + components, + // containers, + // pages, +}; + +module.exports = exports; diff --git a/webpack.config.js b/webpack.config.js index efcdc0b7..7295cd13 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,7 +1,7 @@ -const serverBaseConfig = require('./webpack.server.common.js'); +const packageBaseConfig = require('./webpack.package.common.js'); const clientBaseConfig = require('./webpack.client.common.js'); module.exports = [ - serverBaseConfig, + packageBaseConfig, clientBaseConfig, ]; diff --git a/webpack.dev.js b/webpack.dev.js index 21421592..807a42ac 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -1,4 +1,4 @@ -const serverBaseConfig = require('./webpack.server.common.js'); +const packageBaseConfig = require('./webpack.package.common.js'); const clientBaseConfig = require('./webpack.client.common.js'); const merge = require('webpack-merge'); @@ -8,6 +8,6 @@ const devBuildConfig = { }; module.exports = [ - merge(serverBaseConfig, devBuildConfig), + merge(packageBaseConfig, devBuildConfig), merge(clientBaseConfig, devBuildConfig), ]; diff --git a/webpack.server.common.js b/webpack.package.common.js similarity index 79% rename from webpack.server.common.js rename to webpack.package.common.js index f82280b5..5d5b0528 100644 --- a/webpack.server.common.js +++ b/webpack.package.common.js @@ -1,6 +1,7 @@ const Path = require('path'); const nodeExternals = require('webpack-node-externals'); -const REACT_ROOT = Path.resolve(__dirname, 'client/'); +const CLIENT_ROOT = Path.resolve(__dirname, 'client/'); +const SERVER_ROOT = Path.resolve(__dirname, 'server/'); module.exports = { target: 'node', @@ -8,7 +9,7 @@ module.exports = { __dirname: false, }, externals: [nodeExternals()], - entry : ['babel-polyfill', 'whatwg-fetch', './server/server.js'], + entry : ['babel-polyfill', 'whatwg-fetch', './speech.js'], output : { path : Path.join(__dirname, '/'), publicPath : '/', @@ -34,7 +35,8 @@ module.exports = { }, resolve: { modules: [ - REACT_ROOT, + CLIENT_ROOT, + SERVER_ROOT, 'node_modules', __dirname, ], diff --git a/webpack.prod.js b/webpack.prod.js index b828880e..aa824d5c 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -1,7 +1,7 @@ const webpack = require('webpack'); const merge = require('webpack-merge'); const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); -const serverBaseConfig = require('./webpack.server.common.js'); +const packageBaseConfig = require('./webpack.package.common.js'); const clientBaseConfig = require('./webpack.client.common.js'); const productionBuildConfig = { @@ -17,6 +17,6 @@ const productionBuildConfig = { }; module.exports = [ - merge(serverBaseConfig, productionBuildConfig), + merge(packageBaseConfig, productionBuildConfig), merge(clientBaseConfig, productionBuildConfig), ]; -- 2.45.2 From 6f55e579075dd5d224e67be441fb7b4035fc28ed Mon Sep 17 00:00:00 2001 From: bill bittner Date: Tue, 20 Mar 2018 15:59:52 -0700 Subject: [PATCH 2/8] updated bundles --- index.js | 2 + index.js.map | 1 + public/bundle/bundle.js | 45776 +--------------------------------- public/bundle/bundle.js.map | 2 +- 4 files changed, 10 insertions(+), 45771 deletions(-) create mode 100644 index.js create mode 100644 index.js.map diff --git a/index.js b/index.js new file mode 100644 index 00000000..d6b839f3 --- /dev/null +++ b/index.js @@ -0,0 +1,2 @@ +module.exports=function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=57)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("winston")},function(e,t){e.exports=require("react-redux")},function(e,t,n){"use strict";function r(){var e=this;this.analytics={googleId:"default"},this.assetDefaults={description:"An asset published on Spee.ch",thumbnail:"https://spee.ch/assets/img/video_thumb_default.png",title:"Spee.ch"},this.auth={sessionKey:"default"},this.componentsConfig={components:{},containers:{},pages:{}},this.details={description:"Open-source, decentralized image and video sharing.",host:"default",port:3e3,title:"Spee.ch",twitter:"@spee_ch"},this.publishing={additionalClaimAddresses:[],disabled:!1,disabledMessage:"Please check back soon.",primaryClaimAddress:"default",thumbnailChannel:"default",thumbnailChannelId:"default",uploadDirectory:"/home/lbry/Uploads"},this.configure=function(t){if(!t)return console.log("No site config received.");var n=t.analytics,r=t.assetDefaults,a=t.auth,o=t.componentsConfig,l=t.details,i=t.publishing;e.analytics=n,e.assetDefaults=r,e.auth=a,e.details=l,e.publishing=i,e.componentsConfig=o}}e.exports=new r},function(e,t){e.exports=require("react-router-dom")},function(e,t,n){"use strict";var r=n(32),a=n(1);console.log("exporting sequelize models");var o=n(29),l=o.database,i=o.username,u=o.password,s={},c=new r(l,i,u,{host:"localhost",dialect:"mysql",dialectOptions:{decimalNumbers:!0},logging:!1,pool:{max:5,min:0,idle:1e4,acquire:1e4}});c.authenticate().then(function(){a.info("Sequelize has established mysql connection successfully.")}).catch(function(e){a.error("Sequelize was unable to connect to the database:",e)});var f=n(74),d=n(75),p=n(76),m=n(77),h=n(78),g=n(79);s.Certificate=c.import("Certificate",f),s.Channel=c.import("Channel",d),s.Claim=c.import("Claim",p),s.File=c.import("File",m),s.Request=c.import("Request",h),s.User=c.import("User",g),Object.keys(s).forEach(function(e){s[e].associate&&(a.info("Associating model:",e),s[e].associate(s))}),s.sequelize=c,s.Sequelize=r,s.upsert=function(e,t,n,r){return e.findOne({where:n}).then(function(n){return n?(a.debug("updating record in db."+r),n.update(t)):(a.debug("creating record in db."+r),e.create(t))}).catch(function(e){throw a.error(r+".upsert error",e),e})},e.exports=s},function(e,t,n){"use strict";function r(e){return 204===e.status||205===e.status?null:e.json()}function a(e,t){if(e.status>=200&&e.status<300)return t;var n=new Error(t.message);throw n.response=e,n}function o(e,t){return fetch(e,t).then(function(e){return Promise.all([e,r(e)])}).then(function(e){var t=l(e,2);return a(t[0],t[1])})}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=o,n(96)},function(e,t,n){"use strict";function r(e){return{type:y.HANDLE_SHOW_URI,data:e}}function a(e){return{type:y.REQUEST_ERROR,data:e}}function o(e,t){var n=v.CHANNEL,r="cr#"+e+"#"+t;return{type:y.CHANNEL_REQUEST_NEW,data:{requestType:n,requestId:r,channelName:e,channelId:t}}}function l(e,t,n,r,a){var o=a?v.ASSET_LITE:v.ASSET_DETAILS,l="ar#"+e+"#"+t+"#"+n+"#"+r;return{type:y.ASSET_REQUEST_NEW,data:{requestType:o,requestId:l,name:e,modifier:{id:t,channel:{name:n,id:r}}}}}function i(e,t){return{type:y.REQUEST_UPDATE,data:{requestType:e,requestId:t}}}function u(e,t,n){return{type:y.REQUEST_LIST_ADD,data:{id:e,error:t,key:n}}}function s(e,t,n,r,a,o){return{type:y.ASSET_ADD,data:{id:e,error:t,name:n,claimId:r,shortId:a,claimData:o}}}function c(e,t,n,r,a){return{type:y.CHANNEL_ADD,data:{id:e,name:t,shortId:n,longId:r,claimsData:a}}}function f(e,t,n,r){return{type:y.CHANNEL_CLAIMS_UPDATE_ASYNC,data:{channelKey:e,name:t,longId:n,page:r}}}function d(e,t){return{type:y.CHANNEL_CLAIMS_UPDATE_SUCCESS,data:{channelListId:e,claimsData:t}}}function p(e,t){return{type:y.FILE_REQUESTED,data:{name:e,claimId:t}}}function m(e){return{type:y.FILE_AVAILABILITY_UPDATE,data:e}}function h(e){return{type:y.DISPLAY_ASSET_ERROR,data:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.onHandleShowPageUri=r,t.onRequestError=a,t.onNewChannelRequest=o,t.onNewAssetRequest=l,t.onRequestUpdate=i,t.addRequestToRequestList=u,t.addAssetToAssetList=s,t.addNewChannelToChannelList=c,t.onUpdateChannelClaims=f,t.updateChannelClaims=d,t.fileRequested=p,t.updateFileAvailability=m,t.updateDisplayAssetError=h;var g=n(11),y=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(g),v=n(52)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),a=n(24),o=n(25),l=n(98),i=function(e){return e&&e.__esModule?e:{default:e}}(l),u=function(e){var t=e.channel,n=e.site;return{channelName:t.loggedInChannel.name,channelShortId:t.loggedInChannel.shortId,channelLongId:t.loggedInChannel.longId,siteDescription:n.description}},s=function(e){return{onChannelLogin:function(t,n,r){e((0,a.updateLoggedInChannel)(t,n,r)),e((0,o.updateSelectedChannel)(t))},onChannelLogout:function(){e((0,a.updateLoggedInChannel)(null,null,null))}}};t.default=(0,r.connect)(u,s)(i.default)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),a=n(99),o=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){var t=e.site;return{defaultDescription:t.defaultDescription,defaultThumbnail:t.defaultThumbnail,siteDescription:t.description,siteHost:t.host,siteTitle:t.title,siteTwitter:t.twitter}};t.default=(0,r.connect)(l,null)(o.default)},function(e,t){e.exports=require("prop-types")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.HANDLE_SHOW_URI="HANDLE_SHOW_URI",t.REQUEST_ERROR="REQUEST_ERROR",t.REQUEST_UPDATE="REQUEST_UPDATE",t.ASSET_REQUEST_NEW="ASSET_REQUEST_NEW",t.CHANNEL_REQUEST_NEW="CHANNEL_REQUEST_NEW",t.REQUEST_LIST_ADD="REQUEST_LIST_ADD",t.ASSET_ADD="ASSET_ADD",t.CHANNEL_ADD="CHANNEL_ADD",t.CHANNEL_CLAIMS_UPDATE_ASYNC="CHANNEL_CLAIMS_UPDATE_ASYNC",t.CHANNEL_CLAIMS_UPDATE_SUCCESS="CHANNEL_CLAIMS_UPDATE_SUCCESS",t.FILE_REQUESTED="FILE_REQUESTED",t.FILE_AVAILABILITY_UPDATE="FILE_AVAILABILITY_UPDATE",t.DISPLAY_ASSET_ERROR="DISPLAY_ASSET_ERROR"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.selectAsset=function(e){var t=e.requestList[e.request.id],n=t.key;return e.assetList[n]},t.selectShowState=function(e){return e.show}},function(e,t){e.exports=require("react-helmet")},function(e,t){e.exports=require("redux-saga/effects")},function(e,t,n){"use strict";var r=n(71),a=n(1),o=n(72),l=o.api,i=l.apiHost,u=l.apiPort,s="http://"+i+":"+u,c=n(16),f=c.chooseGaLbrynetPublishLabel,d=c.sendGATimingEvent,p=function(e,t,n){var r=e.data;if(a.debug("lbry api data:",r),r.result)return r.result.error?(a.debug("Lbrynet api error:",r.result.error),void n(new Error(r.result.error))):void t(r.result);n(JSON.stringify(r))};e.exports={publishClaim:function(e){a.debug('lbryApi >> Publishing claim to "'+e.name+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"publish",params:e}).then(function(r){d("lbrynet","publish",f(e),t,Date.now()),p(r,n,a)}).catch(function(e){a(e)})})},getClaim:function(e){a.debug('lbryApi >> Getting Claim for "'+e+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"get",params:{uri:e,timeout:20}}).then(function(e){d("lbrynet","getClaim","GET",t,Date.now()),p(e,n,a)}).catch(function(e){a(e)})})},getClaimList:function(e){a.debug('lbryApi >> Getting claim_list for "'+e+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"claim_list",params:{name:e}}).then(function(e){d("lbrynet","getClaimList","CLAIM_LIST",t,Date.now()),p(e,n,a)}).catch(function(e){a(e)})})},resolveUri:function(e){a.debug('lbryApi >> Resolving URI for "'+e+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"resolve",params:{uri:e}}).then(function(r){var o=r.data;d("lbrynet","resolveUri","RESOLVE",t,Date.now()),o.result[e].error?a(o.result[e].error):n(o.result[e])}).catch(function(e){a(e)})})},getDownloadDirectory:function(){a.debug("lbryApi >> Retrieving the download directory path from lbry daemon...");var e=Date.now();return new Promise(function(t,n){r.post(s,{method:"settings_get"}).then(function(n){var r=n.data;if(d("lbrynet","getDownloadDirectory","SETTINGS_GET",e,Date.now()),!r.result)return new Error("Successfully connected to lbry daemon, but unable to retrieve the download directory.");t(r.result.download_directory)}).catch(function(e){a.error("Lbrynet Error:",e),t("/home/lbry/Downloads/")})})},createChannel:function(e){a.debug("lbryApi >> Creating channel for "+e+"...");var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"channel_new",params:{channel_name:e,amount:.1}}).then(function(e){d("lbrynet","createChannel","CHANNEL_NEW",t,Date.now()),p(e,n,a)}).catch(function(e){a(e)})})}}},function(e,t,n){"use strict";function r(e,t,n){return{eventCategory:"client requests",eventAction:"serve request",eventLabel:n,ipOverride:t,userAgentOverride:e["user-agent"]}}function a(e,t,n,r,a){return{userTimingCategory:e,userTimingVariableName:t,userTimingTime:a-r,userTimingLabel:n}}function o(e,t){var n=e.replace(/\./g,"-");u(c,n,{strictCidFormat:!1,https:!0}).event(t,function(e){e&&i.error("Google Analytics Event Error >>",e)})}function l(e,t){u(c,e,{strictCidFormat:!1,https:!0}).timing(t,function(e){e&&i.error("Google Analytics Event Error >>",e),i.debug("Timing event successfully sent to google analytics")})}var i=n(1),u=n(73),s=n(3),c=s.analytics.googleId,f=s.details.title;e.exports={sendGAServeEvent:function(e,t,n){o(t,r(e,t,n))},sendGATimingEvent:function(e,t,n,r,o){var i=a(e,t,n,r,o);l(f,i)},chooseGaLbrynetPublishLabel:function(e){var t=e.channel_name,n=e.channel_id;return t||n?"PUBLISH_IN_CHANNEL_CLAIM":"PUBLISH_ANONYMOUS_CLAIM"}}},function(e,t){e.exports=require("redux")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=1?r(a,t):a}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n(3),l=o.componentsConfig;t.dynamicImport=function(e){if(!e)throw new Error("no file path provided to dynamicImport()");if("string"!=typeof e)throw console.log("dynamicImport > filePath:",e),console.log("dynamicImport > filePath type:",void 0===e?"undefined":a(e)),new Error("file path provided to dynamicImport() must be a string");if(!l)return console.log("no componentsConfig found in siteConfig.js"),n(44)(""+e);var t=e.split("/").filter(function(e){return e.replace(/\s/g,"").length}),o=r(l,t);return o||n(44)(""+e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return t+"/"+e},a=function(e,t){var n=void 0,r=void 0,a=void 0,o=void 0;if(e.claimData){var l=e.claimData;n=l.channelName,r=l.certificateId,a=l.name,o=l.claimId}return n?t+"/"+n+":"+r+"/"+a:t+"/"+o+"/"+a},o=function(e,t){return t+"/"+e.name+":"+e.longId};t.createCanonicalLink=function(e,t,n,l){return e?a(e,l):t?o(t,l):r(n,l)}},function(e,t,n){"use strict";var r=function(){function e(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.exports={REGEXP_INVALID_CLAIM:/[^A-Za-z0-9-]/g,REGEXP_INVALID_CHANNEL:/[^A-Za-z0-9-@]/g,REGEXP_ADDRESS:/^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,CHANNEL_CHAR:"@",parseIdentifier:function(t){var n=new RegExp("([^:$#/]*)([:$#]?)([^/]*)"),a=n.exec(t).map(function(e){return e||null}),o=r(a,4),l=(o[0],o[1]),i=o[2],u=o[3];if(!l)throw new Error('Check your URL. No channel name provided before "'+i+'"');var s=l.startsWith(e.exports.CHANNEL_CHAR),c=s?l:null,f=void 0;if(s){if(!c)throw new Error('Check your URL. No channel name after "@".');var d=c.match(e.exports.REGEXP_INVALID_CHANNEL);if(d)throw new Error('Check your URL. Invalid characters in channel name: "'+d.join(", ")+'".')}else f=l;var p=void 0;if(i){if(!u)throw new Error('Check your URL. No modifier provided after separator "'+i+'"');if(":"!==i)throw new Error('Check your URL. The "'+i+'" modifier is not currently supported');p=u}return{isChannel:s,channelName:c,channelClaimId:p||null,claimId:f||null}},parseClaim:function(t){var n=new RegExp("([^:$#/.]*)([:$#.]?)([^/]*)"),a=n.exec(t).map(function(e){return e||null}),o=r(a,4),l=(o[0],o[1]),i=o[2],u=o[3];if(!l)throw new Error('Check your URL. No claim name provided before "."');var s=l.match(e.exports.REGEXP_INVALID_CLAIM);if(s)throw new Error('Check your URL. Invalid characters in claim name: "'+s.join(", ")+'".');if(i){if(!u)throw new Error('Check your URL. No file extension provided after separator "'+i+'".');if("."!==i)throw new Error('Check your URL. The "'+i+'" separator is not supported in the claim name.')}return{claimName:l,extension:u||null}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e){switch(e.substring(e.lastIndexOf("."))){case"jpeg":case"jpg":return"image/jpeg";case"png":return"image/png";case"gif":return"image/gif";case"mp4":return"video/mp4";default:return"image/jpeg"}}return""},a=function(e,t,n,r){return[{property:"og:title",content:n},{property:"og:url",content:e},{property:"og:site_name",content:n},{property:"og:description",content:t},{property:"twitter:site",content:r},{property:"twitter:card",content:"summary"}]},o=function(e,t,n,r){var a=r.name;return[{property:"og:title",content:a+" on "+e},{property:"og:url",content:t+"/"+a+":"+r.longId},{property:"og:site_name",content:e},{property:"og:description",content:a+", a channel on "+e},{property:"twitter:site",content:n},{property:"twitter:card",content:"summary"}]},l=function(e,t,n,a,o,l){var i=a.claimData,u=i.contentType,s=e+"/"+i.claimId+"/"+i.name,c=e+"/"+i.claimId+"/"+i.name,f=e+"/"+i.claimId+"/"+i.name+"."+i.fileExt,d=i.title||i.name,p=i.description||o,m=r(i.thumbnail),h=i.thumbnail||l,g=[{property:"og:title",content:d},{property:"og:url",content:c},{property:"og:site_name",content:t},{property:"og:description",content:p},{property:"og:image:width",content:600},{property:"og:image:height",content:315},{property:"twitter:site",content:n}];return"video/mp4"===u||"video/webm"===u?(g.push({property:"og:video",content:f}),g.push({property:"og:video:secure_url",content:f}),g.push({property:"og:video:type",content:u}),g.push({property:"og:image",content:h}),g.push({property:"og:image:type",content:m}),g.push({property:"og:type",content:"video"}),g.push({property:"twitter:card",content:"player"}),g.push({property:"twitter:player",content:s}),g.push({property:"twitter:player:width",content:600}),g.push({property:"twitter:text:player_width",content:600}),g.push({property:"twitter:player:height",content:337}),g.push({property:"twitter:player:stream",content:f}),g.push({property:"twitter:player:stream:content_type",content:u})):(g.push({property:"og:image",content:f}),g.push({property:"og:image:type",content:u}),g.push({property:"og:type",content:"article"}),g.push({property:"twitter:card",content:"summary_large_image"})),g};t.createMetaTags=function(e,t,n,r,i,u,s,c){return i?l(t,n,r,i,s,c):u?o(t,n,r,u):a(e,t,n,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.createPageTitle=function(e,t){return t?e+" - "+t:""+e}},function(e,t,n){"use strict";function r(e,t,n){return{type:o.CHANNEL_UPDATE,data:{name:e,shortId:t,longId:n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.updateLoggedInChannel=r;var a=n(41),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(a)},function(e,t,n){"use strict";function r(e){return{type:h.FILE_SELECTED,data:e}}function a(){return{type:h.FILE_CLEAR}}function o(e,t){return{type:h.METADATA_UPDATE,data:{name:e,value:t}}}function l(e){return{type:h.CLAIM_UPDATE,data:e}}function i(e){return{type:h.SET_PUBLISH_IN_CHANNEL,channel:e}}function u(e,t){return{type:h.PUBLISH_STATUS_UPDATE,data:{status:e,message:t}}}function s(e,t){return{type:h.ERROR_UPDATE,data:{name:e,value:t}}}function c(e){return{type:h.SELECTED_CHANNEL_UPDATE,data:e}}function f(e){return{type:h.TOGGLE_METADATA_INPUTS,data:e}}function d(e){return{type:h.THUMBNAIL_NEW,data:e}}function p(e){return{type:h.PUBLISH_START,data:{history:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.selectFile=r,t.clearFile=a,t.updateMetadata=o,t.updateClaim=l,t.setPublishInChannel=i,t.updatePublishStatus=u,t.updateError=s,t.updateSelectedChannel=c,t.toggleMetadataInputs=f,t.onNewThumbnail=d,t.startPublish=p;var m=n(40),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(m)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;nthis.props.size)&&(t*=-1,e+=t),n[e].isActive=t>0,e+=t,this.setState({bars:n,incrementer:t,index:e})}},{key:"stopProgressBar",value:function(){clearInterval(this.updateInterval)}},{key:"render",value:function(){return s.default.createElement("div",null,this.state.bars.map(function(e,t){return e.isActive?s.default.createElement(p.default,{key:t}):s.default.createElement(h.default,{key:t})}))}}]),t}(s.default.Component);g.propTypes={size:f.default.number.isRequired},t.default=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0;)a+=1,r=t.substring(0,a),o=o.filter(function(e){return e.claimId&&e.claimId.substring(0,a)===r});return r}}},function(e,t,n){"use strict";var r=n(1),a=n(86),o=n(3),l=o.details,i=o.publishing;e.exports={parsePublishApiRequestBody:function(e){var t=e.name,n=e.nsfw,r=e.license,a=e.title,o=e.description,l=e.thumbnail;if(!t)throw new Error("no name field found in request");if(/[^A-Za-z0-9,-]/.exec(t))throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and "-"');return n="true"===n,r=r||null,a=a||null,o=o||null,l=l||null,{name:t,nsfw:n,license:r,title:a,description:o,thumbnail:l}},parsePublishApiRequestFiles:function(t){var n=t.file,r=t.thumbnail;if(!n)throw new Error("no file with key of [file] found in request");if(!n.path)throw new Error("no file path found");if(!n.type)throw new Error("no file type found");if(!n.size)throw new Error("no file type found");if(/'/.test(n.name))throw new Error("apostrophes are not allowed in the file name");return e.exports.validateFileTypeAndSize(n),{fileName:n.name,filePath:n.path,fileType:n.type,thumbnailFileName:r?r.name:null,thumbnailFilePath:r?r.path:null,thumbnailFileType:r?r.type:null}},validateFileTypeAndSize:function(e){switch(e.type){case"image/jpeg":case"image/jpg":case"image/png":if(e.size>1e7)throw r.debug("publish > file validation > .jpeg/.jpg/.png was too big"),new Error("Sorry, images are limited to 10 megabytes.");break;case"image/gif":if(e.size>5e7)throw r.debug("publish > file validation > .gif was too big"),new Error("Sorry, .gifs are limited to 50 megabytes.");break;case"video/mp4":if(e.size>5e7)throw r.debug("publish > file validation > .mp4 was too big"),new Error("Sorry, videos are limited to 50 megabytes.");break;default:throw r.debug("publish > file validation > unrecognized file type"),new Error("The "+e.type+" content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.")}return e},createBasicPublishParams:function(e,t,n,a,o,u,s){r.debug("Creating Publish Parameters"),null!==n&&""!==n.trim()||(n=t),null!==a&&""!==a.trim()||(a=""),null!==o&&""!==o.trim()||(o=" ");var c={name:t,file_path:e,bid:.01,metadata:{description:a,title:n,author:l.title,language:"en",license:o,nsfw:u},claim_address:i.primaryClaimAddress};return s&&(c.metadata.thumbnail=s),c},createThumbnailPublishParams:function(e,t,n,a){if(e)return r.debug("Creating Thumbnail Publish Parameters"),{name:t+"-thumb",file_path:e,bid:.01,metadata:{title:t+" thumbnail",description:"a thumbnail for "+t,author:l.title,language:"en",license:n,nsfw:a},claim_address:i.primaryClaimAddress,channel_name:i.thumbnailChannel,channel_id:i.thumbnailChannelId}},deleteTemporaryFile:function(e){a.unlink(e,function(t){if(t)throw r.error("error deleting temporary file "+e),t;r.debug("successfully deleted "+e)})},addGetResultsToFileData:function(e,t){return e.fileName=t.file_name,e.filePath=t.download_path,e},createFileData:function(e){var t=e.name,n=e.claimId,r=e.outpoint,a=e.height,o=e.address,l=e.nsfw;return{name:t,claimId:n,outpoint:r,height:a,address:o,fileName:"",filePath:"",fileType:e.contentType,nsfw:l}}}},function(e,t,n){"use strict";var r=function(){function e(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=n(1);e.exports={handleErrorResponse:function(t,n,o,l){a.error("Error on "+t,e.exports.useObjectPropertiesIfNoKeys(o));var i=e.exports.returnErrorMessageAndStatus(o),u=r(i,2),s=u[0],c=u[1];l.status(s).json(e.exports.createErrorResponsePayload(s,c))},returnErrorMessageAndStatus:function(e){var t=void 0,n=void 0;return"ECONNREFUSED"===e.code?(t=503,n="Connection refused. The daemon may not be running."):(t=400,n=e.message?e.message:e),[t,n]},useObjectPropertiesIfNoKeys:function(e){if(0===Object.keys(e).length){var t={};return Object.getOwnPropertyNames(e).forEach(function(n){t[n]=e[n]}),t}return e},createErrorResponsePayload:function(e,t){return{status:e,success:!1,message:t}}}},function(e,t,n){"use strict";var r=function(){function e(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=n(5),o=n(1),l=n(88),i=l.returnPaginatedChannelClaims;e.exports={getClaimId:function(t,n,r,a){return t?e.exports.getClaimIdByChannel(t,n,r):e.exports.getClaimIdByClaim(r,a)},getClaimIdByClaim:function(e,t){return o.debug("getClaimIdByClaim("+e+", "+t+")"),new Promise(function(n,r){a.Claim.getLongClaimId(e,t).then(function(e){e||n("NO_CLAIM"),n(e)}).catch(function(e){r(e)})})},getClaimIdByChannel:function(e,t,n){return o.debug("getClaimIdByChannel("+e+", "+t+", "+n+")"),new Promise(function(o,l){a.Certificate.getLongChannelId(e,t).then(function(e){return e?Promise.all([e,a.Claim.getClaimIdByLongChannelId(e,n)]):[null,null]}).then(function(e){var t=r(e,2),n=t[0],a=t[1];return n?a?void o(a):o("NO_CLAIM"):o("NO_CHANNEL")}).catch(function(e){l(e)})})},getChannelData:function(e,t,n){return new Promise(function(n,o){a.Certificate.getLongChannelId(e,t).then(function(t){return t?Promise.all([t,a.Certificate.getShortChannelIdFromLongChannelId(t,e)]):[null,null,null]}).then(function(t){var a=r(t,2),o=a[0],l=a[1];if(!o)return n("NO_CHANNEL");n({channelName:e,longChannelClaimId:o,shortChannelClaimId:l})}).catch(function(e){o(e)})})},getChannelClaims:function(e,t,n){return new Promise(function(o,l){a.Certificate.getLongChannelId(e,t).then(function(e){return e?Promise.all([e,a.Claim.getAllChannelClaims(e)]):[null,null,null]}).then(function(t){var a=r(t,2),l=a[0],u=a[1];if(!l)return o("NO_CHANNEL");var s=i(e,l,u,n);o(s)}).catch(function(e){l(e)})})},getLocalFileRecord:function(e,t){return a.File.findOne({where:{claimId:e,name:t}}).then(function(e){return e?e.dataValues:"NO_FILE"})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(0),o=r(a),l=n(38),i=n(17),u=n(39),s=r(u),c=n(2),f=n(4),d=n(18),p=r(d),m=n(43),h=r(m),g=n(55),y=r(g),v=n(13),b=r(v);e.exports=function(e,t){var n={},r=(0,i.createStore)(s.default),a=(0,l.renderToString)(o.default.createElement(c.Provider,{store:r},o.default.createElement(f.StaticRouter,{location:e.url,context:n},o.default.createElement(p.default,null,o.default.createElement(h.default,null))))),u=b.default.renderStatic();if(n.url)return t.redirect(301,n.url);var d=r.getState();t.send((0,y.default)(u,a,d))}},function(e,t){e.exports=require("react-dom/server")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(17),o=n(90),l=r(o),i=n(92),u=r(i),s=n(93),c=r(s),f=n(94),d=r(f);t.default=(0,a.combineReducers)({channel:u.default,publish:l.default,show:c.default,site:d.default})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.FILE_SELECTED="FILE_SELECTED",t.FILE_CLEAR="FILE_CLEAR",t.METADATA_UPDATE="METADATA_UPDATE",t.CLAIM_UPDATE="CLAIM_UPDATE",t.SET_PUBLISH_IN_CHANNEL="SET_PUBLISH_IN_CHANNEL",t.PUBLISH_STATUS_UPDATE="PUBLISH_STATUS_UPDATE",t.ERROR_UPDATE="ERROR_UPDATE",t.SELECTED_CHANNEL_UPDATE="SELECTED_CHANNEL_UPDATE",t.TOGGLE_METADATA_INPUTS="TOGGLE_METADATA_INPUTS",t.THUMBNAIL_NEW="THUMBNAIL_NEW",t.PUBLISH_START="PUBLISH_START"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CHANNEL_UPDATE="CHANNEL_UPDATE"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.LOCAL_CHECK="LOCAL_CHECK",t.UNAVAILABLE="UNAVAILABLE",t.ERROR="ERROR",t.AVAILABLE="AVAILABLE"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=r(a),l=n(4),i=n(19),u=n(97),s=r(u),c=n(100),f=r(c),d=n(106),p=r(d),m=n(122),h=r(m),g=(0,i.dynamicImport)("pages/HomePage"),y=function(){return o.default.createElement(l.Switch,null,o.default.createElement(l.Route,{exact:!0,path:"/",component:g}),o.default.createElement(l.Route,{exact:!0,path:"/about",component:s.default}),o.default.createElement(l.Route,{exact:!0,path:"/login",component:f.default}),o.default.createElement(l.Route,{exact:!0,path:"/:identifier/:claim",component:p.default}),o.default.createElement(l.Route,{exact:!0,path:"/:claim",component:p.default}),o.default.createElement(l.Route,{component:h.default}))};t.default=y},function(e,t,n){function r(e){return n(a(e))}function a(e){var t=o[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}var o={"./canonicalLink":20,"./canonicalLink.js":20,"./dynamicImport":19,"./dynamicImport.js":19,"./file":45,"./file.js":45,"./lbryUri":21,"./lbryUri.js":21,"./metaTags":22,"./metaTags.js":22,"./pageTitle":23,"./pageTitle.js":23,"./publish":46,"./publish.js":46,"./request":6,"./request.js":6,"./validate":47,"./validate.js":47};r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=44},function(e,t,n){"use strict";e.exports={validateFile:function(e){if(!e)throw new Error("no file provided");if(/'/.test(e.name))throw new Error("apostrophes are not allowed in the file name");switch(e.type){case"image/jpeg":case"image/jpg":case"image/png":if(e.size>1e7)throw new Error("Sorry, images are limited to 10 megabytes.");break;case"image/gif":if(e.size>5e7)throw new Error("Sorry, GIFs are limited to 50 megabytes.");break;case"video/mp4":if(e.size>5e7)throw new Error("Sorry, videos are limited to 50 megabytes.");break;default:throw new Error(e.type+" is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.")}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.createPublishMetadata=function(e,t,n,r,a){var o=t.type,l=n.title,i=n.description,u=n.license,s=n.nsfw,c={name:e,title:l,description:i,license:u,nsfw:s,type:o};return r&&(c.channelName=a),c},t.createPublishFormData=function(e,t,n){var r=new FormData;r.append("file",e),t&&r.append("thumbnail",t);for(var a in n)n.hasOwnProperty(a)&&r.append(a,n[a]);return r},t.createThumbnailUrl=function(e,t,n,r){return r+"/"+e+":"+t+"/"+n+"-thumb.png"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.validateChannelSelection=function(e,t,n){if(e&&t!==n.name)throw new Error("Log in to a channel or select Anonymous")},t.validatePublishParams=function(e,t,n){if(!e)throw new Error("Please choose a file");if(!t)throw new Error("Please enter a URL");if(n)throw new Error("Fix the url")}},function(e,t,n){"use strict";function r(){return o.default.createElement("svg",{version:"1.1",id:"Layer_1",x:"0px",y:"0px",height:"24px",viewBox:"0 0 80 31",enableBackground:"new 0 0 80 31",className:"nav-bar-logo"},o.default.createElement(l.Link,{to:"/"},o.default.createElement("title",null,"Logo"),o.default.createElement("desc",null,"Spee.ch logo"),o.default.createElement("g",{id:"About"},o.default.createElement("g",{id:"Publish-Form-V2-_x28_filled_x29_",transform:"translate(-42.000000, -23.000000)"},o.default.createElement("g",{id:"Group-17",transform:"translate(42.000000, 22.000000)"},o.default.createElement("text",{transform:"matrix(1 0 0 1 0 20)",fontSize:"25",fontFamily:"Roboto"},"Spee\n \n \n \n \n \n \x3c!--helmet--\x3e\n '+e.title.toString()+"\n "+e.meta.toString()+"\n "+e.link.toString()+'\n \x3c!--style sheets--\x3e\n \n \n \n \x3c!--google font--\x3e\n \n \n \n
\n
'+t+"
\n
\n \\n \\n \\n \\n ';\n};\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar selectSiteState = exports.selectSiteState = function selectSiteState(state) {\n return state.site;\n};\n\nvar selectSiteHost = exports.selectSiteHost = function selectSiteHost(state) {\n return state.site.host;\n};\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(58);\n__webpack_require__(59);\nmodule.exports = __webpack_require__(60);\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"babel-polyfill\");\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"whatwg-fetch\");\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar server = __webpack_require__(61);\nvar components = __webpack_require__(139);\n// const containers = require('client/containers');\n// const pages = require('client/pages');\n\nvar _exports = {\n server: server,\n components: components\n // containers,\n // pages,\n};\n\nmodule.exports = _exports;\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// app dependencies\nvar express = __webpack_require__(62);\nvar bodyParser = __webpack_require__(63);\nvar expressHandlebars = __webpack_require__(64);\nvar Handlebars = __webpack_require__(65);\nvar helmet = __webpack_require__(66);\nvar passport = __webpack_require__(28);\n\nvar _require = __webpack_require__(67),\n serializeSpeechUser = _require.serializeSpeechUser,\n deserializeSpeechUser = _require.deserializeSpeechUser;\n\nvar cookieSession = __webpack_require__(68);\nvar http = __webpack_require__(69);\n// logging dependencies\nvar logger = __webpack_require__(1);\n\nfunction SpeechServer() {\n var _this = this;\n\n this.configureMysql = function (mysqlConfig) {\n __webpack_require__(29).configure(mysqlConfig);\n };\n this.configureSite = function (siteConfig) {\n __webpack_require__(3).configure(siteConfig);\n console.log(__webpack_require__(3));\n _this.sessionKey = siteConfig.auth.sessionKey;\n _this.PORT = siteConfig.details.port;\n };\n this.configureSlack = function (slackConfig) {\n __webpack_require__(30).configure(slackConfig);\n };\n this.createApp = function () {\n // create an Express application\n var app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(__dirname + '/public')); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use(function (req, res, next) {\n // custom logging middleware to log all incoming http requests\n logger.verbose('Request on ' + req.originalUrl + ' from ' + req.ip);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n var localSignupStrategy = __webpack_require__(70);\n var localLoginStrategy = __webpack_require__(81);\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name: 'session',\n keys: [_this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000 // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n var hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars: Handlebars\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n __webpack_require__(82)(app);\n __webpack_require__(83)(app);\n __webpack_require__(89)(app);\n __webpack_require__(124)(app);\n __webpack_require__(134)(app);\n\n _this.app = app;\n };\n this.initialize = function () {\n __webpack_require__(135)(logger);\n __webpack_require__(137)(logger);\n _this.createApp();\n _this.server = http.Server(_this.app);\n };\n this.start = function () {\n var db = __webpack_require__(5);\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(function () {\n _this.server.listen(_this.PORT, function () {\n logger.info('Server is listening on PORT ' + _this.PORT);\n });\n }).catch(function (error) {\n logger.error('Startup Error:', error);\n });\n };\n};\n\nmodule.exports = SpeechServer;\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express\");\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"body-parser\");\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express-handlebars\");\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"handlebars\");\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"helmet\");\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n serializeSpeechUser: function serializeSpeechUser(user, done) {\n // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser: function deserializeSpeechUser(user, done) {\n // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n }\n};\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cookie-session\");\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"http\");\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar PassportLocalStrategy = __webpack_require__(31).Strategy;\nvar lbryApi = __webpack_require__(15);\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n logger.verbose('new channel signup request. user: ' + username + ' pass: ' + password + ' .');\n var userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel('@' + username).then(function (tx) {\n // create user record\n var userData = {\n userName: username,\n password: password\n };\n logger.verbose('userData >', userData);\n // create user record\n var channelData = {\n channelName: '@' + username,\n channelClaimId: tx.claim_id\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n var certificateData = {\n claimId: tx.claim_id,\n name: '@' + username\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 3),\n newUser = _ref2[0],\n newChannel = _ref2[1],\n newCertificate = _ref2[2];\n\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n }).then(function () {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n }).catch(function (error) {\n logger.error('signup error', error);\n return done(error);\n });\n});\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"axios\");\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279'\n }\n};\n\nmodule.exports = lbryConfig;\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"universal-analytics\");\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(33),\n returnShortId = _require.returnShortId;\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Certificate = sequelize.define('Certificate', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateVersion: {\n type: STRING,\n default: null\n },\n keyType: {\n type: STRING,\n default: null\n },\n publicKey: {\n type: TEXT('long'),\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Certificate.associate = function (db) {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n var _this = this;\n\n logger.debug('getShortChannelIdFromLongChannelId ' + channelName + ':' + longChannelId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: channelName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n var _this2 = this;\n\n logger.debug('getLongChannelIdFromShortChannelId(' + channelName + ', ' + channelClaimId + ')');\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: {\n name: channelName,\n claimId: {\n $like: channelClaimId + '%'\n }\n },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n var _this3 = this;\n\n logger.debug('getLongChannelIdFromChannelName(' + channelName + ')');\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n var _this4 = this;\n\n logger.debug('validateLongChannelId(' + name + ', ' + claimId + ')');\n return new Promise(function (resolve, reject) {\n _this4.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug('getLongChannelId(' + channelName + ', ' + channelClaimId + ')');\n if (channelClaimId && channelClaimId.length === 40) {\n // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) {\n // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var Channel = sequelize.define('Channel', {\n channelName: {\n type: STRING,\n allowNull: false\n },\n channelClaimId: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n Channel.associate = function (db) {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n/***/ }),\n/* 76 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(33),\n returnShortId = _require.returnShortId;\n\nvar _require2 = __webpack_require__(3),\n defaultThumbnail = _require2.assetDefaults.thumbnail,\n host = _require2.details.host;\n\nfunction determineFileExtensionFromContentType(contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail(storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData(claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Claim = sequelize.define('Claim', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateId: {\n type: STRING,\n default: null\n },\n author: {\n type: STRING,\n default: null\n },\n description: {\n type: TEXT('long'),\n default: null\n },\n language: {\n type: STRING,\n default: null\n },\n license: {\n type: STRING,\n default: null\n },\n licenseUrl: {\n type: STRING,\n default: null\n },\n nsfw: {\n type: BOOLEAN,\n default: null\n },\n preview: {\n type: STRING,\n default: null\n },\n thumbnail: {\n type: STRING,\n default: null\n },\n title: {\n type: STRING,\n default: null\n },\n metadataVersion: {\n type: STRING,\n default: null\n },\n contentType: {\n type: STRING,\n default: null\n },\n source: {\n type: STRING,\n default: null\n },\n sourceType: {\n type: STRING,\n default: null\n },\n sourceVersion: {\n type: STRING,\n default: null\n },\n streamVersion: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n channelName: {\n type: STRING,\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Claim.associate = function (db) {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n var _this = this;\n\n logger.debug('Claim.getShortClaimIdFromLongClaimId for ' + claimName + '#' + claimId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: claimName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n var _this2 = this;\n\n logger.debug('Claim.getAllChannelClaims for ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw: true // returns an array of only data, not an array of instances\n }).then(function (channelClaimsArray) {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(function (claim) {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n var _this3 = this;\n\n logger.debug('finding claim id for claim ' + claimName + ' from channel ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(result.length + ' records found for \"' + claimName + '\" in channel \"' + channelClaimId + '\"');\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n var _this4 = this;\n\n return new Promise(function (resolve, reject) {\n _this4.findAll({\n where: {\n name: name,\n claimId: {\n $like: shortId + '%'\n } },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n var _this5 = this;\n\n return new Promise(function (resolve, reject) {\n _this5.findAll({\n where: { name: name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] // note: maybe height and effective amount need to switch?\n }).then(function (result) {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n var _this6 = this;\n\n return new Promise(function (resolve, reject) {\n _this6.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug('getLongClaimId(' + claimName + ', ' + claimId + ')');\n if (claimId && claimId.length === 40) {\n // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n var _this7 = this;\n\n logger.debug('Claim.resolveClaim: ' + name + ' ' + claimId);\n return new Promise(function (resolve, reject) {\n _this7.findAll({\n where: { name: name, claimId: claimId }\n }).then(function (claimArray) {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error('more than one record matches ' + name + '#' + claimId + ' in db.Claim');\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER;\n\n var File = sequelize.define('File', {\n name: {\n type: STRING,\n allowNull: false\n },\n claimId: {\n type: STRING,\n allowNull: false\n },\n address: {\n type: STRING,\n allowNull: false\n },\n outpoint: {\n type: STRING,\n allowNull: false\n },\n height: {\n type: INTEGER,\n allowNull: false,\n default: 0\n },\n fileName: {\n type: STRING,\n allowNull: false\n },\n filePath: {\n type: STRING,\n allowNull: false\n },\n fileType: {\n type: STRING\n },\n nsfw: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: false\n },\n trendingEligible: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: true\n }\n }, {\n freezeTableName: true\n });\n\n File.associate = function (db) {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25\n });\n };\n\n return File;\n};\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n TEXT = _ref.TEXT;\n\n var Request = sequelize.define('Request', {\n action: {\n type: STRING,\n allowNull: false\n },\n url: {\n type: STRING,\n allowNull: false\n },\n ipAddress: {\n type: STRING,\n allowNull: true\n },\n result: {\n type: TEXT('long'),\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Request.associate = function (db) {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n return Request;\n};\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar bcrypt = __webpack_require__(80);\nvar logger = __webpack_require__(1);\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var User = sequelize.define('User', {\n userName: {\n type: STRING,\n allowNull: false\n },\n password: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n User.associate = function (db) {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n _this.update({ password: hash }).then(function () {\n resolve();\n }).catch(function (error) {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', function (user, options) {\n logger.debug('User.beforeCreate hook...');\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"bcrypt\");\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PassportLocalStrategy = __webpack_require__(31).Strategy;\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\n\nvar returnUserAndChannelInfo = function returnUserAndChannelInfo(userInstance) {\n return new Promise(function (resolve, reject) {\n var userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance.getChannel().then(function (_ref) {\n var channelName = _ref.channelName,\n channelClaimId = _ref.channelClaimId;\n\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n }).catch(function (error) {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n return db.User.findOne({\n where: { userName: username }\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n return user.comparePassword(password).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user).then(function (userInfo) {\n return done(null, userInfo);\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return done(error);\n });\n});\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\nvar passport = __webpack_require__(28);\n\nmodule.exports = function (app) {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), function (req, res) {\n logger.verbose('successful signup for ' + req.user.channelName);\n res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n // route for log in\n app.post('/login', function (req, res, next) {\n passport.authenticate('local-login', function (err, user, info) {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message\n });\n }\n logger.debug('successful login');\n req.logIn(user, function (err) {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', function (req, res) {\n req.logout();\n res.status(200).json({ success: true, message: 'you successfully logged out' });\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', function (req, res) {\n if (req.user) {\n res.status(200).json({ success: true, data: req.user });\n } else {\n res.status(401).json({ success: false, message: 'user is not logged in' });\n }\n });\n};\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(1);\nvar multipart = __webpack_require__(84);\n\nvar _require = __webpack_require__(3),\n uploadDirectory = _require.publishing.uploadDirectory,\n host = _require.details.host;\n\nvar multipartMiddleware = multipart({ uploadDir: uploadDirectory });\nvar db = __webpack_require__(5);\n\nvar _require2 = __webpack_require__(85),\n claimNameIsAvailable = _require2.claimNameIsAvailable,\n checkChannelAvailability = _require2.checkChannelAvailability,\n publish = _require2.publish;\n\nvar _require3 = __webpack_require__(15),\n getClaimList = _require3.getClaimList,\n resolveUri = _require3.resolveUri,\n getClaim = _require3.getClaim;\n\nvar _require4 = __webpack_require__(34),\n addGetResultsToFileData = _require4.addGetResultsToFileData,\n createBasicPublishParams = _require4.createBasicPublishParams,\n createThumbnailPublishParams = _require4.createThumbnailPublishParams,\n parsePublishApiRequestBody = _require4.parsePublishApiRequestBody,\n parsePublishApiRequestFiles = _require4.parsePublishApiRequestFiles,\n createFileData = _require4.createFileData;\n\nvar errorHandlers = __webpack_require__(35);\n\nvar _require5 = __webpack_require__(16),\n sendGATimingEvent = _require5.sendGATimingEvent;\n\nvar _require6 = __webpack_require__(87),\n authenticateUser = _require6.authenticateUser;\n\nvar _require7 = __webpack_require__(36),\n getChannelData = _require7.getChannelData,\n getChannelClaims = _require7.getChannelClaims,\n getClaimId = _require7.getClaimId;\n\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = function (app) {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', function (_ref, res) {\n var ip = _ref.ip,\n originalUrl = _ref.originalUrl,\n name = _ref.params.name;\n\n var gaStartTime = Date.now();\n checkChannelAvailability(name).then(function (availableName) {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', function (_ref2, res) {\n var ip = _ref2.ip,\n originalUrl = _ref2.originalUrl,\n params = _ref2.params;\n\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name).then(function (shortId) {\n res.status(200).json(shortId);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', function (_ref3, res) {\n var ip = _ref3.ip,\n originalUrl = _ref3.originalUrl,\n body = _ref3.body,\n params = _ref3.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', function (_ref4, res) {\n var ip = _ref4.ip,\n originalUrl = _ref4.originalUrl,\n body = _ref4.body,\n params = _ref4.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n var page = params.page;\n getChannelClaims(channelName, channelClaimId, page).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', function (_ref5, res) {\n var ip = _ref5.ip,\n originalUrl = _ref5.originalUrl,\n params = _ref5.params;\n\n getClaimList(params.name).then(function (claimsList) {\n res.status(200).json(claimsList);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', function (_ref6, res) {\n var ip = _ref6.ip,\n originalUrl = _ref6.originalUrl,\n params = _ref6.params;\n\n var name = params.name;\n var claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId).then(function (resolveResult) {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n var fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(name + '#' + claimId)]);\n }).then(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n fileData = _ref8[0],\n getResult = _ref8[1];\n\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, { name: name, claimId: claimId }, 'File'), getResult]);\n }).then(function (_ref9) {\n var _ref10 = _slicedToArray(_ref9, 2),\n fileRecord = _ref10[0],\n _ref10$ = _ref10[1],\n message = _ref10$.message,\n completed = _ref10$.completed;\n\n res.status(200).json({ success: true, message: message, completed: completed });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', function (_ref11, res) {\n var ip = _ref11.ip,\n originalUrl = _ref11.originalUrl,\n name = _ref11.params.name;\n\n var gaStartTime = Date.now();\n claimNameIsAvailable(name).then(function (result) {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', function (_ref12, res) {\n var headers = _ref12.headers,\n ip = _ref12.ip,\n originalUrl = _ref12.originalUrl,\n params = _ref12.params;\n\n resolveUri(params.name + '#' + params.claimId).then(function (resolvedUri) {\n res.status(200).json(resolvedUri);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, function (_ref13, res) {\n var body = _ref13.body,\n files = _ref13.files,\n headers = _ref13.headers,\n ip = _ref13.ip,\n originalUrl = _ref13.originalUrl,\n user = _ref13.user;\n\n // define variables\n var channelName = void 0,\n channelId = void 0,\n channelPassword = void 0,\n description = void 0,\n fileName = void 0,\n filePath = void 0,\n fileType = void 0,\n gaStartTime = void 0,\n license = void 0,\n name = void 0,\n nsfw = void 0,\n thumbnail = void 0,\n thumbnailFileName = void 0,\n thumbnailFilePath = void 0,\n thumbnailFileType = void 0,\n title = void 0;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n var _parsePublishApiReque = parsePublishApiRequestBody(body);\n // validateApiPublishRequest(body, files);\n\n\n name = _parsePublishApiReque.name;\n nsfw = _parsePublishApiReque.nsfw;\n license = _parsePublishApiReque.license;\n title = _parsePublishApiReque.title;\n description = _parsePublishApiReque.description;\n thumbnail = _parsePublishApiReque.thumbnail;\n\n var _parsePublishApiReque2 = parsePublishApiRequestFiles(files);\n\n fileName = _parsePublishApiReque2.fileName;\n filePath = _parsePublishApiReque2.filePath;\n fileType = _parsePublishApiReque2.fileType;\n thumbnailFileName = _parsePublishApiReque2.thumbnailFileName;\n thumbnailFilePath = _parsePublishApiReque2.thumbnailFilePath;\n thumbnailFileType = _parsePublishApiReque2.thumbnailFileType;\n channelName = body.channelName;\n channelId = body.channelId;\n channelPassword = body.channelPassword;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // check channel authorization\n Promise.all([authenticateUser(channelName, channelId, channelPassword, user), claimNameIsAvailable(name), createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail), createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw)]).then(function (_ref14) {\n var _ref15 = _slicedToArray(_ref14, 4),\n _ref15$ = _ref15[0],\n channelName = _ref15$.channelName,\n channelClaimId = _ref15$.channelClaimId,\n validatedClaimName = _ref15[1],\n publishParams = _ref15[2],\n thumbnailPublishParams = _ref15[3];\n\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n }).then(function (result) {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data: {\n name: name,\n claimId: result.claim_id,\n url: host + '/' + result.claim_id + '/' + name,\n lbryTx: result\n }\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', function (_ref16, res) {\n var ip = _ref16.ip,\n originalUrl = _ref16.originalUrl,\n body = _ref16.body,\n params = _ref16.params;\n\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name).then(function (shortId) {\n res.status(200).json({ success: true, data: shortId });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', function (_ref17, res) {\n var ip = _ref17.ip,\n originalUrl = _ref17.originalUrl,\n body = _ref17.body,\n params = _ref17.params;\n\n logger.debug('body:', body);\n var channelName = body.channelName;\n var channelClaimId = body.channelClaimId;\n var claimName = body.claimName;\n var claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (result) {\n if (result === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel could be found' });\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'No matching claim id could be found' });\n }\n res.status(200).json({ success: true, data: result });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', function (_ref18, res) {\n var ip = _ref18.ip,\n originalUrl = _ref18.originalUrl,\n body = _ref18.body,\n params = _ref18.params;\n\n var claimName = params.claimName;\n var claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId).then(function (claimInfo) {\n if (!claimInfo) {\n return res.status(404).json({ success: false, message: 'No claim could be found' });\n }\n res.status(200).json({ success: true, data: claimInfo });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', function (_ref19, res) {\n var ip = _ref19.ip,\n originalUrl = _ref19.originalUrl,\n params = _ref19.params;\n\n var name = params.name;\n var claimId = params.claimId;\n db.File.findOne({ where: { name: name, claimId: claimId } }).then(function (result) {\n if (result) {\n return res.status(200).json({ success: true, data: true });\n }\n res.status(200).json({ success: true, data: false });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"connect-multiparty\");\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _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; }\n\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\nvar lbryApi = __webpack_require__(15);\nvar publishHelpers = __webpack_require__(34);\n\nvar _require = __webpack_require__(3),\n _require$publishing = _require.publishing,\n primaryClaimAddress = _require$publishing.primaryClaimAddress,\n additionalClaimAddresses = _require$publishing.additionalClaimAddresses;\n\nvar Sequelize = __webpack_require__(32);\nvar Op = Sequelize.Op;\n\nmodule.exports = {\n publish: function publish(publishParams, fileName, fileType) {\n return new Promise(function (resolve, reject) {\n var publishResults = void 0,\n certificateId = void 0,\n channelName = void 0;\n // publish the file\n return lbryApi.publishClaim(publishParams).then(function (tx) {\n logger.info('Successfully published ' + publishParams.name + ' ' + fileName, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug('this claim was published in channel: ' + publishParams.channel_name);\n return db.Channel.findOne({ where: { channelName: publishParams.channel_name } });\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n }).then(function (channel) {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug('certificateId: ' + certificateId);\n }).then(function () {\n // create the File record\n var fileRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n fileName: fileName,\n filePath: publishParams.file_path,\n fileType: fileType,\n nsfw: publishParams.metadata.nsfw\n };\n // create the Claim record\n var claimRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n thumbnail: publishParams.metadata.thumbnail,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n contentType: fileType,\n nsfw: publishParams.metadata.nsfw,\n amount: publishParams.bid,\n certificateId: certificateId,\n channelName: channelName\n };\n // upsert criteria\n var upsertCriteria = {\n name: publishParams.name,\n claimId: publishResults.claim_id\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n file = _ref2[0],\n claim = _ref2[1];\n\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n }).then(function () {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n }).catch(function (error) {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable: function claimNameIsAvailable(name) {\n var claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim.findAll({\n attributes: ['address'],\n where: {\n name: name,\n address: _defineProperty({}, Op.or, claimAddresses)\n }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n }).catch(function (error) {\n throw error;\n });\n },\n checkChannelAvailability: function checkChannelAvailability(name) {\n return db.Channel.findAll({\n where: { channelName: name }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n }).catch(function (error) {\n throw error;\n });\n }\n};\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"fs\");\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar db = __webpack_require__(5);\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n authenticateUser: function authenticateUser(channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName: null,\n channelClaimId: null\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName: user.channelName,\n channelClaimId: user.channelClaimId\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials: function authenticateChannelCredentials(channelName, channelId, userPassword) {\n return new Promise(function (resolve, reject) {\n // hoisted variables\n var channelData = void 0;\n // build the params for finding the channel\n var channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel.findOne({\n where: channelFindParams\n }).then(function (channel) {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) }\n });\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n }).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims: function returnPaginatedChannelClaims(channelName, longChannelClaimId, claims, page) {\n var totalPages = module.exports.determineTotalPages(claims);\n var paginationPage = module.exports.getPageFromQuery(page);\n var viewData = {\n channelName: channelName,\n longChannelClaimId: longChannelClaimId,\n claims: module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage: module.exports.determinePreviousPage(paginationPage),\n currentPage: paginationPage,\n nextPage: module.exports.determineNextPage(totalPages, paginationPage),\n totalPages: totalPages,\n totalResults: module.exports.determineTotalClaims(claims)\n };\n return viewData;\n },\n getPageFromQuery: function getPageFromQuery(page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims: function extractPageFromClaims(claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n var claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n var claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n var pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages: function determineTotalPages(claims) {\n if (!claims) {\n return 0;\n } else {\n var totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n var fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n var remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage: function determinePreviousPage(currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage: function determineNextPage(totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims: function determineTotalClaims(claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n }\n};\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(3),\n host = _require.details;\n\nvar handlePageRender = __webpack_require__(37);\n\nmodule.exports = function (app) {\n // route for the home page\n app.get('/', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', function (req, res) {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', function (req, res) {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', function (req, res) {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', function (_ref, res) {\n var params = _ref.params;\n\n var claimId = params.claimId;\n var name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host: host, claimId: claimId, name: name });\n });\n};\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data\n });\n default:\n return state;\n }\n};\n\nvar _publish_action_types = __webpack_require__(40);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nvar _publish_channel_select_states = __webpack_require__(91);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar _require = __webpack_require__(3),\n publishing = _require.publishing;\n\nvar initialState = {\n disabled: publishing.disabled,\n disabledMessage: publishing.disabledMessage,\n publishInChannel: false,\n selectedChannel: _publish_channel_select_states.LOGIN,\n showMetadataInputs: false,\n status: {\n status: null,\n message: null\n },\n error: {\n file: null,\n url: null,\n channel: null,\n publishSubmit: null\n },\n file: null,\n claim: '',\n metadata: {\n title: '',\n description: '',\n license: '',\n nsfw: false\n },\n thumbnail: null\n};\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOGIN = exports.LOGIN = 'Existing';\nvar CREATE = exports.CREATE = 'New';\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data\n });\n default:\n return state;\n }\n};\n\nvar _channel_action_types = __webpack_require__(41);\n\nvar actions = _interopRequireWildcard(_channel_action_types);\n\nfunction _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; } }\n\nvar initialState = {\n loggedInChannel: {\n name: null,\n shortId: null,\n longId: null\n }\n};\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data\n })\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id: action.data.requestId\n })\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n key: action.data.key\n }))\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n name: action.data.name,\n claimId: action.data.claimId,\n shortId: action.data.shortId,\n claimData: action.data.claimData\n }))\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.id, {\n name: action.data.name,\n longId: action.data.longId,\n shortId: action.data.shortId,\n claimsData: action.data.claimsData\n }))\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.channelListId, Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData\n })))\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data\n })\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error: action.data,\n status: _asset_display_states.ERROR\n })\n });\n default:\n return state;\n }\n};\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _asset_display_states = __webpack_require__(42);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar initialState = {\n request: {\n error: null,\n type: null,\n id: null\n },\n requestList: {},\n channelList: {},\n assetList: {},\n displayAsset: {\n error: null,\n status: _asset_display_states.LOCAL_CHECK\n }\n};\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n default:\n return state;\n }\n};\n\nvar siteConfig = __webpack_require__(3);\n\nvar googleAnalyticsId = siteConfig.analytics.googleId,\n _siteConfig$assetDefa = siteConfig.assetDefaults,\n defaultThumbnail = _siteConfig$assetDefa.thumbnail,\n defaultDescription = _siteConfig$assetDefa.description,\n _siteConfig$details = siteConfig.details,\n description = _siteConfig$details.description,\n host = _siteConfig$details.host,\n title = _siteConfig$details.title,\n twitter = _siteConfig$details.twitter;\n\n\nvar initialState = {\n description: description,\n googleAnalyticsId: googleAnalyticsId,\n host: host,\n title: title,\n twitter: twitter,\n defaultDescription: defaultDescription,\n defaultThumbnail: defaultThumbnail\n};\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-ga\");\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cross-fetch/polyfill\");\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AboutPage = function (_React$Component) {\n _inherits(AboutPage, _React$Component);\n\n function AboutPage() {\n _classCallCheck(this, AboutPage);\n\n return _possibleConstructorReturn(this, (AboutPage.__proto__ || Object.getPrototypeOf(AboutPage)).apply(this, arguments));\n }\n\n _createClass(AboutPage, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'About', pageUri: 'about' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n { className: 'pull-quote' },\n 'Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/spee_ch' },\n 'TWITTER'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch' },\n 'GITHUB'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://discord.gg/YjYbwhS' },\n 'DISCORD CHANNEL'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch/blob/master/README.md' },\n 'DOCUMENTATION'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a media-hosting site that reads from and publishes content to the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io' },\n 'LBRY'\n ),\n ' blockchain.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io/get' },\n 'LBRY'\n ),\n ' network. This means that your images are stored in multiple locations without a single point of failure.'\n ),\n _react2.default.createElement(\n 'h3',\n null,\n 'Contribute'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you have an idea for your own spee.ch-like site on top of LBRY, fork our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch' },\n 'github repo'\n ),\n ' and go to town!'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you want to improve spee.ch, join our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS' },\n 'discord channel'\n ),\n ' or solve one of our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch/issues' },\n 'github issues'\n ),\n '.'\n )\n )\n )\n )\n );\n }\n }]);\n\n return AboutPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = AboutPage;\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _Logo = __webpack_require__(48);\n\nvar _Logo2 = _interopRequireDefault(_Logo);\n\nvar _NavBarChannelOptionsDropdown = __webpack_require__(49);\n\nvar _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar VIEW = 'VIEW';\nvar LOGOUT = 'LOGOUT';\n\nvar NavBar = function (_React$Component) {\n _inherits(NavBar, _React$Component);\n\n function NavBar(props) {\n _classCallCheck(this, NavBar);\n\n var _this = _possibleConstructorReturn(this, (NavBar.__proto__ || Object.getPrototypeOf(NavBar)).call(this, props));\n\n _this.checkForLoggedInUser = _this.checkForLoggedInUser.bind(_this);\n _this.logoutUser = _this.logoutUser.bind(_this);\n _this.handleSelection = _this.handleSelection.bind(_this);\n return _this;\n }\n\n _createClass(NavBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n }, {\n key: 'checkForLoggedInUser',\n value: function checkForLoggedInUser() {\n var _this2 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/user', params).then(function (_ref) {\n var data = _ref.data;\n\n _this2.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n }).catch(function (error) {\n console.log('/user error:', error.message);\n });\n }\n }, {\n key: 'logoutUser',\n value: function logoutUser() {\n var _this3 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/logout', params).then(function () {\n _this3.props.onChannelLogout();\n }).catch(function (error) {\n console.log('/logout error', error.message);\n });\n }\n }, {\n key: 'handleSelection',\n value: function handleSelection(event) {\n var value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push('/' + this.props.channelName + ':' + this.props.channelLongId);\n break;\n default:\n break;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var siteDescription = this.props.siteDescription;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--wide nav-bar' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--short flex-container--row flex-container--space-between-center' },\n _react2.default.createElement(_Logo2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--center' },\n _react2.default.createElement(\n 'span',\n { className: 'nav-bar-tagline' },\n siteDescription\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--right' },\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/', exact: true },\n 'Publish'\n ),\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/about' },\n 'About'\n ),\n this.props.channelName ? _react2.default.createElement(_NavBarChannelOptionsDropdown2.default, {\n channelName: this.props.channelName,\n handleSelection: this.handleSelection,\n defaultSelection: this.props.channelName,\n VIEW: VIEW,\n LOGOUT: LOGOUT\n }) : _react2.default.createElement(\n _reactRouterDom.NavLink,\n { id: 'nav-bar-login-link', className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/login' },\n 'Channel'\n )\n )\n )\n );\n }\n }]);\n\n return NavBar;\n}(_react2.default.Component);\n\nexports.default = (0, _reactRouterDom.withRouter)(NavBar);\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _pageTitle = __webpack_require__(23);\n\nvar _metaTags = __webpack_require__(22);\n\nvar _canonicalLink = __webpack_require__(20);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SEO = function (_React$Component) {\n _inherits(SEO, _React$Component);\n\n function SEO() {\n _classCallCheck(this, SEO);\n\n return _possibleConstructorReturn(this, (SEO.__proto__ || Object.getPrototypeOf(SEO)).apply(this, arguments));\n }\n\n _createClass(SEO, [{\n key: 'render',\n value: function render() {\n // props from state\n var _props = this.props,\n defaultDescription = _props.defaultDescription,\n defaultThumbnail = _props.defaultThumbnail,\n siteDescription = _props.siteDescription,\n siteHost = _props.siteHost,\n siteTitle = _props.siteTitle,\n siteTwitter = _props.siteTwitter;\n // props from parent\n\n var _props2 = this.props,\n asset = _props2.asset,\n channel = _props2.channel,\n pageUri = _props2.pageUri;\n var pageTitle = this.props.pageTitle;\n // create page title, tags, and canonical link\n\n pageTitle = (0, _pageTitle.createPageTitle)(siteTitle, pageTitle);\n var metaTags = (0, _metaTags.createMetaTags)(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n var canonicalLink = (0, _canonicalLink.createCanonicalLink)(asset, channel, pageUri, siteHost);\n // render results\n return _react2.default.createElement(_reactHelmet2.default, {\n title: pageTitle,\n meta: metaTags,\n link: [{ rel: 'canonical', href: canonicalLink }]\n });\n }\n }]);\n\n return SEO;\n}(_react2.default.Component);\n\n;\n\nSEO.propTypes = {\n pageTitle: _propTypes2.default.string,\n pageUri: _propTypes2.default.string,\n channel: _propTypes2.default.object,\n asset: _propTypes2.default.object\n};\n\nexports.default = SEO;\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(101);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel;\n\n return {\n loggedInChannelName: channel.loggedInChannel.name\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelLoginForm = __webpack_require__(102);\n\nvar _ChannelLoginForm2 = _interopRequireDefault(_ChannelLoginForm);\n\nvar _ChannelCreateForm = __webpack_require__(104);\n\nvar _ChannelCreateForm2 = _interopRequireDefault(_ChannelCreateForm);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar LoginPage = function (_React$Component) {\n _inherits(LoginPage, _React$Component);\n\n function LoginPage() {\n _classCallCheck(this, LoginPage);\n\n return _possibleConstructorReturn(this, (LoginPage.__proto__ || Object.getPrototypeOf(LoginPage)).apply(this, arguments));\n }\n\n _createClass(LoginPage, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push('/');\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'Login', pageUri: 'login' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you\\'re ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: '/@catalonia2017:43dcf47163caa21d8404d9fe9b30f78ef3e146a8' },\n 'documenting important events'\n ),\n ', or making a public repository for ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: '/@catGifs' },\n 'cat gifs'\n ),\n ' (password: \\'1234\\'), try creating a channel for it!'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'h3',\n { className: 'h3--no-bottom' },\n 'Log in to an existing channel:'\n ),\n _react2.default.createElement(_ChannelLoginForm2.default, null),\n _react2.default.createElement(\n 'h3',\n { className: 'h3--no-bottom' },\n 'Create a brand new channel:'\n ),\n _react2.default.createElement(_ChannelCreateForm2.default, null)\n )\n )\n )\n );\n }\n }]);\n\n return LoginPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = (0, _reactRouterDom.withRouter)(LoginPage);\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _channel = __webpack_require__(24);\n\nvar _view = __webpack_require__(103);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(25);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 103 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelLoginForm = function (_React$Component) {\n _inherits(ChannelLoginForm, _React$Component);\n\n function ChannelLoginForm(props) {\n _classCallCheck(this, ChannelLoginForm);\n\n var _this = _possibleConstructorReturn(this, (ChannelLoginForm.__proto__ || Object.getPrototypeOf(ChannelLoginForm)).call(this, props));\n\n _this.state = {\n error: null,\n name: '',\n password: ''\n };\n _this.handleInput = _this.handleInput.bind(_this);\n _this.loginToChannel = _this.loginToChannel.bind(_this);\n return _this;\n }\n\n _createClass(ChannelLoginForm, [{\n key: 'handleInput',\n value: function handleInput(event) {\n var name = event.target.name;\n var value = event.target.value;\n this.setState(_defineProperty({}, name, value));\n }\n }, {\n key: 'loginToChannel',\n value: function loginToChannel(event) {\n var _this2 = this;\n\n event.preventDefault();\n var params = {\n method: 'POST',\n body: JSON.stringify({ username: this.state.name, password: this.state.password }),\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n credentials: 'include'\n };\n (0, _request2.default)('login', params).then(function (_ref) {\n var success = _ref.success,\n channelName = _ref.channelName,\n shortChannelId = _ref.shortChannelId,\n channelClaimId = _ref.channelClaimId,\n message = _ref.message;\n\n if (success) {\n _this2.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n _this2.setState({ 'error': message });\n };\n }).catch(function (error) {\n if (error.message) {\n _this2.setState({ 'error': error.message });\n } else {\n _this2.setState({ 'error': error });\n }\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'form',\n { id: 'channel-login-form' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-login-name-input' },\n 'Name:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary flex-container--row flex-container--left-bottom' },\n _react2.default.createElement(\n 'span',\n null,\n '@'\n ),\n _react2.default.createElement('input', { type: 'text', id: 'channel-login-name-input', className: 'input-text', name: 'name', placeholder: 'Your Channel Name', value: this.state.channelName, onChange: this.handleInput })\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-login-password-input' },\n 'Password:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary' },\n _react2.default.createElement('input', { type: 'password', id: 'channel-login-password-input', name: 'password', className: 'input-text', placeholder: '', value: this.state.channelPassword, onChange: this.handleInput })\n )\n )\n ),\n this.state.error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.state.error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Enter the name and password for your channel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary', onClick: this.loginToChannel },\n 'Authenticate'\n )\n )\n );\n }\n }]);\n\n return ChannelLoginForm;\n}(_react2.default.Component);\n\nexports.default = ChannelLoginForm;\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _channel = __webpack_require__(24);\n\nvar _view = __webpack_require__(105);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(25);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(26);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelCreateForm = function (_React$Component) {\n _inherits(ChannelCreateForm, _React$Component);\n\n function ChannelCreateForm(props) {\n _classCallCheck(this, ChannelCreateForm);\n\n var _this = _possibleConstructorReturn(this, (ChannelCreateForm.__proto__ || Object.getPrototypeOf(ChannelCreateForm)).call(this, props));\n\n _this.state = {\n error: null,\n channel: '',\n password: '',\n status: null\n };\n _this.handleChannelInput = _this.handleChannelInput.bind(_this);\n _this.handleInput = _this.handleInput.bind(_this);\n _this.createChannel = _this.createChannel.bind(_this);\n return _this;\n }\n\n _createClass(ChannelCreateForm, [{\n key: 'cleanseChannelInput',\n value: function cleanseChannelInput(input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n }, {\n key: 'handleChannelInput',\n value: function handleChannelInput(event) {\n var value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({ channel: value });\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({ error: 'Please enter a channel name' });\n }\n }\n }, {\n key: 'handleInput',\n value: function handleInput(event) {\n var name = event.target.name;\n var value = event.target.value;\n this.setState(_defineProperty({}, name, value));\n }\n }, {\n key: 'updateIsChannelAvailable',\n value: function updateIsChannelAvailable(channel) {\n var _this2 = this;\n\n var channelWithAtSymbol = '@' + channel;\n (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol).then(function () {\n _this2.setState({ 'error': null });\n }).catch(function (error) {\n _this2.setState({ 'error': error.message });\n });\n }\n }, {\n key: 'checkIsChannelAvailable',\n value: function checkIsChannelAvailable(channel) {\n var channelWithAtSymbol = '@' + channel;\n return (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol);\n }\n }, {\n key: 'checkIsPasswordProvided',\n value: function checkIsPasswordProvided(password) {\n return new Promise(function (resolve, reject) {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n }, {\n key: 'makePublishChannelRequest',\n value: function makePublishChannelRequest(username, password) {\n var params = {\n method: 'POST',\n body: JSON.stringify({ username: username, password: password }),\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n credentials: 'include'\n };\n return new Promise(function (resolve, reject) {\n (0, _request2.default)('/signup', params).then(function (result) {\n return resolve(result);\n }).catch(function (error) {\n reject(new Error('Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ' + error.message));\n });\n });\n }\n }, {\n key: 'createChannel',\n value: function createChannel(event) {\n var _this3 = this;\n\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password).then(function () {\n return _this3.checkIsChannelAvailable(_this3.state.channel);\n }).then(function () {\n _this3.setState({ status: 'We are publishing your new channel. Sit tight...' });\n return _this3.makePublishChannelRequest(_this3.state.channel, _this3.state.password);\n }).then(function (result) {\n _this3.setState({ status: null });\n _this3.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n }).catch(function (error) {\n if (error.message) {\n _this3.setState({ 'error': error.message, status: null });\n } else {\n _this3.setState({ 'error': error, status: null });\n };\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n !this.state.status ? _react2.default.createElement(\n 'form',\n { id: 'publish-channel-form' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'new-channel-name' },\n 'Name:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary flex-container--row flex-container--left-bottom span--relative' },\n _react2.default.createElement(\n 'span',\n null,\n '@'\n ),\n _react2.default.createElement('input', { type: 'text', name: 'channel', id: 'new-channel-name', className: 'input-text', placeholder: 'exampleChannelName', value: this.state.channel, onChange: this.handleChannelInput }),\n this.state.channel && !this.state.error && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--success span--absolute' },\n '\\u2713'\n ),\n this.state.error && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--failure span--absolute' },\n '\\u2716'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'new-channel-password' },\n 'Password:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary' },\n _react2.default.createElement('input', { type: 'password', name: 'password', id: 'new-channel-password', className: 'input-text', placeholder: '', value: this.state.password, onChange: this.handleInput })\n )\n )\n ),\n this.state.error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.state.error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Choose a name and password for your channel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary', onClick: this.createChannel },\n 'Create Channel'\n )\n )\n ) : _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n this.state.status\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 })\n )\n );\n }\n }]);\n\n return ChannelCreateForm;\n}(_react2.default.Component);\n\nexports.default = ChannelCreateForm;\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _show = __webpack_require__(7);\n\nvar _view = __webpack_require__(107);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n return {\n error: show.request.error,\n requestType: show.request.type\n };\n};\n\nvar mapDispatchToProps = {\n onHandleShowPageUri: _show.onHandleShowPageUri\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ErrorPage = __webpack_require__(27);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _ShowAssetLite = __webpack_require__(108);\n\nvar _ShowAssetLite2 = _interopRequireDefault(_ShowAssetLite);\n\nvar _ShowAssetDetails = __webpack_require__(111);\n\nvar _ShowAssetDetails2 = _interopRequireDefault(_ShowAssetDetails);\n\nvar _ShowChannel = __webpack_require__(117);\n\nvar _ShowChannel2 = _interopRequireDefault(_ShowChannel);\n\nvar _show_request_types = __webpack_require__(52);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowPage = function (_React$Component) {\n _inherits(ShowPage, _React$Component);\n\n function ShowPage() {\n _classCallCheck(this, ShowPage);\n\n return _possibleConstructorReturn(this, (ShowPage.__proto__ || Object.getPrototypeOf(ShowPage)).apply(this, arguments));\n }\n\n _createClass(ShowPage, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n error = _props.error,\n requestType = _props.requestType;\n\n if (error) {\n return _react2.default.createElement(_ErrorPage2.default, { error: error });\n }\n switch (requestType) {\n case _show_request_types.CHANNEL:\n return _react2.default.createElement(_ShowChannel2.default, null);\n case _show_request_types.ASSET_LITE:\n return _react2.default.createElement(_ShowAssetLite2.default, null);\n case _show_request_types.ASSET_DETAILS:\n return _react2.default.createElement(_ShowAssetDetails2.default, null);\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'loading...'\n );\n }\n }\n }]);\n\n return ShowPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowPage;\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(109);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select asset info\n var asset = void 0;\n var request = show.requestList[requestId] || null;\n var assetList = show.assetList;\n if (request && assetList) {\n var assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset: asset\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _AssetDisplay = __webpack_require__(53);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowLite = function (_React$Component) {\n _inherits(ShowLite, _React$Component);\n\n function ShowLite() {\n _classCallCheck(this, ShowLite);\n\n return _possibleConstructorReturn(this, (ShowLite.__proto__ || Object.getPrototypeOf(ShowLite)).apply(this, arguments));\n }\n\n _createClass(ShowLite, [{\n key: 'render',\n value: function render() {\n var asset = this.props.asset;\n\n if (asset) {\n var _asset$claimData = asset.claimData,\n name = _asset$claimData.name,\n claimId = _asset$claimData.claimId;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column flex-container--center-center show-lite-container' },\n _react2.default.createElement(_SEO2.default, { pageTitle: name, asset: asset }),\n _react2.default.createElement(_AssetDisplay2.default, null),\n _react2.default.createElement(\n _reactRouterDom.Link,\n { id: 'asset-boilerpate', className: 'link--primary fine-print', to: '/' + claimId + '/' + name },\n 'hosted via Spee.ch'\n )\n );\n }\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded flex-container--column flex-container--center-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'loading asset data...'\n )\n );\n }\n }]);\n\n return ShowLite;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowLite;\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(26);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _asset_display_states = __webpack_require__(42);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AssetDisplay = function (_React$Component) {\n _inherits(AssetDisplay, _React$Component);\n\n function AssetDisplay() {\n _classCallCheck(this, AssetDisplay);\n\n return _possibleConstructorReturn(this, (AssetDisplay.__proto__ || Object.getPrototypeOf(AssetDisplay)).apply(this, arguments));\n }\n\n _createClass(AssetDisplay, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props$asset$claimDat = this.props.asset.claimData,\n name = _props$asset$claimDat.name,\n claimId = _props$asset$claimDat.claimId;\n\n this.props.onFileRequest(name, claimId);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n status = _props.status,\n error = _props.error,\n _props$asset$claimDat2 = _props.asset.claimData,\n name = _props$asset$claimDat2.name,\n claimId = _props$asset$claimDat2.claimId,\n contentType = _props$asset$claimDat2.contentType,\n fileExt = _props$asset$claimDat2.fileExt,\n thumbnail = _props$asset$claimDat2.thumbnail;\n\n return _react2.default.createElement(\n 'div',\n { id: 'asset-display-component' },\n status === _asset_display_states.LOCAL_CHECK && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Checking to see if Spee.ch has your asset locally...'\n )\n ),\n status === _asset_display_states.UNAVAILABLE && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Sit tight, we\\'re searching the LBRY blockchain for your asset!'\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 }),\n _react2.default.createElement(\n 'p',\n null,\n 'Curious what magic is happening here? ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: 'blank', href: 'https://lbry.io/faq/what-is-lbry' },\n 'Learn more.'\n )\n )\n ),\n status === _asset_display_states.ERROR && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Unfortunately, we couldn\\'t download your asset from LBRY. You can help us out by sharing the below error message in the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS', target: '_blank' },\n 'LBRY discord'\n ),\n '.'\n ),\n _react2.default.createElement(\n 'i',\n null,\n _react2.default.createElement(\n 'p',\n { id: 'error-message' },\n error\n )\n )\n ),\n status === _asset_display_states.AVAILABLE && function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return _react2.default.createElement('img', {\n className: 'asset',\n src: '/' + claimId + '/' + name + '.' + fileExt,\n alt: name });\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset',\n src: '/' + claimId + '/' + name + '.' + fileExt,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement(\n 'video',\n { className: 'asset video', controls: true, poster: thumbnail },\n _react2.default.createElement('source', {\n src: '/' + claimId + '/' + name + '.' + fileExt\n }),\n _react2.default.createElement(\n 'p',\n null,\n 'Your browser does not support the ',\n _react2.default.createElement(\n 'code',\n null,\n 'video'\n ),\n ' element.'\n )\n );\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'Unsupported file type'\n );\n }\n }()\n );\n }\n }]);\n\n return AssetDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetDisplay;\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(112);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select asset info\n var asset = void 0;\n var request = show.requestList[requestId] || null;\n var assetList = show.assetList;\n if (request && assetList) {\n var assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset: asset\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ErrorPage = __webpack_require__(27);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _AssetTitle = __webpack_require__(113);\n\nvar _AssetTitle2 = _interopRequireDefault(_AssetTitle);\n\nvar _AssetDisplay = __webpack_require__(53);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nvar _AssetInfo = __webpack_require__(115);\n\nvar _AssetInfo2 = _interopRequireDefault(_AssetInfo);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowAssetDetails = function (_React$Component) {\n _inherits(ShowAssetDetails, _React$Component);\n\n function ShowAssetDetails() {\n _classCallCheck(this, ShowAssetDetails);\n\n return _possibleConstructorReturn(this, (ShowAssetDetails.__proto__ || Object.getPrototypeOf(ShowAssetDetails)).apply(this, arguments));\n }\n\n _createClass(ShowAssetDetails, [{\n key: 'render',\n value: function render() {\n var asset = this.props.asset;\n\n if (asset) {\n var name = asset.claimData.name;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name + ' - details', asset: asset }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_AssetTitle2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded show-details-container' },\n _react2.default.createElement(_AssetDisplay2.default, null)\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(_AssetInfo2.default, null)\n )\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading asset data...' });\n }\n }]);\n\n return ShowAssetDetails;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowAssetDetails;\n\n/***/ }),\n/* 113 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(114);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(12);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n var _selectAsset = (0, _show.selectAsset)(show),\n title = _selectAsset.claimData.title;\n\n return {\n title: title\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 114 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetTitle = function AssetTitle(_ref) {\n var title = _ref.title;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'span',\n { className: 'text--large' },\n title\n )\n );\n};\n\nexports.default = AssetTitle;\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(116);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(12);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select asset\n var asset = (0, _show.selectAsset)(show);\n // return props\n return {\n asset: asset\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 116 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AssetInfo = function (_React$Component) {\n _inherits(AssetInfo, _React$Component);\n\n function AssetInfo(props) {\n _classCallCheck(this, AssetInfo);\n\n var _this = _possibleConstructorReturn(this, (AssetInfo.__proto__ || Object.getPrototypeOf(AssetInfo)).call(this, props));\n\n _this.copyToClipboard = _this.copyToClipboard.bind(_this);\n return _this;\n }\n\n _createClass(AssetInfo, [{\n key: 'copyToClipboard',\n value: function copyToClipboard(event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({ error: 'Oops, unable to copy' });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$asset = this.props.asset,\n shortId = _props$asset.shortId,\n _props$asset$claimDat = _props$asset.claimData,\n channelName = _props$asset$claimDat.channelName,\n certificateId = _props$asset$claimDat.certificateId,\n description = _props$asset$claimDat.description,\n name = _props$asset$claimDat.name,\n claimId = _props$asset$claimDat.claimId,\n fileExt = _props$asset$claimDat.fileExt,\n contentType = _props$asset$claimDat.contentType,\n thumbnail = _props$asset$claimDat.thumbnail,\n host = _props$asset$claimDat.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n channelName && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Channel:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: '/' + channelName + ':' + certificateId },\n channelName\n )\n )\n )\n ),\n description && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n description\n )\n ),\n _react2.default.createElement(\n 'div',\n { id: 'show-share-buttons' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Share:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n {\n className: 'row row--short row--wide flex-container--row flex-container--space-between-bottom flex-container--wrap' },\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/intent/tweet?text=' + host + '/' + shortId + '/' + name },\n 'twitter'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://www.facebook.com/sharer/sharer.php?u=' + host + '/' + shortId + '/' + name },\n 'facebook'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'http://tumblr.com/widgets/share/tool?canonicalUrl=' + host + '/' + shortId + '/' + name },\n 'tumblr'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://www.reddit.com/submit?url=' + host + '/' + shortId + '/' + name + '&title=' + name },\n 'reddit'\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { id: 'show-short-link' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Link:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--short row--wide' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'div',\n { className: 'input-error', id: 'input-error-copy-short-link', hidden: 'true' },\n 'error here'\n ),\n _react2.default.createElement('input', { type: 'text', id: 'short-link', className: 'input-disabled input-text--full-width', readOnly: true,\n spellCheck: 'false',\n value: host + '/' + shortId + '/' + name + '.' + fileExt,\n onClick: this.select })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'short-link',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { id: 'show-embed-code' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Embed:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--short row--wide' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'div',\n { className: 'input-error', id: 'input-error-copy-embed-text', hidden: 'true' },\n 'error here'\n ),\n contentType === 'video/mp4' ? _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: '' }) : _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: ''\n })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'embed-text',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex-container--row flex-container--space-between-bottom' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { className: 'link--primary', to: '/' + shortId + '/' + name + '.' + fileExt },\n _react2.default.createElement(\n 'span',\n {\n className: 'text' },\n 'Direct Link'\n )\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: host + '/' + claimId + '/' + name + '.' + fileExt, download: name },\n 'Download'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://lbry.io/dmca' },\n 'Report'\n )\n )\n );\n }\n }]);\n\n return AssetInfo;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetInfo;\n\n/***/ }),\n/* 117 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(118);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select request\n var previousRequest = show.requestList[requestId] || null;\n // select channel\n var channel = void 0;\n if (previousRequest) {\n var channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel: channel\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 118 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _ErrorPage = __webpack_require__(27);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelClaimsDisplay = __webpack_require__(119);\n\nvar _ChannelClaimsDisplay2 = _interopRequireDefault(_ChannelClaimsDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowChannel = function (_React$Component) {\n _inherits(ShowChannel, _React$Component);\n\n function ShowChannel() {\n _classCallCheck(this, ShowChannel);\n\n return _possibleConstructorReturn(this, (ShowChannel.__proto__ || Object.getPrototypeOf(ShowChannel)).apply(this, arguments));\n }\n\n _createClass(ShowChannel, [{\n key: 'render',\n value: function render() {\n var channel = this.props.channel;\n\n if (channel) {\n var name = channel.name,\n longId = channel.longId,\n shortId = channel.shortId;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name, channel: channel }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(\n 'h2',\n null,\n 'channel name: ',\n name\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'full channel id: ',\n longId\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'short channel id: ',\n shortId\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_ChannelClaimsDisplay2.default, null)\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading channel data...' });\n }\n }]);\n\n return ShowChannel;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowChannel;\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _show = __webpack_require__(7);\n\nvar _view = __webpack_require__(120);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select channel key\n var request = show.requestList[show.request.id];\n var channelKey = request.key;\n // select channel claims\n var channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey: channelKey,\n channel: channel\n };\n};\n\nvar mapDispatchToProps = {\n onUpdateChannelClaims: _show.onUpdateChannelClaims\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 120 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _AssetPreview = __webpack_require__(54);\n\nvar _AssetPreview2 = _interopRequireDefault(_AssetPreview);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelClaimsDisplay = function (_React$Component) {\n _inherits(ChannelClaimsDisplay, _React$Component);\n\n function ChannelClaimsDisplay(props) {\n _classCallCheck(this, ChannelClaimsDisplay);\n\n var _this = _possibleConstructorReturn(this, (ChannelClaimsDisplay.__proto__ || Object.getPrototypeOf(ChannelClaimsDisplay)).call(this, props));\n\n _this.showNextResultsPage = _this.showNextResultsPage.bind(_this);\n _this.showPreviousResultsPage = _this.showPreviousResultsPage.bind(_this);\n return _this;\n }\n\n _createClass(ChannelClaimsDisplay, [{\n key: 'showPreviousResultsPage',\n value: function showPreviousResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n }, {\n key: 'showNextResultsPage',\n value: function showNextResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n }, {\n key: 'showNewPage',\n value: function showNewPage(page) {\n var _props = this.props,\n channelKey = _props.channelKey,\n _props$channel = _props.channel,\n name = _props$channel.name,\n longId = _props$channel.longId;\n\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$channel$claims = this.props.channel.claimsData,\n claims = _props$channel$claims.claims,\n currentPage = _props$channel$claims.currentPage,\n totalPages = _props$channel$claims.totalPages;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall' },\n claims.length > 0 ? _react2.default.createElement(\n 'div',\n null,\n claims.map(function (claim, index) {\n return _react2.default.createElement(_AssetPreview2.default, {\n claimData: claim,\n key: claim.name + '-' + index\n });\n }),\n _react2.default.createElement(\n 'div',\n null,\n currentPage > 1 && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showPreviousResultsPage },\n 'Previous Page'\n ),\n currentPage < totalPages && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showNextResultsPage },\n 'Next Page'\n )\n )\n ) : _react2.default.createElement(\n 'p',\n null,\n 'There are no claims in this channel'\n )\n );\n }\n }]);\n\n return ChannelClaimsDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = ChannelClaimsDisplay;\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetPreview = function AssetPreview(_ref) {\n var defaultThumbnail = _ref.defaultThumbnail,\n _ref$claimData = _ref.claimData,\n name = _ref$claimData.name,\n claimId = _ref$claimData.claimId,\n fileExt = _ref$claimData.fileExt,\n contentType = _ref$claimData.contentType,\n thumbnail = _ref$claimData.thumbnail;\n\n var directSourceLink = claimId + '/' + name + '.' + fileExt;\n var showUrlLink = '/' + claimId + '/' + name;\n return _react2.default.createElement(\n 'div',\n { className: 'asset-holder' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: showUrlLink },\n function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset-preview',\n src: directSourceLink,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement('img', {\n className: 'asset-preview video',\n src: thumbnail || defaultThumbnail,\n alt: name\n });\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'unsupported file type'\n );\n }\n }()\n )\n );\n};\n\nexports.default = AssetPreview;\n\n/***/ }),\n/* 122 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(123);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var _ref$site = _ref.site,\n host = _ref$site.host,\n title = _ref$site.title;\n\n return {\n host: host,\n title: title\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar FourOhForPage = function (_React$Component) {\n _inherits(FourOhForPage, _React$Component);\n\n function FourOhForPage() {\n _classCallCheck(this, FourOhForPage);\n\n return _possibleConstructorReturn(this, (FourOhForPage.__proto__ || Object.getPrototypeOf(FourOhForPage)).apply(this, arguments));\n }\n\n _createClass(FourOhForPage, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n title = _props.title,\n host = _props.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n _reactHelmet2.default,\n null,\n _react2.default.createElement(\n 'title',\n null,\n title,\n ' - 404'\n ),\n _react2.default.createElement('link', { rel: 'canonical', href: host + '/404' })\n ),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'h2',\n null,\n '404'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'That page does not exist'\n )\n )\n );\n }\n }]);\n\n return FourOhForPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = FourOhForPage;\n\n/***/ }),\n/* 124 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _require = __webpack_require__(16),\n sendGAServeEvent = _require.sendGAServeEvent;\n\nvar _require2 = __webpack_require__(125),\n determineResponseType = _require2.determineResponseType,\n flipClaimNameAndIdForBackwardsCompatibility = _require2.flipClaimNameAndIdForBackwardsCompatibility,\n logRequestData = _require2.logRequestData,\n getClaimIdAndServeAsset = _require2.getClaimIdAndServeAsset;\n\nvar lbryUri = __webpack_require__(126);\nvar handleShowRender = __webpack_require__(127);\nvar SERVE = 'SERVE';\n\nmodule.exports = function (app) {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // parse the identifier\n var isChannel = void 0,\n channelName = void 0,\n channelClaimId = void 0,\n claimId = void 0;\n try {\n var _lbryUri$parseIdentif = lbryUri.parseIdentifier(params.identifier);\n\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n if (!isChannel) {\n var _flipClaimNameAndIdFo = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n\n var _flipClaimNameAndIdFo2 = _slicedToArray(_flipClaimNameAndIdFo, 2);\n\n claimId = _flipClaimNameAndIdFo2[0];\n claimName = _flipClaimNameAndIdFo2[1];\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie2 = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie2.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim2 = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim2.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(36),\n getClaimId = _require.getClaimId,\n getLocalFileRecord = _require.getLocalFileRecord;\n\nvar _require2 = __webpack_require__(35),\n handleErrorResponse = _require2.handleErrorResponse;\n\nvar SERVE = 'SERVE';\nvar SHOW = 'SHOW';\nvar NO_FILE = 'NO_FILE';\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml(_ref) {\n var accept = _ref.accept;\n\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser(headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset(_ref2) {\n var accept = _ref2.accept,\n range = _ref2.range;\n\n var imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n var videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId(claimId) {\n return claimId.length === 40 && !/[^A-Za-z0-9]/g.test(claimId);\n};\n\nfunction isValidShortId(claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId(input) {\n return isValidClaimId(input) || isValidShortId(input);\n};\n\nfunction serveAssetToClient(claimId, name, res) {\n return getLocalFileRecord(claimId, name).then(function (fileRecord) {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect('/api/claim/get/' + name + '/' + claimId);\n }\n // serve the file\n var filePath = fileRecord.filePath,\n fileType = fileRecord.fileType;\n\n logger.verbose('serving file: ' + filePath);\n var sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type': fileType || 'image/jpeg'\n }\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n }).catch(function (error) {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset: function getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (fullClaimId) {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'no claim id could be found' });\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'no channel id could be found' });\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n }).catch(function (error) {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType: function determineResponseType(hasFileExtension, headers) {\n var responseType = void 0;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) {\n // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) {\n // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility: function flipClaimNameAndIdForBackwardsCompatibility(identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n var tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData: function logRequestData(responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n }\n};\n\n/***/ }),\n/* 126 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n logger.debug('parsing identifier:', identifier);\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex.exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n logger.debug(proto + ', ' + value + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!value) {\n throw new Error('Check your url. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Invalid characters in channel name: ' + nameBadChars.join(', ') + '.');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId,\n claimId: claimId\n };\n },\n parseClaim: function parseClaim(claim) {\n logger.debug('parsing name:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n modifierSeperator = _componentsRegex$exec4[2],\n modifier = _componentsRegex$exec4[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Invalid characters in claim name: ' + nameBadChars.join(', ') + '.');\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No file extension provided after separator ' + modifierSeperator + '.');\n }\n if (modifierSeperator !== '.') {\n throw new Error('The ' + modifierSeperator + ' modifier is not supported in the claim name');\n }\n }\n // return results\n return {\n claimName: claimName\n };\n },\n parseModifier: function parseModifier(claim) {\n logger.debug('parsing modifier:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec5 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec6 = _slicedToArray(_componentsRegex$exec5, 4),\n proto = _componentsRegex$exec6[0],\n claimName = _componentsRegex$exec6[1],\n modifierSeperator = _componentsRegex$exec6[2],\n modifier = _componentsRegex$exec6[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n // Validate and process modifier\n var hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension: hasFileExtension\n };\n }\n};\n\n/***/ }),\n/* 127 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(38);\n\nvar _redux = __webpack_require__(17);\n\nvar _index = __webpack_require__(39);\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _index3 = __webpack_require__(18);\n\nvar _index4 = _interopRequireDefault(_index3);\n\nvar _app = __webpack_require__(43);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(55);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reduxSaga = __webpack_require__(128);\n\nvar _reduxSaga2 = _interopRequireDefault(_reduxSaga);\n\nvar _effects = __webpack_require__(14);\n\nvar _show_uri = __webpack_require__(129);\n\nvar _show = __webpack_require__(7);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar returnSagaWithParams = function returnSagaWithParams(saga, params) {\n return (/*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return (0, _effects.call)(saga, params);\n\n case 2:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n })\n );\n};\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create and apply middleware\n var sagaMiddleware = (0, _reduxSaga2.default)();\n var middleware = (0, _redux.applyMiddleware)(sagaMiddleware);\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_index2.default, middleware);\n\n // create saga\n var action = (0, _show.onHandleShowPageUri)(req.params);\n var saga = returnSagaWithParams(_show_uri.handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware.run(saga).done.then(function () {\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _index4.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n var preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send((0, _renderFullPage2.default)(helmet, html, preloadedState));\n });\n};\n\n/***/ }),\n/* 128 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga\");\n\n/***/ }),\n/* 129 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleShowPageUri = handleShowPageUri;\nexports.watchHandleShowPageUri = watchHandleShowPageUri;\n\nvar _effects = __webpack_require__(14);\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _show_asset = __webpack_require__(130);\n\nvar _show_channel = __webpack_require__(132);\n\nvar _lbryUri = __webpack_require__(21);\n\nvar _lbryUri2 = _interopRequireDefault(_lbryUri);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateIdentifierAndClaim),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateClaimOnly),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(handleShowPageUri),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchHandleShowPageUri);\n\nfunction parseAndUpdateIdentifierAndClaim(modifier, claim) {\n var isChannel, channelName, channelClaimId, claimId, claimName, extension, _lbryUri$parseIdentif, _lbryUri$parseClaim;\n\n return regeneratorRuntime.wrap(function parseAndUpdateIdentifierAndClaim$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n isChannel = void 0, channelName = void 0, channelClaimId = void 0, claimId = void 0, claimName = void 0, extension = void 0;\n _context.prev = 1;\n _lbryUri$parseIdentif = _lbryUri2.default.parseIdentifier(modifier);\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n _lbryUri$parseClaim = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim.claimName;\n extension = _lbryUri$parseClaim.extension;\n _context.next = 17;\n break;\n\n case 12:\n _context.prev = 12;\n _context.t0 = _context['catch'](1);\n _context.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 16:\n return _context.abrupt('return', _context.sent);\n\n case 17:\n if (!isChannel) {\n _context.next = 21;\n break;\n }\n\n _context.next = 20;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, channelName, channelClaimId, extension));\n\n case 20:\n return _context.abrupt('return', _context.sent);\n\n case 21:\n ;\n _context.next = 24;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, claimId, null, null, extension));\n\n case 24:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[1, 12]]);\n}\nfunction parseAndUpdateClaimOnly(claim) {\n var isChannel, channelName, channelClaimId, _lbryUri$parseIdentif2, claimName, extension, _lbryUri$parseClaim2;\n\n return regeneratorRuntime.wrap(function parseAndUpdateClaimOnly$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n isChannel = void 0, channelName = void 0, channelClaimId = void 0;\n _context2.prev = 1;\n _lbryUri$parseIdentif2 = _lbryUri2.default.parseIdentifier(claim);\n isChannel = _lbryUri$parseIdentif2.isChannel;\n channelName = _lbryUri$parseIdentif2.channelName;\n channelClaimId = _lbryUri$parseIdentif2.channelClaimId;\n _context2.next = 13;\n break;\n\n case 8:\n _context2.prev = 8;\n _context2.t0 = _context2['catch'](1);\n _context2.next = 12;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t0.message));\n\n case 12:\n return _context2.abrupt('return', _context2.sent);\n\n case 13:\n if (!isChannel) {\n _context2.next = 17;\n break;\n }\n\n _context2.next = 16;\n return (0, _effects.call)(_show_channel.newChannelRequest, (0, _show.onNewChannelRequest)(channelName, channelClaimId));\n\n case 16:\n return _context2.abrupt('return', _context2.sent);\n\n case 17:\n // if not for a channel, parse the claim request\n claimName = void 0, extension = void 0;\n _context2.prev = 18;\n _lbryUri$parseClaim2 = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim2.claimName;\n extension = _lbryUri$parseClaim2.extension;\n _context2.next = 29;\n break;\n\n case 24:\n _context2.prev = 24;\n _context2.t1 = _context2['catch'](18);\n _context2.next = 28;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t1.message));\n\n case 28:\n return _context2.abrupt('return', _context2.sent);\n\n case 29:\n _context2.next = 31;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, null, null, extension));\n\n case 31:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this, [[1, 8], [18, 24]]);\n}\n\nfunction handleShowPageUri(action) {\n var _action$data, identifier, claim;\n\n return regeneratorRuntime.wrap(function handleShowPageUri$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data = action.data, identifier = _action$data.identifier, claim = _action$data.claim;\n\n if (!identifier) {\n _context3.next = 5;\n break;\n }\n\n _context3.next = 4;\n return (0, _effects.call)(parseAndUpdateIdentifierAndClaim, identifier, claim);\n\n case 4:\n return _context3.abrupt('return', _context3.sent);\n\n case 5:\n _context3.next = 7;\n return (0, _effects.call)(parseAndUpdateClaimOnly, claim);\n\n case 7:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this);\n};\n\nfunction watchHandleShowPageUri() {\n return regeneratorRuntime.wrap(function watchHandleShowPageUri$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.HANDLE_SHOW_URI, handleShowPageUri);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n};\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newAssetRequest = newAssetRequest;\nexports.watchNewAssetRequest = watchNewAssetRequest;\n\nvar _effects = __webpack_require__(14);\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _assetApi = __webpack_require__(131);\n\nvar _show2 = __webpack_require__(12);\n\nvar _site = __webpack_require__(56);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newAssetRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewAssetRequest);\n\nfunction newAssetRequest(action) {\n var _action$data, requestType, requestId, name, modifier, state, host, longId, _ref, assetKey, shortId, _ref2, claimData, _ref3;\n\n return regeneratorRuntime.wrap(function newAssetRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, name = _action$data.name, modifier = _action$data.modifier;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get long id && add request to request list\n longId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_assetApi.getLongClaimId, host, name, modifier);\n\n case 15:\n _ref = _context.sent;\n longId = _ref.data;\n _context.next = 24;\n break;\n\n case 19:\n _context.prev = 19;\n _context.t0 = _context['catch'](12);\n _context.next = 23;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 23:\n return _context.abrupt('return', _context.sent);\n\n case 24:\n assetKey = 'a#' + name + '#' + longId;\n _context.next = 27;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, assetKey));\n\n case 27:\n if (!state.assetList[assetKey]) {\n _context.next = 29;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 29:\n // get short Id\n shortId = void 0;\n _context.prev = 30;\n _context.next = 33;\n return (0, _effects.call)(_assetApi.getShortId, host, name, longId);\n\n case 33:\n _ref2 = _context.sent;\n shortId = _ref2.data;\n _context.next = 42;\n break;\n\n case 37:\n _context.prev = 37;\n _context.t1 = _context['catch'](30);\n _context.next = 41;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 41:\n return _context.abrupt('return', _context.sent);\n\n case 42:\n // get asset claim data\n claimData = void 0;\n _context.prev = 43;\n _context.next = 46;\n return (0, _effects.call)(_assetApi.getClaimData, host, name, longId);\n\n case 46:\n _ref3 = _context.sent;\n claimData = _ref3.data;\n _context.next = 55;\n break;\n\n case 50:\n _context.prev = 50;\n _context.t2 = _context['catch'](43);\n _context.next = 54;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t2.message));\n\n case 54:\n return _context.abrupt('return', _context.sent);\n\n case 55:\n _context.next = 57;\n return (0, _effects.put)((0, _show.addAssetToAssetList)(assetKey, null, name, longId, shortId, claimData));\n\n case 57:\n _context.next = 59;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 59:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 19], [30, 37], [43, 50]]);\n};\n\nfunction watchNewAssetRequest() {\n return regeneratorRuntime.wrap(function watchNewAssetRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.ASSET_REQUEST_NEW, newAssetRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\n/***/ }),\n/* 131 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getLongClaimId = getLongClaimId;\nexports.getShortId = getShortId;\nexports.getClaimData = getClaimData;\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getLongClaimId(host, name, modifier) {\n var body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n var params = {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body)\n };\n // create url\n var url = host + '/api/claim/long-id';\n // return the request promise\n return (0, _request2.default)(url, params);\n};\n\nfunction getShortId(host, name, claimId) {\n var url = host + '/api/claim/short-id/' + claimId + '/' + name;\n return (0, _request2.default)(url);\n};\n\nfunction getClaimData(host, name, claimId) {\n var url = host + '/api/claim/data/' + name + '/' + claimId;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 132 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newChannelRequest = newChannelRequest;\nexports.watchNewChannelRequest = watchNewChannelRequest;\nexports.watchUpdateChannelClaims = watchUpdateChannelClaims;\n\nvar _effects = __webpack_require__(14);\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _channelApi = __webpack_require__(133);\n\nvar _show2 = __webpack_require__(12);\n\nvar _site = __webpack_require__(56);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newChannelRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewChannelRequest),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(getNewClaimsAndUpdateChannel),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchUpdateChannelClaims);\n\nfunction newChannelRequest(action) {\n var _action$data, requestType, requestId, channelName, channelId, state, host, longId, shortId, _ref, _ref$data, channelKey, claimsData, _ref2;\n\n return regeneratorRuntime.wrap(function newChannelRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, channelName = _action$data.channelName, channelId = _action$data.channelId;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get channel long id\n longId = void 0, shortId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_channelApi.getChannelData, host, channelName, channelId);\n\n case 15:\n _ref = _context.sent;\n _ref$data = _ref.data;\n longId = _ref$data.longChannelClaimId;\n shortId = _ref$data.shortChannelClaimId;\n _context.next = 26;\n break;\n\n case 21:\n _context.prev = 21;\n _context.t0 = _context['catch'](12);\n _context.next = 25;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 25:\n return _context.abrupt('return', _context.sent);\n\n case 26:\n // store the request in the channel requests list\n channelKey = 'c#' + channelName + '#' + longId;\n _context.next = 29;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, channelKey));\n\n case 29:\n if (!state.channelList[channelKey]) {\n _context.next = 31;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 31:\n // get channel claims data\n claimsData = void 0;\n _context.prev = 32;\n _context.next = 35;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, channelName, 1);\n\n case 35:\n _ref2 = _context.sent;\n claimsData = _ref2.data;\n _context.next = 44;\n break;\n\n case 39:\n _context.prev = 39;\n _context.t1 = _context['catch'](32);\n _context.next = 43;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 43:\n return _context.abrupt('return', _context.sent);\n\n case 44:\n _context.next = 46;\n return (0, _effects.put)((0, _show.addNewChannelToChannelList)(channelKey, channelName, shortId, longId, claimsData));\n\n case 46:\n _context.next = 48;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 48:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 21], [32, 39]]);\n}\n\nfunction watchNewChannelRequest() {\n return regeneratorRuntime.wrap(function watchNewChannelRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\nfunction getNewClaimsAndUpdateChannel(action) {\n var _action$data2, channelKey, name, longId, page, host, claimsData, _ref3;\n\n return regeneratorRuntime.wrap(function getNewClaimsAndUpdateChannel$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data2 = action.data, channelKey = _action$data2.channelKey, name = _action$data2.name, longId = _action$data2.longId, page = _action$data2.page;\n _context3.next = 3;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 3:\n host = _context3.sent;\n claimsData = void 0;\n _context3.prev = 5;\n _context3.next = 8;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, name, page);\n\n case 8:\n _ref3 = _context3.sent;\n claimsData = _ref3.data;\n _context3.next = 17;\n break;\n\n case 12:\n _context3.prev = 12;\n _context3.t0 = _context3['catch'](5);\n _context3.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context3.t0.message));\n\n case 16:\n return _context3.abrupt('return', _context3.sent);\n\n case 17:\n _context3.next = 19;\n return (0, _effects.put)((0, _show.updateChannelClaims)(channelKey, claimsData));\n\n case 19:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this, [[5, 12]]);\n}\n\nfunction watchUpdateChannelClaims() {\n return regeneratorRuntime.wrap(function watchUpdateChannelClaims$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n}\n\n/***/ }),\n/* 133 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getChannelData = getChannelData;\nexports.getChannelClaims = getChannelClaims;\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getChannelData(host, id, name) {\n if (!id) id = 'none';\n var url = host + '/api/channel/data/' + name + '/' + id;\n return (0, _request2.default)(url);\n};\n\nfunction getChannelClaims(host, longId, name, page) {\n if (!page) page = 1;\n var url = host + '/api/channel/claims/' + name + '/' + longId + '/' + page;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 134 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar handlePageRender = __webpack_require__(37);\n\nmodule.exports = function (app) {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', function (req, res) {\n // send response\n handlePageRender(req, res);\n });\n};\n\n/***/ }),\n/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(136),\n logLevel = _require.logLevel;\n\nmodule.exports = function (winston) {\n // configure\n winston.configure({\n transports: [new winston.transports.Console({\n level: logLevel,\n timestamp: false,\n colorize: true,\n prettyPrint: true,\n handleExceptions: true,\n humanReadableUnhandledException: true\n })]\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n/***/ }),\n/* 136 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar loggerConfig = {\n logLevel: 'debug' // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n/***/ }),\n/* 137 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar winstonSlackWebHook = __webpack_require__(138).SlackWebHook;\nvar slackConfig = __webpack_require__(30);\n\nmodule.exports = function (winston) {\n var slackWebHook = slackConfig.slackWebHook,\n slackErrorChannel = slackConfig.slackErrorChannel,\n slackInfoChannel = slackConfig.slackInfoChannel;\n\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-errors-transport',\n level: 'warn',\n webhookUrl: slackWebHook,\n channel: slackErrorChannel,\n username: 'spee.ch',\n iconEmoji: ':face_with_head_bandage:'\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-info-transport',\n level: 'info',\n webhookUrl: slackWebHook,\n channel: slackInfoChannel,\n username: 'spee.ch',\n iconEmoji: ':nerd_face:'\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n/***/ }),\n/* 138 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston-slack-webhook\");\n\n/***/ }),\n/* 139 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ActiveStatusBar = __webpack_require__(50);\n\nvar _ActiveStatusBar2 = _interopRequireDefault(_ActiveStatusBar);\n\nvar _AssetPreview = __webpack_require__(54);\n\nvar _AssetPreview2 = _interopRequireDefault(_AssetPreview);\n\nvar _ExpandingTextArea = __webpack_require__(140);\n\nvar _ExpandingTextArea2 = _interopRequireDefault(_ExpandingTextArea);\n\nvar _GAListener = __webpack_require__(18);\n\nvar _GAListener2 = _interopRequireDefault(_GAListener);\n\nvar _InactiveStatusBar = __webpack_require__(51);\n\nvar _InactiveStatusBar2 = _interopRequireDefault(_InactiveStatusBar);\n\nvar _Logo = __webpack_require__(48);\n\nvar _Logo2 = _interopRequireDefault(_Logo);\n\nvar _NavBarChannelOptionsDropdown = __webpack_require__(49);\n\nvar _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown);\n\nvar _ProgressBar = __webpack_require__(26);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _PublishPreview = __webpack_require__(141);\n\nvar _PublishPreview2 = _interopRequireDefault(_PublishPreview);\n\nvar _PublishUrlMiddleDisplay = __webpack_require__(142);\n\nvar _PublishUrlMiddleDisplay2 = _interopRequireDefault(_PublishUrlMiddleDisplay);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar components = {\n ActiveStatusBar: _ActiveStatusBar2.default,\n AssetPreview: _AssetPreview2.default,\n ExpandingTextArea: _ExpandingTextArea2.default,\n GAListener: _GAListener2.default,\n InactiveStatusBar: _InactiveStatusBar2.default,\n Logo: _Logo2.default,\n NavBarChannelOptionsDropdown: _NavBarChannelOptionsDropdown2.default,\n ProgressBar: _ProgressBar2.default,\n PublishPreview: _PublishPreview2.default,\n PublishUrlMiddleDisplay: _PublishUrlMiddleDisplay2.default,\n SEO: _SEO2.default\n};\n\nexports.default = components;\n\n/***/ }),\n/* 140 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ExpandingTextarea = function (_Component) {\n _inherits(ExpandingTextarea, _Component);\n\n function ExpandingTextarea(props) {\n _classCallCheck(this, ExpandingTextarea);\n\n var _this = _possibleConstructorReturn(this, (ExpandingTextarea.__proto__ || Object.getPrototypeOf(ExpandingTextarea)).call(this, props));\n\n _this._handleChange = _this._handleChange.bind(_this);\n return _this;\n }\n\n _createClass(ExpandingTextarea, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.adjustTextarea({});\n }\n }, {\n key: '_handleChange',\n value: function _handleChange(event) {\n var onChange = this.props.onChange;\n\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n }, {\n key: 'adjustTextarea',\n value: function adjustTextarea(_ref) {\n var _ref$target = _ref.target,\n target = _ref$target === undefined ? this.el : _ref$target;\n\n target.style.height = 0;\n target.style.height = target.scrollHeight + 'px';\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var rest = _objectWithoutProperties(this.props, []);\n\n return _react2.default.createElement('textarea', _extends({}, rest, {\n ref: function ref(x) {\n return _this2.el = x;\n },\n onChange: this._handleChange\n }));\n }\n }]);\n\n return ExpandingTextarea;\n}(_react.Component);\n\nExpandingTextarea.propTypes = {\n onChange: _propTypes2.default.func\n};\n\nexports.default = ExpandingTextarea;\n\n/***/ }),\n/* 141 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishPreview = function (_React$Component) {\n _inherits(PublishPreview, _React$Component);\n\n function PublishPreview(props) {\n _classCallCheck(this, PublishPreview);\n\n var _this = _possibleConstructorReturn(this, (PublishPreview.__proto__ || Object.getPrototypeOf(PublishPreview)).call(this, props));\n\n _this.state = {\n imgSource: '',\n defaultThumbnail: '/assets/img/video_thumb_default.png'\n };\n return _this;\n }\n\n _createClass(PublishPreview, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.setPreviewImageSource(this.props.file);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({ imgSource: this.state.defaultThumbnail });\n }\n }\n }\n }, {\n key: 'setPreviewImageSourceFromFile',\n value: function setPreviewImageSourceFromFile(file) {\n var _this2 = this;\n\n var previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = function () {\n _this2.setState({ imgSource: previewReader.result });\n };\n }\n }, {\n key: 'setPreviewImageSource',\n value: function setPreviewImageSource(file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({ imgSource: this.state.defaultThumbnail });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement('img', {\n id: 'dropzone-preview',\n src: this.state.imgSource,\n className: this.props.dimPreview ? 'dim' : '',\n alt: 'publish preview'\n });\n }\n }]);\n\n return PublishPreview;\n}(_react2.default.Component);\n\n;\n\nPublishPreview.propTypes = {\n dimPreview: _propTypes2.default.bool.isRequired,\n file: _propTypes2.default.object.isRequired,\n thumbnail: _propTypes2.default.object\n};\n\nexports.default = PublishPreview;\n\n/***/ }),\n/* 142 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction UrlMiddle(_ref) {\n var publishInChannel = _ref.publishInChannel,\n selectedChannel = _ref.selectedChannel,\n loggedInChannelName = _ref.loggedInChannelName,\n loggedInChannelShortId = _ref.loggedInChannelShortId;\n\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return _react2.default.createElement(\n 'span',\n { id: 'url-channel', className: 'url-text--secondary' },\n loggedInChannelName,\n ':',\n loggedInChannelShortId,\n ' /'\n );\n }\n return _react2.default.createElement(\n 'span',\n { id: 'url-channel-placeholder', className: 'url-text--secondary tooltip' },\n '@channel',\n _react2.default.createElement(\n 'span',\n {\n className: 'tooltip-text' },\n 'Select a channel below'\n ),\n ' /'\n );\n }\n return _react2.default.createElement(\n 'span',\n { id: 'url-no-channel-placeholder', className: 'url-text--secondary tooltip' },\n 'xyz',\n _react2.default.createElement(\n 'span',\n { className: 'tooltip-text' },\n 'This will be a random id'\n ),\n ' /'\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel: _propTypes2.default.bool.isRequired,\n loggedInChannelName: _propTypes2.default.string,\n loggedInChannelShortId: _propTypes2.default.string\n};\n\nexports.default = UrlMiddle;\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// index.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 57);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8d1148ea2bf2574b28bb","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 0\n// module chunks = 0","module.exports = require(\"winston\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston\"\n// module id = 1\n// module chunks = 0","module.exports = require(\"react-redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-redux\"\n// module id = 2\n// module chunks = 0","function SiteConfig () {\n this.analytics = {\n googleId: 'default',\n };\n this.assetDefaults = {\n description: 'An asset published on Spee.ch',\n thumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',\n title : 'Spee.ch',\n };\n this.auth = {\n sessionKey: 'default',\n };\n this.componentsConfig = {\n components: {},\n containers: {},\n pages : {},\n };\n this.details = {\n description: 'Open-source, decentralized image and video sharing.',\n host : 'default',\n port : 3000,\n title : 'Spee.ch',\n twitter : '@spee_ch',\n };\n this.publishing = {\n additionalClaimAddresses: [],\n disabled : false,\n disabledMessage : 'Please check back soon.',\n primaryClaimAddress : 'default',\n thumbnailChannel : 'default',\n thumbnailChannelId : 'default',\n uploadDirectory : '/home/lbry/Uploads',\n };\n this.configure = (config) => {\n if (!config) {\n return console.log('No site config received.');\n }\n const { analytics, assetDefaults, auth, componentsConfig, details, publishing } = config;\n this.analytics = analytics;\n this.assetDefaults = assetDefaults;\n this.auth = auth;\n this.details = details;\n this.publishing = publishing;\n this.componentsConfig = componentsConfig;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/siteConfig.js","module.exports = require(\"react-router-dom\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-router-dom\"\n// module id = 4\n// module chunks = 0","const Sequelize = require('sequelize');\nconst logger = require('winston');\n\nconsole.log('exporting sequelize models');\nconst { database, username, password } = require('../../config/mysqlConfig');\nconst db = {};\n// set sequelize options\nconst sequelize = new Sequelize(database, username, password, {\n host : 'localhost',\n dialect : 'mysql',\n dialectOptions: {decimalNumbers: true}, // fix to ensure DECIMAL will not be stored as a string\n logging : false,\n pool : {\n max : 5,\n min : 0,\n idle : 10000,\n acquire: 10000,\n },\n});\n\n// establish mysql connection\nsequelize\n .authenticate()\n .then(() => {\n logger.info('Sequelize has established mysql connection successfully.');\n })\n .catch(err => {\n logger.error('Sequelize was unable to connect to the database:', err);\n });\n\n// manually add each model to the db object\nconst Certificate = require('./certificate.js');\nconst Channel = require('./channel.js');\nconst Claim = require('./claim.js');\nconst File = require('./file.js');\nconst Request = require('./request.js');\nconst User = require('./user.js');\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(modelName => {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = (Model, values, condition, tableName) => {\n return Model\n .findOne({\n where: condition,\n })\n .then(obj => {\n if (obj) { // update\n logger.debug(`updating record in db.${tableName}`);\n return obj.update(values);\n } else { // insert\n logger.debug(`creating record in db.${tableName}`);\n return Model.create(values);\n }\n })\n .catch(function (error) {\n logger.error(`${tableName}.upsert error`, error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/index.js","import 'cross-fetch/polyfill';\n\n/**\n * Parses the JSON returned by a network request\n *\n * @param {object} response A response from a network request\n *\n * @return {object} The parsed JSON from the request\n */\nfunction parseJSON (response) {\n if (response.status === 204 || response.status === 205) {\n return null;\n }\n return response.json();\n}\n\n/**\n * Parses the status returned by a network request\n *\n * @param {object} response A response from a network request\n * @param {object} response The parsed JSON from the network request\n *\n * @return {object | undefined} Returns object with status and statusText, or undefined\n */\nfunction checkStatus (response, jsonResponse) {\n if (response.status >= 200 && response.status < 300) {\n return jsonResponse;\n }\n const error = new Error(jsonResponse.message);\n error.response = response;\n throw error;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @param {string} url The URL we want to request\n * @param {object} [options] The options we want to pass to \"fetch\"\n *\n * @return {object} The response data\n */\n\nexport default function request (url, options) {\n return fetch(url, options)\n .then(response => {\n return Promise.all([response, parseJSON(response)]);\n })\n .then(([response, jsonResponse]) => {\n return checkStatus(response, jsonResponse);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/request.js","import * as actions from 'constants/show_action_types';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\n// basic request parsing\nexport function onHandleShowPageUri (params) {\n return {\n type: actions.HANDLE_SHOW_URI,\n data: params,\n };\n};\n\nexport function onRequestError (error) {\n return {\n type: actions.REQUEST_ERROR,\n data: error,\n };\n};\n\nexport function onNewChannelRequest (channelName, channelId) {\n const requestType = CHANNEL;\n const requestId = `cr#${channelName}#${channelId}`;\n return {\n type: actions.CHANNEL_REQUEST_NEW,\n data: { requestType, requestId, channelName, channelId },\n };\n};\n\nexport function onNewAssetRequest (name, id, channelName, channelId, extension) {\n const requestType = extension ? ASSET_LITE : ASSET_DETAILS;\n const requestId = `ar#${name}#${id}#${channelName}#${channelId}`;\n return {\n type: actions.ASSET_REQUEST_NEW,\n data: {\n requestType,\n requestId,\n name,\n modifier: {\n id,\n channel: {\n name: channelName,\n id : channelId,\n },\n },\n },\n };\n};\n\nexport function onRequestUpdate (requestType, requestId) {\n return {\n type: actions.REQUEST_UPDATE,\n data: {\n requestType,\n requestId,\n },\n };\n};\n\nexport function addRequestToRequestList (id, error, key) {\n return {\n type: actions.REQUEST_LIST_ADD,\n data: { id, error, key },\n };\n};\n\n// asset actions\n\nexport function addAssetToAssetList (id, error, name, claimId, shortId, claimData) {\n return {\n type: actions.ASSET_ADD,\n data: { id, error, name, claimId, shortId, claimData },\n };\n}\n\n// channel actions\n\nexport function addNewChannelToChannelList (id, name, shortId, longId, claimsData) {\n return {\n type: actions.CHANNEL_ADD,\n data: { id, name, shortId, longId, claimsData },\n };\n};\n\nexport function onUpdateChannelClaims (channelKey, name, longId, page) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,\n data: {channelKey, name, longId, page},\n };\n};\n\nexport function updateChannelClaims (channelListId, claimsData) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,\n data: {channelListId, claimsData},\n };\n};\n\n// display a file\n\nexport function fileRequested (name, claimId) {\n return {\n type: actions.FILE_REQUESTED,\n data: { name, claimId },\n };\n};\n\nexport function updateFileAvailability (status) {\n return {\n type: actions.FILE_AVAILABILITY_UPDATE,\n data: status,\n };\n};\n\nexport function updateDisplayAssetError (error) {\n return {\n type: actions.DISPLAY_ASSET_ERROR,\n data: error,\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/show.js","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport {updateSelectedChannel} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, site }) => {\n return {\n channelName : channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId : channel.loggedInChannel.longId,\n siteDescription: site.description,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n onChannelLogout: () => {\n dispatch(updateLoggedInChannel(null, null, null));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site }) => {\n const { defaultDescription, defaultThumbnail, description: siteDescription, host: siteHost, title: siteTitle, twitter: siteTwitter } = site;\n return {\n defaultDescription,\n defaultThumbnail,\n siteDescription,\n siteHost,\n siteTitle,\n siteTwitter,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/index.js","module.exports = require(\"prop-types\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 10\n// module chunks = 0","// request actions\nexport const HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nexport const REQUEST_ERROR = 'REQUEST_ERROR';\nexport const REQUEST_UPDATE = 'REQUEST_UPDATE';\nexport const ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nexport const CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nexport const REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nexport const ASSET_ADD = `ASSET_ADD`;\n\n// channel actions\nexport const CHANNEL_ADD = 'CHANNEL_ADD';\n\nexport const CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nexport const CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nexport const FILE_REQUESTED = 'FILE_REQUESTED';\nexport const FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nexport const DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_action_types.js","export const selectAsset = (show) => {\n const request = show.requestList[show.request.id];\n const assetKey = request.key;\n return show.assetList[assetKey];\n};\n\nexport const selectShowState = (state) => {\n return state.show;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/show.js","module.exports = require(\"react-helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-helmet\"\n// module id = 13\n// module chunks = 0","module.exports = require(\"redux-saga/effects\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga/effects\"\n// module id = 14\n// module chunks = 0","const axios = require('axios');\nconst logger = require('winston');\nconst { api: { apiHost, apiPort } } = require('../../config/lbryConfig.js');\nconst lbryApiUri = 'http://' + apiHost + ':' + apiPort;\nconst { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('./googleAnalytics.js');\n\nconst handleLbrynetResponse = ({ data }, resolve, reject) => {\n logger.debug('lbry api data:', data);\n if (data.result) {\n // check for an error\n if (data.result.error) {\n logger.debug('Lbrynet api error:', data.result.error);\n reject(new Error(data.result.error));\n return;\n };\n resolve(data.result);\n return;\n }\n // fallback in case it just timed out\n reject(JSON.stringify(data));\n};\n\nmodule.exports = {\n publishClaim (publishParams) {\n logger.debug(`lbryApi >> Publishing claim to \"${publishParams.name}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'publish',\n params: publishParams,\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaim (uri) {\n logger.debug(`lbryApi >> Getting Claim for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'get',\n params: { uri, timeout: 20 },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimList (claimName) {\n logger.debug(`lbryApi >> Getting claim_list for \"${claimName}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'claim_list',\n params: { name: claimName },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n resolveUri (uri) {\n logger.debug(`lbryApi >> Resolving URI for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'resolve',\n params: { uri },\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now());\n if (data.result[uri].error) { // check for errors\n reject(data.result[uri].error);\n } else { // if no errors, resolve\n resolve(data.result[uri]);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getDownloadDirectory () {\n logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'settings_get',\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now());\n if (data.result) {\n resolve(data.result.download_directory);\n } else {\n return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.');\n }\n })\n .catch(error => {\n logger.error('Lbrynet Error:', error);\n resolve('/home/lbry/Downloads/');\n });\n });\n },\n createChannel (name) {\n logger.debug(`lbryApi >> Creating channel for ${name}...`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'channel_new',\n params: {\n channel_name: name,\n amount : 0.1,\n },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryApi.js","const logger = require('winston');\nconst ua = require('universal-analytics');\nconst { analytics : { googleId }, details: { title } } = require('../../config/siteConfig.js');\n\nfunction createServeEventParams (headers, ip, originalUrl) {\n return {\n eventCategory : 'client requests',\n eventAction : 'serve request',\n eventLabel : originalUrl,\n ipOverride : ip,\n userAgentOverride: headers['user-agent'],\n };\n};\n\nfunction createPublishTimingEventParams (category, variable, label, startTime, endTime) {\n const duration = endTime - startTime;\n return {\n userTimingCategory : category,\n userTimingVariableName: variable,\n userTimingTime : duration,\n userTimingLabel : label,\n };\n};\n\nfunction sendGoogleAnalyticsEvent (ip, params) {\n const visitorId = ip.replace(/\\./g, '-');\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.event(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n });\n};\n\nfunction sendGoogleAnalyticsTiming (visitorId, params) {\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.timing(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n logger.debug(`Timing event successfully sent to google analytics`);\n });\n};\n\nmodule.exports = {\n sendGAServeEvent (headers, ip, originalUrl) {\n const params = createServeEventParams(headers, ip, originalUrl);\n sendGoogleAnalyticsEvent(ip, params);\n },\n sendGATimingEvent (category, variable, label, startTime, endTime) {\n const params = createPublishTimingEventParams(category, variable, label, startTime, endTime);\n sendGoogleAnalyticsTiming(title, params);\n },\n chooseGaLbrynetPublishLabel ({ channel_name: channelName, channel_id: channelId }) {\n return (channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM');\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/googleAnalytics.js","module.exports = require(\"redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux\"\n// module id = 17\n// module chunks = 0","import React from 'react';\nimport GoogleAnalytics from 'react-ga';\nimport { withRouter } from 'react-router-dom';\nconst { analytics: { googleId } } = require('../../../config/siteConfig.js');\n\nGoogleAnalytics.initialize(googleId);\n\nclass GAListener extends React.Component {\n componentDidMount () {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n\n sendPageView (location) {\n GoogleAnalytics.set({ page: location.pathname });\n GoogleAnalytics.pageview(location.pathname);\n }\n\n render () {\n return this.props.children;\n }\n}\n\nexport default withRouter(GAListener);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/GAListener/index.jsx","const { componentsConfig } = require('../../config/siteConfig.js');\n\nfunction getDeepestChildValue (parent, childrenKeys) {\n let childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array\n let child = parent[childKey];\n if (childrenKeys.length >= 1) {\n return getDeepestChildValue(child, childrenKeys);\n }\n return child;\n}\n\nexport const dynamicImport = (filePath) => {\n // validate inputs\n if (!filePath) {\n throw new Error('no file path provided to dynamicImport()');\n }\n if (typeof filePath !== 'string') {\n console.log('dynamicImport > filePath:', filePath);\n console.log('dynamicImport > filePath type:', typeof filePath);\n throw new Error('file path provided to dynamicImport() must be a string');\n }\n if (!componentsConfig) {\n console.log('no componentsConfig found in siteConfig.js');\n return require(`${filePath}`);\n }\n // split out the file folders // filter out any empty or white-space-only strings\n const folders = filePath.split('/').filter(folderName => folderName.replace(/\\s/g, '').length);\n // check for the component corresponding to file path in the site config object\n // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]]\n const customComponent = getDeepestChildValue(componentsConfig, folders);\n if (customComponent) {\n return customComponent; // return custom component\n } else {\n return require(`${filePath}`);\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/dynamicImport.js","const createBasicCanonicalLink = (page, siteHost) => {\n return `${siteHost}/${page}`;\n};\n\nconst createAssetCanonicalLink = (asset, siteHost) => {\n let channelName, certificateId, name, claimId;\n if (asset.claimData) {\n ({ channelName, certificateId, name, claimId } = asset.claimData);\n };\n if (channelName) {\n return `${siteHost}/${channelName}:${certificateId}/${name}`;\n };\n return `${siteHost}/${claimId}/${name}`;\n};\n\nconst createChannelCanonicalLink = (channel, siteHost) => {\n const { name, longId } = channel;\n return `${siteHost}/${name}:${longId}`;\n};\n\nexport const createCanonicalLink = (asset, channel, page, siteHost) => {\n if (asset) {\n return createAssetCanonicalLink(asset, siteHost);\n }\n if (channel) {\n return createChannelCanonicalLink(channel, siteHost);\n }\n return createBasicCanonicalLink(page, siteHost);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/canonicalLink.js","module.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(identifier)\n .map(match => match || null);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your URL. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('Check your URL. No channel name after \"@\".');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in channel name: \"${nameBadChars.join(', ')}\".`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`Check your URL. No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`Check your URL. The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId: channelClaimId || null,\n claimId : claimId || null,\n };\n },\n parseClaim: function (name) {\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first extension)\n '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end)\n );\n const [proto, claimName, extensionSeperator, extension] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(name)\n .map(match => match || null);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('Check your URL. No claim name provided before \".\"');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in claim name: \"${nameBadChars.join(', ')}\".`);\n }\n // Validate and process extension\n if (extensionSeperator) {\n if (!extension) {\n throw new Error(`Check your URL. No file extension provided after separator \"${extensionSeperator}\".`);\n }\n if (extensionSeperator !== '.') {\n throw new Error(`Check your URL. The \"${extensionSeperator}\" separator is not supported in the claim name.`);\n }\n }\n return {\n claimName,\n extension: extension || null,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/lbryUri.js","const determineOgThumbnailContentType = (thumbnail) => {\n if (thumbnail) {\n const fileExt = thumbnail.substring(thumbnail.lastIndexOf('.'));\n switch (fileExt) {\n case 'jpeg':\n case 'jpg':\n return 'image/jpeg';\n case 'png':\n return 'image/png';\n case 'gif':\n return 'image/gif';\n case 'mp4':\n return 'video/mp4';\n default:\n return 'image/jpeg';\n }\n }\n return '';\n};\n\nconst createBasicMetaTags = (siteHost, siteDescription, siteTitle, siteTwitter) => {\n return [\n {property: 'og:title', content: siteTitle},\n {property: 'og:url', content: siteHost},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: siteDescription},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createChannelMetaTags = (siteTitle, siteHost, siteTwitter, channel) => {\n const { name, longId } = channel;\n return [\n {property: 'og:title', content: `${name} on ${siteTitle}`},\n {property: 'og:url', content: `${siteHost}/${name}:${longId}`},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: `${name}, a channel on ${siteTitle}`},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createAssetMetaTags = (siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) => {\n const { claimData } = asset;\n const { contentType } = claimData;\n const embedUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const showUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const source = `${siteHost}/${claimData.claimId}/${claimData.name}.${claimData.fileExt}`;\n const ogTitle = claimData.title || claimData.name;\n const ogDescription = claimData.description || defaultDescription;\n const ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);\n const ogThumbnail = claimData.thumbnail || defaultThumbnail;\n const metaTags = [\n {property: 'og:title', content: ogTitle},\n {property: 'og:url', content: showUrl},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: ogDescription},\n {property: 'og:image:width', content: 600},\n {property: 'og:image:height', content: 315},\n {property: 'twitter:site', content: siteTwitter},\n ];\n if (contentType === 'video/mp4' || contentType === 'video/webm') {\n metaTags.push({property: 'og:video', content: source});\n metaTags.push({property: 'og:video:secure_url', content: source});\n metaTags.push({property: 'og:video:type', content: contentType});\n metaTags.push({property: 'og:image', content: ogThumbnail});\n metaTags.push({property: 'og:image:type', content: ogThumbnailContentType});\n metaTags.push({property: 'og:type', content: 'video'});\n metaTags.push({property: 'twitter:card', content: 'player'});\n metaTags.push({property: 'twitter:player', content: embedUrl});\n metaTags.push({property: 'twitter:player:width', content: 600});\n metaTags.push({property: 'twitter:text:player_width', content: 600});\n metaTags.push({property: 'twitter:player:height', content: 337});\n metaTags.push({property: 'twitter:player:stream', content: source});\n metaTags.push({property: 'twitter:player:stream:content_type', content: contentType});\n } else {\n metaTags.push({property: 'og:image', content: source});\n metaTags.push({property: 'og:image:type', content: contentType});\n metaTags.push({property: 'og:type', content: 'article'});\n metaTags.push({property: 'twitter:card', content: 'summary_large_image'});\n }\n return metaTags;\n};\n\nexport const createMetaTags = (siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) => {\n if (asset) {\n return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail);\n };\n if (channel) {\n return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel);\n };\n return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/metaTags.js","export const createPageTitle = (siteTitle, pageTitle) => {\n if (!pageTitle) {\n return `${siteTitle}`;\n }\n return `${siteTitle} - ${pageTitle}`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/pageTitle.js","import * as actions from 'constants/channel_action_types';\n\n// export action creators\n\nexport function updateLoggedInChannel (name, shortId, longId) {\n return {\n type: actions.CHANNEL_UPDATE,\n data: {\n name,\n shortId,\n longId,\n },\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/channel.js","import * as actions from 'constants/publish_action_types';\n\n// export action creators\nexport function selectFile (file) {\n return {\n type: actions.FILE_SELECTED,\n data: file,\n };\n};\n\nexport function clearFile () {\n return {\n type: actions.FILE_CLEAR,\n };\n};\n\nexport function updateMetadata (name, value) {\n return {\n type: actions.METADATA_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateClaim (value) {\n return {\n type: actions.CLAIM_UPDATE,\n data: value,\n };\n};\n\nexport function setPublishInChannel (channel) {\n return {\n type: actions.SET_PUBLISH_IN_CHANNEL,\n channel,\n };\n};\n\nexport function updatePublishStatus (status, message) {\n return {\n type: actions.PUBLISH_STATUS_UPDATE,\n data: {\n status,\n message,\n },\n };\n};\n\nexport function updateError (name, value) {\n return {\n type: actions.ERROR_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateSelectedChannel (channelName) {\n return {\n type: actions.SELECTED_CHANNEL_UPDATE,\n data: channelName,\n };\n};\n\nexport function toggleMetadataInputs (showMetadataInputs) {\n return {\n type: actions.TOGGLE_METADATA_INPUTS,\n data: showMetadataInputs,\n };\n};\n\nexport function onNewThumbnail (file) {\n return {\n type: actions.THUMBNAIL_NEW,\n data: file,\n };\n};\n\nexport function startPublish (history) {\n return {\n type: actions.PUBLISH_START,\n data: { history },\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/publish.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ActiveStatusBar from 'components/ActiveStatusBar';\nimport InactiveStatusBar from 'components/InactiveStatusBar';\n\nclass ProgressBar extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n bars : [],\n index : 0,\n incrementer: 1,\n };\n this.createBars = this.createBars.bind(this);\n this.startProgressBar = this.startProgressBar.bind(this);\n this.updateProgressBar = this.updateProgressBar.bind(this);\n this.stopProgressBar = this.stopProgressBar.bind(this);\n }\n componentDidMount () {\n this.createBars();\n this.startProgressBar();\n }\n componentWillUnmount () {\n this.stopProgressBar();\n }\n createBars () {\n const bars = [];\n for (let i = 0; i <= this.props.size; i++) {\n bars.push({isActive: false});\n }\n this.setState({ bars });\n }\n startProgressBar () {\n this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);\n };\n updateProgressBar () {\n let index = this.state.index;\n let incrementer = this.state.incrementer;\n let bars = this.state.bars;\n // flip incrementer if necessary, to stay in bounds\n if ((index < 0) || (index > this.props.size)) {\n incrementer = incrementer * -1;\n index += incrementer;\n }\n // update the indexed bar\n if (incrementer > 0) {\n bars[index].isActive = true;\n } else {\n bars[index].isActive = false;\n };\n // increment index\n index += incrementer;\n // update state\n this.setState({\n bars,\n incrementer,\n index,\n });\n };\n stopProgressBar () {\n clearInterval(this.updateInterval);\n };\n render () {\n return (\n
\n {this.state.bars.map((bar, index) => bar.isActive ? : )}\n
\n );\n }\n};\n\nProgressBar.propTypes = {\n size: PropTypes.number.isRequired,\n};\n\nexport default ProgressBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ProgressBar/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\nimport NavBar from 'containers/NavBar';\n\nclass ErrorPage extends React.Component {\n render () {\n const { error } = this.props;\n return (\n
\n \n
\n

{error}

\n
\n
\n );\n }\n};\n\nErrorPage.propTypes = {\n error: PropTypes.string.isRequired,\n};\n\nexport default ErrorPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ErrorPage/index.jsx","module.exports = require(\"passport\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport\"\n// module id = 28\n// module chunks = 0","function MysqlConfig () {\n this.database = 'default';\n this.username = 'default';\n this.password = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No MySQL config received.');\n }\n const {database, username, password} = config;\n this.database = database;\n this.username = username;\n this.password = password;\n };\n};\n\nmodule.exports = new MysqlConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/mysqlConfig.js","function SlackConfig () {\n this.slackWebHook = 'default';\n this.slackErrorChannel = 'default';\n this.slackInfoChannel = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No slack config received.');\n }\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = config;\n this.slackWebHook = slackWebHook;\n this.slackErrorChannel = slackErrorChannel;\n this.slackInfoChannel = slackInfoChannel;\n };\n};\n\nmodule.exports = new SlackConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/slackConfig.js","module.exports = require(\"passport-local\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport-local\"\n// module id = 31\n// module chunks = 0","module.exports = require(\"sequelize\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"sequelize\"\n// module id = 32\n// module chunks = 0","module.exports = {\n returnShortId: function (claimsArray, longId) {\n let claimIndex;\n let shortId = longId.substring(0, 1); // default short id is the first letter\n let shortIdLength = 0;\n // find the index of this claim id\n claimIndex = claimsArray.findIndex(element => {\n return element.claimId === longId;\n });\n if (claimIndex < 0) {\n throw new Error('claim id not found in claims list');\n }\n // get an array of all claims with lower height\n let possibleMatches = claimsArray.slice(0, claimIndex);\n // remove certificates with the same prefixes until none are left.\n while (possibleMatches.length > 0) {\n shortIdLength += 1;\n shortId = longId.substring(0, shortIdLength);\n possibleMatches = possibleMatches.filter(element => {\n return (element.claimId && (element.claimId.substring(0, shortIdLength) === shortId));\n });\n }\n return shortId;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/sequelizeHelpers.js","const logger = require('winston');\nconst fs = require('fs');\n\nconst { details, publishing } = require('../../config/siteConfig.js');\n\nmodule.exports = {\n parsePublishApiRequestBody ({name, nsfw, license, title, description, thumbnail}) {\n // validate name\n if (!name) {\n throw new Error('no name field found in request');\n }\n const invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name);\n if (invalidNameCharacters) {\n throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and \"-\"');\n }\n // optional parameters\n nsfw = (nsfw === 'true');\n license = license || null;\n title = title || null;\n description = description || null;\n thumbnail = thumbnail || null;\n // return results\n return {\n name,\n nsfw,\n license,\n title,\n description,\n thumbnail,\n };\n },\n parsePublishApiRequestFiles ({file, thumbnail}) {\n // make sure a file was provided\n if (!file) {\n throw new Error('no file with key of [file] found in request');\n }\n if (!file.path) {\n throw new Error('no file path found');\n }\n if (!file.type) {\n throw new Error('no file type found');\n }\n if (!file.size) {\n throw new Error('no file type found');\n }\n // validate the file name\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate the file\n module.exports.validateFileTypeAndSize(file);\n // return results\n return {\n fileName : file.name,\n filePath : file.path,\n fileType : file.type,\n thumbnailFileName: (thumbnail ? thumbnail.name : null),\n thumbnailFilePath: (thumbnail ? thumbnail.path : null),\n thumbnailFileType: (thumbnail ? thumbnail.type : null),\n };\n },\n validateFileTypeAndSize (file) {\n // check file type and size\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n logger.debug('publish > file validation > .jpeg/.jpg/.png was too big');\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .gif was too big');\n throw new Error('Sorry, .gifs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .mp4 was too big');\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n logger.debug('publish > file validation > unrecognized file type');\n throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n return file;\n },\n createBasicPublishParams (filePath, name, title, description, license, nsfw, thumbnail) {\n logger.debug(`Creating Publish Parameters`);\n // provide defaults for title\n if (title === null || title.trim() === '') {\n title = name;\n }\n // provide default for description\n if (description === null || description.trim() === '') {\n description = '';\n }\n // provide default for license\n if (license === null || license.trim() === '') {\n license = ' '; // default to empty string\n }\n // create the publish params\n const publishParams = {\n name,\n file_path: filePath,\n bid : 0.01,\n metadata : {\n description,\n title,\n author : details.title,\n language: 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n };\n // add thumbnail to channel if video\n if (thumbnail) {\n publishParams['metadata']['thumbnail'] = thumbnail;\n }\n return publishParams;\n },\n createThumbnailPublishParams (thumbnailFilePath, claimName, license, nsfw) {\n if (!thumbnailFilePath) {\n return;\n }\n logger.debug(`Creating Thumbnail Publish Parameters`);\n // create the publish params\n return {\n name : `${claimName}-thumb`,\n file_path: thumbnailFilePath,\n bid : 0.01,\n metadata : {\n title : `${claimName} thumbnail`,\n description: `a thumbnail for ${claimName}`,\n author : details.title,\n language : 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n channel_name : publishing.thumbnailChannel,\n channel_id : publishing.thumbnailChannelId,\n };\n },\n deleteTemporaryFile (filePath) {\n fs.unlink(filePath, err => {\n if (err) {\n logger.error(`error deleting temporary file ${filePath}`);\n throw err;\n }\n logger.debug(`successfully deleted ${filePath}`);\n });\n },\n addGetResultsToFileData (fileInfo, getResult) {\n fileInfo.fileName = getResult.file_name;\n fileInfo.filePath = getResult.download_path;\n return fileInfo;\n },\n createFileData ({ name, claimId, outpoint, height, address, nsfw, contentType }) {\n return {\n name,\n claimId,\n outpoint,\n height,\n address,\n fileName: '',\n filePath: '',\n fileType: contentType,\n nsfw,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/publishHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n handleErrorResponse: function (originalUrl, ip, error, res) {\n logger.error(`Error on ${originalUrl}`, module.exports.useObjectPropertiesIfNoKeys(error));\n const [status, message] = module.exports.returnErrorMessageAndStatus(error);\n res\n .status(status)\n .json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function (error) {\n let status, message;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function (err) {\n if (Object.keys(err).length === 0) {\n let newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach((key) => {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload (status, message) {\n return {\n status,\n success: false,\n message,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/errorHandlers.js","const db = require('../models/index');\nconst logger = require('winston');\nconst { returnPaginatedChannelClaims } = require('../helpers/channelPagination.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\nconst NO_FILE = 'NO_FILE';\n\nmodule.exports = {\n getClaimId (channelName, channelClaimId, name, claimId) {\n if (channelName) {\n return module.exports.getClaimIdByChannel(channelName, channelClaimId, name);\n } else {\n return module.exports.getClaimIdByClaim(name, claimId);\n }\n },\n getClaimIdByClaim (claimName, claimId) {\n logger.debug(`getClaimIdByClaim(${claimName}, ${claimId})`);\n return new Promise((resolve, reject) => {\n db.Claim.getLongClaimId(claimName, claimId)\n .then(longClaimId => {\n if (!longClaimId) {\n resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimIdByChannel (channelName, channelClaimId, claimName) {\n logger.debug(`getClaimIdByChannel(${channelName}, ${channelClaimId}, ${claimName})`);\n return new Promise((resolve, reject) => {\n db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id\n .then(longChannelId => {\n if (!longChannelId) {\n return [null, null];\n }\n return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id\n })\n .then(([longChannelId, longClaimId]) => {\n if (!longChannelId) {\n return resolve(NO_CHANNEL);\n }\n if (!longClaimId) {\n return resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelData (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]);\n })\n .then(([longChannelClaimId, shortChannelClaimId]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. return all the channel information\n resolve({\n channelName,\n longChannelClaimId,\n shortChannelClaimId,\n });\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelClaims (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]);\n })\n .then(([longChannelClaimId, channelClaimsArray]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. format the data for the view, including pagination\n let paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);\n // 4. return all the channel information and contents\n resolve(paginatedChannelViewData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getLocalFileRecord (claimId, name) {\n return db.File.findOne({where: {claimId, name}})\n .then(file => {\n if (!file) {\n return NO_FILE;\n }\n return file.dataValues;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/serveController.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage.js';\nimport Helmet from 'react-helmet';\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create a new Redux store instance\n const store = createStore(Reducer);\n\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `` was rendered\n return res.redirect(301, context.url);\n } else {\n // we're good, send the response\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handlePageRender.jsx","module.exports = require(\"react-dom/server\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-dom/server\"\n// module id = 38\n// module chunks = 0","import { combineReducers } from 'redux';\nimport PublishReducer from 'reducers/publish';\nimport ChannelReducer from 'reducers/channel';\nimport ShowReducer from 'reducers/show';\nimport SiteReducer from 'reducers/site';\n\nexport default combineReducers({\n channel: ChannelReducer,\n publish: PublishReducer,\n show : ShowReducer,\n site : SiteReducer,\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/index.js","export const FILE_SELECTED = 'FILE_SELECTED';\nexport const FILE_CLEAR = 'FILE_CLEAR';\nexport const METADATA_UPDATE = 'METADATA_UPDATE';\nexport const CLAIM_UPDATE = 'CLAIM_UPDATE';\nexport const SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';\nexport const PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';\nexport const ERROR_UPDATE = 'ERROR_UPDATE';\nexport const SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';\nexport const TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';\nexport const THUMBNAIL_NEW = 'THUMBNAIL_NEW';\nexport const PUBLISH_START = 'PUBLISH_START';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_action_types.js","export const CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/channel_action_types.js","export const LOCAL_CHECK = 'LOCAL_CHECK';\nexport const UNAVAILABLE = 'UNAVAILABLE';\nexport const ERROR = 'ERROR';\nexport const AVAILABLE = 'AVAILABLE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/asset_display_states.js","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport { dynamicImport } from 'utils/dynamicImport';\nimport AboutPage from 'pages/AboutPage';\nimport LoginPage from 'pages/LoginPage';\nimport ShowPage from 'pages/ShowPage';\nimport FourOhFourPage from 'containers/FourOhFourPage';\nconst HomePage = dynamicImport('pages/HomePage'); // or use the provided local homepage\n\nconst App = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default App;\n\n\n\n// WEBPACK FOOTER //\n// ./client/app.js","var map = {\n\t\"./canonicalLink\": 20,\n\t\"./canonicalLink.js\": 20,\n\t\"./dynamicImport\": 19,\n\t\"./dynamicImport.js\": 19,\n\t\"./file\": 45,\n\t\"./file.js\": 45,\n\t\"./lbryUri\": 21,\n\t\"./lbryUri.js\": 21,\n\t\"./metaTags\": 22,\n\t\"./metaTags.js\": 22,\n\t\"./pageTitle\": 23,\n\t\"./pageTitle.js\": 23,\n\t\"./publish\": 46,\n\t\"./publish.js\": 46,\n\t\"./request\": 6,\n\t\"./request.js\": 6,\n\t\"./validate\": 47,\n\t\"./validate.js\": 47\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 44;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/utils ^.*$\n// module id = 44\n// module chunks = 0","module.exports = {\n validateFile (file) {\n if (!file) {\n throw new Error('no file provided');\n }\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate size and type\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n throw new Error('Sorry, GIFs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/file.js","export const createPublishMetadata = (claim, { type }, { title, description, license, nsfw }, publishInChannel, selectedChannel) => {\n let metadata = {\n name: claim,\n title,\n description,\n license,\n nsfw,\n type,\n };\n if (publishInChannel) {\n metadata['channelName'] = selectedChannel;\n }\n return metadata;\n};\n\nexport const createPublishFormData = (file, thumbnail, metadata) => {\n let fd = new FormData();\n // append file\n fd.append('file', file);\n // append thumbnail\n if (thumbnail) {\n fd.append('thumbnail', thumbnail);\n }\n // append metadata\n for (let key in metadata) {\n if (metadata.hasOwnProperty(key)) {\n fd.append(key, metadata[key]);\n }\n }\n return fd;\n};\n\nexport const createThumbnailUrl = (channel, channelId, claim, host) => {\n return `${host}/${channel}:${channelId}/${claim}-thumb.png`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/publish.js","export const validateChannelSelection = (publishInChannel, selectedChannel, loggedInChannel) => {\n if (publishInChannel && (selectedChannel !== loggedInChannel.name)) {\n throw new Error('Log in to a channel or select Anonymous');\n }\n};\n\nexport const validatePublishParams = (file, claim, urlError) => {\n if (!file) {\n throw new Error('Please choose a file');\n }\n if (!claim) {\n throw new Error('Please enter a URL');\n }\n if (urlError) {\n throw new Error('Fix the url');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/validate.js","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nfunction Logo () {\n return (\n \n \n Logo\n Spee.ch logo\n \n \n \n Spee<h\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default Logo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/Logo/index.jsx","import React from 'react';\n\nfunction NavBarChannelDropdown ({ channelName, handleSelection, defaultSelection, VIEW, LOGOUT }) {\n return (\n \n );\n};\n\nexport default NavBarChannelDropdown;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/NavBarChannelOptionsDropdown/index.jsx","import React from 'react';\n\nconst ActiveStatusBar = () => {\n return | ;\n};\n\nexport default ActiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ActiveStatusBar/index.jsx","import React from 'react';\n\nconst InactiveStatusBar = () => {\n return | ;\n};\n\nexport default InactiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/InactiveStatusBar/index.jsx","export const CHANNEL = 'CHANNEL';\nexport const ASSET_LITE = 'ASSET_LITE';\nexport const ASSET_DETAILS = 'ASSET_DETAILS';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_request_types.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { fileRequested } from 'actions/show';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select error and status\n const error = show.displayAsset.error;\n const status = show.displayAsset.status;\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n error,\n status,\n asset,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onFileRequest: (name, claimId) => {\n dispatch(fileRequested(name, claimId));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({site: {defaults: { defaultThumbnail }}}) => {\n return {\n defaultThumbnail,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/index.js","module.exports = (helmet, html, preloadedState) => {\n // take the html and preloadedState and return the full page\n return `\n \n \n \n \n \n \n \n ${helmet.title.toString()}\n ${helmet.meta.toString()}\n ${helmet.link.toString()}\n \n \n \n \n \n \n \n \n
\n
${html}
\n
\n \n \n \n \n `;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/renderFullPage.js","export const selectSiteState = (state) => {\n return state.site;\n};\n\nexport const selectSiteHost = (state) => {\n return state.site.host;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/site.js","module.exports = require(\"babel-polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-polyfill\"\n// module id = 58\n// module chunks = 0","module.exports = require(\"whatwg-fetch\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"whatwg-fetch\"\n// module id = 59\n// module chunks = 0","const server = require('server/server.js');\r\nconst components = require('client/components');\r\n// const containers = require('client/containers');\r\n// const pages = require('client/pages');\r\n\r\nconst exports = {\r\n server,\r\n components,\r\n // containers,\r\n // pages,\r\n};\r\n\r\nmodule.exports = exports;\r\n\n\n\n// WEBPACK FOOTER //\n// ./speech.js","// app dependencies\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst expressHandlebars = require('express-handlebars');\nconst Handlebars = require('handlebars');\nconst helmet = require('helmet');\nconst passport = require('passport');\nconst { serializeSpeechUser, deserializeSpeechUser } = require('./helpers/authHelpers.js');\nconst cookieSession = require('cookie-session');\nconst http = require('http');\n// logging dependencies\nconst logger = require('winston');\n\nfunction SpeechServer () {\n this.configureMysql = (mysqlConfig) => {\n require('../config/mysqlConfig.js').configure(mysqlConfig);\n };\n this.configureSite = (siteConfig) => {\n require('../config/siteConfig.js').configure(siteConfig);\n console.log(require('../config/siteConfig.js'));\n this.sessionKey = siteConfig.auth.sessionKey;\n this.PORT = siteConfig.details.port;\n };\n this.configureSlack = (slackConfig) => {\n require('../config/slackConfig.js').configure(slackConfig);\n };\n this.createApp = () => {\n // create an Express application\n const app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(`${__dirname}/public`)); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use((req, res, next) => { // custom logging middleware to log all incoming http requests\n logger.verbose(`Request on ${req.originalUrl} from ${req.ip}`);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n const localSignupStrategy = require('./passport/local-signup.js');\n const localLoginStrategy = require('./passport/local-login.js');\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name : 'session',\n keys : [this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000, // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n const hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars : Handlebars,\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n require('./routes/auth-routes.js')(app);\n require('./routes/api-routes.js')(app);\n require('./routes/page-routes.js')(app);\n require('./routes/asset-routes.js')(app);\n require('./routes/fallback-routes.js')(app);\n\n this.app = app;\n };\n this.initialize = () => {\n require('./helpers/configureLogger.js')(logger);\n require('./helpers/configureSlack.js')(logger);\n this.createApp();\n this.server = http.Server(this.app);\n };\n this.start = () => {\n const db = require('./models/index');\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(() => {\n this.server.listen(this.PORT, () => {\n logger.info(`Server is listening on PORT ${this.PORT}`);\n });\n })\n .catch((error) => {\n logger.error(`Startup Error:`, error);\n });\n };\n};\n\nmodule.exports = SpeechServer;\n\n\n\n// WEBPACK FOOTER //\n// ./server/server.js","module.exports = require(\"express\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express\"\n// module id = 62\n// module chunks = 0","module.exports = require(\"body-parser\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"body-parser\"\n// module id = 63\n// module chunks = 0","module.exports = require(\"express-handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express-handlebars\"\n// module id = 64\n// module chunks = 0","module.exports = require(\"handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"handlebars\"\n// module id = 65\n// module chunks = 0","module.exports = require(\"helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"helmet\"\n// module id = 66\n// module chunks = 0","const logger = require('winston');\n\nmodule.exports = {\n serializeSpeechUser (user, done) { // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser (user, done) { // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/authHelpers.js","module.exports = require(\"cookie-session\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cookie-session\"\n// module id = 68\n// module chunks = 0","module.exports = require(\"http\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"http\"\n// module id = 69\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst lbryApi = require('../helpers/lbryApi.js');\nconst logger = require('winston');\nconst db = require('../models/index');\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`);\n let userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel(`@${username}`)\n .then(tx => {\n // create user record\n const userData = {\n userName: username,\n password: password,\n };\n logger.verbose('userData >', userData);\n // create user record\n const channelData = {\n channelName : `@${username}`,\n channelClaimId: tx.claim_id,\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n const certificateData = {\n claimId: tx.claim_id,\n name : `@${username}`,\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n })\n .then(([newUser, newChannel, newCertificate]) => {\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n })\n .then(() => {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n })\n .catch(error => {\n logger.error('signup error', error);\n return done(error);\n });\n }\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-signup.js","module.exports = require(\"axios\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"axios\"\n// module id = 71\n// module chunks = 0","const lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279',\n },\n};\n\nmodule.exports = lbryConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/lbryConfig.js","module.exports = require(\"universal-analytics\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"universal-analytics\"\n// module id = 73\n// module chunks = 0","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Certificate = sequelize.define(\n 'Certificate',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateVersion: {\n type : STRING,\n default: null,\n },\n keyType: {\n type : STRING,\n default: null,\n },\n publicKey: {\n type : TEXT('long'),\n default: null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Certificate.associate = db => {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n logger.debug(`getShortChannelIdFromLongChannelId ${channelName}:${longChannelId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {name: channelName},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelIdFromShortChannelId(${channelName}, ${channelClaimId})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name : channelName,\n claimId: {\n $like: `${channelClaimId}%`,\n },\n },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n logger.debug(`getLongChannelIdFromChannelName(${channelName})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n logger.debug(`validateLongChannelId(${name}, ${claimId})`);\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelId(${channelName}, ${channelClaimId})`);\n if (channelClaimId && (channelClaimId.length === 40)) { // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) { // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/certificate.js","module.exports = (sequelize, { STRING }) => {\n const Channel = sequelize.define(\n 'Channel',\n {\n channelName: {\n type : STRING,\n allowNull: false,\n },\n channelClaimId: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Channel.associate = db => {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/channel.js","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\nconst { assetDefaults: { thumbnail: defaultThumbnail }, details: { host } } = require('../../config/siteConfig.js');\n\nfunction determineFileExtensionFromContentType (contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail (storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData (claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Claim = sequelize.define(\n 'Claim',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateId: {\n type : STRING,\n default: null,\n },\n author: {\n type : STRING,\n default: null,\n },\n description: {\n type : TEXT('long'),\n default: null,\n },\n language: {\n type : STRING,\n default: null,\n },\n license: {\n type : STRING,\n default: null,\n },\n licenseUrl: {\n type : STRING,\n default: null,\n },\n nsfw: {\n type : BOOLEAN,\n default: null,\n },\n preview: {\n type : STRING,\n default: null,\n },\n thumbnail: {\n type : STRING,\n default: null,\n },\n title: {\n type : STRING,\n default: null,\n },\n metadataVersion: {\n type : STRING,\n default: null,\n },\n contentType: {\n type : STRING,\n default: null,\n },\n source: {\n type : STRING,\n default: null,\n },\n sourceType: {\n type : STRING,\n default: null,\n },\n sourceVersion: {\n type : STRING,\n default: null,\n },\n streamVersion: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n channelName: {\n type : STRING,\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Claim.associate = db => {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n logger.debug(`Claim.getShortClaimIdFromLongClaimId for ${claimName}#${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n logger.debug(`Claim.getAllChannelClaims for ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw : true, // returns an array of only data, not an array of instances\n })\n .then(channelClaimsArray => {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(claim => {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n logger.debug(`finding claim id for claim ${claimName} from channel ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(`${result.length} records found for \"${claimName}\" in channel \"${channelClaimId}\"`);\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name,\n claimId: {\n $like: `${shortId}%`,\n }},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']], // note: maybe height and effective amount need to switch?\n })\n .then(result => {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug(`getLongClaimId(${claimName}, ${claimId})`);\n if (claimId && (claimId.length === 40)) { // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n logger.debug(`Claim.resolveClaim: ${name} ${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name, claimId },\n })\n .then(claimArray => {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error(`more than one record matches ${name}#${claimId} in db.Claim`);\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/claim.js","module.exports = (sequelize, { STRING, BOOLEAN, INTEGER }) => {\n const File = sequelize.define(\n 'File',\n {\n name: {\n type : STRING,\n allowNull: false,\n },\n claimId: {\n type : STRING,\n allowNull: false,\n },\n address: {\n type : STRING,\n allowNull: false,\n },\n outpoint: {\n type : STRING,\n allowNull: false,\n },\n height: {\n type : INTEGER,\n allowNull: false,\n default : 0,\n },\n fileName: {\n type : STRING,\n allowNull: false,\n },\n filePath: {\n type : STRING,\n allowNull: false,\n },\n fileType: {\n type: STRING,\n },\n nsfw: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: false,\n },\n trendingEligible: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: true,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n File.associate = db => {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25,\n });\n };\n\n return File;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/file.js","module.exports = (sequelize, { STRING, BOOLEAN, TEXT }) => {\n const Request = sequelize.define(\n 'Request',\n {\n action: {\n type : STRING,\n allowNull: false,\n },\n url: {\n type : STRING,\n allowNull: false,\n },\n ipAddress: {\n type : STRING,\n allowNull: true,\n },\n result: {\n type : TEXT('long'),\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Request.associate = db => {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n return Request;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/request.js","'use strict';\nconst bcrypt = require('bcrypt');\nconst logger = require('winston');\n\nmodule.exports = (sequelize, { STRING }) => {\n const User = sequelize.define(\n 'User',\n {\n userName: {\n type : STRING,\n allowNull: false,\n },\n password: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n User.associate = db => {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n this\n .update({password: hash})\n .then(() => {\n resolve();\n })\n .catch(error => {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', (user, options) => {\n logger.debug('User.beforeCreate hook...');\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/user.js","module.exports = require(\"bcrypt\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"bcrypt\"\n// module id = 80\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst logger = require('winston');\nconst db = require('../models/index');\n\nconst returnUserAndChannelInfo = (userInstance) => {\n return new Promise((resolve, reject) => {\n let userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance\n .getChannel()\n .then(({channelName, channelClaimId}) => {\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n })\n .catch(error => {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n return db.User\n .findOne({\n where: {userName: username},\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n return user.comparePassword(password)\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user)\n .then(userInfo => {\n return done(null, userInfo);\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return done(error);\n });\n },\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-login.js","const logger = require('winston');\nconst passport = require('passport');\n\nmodule.exports = (app) => {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), (req, res) => {\n logger.verbose(`successful signup for ${req.user.channelName}`);\n res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n // route for log in\n app.post('/login', (req, res, next) => {\n passport.authenticate('local-login', (err, user, info) => {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message,\n });\n }\n logger.debug('successful login');\n req.logIn(user, (err) => {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', (req, res) => {\n req.logout();\n res.status(200).json({success: true, message: 'you successfully logged out'});\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', (req, res) => {\n if (req.user) {\n res.status(200).json({success: true, data: req.user});\n } else {\n res.status(401).json({success: false, message: 'user is not logged in'});\n }\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/auth-routes.js","const logger = require('winston');\nconst multipart = require('connect-multiparty');\nconst { publishing: { uploadDirectory }, details: { host } } = require('../../config/siteConfig.js');\nconst multipartMiddleware = multipart({uploadDir: uploadDirectory});\nconst db = require('../models/index');\nconst { claimNameIsAvailable, checkChannelAvailability, publish } = require('../controllers/publishController.js');\nconst { getClaimList, resolveUri, getClaim } = require('../helpers/lbryApi.js');\nconst { addGetResultsToFileData, createBasicPublishParams, createThumbnailPublishParams, parsePublishApiRequestBody, parsePublishApiRequestFiles, createFileData } = require('../helpers/publishHelpers.js');\nconst errorHandlers = require('../helpers/errorHandlers.js');\nconst { sendGATimingEvent } = require('../helpers/googleAnalytics.js');\nconst { authenticateUser } = require('../auth/authentication.js');\nconst { getChannelData, getChannelClaims, getClaimId } = require('../controllers/serveController.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = (app) => {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n checkChannelAvailability(name)\n .then(availableName => {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', ({ ip, originalUrl, params }, res) => {\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json(shortId);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n const page = params.page;\n getChannelClaims(channelName, channelClaimId, page)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', ({ ip, originalUrl, params }, res) => {\n getClaimList(params.name)\n .then(claimsList => {\n res.status(200).json(claimsList);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId)\n .then(resolveResult => {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n let fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(`${name}#${claimId}`)]);\n })\n .then(([ fileData, getResult ]) => {\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, {name, claimId}, 'File'), getResult]);\n })\n .then(([ fileRecord, {message, completed} ]) => {\n res.status(200).json({ success: true, message, completed });\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n claimNameIsAvailable(name)\n .then(result => {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', ({ headers, ip, originalUrl, params }, res) => {\n resolveUri(`${params.name}#${params.claimId}`)\n .then(resolvedUri => {\n res.status(200).json(resolvedUri);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, ({ body, files, headers, ip, originalUrl, user }, res) => {\n // define variables\n let channelName, channelId, channelPassword, description, fileName, filePath, fileType, gaStartTime, license, name, nsfw, thumbnail, thumbnailFileName, thumbnailFilePath, thumbnailFileType, title;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n // validateApiPublishRequest(body, files);\n ({name, nsfw, license, title, description, thumbnail} = parsePublishApiRequestBody(body));\n ({fileName, filePath, fileType, thumbnailFileName, thumbnailFilePath, thumbnailFileType} = parsePublishApiRequestFiles(files));\n ({channelName, channelId, channelPassword} = body);\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // check channel authorization\n Promise.all([\n authenticateUser(channelName, channelId, channelPassword, user),\n claimNameIsAvailable(name),\n createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail),\n createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw),\n ])\n .then(([{channelName, channelClaimId}, validatedClaimName, publishParams, thumbnailPublishParams]) => {\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n })\n .then(result => {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data : {\n name,\n claimId: result.claim_id,\n url : `${host}/${result.claim_id}/${name}`,\n lbryTx : result,\n },\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', ({ ip, originalUrl, body, params }, res) => {\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json({success: true, data: shortId});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', ({ ip, originalUrl, body, params }, res) => {\n logger.debug('body:', body);\n const channelName = body.channelName;\n const channelClaimId = body.channelClaimId;\n const claimName = body.claimName;\n const claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(result => {\n if (result === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel could be found'});\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'No matching claim id could be found'});\n }\n res.status(200).json({success: true, data: result});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', ({ ip, originalUrl, body, params }, res) => {\n const claimName = params.claimName;\n let claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId)\n .then(claimInfo => {\n if (!claimInfo) {\n return res.status(404).json({success: false, message: 'No claim could be found'});\n }\n res.status(200).json({success: true, data: claimInfo});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n db.File.findOne({where: {name, claimId}})\n .then(result => {\n if (result) {\n return res.status(200).json({success: true, data: true});\n }\n res.status(200).json({success: true, data: false});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/api-routes.js","module.exports = require(\"connect-multiparty\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"connect-multiparty\"\n// module id = 84\n// module chunks = 0","const logger = require('winston');\nconst db = require('../models/index');\nconst lbryApi = require('../helpers/lbryApi.js');\nconst publishHelpers = require('../helpers/publishHelpers.js');\nconst { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('../../config/siteConfig.js');\nconst Sequelize = require('sequelize');\nconst Op = Sequelize.Op;\n\nmodule.exports = {\n publish (publishParams, fileName, fileType) {\n return new Promise((resolve, reject) => {\n let publishResults, certificateId, channelName;\n // publish the file\n return lbryApi.publishClaim(publishParams)\n .then(tx => {\n logger.info(`Successfully published ${publishParams.name} ${fileName}`, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug(`this claim was published in channel: ${publishParams.channel_name}`);\n return db.Channel.findOne({where: {channelName: publishParams.channel_name}});\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n })\n .then(channel => {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug(`certificateId: ${certificateId}`);\n })\n .then(() => {\n // create the File record\n const fileRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n fileName,\n filePath : publishParams.file_path,\n fileType,\n nsfw : publishParams.metadata.nsfw,\n };\n // create the Claim record\n const claimRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n thumbnail : publishParams.metadata.thumbnail,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n contentType: fileType,\n nsfw : publishParams.metadata.nsfw,\n amount : publishParams.bid,\n certificateId,\n channelName,\n };\n // upsert criteria\n const upsertCriteria = {\n name : publishParams.name,\n claimId: publishResults.claim_id,\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n })\n .then(([file, claim]) => {\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n })\n .then(() => {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n })\n .catch(error => {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable (name) {\n const claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim\n .findAll({\n attributes: ['address'],\n where : {\n name,\n address: {\n [Op.or]: claimAddresses,\n },\n },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n checkChannelAvailability (name) {\n return db.Channel\n .findAll({\n where: { channelName: name },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/publishController.js","module.exports = require(\"fs\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"fs\"\n// module id = 86\n// module chunks = 0","const db = require('../models/index');\nconst logger = require('winston');\n\nmodule.exports = {\n authenticateUser (channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName : null,\n channelClaimId: null,\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName : user.channelName,\n channelClaimId: user.channelClaimId,\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials (channelName, channelId, userPassword) {\n return new Promise((resolve, reject) => {\n // hoisted variables\n let channelData;\n // build the params for finding the channel\n let channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel\n .findOne({\n where: channelFindParams,\n })\n .then(channel => {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) },\n });\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n })\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/auth/authentication.js","const CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims (channelName, longChannelClaimId, claims, page) {\n const totalPages = module.exports.determineTotalPages(claims);\n const paginationPage = module.exports.getPageFromQuery(page);\n const viewData = {\n channelName : channelName,\n longChannelClaimId: longChannelClaimId,\n claims : module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage : module.exports.determinePreviousPage(paginationPage),\n currentPage : paginationPage,\n nextPage : module.exports.determineNextPage(totalPages, paginationPage),\n totalPages : totalPages,\n totalResults : module.exports.determineTotalClaims(claims),\n };\n return viewData;\n },\n getPageFromQuery (page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims (claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n const claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n const claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n const pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages (claims) {\n if (!claims) {\n return 0;\n } else {\n const totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n const fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n const remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage (currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage (totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims (claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/channelPagination.js","const { details: host } = require('../../config/siteConfig.js');\nconst handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = (app) => {\n // route for the home page\n app.get('/', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', (req, res) => {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', (req, res) => {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', (req, res) => {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', ({ params }, res) => {\n const claimId = params.claimId;\n const name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host, claimId, name });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/page-routes.js","import * as actions from 'constants/publish_action_types';\nimport { LOGIN } from 'constants/publish_channel_select_states';\nconst { publishing } = require('../../config/siteConfig.js');\n\nconst initialState = {\n disabled : publishing.disabled,\n disabledMessage : publishing.disabledMessage,\n publishInChannel : false,\n selectedChannel : LOGIN,\n showMetadataInputs: false,\n status : {\n status : null,\n message: null,\n },\n error: {\n file : null,\n url : null,\n channel : null,\n publishSubmit: null,\n },\n file : null,\n claim : '',\n metadata: {\n title : '',\n description: '',\n license : '',\n nsfw : false,\n },\n thumbnail: null,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data,\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data,\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel,\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data,\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data,\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data,\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/publish.js","export const LOGIN = 'Existing';\nexport const CREATE = 'New';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_channel_select_states.js","import * as actions from 'constants/channel_action_types';\n\nconst initialState = {\n loggedInChannel: {\n name : null,\n shortId: null,\n longId : null,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/channel.js","import * as actions from 'constants/show_action_types';\nimport { LOCAL_CHECK, ERROR } from 'constants/asset_display_states';\n\nconst initialState = {\n request: {\n error: null,\n type : null,\n id : null,\n },\n requestList : {},\n channelList : {},\n assetList : {},\n displayAsset: {\n error : null,\n status: LOCAL_CHECK,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data,\n }),\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id : action.data.requestId,\n }),\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, {\n [action.data.id]: {\n error: action.data.error,\n key : action.data.key,\n },\n }),\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, {\n [action.data.id]: {\n error : action.data.error,\n name : action.data.name,\n claimId : action.data.claimId,\n shortId : action.data.shortId,\n claimData: action.data.claimData,\n },\n }),\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.id]: {\n name : action.data.name,\n longId : action.data.longId,\n shortId : action.data.shortId,\n claimsData: action.data.claimsData,\n },\n }),\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.channelListId]: Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData,\n }),\n }),\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data,\n }),\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error : action.data,\n status: ERROR,\n }),\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/show.js","const siteConfig = require('../../config/siteConfig.js');\n\nconst {\n analytics: {\n googleId: googleAnalyticsId,\n },\n assetDefaults: {\n thumbnail: defaultThumbnail,\n description: defaultDescription,\n },\n details: {\n description,\n host,\n title,\n twitter,\n },\n} = siteConfig;\n\nconst initialState = {\n description,\n googleAnalyticsId,\n host,\n title,\n twitter,\n defaultDescription,\n defaultThumbnail,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/site.js","module.exports = require(\"react-ga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-ga\"\n// module id = 95\n// module chunks = 0","module.exports = require(\"cross-fetch/polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cross-fetch/polyfill\"\n// module id = 96\n// module chunks = 0","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport SEO from 'components/SEO';\n\nclass AboutPage extends React.Component {\n render () {\n return (\n
\n \n \n
\n
\n
\n

Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.

\n

TWITTER

\n

GITHUB

\n

DISCORD CHANNEL

\n

DOCUMENTATION

\n
\n
\n
\n

Spee.ch is a media-hosting site that reads from and publishes content to the LBRY blockchain.

\n

Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the LBRY network. This means that your images are stored in multiple locations without a single point of failure.

\n

Contribute

\n

If you have an idea for your own spee.ch-like site on top of LBRY, fork our github repo and go to town!

\n

If you want to improve spee.ch, join our discord channel or solve one of our github issues.

\n
\n
\n
\n
\n );\n }\n};\n\nexport default AboutPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/AboutPage/index.jsx","import React from 'react';\nimport { NavLink, withRouter } from 'react-router-dom';\nimport Logo from 'components/Logo';\nimport NavBarChannelDropdown from 'components/NavBarChannelOptionsDropdown';\nimport request from 'utils/request';\n\nconst VIEW = 'VIEW';\nconst LOGOUT = 'LOGOUT';\n\nclass NavBar extends React.Component {\n constructor (props) {\n super(props);\n this.checkForLoggedInUser = this.checkForLoggedInUser.bind(this);\n this.logoutUser = this.logoutUser.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n componentDidMount () {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n checkForLoggedInUser () {\n const params = {credentials: 'include'};\n request('/user', params)\n .then(({ data }) => {\n this.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n })\n .catch(error => {\n console.log('/user error:', error.message);\n });\n }\n logoutUser () {\n const params = {credentials: 'include'};\n request('/logout', params)\n .then(() => {\n this.props.onChannelLogout();\n })\n .catch(error => {\n console.log('/logout error', error.message);\n });\n }\n handleSelection (event) {\n const value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push(`/${this.props.channelName}:${this.props.channelLongId}`);\n break;\n default:\n break;\n }\n }\n render () {\n const { siteDescription } = this.props;\n return (\n
\n
\n \n
\n {siteDescription}\n
\n
\n Publish\n About\n { this.props.channelName ? (\n \n ) : (\n Channel\n )}\n
\n
\n
\n );\n }\n}\n\nexport default withRouter(NavBar);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/view.jsx","import React from 'react';\nimport Helmet from 'react-helmet';\nimport PropTypes from 'prop-types';\n\nimport { createPageTitle } from 'utils/pageTitle';\nimport { createMetaTags } from 'utils/metaTags';\nimport { createCanonicalLink } from 'utils/canonicalLink';\n\nclass SEO extends React.Component {\n render () {\n // props from state\n const { defaultDescription, defaultThumbnail, siteDescription, siteHost, siteTitle, siteTwitter } = this.props;\n // props from parent\n const { asset, channel, pageUri } = this.props;\n let { pageTitle } = this.props;\n // create page title, tags, and canonical link\n pageTitle = createPageTitle(siteTitle, pageTitle);\n const metaTags = createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n const canonicalLink = createCanonicalLink(asset, channel, pageUri, siteHost);\n // render results\n return (\n \n );\n }\n};\n\nSEO.propTypes = {\n pageTitle: PropTypes.string,\n pageUri : PropTypes.string,\n channel : PropTypes.object,\n asset : PropTypes.object,\n};\n\nexport default SEO;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/view.jsx","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/index.js","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ChannelLoginForm from 'containers/ChannelLoginForm';\nimport ChannelCreateForm from 'containers/ChannelCreateForm';\n\nclass LoginPage extends React.Component {\n componentWillReceiveProps (newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push(`/`);\n }\n }\n render () {\n return (\n
\n \n \n
\n
\n
\n

Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you're documenting important events, or making a public repository for cat gifs (password: '1234'), try creating a channel for it!

\n
\n
\n
\n

Log in to an existing channel:

\n \n

Create a brand new channel:

\n \n
\n
\n
\n
\n );\n }\n};\n\nexport default withRouter(LoginPage);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/view.jsx","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from '../../actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/index.js","import React from 'react';\nimport request from 'utils/request';\n\nclass ChannelLoginForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n name : '',\n password: '',\n };\n this.handleInput = this.handleInput.bind(this);\n this.loginToChannel = this.loginToChannel.bind(this);\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n loginToChannel (event) {\n event.preventDefault();\n const params = {\n method : 'POST',\n body : JSON.stringify({username: this.state.name, password: this.state.password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n request('login', params)\n .then(({success, channelName, shortChannelId, channelClaimId, message}) => {\n if (success) {\n this.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n this.setState({'error': message});\n };\n })\n .catch(error => {\n if (error.message) {\n this.setState({'error': error.message});\n } else {\n this.setState({'error': error});\n }\n });\n }\n render () {\n return (\n
\n
\n
\n \n
\n
\n @\n \n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n { this.state.error ? (\n

{this.state.error}

\n ) : (\n

Enter the name and password for your channel

\n )}\n
\n \n
\n
\n );\n }\n}\n\nexport default ChannelLoginForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/view.jsx","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from 'actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/index.js","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport request from 'utils/request';\n\nclass ChannelCreateForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n channel : '',\n password: '',\n status : null,\n };\n this.handleChannelInput = this.handleChannelInput.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.createChannel = this.createChannel.bind(this);\n }\n cleanseChannelInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n handleChannelInput (event) {\n let value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({channel: value});\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({error: 'Please enter a channel name'});\n }\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n updateIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n request(`/api/channel/availability/${channelWithAtSymbol}`)\n .then(() => {\n this.setState({'error': null});\n })\n .catch((error) => {\n this.setState({'error': error.message});\n });\n }\n checkIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n return request(`/api/channel/availability/${channelWithAtSymbol}`);\n }\n checkIsPasswordProvided (password) {\n return new Promise((resolve, reject) => {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n makePublishChannelRequest (username, password) {\n const params = {\n method : 'POST',\n body : JSON.stringify({username, password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n return new Promise((resolve, reject) => {\n request('/signup', params)\n .then(result => {\n return resolve(result);\n })\n .catch(error => {\n reject(new Error(`Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ${error.message}`));\n });\n });\n }\n createChannel (event) {\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password)\n .then(() => {\n return this.checkIsChannelAvailable(this.state.channel);\n })\n .then(() => {\n this.setState({status: 'We are publishing your new channel. Sit tight...'});\n return this.makePublishChannelRequest(this.state.channel, this.state.password);\n })\n .then(result => {\n this.setState({status: null});\n this.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n })\n .catch((error) => {\n if (error.message) {\n this.setState({'error': error.message, status: null});\n } else {\n this.setState({'error': error, status: null});\n };\n });\n }\n render () {\n return (\n
\n { !this.state.status ? (\n
\n
\n
\n \n
\n
\n @\n \n { (this.state.channel && !this.state.error) && {'\\u2713'} }\n { this.state.error && {'\\u2716'} }\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n {this.state.error ? (\n

{this.state.error}

\n ) : (\n

Choose a name and password for your channel

\n )}\n
\n \n
\n
\n ) : (\n
\n

{this.state.status}

\n \n
\n )}\n
\n );\n }\n}\n\nexport default ChannelCreateForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/view.jsx","import { connect } from 'react-redux';\nimport { onHandleShowPageUri } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n return {\n error : show.request.error,\n requestType: show.request.type,\n };\n};\n\nconst mapDispatchToProps = {\n onHandleShowPageUri,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/index.js","import React from 'react';\nimport ErrorPage from 'pages/ErrorPage';\nimport ShowAssetLite from 'containers/ShowAssetLite';\nimport ShowAssetDetails from 'containers/ShowAssetDetails';\nimport ShowChannel from 'containers/ShowChannel';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\nclass ShowPage extends React.Component {\n componentDidMount () {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n componentWillReceiveProps (nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n render () {\n const { error, requestType } = this.props;\n if (error) {\n return (\n \n );\n }\n switch (requestType) {\n case CHANNEL:\n return ;\n case ASSET_LITE:\n return ;\n case ASSET_DETAILS:\n return ;\n default:\n return

loading...

;\n }\n }\n};\n\nexport default ShowPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport { Link } from 'react-router-dom';\nimport AssetDisplay from 'containers/AssetDisplay';\n\nclass ShowLite extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { name, claimId } = asset.claimData;\n return (\n
\n \n \n hosted\n via Spee.ch\n
\n );\n }\n return (\n
\n

loading asset data...

\n
\n );\n }\n};\n\nexport default ShowLite;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport { LOCAL_CHECK, UNAVAILABLE, ERROR, AVAILABLE } from 'constants/asset_display_states';\n\nclass AssetDisplay extends React.Component {\n componentDidMount () {\n const { asset: { claimData: { name, claimId } } } = this.props;\n this.props.onFileRequest(name, claimId);\n }\n render () {\n const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props;\n return (\n
\n {(status === LOCAL_CHECK) &&\n
\n

Checking to see if Spee.ch has your asset locally...

\n
\n }\n {(status === UNAVAILABLE) &&\n
\n

Sit tight, we're searching the LBRY blockchain for your asset!

\n \n

Curious what magic is happening here? Learn more.

\n
\n }\n {(status === ERROR) &&\n
\n

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the LBRY discord.

\n

{error}

\n
\n }\n {(status === AVAILABLE) &&\n (() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return (\n \n );\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

Unsupported file type

\n );\n }\n })()\n }\n
\n );\n }\n};\n\nexport default AssetDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ErrorPage from 'pages/ErrorPage';\nimport AssetTitle from 'containers/AssetTitle';\nimport AssetDisplay from 'containers/AssetDisplay';\nimport AssetInfo from 'containers/AssetInfo';\n\nclass ShowAssetDetails extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { claimData: { name } } = asset;\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowAssetDetails;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n const { claimData: { title } } = selectAsset(show);\n return {\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/index.js","import React from 'react';\n\nconst AssetTitle = ({ title }) => {\n return (\n
\n {title}\n
\n );\n};\n\nexport default AssetTitle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/index.js","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nclass AssetInfo extends React.Component {\n constructor (props) {\n super(props);\n this.copyToClipboard = this.copyToClipboard.bind(this);\n }\n copyToClipboard (event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({error: 'Oops, unable to copy'});\n }\n }\n render () {\n const { asset: { shortId, claimData : { channelName, certificateId, description, name, claimId, fileExt, contentType, thumbnail, host } } } = this.props;\n return (\n
\n {channelName &&\n
\n
\n Channel:\n
\n
\n {channelName}\n
\n
\n }\n\n {description &&\n
\n {description}\n
\n }\n\n
\n
\n
\n Share:\n
\n
\n \n twitter\n facebook\n tumblr\n reddit\n
\n
\n
\n
\n\n
\n \n );\n }\n};\n\nexport default AssetInfo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select request\n const previousRequest = show.requestList[requestId] || null;\n // select channel\n let channel;\n if (previousRequest) {\n const channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport ErrorPage from 'pages/ErrorPage';\nimport NavBar from 'containers/NavBar';\nimport ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay';\n\nclass ShowChannel extends React.Component {\n render () {\n const { channel } = this.props;\n if (channel) {\n const { name, longId, shortId } = channel;\n return (\n
\n \n \n
\n
\n

channel name: {name}

\n

full channel id: {longId}

\n

short channel id: {shortId}

\n
\n
\n \n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowChannel;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/view.jsx","import { connect } from 'react-redux';\nimport { onUpdateChannelClaims } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select channel key\n const request = show.requestList[show.request.id];\n const channelKey = request.key;\n // select channel claims\n const channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey,\n channel,\n };\n};\n\nconst mapDispatchToProps = {\n onUpdateChannelClaims,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/index.js","import React from 'react';\nimport AssetPreview from 'components/AssetPreview';\n\nclass ChannelClaimsDisplay extends React.Component {\n constructor (props) {\n super(props);\n this.showNextResultsPage = this.showNextResultsPage.bind(this);\n this.showPreviousResultsPage = this.showPreviousResultsPage.bind(this);\n }\n showPreviousResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n showNextResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n showNewPage (page) {\n const { channelKey, channel: { name, longId } } = this.props;\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n render () {\n const { channel: { claimsData: { claims, currentPage, totalPages } } } = this.props;\n return (\n
\n {(claims.length > 0) ? (\n
\n {claims.map((claim, index) => )}\n
\n {(currentPage > 1) &&\n \n }\n {(currentPage < totalPages) &&\n \n }\n
\n
\n ) : (\n

There are no claims in this channel

\n )}\n
\n );\n }\n};\n\nexport default ChannelClaimsDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/view.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nconst AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail } }) => {\n const directSourceLink = `${claimId}/${name}.${fileExt}`;\n const showUrlLink = `/${claimId}/${name}`;\n return (\n
\n \n {(() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

unsupported file type

\n );\n }\n })()}\n \n
\n );\n};\n\nexport default AssetPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site: { host, title } }) => {\n return {\n host,\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/index.jsx","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport Helmet from 'react-helmet';\n\nclass FourOhForPage extends React.Component {\n render () {\n const {title, host} = this.props;\n return (\n
\n \n {title} - 404\n \n \n \n
\n

404

\n

That page does not exist

\n
\n
\n );\n }\n};\n\nexport default FourOhForPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/view.jsx","const { sendGAServeEvent } = require('../helpers/googleAnalytics');\nconst { determineResponseType, flipClaimNameAndIdForBackwardsCompatibility, logRequestData, getClaimIdAndServeAsset } = require('../helpers/serveHelpers.js');\nconst lbryUri = require('../helpers/lbryUri.js');\nconst handleShowRender = require('../helpers/handleShowRender.jsx');\nconst SERVE = 'SERVE';\n\nmodule.exports = (app) => {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({ claimName } = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // parse the identifier\n let isChannel, channelName, channelClaimId, claimId;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(params.identifier));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n if (!isChannel) {\n [claimId, claimName] = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({claimName} = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/asset-routes.js","const logger = require('winston');\nconst { getClaimId, getLocalFileRecord } = require('../controllers/serveController.js');\nconst { handleErrorResponse } = require('./errorHandlers.js');\n\nconst SERVE = 'SERVE';\nconst SHOW = 'SHOW';\nconst NO_FILE = 'NO_FILE';\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml ({accept}) {\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser (headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset ({accept, range}) {\n const imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n const videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId (claimId) {\n return ((claimId.length === 40) && !/[^A-Za-z0-9]/g.test(claimId));\n};\n\nfunction isValidShortId (claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId (input) {\n return (isValidClaimId(input) || isValidShortId(input));\n};\n\nfunction serveAssetToClient (claimId, name, res) {\n return getLocalFileRecord(claimId, name)\n .then(fileRecord => {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect(`/api/claim/get/${name}/${claimId}`);\n }\n // serve the file\n const {filePath, fileType} = fileRecord;\n logger.verbose(`serving file: ${filePath}`);\n const sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type' : fileType || 'image/jpeg',\n },\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n })\n .catch(error => {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset (channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(fullClaimId => {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'no claim id could be found'});\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'no channel id could be found'});\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n })\n .catch(error => {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType (hasFileExtension, headers) {\n let responseType;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) { // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) { // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility (identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n const tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData (responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/serveHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n logger.debug('parsing identifier:', identifier);\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex\n .exec(identifier)\n .map(match => match || null);\n logger.debug(`${proto}, ${value}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your url. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Invalid characters in channel name: ${nameBadChars.join(', ')}.`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId,\n claimId,\n };\n },\n parseClaim: function (claim) {\n logger.debug('parsing name:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Invalid characters in claim name: ${nameBadChars.join(', ')}.`);\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No file extension provided after separator ${modifierSeperator}.`);\n }\n if (modifierSeperator !== '.') {\n throw new Error(`The ${modifierSeperator} modifier is not supported in the claim name`);\n }\n }\n // return results\n return {\n claimName,\n };\n },\n parseModifier: function (claim) {\n logger.debug('parsing modifier:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n // Validate and process modifier\n let hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryUri.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore, applyMiddleware } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage';\nimport createSagaMiddleware from 'redux-saga';\nimport { call } from 'redux-saga/effects';\nimport { handleShowPageUri } from '../../client/sagas/show_uri';\nimport { onHandleShowPageUri } from '../../client/actions/show';\n\nimport Helmet from 'react-helmet';\n\nconst returnSagaWithParams = (saga, params) => {\n return function * () {\n yield call(saga, params);\n };\n};\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create and apply middleware\n const sagaMiddleware = createSagaMiddleware();\n const middleware = applyMiddleware(sagaMiddleware);\n\n // create a new Redux store instance\n const store = createStore(Reducer, middleware);\n\n // create saga\n const action = onHandleShowPageUri(req.params);\n const saga = returnSagaWithParams(handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware\n .run(saga)\n .done\n .then(() => {\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handleShowRender.jsx","module.exports = require(\"redux-saga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga\"\n// module id = 128\n// module chunks = 0","import { call, put, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { onRequestError, onNewChannelRequest, onNewAssetRequest } from 'actions/show';\nimport { newAssetRequest } from 'sagas/show_asset';\nimport { newChannelRequest } from 'sagas/show_channel';\nimport lbryUri from 'utils/lbryUri';\n\nfunction * parseAndUpdateIdentifierAndClaim (modifier, claim) {\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n let isChannel, channelName, channelClaimId, claimId, claimName, extension;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(modifier));\n ({ claimName, extension } = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n if (isChannel) {\n return yield call(newAssetRequest, onNewAssetRequest(claimName, null, channelName, channelClaimId, extension));\n };\n yield call(newAssetRequest, onNewAssetRequest(claimName, claimId, null, null, extension));\n}\nfunction * parseAndUpdateClaimOnly (claim) {\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n let isChannel, channelName, channelClaimId;\n try {\n ({ isChannel, channelName, channelClaimId } = lbryUri.parseIdentifier(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n // return early if this request is for a channel\n if (isChannel) {\n return yield call(newChannelRequest, onNewChannelRequest(channelName, channelClaimId));\n }\n // if not for a channel, parse the claim request\n let claimName, extension;\n try {\n ({claimName, extension} = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield call(newAssetRequest, onNewAssetRequest(claimName, null, null, null, extension));\n}\n\nexport function * handleShowPageUri (action) {\n const { identifier, claim } = action.data;\n if (identifier) {\n return yield call(parseAndUpdateIdentifierAndClaim, identifier, claim);\n }\n yield call(parseAndUpdateClaimOnly, claim);\n};\n\nexport function * watchHandleShowPageUri () {\n yield takeLatest(actions.HANDLE_SHOW_URI, handleShowPageUri);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_uri.js","import { call, put, select, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addRequestToRequestList, onRequestError, onRequestUpdate, addAssetToAssetList } from 'actions/show';\nimport { getLongClaimId, getShortId, getClaimData } from 'api/assetApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newAssetRequest (action) {\n const { requestType, requestId, name, modifier } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get long id && add request to request list\n let longId;\n try {\n ({data: longId} = yield call(getLongClaimId, host, name, modifier));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n const assetKey = `a#${name}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, assetKey));\n // is this an existing asset?\n // If this asset is in the asset list, it's already been fetched\n if (state.assetList[assetKey]) {\n return null;\n }\n // get short Id\n let shortId;\n try {\n ({data: shortId} = yield call(getShortId, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // get asset claim data\n let claimData;\n try {\n ({data: claimData} = yield call(getClaimData, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // add asset to asset list\n yield put(addAssetToAssetList(assetKey, null, name, longId, shortId, claimData));\n // clear any errors in request error\n yield put(onRequestError(null));\n};\n\nexport function * watchNewAssetRequest () {\n yield takeLatest(actions.ASSET_REQUEST_NEW, newAssetRequest);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_asset.js","import Request from 'utils/request';\n\nexport function getLongClaimId (host, name, modifier) {\n let body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n const params = {\n method : 'POST',\n headers: { 'Content-Type': 'application/json' },\n body : JSON.stringify(body),\n };\n // create url\n const url = `${host}/api/claim/long-id`;\n // return the request promise\n return Request(url, params);\n};\n\nexport function getShortId (host, name, claimId) {\n const url = `${host}/api/claim/short-id/${claimId}/${name}`;\n return Request(url);\n};\n\nexport function getClaimData (host, name, claimId) {\n const url = `${host}/api/claim/data/${name}/${claimId}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/assetApi.js","import {call, put, select, takeLatest} from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addNewChannelToChannelList, addRequestToRequestList, onRequestError, onRequestUpdate, updateChannelClaims } from 'actions/show';\nimport { getChannelClaims, getChannelData } from 'api/channelApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newChannelRequest (action) {\n const { requestType, requestId, channelName, channelId } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get channel long id\n let longId, shortId;\n try {\n ({ data: {longChannelClaimId: longId, shortChannelClaimId: shortId} } = yield call(getChannelData, host, channelName, channelId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the request in the channel requests list\n const channelKey = `c#${channelName}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, channelKey));\n // is this an existing channel?\n // If this channel is in the channel list, it's already been fetched\n if (state.channelList[channelKey]) {\n return null;\n }\n // get channel claims data\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, channelName, 1));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the channel data in the channel list\n yield put(addNewChannelToChannelList(channelKey, channelName, shortId, longId, claimsData));\n // clear any request errors\n yield put(onRequestError(null));\n}\n\nexport function * watchNewChannelRequest () {\n yield takeLatest(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n};\n\nfunction * getNewClaimsAndUpdateChannel (action) {\n const { channelKey, name, longId, page } = action.data;\n const host = yield select(selectSiteHost);\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, name, page));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield put(updateChannelClaims(channelKey, claimsData));\n}\n\nexport function * watchUpdateChannelClaims () {\n yield takeLatest(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_channel.js","import Request from 'utils/request';\n\nexport function getChannelData (host, id, name) {\n if (!id) id = 'none';\n const url = `${host}/api/channel/data/${name}/${id}`;\n return Request(url);\n};\n\nexport function getChannelClaims (host, longId, name, page) {\n if (!page) page = 1;\n const url = `${host}/api/channel/claims/${name}/${longId}/${page}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/channelApi.js","const handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = app => {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', (req, res) => {\n // send response\n handlePageRender(req, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/fallback-routes.js","const { logLevel } = require('../../config/loggerConfig');\n\nmodule.exports = (winston) => {\n // configure\n winston.configure({\n transports: [\n new (winston.transports.Console)({\n level : logLevel,\n timestamp : false,\n colorize : true,\n prettyPrint : true,\n handleExceptions : true,\n humanReadableUnhandledException: true,\n }),\n ],\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureLogger.js","const loggerConfig = {\n logLevel: 'debug', // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/loggerConfig.js","const winstonSlackWebHook = require('winston-slack-webhook').SlackWebHook;\nconst slackConfig = require('../../config/slackConfig.js');\n\nmodule.exports = (winston) => {\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = slackConfig;\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-errors-transport',\n level : 'warn',\n webhookUrl: slackWebHook,\n channel : slackErrorChannel,\n username : 'spee.ch',\n iconEmoji : ':face_with_head_bandage:',\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-info-transport',\n level : 'info',\n webhookUrl: slackWebHook,\n channel : slackInfoChannel,\n username : 'spee.ch',\n iconEmoji : ':nerd_face:',\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureSlack.js","module.exports = require(\"winston-slack-webhook\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston-slack-webhook\"\n// module id = 138\n// module chunks = 0","import ActiveStatusBar from 'components/ActiveStatusBar';\r\nimport AssetPreview from 'components/AssetPreview';\r\nimport ExpandingTextArea from 'components/ExpandingTextArea';\r\nimport GAListener from 'components/GAListener';\r\nimport InactiveStatusBar from 'components/InactiveStatusBar';\r\nimport Logo from 'components/Logo';\r\nimport NavBarChannelOptionsDropdown from 'components/NavBarChannelOptionsDropdown';\r\nimport ProgressBar from 'components/ProgressBar';\r\nimport PublishPreview from 'components/PublishPreview';\r\nimport PublishUrlMiddleDisplay from 'components/PublishUrlMiddleDisplay';\r\nimport SEO from 'components/SEO';\r\n\r\nconst components = {\r\n ActiveStatusBar,\r\n AssetPreview,\r\n ExpandingTextArea,\r\n GAListener,\r\n InactiveStatusBar,\r\n Logo,\r\n NavBarChannelOptionsDropdown,\r\n ProgressBar,\r\n PublishPreview,\r\n PublishUrlMiddleDisplay,\r\n SEO,\r\n}\r\n\r\nexport default components;\r\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/index.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass ExpandingTextarea extends Component {\n constructor (props) {\n super(props);\n this._handleChange = this._handleChange.bind(this);\n }\n componentDidMount () {\n this.adjustTextarea({});\n }\n _handleChange (event) {\n const { onChange } = this.props;\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n adjustTextarea ({ target = this.el }) {\n target.style.height = 0;\n target.style.height = `${target.scrollHeight}px`;\n }\n render () {\n const { ...rest } = this.props;\n return (\n this.el = x}\n onChange={this._handleChange}\n />\n );\n }\n}\n\nExpandingTextarea.propTypes = {\n onChange: PropTypes.func,\n};\n\nexport default ExpandingTextarea;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ExpandingTextArea/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass PublishPreview extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n imgSource : '',\n defaultThumbnail: '/assets/img/video_thumb_default.png',\n };\n }\n componentDidMount () {\n this.setPreviewImageSource(this.props.file);\n }\n componentWillReceiveProps (newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n }\n setPreviewImageSourceFromFile (file) {\n const previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = () => {\n this.setState({imgSource: previewReader.result});\n };\n }\n setPreviewImageSource (file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n render () {\n return (\n \n );\n }\n};\n\nPublishPreview.propTypes = {\n dimPreview: PropTypes.bool.isRequired,\n file : PropTypes.object.isRequired,\n thumbnail : PropTypes.object,\n};\n\nexport default PublishPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishPreview/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction UrlMiddle ({publishInChannel, selectedChannel, loggedInChannelName, loggedInChannelShortId}) {\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return {loggedInChannelName}:{loggedInChannelShortId} /;\n }\n return @channelSelect a channel below /;\n }\n return (\n xyzThis will be a random id /\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel : PropTypes.bool.isRequired,\n loggedInChannelName : PropTypes.string,\n loggedInChannelShortId: PropTypes.string,\n};\n\nexport default UrlMiddle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishUrlMiddleDisplay/index.jsx"],"sourceRoot":""} \ No newline at end of file diff --git a/public/bundle/bundle.js b/public/bundle/bundle.js index a8d53e8c..0b52bf4d 100644 --- a/public/bundle/bundle.js +++ b/public/bundle/bundle.js @@ -1,17057 +1,9 @@ -/******/ (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 -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // 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 = "public/bundle/"; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 214); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(3); -var core = __webpack_require__(28); -var hide = __webpack_require__(17); -var redefine = __webpack_require__(18); -var ctx = __webpack_require__(25); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); - var key, own, out, exp; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - // export native or passed - out = (own ? target : source)[key]; - // bind timers to global for call from export context - exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // extend global - if (target) redefine(target, key, out, type & $export.U); - // export - if (exports[key] != out) hide(exports, key, exp); - if (IS_PROTO && expProto[key] != out) expProto[key] = out; - } -}; -global.core = core; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -if (process.env.NODE_ENV === 'production') { - module.exports = __webpack_require__(419); -} else { - module.exports = __webpack_require__(420); -} - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(5); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -var store = __webpack_require__(72)('wks'); -var uid = __webpack_require__(42); -var Symbol = __webpack_require__(3).Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - -$exports.store = store; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports) { - -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(4)(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__(2); -var IE8_DOM_DEFINE = __webpack_require__(143); -var toPrimitive = __webpack_require__(29); -var dP = Object.defineProperty; - -exports.f = __webpack_require__(8) ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.15 ToLength -var toInteger = __webpack_require__(31); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -if (process.env.NODE_ENV !== 'production') { - var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && - Symbol.for && - Symbol.for('react.element')) || - 0xeac7; - - var isValidElement = function(object) { - return typeof object === 'object' && - object !== null && - object.$$typeof === REACT_ELEMENT_TYPE; - }; - - // By explicitly using `prop-types` you are opting into new development behavior. - // http://fb.me/prop-types-in-prod - var throwOnDirectAccess = true; - module.exports = __webpack_require__(431)(isValidElement, throwOnDirectAccess); -} else { - // By explicitly using `prop-types` you are opting into new production behavior. - // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(432)(); -} - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.13 ToObject(argument) -var defined = __webpack_require__(30); -module.exports = function (it) { - return Object(defined(it)); -}; - - -/***/ }), -/* 13 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(430); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(184); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(434); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["b"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createProvider", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return __WEBPACK_IMPORTED_MODULE_2__connect_connect__["a"]; }); - - - - - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2014-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - - -/** - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - -var warning = function() {}; - -if (process.env.NODE_ENV !== 'production') { - warning = function(condition, format, args) { - var len = arguments.length; - args = new Array(len > 2 ? len - 2 : 0); - for (var key = 2; key < len; key++) { - args[key - 2] = arguments[key]; - } - if (format === undefined) { - throw new Error( - '`warning(condition, format, ...args)` requires a warning ' + - 'message argument' - ); - } - - if (format.length < 10 || (/^[s\W]*$/).test(format)) { - throw new Error( - 'The warning format should be able to uniquely identify this ' + - 'warning. Please, use a more descriptive format than: ' + format - ); - } - - if (!condition) { - var argIndex = 0; - var message = 'Warning: ' + - format.replace(/%s/g, function() { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch(x) {} - } - }; -} - -module.exports = warning; - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) - -/***/ }), -/* 15 */ -/***/ (function(module, exports) { - -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__(9); -var createDesc = __webpack_require__(41); -module.exports = __webpack_require__(8) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(3); -var hide = __webpack_require__(17); -var has = __webpack_require__(16); -var SRC = __webpack_require__(42)('src'); -var TO_STRING = 'toString'; -var $toString = Function[TO_STRING]; -var TPL = ('' + $toString).split(TO_STRING); - -__webpack_require__(28).inspectSource = function (it) { - return $toString.call(it); -}; - -(module.exports = function (O, key, val, safe) { - var isFunction = typeof val == 'function'; - if (isFunction) has(val, 'name') || hide(val, 'name', key); - if (O[key] === val) return; - if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); - if (O === global) { - O[key] = val; - } else if (!safe) { - delete O[key]; - hide(O, key, val); - } else if (O[key]) { - O[key] = val; - } else { - hide(O, key, val); - } -// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative -})(Function.prototype, TO_STRING, function toString() { - return typeof this == 'function' && this[SRC] || $toString.call(this); -}); - - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -var $export = __webpack_require__(0); -var fails = __webpack_require__(4); -var defined = __webpack_require__(30); -var quot = /"/g; -// B.2.3.2.1 CreateHTML(string, tag, attribute, value) -var createHTML = function (string, tag, attribute, value) { - var S = String(defined(string)); - var p1 = '<' + tag; - if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; - return p1 + '>' + S + ''; -}; -module.exports = function (NAME, exec) { - var O = {}; - O[NAME] = exec(createHTML); - $export($export.P + $export.F * fails(function () { - var test = ''[NAME]('"'); - return test !== test.toLowerCase() || test.split('"').length > 3; - }), 'String', O); -}; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(64); -var defined = __webpack_require__(30); -module.exports = function (it) { - return IObject(defined(it)); -}; - - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -var pIE = __webpack_require__(65); -var createDesc = __webpack_require__(41); -var toIObject = __webpack_require__(20); -var toPrimitive = __webpack_require__(29); -var has = __webpack_require__(16); -var IE8_DOM_DEFINE = __webpack_require__(143); -var gOPD = Object.getOwnPropertyDescriptor; - -exports.f = __webpack_require__(8) ? gOPD : function getOwnPropertyDescriptor(O, P) { - O = toIObject(O); - P = toPrimitive(P, true); - if (IE8_DOM_DEFINE) try { - return gOPD(O, P); - } catch (e) { /* empty */ } - if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); -}; - - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(16); -var toObject = __webpack_require__(12); -var IE_PROTO = __webpack_require__(95)('IE_PROTO'); -var ObjectProto = Object.prototype; - -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - - -/** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ - -var invariant = function(condition, format, a, b, c, d, e, f) { - if (process.env.NODE_ENV !== 'production') { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } - - if (!condition) { - var error; - if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' - ); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error( - format.replace(/%s/g, function() { return args[argIndex++]; }) - ); - error.name = 'Invariant Violation'; - } - - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -}; - -module.exports = invariant; - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) - -/***/ }), -/* 24 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return sym; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return TASK; }); -/* unused harmony export HELPER */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MATCH; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CANCEL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SAGA_ACTION; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return SELF_CANCELLATION; }); -/* unused harmony export konst */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return kTrue; }); -/* unused harmony export kFalse */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return noop; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return ident; }); -/* harmony export (immutable) */ __webpack_exports__["h"] = check; -/* unused harmony export hasOwn */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return is; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return object; }); -/* harmony export (immutable) */ __webpack_exports__["w"] = remove; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return array; }); -/* harmony export (immutable) */ __webpack_exports__["l"] = deferred; -/* harmony export (immutable) */ __webpack_exports__["g"] = arrayOfDeffered; -/* harmony export (immutable) */ __webpack_exports__["m"] = delay; -/* harmony export (immutable) */ __webpack_exports__["j"] = createMockTask; -/* unused harmony export autoInc */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return uid; }); -/* harmony export (immutable) */ __webpack_exports__["t"] = makeIterator; -/* harmony export (immutable) */ __webpack_exports__["s"] = log; -/* harmony export (immutable) */ __webpack_exports__["n"] = deprecate; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return updateIncentive; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return internalErr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return createSetContextWarning; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return wrapSagaDispatch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return cloneableGenerator; }); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var sym = function sym(id) { - return '@@redux-saga/' + id; -}; - -var TASK = /*#__PURE__*/sym('TASK'); -var HELPER = /*#__PURE__*/sym('HELPER'); -var MATCH = /*#__PURE__*/sym('MATCH'); -var CANCEL = /*#__PURE__*/sym('CANCEL_PROMISE'); -var SAGA_ACTION = /*#__PURE__*/sym('SAGA_ACTION'); -var SELF_CANCELLATION = /*#__PURE__*/sym('SELF_CANCELLATION'); -var konst = function konst(v) { - return function () { - return v; - }; -}; -var kTrue = /*#__PURE__*/konst(true); -var kFalse = /*#__PURE__*/konst(false); -var noop = function noop() {}; -var ident = function ident(v) { - return v; -}; - -function check(value, predicate, error) { - if (!predicate(value)) { - log('error', 'uncaught at check', error); - throw new Error(error); - } -} - -var hasOwnProperty = Object.prototype.hasOwnProperty; -function hasOwn(object, property) { - return is.notUndef(object) && hasOwnProperty.call(object, property); -} - -var is = { - undef: function undef(v) { - return v === null || v === undefined; - }, - notUndef: function notUndef(v) { - return v !== null && v !== undefined; - }, - func: function func(f) { - return typeof f === 'function'; - }, - number: function number(n) { - return typeof n === 'number'; - }, - string: function string(s) { - return typeof s === 'string'; - }, - array: Array.isArray, - object: function object(obj) { - return obj && !is.array(obj) && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object'; - }, - promise: function promise(p) { - return p && is.func(p.then); - }, - iterator: function iterator(it) { - return it && is.func(it.next) && is.func(it.throw); - }, - iterable: function iterable(it) { - return it && is.func(Symbol) ? is.func(it[Symbol.iterator]) : is.array(it); - }, - task: function task(t) { - return t && t[TASK]; - }, - observable: function observable(ob) { - return ob && is.func(ob.subscribe); - }, - buffer: function buffer(buf) { - return buf && is.func(buf.isEmpty) && is.func(buf.take) && is.func(buf.put); - }, - pattern: function pattern(pat) { - return pat && (is.string(pat) || (typeof pat === 'undefined' ? 'undefined' : _typeof(pat)) === 'symbol' || is.func(pat) || is.array(pat)); - }, - channel: function channel(ch) { - return ch && is.func(ch.take) && is.func(ch.close); - }, - helper: function helper(it) { - return it && it[HELPER]; - }, - stringableFunc: function stringableFunc(f) { - return is.func(f) && hasOwn(f, 'toString'); - } -}; - -var object = { - assign: function assign(target, source) { - for (var i in source) { - if (hasOwn(source, i)) { - target[i] = source[i]; - } - } - } -}; - -function remove(array, item) { - var index = array.indexOf(item); - if (index >= 0) { - array.splice(index, 1); - } -} - -var array = { - from: function from(obj) { - var arr = Array(obj.length); - for (var i in obj) { - if (hasOwn(obj, i)) { - arr[i] = obj[i]; - } - } - return arr; - } -}; - -function deferred() { - var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var def = _extends({}, props); - var promise = new Promise(function (resolve, reject) { - def.resolve = resolve; - def.reject = reject; - }); - def.promise = promise; - return def; -} - -function arrayOfDeffered(length) { - var arr = []; - for (var i = 0; i < length; i++) { - arr.push(deferred()); - } - return arr; -} - -function delay(ms) { - var val = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - - var timeoutId = void 0; - var promise = new Promise(function (resolve) { - timeoutId = setTimeout(function () { - return resolve(val); - }, ms); - }); - - promise[CANCEL] = function () { - return clearTimeout(timeoutId); - }; - - return promise; -} - -function createMockTask() { - var _ref; - - var running = true; - var _result = void 0, - _error = void 0; - - return _ref = {}, _ref[TASK] = true, _ref.isRunning = function isRunning() { - return running; - }, _ref.result = function result() { - return _result; - }, _ref.error = function error() { - return _error; - }, _ref.setRunning = function setRunning(b) { - return running = b; - }, _ref.setResult = function setResult(r) { - return _result = r; - }, _ref.setError = function setError(e) { - return _error = e; - }, _ref; -} - -function autoInc() { - var seed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - - return function () { - return ++seed; - }; -} - -var uid = /*#__PURE__*/autoInc(); - -var kThrow = function kThrow(err) { - throw err; -}; -var kReturn = function kReturn(value) { - return { value: value, done: true }; -}; -function makeIterator(next) { - var thro = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : kThrow; - var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; - var isHelper = arguments[3]; - - var iterator = { name: name, next: next, throw: thro, return: kReturn }; - - if (isHelper) { - iterator[HELPER] = true; - } - if (typeof Symbol !== 'undefined') { - iterator[Symbol.iterator] = function () { - return iterator; - }; - } - return iterator; -} - -/** - Print error in a useful way whether in a browser environment - (with expandable error stack traces), or in a node.js environment - (text-only log output) - **/ -function log(level, message) { - var error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; - - /*eslint-disable no-console*/ - if (typeof window === 'undefined') { - console.log('redux-saga ' + level + ': ' + message + '\n' + (error && error.stack || error)); - } else { - console[level](message, error); - } -} - -function deprecate(fn, deprecationWarning) { - return function () { - if (process.env.NODE_ENV === 'development') log('warn', deprecationWarning); - return fn.apply(undefined, arguments); - }; -} - -var updateIncentive = function updateIncentive(deprecated, preferred) { - return deprecated + ' has been deprecated in favor of ' + preferred + ', please update your code'; -}; - -var internalErr = function internalErr(err) { - return new Error('\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project\'s github repo.\n Error: ' + err + '\n'); -}; - -var createSetContextWarning = function createSetContextWarning(ctx, props) { - return (ctx ? ctx + '.' : '') + 'setContext(props): argument ' + props + ' is not a plain object'; -}; - -var wrapSagaDispatch = function wrapSagaDispatch(dispatch) { - return function (action) { - return dispatch(Object.defineProperty(action, SAGA_ACTION, { value: true })); - }; -}; - -var cloneableGenerator = function cloneableGenerator(generatorFunc) { - return function () { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var history = []; - var gen = generatorFunc.apply(undefined, args); - return { - next: function next(arg) { - history.push(arg); - return gen.next(arg); - }, - clone: function clone() { - var clonedGen = cloneableGenerator(generatorFunc).apply(undefined, args); - history.forEach(function (arg) { - return clonedGen.next(arg); - }); - return clonedGen; - }, - return: function _return(value) { - return gen.return(value); - }, - throw: function _throw(exception) { - return gen.throw(exception); - } - }; - }; -}; -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(7))) - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -// optional / simple context binding -var aFunction = __webpack_require__(15); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - - -/***/ }), -/* 26 */ -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - - -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var fails = __webpack_require__(4); - -module.exports = function (method, arg) { - return !!method && fails(function () { - // eslint-disable-next-line no-useless-call - arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); - }); -}; - - -/***/ }), -/* 28 */ -/***/ (function(module, exports) { - -var core = module.exports = { version: '2.5.3' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(5); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports) { - -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - - -/***/ }), -/* 31 */ -/***/ (function(module, exports) { - -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - -// most Object methods by ES6 should accept primitives -var $export = __webpack_require__(0); -var core = __webpack_require__(28); -var fails = __webpack_require__(4); -module.exports = function (KEY, exec) { - var fn = (core.Object || {})[KEY] || Object[KEY]; - var exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); -}; - - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - -// 0 -> Array#forEach -// 1 -> Array#map -// 2 -> Array#filter -// 3 -> Array#some -// 4 -> Array#every -// 5 -> Array#find -// 6 -> Array#findIndex -var ctx = __webpack_require__(25); -var IObject = __webpack_require__(64); -var toObject = __webpack_require__(12); -var toLength = __webpack_require__(10); -var asc = __webpack_require__(112); -module.exports = function (TYPE, $create) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - var create = $create || asc; - return function ($this, callbackfn, that) { - var O = toObject($this); - var self = IObject(O); - var f = ctx(callbackfn, that, 3); - var length = toLength(self.length); - var index = 0; - var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; - var val, res; - for (;length > index; index++) if (NO_HOLES || index in self) { - val = self[index]; - res = f(val, index, O); - if (TYPE) { - if (IS_MAP) result[index] = res; // map - else if (res) switch (TYPE) { - case 3: return true; // some - case 5: return val; // find - case 6: return index; // findIndex - case 2: result.push(val); // filter - } else if (IS_EVERY) return false; // every - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; - }; -}; - - -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -if (__webpack_require__(8)) { - var LIBRARY = __webpack_require__(43); - var global = __webpack_require__(3); - var fails = __webpack_require__(4); - var $export = __webpack_require__(0); - var $typed = __webpack_require__(82); - var $buffer = __webpack_require__(118); - var ctx = __webpack_require__(25); - var anInstance = __webpack_require__(49); - var propertyDesc = __webpack_require__(41); - var hide = __webpack_require__(17); - var redefineAll = __webpack_require__(51); - var toInteger = __webpack_require__(31); - var toLength = __webpack_require__(10); - var toIndex = __webpack_require__(169); - var toAbsoluteIndex = __webpack_require__(45); - var toPrimitive = __webpack_require__(29); - var has = __webpack_require__(16); - var classof = __webpack_require__(66); - var isObject = __webpack_require__(5); - var toObject = __webpack_require__(12); - var isArrayIter = __webpack_require__(109); - var create = __webpack_require__(46); - var getPrototypeOf = __webpack_require__(22); - var gOPN = __webpack_require__(47).f; - var getIterFn = __webpack_require__(111); - var uid = __webpack_require__(42); - var wks = __webpack_require__(6); - var createArrayMethod = __webpack_require__(33); - var createArrayIncludes = __webpack_require__(73); - var speciesConstructor = __webpack_require__(80); - var ArrayIterators = __webpack_require__(114); - var Iterators = __webpack_require__(57); - var $iterDetect = __webpack_require__(77); - var setSpecies = __webpack_require__(48); - var arrayFill = __webpack_require__(113); - var arrayCopyWithin = __webpack_require__(159); - var $DP = __webpack_require__(9); - var $GOPD = __webpack_require__(21); - var dP = $DP.f; - var gOPD = $GOPD.f; - var RangeError = global.RangeError; - var TypeError = global.TypeError; - var Uint8Array = global.Uint8Array; - var ARRAY_BUFFER = 'ArrayBuffer'; - var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; - var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; - var PROTOTYPE = 'prototype'; - var ArrayProto = Array[PROTOTYPE]; - var $ArrayBuffer = $buffer.ArrayBuffer; - var $DataView = $buffer.DataView; - var arrayForEach = createArrayMethod(0); - var arrayFilter = createArrayMethod(2); - var arraySome = createArrayMethod(3); - var arrayEvery = createArrayMethod(4); - var arrayFind = createArrayMethod(5); - var arrayFindIndex = createArrayMethod(6); - var arrayIncludes = createArrayIncludes(true); - var arrayIndexOf = createArrayIncludes(false); - var arrayValues = ArrayIterators.values; - var arrayKeys = ArrayIterators.keys; - var arrayEntries = ArrayIterators.entries; - var arrayLastIndexOf = ArrayProto.lastIndexOf; - var arrayReduce = ArrayProto.reduce; - var arrayReduceRight = ArrayProto.reduceRight; - var arrayJoin = ArrayProto.join; - var arraySort = ArrayProto.sort; - var arraySlice = ArrayProto.slice; - var arrayToString = ArrayProto.toString; - var arrayToLocaleString = ArrayProto.toLocaleString; - var ITERATOR = wks('iterator'); - var TAG = wks('toStringTag'); - var TYPED_CONSTRUCTOR = uid('typed_constructor'); - var DEF_CONSTRUCTOR = uid('def_constructor'); - var ALL_CONSTRUCTORS = $typed.CONSTR; - var TYPED_ARRAY = $typed.TYPED; - var VIEW = $typed.VIEW; - var WRONG_LENGTH = 'Wrong length!'; - - var $map = createArrayMethod(1, function (O, length) { - return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); - }); - - var LITTLE_ENDIAN = fails(function () { - // eslint-disable-next-line no-undef - return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; - }); - - var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { - new Uint8Array(1).set({}); - }); - - var toOffset = function (it, BYTES) { - var offset = toInteger(it); - if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); - return offset; - }; - - var validate = function (it) { - if (isObject(it) && TYPED_ARRAY in it) return it; - throw TypeError(it + ' is not a typed array!'); - }; - - var allocate = function (C, length) { - if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { - throw TypeError('It is not a typed array constructor!'); - } return new C(length); - }; - - var speciesFromList = function (O, list) { - return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); - }; - - var fromList = function (C, list) { - var index = 0; - var length = list.length; - var result = allocate(C, length); - while (length > index) result[index] = list[index++]; - return result; - }; - - var addGetter = function (it, key, internal) { - dP(it, key, { get: function () { return this._d[internal]; } }); - }; - - var $from = function from(source /* , mapfn, thisArg */) { - var O = toObject(source); - var aLen = arguments.length; - var mapfn = aLen > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var iterFn = getIterFn(O); - var i, length, values, result, step, iterator; - if (iterFn != undefined && !isArrayIter(iterFn)) { - for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { - values.push(step.value); - } O = values; - } - if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); - for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { - result[i] = mapping ? mapfn(O[i], i) : O[i]; - } - return result; - }; - - var $of = function of(/* ...items */) { - var index = 0; - var length = arguments.length; - var result = allocate(this, length); - while (length > index) result[index] = arguments[index++]; - return result; - }; - - // iOS Safari 6.x fails here - var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); - - var $toLocaleString = function toLocaleString() { - return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); - }; - - var proto = { - copyWithin: function copyWithin(target, start /* , end */) { - return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); - }, - every: function every(callbackfn /* , thisArg */) { - return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars - return arrayFill.apply(validate(this), arguments); - }, - filter: function filter(callbackfn /* , thisArg */) { - return speciesFromList(this, arrayFilter(validate(this), callbackfn, - arguments.length > 1 ? arguments[1] : undefined)); - }, - find: function find(predicate /* , thisArg */) { - return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); - }, - findIndex: function findIndex(predicate /* , thisArg */) { - return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); - }, - forEach: function forEach(callbackfn /* , thisArg */) { - arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - indexOf: function indexOf(searchElement /* , fromIndex */) { - return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); - }, - includes: function includes(searchElement /* , fromIndex */) { - return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); - }, - join: function join(separator) { // eslint-disable-line no-unused-vars - return arrayJoin.apply(validate(this), arguments); - }, - lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars - return arrayLastIndexOf.apply(validate(this), arguments); - }, - map: function map(mapfn /* , thisArg */) { - return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); - }, - reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars - return arrayReduce.apply(validate(this), arguments); - }, - reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars - return arrayReduceRight.apply(validate(this), arguments); - }, - reverse: function reverse() { - var that = this; - var length = validate(that).length; - var middle = Math.floor(length / 2); - var index = 0; - var value; - while (index < middle) { - value = that[index]; - that[index++] = that[--length]; - that[length] = value; - } return that; - }, - some: function some(callbackfn /* , thisArg */) { - return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - sort: function sort(comparefn) { - return arraySort.call(validate(this), comparefn); - }, - subarray: function subarray(begin, end) { - var O = validate(this); - var length = O.length; - var $begin = toAbsoluteIndex(begin, length); - return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( - O.buffer, - O.byteOffset + $begin * O.BYTES_PER_ELEMENT, - toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) - ); - } - }; - - var $slice = function slice(start, end) { - return speciesFromList(this, arraySlice.call(validate(this), start, end)); - }; - - var $set = function set(arrayLike /* , offset */) { - validate(this); - var offset = toOffset(arguments[1], 1); - var length = this.length; - var src = toObject(arrayLike); - var len = toLength(src.length); - var index = 0; - if (len + offset > length) throw RangeError(WRONG_LENGTH); - while (index < len) this[offset + index] = src[index++]; - }; - - var $iterators = { - entries: function entries() { - return arrayEntries.call(validate(this)); - }, - keys: function keys() { - return arrayKeys.call(validate(this)); - }, - values: function values() { - return arrayValues.call(validate(this)); - } - }; - - var isTAIndex = function (target, key) { - return isObject(target) - && target[TYPED_ARRAY] - && typeof key != 'symbol' - && key in target - && String(+key) == String(key); - }; - var $getDesc = function getOwnPropertyDescriptor(target, key) { - return isTAIndex(target, key = toPrimitive(key, true)) - ? propertyDesc(2, target[key]) - : gOPD(target, key); - }; - var $setDesc = function defineProperty(target, key, desc) { - if (isTAIndex(target, key = toPrimitive(key, true)) - && isObject(desc) - && has(desc, 'value') - && !has(desc, 'get') - && !has(desc, 'set') - // TODO: add validation descriptor w/o calling accessors - && !desc.configurable - && (!has(desc, 'writable') || desc.writable) - && (!has(desc, 'enumerable') || desc.enumerable) - ) { - target[key] = desc.value; - return target; - } return dP(target, key, desc); - }; - - if (!ALL_CONSTRUCTORS) { - $GOPD.f = $getDesc; - $DP.f = $setDesc; - } - - $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { - getOwnPropertyDescriptor: $getDesc, - defineProperty: $setDesc - }); - - if (fails(function () { arrayToString.call({}); })) { - arrayToString = arrayToLocaleString = function toString() { - return arrayJoin.call(this); - }; - } - - var $TypedArrayPrototype$ = redefineAll({}, proto); - redefineAll($TypedArrayPrototype$, $iterators); - hide($TypedArrayPrototype$, ITERATOR, $iterators.values); - redefineAll($TypedArrayPrototype$, { - slice: $slice, - set: $set, - constructor: function () { /* noop */ }, - toString: arrayToString, - toLocaleString: $toLocaleString - }); - addGetter($TypedArrayPrototype$, 'buffer', 'b'); - addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); - addGetter($TypedArrayPrototype$, 'byteLength', 'l'); - addGetter($TypedArrayPrototype$, 'length', 'e'); - dP($TypedArrayPrototype$, TAG, { - get: function () { return this[TYPED_ARRAY]; } - }); - - // eslint-disable-next-line max-statements - module.exports = function (KEY, BYTES, wrapper, CLAMPED) { - CLAMPED = !!CLAMPED; - var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; - var GETTER = 'get' + KEY; - var SETTER = 'set' + KEY; - var TypedArray = global[NAME]; - var Base = TypedArray || {}; - var TAC = TypedArray && getPrototypeOf(TypedArray); - var FORCED = !TypedArray || !$typed.ABV; - var O = {}; - var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; - var getter = function (that, index) { - var data = that._d; - return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); - }; - var setter = function (that, index, value) { - var data = that._d; - if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; - data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); - }; - var addElement = function (that, index) { - dP(that, index, { - get: function () { - return getter(this, index); - }, - set: function (value) { - return setter(this, index, value); - }, - enumerable: true - }); - }; - if (FORCED) { - TypedArray = wrapper(function (that, data, $offset, $length) { - anInstance(that, TypedArray, NAME, '_d'); - var index = 0; - var offset = 0; - var buffer, byteLength, length, klass; - if (!isObject(data)) { - length = toIndex(data); - byteLength = length * BYTES; - buffer = new $ArrayBuffer(byteLength); - } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { - buffer = data; - offset = toOffset($offset, BYTES); - var $len = data.byteLength; - if ($length === undefined) { - if ($len % BYTES) throw RangeError(WRONG_LENGTH); - byteLength = $len - offset; - if (byteLength < 0) throw RangeError(WRONG_LENGTH); - } else { - byteLength = toLength($length) * BYTES; - if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); - } - length = byteLength / BYTES; - } else if (TYPED_ARRAY in data) { - return fromList(TypedArray, data); - } else { - return $from.call(TypedArray, data); - } - hide(that, '_d', { - b: buffer, - o: offset, - l: byteLength, - e: length, - v: new $DataView(buffer) - }); - while (index < length) addElement(that, index++); - }); - TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); - hide(TypedArrayPrototype, 'constructor', TypedArray); - } else if (!fails(function () { - TypedArray(1); - }) || !fails(function () { - new TypedArray(-1); // eslint-disable-line no-new - }) || !$iterDetect(function (iter) { - new TypedArray(); // eslint-disable-line no-new - new TypedArray(null); // eslint-disable-line no-new - new TypedArray(1.5); // eslint-disable-line no-new - new TypedArray(iter); // eslint-disable-line no-new - }, true)) { - TypedArray = wrapper(function (that, data, $offset, $length) { - anInstance(that, TypedArray, NAME); - var klass; - // `ws` module bug, temporarily remove validation length for Uint8Array - // https://github.com/websockets/ws/pull/645 - if (!isObject(data)) return new Base(toIndex(data)); - if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { - return $length !== undefined - ? new Base(data, toOffset($offset, BYTES), $length) - : $offset !== undefined - ? new Base(data, toOffset($offset, BYTES)) - : new Base(data); - } - if (TYPED_ARRAY in data) return fromList(TypedArray, data); - return $from.call(TypedArray, data); - }); - arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { - if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); - }); - TypedArray[PROTOTYPE] = TypedArrayPrototype; - if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; - } - var $nativeIterator = TypedArrayPrototype[ITERATOR]; - var CORRECT_ITER_NAME = !!$nativeIterator - && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); - var $iterator = $iterators.values; - hide(TypedArray, TYPED_CONSTRUCTOR, true); - hide(TypedArrayPrototype, TYPED_ARRAY, NAME); - hide(TypedArrayPrototype, VIEW, true); - hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); - - if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { - dP(TypedArrayPrototype, TAG, { - get: function () { return NAME; } - }); - } - - O[NAME] = TypedArray; - - $export($export.G + $export.W + $export.F * (TypedArray != Base), O); - - $export($export.S, NAME, { - BYTES_PER_ELEMENT: BYTES - }); - - $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { - from: $from, - of: $of - }); - - if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); - - $export($export.P, NAME, proto); - - setSpecies(NAME); - - $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); - - $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); - - if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; - - $export($export.P + $export.F * fails(function () { - new TypedArray(1).slice(); - }), NAME, { slice: $slice }); - - $export($export.P + $export.F * (fails(function () { - return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); - }) || !fails(function () { - TypedArrayPrototype.toLocaleString.call([1, 2]); - })), NAME, { toLocaleString: $toLocaleString }); - - Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; - if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); - }; -} else module.exports = function () { /* empty */ }; - - -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { - -var Map = __webpack_require__(164); -var $export = __webpack_require__(0); -var shared = __webpack_require__(72)('metadata'); -var store = shared.store || (shared.store = new (__webpack_require__(167))()); - -var getOrCreateMetadataMap = function (target, targetKey, create) { - var targetMetadata = store.get(target); - if (!targetMetadata) { - if (!create) return undefined; - store.set(target, targetMetadata = new Map()); - } - var keyMetadata = targetMetadata.get(targetKey); - if (!keyMetadata) { - if (!create) return undefined; - targetMetadata.set(targetKey, keyMetadata = new Map()); - } return keyMetadata; -}; -var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { - var metadataMap = getOrCreateMetadataMap(O, P, false); - return metadataMap === undefined ? false : metadataMap.has(MetadataKey); -}; -var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { - var metadataMap = getOrCreateMetadataMap(O, P, false); - return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); -}; -var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { - getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); -}; -var ordinaryOwnMetadataKeys = function (target, targetKey) { - var metadataMap = getOrCreateMetadataMap(target, targetKey, false); - var keys = []; - if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); - return keys; -}; -var toMetaKey = function (it) { - return it === undefined || typeof it == 'symbol' ? it : String(it); -}; -var exp = function (O) { - $export($export.S, 'Reflect', O); -}; - -module.exports = { - store: store, - map: getOrCreateMetadataMap, - has: ordinaryHasOwnMetadata, - get: ordinaryGetOwnMetadata, - set: ordinaryDefineOwnMetadata, - keys: ordinaryOwnMetadataKeys, - key: toMetaKey, - exp: exp -}; - - -/***/ }), -/* 36 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(455); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserRouter", function() { return __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(457); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "HashRouter", function() { return __WEBPACK_IMPORTED_MODULE_1__HashRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(195); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_2__Link__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(459); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(462); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NavLink", function() { return __WEBPACK_IMPORTED_MODULE_4__NavLink__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(465); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Prompt", function() { return __WEBPACK_IMPORTED_MODULE_5__Prompt__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(467); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(196); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(127); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_8__Router__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(473); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "StaticRouter", function() { return __WEBPACK_IMPORTED_MODULE_9__StaticRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(475); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return __WEBPACK_IMPORTED_MODULE_10__Switch__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__matchPath__ = __webpack_require__(477); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "matchPath", function() { return __WEBPACK_IMPORTED_MODULE_11__matchPath__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__withRouter__ = __webpack_require__(478); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_12__withRouter__["a"]; }); - - - - - - - - - - - - - - - - - - - - - - - - - - - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - -var META = __webpack_require__(42)('meta'); -var isObject = __webpack_require__(5); -var has = __webpack_require__(16); -var setDesc = __webpack_require__(9).f; -var id = 0; -var isExtensible = Object.isExtensible || function () { - return true; -}; -var FREEZE = !__webpack_require__(4)(function () { - return isExtensible(Object.preventExtensions({})); -}); -var setMeta = function (it) { - setDesc(it, META, { value: { - i: 'O' + ++id, // object ID - w: {} // weak collections IDs - } }); -}; -var fastKey = function (it, create) { - // return primitive with prefix - if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return 'F'; - // not necessary to add metadata - if (!create) return 'E'; - // add missing metadata - setMeta(it); - // return object ID - } return it[META].i; -}; -var getWeak = function (it, create) { - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return true; - // not necessary to add metadata - if (!create) return false; - // add missing metadata - setMeta(it); - // return hash weak collections IDs - } return it[META].w; -}; -// add metadata on freeze-family methods calling -var onFreeze = function (it) { - if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); - return it; -}; -var meta = module.exports = { - KEY: META, - NEED: false, - fastKey: fastKey, - getWeak: getWeak, - onFreeze: onFreeze -}; - - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { - -// 22.1.3.31 Array.prototype[@@unscopables] -var UNSCOPABLES = __webpack_require__(6)('unscopables'); -var ArrayProto = Array.prototype; -if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(17)(ArrayProto, UNSCOPABLES, {}); -module.exports = function (key) { - ArrayProto[UNSCOPABLES][key] = true; -}; - - -/***/ }), -/* 39 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - */ - -function makeEmptyFunction(arg) { - return function () { - return arg; - }; -} - -/** - * This function accepts and discards inputs; it has no side effects. This is - * primarily useful idiomatically for overridable function endpoints which - * always need to be callable, since JS lacks a null-call idiom ala Cocoa. - */ -var emptyFunction = function emptyFunction() {}; - -emptyFunction.thatReturns = makeEmptyFunction; -emptyFunction.thatReturnsFalse = makeEmptyFunction(false); -emptyFunction.thatReturnsTrue = makeEmptyFunction(true); -emptyFunction.thatReturnsNull = makeEmptyFunction(null); -emptyFunction.thatReturnsThis = function () { - return this; -}; -emptyFunction.thatReturnsArgument = function (arg) { - return arg; -}; - -module.exports = emptyFunction; - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -exports.default = request; - -__webpack_require__(494); - -/** - * Parses the JSON returned by a network request - * - * @param {object} response A response from a network request - * - * @return {object} The parsed JSON from the request - */ -function parseJSON(response) { - if (response.status === 204 || response.status === 205) { - return null; - } - return response.json(); -} - -/** - * Parses the status returned by a network request - * - * @param {object} response A response from a network request - * @param {object} response The parsed JSON from the network request - * - * @return {object | undefined} Returns object with status and statusText, or undefined - */ -function checkStatus(response, jsonResponse) { - if (response.status >= 200 && response.status < 300) { - return jsonResponse; - } - var error = new Error(jsonResponse.message); - error.response = response; - throw error; -} - -/** - * Requests a URL, returning a promise - * - * @param {string} url The URL we want to request - * @param {object} [options] The options we want to pass to "fetch" - * - * @return {object} The response data - */ - -function request(url, options) { - return fetch(url, options).then(function (response) { - return Promise.all([response, parseJSON(response)]); - }).then(function (_ref) { - var _ref2 = _slicedToArray(_ref, 2), - response = _ref2[0], - jsonResponse = _ref2[1]; - - return checkStatus(response, jsonResponse); - }); -} - -/***/ }), -/* 41 */ -/***/ (function(module, exports) { - -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - - -/***/ }), -/* 42 */ -/***/ (function(module, exports) { - -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - - -/***/ }), -/* 43 */ -/***/ (function(module, exports) { - -module.exports = false; - - -/***/ }), -/* 44 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(145); -var enumBugKeys = __webpack_require__(96); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - - -/***/ }), -/* 45 */ -/***/ (function(module, exports, __webpack_require__) { - -var toInteger = __webpack_require__(31); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; - - -/***/ }), -/* 46 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(2); -var dPs = __webpack_require__(146); -var enumBugKeys = __webpack_require__(96); -var IE_PROTO = __webpack_require__(95)('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(93)('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - __webpack_require__(97).appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; - return createDict(); -}; - -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : dPs(result, Properties); -}; - - -/***/ }), -/* 47 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) -var $keys = __webpack_require__(145); -var hiddenKeys = __webpack_require__(96).concat('length', 'prototype'); - -exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return $keys(O, hiddenKeys); -}; - - -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var global = __webpack_require__(3); -var dP = __webpack_require__(9); -var DESCRIPTORS = __webpack_require__(8); -var SPECIES = __webpack_require__(6)('species'); - -module.exports = function (KEY) { - var C = global[KEY]; - if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { - configurable: true, - get: function () { return this; } - }); -}; - - -/***/ }), -/* 49 */ -/***/ (function(module, exports) { - -module.exports = function (it, Constructor, name, forbiddenField) { - if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { - throw TypeError(name + ': incorrect invocation!'); - } return it; -}; - - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -var ctx = __webpack_require__(25); -var call = __webpack_require__(157); -var isArrayIter = __webpack_require__(109); -var anObject = __webpack_require__(2); -var toLength = __webpack_require__(10); -var getIterFn = __webpack_require__(111); -var BREAK = {}; -var RETURN = {}; -var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); - var f = ctx(fn, that, entries ? 2 : 1); - var index = 0; - var length, step, iterator, result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); - // fast case for arrays with default iterator - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { - result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; - } -}; -exports.BREAK = BREAK; -exports.RETURN = RETURN; - - -/***/ }), -/* 51 */ -/***/ (function(module, exports, __webpack_require__) { - -var redefine = __webpack_require__(18); -module.exports = function (target, src, safe) { - for (var key in src) redefine(target, key, src[key], safe); - return target; -}; - - -/***/ }), -/* 52 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return detach; }); -/* harmony export (immutable) */ __webpack_exports__["s"] = take; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return takem; }); -/* harmony export (immutable) */ __webpack_exports__["n"] = put; -/* harmony export (immutable) */ __webpack_exports__["b"] = all; -/* harmony export (immutable) */ __webpack_exports__["o"] = race; -/* harmony export (immutable) */ __webpack_exports__["e"] = call; -/* harmony export (immutable) */ __webpack_exports__["c"] = apply; -/* harmony export (immutable) */ __webpack_exports__["h"] = cps; -/* harmony export (immutable) */ __webpack_exports__["k"] = fork; -/* harmony export (immutable) */ __webpack_exports__["r"] = spawn; -/* harmony export (immutable) */ __webpack_exports__["m"] = join; -/* harmony export (immutable) */ __webpack_exports__["f"] = cancel; -/* harmony export (immutable) */ __webpack_exports__["p"] = select; -/* harmony export (immutable) */ __webpack_exports__["a"] = actionChannel; -/* harmony export (immutable) */ __webpack_exports__["g"] = cancelled; -/* harmony export (immutable) */ __webpack_exports__["j"] = flush; -/* harmony export (immutable) */ __webpack_exports__["l"] = getContext; -/* harmony export (immutable) */ __webpack_exports__["q"] = setContext; -/* harmony export (immutable) */ __webpack_exports__["t"] = takeEvery; -/* harmony export (immutable) */ __webpack_exports__["u"] = takeLatest; -/* harmony export (immutable) */ __webpack_exports__["w"] = throttle; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return asEffect; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(24); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sagaHelpers__ = __webpack_require__(204); - - - -var IO = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_0__utils__["x" /* sym */])('IO'); -var TAKE = 'TAKE'; -var PUT = 'PUT'; -var ALL = 'ALL'; -var RACE = 'RACE'; -var CALL = 'CALL'; -var CPS = 'CPS'; -var FORK = 'FORK'; -var JOIN = 'JOIN'; -var CANCEL = 'CANCEL'; -var SELECT = 'SELECT'; -var ACTION_CHANNEL = 'ACTION_CHANNEL'; -var CANCELLED = 'CANCELLED'; -var FLUSH = 'FLUSH'; -var GET_CONTEXT = 'GET_CONTEXT'; -var SET_CONTEXT = 'SET_CONTEXT'; - -var TEST_HINT = '\n(HINT: if you are getting this errors in tests, consider using createMockTask from redux-saga/utils)'; - -var effect = function effect(type, payload) { - var _ref; - - return _ref = {}, _ref[IO] = true, _ref[type] = payload, _ref; -}; - -var detach = function detach(eff) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(asEffect.fork(eff), __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].object, 'detach(eff): argument must be a fork effect'); - eff[FORK].detached = true; - return eff; -}; - -function take() { - var patternOrChannel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '*'; - - if (arguments.length) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(arguments[0], __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'take(patternOrChannel): patternOrChannel is undefined'); - } - if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].pattern(patternOrChannel)) { - return effect(TAKE, { pattern: patternOrChannel }); - } - if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].channel(patternOrChannel)) { - return effect(TAKE, { channel: patternOrChannel }); - } - throw new Error('take(patternOrChannel): argument ' + String(patternOrChannel) + ' is not valid channel or a valid pattern'); -} - -take.maybe = function () { - var eff = take.apply(undefined, arguments); - eff[TAKE].maybe = true; - return eff; -}; - -var takem = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_0__utils__["n" /* deprecate */])(take.maybe, /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_0__utils__["z" /* updateIncentive */])('takem', 'take.maybe')); - -function put(channel, action) { - if (arguments.length > 1) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(channel, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'put(channel, action): argument channel is undefined'); - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(channel, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].channel, 'put(channel, action): argument ' + channel + ' is not a valid channel'); - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(action, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'put(channel, action): argument action is undefined'); - } else { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(channel, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'put(action): argument action is undefined'); - action = channel; - channel = null; - } - return effect(PUT, { channel: channel, action: action }); -} - -put.resolve = function () { - var eff = put.apply(undefined, arguments); - eff[PUT].resolve = true; - return eff; -}; - -put.sync = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_0__utils__["n" /* deprecate */])(put.resolve, /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_0__utils__["z" /* updateIncentive */])('put.sync', 'put.resolve')); - -function all(effects) { - return effect(ALL, effects); -} - -function race(effects) { - return effect(RACE, effects); -} - -function getFnCallDesc(meth, fn, args) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(fn, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, meth + ': argument fn is undefined'); - - var context = null; - if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].array(fn)) { - var _fn = fn; - context = _fn[0]; - fn = _fn[1]; - } else if (fn.fn) { - var _fn2 = fn; - context = _fn2.context; - fn = _fn2.fn; - } - if (context && __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].string(fn) && __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func(context[fn])) { - fn = context[fn]; - } - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(fn, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func, meth + ': argument ' + fn + ' is not a function'); - - return { context: context, fn: fn, args: args }; -} - -function call(fn) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - return effect(CALL, getFnCallDesc('call', fn, args)); -} - -function apply(context, fn) { - var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; - - return effect(CALL, getFnCallDesc('apply', { context: context, fn: fn }, args)); -} - -function cps(fn) { - for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - return effect(CPS, getFnCallDesc('cps', fn, args)); -} - -function fork(fn) { - for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { - args[_key3 - 1] = arguments[_key3]; - } - - return effect(FORK, getFnCallDesc('fork', fn, args)); -} - -function spawn(fn) { - for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { - args[_key4 - 1] = arguments[_key4]; - } - - return detach(fork.apply(undefined, [fn].concat(args))); -} - -function join() { - for (var _len5 = arguments.length, tasks = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { - tasks[_key5] = arguments[_key5]; - } - - if (tasks.length > 1) { - return all(tasks.map(function (t) { - return join(t); - })); - } - var task = tasks[0]; - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(task, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'join(task): argument task is undefined'); - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(task, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].task, 'join(task): argument ' + task + ' is not a valid Task object ' + TEST_HINT); - return effect(JOIN, task); -} - -function cancel() { - for (var _len6 = arguments.length, tasks = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { - tasks[_key6] = arguments[_key6]; - } - - if (tasks.length > 1) { - return all(tasks.map(function (t) { - return cancel(t); - })); - } - var task = tasks[0]; - if (tasks.length === 1) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(task, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'cancel(task): argument task is undefined'); - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(task, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].task, 'cancel(task): argument ' + task + ' is not a valid Task object ' + TEST_HINT); - } - return effect(CANCEL, task || __WEBPACK_IMPORTED_MODULE_0__utils__["d" /* SELF_CANCELLATION */]); -} - -function select(selector) { - for (var _len7 = arguments.length, args = Array(_len7 > 1 ? _len7 - 1 : 0), _key7 = 1; _key7 < _len7; _key7++) { - args[_key7 - 1] = arguments[_key7]; - } - - if (arguments.length === 0) { - selector = __WEBPACK_IMPORTED_MODULE_0__utils__["o" /* ident */]; - } else { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(selector, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'select(selector,[...]): argument selector is undefined'); - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(selector, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func, 'select(selector,[...]): argument ' + selector + ' is not a function'); - } - return effect(SELECT, { selector: selector, args: args }); -} - -/** - channel(pattern, [buffer]) => creates an event channel for store actions -**/ -function actionChannel(pattern, buffer) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(pattern, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'actionChannel(pattern,...): argument pattern is undefined'); - if (arguments.length > 1) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(buffer, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'actionChannel(pattern, buffer): argument buffer is undefined'); - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(buffer, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].buffer, 'actionChannel(pattern, buffer): argument ' + buffer + ' is not a valid buffer'); - } - return effect(ACTION_CHANNEL, { pattern: pattern, buffer: buffer }); -} - -function cancelled() { - return effect(CANCELLED, {}); -} - -function flush(channel) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(channel, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].channel, 'flush(channel): argument ' + channel + ' is not valid channel'); - return effect(FLUSH, channel); -} - -function getContext(prop) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(prop, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].string, 'getContext(prop): argument ' + prop + ' is not a string'); - return effect(GET_CONTEXT, prop); -} - -function setContext(props) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(props, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].object, Object(__WEBPACK_IMPORTED_MODULE_0__utils__["k" /* createSetContextWarning */])(null, props)); - return effect(SET_CONTEXT, props); -} - -function takeEvery(patternOrChannel, worker) { - for (var _len8 = arguments.length, args = Array(_len8 > 2 ? _len8 - 2 : 0), _key8 = 2; _key8 < _len8; _key8++) { - args[_key8 - 2] = arguments[_key8]; - } - - return fork.apply(undefined, [__WEBPACK_IMPORTED_MODULE_1__sagaHelpers__["b" /* takeEveryHelper */], patternOrChannel, worker].concat(args)); -} - -function takeLatest(patternOrChannel, worker) { - for (var _len9 = arguments.length, args = Array(_len9 > 2 ? _len9 - 2 : 0), _key9 = 2; _key9 < _len9; _key9++) { - args[_key9 - 2] = arguments[_key9]; - } - - return fork.apply(undefined, [__WEBPACK_IMPORTED_MODULE_1__sagaHelpers__["d" /* takeLatestHelper */], patternOrChannel, worker].concat(args)); -} - -function throttle(ms, pattern, worker) { - for (var _len10 = arguments.length, args = Array(_len10 > 3 ? _len10 - 3 : 0), _key10 = 3; _key10 < _len10; _key10++) { - args[_key10 - 3] = arguments[_key10]; - } - - return fork.apply(undefined, [__WEBPACK_IMPORTED_MODULE_1__sagaHelpers__["f" /* throttleHelper */], ms, pattern, worker].concat(args)); -} - -var createAsEffectType = function createAsEffectType(type) { - return function (effect) { - return effect && effect[IO] && effect[type]; - }; -}; - -var asEffect = { - take: /*#__PURE__*/createAsEffectType(TAKE), - put: /*#__PURE__*/createAsEffectType(PUT), - all: /*#__PURE__*/createAsEffectType(ALL), - race: /*#__PURE__*/createAsEffectType(RACE), - call: /*#__PURE__*/createAsEffectType(CALL), - cps: /*#__PURE__*/createAsEffectType(CPS), - fork: /*#__PURE__*/createAsEffectType(FORK), - join: /*#__PURE__*/createAsEffectType(JOIN), - cancel: /*#__PURE__*/createAsEffectType(CANCEL), - select: /*#__PURE__*/createAsEffectType(SELECT), - actionChannel: /*#__PURE__*/createAsEffectType(ACTION_CHANNEL), - cancelled: /*#__PURE__*/createAsEffectType(CANCELLED), - flush: /*#__PURE__*/createAsEffectType(FLUSH), - getContext: /*#__PURE__*/createAsEffectType(GET_CONTEXT), - setContext: /*#__PURE__*/createAsEffectType(SET_CONTEXT) -}; - -/***/ }), -/* 53 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__internal_io__ = __webpack_require__(52); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["s"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takem", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["v"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "put", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["n"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "all", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["b"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["o"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "call", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["e"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["c"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "cps", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["h"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fork", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["k"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "spawn", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["r"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "join", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["m"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "cancel", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["f"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "select", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["p"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "actionChannel", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "cancelled", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["g"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "flush", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["j"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getContext", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["l"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "setContext", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["q"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeEvery", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["t"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeLatest", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["u"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["w"]; }); - - -/***/ }), -/* 54 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.onHandleShowPageUri = onHandleShowPageUri; -exports.onRequestError = onRequestError; -exports.onNewChannelRequest = onNewChannelRequest; -exports.onNewAssetRequest = onNewAssetRequest; -exports.onRequestUpdate = onRequestUpdate; -exports.addRequestToRequestList = addRequestToRequestList; -exports.addAssetToAssetList = addAssetToAssetList; -exports.addNewChannelToChannelList = addNewChannelToChannelList; -exports.onUpdateChannelClaims = onUpdateChannelClaims; -exports.updateChannelClaims = updateChannelClaims; -exports.fileRequested = fileRequested; -exports.updateFileAvailability = updateFileAvailability; -exports.updateDisplayAssetError = updateDisplayAssetError; - -var _show_action_types = __webpack_require__(60); - -var actions = _interopRequireWildcard(_show_action_types); - -var _show_request_types = __webpack_require__(205); - -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; } } - -// basic request parsing -function onHandleShowPageUri(params) { - return { - type: actions.HANDLE_SHOW_URI, - data: params - }; -}; - -function onRequestError(error) { - return { - type: actions.REQUEST_ERROR, - data: error - }; -}; - -function onNewChannelRequest(channelName, channelId) { - var requestType = _show_request_types.CHANNEL; - var requestId = 'cr#' + channelName + '#' + channelId; - return { - type: actions.CHANNEL_REQUEST_NEW, - data: { requestType: requestType, requestId: requestId, channelName: channelName, channelId: channelId } - }; -}; - -function onNewAssetRequest(name, id, channelName, channelId, extension) { - var requestType = extension ? _show_request_types.ASSET_LITE : _show_request_types.ASSET_DETAILS; - var requestId = 'ar#' + name + '#' + id + '#' + channelName + '#' + channelId; - return { - type: actions.ASSET_REQUEST_NEW, - data: { - requestType: requestType, - requestId: requestId, - name: name, - modifier: { - id: id, - channel: { - name: channelName, - id: channelId - } - } - } - }; -}; - -function onRequestUpdate(requestType, requestId) { - return { - type: actions.REQUEST_UPDATE, - data: { - requestType: requestType, - requestId: requestId - } - }; -}; - -function addRequestToRequestList(id, error, key) { - return { - type: actions.REQUEST_LIST_ADD, - data: { id: id, error: error, key: key } - }; -}; - -// asset actions - -function addAssetToAssetList(id, error, name, claimId, shortId, claimData) { - return { - type: actions.ASSET_ADD, - data: { id: id, error: error, name: name, claimId: claimId, shortId: shortId, claimData: claimData } - }; -} - -// channel actions - -function addNewChannelToChannelList(id, name, shortId, longId, claimsData) { - return { - type: actions.CHANNEL_ADD, - data: { id: id, name: name, shortId: shortId, longId: longId, claimsData: claimsData } - }; -}; - -function onUpdateChannelClaims(channelKey, name, longId, page) { - return { - type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC, - data: { channelKey: channelKey, name: name, longId: longId, page: page } - }; -}; - -function updateChannelClaims(channelListId, claimsData) { - return { - type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS, - data: { channelListId: channelListId, claimsData: claimsData } - }; -}; - -// display a file - -function fileRequested(name, claimId) { - return { - type: actions.FILE_REQUESTED, - data: { name: name, claimId: claimId } - }; -}; - -function updateFileAvailability(status) { - return { - type: actions.FILE_AVAILABILITY_UPDATE, - data: status - }; -}; - -function updateDisplayAssetError(error) { - return { - type: actions.DISPLAY_ASSET_ERROR, - data: error - }; -}; - -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - -var def = __webpack_require__(9).f; -var has = __webpack_require__(16); -var TAG = __webpack_require__(6)('toStringTag'); - -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); -}; - - -/***/ }), -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { - -var $export = __webpack_require__(0); -var defined = __webpack_require__(30); -var fails = __webpack_require__(4); -var spaces = __webpack_require__(99); -var space = '[' + spaces + ']'; -var non = '\u200b\u0085'; -var ltrim = RegExp('^' + space + space + '*'); -var rtrim = RegExp(space + space + '*$'); - -var exporter = function (KEY, exec, ALIAS) { - var exp = {}; - var FORCE = fails(function () { - return !!spaces[KEY]() || non[KEY]() != non; - }); - var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; - if (ALIAS) exp[ALIAS] = fn; - $export($export.P + $export.F * FORCE, 'String', exp); -}; - -// 1 -> String#trimLeft -// 2 -> String#trimRight -// 3 -> String#trim -var trim = exporter.trim = function (string, TYPE) { - string = String(defined(string)); - if (TYPE & 1) string = string.replace(ltrim, ''); - if (TYPE & 2) string = string.replace(rtrim, ''); - return string; -}; - -module.exports = exporter; - - -/***/ }), -/* 57 */ -/***/ (function(module, exports) { - -module.exports = {}; - - -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(5); -module.exports = function (it, TYPE) { - if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); - return it; -}; - - -/***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="public/bundle/",t(t.s=203)}([function(e,t,n){var r=n(3),o=n(27),a=n(16),i=n(17),u=n(24),c=function(e,t,n){var l,s,f,p,d=e&c.F,h=e&c.G,v=e&c.S,y=e&c.P,m=e&c.B,b=h?r:v?r[t]||(r[t]={}):(r[t]||{}).prototype,g=h?o:o[t]||(o[t]={}),w=g.prototype||(g.prototype={});h&&(n=t);for(l in n)s=!d&&b&&void 0!==b[l],f=(s?b:n)[l],p=m&&s?u(f,r):y&&"function"==typeof f?u(Function.call,f):f,b&&i(b,l,f,e&c.U),g[l]!=f&&a(g,l,p),y&&w[l]!=f&&(w[l]=f)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){"use strict";e.exports=n(408)},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(68)("wks"),o=n(40),a=n(3).Symbol,i="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=i&&a[e]||(i?a:o)("Symbol."+e))}).store=r},function(e,t,n){e.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(2),o=n(137),a=n(28),i=Object.defineProperty;t.f=n(7)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),o)try{return i(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(30),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){e.exports=n(420)()},function(e,t,n){var r=n(29);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(419),o=n(173),a=n(424);n.d(t,"Provider",function(){return r.b}),n.d(t,"createProvider",function(){return r.a}),n.d(t,"connectAdvanced",function(){return o.a}),n.d(t,"connect",function(){return a.a})},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(8),o=n(39);e.exports=n(7)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(3),o=n(16),a=n(15),i=n(40)("src"),u=Function.toString,c=(""+u).split("toString");n(27).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,u){var l="function"==typeof n;l&&(a(n,"name")||o(n,"name",t)),e[t]!==n&&(l&&(a(n,i)||o(n,i,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:u?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[i]||u.call(this)})},function(e,t,n){var r=n(0),o=n(4),a=n(29),i=/"/g,u=function(e,t,n,r){var o=String(a(e)),u="<"+t;return""!==n&&(u+=" "+n+'="'+String(r).replace(i,""")+'"'),u+">"+o+""};e.exports=function(e,t){var n={};n[e]=t(u),r(r.P+r.F*o(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){var r=n(61),o=n(29);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(62),o=n(39),a=n(19),i=n(28),u=n(15),c=n(137),l=Object.getOwnPropertyDescriptor;t.f=n(7)?l:function(e,t){if(e=a(e),t=i(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(15),o=n(11),a=n(90)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,i,u){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,u],s=0;c=new Error(t.replace(/%s/g,function(){return l[s++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};e.exports=r},function(e,t,n){"use strict";function r(e,t,n){if(!t(e))throw f("error","uncaught at check",n),new Error(n)}function o(e,t){return P.notUndef(e)&&x.call(e,t)}function a(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=d({},e),n=new Promise(function(e,n){t.resolve=e,t.reject=n});return t.promise=n,t}function u(e){for(var t=[],n=0;n1&&void 0!==arguments[1])||arguments[1],n=void 0,r=new Promise(function(r){n=setTimeout(function(){return r(t)},e)});return r[g]=function(){return clearTimeout(n)},r}function l(){var e,t=!0,n=void 0,r=void 0;return e={},e[y]=!0,e.isRunning=function(){return t},e.result=function(){return n},e.error=function(){return r},e.setRunning=function(e){return t=e},e.setResult=function(e){return n=e},e.setError=function(e){return r=e},e}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3],o={name:n,next:e,throw:t,return:N};return r&&(o[m]=!0),"undefined"!=typeof Symbol&&(o[Symbol.iterator]=function(){return o}),o}function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";"undefined"==typeof window?console.log("redux-saga "+e+": "+t+"\n"+(n&&n.stack||n)):console[e](t,n)}function p(e,t){return function(){return e.apply(void 0,arguments)}}n.d(t,"x",function(){return v}),n.d(t,"e",function(){return y}),n.d(t,"b",function(){return b}),n.d(t,"a",function(){return g}),n.d(t,"c",function(){return w}),n.d(t,"d",function(){return E}),n.d(t,"r",function(){return O}),n.d(t,"u",function(){return T}),n.d(t,"o",function(){return S}),t.h=r,n.d(t,"q",function(){return P}),n.d(t,"v",function(){return C}),t.w=a,n.d(t,"f",function(){return A}),t.l=i,t.g=u,t.m=c,t.j=l,n.d(t,"y",function(){return k}),t.t=s,t.s=f,t.n=p,n.d(t,"z",function(){return R}),n.d(t,"p",function(){return I}),n.d(t,"k",function(){return L}),n.d(t,"A",function(){return M}),n.d(t,"i",function(){return D});var d=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0;return function(){return++e}}(),j=function(e){throw e},N=function(e){return{value:e,done:!0}},R=function(e,t){return e+" has been deprecated in favor of "+t+", please update your code"},I=function(e){return new Error("\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project's github repo.\n Error: "+e+"\n")},L=function(e,t){return(e?e+".":"")+"setContext(props): argument "+t+" is not a plain object"},M=function(e){return function(t){return e(Object.defineProperty(t,w,{value:!0}))}},D=function e(t){return function(){for(var n=arguments.length,r=Array(n),o=0;o0?r:n)(e)}},function(e,t,n){var r=n(0),o=n(27),a=n(4);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],i={};i[e]=t(n),r(r.S+r.F*a(function(){n(1)}),"Object",i)}},function(e,t,n){var r=n(24),o=n(61),a=n(11),i=n(9),u=n(107);e.exports=function(e,t){var n=1==e,c=2==e,l=3==e,s=4==e,f=6==e,p=5==e||f,d=t||u;return function(t,u,h){for(var v,y,m=a(t),b=o(m),g=r(u,h,3),w=i(b.length),E=0,_=n?d(t,w):c?d(t,0):void 0;w>E;E++)if((p||E in b)&&(v=b[E],y=g(v,E,m),e))if(n)_[E]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return E;case 2:_.push(v)}else if(s)return!1;return f?-1:l||s?s:_}}},function(e,t,n){"use strict";if(n(7)){var r=n(41),o=n(3),a=n(4),i=n(0),u=n(78),c=n(113),l=n(24),s=n(47),f=n(39),p=n(16),d=n(49),h=n(30),v=n(9),y=n(163),m=n(43),b=n(28),g=n(15),w=n(63),E=n(5),_=n(11),O=n(104),T=n(44),S=n(21),x=n(45).f,P=n(106),C=n(40),A=n(6),k=n(32),j=n(69),N=n(76),R=n(109),I=n(55),L=n(73),M=n(46),D=n(108),U=n(153),F=n(8),H=n(20),q=F.f,B=H.f,G=o.RangeError,V=o.TypeError,W=o.Uint8Array,z=Array.prototype,K=c.ArrayBuffer,Y=c.DataView,Q=k(0),$=k(2),X=k(3),J=k(4),Z=k(5),ee=k(6),te=j(!0),ne=j(!1),re=R.values,oe=R.keys,ae=R.entries,ie=z.lastIndexOf,ue=z.reduce,ce=z.reduceRight,le=z.join,se=z.sort,fe=z.slice,pe=z.toString,de=z.toLocaleString,he=A("iterator"),ve=A("toStringTag"),ye=C("typed_constructor"),me=C("def_constructor"),be=u.CONSTR,ge=u.TYPED,we=u.VIEW,Ee=k(1,function(e,t){return xe(N(e,e[me]),t)}),_e=a(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),Oe=!!W&&!!W.prototype.set&&a(function(){new W(1).set({})}),Te=function(e,t){var n=h(e);if(n<0||n%t)throw G("Wrong offset!");return n},Se=function(e){if(E(e)&&ge in e)return e;throw V(e+" is not a typed array!")},xe=function(e,t){if(!(E(e)&&ye in e))throw V("It is not a typed array constructor!");return new e(t)},Pe=function(e,t){return Ce(N(e,e[me]),t)},Ce=function(e,t){for(var n=0,r=t.length,o=xe(e,r);r>n;)o[n]=t[n++];return o},Ae=function(e,t,n){q(e,t,{get:function(){return this._d[n]}})},ke=function(e){var t,n,r,o,a,i,u=_(e),c=arguments.length,s=c>1?arguments[1]:void 0,f=void 0!==s,p=P(u);if(void 0!=p&&!O(p)){for(i=p.call(u),r=[],t=0;!(a=i.next()).done;t++)r.push(a.value);u=r}for(f&&c>2&&(s=l(s,arguments[2],2)),t=0,n=v(u.length),o=xe(this,n);n>t;t++)o[t]=f?s(u[t],t):u[t];return o},je=function(){for(var e=0,t=arguments.length,n=xe(this,t);t>e;)n[e]=arguments[e++];return n},Ne=!!W&&a(function(){de.call(new W(1))}),Re=function(){return de.apply(Ne?fe.call(Se(this)):Se(this),arguments)},Ie={copyWithin:function(e,t){return U.call(Se(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return J(Se(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return D.apply(Se(this),arguments)},filter:function(e){return Pe(this,$(Se(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Z(Se(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Se(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Q(Se(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Se(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Se(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return le.apply(Se(this),arguments)},lastIndexOf:function(e){return ie.apply(Se(this),arguments)},map:function(e){return Ee(Se(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ue.apply(Se(this),arguments)},reduceRight:function(e){return ce.apply(Se(this),arguments)},reverse:function(){for(var e,t=this,n=Se(t).length,r=Math.floor(n/2),o=0;o1?arguments[1]:void 0)},sort:function(e){return se.call(Se(this),e)},subarray:function(e,t){var n=Se(this),r=n.length,o=m(e,r);return new(N(n,n[me]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,v((void 0===t?r:m(t,r))-o))}},Le=function(e,t){return Pe(this,fe.call(Se(this),e,t))},Me=function(e){Se(this);var t=Te(arguments[1],1),n=this.length,r=_(e),o=v(r.length),a=0;if(o+t>n)throw G("Wrong length!");for(;a255?255:255&r),o.v[d](n*t+o.o,r,_e)},A=function(e,t){q(e,t,{get:function(){return P(this,t)},set:function(e){return C(this,t,e)},enumerable:!0})};g?(h=n(function(e,n,r,o){s(e,h,l,"_d");var a,i,u,c,f=0,d=0;if(E(n)){if(!(n instanceof K||"ArrayBuffer"==(c=w(n))||"SharedArrayBuffer"==c))return ge in n?Ce(h,n):ke.call(h,n);a=n,d=Te(r,t);var m=n.byteLength;if(void 0===o){if(m%t)throw G("Wrong length!");if((i=m-d)<0)throw G("Wrong length!")}else if((i=v(o)*t)+d>m)throw G("Wrong length!");u=i/t}else u=y(n),i=u*t,a=new K(i);for(p(e,"_d",{b:a,o:d,l:i,e:u,v:new Y(a)});f=200&&e.status<300)return t;var n=new Error(t.message);throw n.response=e,n}function a(e,t){return fetch(e,t).then(function(e){return Promise.all([e,r(e)])}).then(function(e){var t=i(e,2);return o(t[0],t[1])})}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=a,n(484)},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(139),o=n(91);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(30),o=Math.max,a=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):a(e,t)}},function(e,t,n){var r=n(2),o=n(140),a=n(91),i=n(90)("IE_PROTO"),u=function(){},c=function(){var e,t=n(88)("iframe"),r=a.length;for(t.style.display="none",n(92).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("\\n \\n \\n \\n ';\n};\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar selectSiteState = exports.selectSiteState = function selectSiteState(state) {\n return state.site;\n};\n\nvar selectSiteHost = exports.selectSiteHost = function selectSiteHost(state) {\n return state.site.host;\n};\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(58);\n__webpack_require__(59);\nmodule.exports = __webpack_require__(60);\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"babel-polyfill\");\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"whatwg-fetch\");\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar server = __webpack_require__(61);\nvar components = __webpack_require__(139);\n// const containers = require('client/containers');\n// const pages = require('client/pages');\n\nvar _exports = {\n server: server,\n components: components\n // containers,\n // pages,\n};\n\nmodule.exports = _exports;\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// app dependencies\nvar express = __webpack_require__(62);\nvar bodyParser = __webpack_require__(63);\nvar expressHandlebars = __webpack_require__(64);\nvar Handlebars = __webpack_require__(65);\nvar helmet = __webpack_require__(66);\nvar passport = __webpack_require__(28);\n\nvar _require = __webpack_require__(67),\n serializeSpeechUser = _require.serializeSpeechUser,\n deserializeSpeechUser = _require.deserializeSpeechUser;\n\nvar cookieSession = __webpack_require__(68);\nvar http = __webpack_require__(69);\n// logging dependencies\nvar logger = __webpack_require__(1);\n\nfunction SpeechServer() {\n var _this = this;\n\n this.configureMysql = function (mysqlConfig) {\n __webpack_require__(29).configure(mysqlConfig);\n };\n this.configureSite = function (siteConfig) {\n __webpack_require__(3).configure(siteConfig);\n console.log(__webpack_require__(3));\n _this.sessionKey = siteConfig.auth.sessionKey;\n _this.PORT = siteConfig.details.port;\n };\n this.configureSlack = function (slackConfig) {\n __webpack_require__(30).configure(slackConfig);\n };\n this.createApp = function () {\n // create an Express application\n var app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(__dirname + '/public')); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use(function (req, res, next) {\n // custom logging middleware to log all incoming http requests\n logger.verbose('Request on ' + req.originalUrl + ' from ' + req.ip);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n var localSignupStrategy = __webpack_require__(70);\n var localLoginStrategy = __webpack_require__(81);\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name: 'session',\n keys: [_this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000 // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n var hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars: Handlebars\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n __webpack_require__(82)(app);\n __webpack_require__(83)(app);\n __webpack_require__(89)(app);\n __webpack_require__(124)(app);\n __webpack_require__(134)(app);\n\n _this.app = app;\n };\n this.initialize = function () {\n __webpack_require__(135)(logger);\n __webpack_require__(137)(logger);\n _this.createApp();\n _this.server = http.Server(_this.app);\n };\n this.start = function () {\n var db = __webpack_require__(5);\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(function () {\n _this.server.listen(_this.PORT, function () {\n logger.info('Server is listening on PORT ' + _this.PORT);\n });\n }).catch(function (error) {\n logger.error('Startup Error:', error);\n });\n };\n};\n\nmodule.exports = SpeechServer;\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express\");\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"body-parser\");\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express-handlebars\");\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"handlebars\");\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"helmet\");\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n serializeSpeechUser: function serializeSpeechUser(user, done) {\n // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser: function deserializeSpeechUser(user, done) {\n // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n }\n};\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cookie-session\");\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"http\");\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar PassportLocalStrategy = __webpack_require__(31).Strategy;\nvar lbryApi = __webpack_require__(15);\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n logger.verbose('new channel signup request. user: ' + username + ' pass: ' + password + ' .');\n var userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel('@' + username).then(function (tx) {\n // create user record\n var userData = {\n userName: username,\n password: password\n };\n logger.verbose('userData >', userData);\n // create user record\n var channelData = {\n channelName: '@' + username,\n channelClaimId: tx.claim_id\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n var certificateData = {\n claimId: tx.claim_id,\n name: '@' + username\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 3),\n newUser = _ref2[0],\n newChannel = _ref2[1],\n newCertificate = _ref2[2];\n\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n }).then(function () {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n }).catch(function (error) {\n logger.error('signup error', error);\n return done(error);\n });\n});\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"axios\");\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279'\n }\n};\n\nmodule.exports = lbryConfig;\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"universal-analytics\");\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(33),\n returnShortId = _require.returnShortId;\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Certificate = sequelize.define('Certificate', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateVersion: {\n type: STRING,\n default: null\n },\n keyType: {\n type: STRING,\n default: null\n },\n publicKey: {\n type: TEXT('long'),\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Certificate.associate = function (db) {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n var _this = this;\n\n logger.debug('getShortChannelIdFromLongChannelId ' + channelName + ':' + longChannelId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: channelName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n var _this2 = this;\n\n logger.debug('getLongChannelIdFromShortChannelId(' + channelName + ', ' + channelClaimId + ')');\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: {\n name: channelName,\n claimId: {\n $like: channelClaimId + '%'\n }\n },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n var _this3 = this;\n\n logger.debug('getLongChannelIdFromChannelName(' + channelName + ')');\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n var _this4 = this;\n\n logger.debug('validateLongChannelId(' + name + ', ' + claimId + ')');\n return new Promise(function (resolve, reject) {\n _this4.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug('getLongChannelId(' + channelName + ', ' + channelClaimId + ')');\n if (channelClaimId && channelClaimId.length === 40) {\n // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) {\n // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var Channel = sequelize.define('Channel', {\n channelName: {\n type: STRING,\n allowNull: false\n },\n channelClaimId: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n Channel.associate = function (db) {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n/***/ }),\n/* 76 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(33),\n returnShortId = _require.returnShortId;\n\nvar _require2 = __webpack_require__(3),\n defaultThumbnail = _require2.assetDefaults.thumbnail,\n host = _require2.details.host;\n\nfunction determineFileExtensionFromContentType(contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail(storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData(claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Claim = sequelize.define('Claim', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateId: {\n type: STRING,\n default: null\n },\n author: {\n type: STRING,\n default: null\n },\n description: {\n type: TEXT('long'),\n default: null\n },\n language: {\n type: STRING,\n default: null\n },\n license: {\n type: STRING,\n default: null\n },\n licenseUrl: {\n type: STRING,\n default: null\n },\n nsfw: {\n type: BOOLEAN,\n default: null\n },\n preview: {\n type: STRING,\n default: null\n },\n thumbnail: {\n type: STRING,\n default: null\n },\n title: {\n type: STRING,\n default: null\n },\n metadataVersion: {\n type: STRING,\n default: null\n },\n contentType: {\n type: STRING,\n default: null\n },\n source: {\n type: STRING,\n default: null\n },\n sourceType: {\n type: STRING,\n default: null\n },\n sourceVersion: {\n type: STRING,\n default: null\n },\n streamVersion: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n channelName: {\n type: STRING,\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Claim.associate = function (db) {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n var _this = this;\n\n logger.debug('Claim.getShortClaimIdFromLongClaimId for ' + claimName + '#' + claimId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: claimName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n var _this2 = this;\n\n logger.debug('Claim.getAllChannelClaims for ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw: true // returns an array of only data, not an array of instances\n }).then(function (channelClaimsArray) {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(function (claim) {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n var _this3 = this;\n\n logger.debug('finding claim id for claim ' + claimName + ' from channel ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(result.length + ' records found for \"' + claimName + '\" in channel \"' + channelClaimId + '\"');\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n var _this4 = this;\n\n return new Promise(function (resolve, reject) {\n _this4.findAll({\n where: {\n name: name,\n claimId: {\n $like: shortId + '%'\n } },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n var _this5 = this;\n\n return new Promise(function (resolve, reject) {\n _this5.findAll({\n where: { name: name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] // note: maybe height and effective amount need to switch?\n }).then(function (result) {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n var _this6 = this;\n\n return new Promise(function (resolve, reject) {\n _this6.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug('getLongClaimId(' + claimName + ', ' + claimId + ')');\n if (claimId && claimId.length === 40) {\n // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n var _this7 = this;\n\n logger.debug('Claim.resolveClaim: ' + name + ' ' + claimId);\n return new Promise(function (resolve, reject) {\n _this7.findAll({\n where: { name: name, claimId: claimId }\n }).then(function (claimArray) {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error('more than one record matches ' + name + '#' + claimId + ' in db.Claim');\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER;\n\n var File = sequelize.define('File', {\n name: {\n type: STRING,\n allowNull: false\n },\n claimId: {\n type: STRING,\n allowNull: false\n },\n address: {\n type: STRING,\n allowNull: false\n },\n outpoint: {\n type: STRING,\n allowNull: false\n },\n height: {\n type: INTEGER,\n allowNull: false,\n default: 0\n },\n fileName: {\n type: STRING,\n allowNull: false\n },\n filePath: {\n type: STRING,\n allowNull: false\n },\n fileType: {\n type: STRING\n },\n nsfw: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: false\n },\n trendingEligible: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: true\n }\n }, {\n freezeTableName: true\n });\n\n File.associate = function (db) {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25\n });\n };\n\n return File;\n};\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n TEXT = _ref.TEXT;\n\n var Request = sequelize.define('Request', {\n action: {\n type: STRING,\n allowNull: false\n },\n url: {\n type: STRING,\n allowNull: false\n },\n ipAddress: {\n type: STRING,\n allowNull: true\n },\n result: {\n type: TEXT('long'),\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Request.associate = function (db) {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n return Request;\n};\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar bcrypt = __webpack_require__(80);\nvar logger = __webpack_require__(1);\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var User = sequelize.define('User', {\n userName: {\n type: STRING,\n allowNull: false\n },\n password: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n User.associate = function (db) {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n _this.update({ password: hash }).then(function () {\n resolve();\n }).catch(function (error) {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', function (user, options) {\n logger.debug('User.beforeCreate hook...');\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"bcrypt\");\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PassportLocalStrategy = __webpack_require__(31).Strategy;\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\n\nvar returnUserAndChannelInfo = function returnUserAndChannelInfo(userInstance) {\n return new Promise(function (resolve, reject) {\n var userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance.getChannel().then(function (_ref) {\n var channelName = _ref.channelName,\n channelClaimId = _ref.channelClaimId;\n\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n }).catch(function (error) {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n return db.User.findOne({\n where: { userName: username }\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n return user.comparePassword(password).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user).then(function (userInfo) {\n return done(null, userInfo);\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return done(error);\n });\n});\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\nvar passport = __webpack_require__(28);\n\nmodule.exports = function (app) {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), function (req, res) {\n logger.verbose('successful signup for ' + req.user.channelName);\n res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n // route for log in\n app.post('/login', function (req, res, next) {\n passport.authenticate('local-login', function (err, user, info) {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message\n });\n }\n logger.debug('successful login');\n req.logIn(user, function (err) {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', function (req, res) {\n req.logout();\n res.status(200).json({ success: true, message: 'you successfully logged out' });\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', function (req, res) {\n if (req.user) {\n res.status(200).json({ success: true, data: req.user });\n } else {\n res.status(401).json({ success: false, message: 'user is not logged in' });\n }\n });\n};\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(1);\nvar multipart = __webpack_require__(84);\n\nvar _require = __webpack_require__(3),\n uploadDirectory = _require.publishing.uploadDirectory,\n host = _require.details.host;\n\nvar multipartMiddleware = multipart({ uploadDir: uploadDirectory });\nvar db = __webpack_require__(5);\n\nvar _require2 = __webpack_require__(85),\n claimNameIsAvailable = _require2.claimNameIsAvailable,\n checkChannelAvailability = _require2.checkChannelAvailability,\n publish = _require2.publish;\n\nvar _require3 = __webpack_require__(15),\n getClaimList = _require3.getClaimList,\n resolveUri = _require3.resolveUri,\n getClaim = _require3.getClaim;\n\nvar _require4 = __webpack_require__(34),\n addGetResultsToFileData = _require4.addGetResultsToFileData,\n createBasicPublishParams = _require4.createBasicPublishParams,\n createThumbnailPublishParams = _require4.createThumbnailPublishParams,\n parsePublishApiRequestBody = _require4.parsePublishApiRequestBody,\n parsePublishApiRequestFiles = _require4.parsePublishApiRequestFiles,\n createFileData = _require4.createFileData;\n\nvar errorHandlers = __webpack_require__(35);\n\nvar _require5 = __webpack_require__(16),\n sendGATimingEvent = _require5.sendGATimingEvent;\n\nvar _require6 = __webpack_require__(87),\n authenticateUser = _require6.authenticateUser;\n\nvar _require7 = __webpack_require__(36),\n getChannelData = _require7.getChannelData,\n getChannelClaims = _require7.getChannelClaims,\n getClaimId = _require7.getClaimId;\n\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = function (app) {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', function (_ref, res) {\n var ip = _ref.ip,\n originalUrl = _ref.originalUrl,\n name = _ref.params.name;\n\n var gaStartTime = Date.now();\n checkChannelAvailability(name).then(function (availableName) {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', function (_ref2, res) {\n var ip = _ref2.ip,\n originalUrl = _ref2.originalUrl,\n params = _ref2.params;\n\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name).then(function (shortId) {\n res.status(200).json(shortId);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', function (_ref3, res) {\n var ip = _ref3.ip,\n originalUrl = _ref3.originalUrl,\n body = _ref3.body,\n params = _ref3.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', function (_ref4, res) {\n var ip = _ref4.ip,\n originalUrl = _ref4.originalUrl,\n body = _ref4.body,\n params = _ref4.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n var page = params.page;\n getChannelClaims(channelName, channelClaimId, page).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', function (_ref5, res) {\n var ip = _ref5.ip,\n originalUrl = _ref5.originalUrl,\n params = _ref5.params;\n\n getClaimList(params.name).then(function (claimsList) {\n res.status(200).json(claimsList);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', function (_ref6, res) {\n var ip = _ref6.ip,\n originalUrl = _ref6.originalUrl,\n params = _ref6.params;\n\n var name = params.name;\n var claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId).then(function (resolveResult) {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n var fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(name + '#' + claimId)]);\n }).then(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n fileData = _ref8[0],\n getResult = _ref8[1];\n\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, { name: name, claimId: claimId }, 'File'), getResult]);\n }).then(function (_ref9) {\n var _ref10 = _slicedToArray(_ref9, 2),\n fileRecord = _ref10[0],\n _ref10$ = _ref10[1],\n message = _ref10$.message,\n completed = _ref10$.completed;\n\n res.status(200).json({ success: true, message: message, completed: completed });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', function (_ref11, res) {\n var ip = _ref11.ip,\n originalUrl = _ref11.originalUrl,\n name = _ref11.params.name;\n\n var gaStartTime = Date.now();\n claimNameIsAvailable(name).then(function (result) {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', function (_ref12, res) {\n var headers = _ref12.headers,\n ip = _ref12.ip,\n originalUrl = _ref12.originalUrl,\n params = _ref12.params;\n\n resolveUri(params.name + '#' + params.claimId).then(function (resolvedUri) {\n res.status(200).json(resolvedUri);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, function (_ref13, res) {\n var body = _ref13.body,\n files = _ref13.files,\n headers = _ref13.headers,\n ip = _ref13.ip,\n originalUrl = _ref13.originalUrl,\n user = _ref13.user;\n\n // define variables\n var channelName = void 0,\n channelId = void 0,\n channelPassword = void 0,\n description = void 0,\n fileName = void 0,\n filePath = void 0,\n fileType = void 0,\n gaStartTime = void 0,\n license = void 0,\n name = void 0,\n nsfw = void 0,\n thumbnail = void 0,\n thumbnailFileName = void 0,\n thumbnailFilePath = void 0,\n thumbnailFileType = void 0,\n title = void 0;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n var _parsePublishApiReque = parsePublishApiRequestBody(body);\n // validateApiPublishRequest(body, files);\n\n\n name = _parsePublishApiReque.name;\n nsfw = _parsePublishApiReque.nsfw;\n license = _parsePublishApiReque.license;\n title = _parsePublishApiReque.title;\n description = _parsePublishApiReque.description;\n thumbnail = _parsePublishApiReque.thumbnail;\n\n var _parsePublishApiReque2 = parsePublishApiRequestFiles(files);\n\n fileName = _parsePublishApiReque2.fileName;\n filePath = _parsePublishApiReque2.filePath;\n fileType = _parsePublishApiReque2.fileType;\n thumbnailFileName = _parsePublishApiReque2.thumbnailFileName;\n thumbnailFilePath = _parsePublishApiReque2.thumbnailFilePath;\n thumbnailFileType = _parsePublishApiReque2.thumbnailFileType;\n channelName = body.channelName;\n channelId = body.channelId;\n channelPassword = body.channelPassword;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // check channel authorization\n Promise.all([authenticateUser(channelName, channelId, channelPassword, user), claimNameIsAvailable(name), createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail), createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw)]).then(function (_ref14) {\n var _ref15 = _slicedToArray(_ref14, 4),\n _ref15$ = _ref15[0],\n channelName = _ref15$.channelName,\n channelClaimId = _ref15$.channelClaimId,\n validatedClaimName = _ref15[1],\n publishParams = _ref15[2],\n thumbnailPublishParams = _ref15[3];\n\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n }).then(function (result) {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data: {\n name: name,\n claimId: result.claim_id,\n url: host + '/' + result.claim_id + '/' + name,\n lbryTx: result\n }\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', function (_ref16, res) {\n var ip = _ref16.ip,\n originalUrl = _ref16.originalUrl,\n body = _ref16.body,\n params = _ref16.params;\n\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name).then(function (shortId) {\n res.status(200).json({ success: true, data: shortId });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', function (_ref17, res) {\n var ip = _ref17.ip,\n originalUrl = _ref17.originalUrl,\n body = _ref17.body,\n params = _ref17.params;\n\n logger.debug('body:', body);\n var channelName = body.channelName;\n var channelClaimId = body.channelClaimId;\n var claimName = body.claimName;\n var claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (result) {\n if (result === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel could be found' });\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'No matching claim id could be found' });\n }\n res.status(200).json({ success: true, data: result });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', function (_ref18, res) {\n var ip = _ref18.ip,\n originalUrl = _ref18.originalUrl,\n body = _ref18.body,\n params = _ref18.params;\n\n var claimName = params.claimName;\n var claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId).then(function (claimInfo) {\n if (!claimInfo) {\n return res.status(404).json({ success: false, message: 'No claim could be found' });\n }\n res.status(200).json({ success: true, data: claimInfo });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', function (_ref19, res) {\n var ip = _ref19.ip,\n originalUrl = _ref19.originalUrl,\n params = _ref19.params;\n\n var name = params.name;\n var claimId = params.claimId;\n db.File.findOne({ where: { name: name, claimId: claimId } }).then(function (result) {\n if (result) {\n return res.status(200).json({ success: true, data: true });\n }\n res.status(200).json({ success: true, data: false });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"connect-multiparty\");\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _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; }\n\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\nvar lbryApi = __webpack_require__(15);\nvar publishHelpers = __webpack_require__(34);\n\nvar _require = __webpack_require__(3),\n _require$publishing = _require.publishing,\n primaryClaimAddress = _require$publishing.primaryClaimAddress,\n additionalClaimAddresses = _require$publishing.additionalClaimAddresses;\n\nvar Sequelize = __webpack_require__(32);\nvar Op = Sequelize.Op;\n\nmodule.exports = {\n publish: function publish(publishParams, fileName, fileType) {\n return new Promise(function (resolve, reject) {\n var publishResults = void 0,\n certificateId = void 0,\n channelName = void 0;\n // publish the file\n return lbryApi.publishClaim(publishParams).then(function (tx) {\n logger.info('Successfully published ' + publishParams.name + ' ' + fileName, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug('this claim was published in channel: ' + publishParams.channel_name);\n return db.Channel.findOne({ where: { channelName: publishParams.channel_name } });\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n }).then(function (channel) {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug('certificateId: ' + certificateId);\n }).then(function () {\n // create the File record\n var fileRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n fileName: fileName,\n filePath: publishParams.file_path,\n fileType: fileType,\n nsfw: publishParams.metadata.nsfw\n };\n // create the Claim record\n var claimRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n thumbnail: publishParams.metadata.thumbnail,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n contentType: fileType,\n nsfw: publishParams.metadata.nsfw,\n amount: publishParams.bid,\n certificateId: certificateId,\n channelName: channelName\n };\n // upsert criteria\n var upsertCriteria = {\n name: publishParams.name,\n claimId: publishResults.claim_id\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n file = _ref2[0],\n claim = _ref2[1];\n\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n }).then(function () {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n }).catch(function (error) {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable: function claimNameIsAvailable(name) {\n var claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim.findAll({\n attributes: ['address'],\n where: {\n name: name,\n address: _defineProperty({}, Op.or, claimAddresses)\n }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n }).catch(function (error) {\n throw error;\n });\n },\n checkChannelAvailability: function checkChannelAvailability(name) {\n return db.Channel.findAll({\n where: { channelName: name }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n }).catch(function (error) {\n throw error;\n });\n }\n};\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"fs\");\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar db = __webpack_require__(5);\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n authenticateUser: function authenticateUser(channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName: null,\n channelClaimId: null\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName: user.channelName,\n channelClaimId: user.channelClaimId\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials: function authenticateChannelCredentials(channelName, channelId, userPassword) {\n return new Promise(function (resolve, reject) {\n // hoisted variables\n var channelData = void 0;\n // build the params for finding the channel\n var channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel.findOne({\n where: channelFindParams\n }).then(function (channel) {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) }\n });\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n }).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims: function returnPaginatedChannelClaims(channelName, longChannelClaimId, claims, page) {\n var totalPages = module.exports.determineTotalPages(claims);\n var paginationPage = module.exports.getPageFromQuery(page);\n var viewData = {\n channelName: channelName,\n longChannelClaimId: longChannelClaimId,\n claims: module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage: module.exports.determinePreviousPage(paginationPage),\n currentPage: paginationPage,\n nextPage: module.exports.determineNextPage(totalPages, paginationPage),\n totalPages: totalPages,\n totalResults: module.exports.determineTotalClaims(claims)\n };\n return viewData;\n },\n getPageFromQuery: function getPageFromQuery(page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims: function extractPageFromClaims(claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n var claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n var claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n var pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages: function determineTotalPages(claims) {\n if (!claims) {\n return 0;\n } else {\n var totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n var fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n var remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage: function determinePreviousPage(currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage: function determineNextPage(totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims: function determineTotalClaims(claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n }\n};\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(3),\n host = _require.details;\n\nvar handlePageRender = __webpack_require__(37);\n\nmodule.exports = function (app) {\n // route for the home page\n app.get('/', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', function (req, res) {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', function (req, res) {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', function (req, res) {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', function (_ref, res) {\n var params = _ref.params;\n\n var claimId = params.claimId;\n var name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host: host, claimId: claimId, name: name });\n });\n};\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data\n });\n default:\n return state;\n }\n};\n\nvar _publish_action_types = __webpack_require__(40);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nvar _publish_channel_select_states = __webpack_require__(91);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar _require = __webpack_require__(3),\n publishing = _require.publishing;\n\nvar initialState = {\n disabled: publishing.disabled,\n disabledMessage: publishing.disabledMessage,\n publishInChannel: false,\n selectedChannel: _publish_channel_select_states.LOGIN,\n showMetadataInputs: false,\n status: {\n status: null,\n message: null\n },\n error: {\n file: null,\n url: null,\n channel: null,\n publishSubmit: null\n },\n file: null,\n claim: '',\n metadata: {\n title: '',\n description: '',\n license: '',\n nsfw: false\n },\n thumbnail: null\n};\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOGIN = exports.LOGIN = 'Existing';\nvar CREATE = exports.CREATE = 'New';\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data\n });\n default:\n return state;\n }\n};\n\nvar _channel_action_types = __webpack_require__(41);\n\nvar actions = _interopRequireWildcard(_channel_action_types);\n\nfunction _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; } }\n\nvar initialState = {\n loggedInChannel: {\n name: null,\n shortId: null,\n longId: null\n }\n};\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data\n })\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id: action.data.requestId\n })\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n key: action.data.key\n }))\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n name: action.data.name,\n claimId: action.data.claimId,\n shortId: action.data.shortId,\n claimData: action.data.claimData\n }))\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.id, {\n name: action.data.name,\n longId: action.data.longId,\n shortId: action.data.shortId,\n claimsData: action.data.claimsData\n }))\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.channelListId, Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData\n })))\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data\n })\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error: action.data,\n status: _asset_display_states.ERROR\n })\n });\n default:\n return state;\n }\n};\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _asset_display_states = __webpack_require__(42);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar initialState = {\n request: {\n error: null,\n type: null,\n id: null\n },\n requestList: {},\n channelList: {},\n assetList: {},\n displayAsset: {\n error: null,\n status: _asset_display_states.LOCAL_CHECK\n }\n};\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n default:\n return state;\n }\n};\n\nvar siteConfig = __webpack_require__(3);\n\nvar googleAnalyticsId = siteConfig.analytics.googleId,\n _siteConfig$assetDefa = siteConfig.assetDefaults,\n defaultThumbnail = _siteConfig$assetDefa.thumbnail,\n defaultDescription = _siteConfig$assetDefa.description,\n _siteConfig$details = siteConfig.details,\n description = _siteConfig$details.description,\n host = _siteConfig$details.host,\n title = _siteConfig$details.title,\n twitter = _siteConfig$details.twitter;\n\n\nvar initialState = {\n description: description,\n googleAnalyticsId: googleAnalyticsId,\n host: host,\n title: title,\n twitter: twitter,\n defaultDescription: defaultDescription,\n defaultThumbnail: defaultThumbnail\n};\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-ga\");\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cross-fetch/polyfill\");\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AboutPage = function (_React$Component) {\n _inherits(AboutPage, _React$Component);\n\n function AboutPage() {\n _classCallCheck(this, AboutPage);\n\n return _possibleConstructorReturn(this, (AboutPage.__proto__ || Object.getPrototypeOf(AboutPage)).apply(this, arguments));\n }\n\n _createClass(AboutPage, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'About', pageUri: 'about' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n { className: 'pull-quote' },\n 'Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/spee_ch' },\n 'TWITTER'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch' },\n 'GITHUB'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://discord.gg/YjYbwhS' },\n 'DISCORD CHANNEL'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch/blob/master/README.md' },\n 'DOCUMENTATION'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a media-hosting site that reads from and publishes content to the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io' },\n 'LBRY'\n ),\n ' blockchain.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io/get' },\n 'LBRY'\n ),\n ' network. This means that your images are stored in multiple locations without a single point of failure.'\n ),\n _react2.default.createElement(\n 'h3',\n null,\n 'Contribute'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you have an idea for your own spee.ch-like site on top of LBRY, fork our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch' },\n 'github repo'\n ),\n ' and go to town!'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you want to improve spee.ch, join our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS' },\n 'discord channel'\n ),\n ' or solve one of our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch/issues' },\n 'github issues'\n ),\n '.'\n )\n )\n )\n )\n );\n }\n }]);\n\n return AboutPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = AboutPage;\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _Logo = __webpack_require__(48);\n\nvar _Logo2 = _interopRequireDefault(_Logo);\n\nvar _NavBarChannelOptionsDropdown = __webpack_require__(49);\n\nvar _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar VIEW = 'VIEW';\nvar LOGOUT = 'LOGOUT';\n\nvar NavBar = function (_React$Component) {\n _inherits(NavBar, _React$Component);\n\n function NavBar(props) {\n _classCallCheck(this, NavBar);\n\n var _this = _possibleConstructorReturn(this, (NavBar.__proto__ || Object.getPrototypeOf(NavBar)).call(this, props));\n\n _this.checkForLoggedInUser = _this.checkForLoggedInUser.bind(_this);\n _this.logoutUser = _this.logoutUser.bind(_this);\n _this.handleSelection = _this.handleSelection.bind(_this);\n return _this;\n }\n\n _createClass(NavBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n }, {\n key: 'checkForLoggedInUser',\n value: function checkForLoggedInUser() {\n var _this2 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/user', params).then(function (_ref) {\n var data = _ref.data;\n\n _this2.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n }).catch(function (error) {\n console.log('/user error:', error.message);\n });\n }\n }, {\n key: 'logoutUser',\n value: function logoutUser() {\n var _this3 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/logout', params).then(function () {\n _this3.props.onChannelLogout();\n }).catch(function (error) {\n console.log('/logout error', error.message);\n });\n }\n }, {\n key: 'handleSelection',\n value: function handleSelection(event) {\n var value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push('/' + this.props.channelName + ':' + this.props.channelLongId);\n break;\n default:\n break;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var siteDescription = this.props.siteDescription;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--wide nav-bar' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--short flex-container--row flex-container--space-between-center' },\n _react2.default.createElement(_Logo2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--center' },\n _react2.default.createElement(\n 'span',\n { className: 'nav-bar-tagline' },\n siteDescription\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--right' },\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/', exact: true },\n 'Publish'\n ),\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/about' },\n 'About'\n ),\n this.props.channelName ? _react2.default.createElement(_NavBarChannelOptionsDropdown2.default, {\n channelName: this.props.channelName,\n handleSelection: this.handleSelection,\n defaultSelection: this.props.channelName,\n VIEW: VIEW,\n LOGOUT: LOGOUT\n }) : _react2.default.createElement(\n _reactRouterDom.NavLink,\n { id: 'nav-bar-login-link', className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/login' },\n 'Channel'\n )\n )\n )\n );\n }\n }]);\n\n return NavBar;\n}(_react2.default.Component);\n\nexports.default = (0, _reactRouterDom.withRouter)(NavBar);\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _pageTitle = __webpack_require__(23);\n\nvar _metaTags = __webpack_require__(22);\n\nvar _canonicalLink = __webpack_require__(20);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SEO = function (_React$Component) {\n _inherits(SEO, _React$Component);\n\n function SEO() {\n _classCallCheck(this, SEO);\n\n return _possibleConstructorReturn(this, (SEO.__proto__ || Object.getPrototypeOf(SEO)).apply(this, arguments));\n }\n\n _createClass(SEO, [{\n key: 'render',\n value: function render() {\n // props from state\n var _props = this.props,\n defaultDescription = _props.defaultDescription,\n defaultThumbnail = _props.defaultThumbnail,\n siteDescription = _props.siteDescription,\n siteHost = _props.siteHost,\n siteTitle = _props.siteTitle,\n siteTwitter = _props.siteTwitter;\n // props from parent\n\n var _props2 = this.props,\n asset = _props2.asset,\n channel = _props2.channel,\n pageUri = _props2.pageUri;\n var pageTitle = this.props.pageTitle;\n // create page title, tags, and canonical link\n\n pageTitle = (0, _pageTitle.createPageTitle)(siteTitle, pageTitle);\n var metaTags = (0, _metaTags.createMetaTags)(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n var canonicalLink = (0, _canonicalLink.createCanonicalLink)(asset, channel, pageUri, siteHost);\n // render results\n return _react2.default.createElement(_reactHelmet2.default, {\n title: pageTitle,\n meta: metaTags,\n link: [{ rel: 'canonical', href: canonicalLink }]\n });\n }\n }]);\n\n return SEO;\n}(_react2.default.Component);\n\n;\n\nSEO.propTypes = {\n pageTitle: _propTypes2.default.string,\n pageUri: _propTypes2.default.string,\n channel: _propTypes2.default.object,\n asset: _propTypes2.default.object\n};\n\nexports.default = SEO;\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(101);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel;\n\n return {\n loggedInChannelName: channel.loggedInChannel.name\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelLoginForm = __webpack_require__(102);\n\nvar _ChannelLoginForm2 = _interopRequireDefault(_ChannelLoginForm);\n\nvar _ChannelCreateForm = __webpack_require__(104);\n\nvar _ChannelCreateForm2 = _interopRequireDefault(_ChannelCreateForm);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar LoginPage = function (_React$Component) {\n _inherits(LoginPage, _React$Component);\n\n function LoginPage() {\n _classCallCheck(this, LoginPage);\n\n return _possibleConstructorReturn(this, (LoginPage.__proto__ || Object.getPrototypeOf(LoginPage)).apply(this, arguments));\n }\n\n _createClass(LoginPage, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push('/');\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'Login', pageUri: 'login' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you\\'re ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: '/@catalonia2017:43dcf47163caa21d8404d9fe9b30f78ef3e146a8' },\n 'documenting important events'\n ),\n ', or making a public repository for ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: '/@catGifs' },\n 'cat gifs'\n ),\n ' (password: \\'1234\\'), try creating a channel for it!'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'h3',\n { className: 'h3--no-bottom' },\n 'Log in to an existing channel:'\n ),\n _react2.default.createElement(_ChannelLoginForm2.default, null),\n _react2.default.createElement(\n 'h3',\n { className: 'h3--no-bottom' },\n 'Create a brand new channel:'\n ),\n _react2.default.createElement(_ChannelCreateForm2.default, null)\n )\n )\n )\n );\n }\n }]);\n\n return LoginPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = (0, _reactRouterDom.withRouter)(LoginPage);\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _channel = __webpack_require__(24);\n\nvar _view = __webpack_require__(103);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(25);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 103 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelLoginForm = function (_React$Component) {\n _inherits(ChannelLoginForm, _React$Component);\n\n function ChannelLoginForm(props) {\n _classCallCheck(this, ChannelLoginForm);\n\n var _this = _possibleConstructorReturn(this, (ChannelLoginForm.__proto__ || Object.getPrototypeOf(ChannelLoginForm)).call(this, props));\n\n _this.state = {\n error: null,\n name: '',\n password: ''\n };\n _this.handleInput = _this.handleInput.bind(_this);\n _this.loginToChannel = _this.loginToChannel.bind(_this);\n return _this;\n }\n\n _createClass(ChannelLoginForm, [{\n key: 'handleInput',\n value: function handleInput(event) {\n var name = event.target.name;\n var value = event.target.value;\n this.setState(_defineProperty({}, name, value));\n }\n }, {\n key: 'loginToChannel',\n value: function loginToChannel(event) {\n var _this2 = this;\n\n event.preventDefault();\n var params = {\n method: 'POST',\n body: JSON.stringify({ username: this.state.name, password: this.state.password }),\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n credentials: 'include'\n };\n (0, _request2.default)('login', params).then(function (_ref) {\n var success = _ref.success,\n channelName = _ref.channelName,\n shortChannelId = _ref.shortChannelId,\n channelClaimId = _ref.channelClaimId,\n message = _ref.message;\n\n if (success) {\n _this2.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n _this2.setState({ 'error': message });\n };\n }).catch(function (error) {\n if (error.message) {\n _this2.setState({ 'error': error.message });\n } else {\n _this2.setState({ 'error': error });\n }\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'form',\n { id: 'channel-login-form' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-login-name-input' },\n 'Name:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary flex-container--row flex-container--left-bottom' },\n _react2.default.createElement(\n 'span',\n null,\n '@'\n ),\n _react2.default.createElement('input', { type: 'text', id: 'channel-login-name-input', className: 'input-text', name: 'name', placeholder: 'Your Channel Name', value: this.state.channelName, onChange: this.handleInput })\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-login-password-input' },\n 'Password:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary' },\n _react2.default.createElement('input', { type: 'password', id: 'channel-login-password-input', name: 'password', className: 'input-text', placeholder: '', value: this.state.channelPassword, onChange: this.handleInput })\n )\n )\n ),\n this.state.error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.state.error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Enter the name and password for your channel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary', onClick: this.loginToChannel },\n 'Authenticate'\n )\n )\n );\n }\n }]);\n\n return ChannelLoginForm;\n}(_react2.default.Component);\n\nexports.default = ChannelLoginForm;\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _channel = __webpack_require__(24);\n\nvar _view = __webpack_require__(105);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(25);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(26);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelCreateForm = function (_React$Component) {\n _inherits(ChannelCreateForm, _React$Component);\n\n function ChannelCreateForm(props) {\n _classCallCheck(this, ChannelCreateForm);\n\n var _this = _possibleConstructorReturn(this, (ChannelCreateForm.__proto__ || Object.getPrototypeOf(ChannelCreateForm)).call(this, props));\n\n _this.state = {\n error: null,\n channel: '',\n password: '',\n status: null\n };\n _this.handleChannelInput = _this.handleChannelInput.bind(_this);\n _this.handleInput = _this.handleInput.bind(_this);\n _this.createChannel = _this.createChannel.bind(_this);\n return _this;\n }\n\n _createClass(ChannelCreateForm, [{\n key: 'cleanseChannelInput',\n value: function cleanseChannelInput(input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n }, {\n key: 'handleChannelInput',\n value: function handleChannelInput(event) {\n var value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({ channel: value });\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({ error: 'Please enter a channel name' });\n }\n }\n }, {\n key: 'handleInput',\n value: function handleInput(event) {\n var name = event.target.name;\n var value = event.target.value;\n this.setState(_defineProperty({}, name, value));\n }\n }, {\n key: 'updateIsChannelAvailable',\n value: function updateIsChannelAvailable(channel) {\n var _this2 = this;\n\n var channelWithAtSymbol = '@' + channel;\n (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol).then(function () {\n _this2.setState({ 'error': null });\n }).catch(function (error) {\n _this2.setState({ 'error': error.message });\n });\n }\n }, {\n key: 'checkIsChannelAvailable',\n value: function checkIsChannelAvailable(channel) {\n var channelWithAtSymbol = '@' + channel;\n return (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol);\n }\n }, {\n key: 'checkIsPasswordProvided',\n value: function checkIsPasswordProvided(password) {\n return new Promise(function (resolve, reject) {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n }, {\n key: 'makePublishChannelRequest',\n value: function makePublishChannelRequest(username, password) {\n var params = {\n method: 'POST',\n body: JSON.stringify({ username: username, password: password }),\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n credentials: 'include'\n };\n return new Promise(function (resolve, reject) {\n (0, _request2.default)('/signup', params).then(function (result) {\n return resolve(result);\n }).catch(function (error) {\n reject(new Error('Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ' + error.message));\n });\n });\n }\n }, {\n key: 'createChannel',\n value: function createChannel(event) {\n var _this3 = this;\n\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password).then(function () {\n return _this3.checkIsChannelAvailable(_this3.state.channel);\n }).then(function () {\n _this3.setState({ status: 'We are publishing your new channel. Sit tight...' });\n return _this3.makePublishChannelRequest(_this3.state.channel, _this3.state.password);\n }).then(function (result) {\n _this3.setState({ status: null });\n _this3.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n }).catch(function (error) {\n if (error.message) {\n _this3.setState({ 'error': error.message, status: null });\n } else {\n _this3.setState({ 'error': error, status: null });\n };\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n !this.state.status ? _react2.default.createElement(\n 'form',\n { id: 'publish-channel-form' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'new-channel-name' },\n 'Name:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary flex-container--row flex-container--left-bottom span--relative' },\n _react2.default.createElement(\n 'span',\n null,\n '@'\n ),\n _react2.default.createElement('input', { type: 'text', name: 'channel', id: 'new-channel-name', className: 'input-text', placeholder: 'exampleChannelName', value: this.state.channel, onChange: this.handleChannelInput }),\n this.state.channel && !this.state.error && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--success span--absolute' },\n '\\u2713'\n ),\n this.state.error && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--failure span--absolute' },\n '\\u2716'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'new-channel-password' },\n 'Password:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary' },\n _react2.default.createElement('input', { type: 'password', name: 'password', id: 'new-channel-password', className: 'input-text', placeholder: '', value: this.state.password, onChange: this.handleInput })\n )\n )\n ),\n this.state.error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.state.error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Choose a name and password for your channel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary', onClick: this.createChannel },\n 'Create Channel'\n )\n )\n ) : _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n this.state.status\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 })\n )\n );\n }\n }]);\n\n return ChannelCreateForm;\n}(_react2.default.Component);\n\nexports.default = ChannelCreateForm;\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _show = __webpack_require__(7);\n\nvar _view = __webpack_require__(107);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n return {\n error: show.request.error,\n requestType: show.request.type\n };\n};\n\nvar mapDispatchToProps = {\n onHandleShowPageUri: _show.onHandleShowPageUri\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ErrorPage = __webpack_require__(27);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _ShowAssetLite = __webpack_require__(108);\n\nvar _ShowAssetLite2 = _interopRequireDefault(_ShowAssetLite);\n\nvar _ShowAssetDetails = __webpack_require__(111);\n\nvar _ShowAssetDetails2 = _interopRequireDefault(_ShowAssetDetails);\n\nvar _ShowChannel = __webpack_require__(117);\n\nvar _ShowChannel2 = _interopRequireDefault(_ShowChannel);\n\nvar _show_request_types = __webpack_require__(52);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowPage = function (_React$Component) {\n _inherits(ShowPage, _React$Component);\n\n function ShowPage() {\n _classCallCheck(this, ShowPage);\n\n return _possibleConstructorReturn(this, (ShowPage.__proto__ || Object.getPrototypeOf(ShowPage)).apply(this, arguments));\n }\n\n _createClass(ShowPage, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n error = _props.error,\n requestType = _props.requestType;\n\n if (error) {\n return _react2.default.createElement(_ErrorPage2.default, { error: error });\n }\n switch (requestType) {\n case _show_request_types.CHANNEL:\n return _react2.default.createElement(_ShowChannel2.default, null);\n case _show_request_types.ASSET_LITE:\n return _react2.default.createElement(_ShowAssetLite2.default, null);\n case _show_request_types.ASSET_DETAILS:\n return _react2.default.createElement(_ShowAssetDetails2.default, null);\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'loading...'\n );\n }\n }\n }]);\n\n return ShowPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowPage;\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(109);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select asset info\n var asset = void 0;\n var request = show.requestList[requestId] || null;\n var assetList = show.assetList;\n if (request && assetList) {\n var assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset: asset\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _AssetDisplay = __webpack_require__(53);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowLite = function (_React$Component) {\n _inherits(ShowLite, _React$Component);\n\n function ShowLite() {\n _classCallCheck(this, ShowLite);\n\n return _possibleConstructorReturn(this, (ShowLite.__proto__ || Object.getPrototypeOf(ShowLite)).apply(this, arguments));\n }\n\n _createClass(ShowLite, [{\n key: 'render',\n value: function render() {\n var asset = this.props.asset;\n\n if (asset) {\n var _asset$claimData = asset.claimData,\n name = _asset$claimData.name,\n claimId = _asset$claimData.claimId;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column flex-container--center-center show-lite-container' },\n _react2.default.createElement(_SEO2.default, { pageTitle: name, asset: asset }),\n _react2.default.createElement(_AssetDisplay2.default, null),\n _react2.default.createElement(\n _reactRouterDom.Link,\n { id: 'asset-boilerpate', className: 'link--primary fine-print', to: '/' + claimId + '/' + name },\n 'hosted via Spee.ch'\n )\n );\n }\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded flex-container--column flex-container--center-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'loading asset data...'\n )\n );\n }\n }]);\n\n return ShowLite;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowLite;\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(26);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _asset_display_states = __webpack_require__(42);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AssetDisplay = function (_React$Component) {\n _inherits(AssetDisplay, _React$Component);\n\n function AssetDisplay() {\n _classCallCheck(this, AssetDisplay);\n\n return _possibleConstructorReturn(this, (AssetDisplay.__proto__ || Object.getPrototypeOf(AssetDisplay)).apply(this, arguments));\n }\n\n _createClass(AssetDisplay, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props$asset$claimDat = this.props.asset.claimData,\n name = _props$asset$claimDat.name,\n claimId = _props$asset$claimDat.claimId;\n\n this.props.onFileRequest(name, claimId);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n status = _props.status,\n error = _props.error,\n _props$asset$claimDat2 = _props.asset.claimData,\n name = _props$asset$claimDat2.name,\n claimId = _props$asset$claimDat2.claimId,\n contentType = _props$asset$claimDat2.contentType,\n fileExt = _props$asset$claimDat2.fileExt,\n thumbnail = _props$asset$claimDat2.thumbnail;\n\n return _react2.default.createElement(\n 'div',\n { id: 'asset-display-component' },\n status === _asset_display_states.LOCAL_CHECK && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Checking to see if Spee.ch has your asset locally...'\n )\n ),\n status === _asset_display_states.UNAVAILABLE && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Sit tight, we\\'re searching the LBRY blockchain for your asset!'\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 }),\n _react2.default.createElement(\n 'p',\n null,\n 'Curious what magic is happening here? ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: 'blank', href: 'https://lbry.io/faq/what-is-lbry' },\n 'Learn more.'\n )\n )\n ),\n status === _asset_display_states.ERROR && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Unfortunately, we couldn\\'t download your asset from LBRY. You can help us out by sharing the below error message in the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS', target: '_blank' },\n 'LBRY discord'\n ),\n '.'\n ),\n _react2.default.createElement(\n 'i',\n null,\n _react2.default.createElement(\n 'p',\n { id: 'error-message' },\n error\n )\n )\n ),\n status === _asset_display_states.AVAILABLE && function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return _react2.default.createElement('img', {\n className: 'asset',\n src: '/' + claimId + '/' + name + '.' + fileExt,\n alt: name });\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset',\n src: '/' + claimId + '/' + name + '.' + fileExt,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement(\n 'video',\n { className: 'asset video', controls: true, poster: thumbnail },\n _react2.default.createElement('source', {\n src: '/' + claimId + '/' + name + '.' + fileExt\n }),\n _react2.default.createElement(\n 'p',\n null,\n 'Your browser does not support the ',\n _react2.default.createElement(\n 'code',\n null,\n 'video'\n ),\n ' element.'\n )\n );\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'Unsupported file type'\n );\n }\n }()\n );\n }\n }]);\n\n return AssetDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetDisplay;\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(112);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select asset info\n var asset = void 0;\n var request = show.requestList[requestId] || null;\n var assetList = show.assetList;\n if (request && assetList) {\n var assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset: asset\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ErrorPage = __webpack_require__(27);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _AssetTitle = __webpack_require__(113);\n\nvar _AssetTitle2 = _interopRequireDefault(_AssetTitle);\n\nvar _AssetDisplay = __webpack_require__(53);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nvar _AssetInfo = __webpack_require__(115);\n\nvar _AssetInfo2 = _interopRequireDefault(_AssetInfo);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowAssetDetails = function (_React$Component) {\n _inherits(ShowAssetDetails, _React$Component);\n\n function ShowAssetDetails() {\n _classCallCheck(this, ShowAssetDetails);\n\n return _possibleConstructorReturn(this, (ShowAssetDetails.__proto__ || Object.getPrototypeOf(ShowAssetDetails)).apply(this, arguments));\n }\n\n _createClass(ShowAssetDetails, [{\n key: 'render',\n value: function render() {\n var asset = this.props.asset;\n\n if (asset) {\n var name = asset.claimData.name;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name + ' - details', asset: asset }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_AssetTitle2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded show-details-container' },\n _react2.default.createElement(_AssetDisplay2.default, null)\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(_AssetInfo2.default, null)\n )\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading asset data...' });\n }\n }]);\n\n return ShowAssetDetails;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowAssetDetails;\n\n/***/ }),\n/* 113 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(114);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(12);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n var _selectAsset = (0, _show.selectAsset)(show),\n title = _selectAsset.claimData.title;\n\n return {\n title: title\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 114 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetTitle = function AssetTitle(_ref) {\n var title = _ref.title;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'span',\n { className: 'text--large' },\n title\n )\n );\n};\n\nexports.default = AssetTitle;\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(116);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(12);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select asset\n var asset = (0, _show.selectAsset)(show);\n // return props\n return {\n asset: asset\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 116 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AssetInfo = function (_React$Component) {\n _inherits(AssetInfo, _React$Component);\n\n function AssetInfo(props) {\n _classCallCheck(this, AssetInfo);\n\n var _this = _possibleConstructorReturn(this, (AssetInfo.__proto__ || Object.getPrototypeOf(AssetInfo)).call(this, props));\n\n _this.copyToClipboard = _this.copyToClipboard.bind(_this);\n return _this;\n }\n\n _createClass(AssetInfo, [{\n key: 'copyToClipboard',\n value: function copyToClipboard(event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({ error: 'Oops, unable to copy' });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$asset = this.props.asset,\n shortId = _props$asset.shortId,\n _props$asset$claimDat = _props$asset.claimData,\n channelName = _props$asset$claimDat.channelName,\n certificateId = _props$asset$claimDat.certificateId,\n description = _props$asset$claimDat.description,\n name = _props$asset$claimDat.name,\n claimId = _props$asset$claimDat.claimId,\n fileExt = _props$asset$claimDat.fileExt,\n contentType = _props$asset$claimDat.contentType,\n thumbnail = _props$asset$claimDat.thumbnail,\n host = _props$asset$claimDat.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n channelName && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Channel:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: '/' + channelName + ':' + certificateId },\n channelName\n )\n )\n )\n ),\n description && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n description\n )\n ),\n _react2.default.createElement(\n 'div',\n { id: 'show-share-buttons' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Share:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n {\n className: 'row row--short row--wide flex-container--row flex-container--space-between-bottom flex-container--wrap' },\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/intent/tweet?text=' + host + '/' + shortId + '/' + name },\n 'twitter'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://www.facebook.com/sharer/sharer.php?u=' + host + '/' + shortId + '/' + name },\n 'facebook'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'http://tumblr.com/widgets/share/tool?canonicalUrl=' + host + '/' + shortId + '/' + name },\n 'tumblr'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://www.reddit.com/submit?url=' + host + '/' + shortId + '/' + name + '&title=' + name },\n 'reddit'\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { id: 'show-short-link' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Link:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--short row--wide' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'div',\n { className: 'input-error', id: 'input-error-copy-short-link', hidden: 'true' },\n 'error here'\n ),\n _react2.default.createElement('input', { type: 'text', id: 'short-link', className: 'input-disabled input-text--full-width', readOnly: true,\n spellCheck: 'false',\n value: host + '/' + shortId + '/' + name + '.' + fileExt,\n onClick: this.select })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'short-link',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { id: 'show-embed-code' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Embed:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--short row--wide' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'div',\n { className: 'input-error', id: 'input-error-copy-embed-text', hidden: 'true' },\n 'error here'\n ),\n contentType === 'video/mp4' ? _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: '' }) : _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: ''\n })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'embed-text',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex-container--row flex-container--space-between-bottom' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { className: 'link--primary', to: '/' + shortId + '/' + name + '.' + fileExt },\n _react2.default.createElement(\n 'span',\n {\n className: 'text' },\n 'Direct Link'\n )\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: host + '/' + claimId + '/' + name + '.' + fileExt, download: name },\n 'Download'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://lbry.io/dmca' },\n 'Report'\n )\n )\n );\n }\n }]);\n\n return AssetInfo;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetInfo;\n\n/***/ }),\n/* 117 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(118);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select request\n var previousRequest = show.requestList[requestId] || null;\n // select channel\n var channel = void 0;\n if (previousRequest) {\n var channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel: channel\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 118 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _ErrorPage = __webpack_require__(27);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelClaimsDisplay = __webpack_require__(119);\n\nvar _ChannelClaimsDisplay2 = _interopRequireDefault(_ChannelClaimsDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowChannel = function (_React$Component) {\n _inherits(ShowChannel, _React$Component);\n\n function ShowChannel() {\n _classCallCheck(this, ShowChannel);\n\n return _possibleConstructorReturn(this, (ShowChannel.__proto__ || Object.getPrototypeOf(ShowChannel)).apply(this, arguments));\n }\n\n _createClass(ShowChannel, [{\n key: 'render',\n value: function render() {\n var channel = this.props.channel;\n\n if (channel) {\n var name = channel.name,\n longId = channel.longId,\n shortId = channel.shortId;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name, channel: channel }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(\n 'h2',\n null,\n 'channel name: ',\n name\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'full channel id: ',\n longId\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'short channel id: ',\n shortId\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_ChannelClaimsDisplay2.default, null)\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading channel data...' });\n }\n }]);\n\n return ShowChannel;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowChannel;\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _show = __webpack_require__(7);\n\nvar _view = __webpack_require__(120);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select channel key\n var request = show.requestList[show.request.id];\n var channelKey = request.key;\n // select channel claims\n var channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey: channelKey,\n channel: channel\n };\n};\n\nvar mapDispatchToProps = {\n onUpdateChannelClaims: _show.onUpdateChannelClaims\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 120 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _AssetPreview = __webpack_require__(54);\n\nvar _AssetPreview2 = _interopRequireDefault(_AssetPreview);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelClaimsDisplay = function (_React$Component) {\n _inherits(ChannelClaimsDisplay, _React$Component);\n\n function ChannelClaimsDisplay(props) {\n _classCallCheck(this, ChannelClaimsDisplay);\n\n var _this = _possibleConstructorReturn(this, (ChannelClaimsDisplay.__proto__ || Object.getPrototypeOf(ChannelClaimsDisplay)).call(this, props));\n\n _this.showNextResultsPage = _this.showNextResultsPage.bind(_this);\n _this.showPreviousResultsPage = _this.showPreviousResultsPage.bind(_this);\n return _this;\n }\n\n _createClass(ChannelClaimsDisplay, [{\n key: 'showPreviousResultsPage',\n value: function showPreviousResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n }, {\n key: 'showNextResultsPage',\n value: function showNextResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n }, {\n key: 'showNewPage',\n value: function showNewPage(page) {\n var _props = this.props,\n channelKey = _props.channelKey,\n _props$channel = _props.channel,\n name = _props$channel.name,\n longId = _props$channel.longId;\n\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$channel$claims = this.props.channel.claimsData,\n claims = _props$channel$claims.claims,\n currentPage = _props$channel$claims.currentPage,\n totalPages = _props$channel$claims.totalPages;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall' },\n claims.length > 0 ? _react2.default.createElement(\n 'div',\n null,\n claims.map(function (claim, index) {\n return _react2.default.createElement(_AssetPreview2.default, {\n claimData: claim,\n key: claim.name + '-' + index\n });\n }),\n _react2.default.createElement(\n 'div',\n null,\n currentPage > 1 && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showPreviousResultsPage },\n 'Previous Page'\n ),\n currentPage < totalPages && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showNextResultsPage },\n 'Next Page'\n )\n )\n ) : _react2.default.createElement(\n 'p',\n null,\n 'There are no claims in this channel'\n )\n );\n }\n }]);\n\n return ChannelClaimsDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = ChannelClaimsDisplay;\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetPreview = function AssetPreview(_ref) {\n var defaultThumbnail = _ref.defaultThumbnail,\n _ref$claimData = _ref.claimData,\n name = _ref$claimData.name,\n claimId = _ref$claimData.claimId,\n fileExt = _ref$claimData.fileExt,\n contentType = _ref$claimData.contentType,\n thumbnail = _ref$claimData.thumbnail;\n\n var directSourceLink = claimId + '/' + name + '.' + fileExt;\n var showUrlLink = '/' + claimId + '/' + name;\n return _react2.default.createElement(\n 'div',\n { className: 'asset-holder' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: showUrlLink },\n function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset-preview',\n src: directSourceLink,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement('img', {\n className: 'asset-preview video',\n src: thumbnail || defaultThumbnail,\n alt: name\n });\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'unsupported file type'\n );\n }\n }()\n )\n );\n};\n\nexports.default = AssetPreview;\n\n/***/ }),\n/* 122 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(123);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var _ref$site = _ref.site,\n host = _ref$site.host,\n title = _ref$site.title;\n\n return {\n host: host,\n title: title\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar FourOhForPage = function (_React$Component) {\n _inherits(FourOhForPage, _React$Component);\n\n function FourOhForPage() {\n _classCallCheck(this, FourOhForPage);\n\n return _possibleConstructorReturn(this, (FourOhForPage.__proto__ || Object.getPrototypeOf(FourOhForPage)).apply(this, arguments));\n }\n\n _createClass(FourOhForPage, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n title = _props.title,\n host = _props.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n _reactHelmet2.default,\n null,\n _react2.default.createElement(\n 'title',\n null,\n title,\n ' - 404'\n ),\n _react2.default.createElement('link', { rel: 'canonical', href: host + '/404' })\n ),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'h2',\n null,\n '404'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'That page does not exist'\n )\n )\n );\n }\n }]);\n\n return FourOhForPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = FourOhForPage;\n\n/***/ }),\n/* 124 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _require = __webpack_require__(16),\n sendGAServeEvent = _require.sendGAServeEvent;\n\nvar _require2 = __webpack_require__(125),\n determineResponseType = _require2.determineResponseType,\n flipClaimNameAndIdForBackwardsCompatibility = _require2.flipClaimNameAndIdForBackwardsCompatibility,\n logRequestData = _require2.logRequestData,\n getClaimIdAndServeAsset = _require2.getClaimIdAndServeAsset;\n\nvar lbryUri = __webpack_require__(126);\nvar handleShowRender = __webpack_require__(127);\nvar SERVE = 'SERVE';\n\nmodule.exports = function (app) {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // parse the identifier\n var isChannel = void 0,\n channelName = void 0,\n channelClaimId = void 0,\n claimId = void 0;\n try {\n var _lbryUri$parseIdentif = lbryUri.parseIdentifier(params.identifier);\n\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n if (!isChannel) {\n var _flipClaimNameAndIdFo = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n\n var _flipClaimNameAndIdFo2 = _slicedToArray(_flipClaimNameAndIdFo, 2);\n\n claimId = _flipClaimNameAndIdFo2[0];\n claimName = _flipClaimNameAndIdFo2[1];\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie2 = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie2.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim2 = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim2.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(36),\n getClaimId = _require.getClaimId,\n getLocalFileRecord = _require.getLocalFileRecord;\n\nvar _require2 = __webpack_require__(35),\n handleErrorResponse = _require2.handleErrorResponse;\n\nvar SERVE = 'SERVE';\nvar SHOW = 'SHOW';\nvar NO_FILE = 'NO_FILE';\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml(_ref) {\n var accept = _ref.accept;\n\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser(headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset(_ref2) {\n var accept = _ref2.accept,\n range = _ref2.range;\n\n var imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n var videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId(claimId) {\n return claimId.length === 40 && !/[^A-Za-z0-9]/g.test(claimId);\n};\n\nfunction isValidShortId(claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId(input) {\n return isValidClaimId(input) || isValidShortId(input);\n};\n\nfunction serveAssetToClient(claimId, name, res) {\n return getLocalFileRecord(claimId, name).then(function (fileRecord) {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect('/api/claim/get/' + name + '/' + claimId);\n }\n // serve the file\n var filePath = fileRecord.filePath,\n fileType = fileRecord.fileType;\n\n logger.verbose('serving file: ' + filePath);\n var sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type': fileType || 'image/jpeg'\n }\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n }).catch(function (error) {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset: function getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (fullClaimId) {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'no claim id could be found' });\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'no channel id could be found' });\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n }).catch(function (error) {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType: function determineResponseType(hasFileExtension, headers) {\n var responseType = void 0;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) {\n // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) {\n // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility: function flipClaimNameAndIdForBackwardsCompatibility(identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n var tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData: function logRequestData(responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n }\n};\n\n/***/ }),\n/* 126 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n logger.debug('parsing identifier:', identifier);\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex.exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n logger.debug(proto + ', ' + value + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!value) {\n throw new Error('Check your url. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Invalid characters in channel name: ' + nameBadChars.join(', ') + '.');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId,\n claimId: claimId\n };\n },\n parseClaim: function parseClaim(claim) {\n logger.debug('parsing name:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n modifierSeperator = _componentsRegex$exec4[2],\n modifier = _componentsRegex$exec4[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Invalid characters in claim name: ' + nameBadChars.join(', ') + '.');\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No file extension provided after separator ' + modifierSeperator + '.');\n }\n if (modifierSeperator !== '.') {\n throw new Error('The ' + modifierSeperator + ' modifier is not supported in the claim name');\n }\n }\n // return results\n return {\n claimName: claimName\n };\n },\n parseModifier: function parseModifier(claim) {\n logger.debug('parsing modifier:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec5 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec6 = _slicedToArray(_componentsRegex$exec5, 4),\n proto = _componentsRegex$exec6[0],\n claimName = _componentsRegex$exec6[1],\n modifierSeperator = _componentsRegex$exec6[2],\n modifier = _componentsRegex$exec6[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n // Validate and process modifier\n var hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension: hasFileExtension\n };\n }\n};\n\n/***/ }),\n/* 127 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(38);\n\nvar _redux = __webpack_require__(17);\n\nvar _index = __webpack_require__(39);\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _index3 = __webpack_require__(18);\n\nvar _index4 = _interopRequireDefault(_index3);\n\nvar _app = __webpack_require__(43);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(55);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reduxSaga = __webpack_require__(128);\n\nvar _reduxSaga2 = _interopRequireDefault(_reduxSaga);\n\nvar _effects = __webpack_require__(14);\n\nvar _show_uri = __webpack_require__(129);\n\nvar _show = __webpack_require__(7);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar returnSagaWithParams = function returnSagaWithParams(saga, params) {\n return (/*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return (0, _effects.call)(saga, params);\n\n case 2:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n })\n );\n};\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create and apply middleware\n var sagaMiddleware = (0, _reduxSaga2.default)();\n var middleware = (0, _redux.applyMiddleware)(sagaMiddleware);\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_index2.default, middleware);\n\n // create saga\n var action = (0, _show.onHandleShowPageUri)(req.params);\n var saga = returnSagaWithParams(_show_uri.handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware.run(saga).done.then(function () {\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _index4.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n var preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send((0, _renderFullPage2.default)(helmet, html, preloadedState));\n });\n};\n\n/***/ }),\n/* 128 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga\");\n\n/***/ }),\n/* 129 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleShowPageUri = handleShowPageUri;\nexports.watchHandleShowPageUri = watchHandleShowPageUri;\n\nvar _effects = __webpack_require__(14);\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _show_asset = __webpack_require__(130);\n\nvar _show_channel = __webpack_require__(132);\n\nvar _lbryUri = __webpack_require__(21);\n\nvar _lbryUri2 = _interopRequireDefault(_lbryUri);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateIdentifierAndClaim),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateClaimOnly),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(handleShowPageUri),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchHandleShowPageUri);\n\nfunction parseAndUpdateIdentifierAndClaim(modifier, claim) {\n var isChannel, channelName, channelClaimId, claimId, claimName, extension, _lbryUri$parseIdentif, _lbryUri$parseClaim;\n\n return regeneratorRuntime.wrap(function parseAndUpdateIdentifierAndClaim$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n isChannel = void 0, channelName = void 0, channelClaimId = void 0, claimId = void 0, claimName = void 0, extension = void 0;\n _context.prev = 1;\n _lbryUri$parseIdentif = _lbryUri2.default.parseIdentifier(modifier);\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n _lbryUri$parseClaim = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim.claimName;\n extension = _lbryUri$parseClaim.extension;\n _context.next = 17;\n break;\n\n case 12:\n _context.prev = 12;\n _context.t0 = _context['catch'](1);\n _context.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 16:\n return _context.abrupt('return', _context.sent);\n\n case 17:\n if (!isChannel) {\n _context.next = 21;\n break;\n }\n\n _context.next = 20;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, channelName, channelClaimId, extension));\n\n case 20:\n return _context.abrupt('return', _context.sent);\n\n case 21:\n ;\n _context.next = 24;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, claimId, null, null, extension));\n\n case 24:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[1, 12]]);\n}\nfunction parseAndUpdateClaimOnly(claim) {\n var isChannel, channelName, channelClaimId, _lbryUri$parseIdentif2, claimName, extension, _lbryUri$parseClaim2;\n\n return regeneratorRuntime.wrap(function parseAndUpdateClaimOnly$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n isChannel = void 0, channelName = void 0, channelClaimId = void 0;\n _context2.prev = 1;\n _lbryUri$parseIdentif2 = _lbryUri2.default.parseIdentifier(claim);\n isChannel = _lbryUri$parseIdentif2.isChannel;\n channelName = _lbryUri$parseIdentif2.channelName;\n channelClaimId = _lbryUri$parseIdentif2.channelClaimId;\n _context2.next = 13;\n break;\n\n case 8:\n _context2.prev = 8;\n _context2.t0 = _context2['catch'](1);\n _context2.next = 12;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t0.message));\n\n case 12:\n return _context2.abrupt('return', _context2.sent);\n\n case 13:\n if (!isChannel) {\n _context2.next = 17;\n break;\n }\n\n _context2.next = 16;\n return (0, _effects.call)(_show_channel.newChannelRequest, (0, _show.onNewChannelRequest)(channelName, channelClaimId));\n\n case 16:\n return _context2.abrupt('return', _context2.sent);\n\n case 17:\n // if not for a channel, parse the claim request\n claimName = void 0, extension = void 0;\n _context2.prev = 18;\n _lbryUri$parseClaim2 = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim2.claimName;\n extension = _lbryUri$parseClaim2.extension;\n _context2.next = 29;\n break;\n\n case 24:\n _context2.prev = 24;\n _context2.t1 = _context2['catch'](18);\n _context2.next = 28;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t1.message));\n\n case 28:\n return _context2.abrupt('return', _context2.sent);\n\n case 29:\n _context2.next = 31;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, null, null, extension));\n\n case 31:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this, [[1, 8], [18, 24]]);\n}\n\nfunction handleShowPageUri(action) {\n var _action$data, identifier, claim;\n\n return regeneratorRuntime.wrap(function handleShowPageUri$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data = action.data, identifier = _action$data.identifier, claim = _action$data.claim;\n\n if (!identifier) {\n _context3.next = 5;\n break;\n }\n\n _context3.next = 4;\n return (0, _effects.call)(parseAndUpdateIdentifierAndClaim, identifier, claim);\n\n case 4:\n return _context3.abrupt('return', _context3.sent);\n\n case 5:\n _context3.next = 7;\n return (0, _effects.call)(parseAndUpdateClaimOnly, claim);\n\n case 7:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this);\n};\n\nfunction watchHandleShowPageUri() {\n return regeneratorRuntime.wrap(function watchHandleShowPageUri$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.HANDLE_SHOW_URI, handleShowPageUri);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n};\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newAssetRequest = newAssetRequest;\nexports.watchNewAssetRequest = watchNewAssetRequest;\n\nvar _effects = __webpack_require__(14);\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _assetApi = __webpack_require__(131);\n\nvar _show2 = __webpack_require__(12);\n\nvar _site = __webpack_require__(56);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newAssetRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewAssetRequest);\n\nfunction newAssetRequest(action) {\n var _action$data, requestType, requestId, name, modifier, state, host, longId, _ref, assetKey, shortId, _ref2, claimData, _ref3;\n\n return regeneratorRuntime.wrap(function newAssetRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, name = _action$data.name, modifier = _action$data.modifier;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get long id && add request to request list\n longId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_assetApi.getLongClaimId, host, name, modifier);\n\n case 15:\n _ref = _context.sent;\n longId = _ref.data;\n _context.next = 24;\n break;\n\n case 19:\n _context.prev = 19;\n _context.t0 = _context['catch'](12);\n _context.next = 23;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 23:\n return _context.abrupt('return', _context.sent);\n\n case 24:\n assetKey = 'a#' + name + '#' + longId;\n _context.next = 27;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, assetKey));\n\n case 27:\n if (!state.assetList[assetKey]) {\n _context.next = 29;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 29:\n // get short Id\n shortId = void 0;\n _context.prev = 30;\n _context.next = 33;\n return (0, _effects.call)(_assetApi.getShortId, host, name, longId);\n\n case 33:\n _ref2 = _context.sent;\n shortId = _ref2.data;\n _context.next = 42;\n break;\n\n case 37:\n _context.prev = 37;\n _context.t1 = _context['catch'](30);\n _context.next = 41;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 41:\n return _context.abrupt('return', _context.sent);\n\n case 42:\n // get asset claim data\n claimData = void 0;\n _context.prev = 43;\n _context.next = 46;\n return (0, _effects.call)(_assetApi.getClaimData, host, name, longId);\n\n case 46:\n _ref3 = _context.sent;\n claimData = _ref3.data;\n _context.next = 55;\n break;\n\n case 50:\n _context.prev = 50;\n _context.t2 = _context['catch'](43);\n _context.next = 54;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t2.message));\n\n case 54:\n return _context.abrupt('return', _context.sent);\n\n case 55:\n _context.next = 57;\n return (0, _effects.put)((0, _show.addAssetToAssetList)(assetKey, null, name, longId, shortId, claimData));\n\n case 57:\n _context.next = 59;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 59:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 19], [30, 37], [43, 50]]);\n};\n\nfunction watchNewAssetRequest() {\n return regeneratorRuntime.wrap(function watchNewAssetRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.ASSET_REQUEST_NEW, newAssetRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\n/***/ }),\n/* 131 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getLongClaimId = getLongClaimId;\nexports.getShortId = getShortId;\nexports.getClaimData = getClaimData;\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getLongClaimId(host, name, modifier) {\n var body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n var params = {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body)\n };\n // create url\n var url = host + '/api/claim/long-id';\n // return the request promise\n return (0, _request2.default)(url, params);\n};\n\nfunction getShortId(host, name, claimId) {\n var url = host + '/api/claim/short-id/' + claimId + '/' + name;\n return (0, _request2.default)(url);\n};\n\nfunction getClaimData(host, name, claimId) {\n var url = host + '/api/claim/data/' + name + '/' + claimId;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 132 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newChannelRequest = newChannelRequest;\nexports.watchNewChannelRequest = watchNewChannelRequest;\nexports.watchUpdateChannelClaims = watchUpdateChannelClaims;\n\nvar _effects = __webpack_require__(14);\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _channelApi = __webpack_require__(133);\n\nvar _show2 = __webpack_require__(12);\n\nvar _site = __webpack_require__(56);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newChannelRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewChannelRequest),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(getNewClaimsAndUpdateChannel),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchUpdateChannelClaims);\n\nfunction newChannelRequest(action) {\n var _action$data, requestType, requestId, channelName, channelId, state, host, longId, shortId, _ref, _ref$data, channelKey, claimsData, _ref2;\n\n return regeneratorRuntime.wrap(function newChannelRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, channelName = _action$data.channelName, channelId = _action$data.channelId;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get channel long id\n longId = void 0, shortId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_channelApi.getChannelData, host, channelName, channelId);\n\n case 15:\n _ref = _context.sent;\n _ref$data = _ref.data;\n longId = _ref$data.longChannelClaimId;\n shortId = _ref$data.shortChannelClaimId;\n _context.next = 26;\n break;\n\n case 21:\n _context.prev = 21;\n _context.t0 = _context['catch'](12);\n _context.next = 25;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 25:\n return _context.abrupt('return', _context.sent);\n\n case 26:\n // store the request in the channel requests list\n channelKey = 'c#' + channelName + '#' + longId;\n _context.next = 29;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, channelKey));\n\n case 29:\n if (!state.channelList[channelKey]) {\n _context.next = 31;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 31:\n // get channel claims data\n claimsData = void 0;\n _context.prev = 32;\n _context.next = 35;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, channelName, 1);\n\n case 35:\n _ref2 = _context.sent;\n claimsData = _ref2.data;\n _context.next = 44;\n break;\n\n case 39:\n _context.prev = 39;\n _context.t1 = _context['catch'](32);\n _context.next = 43;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 43:\n return _context.abrupt('return', _context.sent);\n\n case 44:\n _context.next = 46;\n return (0, _effects.put)((0, _show.addNewChannelToChannelList)(channelKey, channelName, shortId, longId, claimsData));\n\n case 46:\n _context.next = 48;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 48:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 21], [32, 39]]);\n}\n\nfunction watchNewChannelRequest() {\n return regeneratorRuntime.wrap(function watchNewChannelRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\nfunction getNewClaimsAndUpdateChannel(action) {\n var _action$data2, channelKey, name, longId, page, host, claimsData, _ref3;\n\n return regeneratorRuntime.wrap(function getNewClaimsAndUpdateChannel$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data2 = action.data, channelKey = _action$data2.channelKey, name = _action$data2.name, longId = _action$data2.longId, page = _action$data2.page;\n _context3.next = 3;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 3:\n host = _context3.sent;\n claimsData = void 0;\n _context3.prev = 5;\n _context3.next = 8;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, name, page);\n\n case 8:\n _ref3 = _context3.sent;\n claimsData = _ref3.data;\n _context3.next = 17;\n break;\n\n case 12:\n _context3.prev = 12;\n _context3.t0 = _context3['catch'](5);\n _context3.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context3.t0.message));\n\n case 16:\n return _context3.abrupt('return', _context3.sent);\n\n case 17:\n _context3.next = 19;\n return (0, _effects.put)((0, _show.updateChannelClaims)(channelKey, claimsData));\n\n case 19:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this, [[5, 12]]);\n}\n\nfunction watchUpdateChannelClaims() {\n return regeneratorRuntime.wrap(function watchUpdateChannelClaims$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n}\n\n/***/ }),\n/* 133 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getChannelData = getChannelData;\nexports.getChannelClaims = getChannelClaims;\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getChannelData(host, id, name) {\n if (!id) id = 'none';\n var url = host + '/api/channel/data/' + name + '/' + id;\n return (0, _request2.default)(url);\n};\n\nfunction getChannelClaims(host, longId, name, page) {\n if (!page) page = 1;\n var url = host + '/api/channel/claims/' + name + '/' + longId + '/' + page;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 134 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar handlePageRender = __webpack_require__(37);\n\nmodule.exports = function (app) {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', function (req, res) {\n // send response\n handlePageRender(req, res);\n });\n};\n\n/***/ }),\n/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(136),\n logLevel = _require.logLevel;\n\nmodule.exports = function (winston) {\n // configure\n winston.configure({\n transports: [new winston.transports.Console({\n level: logLevel,\n timestamp: false,\n colorize: true,\n prettyPrint: true,\n handleExceptions: true,\n humanReadableUnhandledException: true\n })]\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n/***/ }),\n/* 136 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar loggerConfig = {\n logLevel: 'debug' // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n/***/ }),\n/* 137 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar winstonSlackWebHook = __webpack_require__(138).SlackWebHook;\nvar slackConfig = __webpack_require__(30);\n\nmodule.exports = function (winston) {\n var slackWebHook = slackConfig.slackWebHook,\n slackErrorChannel = slackConfig.slackErrorChannel,\n slackInfoChannel = slackConfig.slackInfoChannel;\n\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-errors-transport',\n level: 'warn',\n webhookUrl: slackWebHook,\n channel: slackErrorChannel,\n username: 'spee.ch',\n iconEmoji: ':face_with_head_bandage:'\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-info-transport',\n level: 'info',\n webhookUrl: slackWebHook,\n channel: slackInfoChannel,\n username: 'spee.ch',\n iconEmoji: ':nerd_face:'\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n/***/ }),\n/* 138 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston-slack-webhook\");\n\n/***/ }),\n/* 139 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ActiveStatusBar = __webpack_require__(50);\n\nvar _ActiveStatusBar2 = _interopRequireDefault(_ActiveStatusBar);\n\nvar _AssetPreview = __webpack_require__(54);\n\nvar _AssetPreview2 = _interopRequireDefault(_AssetPreview);\n\nvar _ExpandingTextArea = __webpack_require__(140);\n\nvar _ExpandingTextArea2 = _interopRequireDefault(_ExpandingTextArea);\n\nvar _GAListener = __webpack_require__(18);\n\nvar _GAListener2 = _interopRequireDefault(_GAListener);\n\nvar _InactiveStatusBar = __webpack_require__(51);\n\nvar _InactiveStatusBar2 = _interopRequireDefault(_InactiveStatusBar);\n\nvar _Logo = __webpack_require__(48);\n\nvar _Logo2 = _interopRequireDefault(_Logo);\n\nvar _NavBarChannelOptionsDropdown = __webpack_require__(49);\n\nvar _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown);\n\nvar _ProgressBar = __webpack_require__(26);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _PublishPreview = __webpack_require__(141);\n\nvar _PublishPreview2 = _interopRequireDefault(_PublishPreview);\n\nvar _PublishUrlMiddleDisplay = __webpack_require__(142);\n\nvar _PublishUrlMiddleDisplay2 = _interopRequireDefault(_PublishUrlMiddleDisplay);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar components = {\n ActiveStatusBar: _ActiveStatusBar2.default,\n AssetPreview: _AssetPreview2.default,\n ExpandingTextArea: _ExpandingTextArea2.default,\n GAListener: _GAListener2.default,\n InactiveStatusBar: _InactiveStatusBar2.default,\n Logo: _Logo2.default,\n NavBarChannelOptionsDropdown: _NavBarChannelOptionsDropdown2.default,\n ProgressBar: _ProgressBar2.default,\n PublishPreview: _PublishPreview2.default,\n PublishUrlMiddleDisplay: _PublishUrlMiddleDisplay2.default,\n SEO: _SEO2.default\n};\n\nexports.default = components;\n\n/***/ }),\n/* 140 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ExpandingTextarea = function (_Component) {\n _inherits(ExpandingTextarea, _Component);\n\n function ExpandingTextarea(props) {\n _classCallCheck(this, ExpandingTextarea);\n\n var _this = _possibleConstructorReturn(this, (ExpandingTextarea.__proto__ || Object.getPrototypeOf(ExpandingTextarea)).call(this, props));\n\n _this._handleChange = _this._handleChange.bind(_this);\n return _this;\n }\n\n _createClass(ExpandingTextarea, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.adjustTextarea({});\n }\n }, {\n key: '_handleChange',\n value: function _handleChange(event) {\n var onChange = this.props.onChange;\n\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n }, {\n key: 'adjustTextarea',\n value: function adjustTextarea(_ref) {\n var _ref$target = _ref.target,\n target = _ref$target === undefined ? this.el : _ref$target;\n\n target.style.height = 0;\n target.style.height = target.scrollHeight + 'px';\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var rest = _objectWithoutProperties(this.props, []);\n\n return _react2.default.createElement('textarea', _extends({}, rest, {\n ref: function ref(x) {\n return _this2.el = x;\n },\n onChange: this._handleChange\n }));\n }\n }]);\n\n return ExpandingTextarea;\n}(_react.Component);\n\nExpandingTextarea.propTypes = {\n onChange: _propTypes2.default.func\n};\n\nexports.default = ExpandingTextarea;\n\n/***/ }),\n/* 141 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishPreview = function (_React$Component) {\n _inherits(PublishPreview, _React$Component);\n\n function PublishPreview(props) {\n _classCallCheck(this, PublishPreview);\n\n var _this = _possibleConstructorReturn(this, (PublishPreview.__proto__ || Object.getPrototypeOf(PublishPreview)).call(this, props));\n\n _this.state = {\n imgSource: '',\n defaultThumbnail: '/assets/img/video_thumb_default.png'\n };\n return _this;\n }\n\n _createClass(PublishPreview, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.setPreviewImageSource(this.props.file);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({ imgSource: this.state.defaultThumbnail });\n }\n }\n }\n }, {\n key: 'setPreviewImageSourceFromFile',\n value: function setPreviewImageSourceFromFile(file) {\n var _this2 = this;\n\n var previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = function () {\n _this2.setState({ imgSource: previewReader.result });\n };\n }\n }, {\n key: 'setPreviewImageSource',\n value: function setPreviewImageSource(file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({ imgSource: this.state.defaultThumbnail });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement('img', {\n id: 'dropzone-preview',\n src: this.state.imgSource,\n className: this.props.dimPreview ? 'dim' : '',\n alt: 'publish preview'\n });\n }\n }]);\n\n return PublishPreview;\n}(_react2.default.Component);\n\n;\n\nPublishPreview.propTypes = {\n dimPreview: _propTypes2.default.bool.isRequired,\n file: _propTypes2.default.object.isRequired,\n thumbnail: _propTypes2.default.object\n};\n\nexports.default = PublishPreview;\n\n/***/ }),\n/* 142 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction UrlMiddle(_ref) {\n var publishInChannel = _ref.publishInChannel,\n selectedChannel = _ref.selectedChannel,\n loggedInChannelName = _ref.loggedInChannelName,\n loggedInChannelShortId = _ref.loggedInChannelShortId;\n\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return _react2.default.createElement(\n 'span',\n { id: 'url-channel', className: 'url-text--secondary' },\n loggedInChannelName,\n ':',\n loggedInChannelShortId,\n ' /'\n );\n }\n return _react2.default.createElement(\n 'span',\n { id: 'url-channel-placeholder', className: 'url-text--secondary tooltip' },\n '@channel',\n _react2.default.createElement(\n 'span',\n {\n className: 'tooltip-text' },\n 'Select a channel below'\n ),\n ' /'\n );\n }\n return _react2.default.createElement(\n 'span',\n { id: 'url-no-channel-placeholder', className: 'url-text--secondary tooltip' },\n 'xyz',\n _react2.default.createElement(\n 'span',\n { className: 'tooltip-text' },\n 'This will be a random id'\n ),\n ' /'\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel: _propTypes2.default.bool.isRequired,\n loggedInChannelName: _propTypes2.default.string,\n loggedInChannelShortId: _propTypes2.default.string\n};\n\nexports.default = UrlMiddle;\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// index.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 57);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8d1148ea2bf2574b28bb","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 0\n// module chunks = 0","module.exports = require(\"winston\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston\"\n// module id = 1\n// module chunks = 0","module.exports = require(\"react-redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-redux\"\n// module id = 2\n// module chunks = 0","function SiteConfig () {\n this.analytics = {\n googleId: 'default',\n };\n this.assetDefaults = {\n description: 'An asset published on Spee.ch',\n thumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',\n title : 'Spee.ch',\n };\n this.auth = {\n sessionKey: 'default',\n };\n this.componentsConfig = {\n components: {},\n containers: {},\n pages : {},\n };\n this.details = {\n description: 'Open-source, decentralized image and video sharing.',\n host : 'default',\n port : 3000,\n title : 'Spee.ch',\n twitter : '@spee_ch',\n };\n this.publishing = {\n additionalClaimAddresses: [],\n disabled : false,\n disabledMessage : 'Please check back soon.',\n primaryClaimAddress : 'default',\n thumbnailChannel : 'default',\n thumbnailChannelId : 'default',\n uploadDirectory : '/home/lbry/Uploads',\n };\n this.configure = (config) => {\n if (!config) {\n return console.log('No site config received.');\n }\n const { analytics, assetDefaults, auth, componentsConfig, details, publishing } = config;\n this.analytics = analytics;\n this.assetDefaults = assetDefaults;\n this.auth = auth;\n this.details = details;\n this.publishing = publishing;\n this.componentsConfig = componentsConfig;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/siteConfig.js","module.exports = require(\"react-router-dom\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-router-dom\"\n// module id = 4\n// module chunks = 0","const Sequelize = require('sequelize');\nconst logger = require('winston');\n\nconsole.log('exporting sequelize models');\nconst { database, username, password } = require('../../config/mysqlConfig');\nconst db = {};\n// set sequelize options\nconst sequelize = new Sequelize(database, username, password, {\n host : 'localhost',\n dialect : 'mysql',\n dialectOptions: {decimalNumbers: true}, // fix to ensure DECIMAL will not be stored as a string\n logging : false,\n pool : {\n max : 5,\n min : 0,\n idle : 10000,\n acquire: 10000,\n },\n});\n\n// establish mysql connection\nsequelize\n .authenticate()\n .then(() => {\n logger.info('Sequelize has established mysql connection successfully.');\n })\n .catch(err => {\n logger.error('Sequelize was unable to connect to the database:', err);\n });\n\n// manually add each model to the db object\nconst Certificate = require('./certificate.js');\nconst Channel = require('./channel.js');\nconst Claim = require('./claim.js');\nconst File = require('./file.js');\nconst Request = require('./request.js');\nconst User = require('./user.js');\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(modelName => {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = (Model, values, condition, tableName) => {\n return Model\n .findOne({\n where: condition,\n })\n .then(obj => {\n if (obj) { // update\n logger.debug(`updating record in db.${tableName}`);\n return obj.update(values);\n } else { // insert\n logger.debug(`creating record in db.${tableName}`);\n return Model.create(values);\n }\n })\n .catch(function (error) {\n logger.error(`${tableName}.upsert error`, error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/index.js","import 'cross-fetch/polyfill';\n\n/**\n * Parses the JSON returned by a network request\n *\n * @param {object} response A response from a network request\n *\n * @return {object} The parsed JSON from the request\n */\nfunction parseJSON (response) {\n if (response.status === 204 || response.status === 205) {\n return null;\n }\n return response.json();\n}\n\n/**\n * Parses the status returned by a network request\n *\n * @param {object} response A response from a network request\n * @param {object} response The parsed JSON from the network request\n *\n * @return {object | undefined} Returns object with status and statusText, or undefined\n */\nfunction checkStatus (response, jsonResponse) {\n if (response.status >= 200 && response.status < 300) {\n return jsonResponse;\n }\n const error = new Error(jsonResponse.message);\n error.response = response;\n throw error;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @param {string} url The URL we want to request\n * @param {object} [options] The options we want to pass to \"fetch\"\n *\n * @return {object} The response data\n */\n\nexport default function request (url, options) {\n return fetch(url, options)\n .then(response => {\n return Promise.all([response, parseJSON(response)]);\n })\n .then(([response, jsonResponse]) => {\n return checkStatus(response, jsonResponse);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/request.js","import * as actions from 'constants/show_action_types';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\n// basic request parsing\nexport function onHandleShowPageUri (params) {\n return {\n type: actions.HANDLE_SHOW_URI,\n data: params,\n };\n};\n\nexport function onRequestError (error) {\n return {\n type: actions.REQUEST_ERROR,\n data: error,\n };\n};\n\nexport function onNewChannelRequest (channelName, channelId) {\n const requestType = CHANNEL;\n const requestId = `cr#${channelName}#${channelId}`;\n return {\n type: actions.CHANNEL_REQUEST_NEW,\n data: { requestType, requestId, channelName, channelId },\n };\n};\n\nexport function onNewAssetRequest (name, id, channelName, channelId, extension) {\n const requestType = extension ? ASSET_LITE : ASSET_DETAILS;\n const requestId = `ar#${name}#${id}#${channelName}#${channelId}`;\n return {\n type: actions.ASSET_REQUEST_NEW,\n data: {\n requestType,\n requestId,\n name,\n modifier: {\n id,\n channel: {\n name: channelName,\n id : channelId,\n },\n },\n },\n };\n};\n\nexport function onRequestUpdate (requestType, requestId) {\n return {\n type: actions.REQUEST_UPDATE,\n data: {\n requestType,\n requestId,\n },\n };\n};\n\nexport function addRequestToRequestList (id, error, key) {\n return {\n type: actions.REQUEST_LIST_ADD,\n data: { id, error, key },\n };\n};\n\n// asset actions\n\nexport function addAssetToAssetList (id, error, name, claimId, shortId, claimData) {\n return {\n type: actions.ASSET_ADD,\n data: { id, error, name, claimId, shortId, claimData },\n };\n}\n\n// channel actions\n\nexport function addNewChannelToChannelList (id, name, shortId, longId, claimsData) {\n return {\n type: actions.CHANNEL_ADD,\n data: { id, name, shortId, longId, claimsData },\n };\n};\n\nexport function onUpdateChannelClaims (channelKey, name, longId, page) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,\n data: {channelKey, name, longId, page},\n };\n};\n\nexport function updateChannelClaims (channelListId, claimsData) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,\n data: {channelListId, claimsData},\n };\n};\n\n// display a file\n\nexport function fileRequested (name, claimId) {\n return {\n type: actions.FILE_REQUESTED,\n data: { name, claimId },\n };\n};\n\nexport function updateFileAvailability (status) {\n return {\n type: actions.FILE_AVAILABILITY_UPDATE,\n data: status,\n };\n};\n\nexport function updateDisplayAssetError (error) {\n return {\n type: actions.DISPLAY_ASSET_ERROR,\n data: error,\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/show.js","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport {updateSelectedChannel} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, site }) => {\n return {\n channelName : channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId : channel.loggedInChannel.longId,\n siteDescription: site.description,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n onChannelLogout: () => {\n dispatch(updateLoggedInChannel(null, null, null));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site }) => {\n const { defaultDescription, defaultThumbnail, description: siteDescription, host: siteHost, title: siteTitle, twitter: siteTwitter } = site;\n return {\n defaultDescription,\n defaultThumbnail,\n siteDescription,\n siteHost,\n siteTitle,\n siteTwitter,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/index.js","module.exports = require(\"prop-types\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 10\n// module chunks = 0","// request actions\nexport const HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nexport const REQUEST_ERROR = 'REQUEST_ERROR';\nexport const REQUEST_UPDATE = 'REQUEST_UPDATE';\nexport const ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nexport const CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nexport const REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nexport const ASSET_ADD = `ASSET_ADD`;\n\n// channel actions\nexport const CHANNEL_ADD = 'CHANNEL_ADD';\n\nexport const CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nexport const CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nexport const FILE_REQUESTED = 'FILE_REQUESTED';\nexport const FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nexport const DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_action_types.js","export const selectAsset = (show) => {\n const request = show.requestList[show.request.id];\n const assetKey = request.key;\n return show.assetList[assetKey];\n};\n\nexport const selectShowState = (state) => {\n return state.show;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/show.js","module.exports = require(\"react-helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-helmet\"\n// module id = 13\n// module chunks = 0","module.exports = require(\"redux-saga/effects\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga/effects\"\n// module id = 14\n// module chunks = 0","const axios = require('axios');\nconst logger = require('winston');\nconst { api: { apiHost, apiPort } } = require('../../config/lbryConfig.js');\nconst lbryApiUri = 'http://' + apiHost + ':' + apiPort;\nconst { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('./googleAnalytics.js');\n\nconst handleLbrynetResponse = ({ data }, resolve, reject) => {\n logger.debug('lbry api data:', data);\n if (data.result) {\n // check for an error\n if (data.result.error) {\n logger.debug('Lbrynet api error:', data.result.error);\n reject(new Error(data.result.error));\n return;\n };\n resolve(data.result);\n return;\n }\n // fallback in case it just timed out\n reject(JSON.stringify(data));\n};\n\nmodule.exports = {\n publishClaim (publishParams) {\n logger.debug(`lbryApi >> Publishing claim to \"${publishParams.name}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'publish',\n params: publishParams,\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaim (uri) {\n logger.debug(`lbryApi >> Getting Claim for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'get',\n params: { uri, timeout: 20 },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimList (claimName) {\n logger.debug(`lbryApi >> Getting claim_list for \"${claimName}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'claim_list',\n params: { name: claimName },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n resolveUri (uri) {\n logger.debug(`lbryApi >> Resolving URI for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'resolve',\n params: { uri },\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now());\n if (data.result[uri].error) { // check for errors\n reject(data.result[uri].error);\n } else { // if no errors, resolve\n resolve(data.result[uri]);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getDownloadDirectory () {\n logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'settings_get',\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now());\n if (data.result) {\n resolve(data.result.download_directory);\n } else {\n return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.');\n }\n })\n .catch(error => {\n logger.error('Lbrynet Error:', error);\n resolve('/home/lbry/Downloads/');\n });\n });\n },\n createChannel (name) {\n logger.debug(`lbryApi >> Creating channel for ${name}...`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'channel_new',\n params: {\n channel_name: name,\n amount : 0.1,\n },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryApi.js","const logger = require('winston');\nconst ua = require('universal-analytics');\nconst { analytics : { googleId }, details: { title } } = require('../../config/siteConfig.js');\n\nfunction createServeEventParams (headers, ip, originalUrl) {\n return {\n eventCategory : 'client requests',\n eventAction : 'serve request',\n eventLabel : originalUrl,\n ipOverride : ip,\n userAgentOverride: headers['user-agent'],\n };\n};\n\nfunction createPublishTimingEventParams (category, variable, label, startTime, endTime) {\n const duration = endTime - startTime;\n return {\n userTimingCategory : category,\n userTimingVariableName: variable,\n userTimingTime : duration,\n userTimingLabel : label,\n };\n};\n\nfunction sendGoogleAnalyticsEvent (ip, params) {\n const visitorId = ip.replace(/\\./g, '-');\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.event(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n });\n};\n\nfunction sendGoogleAnalyticsTiming (visitorId, params) {\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.timing(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n logger.debug(`Timing event successfully sent to google analytics`);\n });\n};\n\nmodule.exports = {\n sendGAServeEvent (headers, ip, originalUrl) {\n const params = createServeEventParams(headers, ip, originalUrl);\n sendGoogleAnalyticsEvent(ip, params);\n },\n sendGATimingEvent (category, variable, label, startTime, endTime) {\n const params = createPublishTimingEventParams(category, variable, label, startTime, endTime);\n sendGoogleAnalyticsTiming(title, params);\n },\n chooseGaLbrynetPublishLabel ({ channel_name: channelName, channel_id: channelId }) {\n return (channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM');\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/googleAnalytics.js","module.exports = require(\"redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux\"\n// module id = 17\n// module chunks = 0","import React from 'react';\nimport GoogleAnalytics from 'react-ga';\nimport { withRouter } from 'react-router-dom';\nconst { analytics: { googleId } } = require('../../../config/siteConfig.js');\n\nGoogleAnalytics.initialize(googleId);\n\nclass GAListener extends React.Component {\n componentDidMount () {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n\n sendPageView (location) {\n GoogleAnalytics.set({ page: location.pathname });\n GoogleAnalytics.pageview(location.pathname);\n }\n\n render () {\n return this.props.children;\n }\n}\n\nexport default withRouter(GAListener);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/GAListener/index.jsx","const { componentsConfig } = require('../../config/siteConfig.js');\n\nfunction getDeepestChildValue (parent, childrenKeys) {\n let childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array\n let child = parent[childKey];\n if (childrenKeys.length >= 1) {\n return getDeepestChildValue(child, childrenKeys);\n }\n return child;\n}\n\nexport const dynamicImport = (filePath) => {\n // validate inputs\n if (!filePath) {\n throw new Error('no file path provided to dynamicImport()');\n }\n if (typeof filePath !== 'string') {\n console.log('dynamicImport > filePath:', filePath);\n console.log('dynamicImport > filePath type:', typeof filePath);\n throw new Error('file path provided to dynamicImport() must be a string');\n }\n if (!componentsConfig) {\n console.log('no componentsConfig found in siteConfig.js');\n return require(`${filePath}`);\n }\n // split out the file folders // filter out any empty or white-space-only strings\n const folders = filePath.split('/').filter(folderName => folderName.replace(/\\s/g, '').length);\n // check for the component corresponding to file path in the site config object\n // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]]\n const customComponent = getDeepestChildValue(componentsConfig, folders);\n if (customComponent) {\n return customComponent; // return custom component\n } else {\n return require(`${filePath}`);\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/dynamicImport.js","const createBasicCanonicalLink = (page, siteHost) => {\n return `${siteHost}/${page}`;\n};\n\nconst createAssetCanonicalLink = (asset, siteHost) => {\n let channelName, certificateId, name, claimId;\n if (asset.claimData) {\n ({ channelName, certificateId, name, claimId } = asset.claimData);\n };\n if (channelName) {\n return `${siteHost}/${channelName}:${certificateId}/${name}`;\n };\n return `${siteHost}/${claimId}/${name}`;\n};\n\nconst createChannelCanonicalLink = (channel, siteHost) => {\n const { name, longId } = channel;\n return `${siteHost}/${name}:${longId}`;\n};\n\nexport const createCanonicalLink = (asset, channel, page, siteHost) => {\n if (asset) {\n return createAssetCanonicalLink(asset, siteHost);\n }\n if (channel) {\n return createChannelCanonicalLink(channel, siteHost);\n }\n return createBasicCanonicalLink(page, siteHost);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/canonicalLink.js","module.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(identifier)\n .map(match => match || null);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your URL. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('Check your URL. No channel name after \"@\".');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in channel name: \"${nameBadChars.join(', ')}\".`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`Check your URL. No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`Check your URL. The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId: channelClaimId || null,\n claimId : claimId || null,\n };\n },\n parseClaim: function (name) {\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first extension)\n '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end)\n );\n const [proto, claimName, extensionSeperator, extension] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(name)\n .map(match => match || null);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('Check your URL. No claim name provided before \".\"');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in claim name: \"${nameBadChars.join(', ')}\".`);\n }\n // Validate and process extension\n if (extensionSeperator) {\n if (!extension) {\n throw new Error(`Check your URL. No file extension provided after separator \"${extensionSeperator}\".`);\n }\n if (extensionSeperator !== '.') {\n throw new Error(`Check your URL. The \"${extensionSeperator}\" separator is not supported in the claim name.`);\n }\n }\n return {\n claimName,\n extension: extension || null,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/lbryUri.js","const determineOgThumbnailContentType = (thumbnail) => {\n if (thumbnail) {\n const fileExt = thumbnail.substring(thumbnail.lastIndexOf('.'));\n switch (fileExt) {\n case 'jpeg':\n case 'jpg':\n return 'image/jpeg';\n case 'png':\n return 'image/png';\n case 'gif':\n return 'image/gif';\n case 'mp4':\n return 'video/mp4';\n default:\n return 'image/jpeg';\n }\n }\n return '';\n};\n\nconst createBasicMetaTags = (siteHost, siteDescription, siteTitle, siteTwitter) => {\n return [\n {property: 'og:title', content: siteTitle},\n {property: 'og:url', content: siteHost},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: siteDescription},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createChannelMetaTags = (siteTitle, siteHost, siteTwitter, channel) => {\n const { name, longId } = channel;\n return [\n {property: 'og:title', content: `${name} on ${siteTitle}`},\n {property: 'og:url', content: `${siteHost}/${name}:${longId}`},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: `${name}, a channel on ${siteTitle}`},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createAssetMetaTags = (siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) => {\n const { claimData } = asset;\n const { contentType } = claimData;\n const embedUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const showUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const source = `${siteHost}/${claimData.claimId}/${claimData.name}.${claimData.fileExt}`;\n const ogTitle = claimData.title || claimData.name;\n const ogDescription = claimData.description || defaultDescription;\n const ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);\n const ogThumbnail = claimData.thumbnail || defaultThumbnail;\n const metaTags = [\n {property: 'og:title', content: ogTitle},\n {property: 'og:url', content: showUrl},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: ogDescription},\n {property: 'og:image:width', content: 600},\n {property: 'og:image:height', content: 315},\n {property: 'twitter:site', content: siteTwitter},\n ];\n if (contentType === 'video/mp4' || contentType === 'video/webm') {\n metaTags.push({property: 'og:video', content: source});\n metaTags.push({property: 'og:video:secure_url', content: source});\n metaTags.push({property: 'og:video:type', content: contentType});\n metaTags.push({property: 'og:image', content: ogThumbnail});\n metaTags.push({property: 'og:image:type', content: ogThumbnailContentType});\n metaTags.push({property: 'og:type', content: 'video'});\n metaTags.push({property: 'twitter:card', content: 'player'});\n metaTags.push({property: 'twitter:player', content: embedUrl});\n metaTags.push({property: 'twitter:player:width', content: 600});\n metaTags.push({property: 'twitter:text:player_width', content: 600});\n metaTags.push({property: 'twitter:player:height', content: 337});\n metaTags.push({property: 'twitter:player:stream', content: source});\n metaTags.push({property: 'twitter:player:stream:content_type', content: contentType});\n } else {\n metaTags.push({property: 'og:image', content: source});\n metaTags.push({property: 'og:image:type', content: contentType});\n metaTags.push({property: 'og:type', content: 'article'});\n metaTags.push({property: 'twitter:card', content: 'summary_large_image'});\n }\n return metaTags;\n};\n\nexport const createMetaTags = (siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) => {\n if (asset) {\n return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail);\n };\n if (channel) {\n return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel);\n };\n return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/metaTags.js","export const createPageTitle = (siteTitle, pageTitle) => {\n if (!pageTitle) {\n return `${siteTitle}`;\n }\n return `${siteTitle} - ${pageTitle}`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/pageTitle.js","import * as actions from 'constants/channel_action_types';\n\n// export action creators\n\nexport function updateLoggedInChannel (name, shortId, longId) {\n return {\n type: actions.CHANNEL_UPDATE,\n data: {\n name,\n shortId,\n longId,\n },\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/channel.js","import * as actions from 'constants/publish_action_types';\n\n// export action creators\nexport function selectFile (file) {\n return {\n type: actions.FILE_SELECTED,\n data: file,\n };\n};\n\nexport function clearFile () {\n return {\n type: actions.FILE_CLEAR,\n };\n};\n\nexport function updateMetadata (name, value) {\n return {\n type: actions.METADATA_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateClaim (value) {\n return {\n type: actions.CLAIM_UPDATE,\n data: value,\n };\n};\n\nexport function setPublishInChannel (channel) {\n return {\n type: actions.SET_PUBLISH_IN_CHANNEL,\n channel,\n };\n};\n\nexport function updatePublishStatus (status, message) {\n return {\n type: actions.PUBLISH_STATUS_UPDATE,\n data: {\n status,\n message,\n },\n };\n};\n\nexport function updateError (name, value) {\n return {\n type: actions.ERROR_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateSelectedChannel (channelName) {\n return {\n type: actions.SELECTED_CHANNEL_UPDATE,\n data: channelName,\n };\n};\n\nexport function toggleMetadataInputs (showMetadataInputs) {\n return {\n type: actions.TOGGLE_METADATA_INPUTS,\n data: showMetadataInputs,\n };\n};\n\nexport function onNewThumbnail (file) {\n return {\n type: actions.THUMBNAIL_NEW,\n data: file,\n };\n};\n\nexport function startPublish (history) {\n return {\n type: actions.PUBLISH_START,\n data: { history },\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/publish.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ActiveStatusBar from 'components/ActiveStatusBar';\nimport InactiveStatusBar from 'components/InactiveStatusBar';\n\nclass ProgressBar extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n bars : [],\n index : 0,\n incrementer: 1,\n };\n this.createBars = this.createBars.bind(this);\n this.startProgressBar = this.startProgressBar.bind(this);\n this.updateProgressBar = this.updateProgressBar.bind(this);\n this.stopProgressBar = this.stopProgressBar.bind(this);\n }\n componentDidMount () {\n this.createBars();\n this.startProgressBar();\n }\n componentWillUnmount () {\n this.stopProgressBar();\n }\n createBars () {\n const bars = [];\n for (let i = 0; i <= this.props.size; i++) {\n bars.push({isActive: false});\n }\n this.setState({ bars });\n }\n startProgressBar () {\n this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);\n };\n updateProgressBar () {\n let index = this.state.index;\n let incrementer = this.state.incrementer;\n let bars = this.state.bars;\n // flip incrementer if necessary, to stay in bounds\n if ((index < 0) || (index > this.props.size)) {\n incrementer = incrementer * -1;\n index += incrementer;\n }\n // update the indexed bar\n if (incrementer > 0) {\n bars[index].isActive = true;\n } else {\n bars[index].isActive = false;\n };\n // increment index\n index += incrementer;\n // update state\n this.setState({\n bars,\n incrementer,\n index,\n });\n };\n stopProgressBar () {\n clearInterval(this.updateInterval);\n };\n render () {\n return (\n
\n {this.state.bars.map((bar, index) => bar.isActive ? : )}\n
\n );\n }\n};\n\nProgressBar.propTypes = {\n size: PropTypes.number.isRequired,\n};\n\nexport default ProgressBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ProgressBar/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\nimport NavBar from 'containers/NavBar';\n\nclass ErrorPage extends React.Component {\n render () {\n const { error } = this.props;\n return (\n
\n \n
\n

{error}

\n
\n
\n );\n }\n};\n\nErrorPage.propTypes = {\n error: PropTypes.string.isRequired,\n};\n\nexport default ErrorPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ErrorPage/index.jsx","module.exports = require(\"passport\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport\"\n// module id = 28\n// module chunks = 0","function MysqlConfig () {\n this.database = 'default';\n this.username = 'default';\n this.password = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No MySQL config received.');\n }\n const {database, username, password} = config;\n this.database = database;\n this.username = username;\n this.password = password;\n };\n};\n\nmodule.exports = new MysqlConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/mysqlConfig.js","function SlackConfig () {\n this.slackWebHook = 'default';\n this.slackErrorChannel = 'default';\n this.slackInfoChannel = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No slack config received.');\n }\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = config;\n this.slackWebHook = slackWebHook;\n this.slackErrorChannel = slackErrorChannel;\n this.slackInfoChannel = slackInfoChannel;\n };\n};\n\nmodule.exports = new SlackConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/slackConfig.js","module.exports = require(\"passport-local\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport-local\"\n// module id = 31\n// module chunks = 0","module.exports = require(\"sequelize\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"sequelize\"\n// module id = 32\n// module chunks = 0","module.exports = {\n returnShortId: function (claimsArray, longId) {\n let claimIndex;\n let shortId = longId.substring(0, 1); // default short id is the first letter\n let shortIdLength = 0;\n // find the index of this claim id\n claimIndex = claimsArray.findIndex(element => {\n return element.claimId === longId;\n });\n if (claimIndex < 0) {\n throw new Error('claim id not found in claims list');\n }\n // get an array of all claims with lower height\n let possibleMatches = claimsArray.slice(0, claimIndex);\n // remove certificates with the same prefixes until none are left.\n while (possibleMatches.length > 0) {\n shortIdLength += 1;\n shortId = longId.substring(0, shortIdLength);\n possibleMatches = possibleMatches.filter(element => {\n return (element.claimId && (element.claimId.substring(0, shortIdLength) === shortId));\n });\n }\n return shortId;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/sequelizeHelpers.js","const logger = require('winston');\nconst fs = require('fs');\n\nconst { details, publishing } = require('../../config/siteConfig.js');\n\nmodule.exports = {\n parsePublishApiRequestBody ({name, nsfw, license, title, description, thumbnail}) {\n // validate name\n if (!name) {\n throw new Error('no name field found in request');\n }\n const invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name);\n if (invalidNameCharacters) {\n throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and \"-\"');\n }\n // optional parameters\n nsfw = (nsfw === 'true');\n license = license || null;\n title = title || null;\n description = description || null;\n thumbnail = thumbnail || null;\n // return results\n return {\n name,\n nsfw,\n license,\n title,\n description,\n thumbnail,\n };\n },\n parsePublishApiRequestFiles ({file, thumbnail}) {\n // make sure a file was provided\n if (!file) {\n throw new Error('no file with key of [file] found in request');\n }\n if (!file.path) {\n throw new Error('no file path found');\n }\n if (!file.type) {\n throw new Error('no file type found');\n }\n if (!file.size) {\n throw new Error('no file type found');\n }\n // validate the file name\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate the file\n module.exports.validateFileTypeAndSize(file);\n // return results\n return {\n fileName : file.name,\n filePath : file.path,\n fileType : file.type,\n thumbnailFileName: (thumbnail ? thumbnail.name : null),\n thumbnailFilePath: (thumbnail ? thumbnail.path : null),\n thumbnailFileType: (thumbnail ? thumbnail.type : null),\n };\n },\n validateFileTypeAndSize (file) {\n // check file type and size\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n logger.debug('publish > file validation > .jpeg/.jpg/.png was too big');\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .gif was too big');\n throw new Error('Sorry, .gifs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .mp4 was too big');\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n logger.debug('publish > file validation > unrecognized file type');\n throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n return file;\n },\n createBasicPublishParams (filePath, name, title, description, license, nsfw, thumbnail) {\n logger.debug(`Creating Publish Parameters`);\n // provide defaults for title\n if (title === null || title.trim() === '') {\n title = name;\n }\n // provide default for description\n if (description === null || description.trim() === '') {\n description = '';\n }\n // provide default for license\n if (license === null || license.trim() === '') {\n license = ' '; // default to empty string\n }\n // create the publish params\n const publishParams = {\n name,\n file_path: filePath,\n bid : 0.01,\n metadata : {\n description,\n title,\n author : details.title,\n language: 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n };\n // add thumbnail to channel if video\n if (thumbnail) {\n publishParams['metadata']['thumbnail'] = thumbnail;\n }\n return publishParams;\n },\n createThumbnailPublishParams (thumbnailFilePath, claimName, license, nsfw) {\n if (!thumbnailFilePath) {\n return;\n }\n logger.debug(`Creating Thumbnail Publish Parameters`);\n // create the publish params\n return {\n name : `${claimName}-thumb`,\n file_path: thumbnailFilePath,\n bid : 0.01,\n metadata : {\n title : `${claimName} thumbnail`,\n description: `a thumbnail for ${claimName}`,\n author : details.title,\n language : 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n channel_name : publishing.thumbnailChannel,\n channel_id : publishing.thumbnailChannelId,\n };\n },\n deleteTemporaryFile (filePath) {\n fs.unlink(filePath, err => {\n if (err) {\n logger.error(`error deleting temporary file ${filePath}`);\n throw err;\n }\n logger.debug(`successfully deleted ${filePath}`);\n });\n },\n addGetResultsToFileData (fileInfo, getResult) {\n fileInfo.fileName = getResult.file_name;\n fileInfo.filePath = getResult.download_path;\n return fileInfo;\n },\n createFileData ({ name, claimId, outpoint, height, address, nsfw, contentType }) {\n return {\n name,\n claimId,\n outpoint,\n height,\n address,\n fileName: '',\n filePath: '',\n fileType: contentType,\n nsfw,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/publishHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n handleErrorResponse: function (originalUrl, ip, error, res) {\n logger.error(`Error on ${originalUrl}`, module.exports.useObjectPropertiesIfNoKeys(error));\n const [status, message] = module.exports.returnErrorMessageAndStatus(error);\n res\n .status(status)\n .json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function (error) {\n let status, message;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function (err) {\n if (Object.keys(err).length === 0) {\n let newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach((key) => {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload (status, message) {\n return {\n status,\n success: false,\n message,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/errorHandlers.js","const db = require('../models/index');\nconst logger = require('winston');\nconst { returnPaginatedChannelClaims } = require('../helpers/channelPagination.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\nconst NO_FILE = 'NO_FILE';\n\nmodule.exports = {\n getClaimId (channelName, channelClaimId, name, claimId) {\n if (channelName) {\n return module.exports.getClaimIdByChannel(channelName, channelClaimId, name);\n } else {\n return module.exports.getClaimIdByClaim(name, claimId);\n }\n },\n getClaimIdByClaim (claimName, claimId) {\n logger.debug(`getClaimIdByClaim(${claimName}, ${claimId})`);\n return new Promise((resolve, reject) => {\n db.Claim.getLongClaimId(claimName, claimId)\n .then(longClaimId => {\n if (!longClaimId) {\n resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimIdByChannel (channelName, channelClaimId, claimName) {\n logger.debug(`getClaimIdByChannel(${channelName}, ${channelClaimId}, ${claimName})`);\n return new Promise((resolve, reject) => {\n db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id\n .then(longChannelId => {\n if (!longChannelId) {\n return [null, null];\n }\n return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id\n })\n .then(([longChannelId, longClaimId]) => {\n if (!longChannelId) {\n return resolve(NO_CHANNEL);\n }\n if (!longClaimId) {\n return resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelData (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]);\n })\n .then(([longChannelClaimId, shortChannelClaimId]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. return all the channel information\n resolve({\n channelName,\n longChannelClaimId,\n shortChannelClaimId,\n });\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelClaims (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]);\n })\n .then(([longChannelClaimId, channelClaimsArray]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. format the data for the view, including pagination\n let paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);\n // 4. return all the channel information and contents\n resolve(paginatedChannelViewData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getLocalFileRecord (claimId, name) {\n return db.File.findOne({where: {claimId, name}})\n .then(file => {\n if (!file) {\n return NO_FILE;\n }\n return file.dataValues;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/serveController.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage.js';\nimport Helmet from 'react-helmet';\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create a new Redux store instance\n const store = createStore(Reducer);\n\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `` was rendered\n return res.redirect(301, context.url);\n } else {\n // we're good, send the response\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handlePageRender.jsx","module.exports = require(\"react-dom/server\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-dom/server\"\n// module id = 38\n// module chunks = 0","import { combineReducers } from 'redux';\nimport PublishReducer from 'reducers/publish';\nimport ChannelReducer from 'reducers/channel';\nimport ShowReducer from 'reducers/show';\nimport SiteReducer from 'reducers/site';\n\nexport default combineReducers({\n channel: ChannelReducer,\n publish: PublishReducer,\n show : ShowReducer,\n site : SiteReducer,\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/index.js","export const FILE_SELECTED = 'FILE_SELECTED';\nexport const FILE_CLEAR = 'FILE_CLEAR';\nexport const METADATA_UPDATE = 'METADATA_UPDATE';\nexport const CLAIM_UPDATE = 'CLAIM_UPDATE';\nexport const SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';\nexport const PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';\nexport const ERROR_UPDATE = 'ERROR_UPDATE';\nexport const SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';\nexport const TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';\nexport const THUMBNAIL_NEW = 'THUMBNAIL_NEW';\nexport const PUBLISH_START = 'PUBLISH_START';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_action_types.js","export const CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/channel_action_types.js","export const LOCAL_CHECK = 'LOCAL_CHECK';\nexport const UNAVAILABLE = 'UNAVAILABLE';\nexport const ERROR = 'ERROR';\nexport const AVAILABLE = 'AVAILABLE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/asset_display_states.js","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport { dynamicImport } from 'utils/dynamicImport';\nimport AboutPage from 'pages/AboutPage';\nimport LoginPage from 'pages/LoginPage';\nimport ShowPage from 'pages/ShowPage';\nimport FourOhFourPage from 'containers/FourOhFourPage';\nconst HomePage = dynamicImport('pages/HomePage'); // or use the provided local homepage\n\nconst App = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default App;\n\n\n\n// WEBPACK FOOTER //\n// ./client/app.js","var map = {\n\t\"./canonicalLink\": 20,\n\t\"./canonicalLink.js\": 20,\n\t\"./dynamicImport\": 19,\n\t\"./dynamicImport.js\": 19,\n\t\"./file\": 45,\n\t\"./file.js\": 45,\n\t\"./lbryUri\": 21,\n\t\"./lbryUri.js\": 21,\n\t\"./metaTags\": 22,\n\t\"./metaTags.js\": 22,\n\t\"./pageTitle\": 23,\n\t\"./pageTitle.js\": 23,\n\t\"./publish\": 46,\n\t\"./publish.js\": 46,\n\t\"./request\": 6,\n\t\"./request.js\": 6,\n\t\"./validate\": 47,\n\t\"./validate.js\": 47\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 44;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/utils ^.*$\n// module id = 44\n// module chunks = 0","module.exports = {\n validateFile (file) {\n if (!file) {\n throw new Error('no file provided');\n }\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate size and type\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n throw new Error('Sorry, GIFs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/file.js","export const createPublishMetadata = (claim, { type }, { title, description, license, nsfw }, publishInChannel, selectedChannel) => {\n let metadata = {\n name: claim,\n title,\n description,\n license,\n nsfw,\n type,\n };\n if (publishInChannel) {\n metadata['channelName'] = selectedChannel;\n }\n return metadata;\n};\n\nexport const createPublishFormData = (file, thumbnail, metadata) => {\n let fd = new FormData();\n // append file\n fd.append('file', file);\n // append thumbnail\n if (thumbnail) {\n fd.append('thumbnail', thumbnail);\n }\n // append metadata\n for (let key in metadata) {\n if (metadata.hasOwnProperty(key)) {\n fd.append(key, metadata[key]);\n }\n }\n return fd;\n};\n\nexport const createThumbnailUrl = (channel, channelId, claim, host) => {\n return `${host}/${channel}:${channelId}/${claim}-thumb.png`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/publish.js","export const validateChannelSelection = (publishInChannel, selectedChannel, loggedInChannel) => {\n if (publishInChannel && (selectedChannel !== loggedInChannel.name)) {\n throw new Error('Log in to a channel or select Anonymous');\n }\n};\n\nexport const validatePublishParams = (file, claim, urlError) => {\n if (!file) {\n throw new Error('Please choose a file');\n }\n if (!claim) {\n throw new Error('Please enter a URL');\n }\n if (urlError) {\n throw new Error('Fix the url');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/validate.js","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nfunction Logo () {\n return (\n \n \n Logo\n Spee.ch logo\n \n \n \n Spee<h\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default Logo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/Logo/index.jsx","import React from 'react';\n\nfunction NavBarChannelDropdown ({ channelName, handleSelection, defaultSelection, VIEW, LOGOUT }) {\n return (\n \n );\n};\n\nexport default NavBarChannelDropdown;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/NavBarChannelOptionsDropdown/index.jsx","import React from 'react';\n\nconst ActiveStatusBar = () => {\n return | ;\n};\n\nexport default ActiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ActiveStatusBar/index.jsx","import React from 'react';\n\nconst InactiveStatusBar = () => {\n return | ;\n};\n\nexport default InactiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/InactiveStatusBar/index.jsx","export const CHANNEL = 'CHANNEL';\nexport const ASSET_LITE = 'ASSET_LITE';\nexport const ASSET_DETAILS = 'ASSET_DETAILS';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_request_types.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { fileRequested } from 'actions/show';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select error and status\n const error = show.displayAsset.error;\n const status = show.displayAsset.status;\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n error,\n status,\n asset,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onFileRequest: (name, claimId) => {\n dispatch(fileRequested(name, claimId));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({site: {defaults: { defaultThumbnail }}}) => {\n return {\n defaultThumbnail,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/index.js","module.exports = (helmet, html, preloadedState) => {\n // take the html and preloadedState and return the full page\n return `\n \n \n \n \n \n \n \n ${helmet.title.toString()}\n ${helmet.meta.toString()}\n ${helmet.link.toString()}\n \n \n \n \n \n \n \n \n
\n
${html}
\n
\n \n \n \n \n `;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/renderFullPage.js","export const selectSiteState = (state) => {\n return state.site;\n};\n\nexport const selectSiteHost = (state) => {\n return state.site.host;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/site.js","module.exports = require(\"babel-polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-polyfill\"\n// module id = 58\n// module chunks = 0","module.exports = require(\"whatwg-fetch\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"whatwg-fetch\"\n// module id = 59\n// module chunks = 0","const server = require('server/server.js');\r\nconst components = require('client/components');\r\n// const containers = require('client/containers');\r\n// const pages = require('client/pages');\r\n\r\nconst exports = {\r\n server,\r\n components,\r\n // containers,\r\n // pages,\r\n};\r\n\r\nmodule.exports = exports;\r\n\n\n\n// WEBPACK FOOTER //\n// ./speech.js","// app dependencies\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst expressHandlebars = require('express-handlebars');\nconst Handlebars = require('handlebars');\nconst helmet = require('helmet');\nconst passport = require('passport');\nconst { serializeSpeechUser, deserializeSpeechUser } = require('./helpers/authHelpers.js');\nconst cookieSession = require('cookie-session');\nconst http = require('http');\n// logging dependencies\nconst logger = require('winston');\n\nfunction SpeechServer () {\n this.configureMysql = (mysqlConfig) => {\n require('../config/mysqlConfig.js').configure(mysqlConfig);\n };\n this.configureSite = (siteConfig) => {\n require('../config/siteConfig.js').configure(siteConfig);\n console.log(require('../config/siteConfig.js'));\n this.sessionKey = siteConfig.auth.sessionKey;\n this.PORT = siteConfig.details.port;\n };\n this.configureSlack = (slackConfig) => {\n require('../config/slackConfig.js').configure(slackConfig);\n };\n this.createApp = () => {\n // create an Express application\n const app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(`${__dirname}/public`)); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use((req, res, next) => { // custom logging middleware to log all incoming http requests\n logger.verbose(`Request on ${req.originalUrl} from ${req.ip}`);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n const localSignupStrategy = require('./passport/local-signup.js');\n const localLoginStrategy = require('./passport/local-login.js');\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name : 'session',\n keys : [this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000, // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n const hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars : Handlebars,\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n require('./routes/auth-routes.js')(app);\n require('./routes/api-routes.js')(app);\n require('./routes/page-routes.js')(app);\n require('./routes/asset-routes.js')(app);\n require('./routes/fallback-routes.js')(app);\n\n this.app = app;\n };\n this.initialize = () => {\n require('./helpers/configureLogger.js')(logger);\n require('./helpers/configureSlack.js')(logger);\n this.createApp();\n this.server = http.Server(this.app);\n };\n this.start = () => {\n const db = require('./models/index');\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(() => {\n this.server.listen(this.PORT, () => {\n logger.info(`Server is listening on PORT ${this.PORT}`);\n });\n })\n .catch((error) => {\n logger.error(`Startup Error:`, error);\n });\n };\n};\n\nmodule.exports = SpeechServer;\n\n\n\n// WEBPACK FOOTER //\n// ./server/server.js","module.exports = require(\"express\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express\"\n// module id = 62\n// module chunks = 0","module.exports = require(\"body-parser\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"body-parser\"\n// module id = 63\n// module chunks = 0","module.exports = require(\"express-handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express-handlebars\"\n// module id = 64\n// module chunks = 0","module.exports = require(\"handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"handlebars\"\n// module id = 65\n// module chunks = 0","module.exports = require(\"helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"helmet\"\n// module id = 66\n// module chunks = 0","const logger = require('winston');\n\nmodule.exports = {\n serializeSpeechUser (user, done) { // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser (user, done) { // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/authHelpers.js","module.exports = require(\"cookie-session\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cookie-session\"\n// module id = 68\n// module chunks = 0","module.exports = require(\"http\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"http\"\n// module id = 69\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst lbryApi = require('../helpers/lbryApi.js');\nconst logger = require('winston');\nconst db = require('../models/index');\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`);\n let userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel(`@${username}`)\n .then(tx => {\n // create user record\n const userData = {\n userName: username,\n password: password,\n };\n logger.verbose('userData >', userData);\n // create user record\n const channelData = {\n channelName : `@${username}`,\n channelClaimId: tx.claim_id,\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n const certificateData = {\n claimId: tx.claim_id,\n name : `@${username}`,\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n })\n .then(([newUser, newChannel, newCertificate]) => {\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n })\n .then(() => {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n })\n .catch(error => {\n logger.error('signup error', error);\n return done(error);\n });\n }\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-signup.js","module.exports = require(\"axios\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"axios\"\n// module id = 71\n// module chunks = 0","const lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279',\n },\n};\n\nmodule.exports = lbryConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/lbryConfig.js","module.exports = require(\"universal-analytics\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"universal-analytics\"\n// module id = 73\n// module chunks = 0","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Certificate = sequelize.define(\n 'Certificate',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateVersion: {\n type : STRING,\n default: null,\n },\n keyType: {\n type : STRING,\n default: null,\n },\n publicKey: {\n type : TEXT('long'),\n default: null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Certificate.associate = db => {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n logger.debug(`getShortChannelIdFromLongChannelId ${channelName}:${longChannelId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {name: channelName},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelIdFromShortChannelId(${channelName}, ${channelClaimId})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name : channelName,\n claimId: {\n $like: `${channelClaimId}%`,\n },\n },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n logger.debug(`getLongChannelIdFromChannelName(${channelName})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n logger.debug(`validateLongChannelId(${name}, ${claimId})`);\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelId(${channelName}, ${channelClaimId})`);\n if (channelClaimId && (channelClaimId.length === 40)) { // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) { // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/certificate.js","module.exports = (sequelize, { STRING }) => {\n const Channel = sequelize.define(\n 'Channel',\n {\n channelName: {\n type : STRING,\n allowNull: false,\n },\n channelClaimId: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Channel.associate = db => {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/channel.js","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\nconst { assetDefaults: { thumbnail: defaultThumbnail }, details: { host } } = require('../../config/siteConfig.js');\n\nfunction determineFileExtensionFromContentType (contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail (storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData (claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Claim = sequelize.define(\n 'Claim',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateId: {\n type : STRING,\n default: null,\n },\n author: {\n type : STRING,\n default: null,\n },\n description: {\n type : TEXT('long'),\n default: null,\n },\n language: {\n type : STRING,\n default: null,\n },\n license: {\n type : STRING,\n default: null,\n },\n licenseUrl: {\n type : STRING,\n default: null,\n },\n nsfw: {\n type : BOOLEAN,\n default: null,\n },\n preview: {\n type : STRING,\n default: null,\n },\n thumbnail: {\n type : STRING,\n default: null,\n },\n title: {\n type : STRING,\n default: null,\n },\n metadataVersion: {\n type : STRING,\n default: null,\n },\n contentType: {\n type : STRING,\n default: null,\n },\n source: {\n type : STRING,\n default: null,\n },\n sourceType: {\n type : STRING,\n default: null,\n },\n sourceVersion: {\n type : STRING,\n default: null,\n },\n streamVersion: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n channelName: {\n type : STRING,\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Claim.associate = db => {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n logger.debug(`Claim.getShortClaimIdFromLongClaimId for ${claimName}#${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n logger.debug(`Claim.getAllChannelClaims for ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw : true, // returns an array of only data, not an array of instances\n })\n .then(channelClaimsArray => {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(claim => {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n logger.debug(`finding claim id for claim ${claimName} from channel ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(`${result.length} records found for \"${claimName}\" in channel \"${channelClaimId}\"`);\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name,\n claimId: {\n $like: `${shortId}%`,\n }},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']], // note: maybe height and effective amount need to switch?\n })\n .then(result => {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug(`getLongClaimId(${claimName}, ${claimId})`);\n if (claimId && (claimId.length === 40)) { // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n logger.debug(`Claim.resolveClaim: ${name} ${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name, claimId },\n })\n .then(claimArray => {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error(`more than one record matches ${name}#${claimId} in db.Claim`);\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/claim.js","module.exports = (sequelize, { STRING, BOOLEAN, INTEGER }) => {\n const File = sequelize.define(\n 'File',\n {\n name: {\n type : STRING,\n allowNull: false,\n },\n claimId: {\n type : STRING,\n allowNull: false,\n },\n address: {\n type : STRING,\n allowNull: false,\n },\n outpoint: {\n type : STRING,\n allowNull: false,\n },\n height: {\n type : INTEGER,\n allowNull: false,\n default : 0,\n },\n fileName: {\n type : STRING,\n allowNull: false,\n },\n filePath: {\n type : STRING,\n allowNull: false,\n },\n fileType: {\n type: STRING,\n },\n nsfw: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: false,\n },\n trendingEligible: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: true,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n File.associate = db => {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25,\n });\n };\n\n return File;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/file.js","module.exports = (sequelize, { STRING, BOOLEAN, TEXT }) => {\n const Request = sequelize.define(\n 'Request',\n {\n action: {\n type : STRING,\n allowNull: false,\n },\n url: {\n type : STRING,\n allowNull: false,\n },\n ipAddress: {\n type : STRING,\n allowNull: true,\n },\n result: {\n type : TEXT('long'),\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Request.associate = db => {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n return Request;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/request.js","'use strict';\nconst bcrypt = require('bcrypt');\nconst logger = require('winston');\n\nmodule.exports = (sequelize, { STRING }) => {\n const User = sequelize.define(\n 'User',\n {\n userName: {\n type : STRING,\n allowNull: false,\n },\n password: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n User.associate = db => {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n this\n .update({password: hash})\n .then(() => {\n resolve();\n })\n .catch(error => {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', (user, options) => {\n logger.debug('User.beforeCreate hook...');\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/user.js","module.exports = require(\"bcrypt\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"bcrypt\"\n// module id = 80\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst logger = require('winston');\nconst db = require('../models/index');\n\nconst returnUserAndChannelInfo = (userInstance) => {\n return new Promise((resolve, reject) => {\n let userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance\n .getChannel()\n .then(({channelName, channelClaimId}) => {\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n })\n .catch(error => {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n return db.User\n .findOne({\n where: {userName: username},\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n return user.comparePassword(password)\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user)\n .then(userInfo => {\n return done(null, userInfo);\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return done(error);\n });\n },\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-login.js","const logger = require('winston');\nconst passport = require('passport');\n\nmodule.exports = (app) => {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), (req, res) => {\n logger.verbose(`successful signup for ${req.user.channelName}`);\n res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n // route for log in\n app.post('/login', (req, res, next) => {\n passport.authenticate('local-login', (err, user, info) => {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message,\n });\n }\n logger.debug('successful login');\n req.logIn(user, (err) => {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', (req, res) => {\n req.logout();\n res.status(200).json({success: true, message: 'you successfully logged out'});\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', (req, res) => {\n if (req.user) {\n res.status(200).json({success: true, data: req.user});\n } else {\n res.status(401).json({success: false, message: 'user is not logged in'});\n }\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/auth-routes.js","const logger = require('winston');\nconst multipart = require('connect-multiparty');\nconst { publishing: { uploadDirectory }, details: { host } } = require('../../config/siteConfig.js');\nconst multipartMiddleware = multipart({uploadDir: uploadDirectory});\nconst db = require('../models/index');\nconst { claimNameIsAvailable, checkChannelAvailability, publish } = require('../controllers/publishController.js');\nconst { getClaimList, resolveUri, getClaim } = require('../helpers/lbryApi.js');\nconst { addGetResultsToFileData, createBasicPublishParams, createThumbnailPublishParams, parsePublishApiRequestBody, parsePublishApiRequestFiles, createFileData } = require('../helpers/publishHelpers.js');\nconst errorHandlers = require('../helpers/errorHandlers.js');\nconst { sendGATimingEvent } = require('../helpers/googleAnalytics.js');\nconst { authenticateUser } = require('../auth/authentication.js');\nconst { getChannelData, getChannelClaims, getClaimId } = require('../controllers/serveController.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = (app) => {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n checkChannelAvailability(name)\n .then(availableName => {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', ({ ip, originalUrl, params }, res) => {\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json(shortId);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n const page = params.page;\n getChannelClaims(channelName, channelClaimId, page)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', ({ ip, originalUrl, params }, res) => {\n getClaimList(params.name)\n .then(claimsList => {\n res.status(200).json(claimsList);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId)\n .then(resolveResult => {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n let fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(`${name}#${claimId}`)]);\n })\n .then(([ fileData, getResult ]) => {\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, {name, claimId}, 'File'), getResult]);\n })\n .then(([ fileRecord, {message, completed} ]) => {\n res.status(200).json({ success: true, message, completed });\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n claimNameIsAvailable(name)\n .then(result => {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', ({ headers, ip, originalUrl, params }, res) => {\n resolveUri(`${params.name}#${params.claimId}`)\n .then(resolvedUri => {\n res.status(200).json(resolvedUri);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, ({ body, files, headers, ip, originalUrl, user }, res) => {\n // define variables\n let channelName, channelId, channelPassword, description, fileName, filePath, fileType, gaStartTime, license, name, nsfw, thumbnail, thumbnailFileName, thumbnailFilePath, thumbnailFileType, title;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n // validateApiPublishRequest(body, files);\n ({name, nsfw, license, title, description, thumbnail} = parsePublishApiRequestBody(body));\n ({fileName, filePath, fileType, thumbnailFileName, thumbnailFilePath, thumbnailFileType} = parsePublishApiRequestFiles(files));\n ({channelName, channelId, channelPassword} = body);\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // check channel authorization\n Promise.all([\n authenticateUser(channelName, channelId, channelPassword, user),\n claimNameIsAvailable(name),\n createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail),\n createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw),\n ])\n .then(([{channelName, channelClaimId}, validatedClaimName, publishParams, thumbnailPublishParams]) => {\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n })\n .then(result => {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data : {\n name,\n claimId: result.claim_id,\n url : `${host}/${result.claim_id}/${name}`,\n lbryTx : result,\n },\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', ({ ip, originalUrl, body, params }, res) => {\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json({success: true, data: shortId});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', ({ ip, originalUrl, body, params }, res) => {\n logger.debug('body:', body);\n const channelName = body.channelName;\n const channelClaimId = body.channelClaimId;\n const claimName = body.claimName;\n const claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(result => {\n if (result === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel could be found'});\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'No matching claim id could be found'});\n }\n res.status(200).json({success: true, data: result});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', ({ ip, originalUrl, body, params }, res) => {\n const claimName = params.claimName;\n let claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId)\n .then(claimInfo => {\n if (!claimInfo) {\n return res.status(404).json({success: false, message: 'No claim could be found'});\n }\n res.status(200).json({success: true, data: claimInfo});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n db.File.findOne({where: {name, claimId}})\n .then(result => {\n if (result) {\n return res.status(200).json({success: true, data: true});\n }\n res.status(200).json({success: true, data: false});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/api-routes.js","module.exports = require(\"connect-multiparty\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"connect-multiparty\"\n// module id = 84\n// module chunks = 0","const logger = require('winston');\nconst db = require('../models/index');\nconst lbryApi = require('../helpers/lbryApi.js');\nconst publishHelpers = require('../helpers/publishHelpers.js');\nconst { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('../../config/siteConfig.js');\nconst Sequelize = require('sequelize');\nconst Op = Sequelize.Op;\n\nmodule.exports = {\n publish (publishParams, fileName, fileType) {\n return new Promise((resolve, reject) => {\n let publishResults, certificateId, channelName;\n // publish the file\n return lbryApi.publishClaim(publishParams)\n .then(tx => {\n logger.info(`Successfully published ${publishParams.name} ${fileName}`, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug(`this claim was published in channel: ${publishParams.channel_name}`);\n return db.Channel.findOne({where: {channelName: publishParams.channel_name}});\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n })\n .then(channel => {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug(`certificateId: ${certificateId}`);\n })\n .then(() => {\n // create the File record\n const fileRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n fileName,\n filePath : publishParams.file_path,\n fileType,\n nsfw : publishParams.metadata.nsfw,\n };\n // create the Claim record\n const claimRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n thumbnail : publishParams.metadata.thumbnail,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n contentType: fileType,\n nsfw : publishParams.metadata.nsfw,\n amount : publishParams.bid,\n certificateId,\n channelName,\n };\n // upsert criteria\n const upsertCriteria = {\n name : publishParams.name,\n claimId: publishResults.claim_id,\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n })\n .then(([file, claim]) => {\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n })\n .then(() => {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n })\n .catch(error => {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable (name) {\n const claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim\n .findAll({\n attributes: ['address'],\n where : {\n name,\n address: {\n [Op.or]: claimAddresses,\n },\n },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n checkChannelAvailability (name) {\n return db.Channel\n .findAll({\n where: { channelName: name },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/publishController.js","module.exports = require(\"fs\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"fs\"\n// module id = 86\n// module chunks = 0","const db = require('../models/index');\nconst logger = require('winston');\n\nmodule.exports = {\n authenticateUser (channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName : null,\n channelClaimId: null,\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName : user.channelName,\n channelClaimId: user.channelClaimId,\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials (channelName, channelId, userPassword) {\n return new Promise((resolve, reject) => {\n // hoisted variables\n let channelData;\n // build the params for finding the channel\n let channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel\n .findOne({\n where: channelFindParams,\n })\n .then(channel => {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) },\n });\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n })\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/auth/authentication.js","const CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims (channelName, longChannelClaimId, claims, page) {\n const totalPages = module.exports.determineTotalPages(claims);\n const paginationPage = module.exports.getPageFromQuery(page);\n const viewData = {\n channelName : channelName,\n longChannelClaimId: longChannelClaimId,\n claims : module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage : module.exports.determinePreviousPage(paginationPage),\n currentPage : paginationPage,\n nextPage : module.exports.determineNextPage(totalPages, paginationPage),\n totalPages : totalPages,\n totalResults : module.exports.determineTotalClaims(claims),\n };\n return viewData;\n },\n getPageFromQuery (page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims (claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n const claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n const claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n const pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages (claims) {\n if (!claims) {\n return 0;\n } else {\n const totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n const fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n const remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage (currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage (totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims (claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/channelPagination.js","const { details: host } = require('../../config/siteConfig.js');\nconst handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = (app) => {\n // route for the home page\n app.get('/', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', (req, res) => {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', (req, res) => {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', (req, res) => {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', ({ params }, res) => {\n const claimId = params.claimId;\n const name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host, claimId, name });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/page-routes.js","import * as actions from 'constants/publish_action_types';\nimport { LOGIN } from 'constants/publish_channel_select_states';\nconst { publishing } = require('../../config/siteConfig.js');\n\nconst initialState = {\n disabled : publishing.disabled,\n disabledMessage : publishing.disabledMessage,\n publishInChannel : false,\n selectedChannel : LOGIN,\n showMetadataInputs: false,\n status : {\n status : null,\n message: null,\n },\n error: {\n file : null,\n url : null,\n channel : null,\n publishSubmit: null,\n },\n file : null,\n claim : '',\n metadata: {\n title : '',\n description: '',\n license : '',\n nsfw : false,\n },\n thumbnail: null,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data,\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data,\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel,\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data,\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data,\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data,\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/publish.js","export const LOGIN = 'Existing';\nexport const CREATE = 'New';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_channel_select_states.js","import * as actions from 'constants/channel_action_types';\n\nconst initialState = {\n loggedInChannel: {\n name : null,\n shortId: null,\n longId : null,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/channel.js","import * as actions from 'constants/show_action_types';\nimport { LOCAL_CHECK, ERROR } from 'constants/asset_display_states';\n\nconst initialState = {\n request: {\n error: null,\n type : null,\n id : null,\n },\n requestList : {},\n channelList : {},\n assetList : {},\n displayAsset: {\n error : null,\n status: LOCAL_CHECK,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data,\n }),\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id : action.data.requestId,\n }),\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, {\n [action.data.id]: {\n error: action.data.error,\n key : action.data.key,\n },\n }),\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, {\n [action.data.id]: {\n error : action.data.error,\n name : action.data.name,\n claimId : action.data.claimId,\n shortId : action.data.shortId,\n claimData: action.data.claimData,\n },\n }),\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.id]: {\n name : action.data.name,\n longId : action.data.longId,\n shortId : action.data.shortId,\n claimsData: action.data.claimsData,\n },\n }),\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.channelListId]: Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData,\n }),\n }),\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data,\n }),\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error : action.data,\n status: ERROR,\n }),\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/show.js","const siteConfig = require('../../config/siteConfig.js');\n\nconst {\n analytics: {\n googleId: googleAnalyticsId,\n },\n assetDefaults: {\n thumbnail: defaultThumbnail,\n description: defaultDescription,\n },\n details: {\n description,\n host,\n title,\n twitter,\n },\n} = siteConfig;\n\nconst initialState = {\n description,\n googleAnalyticsId,\n host,\n title,\n twitter,\n defaultDescription,\n defaultThumbnail,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/site.js","module.exports = require(\"react-ga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-ga\"\n// module id = 95\n// module chunks = 0","module.exports = require(\"cross-fetch/polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cross-fetch/polyfill\"\n// module id = 96\n// module chunks = 0","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport SEO from 'components/SEO';\n\nclass AboutPage extends React.Component {\n render () {\n return (\n
\n \n \n
\n
\n
\n

Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.

\n

TWITTER

\n

GITHUB

\n

DISCORD CHANNEL

\n

DOCUMENTATION

\n
\n
\n
\n

Spee.ch is a media-hosting site that reads from and publishes content to the LBRY blockchain.

\n

Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the LBRY network. This means that your images are stored in multiple locations without a single point of failure.

\n

Contribute

\n

If you have an idea for your own spee.ch-like site on top of LBRY, fork our github repo and go to town!

\n

If you want to improve spee.ch, join our discord channel or solve one of our github issues.

\n
\n
\n
\n
\n );\n }\n};\n\nexport default AboutPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/AboutPage/index.jsx","import React from 'react';\nimport { NavLink, withRouter } from 'react-router-dom';\nimport Logo from 'components/Logo';\nimport NavBarChannelDropdown from 'components/NavBarChannelOptionsDropdown';\nimport request from 'utils/request';\n\nconst VIEW = 'VIEW';\nconst LOGOUT = 'LOGOUT';\n\nclass NavBar extends React.Component {\n constructor (props) {\n super(props);\n this.checkForLoggedInUser = this.checkForLoggedInUser.bind(this);\n this.logoutUser = this.logoutUser.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n componentDidMount () {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n checkForLoggedInUser () {\n const params = {credentials: 'include'};\n request('/user', params)\n .then(({ data }) => {\n this.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n })\n .catch(error => {\n console.log('/user error:', error.message);\n });\n }\n logoutUser () {\n const params = {credentials: 'include'};\n request('/logout', params)\n .then(() => {\n this.props.onChannelLogout();\n })\n .catch(error => {\n console.log('/logout error', error.message);\n });\n }\n handleSelection (event) {\n const value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push(`/${this.props.channelName}:${this.props.channelLongId}`);\n break;\n default:\n break;\n }\n }\n render () {\n const { siteDescription } = this.props;\n return (\n
\n
\n \n
\n {siteDescription}\n
\n
\n Publish\n About\n { this.props.channelName ? (\n \n ) : (\n Channel\n )}\n
\n
\n
\n );\n }\n}\n\nexport default withRouter(NavBar);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/view.jsx","import React from 'react';\nimport Helmet from 'react-helmet';\nimport PropTypes from 'prop-types';\n\nimport { createPageTitle } from 'utils/pageTitle';\nimport { createMetaTags } from 'utils/metaTags';\nimport { createCanonicalLink } from 'utils/canonicalLink';\n\nclass SEO extends React.Component {\n render () {\n // props from state\n const { defaultDescription, defaultThumbnail, siteDescription, siteHost, siteTitle, siteTwitter } = this.props;\n // props from parent\n const { asset, channel, pageUri } = this.props;\n let { pageTitle } = this.props;\n // create page title, tags, and canonical link\n pageTitle = createPageTitle(siteTitle, pageTitle);\n const metaTags = createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n const canonicalLink = createCanonicalLink(asset, channel, pageUri, siteHost);\n // render results\n return (\n \n );\n }\n};\n\nSEO.propTypes = {\n pageTitle: PropTypes.string,\n pageUri : PropTypes.string,\n channel : PropTypes.object,\n asset : PropTypes.object,\n};\n\nexport default SEO;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/view.jsx","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/index.js","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ChannelLoginForm from 'containers/ChannelLoginForm';\nimport ChannelCreateForm from 'containers/ChannelCreateForm';\n\nclass LoginPage extends React.Component {\n componentWillReceiveProps (newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push(`/`);\n }\n }\n render () {\n return (\n
\n \n \n
\n
\n
\n

Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you're documenting important events, or making a public repository for cat gifs (password: '1234'), try creating a channel for it!

\n
\n
\n
\n

Log in to an existing channel:

\n \n

Create a brand new channel:

\n \n
\n
\n
\n
\n );\n }\n};\n\nexport default withRouter(LoginPage);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/view.jsx","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from '../../actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/index.js","import React from 'react';\nimport request from 'utils/request';\n\nclass ChannelLoginForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n name : '',\n password: '',\n };\n this.handleInput = this.handleInput.bind(this);\n this.loginToChannel = this.loginToChannel.bind(this);\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n loginToChannel (event) {\n event.preventDefault();\n const params = {\n method : 'POST',\n body : JSON.stringify({username: this.state.name, password: this.state.password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n request('login', params)\n .then(({success, channelName, shortChannelId, channelClaimId, message}) => {\n if (success) {\n this.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n this.setState({'error': message});\n };\n })\n .catch(error => {\n if (error.message) {\n this.setState({'error': error.message});\n } else {\n this.setState({'error': error});\n }\n });\n }\n render () {\n return (\n
\n
\n
\n \n
\n
\n @\n \n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n { this.state.error ? (\n

{this.state.error}

\n ) : (\n

Enter the name and password for your channel

\n )}\n
\n \n
\n
\n );\n }\n}\n\nexport default ChannelLoginForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/view.jsx","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from 'actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/index.js","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport request from 'utils/request';\n\nclass ChannelCreateForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n channel : '',\n password: '',\n status : null,\n };\n this.handleChannelInput = this.handleChannelInput.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.createChannel = this.createChannel.bind(this);\n }\n cleanseChannelInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n handleChannelInput (event) {\n let value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({channel: value});\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({error: 'Please enter a channel name'});\n }\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n updateIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n request(`/api/channel/availability/${channelWithAtSymbol}`)\n .then(() => {\n this.setState({'error': null});\n })\n .catch((error) => {\n this.setState({'error': error.message});\n });\n }\n checkIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n return request(`/api/channel/availability/${channelWithAtSymbol}`);\n }\n checkIsPasswordProvided (password) {\n return new Promise((resolve, reject) => {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n makePublishChannelRequest (username, password) {\n const params = {\n method : 'POST',\n body : JSON.stringify({username, password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n return new Promise((resolve, reject) => {\n request('/signup', params)\n .then(result => {\n return resolve(result);\n })\n .catch(error => {\n reject(new Error(`Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ${error.message}`));\n });\n });\n }\n createChannel (event) {\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password)\n .then(() => {\n return this.checkIsChannelAvailable(this.state.channel);\n })\n .then(() => {\n this.setState({status: 'We are publishing your new channel. Sit tight...'});\n return this.makePublishChannelRequest(this.state.channel, this.state.password);\n })\n .then(result => {\n this.setState({status: null});\n this.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n })\n .catch((error) => {\n if (error.message) {\n this.setState({'error': error.message, status: null});\n } else {\n this.setState({'error': error, status: null});\n };\n });\n }\n render () {\n return (\n
\n { !this.state.status ? (\n
\n
\n
\n \n
\n
\n @\n \n { (this.state.channel && !this.state.error) && {'\\u2713'} }\n { this.state.error && {'\\u2716'} }\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n {this.state.error ? (\n

{this.state.error}

\n ) : (\n

Choose a name and password for your channel

\n )}\n
\n \n
\n
\n ) : (\n
\n

{this.state.status}

\n \n
\n )}\n
\n );\n }\n}\n\nexport default ChannelCreateForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/view.jsx","import { connect } from 'react-redux';\nimport { onHandleShowPageUri } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n return {\n error : show.request.error,\n requestType: show.request.type,\n };\n};\n\nconst mapDispatchToProps = {\n onHandleShowPageUri,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/index.js","import React from 'react';\nimport ErrorPage from 'pages/ErrorPage';\nimport ShowAssetLite from 'containers/ShowAssetLite';\nimport ShowAssetDetails from 'containers/ShowAssetDetails';\nimport ShowChannel from 'containers/ShowChannel';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\nclass ShowPage extends React.Component {\n componentDidMount () {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n componentWillReceiveProps (nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n render () {\n const { error, requestType } = this.props;\n if (error) {\n return (\n \n );\n }\n switch (requestType) {\n case CHANNEL:\n return ;\n case ASSET_LITE:\n return ;\n case ASSET_DETAILS:\n return ;\n default:\n return

loading...

;\n }\n }\n};\n\nexport default ShowPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport { Link } from 'react-router-dom';\nimport AssetDisplay from 'containers/AssetDisplay';\n\nclass ShowLite extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { name, claimId } = asset.claimData;\n return (\n
\n \n \n hosted\n via Spee.ch\n
\n );\n }\n return (\n
\n

loading asset data...

\n
\n );\n }\n};\n\nexport default ShowLite;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport { LOCAL_CHECK, UNAVAILABLE, ERROR, AVAILABLE } from 'constants/asset_display_states';\n\nclass AssetDisplay extends React.Component {\n componentDidMount () {\n const { asset: { claimData: { name, claimId } } } = this.props;\n this.props.onFileRequest(name, claimId);\n }\n render () {\n const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props;\n return (\n
\n {(status === LOCAL_CHECK) &&\n
\n

Checking to see if Spee.ch has your asset locally...

\n
\n }\n {(status === UNAVAILABLE) &&\n
\n

Sit tight, we're searching the LBRY blockchain for your asset!

\n \n

Curious what magic is happening here? Learn more.

\n
\n }\n {(status === ERROR) &&\n
\n

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the LBRY discord.

\n

{error}

\n
\n }\n {(status === AVAILABLE) &&\n (() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return (\n \n );\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

Unsupported file type

\n );\n }\n })()\n }\n
\n );\n }\n};\n\nexport default AssetDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ErrorPage from 'pages/ErrorPage';\nimport AssetTitle from 'containers/AssetTitle';\nimport AssetDisplay from 'containers/AssetDisplay';\nimport AssetInfo from 'containers/AssetInfo';\n\nclass ShowAssetDetails extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { claimData: { name } } = asset;\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowAssetDetails;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n const { claimData: { title } } = selectAsset(show);\n return {\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/index.js","import React from 'react';\n\nconst AssetTitle = ({ title }) => {\n return (\n
\n {title}\n
\n );\n};\n\nexport default AssetTitle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/index.js","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nclass AssetInfo extends React.Component {\n constructor (props) {\n super(props);\n this.copyToClipboard = this.copyToClipboard.bind(this);\n }\n copyToClipboard (event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({error: 'Oops, unable to copy'});\n }\n }\n render () {\n const { asset: { shortId, claimData : { channelName, certificateId, description, name, claimId, fileExt, contentType, thumbnail, host } } } = this.props;\n return (\n
\n {channelName &&\n
\n
\n Channel:\n
\n
\n {channelName}\n
\n
\n }\n\n {description &&\n
\n {description}\n
\n }\n\n
\n
\n
\n Share:\n
\n
\n \n twitter\n facebook\n tumblr\n reddit\n
\n
\n
\n
\n\n
\n \n );\n }\n};\n\nexport default AssetInfo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select request\n const previousRequest = show.requestList[requestId] || null;\n // select channel\n let channel;\n if (previousRequest) {\n const channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport ErrorPage from 'pages/ErrorPage';\nimport NavBar from 'containers/NavBar';\nimport ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay';\n\nclass ShowChannel extends React.Component {\n render () {\n const { channel } = this.props;\n if (channel) {\n const { name, longId, shortId } = channel;\n return (\n
\n \n \n
\n
\n

channel name: {name}

\n

full channel id: {longId}

\n

short channel id: {shortId}

\n
\n
\n \n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowChannel;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/view.jsx","import { connect } from 'react-redux';\nimport { onUpdateChannelClaims } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select channel key\n const request = show.requestList[show.request.id];\n const channelKey = request.key;\n // select channel claims\n const channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey,\n channel,\n };\n};\n\nconst mapDispatchToProps = {\n onUpdateChannelClaims,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/index.js","import React from 'react';\nimport AssetPreview from 'components/AssetPreview';\n\nclass ChannelClaimsDisplay extends React.Component {\n constructor (props) {\n super(props);\n this.showNextResultsPage = this.showNextResultsPage.bind(this);\n this.showPreviousResultsPage = this.showPreviousResultsPage.bind(this);\n }\n showPreviousResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n showNextResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n showNewPage (page) {\n const { channelKey, channel: { name, longId } } = this.props;\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n render () {\n const { channel: { claimsData: { claims, currentPage, totalPages } } } = this.props;\n return (\n
\n {(claims.length > 0) ? (\n
\n {claims.map((claim, index) => )}\n
\n {(currentPage > 1) &&\n \n }\n {(currentPage < totalPages) &&\n \n }\n
\n
\n ) : (\n

There are no claims in this channel

\n )}\n
\n );\n }\n};\n\nexport default ChannelClaimsDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/view.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nconst AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail } }) => {\n const directSourceLink = `${claimId}/${name}.${fileExt}`;\n const showUrlLink = `/${claimId}/${name}`;\n return (\n
\n \n {(() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

unsupported file type

\n );\n }\n })()}\n \n
\n );\n};\n\nexport default AssetPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site: { host, title } }) => {\n return {\n host,\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/index.jsx","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport Helmet from 'react-helmet';\n\nclass FourOhForPage extends React.Component {\n render () {\n const {title, host} = this.props;\n return (\n
\n \n {title} - 404\n \n \n \n
\n

404

\n

That page does not exist

\n
\n
\n );\n }\n};\n\nexport default FourOhForPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/view.jsx","const { sendGAServeEvent } = require('../helpers/googleAnalytics');\nconst { determineResponseType, flipClaimNameAndIdForBackwardsCompatibility, logRequestData, getClaimIdAndServeAsset } = require('../helpers/serveHelpers.js');\nconst lbryUri = require('../helpers/lbryUri.js');\nconst handleShowRender = require('../helpers/handleShowRender.jsx');\nconst SERVE = 'SERVE';\n\nmodule.exports = (app) => {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({ claimName } = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // parse the identifier\n let isChannel, channelName, channelClaimId, claimId;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(params.identifier));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n if (!isChannel) {\n [claimId, claimName] = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({claimName} = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/asset-routes.js","const logger = require('winston');\nconst { getClaimId, getLocalFileRecord } = require('../controllers/serveController.js');\nconst { handleErrorResponse } = require('./errorHandlers.js');\n\nconst SERVE = 'SERVE';\nconst SHOW = 'SHOW';\nconst NO_FILE = 'NO_FILE';\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml ({accept}) {\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser (headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset ({accept, range}) {\n const imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n const videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId (claimId) {\n return ((claimId.length === 40) && !/[^A-Za-z0-9]/g.test(claimId));\n};\n\nfunction isValidShortId (claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId (input) {\n return (isValidClaimId(input) || isValidShortId(input));\n};\n\nfunction serveAssetToClient (claimId, name, res) {\n return getLocalFileRecord(claimId, name)\n .then(fileRecord => {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect(`/api/claim/get/${name}/${claimId}`);\n }\n // serve the file\n const {filePath, fileType} = fileRecord;\n logger.verbose(`serving file: ${filePath}`);\n const sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type' : fileType || 'image/jpeg',\n },\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n })\n .catch(error => {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset (channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(fullClaimId => {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'no claim id could be found'});\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'no channel id could be found'});\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n })\n .catch(error => {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType (hasFileExtension, headers) {\n let responseType;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) { // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) { // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility (identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n const tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData (responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/serveHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n logger.debug('parsing identifier:', identifier);\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex\n .exec(identifier)\n .map(match => match || null);\n logger.debug(`${proto}, ${value}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your url. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Invalid characters in channel name: ${nameBadChars.join(', ')}.`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId,\n claimId,\n };\n },\n parseClaim: function (claim) {\n logger.debug('parsing name:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Invalid characters in claim name: ${nameBadChars.join(', ')}.`);\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No file extension provided after separator ${modifierSeperator}.`);\n }\n if (modifierSeperator !== '.') {\n throw new Error(`The ${modifierSeperator} modifier is not supported in the claim name`);\n }\n }\n // return results\n return {\n claimName,\n };\n },\n parseModifier: function (claim) {\n logger.debug('parsing modifier:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n // Validate and process modifier\n let hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryUri.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore, applyMiddleware } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage';\nimport createSagaMiddleware from 'redux-saga';\nimport { call } from 'redux-saga/effects';\nimport { handleShowPageUri } from '../../client/sagas/show_uri';\nimport { onHandleShowPageUri } from '../../client/actions/show';\n\nimport Helmet from 'react-helmet';\n\nconst returnSagaWithParams = (saga, params) => {\n return function * () {\n yield call(saga, params);\n };\n};\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create and apply middleware\n const sagaMiddleware = createSagaMiddleware();\n const middleware = applyMiddleware(sagaMiddleware);\n\n // create a new Redux store instance\n const store = createStore(Reducer, middleware);\n\n // create saga\n const action = onHandleShowPageUri(req.params);\n const saga = returnSagaWithParams(handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware\n .run(saga)\n .done\n .then(() => {\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handleShowRender.jsx","module.exports = require(\"redux-saga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga\"\n// module id = 128\n// module chunks = 0","import { call, put, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { onRequestError, onNewChannelRequest, onNewAssetRequest } from 'actions/show';\nimport { newAssetRequest } from 'sagas/show_asset';\nimport { newChannelRequest } from 'sagas/show_channel';\nimport lbryUri from 'utils/lbryUri';\n\nfunction * parseAndUpdateIdentifierAndClaim (modifier, claim) {\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n let isChannel, channelName, channelClaimId, claimId, claimName, extension;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(modifier));\n ({ claimName, extension } = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n if (isChannel) {\n return yield call(newAssetRequest, onNewAssetRequest(claimName, null, channelName, channelClaimId, extension));\n };\n yield call(newAssetRequest, onNewAssetRequest(claimName, claimId, null, null, extension));\n}\nfunction * parseAndUpdateClaimOnly (claim) {\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n let isChannel, channelName, channelClaimId;\n try {\n ({ isChannel, channelName, channelClaimId } = lbryUri.parseIdentifier(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n // return early if this request is for a channel\n if (isChannel) {\n return yield call(newChannelRequest, onNewChannelRequest(channelName, channelClaimId));\n }\n // if not for a channel, parse the claim request\n let claimName, extension;\n try {\n ({claimName, extension} = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield call(newAssetRequest, onNewAssetRequest(claimName, null, null, null, extension));\n}\n\nexport function * handleShowPageUri (action) {\n const { identifier, claim } = action.data;\n if (identifier) {\n return yield call(parseAndUpdateIdentifierAndClaim, identifier, claim);\n }\n yield call(parseAndUpdateClaimOnly, claim);\n};\n\nexport function * watchHandleShowPageUri () {\n yield takeLatest(actions.HANDLE_SHOW_URI, handleShowPageUri);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_uri.js","import { call, put, select, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addRequestToRequestList, onRequestError, onRequestUpdate, addAssetToAssetList } from 'actions/show';\nimport { getLongClaimId, getShortId, getClaimData } from 'api/assetApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newAssetRequest (action) {\n const { requestType, requestId, name, modifier } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get long id && add request to request list\n let longId;\n try {\n ({data: longId} = yield call(getLongClaimId, host, name, modifier));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n const assetKey = `a#${name}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, assetKey));\n // is this an existing asset?\n // If this asset is in the asset list, it's already been fetched\n if (state.assetList[assetKey]) {\n return null;\n }\n // get short Id\n let shortId;\n try {\n ({data: shortId} = yield call(getShortId, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // get asset claim data\n let claimData;\n try {\n ({data: claimData} = yield call(getClaimData, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // add asset to asset list\n yield put(addAssetToAssetList(assetKey, null, name, longId, shortId, claimData));\n // clear any errors in request error\n yield put(onRequestError(null));\n};\n\nexport function * watchNewAssetRequest () {\n yield takeLatest(actions.ASSET_REQUEST_NEW, newAssetRequest);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_asset.js","import Request from 'utils/request';\n\nexport function getLongClaimId (host, name, modifier) {\n let body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n const params = {\n method : 'POST',\n headers: { 'Content-Type': 'application/json' },\n body : JSON.stringify(body),\n };\n // create url\n const url = `${host}/api/claim/long-id`;\n // return the request promise\n return Request(url, params);\n};\n\nexport function getShortId (host, name, claimId) {\n const url = `${host}/api/claim/short-id/${claimId}/${name}`;\n return Request(url);\n};\n\nexport function getClaimData (host, name, claimId) {\n const url = `${host}/api/claim/data/${name}/${claimId}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/assetApi.js","import {call, put, select, takeLatest} from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addNewChannelToChannelList, addRequestToRequestList, onRequestError, onRequestUpdate, updateChannelClaims } from 'actions/show';\nimport { getChannelClaims, getChannelData } from 'api/channelApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newChannelRequest (action) {\n const { requestType, requestId, channelName, channelId } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get channel long id\n let longId, shortId;\n try {\n ({ data: {longChannelClaimId: longId, shortChannelClaimId: shortId} } = yield call(getChannelData, host, channelName, channelId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the request in the channel requests list\n const channelKey = `c#${channelName}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, channelKey));\n // is this an existing channel?\n // If this channel is in the channel list, it's already been fetched\n if (state.channelList[channelKey]) {\n return null;\n }\n // get channel claims data\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, channelName, 1));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the channel data in the channel list\n yield put(addNewChannelToChannelList(channelKey, channelName, shortId, longId, claimsData));\n // clear any request errors\n yield put(onRequestError(null));\n}\n\nexport function * watchNewChannelRequest () {\n yield takeLatest(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n};\n\nfunction * getNewClaimsAndUpdateChannel (action) {\n const { channelKey, name, longId, page } = action.data;\n const host = yield select(selectSiteHost);\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, name, page));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield put(updateChannelClaims(channelKey, claimsData));\n}\n\nexport function * watchUpdateChannelClaims () {\n yield takeLatest(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_channel.js","import Request from 'utils/request';\n\nexport function getChannelData (host, id, name) {\n if (!id) id = 'none';\n const url = `${host}/api/channel/data/${name}/${id}`;\n return Request(url);\n};\n\nexport function getChannelClaims (host, longId, name, page) {\n if (!page) page = 1;\n const url = `${host}/api/channel/claims/${name}/${longId}/${page}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/channelApi.js","const handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = app => {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', (req, res) => {\n // send response\n handlePageRender(req, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/fallback-routes.js","const { logLevel } = require('../../config/loggerConfig');\n\nmodule.exports = (winston) => {\n // configure\n winston.configure({\n transports: [\n new (winston.transports.Console)({\n level : logLevel,\n timestamp : false,\n colorize : true,\n prettyPrint : true,\n handleExceptions : true,\n humanReadableUnhandledException: true,\n }),\n ],\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureLogger.js","const loggerConfig = {\n logLevel: 'debug', // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/loggerConfig.js","const winstonSlackWebHook = require('winston-slack-webhook').SlackWebHook;\nconst slackConfig = require('../../config/slackConfig.js');\n\nmodule.exports = (winston) => {\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = slackConfig;\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-errors-transport',\n level : 'warn',\n webhookUrl: slackWebHook,\n channel : slackErrorChannel,\n username : 'spee.ch',\n iconEmoji : ':face_with_head_bandage:',\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-info-transport',\n level : 'info',\n webhookUrl: slackWebHook,\n channel : slackInfoChannel,\n username : 'spee.ch',\n iconEmoji : ':nerd_face:',\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureSlack.js","module.exports = require(\"winston-slack-webhook\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston-slack-webhook\"\n// module id = 138\n// module chunks = 0","import ActiveStatusBar from 'components/ActiveStatusBar';\r\nimport AssetPreview from 'components/AssetPreview';\r\nimport ExpandingTextArea from 'components/ExpandingTextArea';\r\nimport GAListener from 'components/GAListener';\r\nimport InactiveStatusBar from 'components/InactiveStatusBar';\r\nimport Logo from 'components/Logo';\r\nimport NavBarChannelOptionsDropdown from 'components/NavBarChannelOptionsDropdown';\r\nimport ProgressBar from 'components/ProgressBar';\r\nimport PublishPreview from 'components/PublishPreview';\r\nimport PublishUrlMiddleDisplay from 'components/PublishUrlMiddleDisplay';\r\nimport SEO from 'components/SEO';\r\n\r\nconst components = {\r\n ActiveStatusBar,\r\n AssetPreview,\r\n ExpandingTextArea,\r\n GAListener,\r\n InactiveStatusBar,\r\n Logo,\r\n NavBarChannelOptionsDropdown,\r\n ProgressBar,\r\n PublishPreview,\r\n PublishUrlMiddleDisplay,\r\n SEO,\r\n}\r\n\r\nexport default components;\r\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/index.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass ExpandingTextarea extends Component {\n constructor (props) {\n super(props);\n this._handleChange = this._handleChange.bind(this);\n }\n componentDidMount () {\n this.adjustTextarea({});\n }\n _handleChange (event) {\n const { onChange } = this.props;\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n adjustTextarea ({ target = this.el }) {\n target.style.height = 0;\n target.style.height = `${target.scrollHeight}px`;\n }\n render () {\n const { ...rest } = this.props;\n return (\n this.el = x}\n onChange={this._handleChange}\n />\n );\n }\n}\n\nExpandingTextarea.propTypes = {\n onChange: PropTypes.func,\n};\n\nexport default ExpandingTextarea;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ExpandingTextArea/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass PublishPreview extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n imgSource : '',\n defaultThumbnail: '/assets/img/video_thumb_default.png',\n };\n }\n componentDidMount () {\n this.setPreviewImageSource(this.props.file);\n }\n componentWillReceiveProps (newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n }\n setPreviewImageSourceFromFile (file) {\n const previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = () => {\n this.setState({imgSource: previewReader.result});\n };\n }\n setPreviewImageSource (file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n render () {\n return (\n \n );\n }\n};\n\nPublishPreview.propTypes = {\n dimPreview: PropTypes.bool.isRequired,\n file : PropTypes.object.isRequired,\n thumbnail : PropTypes.object,\n};\n\nexport default PublishPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishPreview/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction UrlMiddle ({publishInChannel, selectedChannel, loggedInChannelName, loggedInChannelShortId}) {\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return {loggedInChannelName}:{loggedInChannelShortId} /;\n }\n return @channelSelect a channel below /;\n }\n return (\n xyzThis will be a random id /\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel : PropTypes.bool.isRequired,\n loggedInChannelName : PropTypes.string,\n loggedInChannelShortId: PropTypes.string,\n};\n\nexport default UrlMiddle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishUrlMiddleDisplay/index.jsx"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///index.js","webpack:///webpack/bootstrap fbeed617c134f70061c5","webpack:///external \"react\"","webpack:///external \"winston\"","webpack:///external \"react-redux\"","webpack:///./config/siteConfig.js","webpack:///external \"react-router-dom\"","webpack:///./server/models/index.js","webpack:///./client/utils/request.js","webpack:///./client/actions/show.js","webpack:///./client/containers/NavBar/index.js","webpack:///./client/components/SEO/index.js","webpack:///external \"prop-types\"","webpack:///./client/constants/show_action_types.js","webpack:///./client/selectors/show.js","webpack:///external \"react-helmet\"","webpack:///external \"redux-saga/effects\"","webpack:///./server/helpers/lbryApi.js","webpack:///./server/helpers/googleAnalytics.js","webpack:///external \"redux\"","webpack:///./client/components/GAListener/index.jsx","webpack:///./client/utils/dynamicImport.js","webpack:///./client/utils/canonicalLink.js","webpack:///./client/utils/lbryUri.js","webpack:///./client/utils/metaTags.js","webpack:///./client/utils/pageTitle.js","webpack:///./client/actions/channel.js","webpack:///./client/actions/publish.js","webpack:///./client/components/ProgressBar/index.jsx","webpack:///./client/pages/ErrorPage/index.jsx","webpack:///external \"passport\"","webpack:///./config/mysqlConfig.js","webpack:///./config/slackConfig.js","webpack:///external \"passport-local\"","webpack:///external \"sequelize\"","webpack:///./server/helpers/sequelizeHelpers.js","webpack:///./server/helpers/publishHelpers.js","webpack:///./server/helpers/errorHandlers.js","webpack:///./server/controllers/serveController.js","webpack:///./server/helpers/handlePageRender.jsx","webpack:///external \"react-dom/server\"","webpack:///./client/reducers/index.js","webpack:///./client/constants/publish_action_types.js","webpack:///./client/constants/channel_action_types.js","webpack:///./client/constants/asset_display_states.js","webpack:///./client/app.js","webpack:///./client/utils ^.*$","webpack:///./client/utils/file.js","webpack:///./client/utils/publish.js","webpack:///./client/utils/validate.js","webpack:///./client/components/Logo/index.jsx","webpack:///./client/components/NavBarChannelOptionsDropdown/index.jsx","webpack:///./client/components/ActiveStatusBar/index.jsx","webpack:///./client/components/InactiveStatusBar/index.jsx","webpack:///./client/constants/show_request_types.js","webpack:///./client/containers/AssetDisplay/index.js","webpack:///./client/components/AssetPreview/index.js","webpack:///./server/helpers/renderFullPage.js","webpack:///./client/selectors/site.js","webpack:///external \"babel-polyfill\"","webpack:///external \"whatwg-fetch\"","webpack:///./speech.js","webpack:///./server/server.js","webpack:///external \"express\"","webpack:///external \"body-parser\"","webpack:///external \"express-handlebars\"","webpack:///external \"handlebars\"","webpack:///external \"helmet\"","webpack:///./server/helpers/authHelpers.js","webpack:///external \"cookie-session\"","webpack:///external \"http\"","webpack:///./server/passport/local-signup.js","webpack:///external \"axios\"","webpack:///./config/lbryConfig.js","webpack:///external \"universal-analytics\"","webpack:///./server/models/certificate.js","webpack:///./server/models/channel.js","webpack:///./server/models/claim.js","webpack:///./server/models/file.js","webpack:///./server/models/request.js","webpack:///./server/models/user.js","webpack:///external \"bcrypt\"","webpack:///./server/passport/local-login.js","webpack:///./server/routes/auth-routes.js","webpack:///./server/routes/api-routes.js","webpack:///external \"connect-multiparty\"","webpack:///./server/controllers/publishController.js","webpack:///external \"fs\"","webpack:///./server/auth/authentication.js","webpack:///./server/helpers/channelPagination.js","webpack:///./server/routes/page-routes.js","webpack:///./client/reducers/publish.js","webpack:///./client/constants/publish_channel_select_states.js","webpack:///./client/reducers/channel.js","webpack:///./client/reducers/show.js","webpack:///./client/reducers/site.js","webpack:///external \"react-ga\"","webpack:///external \"cross-fetch/polyfill\"","webpack:///./client/pages/AboutPage/index.jsx","webpack:///./client/containers/NavBar/view.jsx","webpack:///./client/components/SEO/view.jsx","webpack:///./client/pages/LoginPage/index.js","webpack:///./client/pages/LoginPage/view.jsx","webpack:///./client/containers/ChannelLoginForm/index.js","webpack:///./client/containers/ChannelLoginForm/view.jsx","webpack:///./client/containers/ChannelCreateForm/index.js","webpack:///./client/containers/ChannelCreateForm/view.jsx","webpack:///./client/pages/ShowPage/index.js","webpack:///./client/pages/ShowPage/view.jsx","webpack:///./client/containers/ShowAssetLite/index.js","webpack:///./client/containers/ShowAssetLite/view.jsx","webpack:///./client/containers/AssetDisplay/view.jsx","webpack:///./client/containers/ShowAssetDetails/index.js","webpack:///./client/containers/ShowAssetDetails/view.jsx","webpack:///./client/containers/AssetTitle/index.js","webpack:///./client/containers/AssetTitle/view.jsx","webpack:///./client/containers/AssetInfo/index.js","webpack:///./client/containers/AssetInfo/view.jsx","webpack:///./client/containers/ShowChannel/index.js","webpack:///./client/containers/ShowChannel/view.jsx","webpack:///./client/containers/ChannelClaimsDisplay/index.js","webpack:///./client/containers/ChannelClaimsDisplay/view.jsx","webpack:///./client/components/AssetPreview/view.jsx","webpack:///./client/containers/FourOhFourPage/index.jsx","webpack:///./client/containers/FourOhFourPage/view.jsx","webpack:///./server/routes/asset-routes.js","webpack:///./server/helpers/serveHelpers.js","webpack:///./server/helpers/lbryUri.js","webpack:///./server/helpers/handleShowRender.jsx","webpack:///external \"redux-saga\"","webpack:///./client/sagas/show_uri.js","webpack:///./client/sagas/show_asset.js","webpack:///./client/api/assetApi.js","webpack:///./client/sagas/show_channel.js","webpack:///./client/api/channelApi.js","webpack:///./server/routes/fallback-routes.js","webpack:///./server/helpers/configureLogger.js","webpack:///./config/loggerConfig.js","webpack:///./server/helpers/configureSlack.js","webpack:///external \"winston-slack-webhook\"","webpack:///./client/components/index.js","webpack:///./client/components/ExpandingTextArea/index.jsx","webpack:///./client/components/PublishPreview/index.jsx","webpack:///./client/components/PublishUrlMiddleDisplay/index.jsx"],"names":["module","exports","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","require","SiteConfig","_this","this","analytics","googleId","assetDefaults","description","thumbnail","title","auth","sessionKey","componentsConfig","components","containers","pages","details","host","port","twitter","publishing","additionalClaimAddresses","disabled","disabledMessage","primaryClaimAddress","thumbnailChannel","thumbnailChannelId","uploadDirectory","configure","config","console","log","Sequelize","logger","_require","database","username","password","db","sequelize","dialect","dialectOptions","decimalNumbers","logging","pool","max","min","idle","acquire","authenticate","then","info","catch","err","error","Certificate","Channel","Claim","File","Request","User","import","keys","forEach","modelName","associate","upsert","Model","values","condition","tableName","findOne","where","obj","debug","update","create","parseJSON","response","status","json","checkStatus","jsonResponse","Error","message","request","url","options","fetch","Promise","all","_ref","_ref2","_slicedToArray","value","sliceIterator","arr","_arr","_n","_d","_e","undefined","_s","_i","Symbol","iterator","next","done","push","length","Array","isArray","TypeError","default","onHandleShowPageUri","params","type","actions","HANDLE_SHOW_URI","data","onRequestError","REQUEST_ERROR","onNewChannelRequest","channelName","channelId","requestType","requestId","CHANNEL_REQUEST_NEW","onNewAssetRequest","id","extension","ASSET_REQUEST_NEW","modifier","channel","onRequestUpdate","REQUEST_UPDATE","addRequestToRequestList","key","REQUEST_LIST_ADD","addAssetToAssetList","claimId","shortId","claimData","ASSET_ADD","addNewChannelToChannelList","longId","claimsData","CHANNEL_ADD","onUpdateChannelClaims","channelKey","page","CHANNEL_CLAIMS_UPDATE_ASYNC","updateChannelClaims","channelListId","CHANNEL_CLAIMS_UPDATE_SUCCESS","fileRequested","FILE_REQUESTED","updateFileAvailability","FILE_AVAILABILITY_UPDATE","updateDisplayAssetError","DISPLAY_ASSET_ERROR","_show_action_types","newObj","_show_request_types","_reactRedux","_channel","_publish","_view","_view2","mapStateToProps","site","loggedInChannel","channelShortId","channelLongId","siteDescription","mapDispatchToProps","dispatch","onChannelLogin","updateLoggedInChannel","updateSelectedChannel","onChannelLogout","connect","defaultDescription","defaultThumbnail","siteHost","siteTitle","siteTwitter","selectAsset","show","requestList","assetKey","assetList","selectShowState","state","axios","_require$api","api","apiHost","apiPort","lbryApiUri","_require2","chooseGaLbrynetPublishLabel","sendGATimingEvent","handleLbrynetResponse","resolve","reject","result","JSON","stringify","publishClaim","publishParams","gaStartTime","Date","now","post","method","getClaim","uri","timeout","getClaimList","claimName","resolveUri","getDownloadDirectory","_ref3","download_directory","createChannel","channel_name","amount","createServeEventParams","headers","ip","originalUrl","eventCategory","eventAction","eventLabel","ipOverride","userAgentOverride","createPublishTimingEventParams","category","variable","label","startTime","endTime","userTimingCategory","userTimingVariableName","userTimingTime","userTimingLabel","sendGoogleAnalyticsEvent","visitorId","replace","ua","strictCidFormat","https","event","sendGoogleAnalyticsTiming","timing","sendGAServeEvent","channel_id","_interopRequireDefault","_classCallCheck","instance","Constructor","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","constructor","writable","setPrototypeOf","__proto__","_createClass","defineProperties","target","props","descriptor","protoProps","staticProps","_react","_react2","_reactGa","_reactGa2","_reactRouterDom","initialize","GAListener","_React$Component","getPrototypeOf","apply","arguments","sendPageView","history","location","listen","set","pathname","pageview","children","Component","withRouter","getDeepestChildValue","parent","childrenKeys","childKey","shift","child","_typeof","dynamicImport","filePath","folders","split","filter","folderName","customComponent","createBasicCanonicalLink","createAssetCanonicalLink","asset","certificateId","_asset$claimData","createChannelCanonicalLink","createCanonicalLink","REGEXP_INVALID_CLAIM","REGEXP_INVALID_CHANNEL","REGEXP_ADDRESS","CHANNEL_CHAR","parseIdentifier","identifier","componentsRegex","RegExp","_componentsRegex$exec","exec","map","match","_componentsRegex$exec2","modifierSeperator","isChannel","startsWith","nameBadChars","join","channelClaimId","parseClaim","_componentsRegex$exec3","_componentsRegex$exec4","extensionSeperator","determineOgThumbnailContentType","substring","lastIndexOf","createBasicMetaTags","content","createChannelMetaTags","createAssetMetaTags","contentType","embedUrl","showUrl","source","fileExt","ogTitle","ogDescription","ogThumbnailContentType","ogThumbnail","metaTags","createMetaTags","createPageTitle","pageTitle","CHANNEL_UPDATE","_channel_action_types","selectFile","file","FILE_SELECTED","clearFile","FILE_CLEAR","updateMetadata","METADATA_UPDATE","updateClaim","CLAIM_UPDATE","setPublishInChannel","SET_PUBLISH_IN_CHANNEL","updatePublishStatus","PUBLISH_STATUS_UPDATE","updateError","ERROR_UPDATE","SELECTED_CHANNEL_UPDATE","toggleMetadataInputs","showMetadataInputs","TOGGLE_METADATA_INPUTS","onNewThumbnail","THUMBNAIL_NEW","startPublish","PUBLISH_START","_publish_action_types","_propTypes","_propTypes2","_ActiveStatusBar","_ActiveStatusBar2","_InactiveStatusBar","_InactiveStatusBar2","ProgressBar","bars","index","incrementer","createBars","bind","startProgressBar","updateProgressBar","stopProgressBar","size","isActive","setState","updateInterval","setInterval","clearInterval","createElement","bar","propTypes","number","isRequired","_NavBar","_NavBar2","ErrorPage","className","string","MysqlConfig","SlackConfig","slackWebHook","slackErrorChannel","slackInfoChannel","returnShortId","claimsArray","claimIndex","shortIdLength","findIndex","element","possibleMatches","slice","fs","parsePublishApiRequestBody","nsfw","license","parsePublishApiRequestFiles","path","test","validateFileTypeAndSize","fileName","fileType","thumbnailFileName","thumbnailFilePath","thumbnailFileType","createBasicPublishParams","trim","file_path","bid","metadata","author","language","claim_address","createThumbnailPublishParams","deleteTemporaryFile","unlink","addGetResultsToFileData","fileInfo","getResult","file_name","download_path","createFileData","outpoint","height","address","handleErrorResponse","res","useObjectPropertiesIfNoKeys","_module$exports$retur","returnErrorMessageAndStatus","_module$exports$retur2","createErrorResponsePayload","code","newErrorObject","getOwnPropertyNames","success","returnPaginatedChannelClaims","getClaimId","getClaimIdByChannel","getClaimIdByClaim","getLongClaimId","longClaimId","getLongChannelId","longChannelId","getClaimIdByLongChannelId","getChannelData","longChannelClaimId","getShortChannelIdFromLongChannelId","_ref4","shortChannelClaimId","getChannelClaims","getAllChannelClaims","_ref5","_ref6","channelClaimsArray","paginatedChannelViewData","getLocalFileRecord","dataValues","_server","_redux","_index","_index2","_index3","_index4","_app","_app2","_renderFullPage","_renderFullPage2","_reactHelmet","_reactHelmet2","req","context","store","createStore","html","renderToString","Provider","StaticRouter","helmet","renderStatic","redirect","preloadedState","getState","send","_publish2","_channel2","_show","_show2","_site","_site2","combineReducers","publish","LOCAL_CHECK","UNAVAILABLE","ERROR","AVAILABLE","_dynamicImport","_AboutPage","_AboutPage2","_LoginPage","_LoginPage2","_ShowPage","_ShowPage2","_FourOhFourPage","_FourOhFourPage2","HomePage","App","Switch","Route","exact","component","webpackContext","webpackContextResolve","./canonicalLink","./canonicalLink.js","./dynamicImport","./dynamicImport.js","./file","./file.js","./lbryUri","./lbryUri.js","./metaTags","./metaTags.js","./pageTitle","./pageTitle.js","./publish","./publish.js","./request","./request.js","./validate","./validate.js","validateFile","createPublishMetadata","claim","publishInChannel","selectedChannel","createPublishFormData","fd","FormData","append","createThumbnailUrl","validateChannelSelection","validatePublishParams","urlError","Logo","version","x","y","viewBox","enableBackground","Link","to","transform","fontSize","fontFamily","fill","stroke","strokeWidth","strokeLinecap","NavBarChannelDropdown","handleSelection","defaultSelection","VIEW","LOGOUT","onChange","ActiveStatusBar","InactiveStatusBar","CHANNEL","ASSET_LITE","ASSET_DETAILS","displayAsset","onFileRequest","defaults","toString","meta","link","selectSiteState","selectSiteHost","server","SpeechServer","Components","configureMysql","mysqlConfig","configureSite","siteConfig","PORT","configureSlack","slackConfig","createApp","app","express","enable","use","static","__dirname","bodyParser","urlencoded","extended","verbose","passport","serializeUser","serializeSpeechUser","deserializeUser","deserializeSpeechUser","localSignupStrategy","localLoginStrategy","cookieSession","maxAge","session","hbs","expressHandlebars","defaultLayout","handlebars","Handlebars","engine","http","Server","start","sync","user","PassportLocalStrategy","Strategy","lbryApi","usernameField","passwordField","userInfo","tx","userData","userName","channelData","claim_id","certificateData","newUser","newChannel","newCertificate","setChannel","setUser","shortChannelId","lbryConfig","STRING","BOOLEAN","INTEGER","TEXT","DECIMAL","define","claimSequence","decodedClaim","depth","effectiveAmount","hasSignature","hex","nout","txid","validAtHeight","valueVersion","claimType","certificateVersion","keyType","publicKey","freezeTableName","belongsTo","foreignKey","allowNull","findAll","order","getLongChannelIdFromShortChannelId","_this2","$like","getLongChannelIdFromChannelName","_this3","validateLongChannelId","_this4","hasOne","determineFileExtensionFromContentType","determineThumbnail","storedThumbnail","prepareClaimData","licenseUrl","preview","metadataVersion","sourceType","sourceVersion","streamVersion","getShortClaimIdFromLongClaimId","raw","getLongClaimIdFromShortClaimId","getTopFreeClaimIdByClaimName","_this5","validateLongClaimId","_this6","resolveClaim","_this7","claimArray","defaultValue","trendingEligible","hasMany","getRecentClaims","limit","action","ipAddress","bcrypt","comparePassword","compare","changePassword","newPassword","genSalt","saltError","salt","hash","hashError","hook","returnUserAndChannelInfo","userInstance","getChannel","isMatch","logIn","logout","multipart","multipartMiddleware","uploadDir","claimNameIsAvailable","checkChannelAvailability","_require3","_require4","errorHandlers","_require5","_require6","authenticateUser","_require7","availableName","body","claimsList","resolveResult","fileData","_ref7","_ref8","_ref9","_ref10","_ref10$","completed","_ref11","_ref12","resolvedUri","_ref13","files","channelPassword","_parsePublishApiReque","_parsePublishApiReque2","_ref14","_ref15","_ref15$","thumbnailPublishParams","lbryTx","_ref16","_ref17","_ref18","claimInfo","_ref19","_defineProperty","publishHelpers","_require$publishing","Op","publishResults","fileRecord","claimRecord","upsertCriteria","setClaim","setFile","claimAddresses","attributes","or","authenticateChannelCredentials","userPassword","channelFindParams","claims","totalPages","determineTotalPages","paginationPage","getPageFromQuery","extractPageFromClaims","previousPage","determinePreviousPage","currentPage","nextPage","determineNextPage","totalResults","determineTotalClaims","parseInt","pageNumber","claimStartIndex","claimEndIndex","totalClaims","fullPages","Math","floor","handlePageRender","render","layout","initialState","assign","_publish_channel_select_states","publishSubmit","LOGIN","CREATE","channelList","_asset_display_states","googleAnalyticsId","_siteConfig$assetDefa","_siteConfig$details","_SEO","_SEO2","AboutPage","pageUri","href","_Logo","_Logo2","_NavBarChannelOptionsDropdown","_NavBarChannelOptionsDropdown2","_request","_request2","NavBar","checkForLoggedInUser","logoutUser","credentials","selectedOptions","NavLink","activeClassName","_pageTitle","_metaTags","_canonicalLink","SEO","_props","_props2","canonicalLink","rel","loggedInChannelName","_ChannelLoginForm","_ChannelLoginForm2","_ChannelCreateForm","_ChannelCreateForm2","LoginPage","newProps","ChannelLoginForm","handleInput","loginToChannel","preventDefault","Headers","Content-Type","htmlFor","placeholder","onClick","_ProgressBar","_ProgressBar2","ChannelCreateForm","handleChannelInput","input","cleanseChannelInput","updateIsChannelAvailable","channelWithAtSymbol","checkIsPasswordProvided","checkIsChannelAvailable","makePublishChannelRequest","_ErrorPage","_ErrorPage2","_ShowAssetLite","_ShowAssetLite2","_ShowAssetDetails","_ShowAssetDetails2","_ShowChannel","_ShowChannel2","ShowPage","nextProps","_AssetDisplay","_AssetDisplay2","ShowLite","AssetDisplay","_props$asset$claimDat","_props$asset$claimDat2","src","alt","controls","poster","_AssetTitle","_AssetTitle2","_AssetInfo","_AssetInfo2","ShowAssetDetails","AssetTitle","AssetInfo","copyToClipboard","elementToCopy","dataset","elementtocopy","document","getElementById","select","execCommand","_props$asset","hidden","readOnly","spellCheck","data-elementtocopy","download","previousRequest","_ChannelClaimsDisplay","_ChannelClaimsDisplay2","ShowChannel","_AssetPreview","_AssetPreview2","ChannelClaimsDisplay","showNextResultsPage","showPreviousResultsPage","showNewPage","_props$channel","_props$channel$claims","AssetPreview","_ref$claimData","directSourceLink","showUrlLink","_ref$site","FourOhForPage","determineResponseType","flipClaimNameAndIdForBackwardsCompatibility","logRequestData","getClaimIdAndServeAsset","lbryUri","handleShowRender","hasFileExtension","parseModifier","responseType","_lbryUri$parseIdentif","_flipClaimNameAndIdFo","_flipClaimNameAndIdFo2","clientAcceptsHtml","accept","requestIsFromBrowser","clientWantsAsset","range","imageIsWanted","videoIsWanted","isValidClaimId","isValidShortId","isValidShortIdOrClaimId","serveAssetToClient","NO_FILE","sendFileOptions","X-Content-Type-Options","sendFile","fullClaimId","tempName","proto","_componentsRegex$exec5","_componentsRegex$exec6","_reduxSaga","_reduxSaga2","_effects","_show_uri","returnSagaWithParams","saga","regeneratorRuntime","mark","_callee","wrap","_context","prev","stop","sagaMiddleware","middleware","applyMiddleware","run","parseAndUpdateIdentifierAndClaim","_lbryUri$parseClaim","_lbryUri2","t0","put","abrupt","sent","_show_asset","newAssetRequest","_marked","parseAndUpdateClaimOnly","_lbryUri$parseIdentif2","_lbryUri$parseClaim2","_context2","_show_channel","newChannelRequest","t1","_marked2","handleShowPageUri","_action$data","_context3","_marked3","watchHandleShowPageUri","_context4","takeLatest","_marked4","_lbryUri","_assetApi","getShortId","getClaimData","t2","watchNewAssetRequest","_ref$data","_channelApi","watchNewChannelRequest","getNewClaimsAndUpdateChannel","_action$data2","watchUpdateChannelClaims","logLevel","winston","transports","Console","level","timestamp","colorize","prettyPrint","handleExceptions","humanReadableUnhandledException","warn","silly","loggerConfig","winstonSlackWebHook","SlackWebHook","add","webhookUrl","iconEmoji","_ExpandingTextArea","_ExpandingTextArea2","_GAListener","_GAListener2","_PublishPreview","_PublishPreview2","_PublishUrlMiddleDisplay","_PublishUrlMiddleDisplay2","ExpandingTextArea","NavBarChannelOptionsDropdown","PublishPreview","PublishUrlMiddleDisplay","_objectWithoutProperties","indexOf","_extends","ExpandingTextarea","_Component","_handleChange","adjustTextarea","_ref$target","el","style","scrollHeight","rest","ref","func","imgSource","setPreviewImageSource","setPreviewImageSourceFromFile","previewReader","FileReader","readAsDataURL","onloadend","dimPreview","bool","UrlMiddle","loggedInChannelShortId"],"mappings":"AAAAA,OAAOC,QACE,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAH,OAGA,IAAAD,GAAAK,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAN,WAUA,OANAC,GAAAE,GAAAI,KAAAR,EAAAC,QAAAD,IAAAC,QAAAE,GAG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/qB,WACvC8c,oBAAwBte,EAAAtR,QAAUmT,OAClC4qB,uBAAwBzsB,EAAAtR,QAAUmT,Q/I8iSpC/b,EAAQ4I,Q+I3iSO89B","file":"index.js","sourcesContent":["module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 57);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react\");\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston\");\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-redux\");\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction SiteConfig() {\n var _this = this;\n\n this.analytics = {\n googleId: 'default'\n };\n this.assetDefaults = {\n description: 'An asset published on Spee.ch',\n thumbnail: 'https://spee.ch/assets/img/video_thumb_default.png',\n title: 'Spee.ch'\n };\n this.auth = {\n sessionKey: 'default'\n };\n this.componentsConfig = {\n components: {},\n containers: {},\n pages: {}\n };\n this.details = {\n description: 'Open-source, decentralized image and video sharing.',\n host: 'default',\n port: 3000,\n title: 'Spee.ch',\n twitter: '@spee_ch'\n };\n this.publishing = {\n additionalClaimAddresses: [],\n disabled: false,\n disabledMessage: 'Please check back soon.',\n primaryClaimAddress: 'default',\n thumbnailChannel: 'default',\n thumbnailChannelId: 'default',\n uploadDirectory: '/home/lbry/Uploads'\n };\n this.configure = function (config) {\n if (!config) {\n return console.log('No site config received.');\n }\n var analytics = config.analytics,\n assetDefaults = config.assetDefaults,\n auth = config.auth,\n componentsConfig = config.componentsConfig,\n details = config.details,\n publishing = config.publishing;\n\n _this.analytics = analytics;\n _this.assetDefaults = assetDefaults;\n _this.auth = auth;\n _this.details = details;\n _this.publishing = publishing;\n _this.componentsConfig = componentsConfig;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-router-dom\");\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Sequelize = __webpack_require__(32);\nvar logger = __webpack_require__(1);\n\nconsole.log('exporting sequelize models');\n\nvar _require = __webpack_require__(29),\n database = _require.database,\n username = _require.username,\n password = _require.password;\n\nvar db = {};\n// set sequelize options\nvar sequelize = new Sequelize(database, username, password, {\n host: 'localhost',\n dialect: 'mysql',\n dialectOptions: { decimalNumbers: true }, // fix to ensure DECIMAL will not be stored as a string\n logging: false,\n pool: {\n max: 5,\n min: 0,\n idle: 10000,\n acquire: 10000\n }\n});\n\n// establish mysql connection\nsequelize.authenticate().then(function () {\n logger.info('Sequelize has established mysql connection successfully.');\n}).catch(function (err) {\n logger.error('Sequelize was unable to connect to the database:', err);\n});\n\n// manually add each model to the db object\nvar Certificate = __webpack_require__(74);\nvar Channel = __webpack_require__(75);\nvar Claim = __webpack_require__(76);\nvar File = __webpack_require__(77);\nvar Request = __webpack_require__(78);\nvar User = __webpack_require__(79);\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(function (modelName) {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = function (Model, values, condition, tableName) {\n return Model.findOne({\n where: condition\n }).then(function (obj) {\n if (obj) {\n // update\n logger.debug('updating record in db.' + tableName);\n return obj.update(values);\n } else {\n // insert\n logger.debug('creating record in db.' + tableName);\n return Model.create(values);\n }\n }).catch(function (error) {\n logger.error(tableName + '.upsert error', error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.default = request;\n\n__webpack_require__(96);\n\n/**\n * Parses the JSON returned by a network request\n *\n * @param {object} response A response from a network request\n *\n * @return {object} The parsed JSON from the request\n */\nfunction parseJSON(response) {\n if (response.status === 204 || response.status === 205) {\n return null;\n }\n return response.json();\n}\n\n/**\n * Parses the status returned by a network request\n *\n * @param {object} response A response from a network request\n * @param {object} response The parsed JSON from the network request\n *\n * @return {object | undefined} Returns object with status and statusText, or undefined\n */\nfunction checkStatus(response, jsonResponse) {\n if (response.status >= 200 && response.status < 300) {\n return jsonResponse;\n }\n var error = new Error(jsonResponse.message);\n error.response = response;\n throw error;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @param {string} url The URL we want to request\n * @param {object} [options] The options we want to pass to \"fetch\"\n *\n * @return {object} The response data\n */\n\nfunction request(url, options) {\n return fetch(url, options).then(function (response) {\n return Promise.all([response, parseJSON(response)]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n response = _ref2[0],\n jsonResponse = _ref2[1];\n\n return checkStatus(response, jsonResponse);\n });\n}\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.onHandleShowPageUri = onHandleShowPageUri;\nexports.onRequestError = onRequestError;\nexports.onNewChannelRequest = onNewChannelRequest;\nexports.onNewAssetRequest = onNewAssetRequest;\nexports.onRequestUpdate = onRequestUpdate;\nexports.addRequestToRequestList = addRequestToRequestList;\nexports.addAssetToAssetList = addAssetToAssetList;\nexports.addNewChannelToChannelList = addNewChannelToChannelList;\nexports.onUpdateChannelClaims = onUpdateChannelClaims;\nexports.updateChannelClaims = updateChannelClaims;\nexports.fileRequested = fileRequested;\nexports.updateFileAvailability = updateFileAvailability;\nexports.updateDisplayAssetError = updateDisplayAssetError;\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show_request_types = __webpack_require__(52);\n\nfunction _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; } }\n\n// basic request parsing\nfunction onHandleShowPageUri(params) {\n return {\n type: actions.HANDLE_SHOW_URI,\n data: params\n };\n};\n\nfunction onRequestError(error) {\n return {\n type: actions.REQUEST_ERROR,\n data: error\n };\n};\n\nfunction onNewChannelRequest(channelName, channelId) {\n var requestType = _show_request_types.CHANNEL;\n var requestId = 'cr#' + channelName + '#' + channelId;\n return {\n type: actions.CHANNEL_REQUEST_NEW,\n data: { requestType: requestType, requestId: requestId, channelName: channelName, channelId: channelId }\n };\n};\n\nfunction onNewAssetRequest(name, id, channelName, channelId, extension) {\n var requestType = extension ? _show_request_types.ASSET_LITE : _show_request_types.ASSET_DETAILS;\n var requestId = 'ar#' + name + '#' + id + '#' + channelName + '#' + channelId;\n return {\n type: actions.ASSET_REQUEST_NEW,\n data: {\n requestType: requestType,\n requestId: requestId,\n name: name,\n modifier: {\n id: id,\n channel: {\n name: channelName,\n id: channelId\n }\n }\n }\n };\n};\n\nfunction onRequestUpdate(requestType, requestId) {\n return {\n type: actions.REQUEST_UPDATE,\n data: {\n requestType: requestType,\n requestId: requestId\n }\n };\n};\n\nfunction addRequestToRequestList(id, error, key) {\n return {\n type: actions.REQUEST_LIST_ADD,\n data: { id: id, error: error, key: key }\n };\n};\n\n// asset actions\n\nfunction addAssetToAssetList(id, error, name, claimId, shortId, claimData) {\n return {\n type: actions.ASSET_ADD,\n data: { id: id, error: error, name: name, claimId: claimId, shortId: shortId, claimData: claimData }\n };\n}\n\n// channel actions\n\nfunction addNewChannelToChannelList(id, name, shortId, longId, claimsData) {\n return {\n type: actions.CHANNEL_ADD,\n data: { id: id, name: name, shortId: shortId, longId: longId, claimsData: claimsData }\n };\n};\n\nfunction onUpdateChannelClaims(channelKey, name, longId, page) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,\n data: { channelKey: channelKey, name: name, longId: longId, page: page }\n };\n};\n\nfunction updateChannelClaims(channelListId, claimsData) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,\n data: { channelListId: channelListId, claimsData: claimsData }\n };\n};\n\n// display a file\n\nfunction fileRequested(name, claimId) {\n return {\n type: actions.FILE_REQUESTED,\n data: { name: name, claimId: claimId }\n };\n};\n\nfunction updateFileAvailability(status) {\n return {\n type: actions.FILE_AVAILABILITY_UPDATE,\n data: status\n };\n};\n\nfunction updateDisplayAssetError(error) {\n return {\n type: actions.DISPLAY_ASSET_ERROR,\n data: error\n };\n};\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _channel = __webpack_require__(24);\n\nvar _publish = __webpack_require__(25);\n\nvar _view = __webpack_require__(98);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel,\n site = _ref.site;\n\n return {\n channelName: channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId: channel.loggedInChannel.longId,\n siteDescription: site.description\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n },\n onChannelLogout: function onChannelLogout() {\n dispatch((0, _channel.updateLoggedInChannel)(null, null, null));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(99);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var site = _ref.site;\n var defaultDescription = site.defaultDescription,\n defaultThumbnail = site.defaultThumbnail,\n siteDescription = site.description,\n siteHost = site.host,\n siteTitle = site.title,\n siteTwitter = site.twitter;\n\n return {\n defaultDescription: defaultDescription,\n defaultThumbnail: defaultThumbnail,\n siteDescription: siteDescription,\n siteHost: siteHost,\n siteTitle: siteTitle,\n siteTwitter: siteTwitter\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"prop-types\");\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n// request actions\nvar HANDLE_SHOW_URI = exports.HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nvar REQUEST_ERROR = exports.REQUEST_ERROR = 'REQUEST_ERROR';\nvar REQUEST_UPDATE = exports.REQUEST_UPDATE = 'REQUEST_UPDATE';\nvar ASSET_REQUEST_NEW = exports.ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nvar CHANNEL_REQUEST_NEW = exports.CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nvar REQUEST_LIST_ADD = exports.REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nvar ASSET_ADD = exports.ASSET_ADD = 'ASSET_ADD';\n\n// channel actions\nvar CHANNEL_ADD = exports.CHANNEL_ADD = 'CHANNEL_ADD';\n\nvar CHANNEL_CLAIMS_UPDATE_ASYNC = exports.CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nvar CHANNEL_CLAIMS_UPDATE_SUCCESS = exports.CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nvar FILE_REQUESTED = exports.FILE_REQUESTED = 'FILE_REQUESTED';\nvar FILE_AVAILABILITY_UPDATE = exports.FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nvar DISPLAY_ASSET_ERROR = exports.DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar selectAsset = exports.selectAsset = function selectAsset(show) {\n var request = show.requestList[show.request.id];\n var assetKey = request.key;\n return show.assetList[assetKey];\n};\n\nvar selectShowState = exports.selectShowState = function selectShowState(state) {\n return state.show;\n};\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-helmet\");\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga/effects\");\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar axios = __webpack_require__(71);\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(72),\n _require$api = _require.api,\n apiHost = _require$api.apiHost,\n apiPort = _require$api.apiPort;\n\nvar lbryApiUri = 'http://' + apiHost + ':' + apiPort;\n\nvar _require2 = __webpack_require__(16),\n chooseGaLbrynetPublishLabel = _require2.chooseGaLbrynetPublishLabel,\n sendGATimingEvent = _require2.sendGATimingEvent;\n\nvar handleLbrynetResponse = function handleLbrynetResponse(_ref, resolve, reject) {\n var data = _ref.data;\n\n logger.debug('lbry api data:', data);\n if (data.result) {\n // check for an error\n if (data.result.error) {\n logger.debug('Lbrynet api error:', data.result.error);\n reject(new Error(data.result.error));\n return;\n };\n resolve(data.result);\n return;\n }\n // fallback in case it just timed out\n reject(JSON.stringify(data));\n};\n\nmodule.exports = {\n publishClaim: function publishClaim(publishParams) {\n logger.debug('lbryApi >> Publishing claim to \"' + publishParams.name + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'publish',\n params: publishParams\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getClaim: function getClaim(uri) {\n logger.debug('lbryApi >> Getting Claim for \"' + uri + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'get',\n params: { uri: uri, timeout: 20 }\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getClaimList: function getClaimList(claimName) {\n logger.debug('lbryApi >> Getting claim_list for \"' + claimName + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'claim_list',\n params: { name: claimName }\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n resolveUri: function resolveUri(uri) {\n logger.debug('lbryApi >> Resolving URI for \"' + uri + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'resolve',\n params: { uri: uri }\n }).then(function (_ref2) {\n var data = _ref2.data;\n\n sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now());\n if (data.result[uri].error) {\n // check for errors\n reject(data.result[uri].error);\n } else {\n // if no errors, resolve\n resolve(data.result[uri]);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getDownloadDirectory: function getDownloadDirectory() {\n logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'settings_get'\n }).then(function (_ref3) {\n var data = _ref3.data;\n\n sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now());\n if (data.result) {\n resolve(data.result.download_directory);\n } else {\n return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.');\n }\n }).catch(function (error) {\n logger.error('Lbrynet Error:', error);\n resolve('/home/lbry/Downloads/');\n });\n });\n },\n createChannel: function createChannel(name) {\n logger.debug('lbryApi >> Creating channel for ' + name + '...');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'channel_new',\n params: {\n channel_name: name,\n amount: 0.1\n }\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\nvar ua = __webpack_require__(73);\n\nvar _require = __webpack_require__(3),\n googleId = _require.analytics.googleId,\n title = _require.details.title;\n\nfunction createServeEventParams(headers, ip, originalUrl) {\n return {\n eventCategory: 'client requests',\n eventAction: 'serve request',\n eventLabel: originalUrl,\n ipOverride: ip,\n userAgentOverride: headers['user-agent']\n };\n};\n\nfunction createPublishTimingEventParams(category, variable, label, startTime, endTime) {\n var duration = endTime - startTime;\n return {\n userTimingCategory: category,\n userTimingVariableName: variable,\n userTimingTime: duration,\n userTimingLabel: label\n };\n};\n\nfunction sendGoogleAnalyticsEvent(ip, params) {\n var visitorId = ip.replace(/\\./g, '-');\n var visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.event(params, function (err) {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n });\n};\n\nfunction sendGoogleAnalyticsTiming(visitorId, params) {\n var visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.timing(params, function (err) {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n logger.debug('Timing event successfully sent to google analytics');\n });\n};\n\nmodule.exports = {\n sendGAServeEvent: function sendGAServeEvent(headers, ip, originalUrl) {\n var params = createServeEventParams(headers, ip, originalUrl);\n sendGoogleAnalyticsEvent(ip, params);\n },\n sendGATimingEvent: function sendGATimingEvent(category, variable, label, startTime, endTime) {\n var params = createPublishTimingEventParams(category, variable, label, startTime, endTime);\n sendGoogleAnalyticsTiming(title, params);\n },\n chooseGaLbrynetPublishLabel: function chooseGaLbrynetPublishLabel(_ref) {\n var channelName = _ref.channel_name,\n channelId = _ref.channel_id;\n\n return channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM';\n }\n};\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux\");\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactGa = __webpack_require__(95);\n\nvar _reactGa2 = _interopRequireDefault(_reactGa);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _require = __webpack_require__(3),\n googleId = _require.analytics.googleId;\n\n_reactGa2.default.initialize(googleId);\n\nvar GAListener = function (_React$Component) {\n _inherits(GAListener, _React$Component);\n\n function GAListener() {\n _classCallCheck(this, GAListener);\n\n return _possibleConstructorReturn(this, (GAListener.__proto__ || Object.getPrototypeOf(GAListener)).apply(this, arguments));\n }\n\n _createClass(GAListener, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n }, {\n key: 'sendPageView',\n value: function sendPageView(location) {\n _reactGa2.default.set({ page: location.pathname });\n _reactGa2.default.pageview(location.pathname);\n }\n }, {\n key: 'render',\n value: function render() {\n return this.props.children;\n }\n }]);\n\n return GAListener;\n}(_react2.default.Component);\n\nexports.default = (0, _reactRouterDom.withRouter)(GAListener);\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _require = __webpack_require__(3),\n componentsConfig = _require.componentsConfig;\n\nfunction getDeepestChildValue(parent, childrenKeys) {\n var childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array\n var child = parent[childKey];\n if (childrenKeys.length >= 1) {\n return getDeepestChildValue(child, childrenKeys);\n }\n return child;\n}\n\nvar dynamicImport = exports.dynamicImport = function dynamicImport(filePath) {\n // validate inputs\n if (!filePath) {\n throw new Error('no file path provided to dynamicImport()');\n }\n if (typeof filePath !== 'string') {\n console.log('dynamicImport > filePath:', filePath);\n console.log('dynamicImport > filePath type:', typeof filePath === 'undefined' ? 'undefined' : _typeof(filePath));\n throw new Error('file path provided to dynamicImport() must be a string');\n }\n if (!componentsConfig) {\n console.log('no componentsConfig found in siteConfig.js');\n return __webpack_require__(44)(\"\" + filePath);\n }\n // split out the file folders // filter out any empty or white-space-only strings\n var folders = filePath.split('/').filter(function (folderName) {\n return folderName.replace(/\\s/g, '').length;\n });\n // check for the component corresponding to file path in the site config object\n // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]]\n var customComponent = getDeepestChildValue(componentsConfig, folders);\n if (customComponent) {\n return customComponent; // return custom component\n } else {\n return __webpack_require__(44)(\"\" + filePath);\n }\n};\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createBasicCanonicalLink = function createBasicCanonicalLink(page, siteHost) {\n return siteHost + \"/\" + page;\n};\n\nvar createAssetCanonicalLink = function createAssetCanonicalLink(asset, siteHost) {\n var channelName = void 0,\n certificateId = void 0,\n name = void 0,\n claimId = void 0;\n if (asset.claimData) {\n var _asset$claimData = asset.claimData;\n channelName = _asset$claimData.channelName;\n certificateId = _asset$claimData.certificateId;\n name = _asset$claimData.name;\n claimId = _asset$claimData.claimId;\n };\n if (channelName) {\n return siteHost + \"/\" + channelName + \":\" + certificateId + \"/\" + name;\n };\n return siteHost + \"/\" + claimId + \"/\" + name;\n};\n\nvar createChannelCanonicalLink = function createChannelCanonicalLink(channel, siteHost) {\n var name = channel.name,\n longId = channel.longId;\n\n return siteHost + \"/\" + name + \":\" + longId;\n};\n\nvar createCanonicalLink = exports.createCanonicalLink = function createCanonicalLink(asset, channel, page, siteHost) {\n if (asset) {\n return createAssetCanonicalLink(asset, siteHost);\n }\n if (channel) {\n return createChannelCanonicalLink(channel, siteHost);\n }\n return createBasicCanonicalLink(page, siteHost);\n};\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex // eslint-disable-line no-unused-vars\n .exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n // Validate and process name\n\n\n if (!value) {\n throw new Error('Check your URL. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('Check your URL. No channel name after \"@\".');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Check your URL. Invalid characters in channel name: \"' + nameBadChars.join(', ') + '\".');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('Check your URL. No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('Check your URL. The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId || null,\n claimId: claimId || null\n };\n },\n parseClaim: function parseClaim(name) {\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first extension)\n '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex // eslint-disable-line no-unused-vars\n .exec(name).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n extensionSeperator = _componentsRegex$exec4[2],\n extension = _componentsRegex$exec4[3];\n\n // Validate and process name\n\n\n if (!claimName) {\n throw new Error('Check your URL. No claim name provided before \".\"');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Check your URL. Invalid characters in claim name: \"' + nameBadChars.join(', ') + '\".');\n }\n // Validate and process extension\n if (extensionSeperator) {\n if (!extension) {\n throw new Error('Check your URL. No file extension provided after separator \"' + extensionSeperator + '\".');\n }\n if (extensionSeperator !== '.') {\n throw new Error('Check your URL. The \"' + extensionSeperator + '\" separator is not supported in the claim name.');\n }\n }\n return {\n claimName: claimName,\n extension: extension || null\n };\n }\n};\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar determineOgThumbnailContentType = function determineOgThumbnailContentType(thumbnail) {\n if (thumbnail) {\n var fileExt = thumbnail.substring(thumbnail.lastIndexOf('.'));\n switch (fileExt) {\n case 'jpeg':\n case 'jpg':\n return 'image/jpeg';\n case 'png':\n return 'image/png';\n case 'gif':\n return 'image/gif';\n case 'mp4':\n return 'video/mp4';\n default:\n return 'image/jpeg';\n }\n }\n return '';\n};\n\nvar createBasicMetaTags = function createBasicMetaTags(siteHost, siteDescription, siteTitle, siteTwitter) {\n return [{ property: 'og:title', content: siteTitle }, { property: 'og:url', content: siteHost }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: siteDescription }, { property: 'twitter:site', content: siteTwitter }, { property: 'twitter:card', content: 'summary' }];\n};\n\nvar createChannelMetaTags = function createChannelMetaTags(siteTitle, siteHost, siteTwitter, channel) {\n var name = channel.name,\n longId = channel.longId;\n\n return [{ property: 'og:title', content: name + ' on ' + siteTitle }, { property: 'og:url', content: siteHost + '/' + name + ':' + longId }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: name + ', a channel on ' + siteTitle }, { property: 'twitter:site', content: siteTwitter }, { property: 'twitter:card', content: 'summary' }];\n};\n\nvar createAssetMetaTags = function createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) {\n var claimData = asset.claimData;\n var contentType = claimData.contentType;\n\n var embedUrl = siteHost + '/' + claimData.claimId + '/' + claimData.name;\n var showUrl = siteHost + '/' + claimData.claimId + '/' + claimData.name;\n var source = siteHost + '/' + claimData.claimId + '/' + claimData.name + '.' + claimData.fileExt;\n var ogTitle = claimData.title || claimData.name;\n var ogDescription = claimData.description || defaultDescription;\n var ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);\n var ogThumbnail = claimData.thumbnail || defaultThumbnail;\n var metaTags = [{ property: 'og:title', content: ogTitle }, { property: 'og:url', content: showUrl }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: ogDescription }, { property: 'og:image:width', content: 600 }, { property: 'og:image:height', content: 315 }, { property: 'twitter:site', content: siteTwitter }];\n if (contentType === 'video/mp4' || contentType === 'video/webm') {\n metaTags.push({ property: 'og:video', content: source });\n metaTags.push({ property: 'og:video:secure_url', content: source });\n metaTags.push({ property: 'og:video:type', content: contentType });\n metaTags.push({ property: 'og:image', content: ogThumbnail });\n metaTags.push({ property: 'og:image:type', content: ogThumbnailContentType });\n metaTags.push({ property: 'og:type', content: 'video' });\n metaTags.push({ property: 'twitter:card', content: 'player' });\n metaTags.push({ property: 'twitter:player', content: embedUrl });\n metaTags.push({ property: 'twitter:player:width', content: 600 });\n metaTags.push({ property: 'twitter:text:player_width', content: 600 });\n metaTags.push({ property: 'twitter:player:height', content: 337 });\n metaTags.push({ property: 'twitter:player:stream', content: source });\n metaTags.push({ property: 'twitter:player:stream:content_type', content: contentType });\n } else {\n metaTags.push({ property: 'og:image', content: source });\n metaTags.push({ property: 'og:image:type', content: contentType });\n metaTags.push({ property: 'og:type', content: 'article' });\n metaTags.push({ property: 'twitter:card', content: 'summary_large_image' });\n }\n return metaTags;\n};\n\nvar createMetaTags = exports.createMetaTags = function createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) {\n if (asset) {\n return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail);\n };\n if (channel) {\n return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel);\n };\n return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter);\n};\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createPageTitle = exports.createPageTitle = function createPageTitle(siteTitle, pageTitle) {\n if (!pageTitle) {\n return \"\" + siteTitle;\n }\n return siteTitle + \" - \" + pageTitle;\n};\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.updateLoggedInChannel = updateLoggedInChannel;\n\nvar _channel_action_types = __webpack_require__(41);\n\nvar actions = _interopRequireWildcard(_channel_action_types);\n\nfunction _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; } }\n\n// export action creators\n\nfunction updateLoggedInChannel(name, shortId, longId) {\n return {\n type: actions.CHANNEL_UPDATE,\n data: {\n name: name,\n shortId: shortId,\n longId: longId\n }\n };\n};\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.selectFile = selectFile;\nexports.clearFile = clearFile;\nexports.updateMetadata = updateMetadata;\nexports.updateClaim = updateClaim;\nexports.setPublishInChannel = setPublishInChannel;\nexports.updatePublishStatus = updatePublishStatus;\nexports.updateError = updateError;\nexports.updateSelectedChannel = updateSelectedChannel;\nexports.toggleMetadataInputs = toggleMetadataInputs;\nexports.onNewThumbnail = onNewThumbnail;\nexports.startPublish = startPublish;\n\nvar _publish_action_types = __webpack_require__(40);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nfunction _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; } }\n\n// export action creators\nfunction selectFile(file) {\n return {\n type: actions.FILE_SELECTED,\n data: file\n };\n};\n\nfunction clearFile() {\n return {\n type: actions.FILE_CLEAR\n };\n};\n\nfunction updateMetadata(name, value) {\n return {\n type: actions.METADATA_UPDATE,\n data: {\n name: name,\n value: value\n }\n };\n};\n\nfunction updateClaim(value) {\n return {\n type: actions.CLAIM_UPDATE,\n data: value\n };\n};\n\nfunction setPublishInChannel(channel) {\n return {\n type: actions.SET_PUBLISH_IN_CHANNEL,\n channel: channel\n };\n};\n\nfunction updatePublishStatus(status, message) {\n return {\n type: actions.PUBLISH_STATUS_UPDATE,\n data: {\n status: status,\n message: message\n }\n };\n};\n\nfunction updateError(name, value) {\n return {\n type: actions.ERROR_UPDATE,\n data: {\n name: name,\n value: value\n }\n };\n};\n\nfunction updateSelectedChannel(channelName) {\n return {\n type: actions.SELECTED_CHANNEL_UPDATE,\n data: channelName\n };\n};\n\nfunction toggleMetadataInputs(showMetadataInputs) {\n return {\n type: actions.TOGGLE_METADATA_INPUTS,\n data: showMetadataInputs\n };\n};\n\nfunction onNewThumbnail(file) {\n return {\n type: actions.THUMBNAIL_NEW,\n data: file\n };\n};\n\nfunction startPublish(history) {\n return {\n type: actions.PUBLISH_START,\n data: { history: history }\n };\n}\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _ActiveStatusBar = __webpack_require__(50);\n\nvar _ActiveStatusBar2 = _interopRequireDefault(_ActiveStatusBar);\n\nvar _InactiveStatusBar = __webpack_require__(51);\n\nvar _InactiveStatusBar2 = _interopRequireDefault(_InactiveStatusBar);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ProgressBar = function (_React$Component) {\n _inherits(ProgressBar, _React$Component);\n\n function ProgressBar(props) {\n _classCallCheck(this, ProgressBar);\n\n var _this = _possibleConstructorReturn(this, (ProgressBar.__proto__ || Object.getPrototypeOf(ProgressBar)).call(this, props));\n\n _this.state = {\n bars: [],\n index: 0,\n incrementer: 1\n };\n _this.createBars = _this.createBars.bind(_this);\n _this.startProgressBar = _this.startProgressBar.bind(_this);\n _this.updateProgressBar = _this.updateProgressBar.bind(_this);\n _this.stopProgressBar = _this.stopProgressBar.bind(_this);\n return _this;\n }\n\n _createClass(ProgressBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.createBars();\n this.startProgressBar();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.stopProgressBar();\n }\n }, {\n key: 'createBars',\n value: function createBars() {\n var bars = [];\n for (var i = 0; i <= this.props.size; i++) {\n bars.push({ isActive: false });\n }\n this.setState({ bars: bars });\n }\n }, {\n key: 'startProgressBar',\n value: function startProgressBar() {\n this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);\n }\n }, {\n key: 'updateProgressBar',\n value: function updateProgressBar() {\n var index = this.state.index;\n var incrementer = this.state.incrementer;\n var bars = this.state.bars;\n // flip incrementer if necessary, to stay in bounds\n if (index < 0 || index > this.props.size) {\n incrementer = incrementer * -1;\n index += incrementer;\n }\n // update the indexed bar\n if (incrementer > 0) {\n bars[index].isActive = true;\n } else {\n bars[index].isActive = false;\n };\n // increment index\n index += incrementer;\n // update state\n this.setState({\n bars: bars,\n incrementer: incrementer,\n index: index\n });\n }\n }, {\n key: 'stopProgressBar',\n value: function stopProgressBar() {\n clearInterval(this.updateInterval);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n this.state.bars.map(function (bar, index) {\n return bar.isActive ? _react2.default.createElement(_ActiveStatusBar2.default, { key: index }) : _react2.default.createElement(_InactiveStatusBar2.default, { key: index });\n })\n );\n }\n }]);\n\n return ProgressBar;\n}(_react2.default.Component);\n\n;\n\nProgressBar.propTypes = {\n size: _propTypes2.default.number.isRequired\n};\n\nexports.default = ProgressBar;\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ErrorPage = function (_React$Component) {\n _inherits(ErrorPage, _React$Component);\n\n function ErrorPage() {\n _classCallCheck(this, ErrorPage);\n\n return _possibleConstructorReturn(this, (ErrorPage.__proto__ || Object.getPrototypeOf(ErrorPage)).apply(this, arguments));\n }\n\n _createClass(ErrorPage, [{\n key: 'render',\n value: function render() {\n var error = this.props.error;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'p',\n null,\n error\n )\n )\n );\n }\n }]);\n\n return ErrorPage;\n}(_react2.default.Component);\n\n;\n\nErrorPage.propTypes = {\n error: _propTypes2.default.string.isRequired\n};\n\nexports.default = ErrorPage;\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"passport\");\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction MysqlConfig() {\n var _this = this;\n\n this.database = 'default';\n this.username = 'default';\n this.password = 'default';\n this.configure = function (config) {\n if (!config) {\n return console.log('No MySQL config received.');\n }\n var database = config.database,\n username = config.username,\n password = config.password;\n\n _this.database = database;\n _this.username = username;\n _this.password = password;\n };\n};\n\nmodule.exports = new MysqlConfig();\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction SlackConfig() {\n var _this = this;\n\n this.slackWebHook = 'default';\n this.slackErrorChannel = 'default';\n this.slackInfoChannel = 'default';\n this.configure = function (config) {\n if (!config) {\n return console.log('No slack config received.');\n }\n var slackWebHook = config.slackWebHook,\n slackErrorChannel = config.slackErrorChannel,\n slackInfoChannel = config.slackInfoChannel;\n\n _this.slackWebHook = slackWebHook;\n _this.slackErrorChannel = slackErrorChannel;\n _this.slackInfoChannel = slackInfoChannel;\n };\n};\n\nmodule.exports = new SlackConfig();\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"passport-local\");\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"sequelize\");\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n returnShortId: function returnShortId(claimsArray, longId) {\n var claimIndex = void 0;\n var shortId = longId.substring(0, 1); // default short id is the first letter\n var shortIdLength = 0;\n // find the index of this claim id\n claimIndex = claimsArray.findIndex(function (element) {\n return element.claimId === longId;\n });\n if (claimIndex < 0) {\n throw new Error('claim id not found in claims list');\n }\n // get an array of all claims with lower height\n var possibleMatches = claimsArray.slice(0, claimIndex);\n // remove certificates with the same prefixes until none are left.\n while (possibleMatches.length > 0) {\n shortIdLength += 1;\n shortId = longId.substring(0, shortIdLength);\n possibleMatches = possibleMatches.filter(function (element) {\n return element.claimId && element.claimId.substring(0, shortIdLength) === shortId;\n });\n }\n return shortId;\n }\n};\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\nvar fs = __webpack_require__(86);\n\nvar _require = __webpack_require__(3),\n details = _require.details,\n publishing = _require.publishing;\n\nmodule.exports = {\n parsePublishApiRequestBody: function parsePublishApiRequestBody(_ref) {\n var name = _ref.name,\n nsfw = _ref.nsfw,\n license = _ref.license,\n title = _ref.title,\n description = _ref.description,\n thumbnail = _ref.thumbnail;\n\n // validate name\n if (!name) {\n throw new Error('no name field found in request');\n }\n var invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name);\n if (invalidNameCharacters) {\n throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and \"-\"');\n }\n // optional parameters\n nsfw = nsfw === 'true';\n license = license || null;\n title = title || null;\n description = description || null;\n thumbnail = thumbnail || null;\n // return results\n return {\n name: name,\n nsfw: nsfw,\n license: license,\n title: title,\n description: description,\n thumbnail: thumbnail\n };\n },\n parsePublishApiRequestFiles: function parsePublishApiRequestFiles(_ref2) {\n var file = _ref2.file,\n thumbnail = _ref2.thumbnail;\n\n // make sure a file was provided\n if (!file) {\n throw new Error('no file with key of [file] found in request');\n }\n if (!file.path) {\n throw new Error('no file path found');\n }\n if (!file.type) {\n throw new Error('no file type found');\n }\n if (!file.size) {\n throw new Error('no file type found');\n }\n // validate the file name\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate the file\n module.exports.validateFileTypeAndSize(file);\n // return results\n return {\n fileName: file.name,\n filePath: file.path,\n fileType: file.type,\n thumbnailFileName: thumbnail ? thumbnail.name : null,\n thumbnailFilePath: thumbnail ? thumbnail.path : null,\n thumbnailFileType: thumbnail ? thumbnail.type : null\n };\n },\n validateFileTypeAndSize: function validateFileTypeAndSize(file) {\n // check file type and size\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n logger.debug('publish > file validation > .jpeg/.jpg/.png was too big');\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .gif was too big');\n throw new Error('Sorry, .gifs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .mp4 was too big');\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n logger.debug('publish > file validation > unrecognized file type');\n throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n return file;\n },\n createBasicPublishParams: function createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail) {\n logger.debug('Creating Publish Parameters');\n // provide defaults for title\n if (title === null || title.trim() === '') {\n title = name;\n }\n // provide default for description\n if (description === null || description.trim() === '') {\n description = '';\n }\n // provide default for license\n if (license === null || license.trim() === '') {\n license = ' '; // default to empty string\n }\n // create the publish params\n var publishParams = {\n name: name,\n file_path: filePath,\n bid: 0.01,\n metadata: {\n description: description,\n title: title,\n author: details.title,\n language: 'en',\n license: license,\n nsfw: nsfw\n },\n claim_address: publishing.primaryClaimAddress\n };\n // add thumbnail to channel if video\n if (thumbnail) {\n publishParams['metadata']['thumbnail'] = thumbnail;\n }\n return publishParams;\n },\n createThumbnailPublishParams: function createThumbnailPublishParams(thumbnailFilePath, claimName, license, nsfw) {\n if (!thumbnailFilePath) {\n return;\n }\n logger.debug('Creating Thumbnail Publish Parameters');\n // create the publish params\n return {\n name: claimName + '-thumb',\n file_path: thumbnailFilePath,\n bid: 0.01,\n metadata: {\n title: claimName + ' thumbnail',\n description: 'a thumbnail for ' + claimName,\n author: details.title,\n language: 'en',\n license: license,\n nsfw: nsfw\n },\n claim_address: publishing.primaryClaimAddress,\n channel_name: publishing.thumbnailChannel,\n channel_id: publishing.thumbnailChannelId\n };\n },\n deleteTemporaryFile: function deleteTemporaryFile(filePath) {\n fs.unlink(filePath, function (err) {\n if (err) {\n logger.error('error deleting temporary file ' + filePath);\n throw err;\n }\n logger.debug('successfully deleted ' + filePath);\n });\n },\n addGetResultsToFileData: function addGetResultsToFileData(fileInfo, getResult) {\n fileInfo.fileName = getResult.file_name;\n fileInfo.filePath = getResult.download_path;\n return fileInfo;\n },\n createFileData: function createFileData(_ref3) {\n var name = _ref3.name,\n claimId = _ref3.claimId,\n outpoint = _ref3.outpoint,\n height = _ref3.height,\n address = _ref3.address,\n nsfw = _ref3.nsfw,\n contentType = _ref3.contentType;\n\n return {\n name: name,\n claimId: claimId,\n outpoint: outpoint,\n height: height,\n address: address,\n fileName: '',\n filePath: '',\n fileType: contentType,\n nsfw: nsfw\n };\n }\n};\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n handleErrorResponse: function handleErrorResponse(originalUrl, ip, error, res) {\n logger.error('Error on ' + originalUrl, module.exports.useObjectPropertiesIfNoKeys(error));\n\n var _module$exports$retur = module.exports.returnErrorMessageAndStatus(error),\n _module$exports$retur2 = _slicedToArray(_module$exports$retur, 2),\n status = _module$exports$retur2[0],\n message = _module$exports$retur2[1];\n\n res.status(status).json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function returnErrorMessageAndStatus(error) {\n var status = void 0,\n message = void 0;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function useObjectPropertiesIfNoKeys(err) {\n if (Object.keys(err).length === 0) {\n var newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach(function (key) {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload: function createErrorResponsePayload(status, message) {\n return {\n status: status,\n success: false,\n message: message\n };\n }\n};\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar db = __webpack_require__(5);\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(88),\n returnPaginatedChannelClaims = _require.returnPaginatedChannelClaims;\n\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\nvar NO_FILE = 'NO_FILE';\n\nmodule.exports = {\n getClaimId: function getClaimId(channelName, channelClaimId, name, claimId) {\n if (channelName) {\n return module.exports.getClaimIdByChannel(channelName, channelClaimId, name);\n } else {\n return module.exports.getClaimIdByClaim(name, claimId);\n }\n },\n getClaimIdByClaim: function getClaimIdByClaim(claimName, claimId) {\n logger.debug('getClaimIdByClaim(' + claimName + ', ' + claimId + ')');\n return new Promise(function (resolve, reject) {\n db.Claim.getLongClaimId(claimName, claimId).then(function (longClaimId) {\n if (!longClaimId) {\n resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getClaimIdByChannel: function getClaimIdByChannel(channelName, channelClaimId, claimName) {\n logger.debug('getClaimIdByChannel(' + channelName + ', ' + channelClaimId + ', ' + claimName + ')');\n return new Promise(function (resolve, reject) {\n db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id\n .then(function (longChannelId) {\n if (!longChannelId) {\n return [null, null];\n }\n return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n longChannelId = _ref2[0],\n longClaimId = _ref2[1];\n\n if (!longChannelId) {\n return resolve(NO_CHANNEL);\n }\n if (!longClaimId) {\n return resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getChannelData: function getChannelData(channelName, channelClaimId, page) {\n return new Promise(function (resolve, reject) {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId).then(function (longChannelClaimId) {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]);\n }).then(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n longChannelClaimId = _ref4[0],\n shortChannelClaimId = _ref4[1];\n\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. return all the channel information\n resolve({\n channelName: channelName,\n longChannelClaimId: longChannelClaimId,\n shortChannelClaimId: shortChannelClaimId\n });\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getChannelClaims: function getChannelClaims(channelName, channelClaimId, page) {\n return new Promise(function (resolve, reject) {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId).then(function (longChannelClaimId) {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]);\n }).then(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n longChannelClaimId = _ref6[0],\n channelClaimsArray = _ref6[1];\n\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. format the data for the view, including pagination\n var paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);\n // 4. return all the channel information and contents\n resolve(paginatedChannelViewData);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getLocalFileRecord: function getLocalFileRecord(claimId, name) {\n return db.File.findOne({ where: { claimId: claimId, name: name } }).then(function (file) {\n if (!file) {\n return NO_FILE;\n }\n return file.dataValues;\n });\n }\n};\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(38);\n\nvar _redux = __webpack_require__(17);\n\nvar _index = __webpack_require__(39);\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _index3 = __webpack_require__(18);\n\nvar _index4 = _interopRequireDefault(_index3);\n\nvar _app = __webpack_require__(43);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(55);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_index2.default);\n\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _index4.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `` was rendered\n return res.redirect(301, context.url);\n } else {}\n // we're good, send the response\n\n\n // get the initial state from our Redux store\n var preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send((0, _renderFullPage2.default)(helmet, html, preloadedState));\n};\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-dom/server\");\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _redux = __webpack_require__(17);\n\nvar _publish = __webpack_require__(90);\n\nvar _publish2 = _interopRequireDefault(_publish);\n\nvar _channel = __webpack_require__(92);\n\nvar _channel2 = _interopRequireDefault(_channel);\n\nvar _show = __webpack_require__(93);\n\nvar _show2 = _interopRequireDefault(_show);\n\nvar _site = __webpack_require__(94);\n\nvar _site2 = _interopRequireDefault(_site);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = (0, _redux.combineReducers)({\n channel: _channel2.default,\n publish: _publish2.default,\n show: _show2.default,\n site: _site2.default\n});\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar FILE_SELECTED = exports.FILE_SELECTED = 'FILE_SELECTED';\nvar FILE_CLEAR = exports.FILE_CLEAR = 'FILE_CLEAR';\nvar METADATA_UPDATE = exports.METADATA_UPDATE = 'METADATA_UPDATE';\nvar CLAIM_UPDATE = exports.CLAIM_UPDATE = 'CLAIM_UPDATE';\nvar SET_PUBLISH_IN_CHANNEL = exports.SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';\nvar PUBLISH_STATUS_UPDATE = exports.PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';\nvar ERROR_UPDATE = exports.ERROR_UPDATE = 'ERROR_UPDATE';\nvar SELECTED_CHANNEL_UPDATE = exports.SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';\nvar TOGGLE_METADATA_INPUTS = exports.TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';\nvar THUMBNAIL_NEW = exports.THUMBNAIL_NEW = 'THUMBNAIL_NEW';\nvar PUBLISH_START = exports.PUBLISH_START = 'PUBLISH_START';\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar CHANNEL_UPDATE = exports.CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOCAL_CHECK = exports.LOCAL_CHECK = 'LOCAL_CHECK';\nvar UNAVAILABLE = exports.UNAVAILABLE = 'UNAVAILABLE';\nvar ERROR = exports.ERROR = 'ERROR';\nvar AVAILABLE = exports.AVAILABLE = 'AVAILABLE';\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _dynamicImport = __webpack_require__(19);\n\nvar _AboutPage = __webpack_require__(97);\n\nvar _AboutPage2 = _interopRequireDefault(_AboutPage);\n\nvar _LoginPage = __webpack_require__(100);\n\nvar _LoginPage2 = _interopRequireDefault(_LoginPage);\n\nvar _ShowPage = __webpack_require__(106);\n\nvar _ShowPage2 = _interopRequireDefault(_ShowPage);\n\nvar _FourOhFourPage = __webpack_require__(122);\n\nvar _FourOhFourPage2 = _interopRequireDefault(_FourOhFourPage);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HomePage = (0, _dynamicImport.dynamicImport)('pages/HomePage'); // or use the provided local homepage\n\nvar App = function App() {\n return _react2.default.createElement(\n _reactRouterDom.Switch,\n null,\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/', component: HomePage }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/about', component: _AboutPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/login', component: _LoginPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/:identifier/:claim', component: _ShowPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/:claim', component: _ShowPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { component: _FourOhFourPage2.default })\n );\n};\n\nexports.default = App;\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./canonicalLink\": 20,\n\t\"./canonicalLink.js\": 20,\n\t\"./dynamicImport\": 19,\n\t\"./dynamicImport.js\": 19,\n\t\"./file\": 45,\n\t\"./file.js\": 45,\n\t\"./lbryUri\": 21,\n\t\"./lbryUri.js\": 21,\n\t\"./metaTags\": 22,\n\t\"./metaTags.js\": 22,\n\t\"./pageTitle\": 23,\n\t\"./pageTitle.js\": 23,\n\t\"./publish\": 46,\n\t\"./publish.js\": 46,\n\t\"./request\": 6,\n\t\"./request.js\": 6,\n\t\"./validate\": 47,\n\t\"./validate.js\": 47\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 44;\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n validateFile: function validateFile(file) {\n if (!file) {\n throw new Error('no file provided');\n }\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate size and type\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n throw new Error('Sorry, GIFs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n }\n};\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createPublishMetadata = exports.createPublishMetadata = function createPublishMetadata(claim, _ref, _ref2, publishInChannel, selectedChannel) {\n var type = _ref.type;\n var title = _ref2.title,\n description = _ref2.description,\n license = _ref2.license,\n nsfw = _ref2.nsfw;\n\n var metadata = {\n name: claim,\n title: title,\n description: description,\n license: license,\n nsfw: nsfw,\n type: type\n };\n if (publishInChannel) {\n metadata['channelName'] = selectedChannel;\n }\n return metadata;\n};\n\nvar createPublishFormData = exports.createPublishFormData = function createPublishFormData(file, thumbnail, metadata) {\n var fd = new FormData();\n // append file\n fd.append('file', file);\n // append thumbnail\n if (thumbnail) {\n fd.append('thumbnail', thumbnail);\n }\n // append metadata\n for (var key in metadata) {\n if (metadata.hasOwnProperty(key)) {\n fd.append(key, metadata[key]);\n }\n }\n return fd;\n};\n\nvar createThumbnailUrl = exports.createThumbnailUrl = function createThumbnailUrl(channel, channelId, claim, host) {\n return host + '/' + channel + ':' + channelId + '/' + claim + '-thumb.png';\n};\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar validateChannelSelection = exports.validateChannelSelection = function validateChannelSelection(publishInChannel, selectedChannel, loggedInChannel) {\n if (publishInChannel && selectedChannel !== loggedInChannel.name) {\n throw new Error('Log in to a channel or select Anonymous');\n }\n};\n\nvar validatePublishParams = exports.validatePublishParams = function validatePublishParams(file, claim, urlError) {\n if (!file) {\n throw new Error('Please choose a file');\n }\n if (!claim) {\n throw new Error('Please enter a URL');\n }\n if (urlError) {\n throw new Error('Fix the url');\n }\n};\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Logo() {\n return _react2.default.createElement(\n 'svg',\n { version: '1.1', id: 'Layer_1', x: '0px', y: '0px', height: '24px', viewBox: '0 0 80 31', enableBackground: 'new 0 0 80 31', className: 'nav-bar-logo' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: '/' },\n _react2.default.createElement(\n 'title',\n null,\n 'Logo'\n ),\n _react2.default.createElement(\n 'desc',\n null,\n 'Spee.ch logo'\n ),\n _react2.default.createElement(\n 'g',\n { id: 'About' },\n _react2.default.createElement(\n 'g',\n { id: 'Publish-Form-V2-_x28_filled_x29_', transform: 'translate(-42.000000, -23.000000)' },\n _react2.default.createElement(\n 'g',\n { id: 'Group-17', transform: 'translate(42.000000, 22.000000)' },\n _react2.default.createElement(\n 'text',\n { transform: 'matrix(1 0 0 1 0 20)', fontSize: '25', fontFamily: 'Roboto' },\n 'Spee\\n \\n \\n \\n \\n \\n \\n ' + helmet.title.toString() + '\\n ' + helmet.meta.toString() + '\\n ' + helmet.link.toString() + '\\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n
' + html + '
\\n
\\n \\n \\n \\n \\n ';\n};\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar selectSiteState = exports.selectSiteState = function selectSiteState(state) {\n return state.site;\n};\n\nvar selectSiteHost = exports.selectSiteHost = function selectSiteHost(state) {\n return state.site.host;\n};\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(58);\n__webpack_require__(59);\nmodule.exports = __webpack_require__(60);\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"babel-polyfill\");\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"whatwg-fetch\");\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar server = __webpack_require__(61);\nvar components = __webpack_require__(139);\n// const containers = require('client/containers');\n// const pages = require('client/pages');\n\nvar _exports = {\n SpeechServer: server,\n Components: components\n // containers,\n // pages,\n};\n\nmodule.exports = _exports;\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// app dependencies\nvar express = __webpack_require__(62);\nvar bodyParser = __webpack_require__(63);\nvar expressHandlebars = __webpack_require__(64);\nvar Handlebars = __webpack_require__(65);\nvar helmet = __webpack_require__(66);\nvar passport = __webpack_require__(28);\n\nvar _require = __webpack_require__(67),\n serializeSpeechUser = _require.serializeSpeechUser,\n deserializeSpeechUser = _require.deserializeSpeechUser;\n\nvar cookieSession = __webpack_require__(68);\nvar http = __webpack_require__(69);\n// logging dependencies\nvar logger = __webpack_require__(1);\n\nfunction SpeechServer() {\n var _this = this;\n\n this.configureMysql = function (mysqlConfig) {\n __webpack_require__(29).configure(mysqlConfig);\n };\n this.configureSite = function (siteConfig) {\n __webpack_require__(3).configure(siteConfig);\n console.log(__webpack_require__(3));\n _this.sessionKey = siteConfig.auth.sessionKey;\n _this.PORT = siteConfig.details.port;\n };\n this.configureSlack = function (slackConfig) {\n __webpack_require__(30).configure(slackConfig);\n };\n this.createApp = function () {\n // create an Express application\n var app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(__dirname + '/public')); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use(function (req, res, next) {\n // custom logging middleware to log all incoming http requests\n logger.verbose('Request on ' + req.originalUrl + ' from ' + req.ip);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n var localSignupStrategy = __webpack_require__(70);\n var localLoginStrategy = __webpack_require__(81);\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name: 'session',\n keys: [_this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000 // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n var hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars: Handlebars\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n __webpack_require__(82)(app);\n __webpack_require__(83)(app);\n __webpack_require__(89)(app);\n __webpack_require__(124)(app);\n __webpack_require__(134)(app);\n\n _this.app = app;\n };\n this.initialize = function () {\n __webpack_require__(135)(logger);\n __webpack_require__(137)(logger);\n _this.createApp();\n _this.server = http.Server(_this.app);\n };\n this.start = function () {\n var db = __webpack_require__(5);\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(function () {\n _this.server.listen(_this.PORT, function () {\n logger.info('Server is listening on PORT ' + _this.PORT);\n });\n }).catch(function (error) {\n logger.error('Startup Error:', error);\n });\n };\n};\n\nmodule.exports = SpeechServer;\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express\");\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"body-parser\");\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express-handlebars\");\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"handlebars\");\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"helmet\");\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n serializeSpeechUser: function serializeSpeechUser(user, done) {\n // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser: function deserializeSpeechUser(user, done) {\n // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n }\n};\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cookie-session\");\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"http\");\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar PassportLocalStrategy = __webpack_require__(31).Strategy;\nvar lbryApi = __webpack_require__(15);\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n logger.verbose('new channel signup request. user: ' + username + ' pass: ' + password + ' .');\n var userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel('@' + username).then(function (tx) {\n // create user record\n var userData = {\n userName: username,\n password: password\n };\n logger.verbose('userData >', userData);\n // create user record\n var channelData = {\n channelName: '@' + username,\n channelClaimId: tx.claim_id\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n var certificateData = {\n claimId: tx.claim_id,\n name: '@' + username\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 3),\n newUser = _ref2[0],\n newChannel = _ref2[1],\n newCertificate = _ref2[2];\n\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n }).then(function () {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n }).catch(function (error) {\n logger.error('signup error', error);\n return done(error);\n });\n});\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"axios\");\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279'\n }\n};\n\nmodule.exports = lbryConfig;\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"universal-analytics\");\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(33),\n returnShortId = _require.returnShortId;\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Certificate = sequelize.define('Certificate', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateVersion: {\n type: STRING,\n default: null\n },\n keyType: {\n type: STRING,\n default: null\n },\n publicKey: {\n type: TEXT('long'),\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Certificate.associate = function (db) {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n var _this = this;\n\n logger.debug('getShortChannelIdFromLongChannelId ' + channelName + ':' + longChannelId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: channelName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n var _this2 = this;\n\n logger.debug('getLongChannelIdFromShortChannelId(' + channelName + ', ' + channelClaimId + ')');\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: {\n name: channelName,\n claimId: {\n $like: channelClaimId + '%'\n }\n },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n var _this3 = this;\n\n logger.debug('getLongChannelIdFromChannelName(' + channelName + ')');\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n var _this4 = this;\n\n logger.debug('validateLongChannelId(' + name + ', ' + claimId + ')');\n return new Promise(function (resolve, reject) {\n _this4.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug('getLongChannelId(' + channelName + ', ' + channelClaimId + ')');\n if (channelClaimId && channelClaimId.length === 40) {\n // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) {\n // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var Channel = sequelize.define('Channel', {\n channelName: {\n type: STRING,\n allowNull: false\n },\n channelClaimId: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n Channel.associate = function (db) {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n/***/ }),\n/* 76 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(33),\n returnShortId = _require.returnShortId;\n\nvar _require2 = __webpack_require__(3),\n defaultThumbnail = _require2.assetDefaults.thumbnail,\n host = _require2.details.host;\n\nfunction determineFileExtensionFromContentType(contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail(storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData(claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Claim = sequelize.define('Claim', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateId: {\n type: STRING,\n default: null\n },\n author: {\n type: STRING,\n default: null\n },\n description: {\n type: TEXT('long'),\n default: null\n },\n language: {\n type: STRING,\n default: null\n },\n license: {\n type: STRING,\n default: null\n },\n licenseUrl: {\n type: STRING,\n default: null\n },\n nsfw: {\n type: BOOLEAN,\n default: null\n },\n preview: {\n type: STRING,\n default: null\n },\n thumbnail: {\n type: STRING,\n default: null\n },\n title: {\n type: STRING,\n default: null\n },\n metadataVersion: {\n type: STRING,\n default: null\n },\n contentType: {\n type: STRING,\n default: null\n },\n source: {\n type: STRING,\n default: null\n },\n sourceType: {\n type: STRING,\n default: null\n },\n sourceVersion: {\n type: STRING,\n default: null\n },\n streamVersion: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n channelName: {\n type: STRING,\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Claim.associate = function (db) {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n var _this = this;\n\n logger.debug('Claim.getShortClaimIdFromLongClaimId for ' + claimName + '#' + claimId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: claimName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n var _this2 = this;\n\n logger.debug('Claim.getAllChannelClaims for ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw: true // returns an array of only data, not an array of instances\n }).then(function (channelClaimsArray) {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(function (claim) {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n var _this3 = this;\n\n logger.debug('finding claim id for claim ' + claimName + ' from channel ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(result.length + ' records found for \"' + claimName + '\" in channel \"' + channelClaimId + '\"');\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n var _this4 = this;\n\n return new Promise(function (resolve, reject) {\n _this4.findAll({\n where: {\n name: name,\n claimId: {\n $like: shortId + '%'\n } },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n var _this5 = this;\n\n return new Promise(function (resolve, reject) {\n _this5.findAll({\n where: { name: name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] // note: maybe height and effective amount need to switch?\n }).then(function (result) {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n var _this6 = this;\n\n return new Promise(function (resolve, reject) {\n _this6.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug('getLongClaimId(' + claimName + ', ' + claimId + ')');\n if (claimId && claimId.length === 40) {\n // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n var _this7 = this;\n\n logger.debug('Claim.resolveClaim: ' + name + ' ' + claimId);\n return new Promise(function (resolve, reject) {\n _this7.findAll({\n where: { name: name, claimId: claimId }\n }).then(function (claimArray) {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error('more than one record matches ' + name + '#' + claimId + ' in db.Claim');\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER;\n\n var File = sequelize.define('File', {\n name: {\n type: STRING,\n allowNull: false\n },\n claimId: {\n type: STRING,\n allowNull: false\n },\n address: {\n type: STRING,\n allowNull: false\n },\n outpoint: {\n type: STRING,\n allowNull: false\n },\n height: {\n type: INTEGER,\n allowNull: false,\n default: 0\n },\n fileName: {\n type: STRING,\n allowNull: false\n },\n filePath: {\n type: STRING,\n allowNull: false\n },\n fileType: {\n type: STRING\n },\n nsfw: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: false\n },\n trendingEligible: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: true\n }\n }, {\n freezeTableName: true\n });\n\n File.associate = function (db) {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25\n });\n };\n\n return File;\n};\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n TEXT = _ref.TEXT;\n\n var Request = sequelize.define('Request', {\n action: {\n type: STRING,\n allowNull: false\n },\n url: {\n type: STRING,\n allowNull: false\n },\n ipAddress: {\n type: STRING,\n allowNull: true\n },\n result: {\n type: TEXT('long'),\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Request.associate = function (db) {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n return Request;\n};\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar bcrypt = __webpack_require__(80);\nvar logger = __webpack_require__(1);\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var User = sequelize.define('User', {\n userName: {\n type: STRING,\n allowNull: false\n },\n password: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n User.associate = function (db) {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n _this.update({ password: hash }).then(function () {\n resolve();\n }).catch(function (error) {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', function (user, options) {\n logger.debug('User.beforeCreate hook...');\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"bcrypt\");\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PassportLocalStrategy = __webpack_require__(31).Strategy;\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\n\nvar returnUserAndChannelInfo = function returnUserAndChannelInfo(userInstance) {\n return new Promise(function (resolve, reject) {\n var userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance.getChannel().then(function (_ref) {\n var channelName = _ref.channelName,\n channelClaimId = _ref.channelClaimId;\n\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n }).catch(function (error) {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n return db.User.findOne({\n where: { userName: username }\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n return user.comparePassword(password).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user).then(function (userInfo) {\n return done(null, userInfo);\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return done(error);\n });\n});\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\nvar passport = __webpack_require__(28);\n\nmodule.exports = function (app) {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), function (req, res) {\n logger.verbose('successful signup for ' + req.user.channelName);\n res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n // route for log in\n app.post('/login', function (req, res, next) {\n passport.authenticate('local-login', function (err, user, info) {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message\n });\n }\n logger.debug('successful login');\n req.logIn(user, function (err) {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', function (req, res) {\n req.logout();\n res.status(200).json({ success: true, message: 'you successfully logged out' });\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', function (req, res) {\n if (req.user) {\n res.status(200).json({ success: true, data: req.user });\n } else {\n res.status(401).json({ success: false, message: 'user is not logged in' });\n }\n });\n};\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(1);\nvar multipart = __webpack_require__(84);\n\nvar _require = __webpack_require__(3),\n uploadDirectory = _require.publishing.uploadDirectory,\n host = _require.details.host;\n\nvar multipartMiddleware = multipart({ uploadDir: uploadDirectory });\nvar db = __webpack_require__(5);\n\nvar _require2 = __webpack_require__(85),\n claimNameIsAvailable = _require2.claimNameIsAvailable,\n checkChannelAvailability = _require2.checkChannelAvailability,\n publish = _require2.publish;\n\nvar _require3 = __webpack_require__(15),\n getClaimList = _require3.getClaimList,\n resolveUri = _require3.resolveUri,\n getClaim = _require3.getClaim;\n\nvar _require4 = __webpack_require__(34),\n addGetResultsToFileData = _require4.addGetResultsToFileData,\n createBasicPublishParams = _require4.createBasicPublishParams,\n createThumbnailPublishParams = _require4.createThumbnailPublishParams,\n parsePublishApiRequestBody = _require4.parsePublishApiRequestBody,\n parsePublishApiRequestFiles = _require4.parsePublishApiRequestFiles,\n createFileData = _require4.createFileData;\n\nvar errorHandlers = __webpack_require__(35);\n\nvar _require5 = __webpack_require__(16),\n sendGATimingEvent = _require5.sendGATimingEvent;\n\nvar _require6 = __webpack_require__(87),\n authenticateUser = _require6.authenticateUser;\n\nvar _require7 = __webpack_require__(36),\n getChannelData = _require7.getChannelData,\n getChannelClaims = _require7.getChannelClaims,\n getClaimId = _require7.getClaimId;\n\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = function (app) {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', function (_ref, res) {\n var ip = _ref.ip,\n originalUrl = _ref.originalUrl,\n name = _ref.params.name;\n\n var gaStartTime = Date.now();\n checkChannelAvailability(name).then(function (availableName) {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', function (_ref2, res) {\n var ip = _ref2.ip,\n originalUrl = _ref2.originalUrl,\n params = _ref2.params;\n\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name).then(function (shortId) {\n res.status(200).json(shortId);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', function (_ref3, res) {\n var ip = _ref3.ip,\n originalUrl = _ref3.originalUrl,\n body = _ref3.body,\n params = _ref3.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', function (_ref4, res) {\n var ip = _ref4.ip,\n originalUrl = _ref4.originalUrl,\n body = _ref4.body,\n params = _ref4.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n var page = params.page;\n getChannelClaims(channelName, channelClaimId, page).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', function (_ref5, res) {\n var ip = _ref5.ip,\n originalUrl = _ref5.originalUrl,\n params = _ref5.params;\n\n getClaimList(params.name).then(function (claimsList) {\n res.status(200).json(claimsList);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', function (_ref6, res) {\n var ip = _ref6.ip,\n originalUrl = _ref6.originalUrl,\n params = _ref6.params;\n\n var name = params.name;\n var claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId).then(function (resolveResult) {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n var fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(name + '#' + claimId)]);\n }).then(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n fileData = _ref8[0],\n getResult = _ref8[1];\n\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, { name: name, claimId: claimId }, 'File'), getResult]);\n }).then(function (_ref9) {\n var _ref10 = _slicedToArray(_ref9, 2),\n fileRecord = _ref10[0],\n _ref10$ = _ref10[1],\n message = _ref10$.message,\n completed = _ref10$.completed;\n\n res.status(200).json({ success: true, message: message, completed: completed });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', function (_ref11, res) {\n var ip = _ref11.ip,\n originalUrl = _ref11.originalUrl,\n name = _ref11.params.name;\n\n var gaStartTime = Date.now();\n claimNameIsAvailable(name).then(function (result) {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', function (_ref12, res) {\n var headers = _ref12.headers,\n ip = _ref12.ip,\n originalUrl = _ref12.originalUrl,\n params = _ref12.params;\n\n resolveUri(params.name + '#' + params.claimId).then(function (resolvedUri) {\n res.status(200).json(resolvedUri);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, function (_ref13, res) {\n var body = _ref13.body,\n files = _ref13.files,\n headers = _ref13.headers,\n ip = _ref13.ip,\n originalUrl = _ref13.originalUrl,\n user = _ref13.user;\n\n // define variables\n var channelName = void 0,\n channelId = void 0,\n channelPassword = void 0,\n description = void 0,\n fileName = void 0,\n filePath = void 0,\n fileType = void 0,\n gaStartTime = void 0,\n license = void 0,\n name = void 0,\n nsfw = void 0,\n thumbnail = void 0,\n thumbnailFileName = void 0,\n thumbnailFilePath = void 0,\n thumbnailFileType = void 0,\n title = void 0;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n var _parsePublishApiReque = parsePublishApiRequestBody(body);\n // validateApiPublishRequest(body, files);\n\n\n name = _parsePublishApiReque.name;\n nsfw = _parsePublishApiReque.nsfw;\n license = _parsePublishApiReque.license;\n title = _parsePublishApiReque.title;\n description = _parsePublishApiReque.description;\n thumbnail = _parsePublishApiReque.thumbnail;\n\n var _parsePublishApiReque2 = parsePublishApiRequestFiles(files);\n\n fileName = _parsePublishApiReque2.fileName;\n filePath = _parsePublishApiReque2.filePath;\n fileType = _parsePublishApiReque2.fileType;\n thumbnailFileName = _parsePublishApiReque2.thumbnailFileName;\n thumbnailFilePath = _parsePublishApiReque2.thumbnailFilePath;\n thumbnailFileType = _parsePublishApiReque2.thumbnailFileType;\n channelName = body.channelName;\n channelId = body.channelId;\n channelPassword = body.channelPassword;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // check channel authorization\n Promise.all([authenticateUser(channelName, channelId, channelPassword, user), claimNameIsAvailable(name), createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail), createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw)]).then(function (_ref14) {\n var _ref15 = _slicedToArray(_ref14, 4),\n _ref15$ = _ref15[0],\n channelName = _ref15$.channelName,\n channelClaimId = _ref15$.channelClaimId,\n validatedClaimName = _ref15[1],\n publishParams = _ref15[2],\n thumbnailPublishParams = _ref15[3];\n\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n }).then(function (result) {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data: {\n name: name,\n claimId: result.claim_id,\n url: host + '/' + result.claim_id + '/' + name,\n lbryTx: result\n }\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', function (_ref16, res) {\n var ip = _ref16.ip,\n originalUrl = _ref16.originalUrl,\n body = _ref16.body,\n params = _ref16.params;\n\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name).then(function (shortId) {\n res.status(200).json({ success: true, data: shortId });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', function (_ref17, res) {\n var ip = _ref17.ip,\n originalUrl = _ref17.originalUrl,\n body = _ref17.body,\n params = _ref17.params;\n\n logger.debug('body:', body);\n var channelName = body.channelName;\n var channelClaimId = body.channelClaimId;\n var claimName = body.claimName;\n var claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (result) {\n if (result === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel could be found' });\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'No matching claim id could be found' });\n }\n res.status(200).json({ success: true, data: result });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', function (_ref18, res) {\n var ip = _ref18.ip,\n originalUrl = _ref18.originalUrl,\n body = _ref18.body,\n params = _ref18.params;\n\n var claimName = params.claimName;\n var claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId).then(function (claimInfo) {\n if (!claimInfo) {\n return res.status(404).json({ success: false, message: 'No claim could be found' });\n }\n res.status(200).json({ success: true, data: claimInfo });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', function (_ref19, res) {\n var ip = _ref19.ip,\n originalUrl = _ref19.originalUrl,\n params = _ref19.params;\n\n var name = params.name;\n var claimId = params.claimId;\n db.File.findOne({ where: { name: name, claimId: claimId } }).then(function (result) {\n if (result) {\n return res.status(200).json({ success: true, data: true });\n }\n res.status(200).json({ success: true, data: false });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"connect-multiparty\");\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _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; }\n\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\nvar lbryApi = __webpack_require__(15);\nvar publishHelpers = __webpack_require__(34);\n\nvar _require = __webpack_require__(3),\n _require$publishing = _require.publishing,\n primaryClaimAddress = _require$publishing.primaryClaimAddress,\n additionalClaimAddresses = _require$publishing.additionalClaimAddresses;\n\nvar Sequelize = __webpack_require__(32);\nvar Op = Sequelize.Op;\n\nmodule.exports = {\n publish: function publish(publishParams, fileName, fileType) {\n return new Promise(function (resolve, reject) {\n var publishResults = void 0,\n certificateId = void 0,\n channelName = void 0;\n // publish the file\n return lbryApi.publishClaim(publishParams).then(function (tx) {\n logger.info('Successfully published ' + publishParams.name + ' ' + fileName, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug('this claim was published in channel: ' + publishParams.channel_name);\n return db.Channel.findOne({ where: { channelName: publishParams.channel_name } });\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n }).then(function (channel) {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug('certificateId: ' + certificateId);\n }).then(function () {\n // create the File record\n var fileRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n fileName: fileName,\n filePath: publishParams.file_path,\n fileType: fileType,\n nsfw: publishParams.metadata.nsfw\n };\n // create the Claim record\n var claimRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n thumbnail: publishParams.metadata.thumbnail,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n contentType: fileType,\n nsfw: publishParams.metadata.nsfw,\n amount: publishParams.bid,\n certificateId: certificateId,\n channelName: channelName\n };\n // upsert criteria\n var upsertCriteria = {\n name: publishParams.name,\n claimId: publishResults.claim_id\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n file = _ref2[0],\n claim = _ref2[1];\n\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n }).then(function () {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n }).catch(function (error) {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable: function claimNameIsAvailable(name) {\n var claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim.findAll({\n attributes: ['address'],\n where: {\n name: name,\n address: _defineProperty({}, Op.or, claimAddresses)\n }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n }).catch(function (error) {\n throw error;\n });\n },\n checkChannelAvailability: function checkChannelAvailability(name) {\n return db.Channel.findAll({\n where: { channelName: name }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n }).catch(function (error) {\n throw error;\n });\n }\n};\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"fs\");\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar db = __webpack_require__(5);\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n authenticateUser: function authenticateUser(channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName: null,\n channelClaimId: null\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName: user.channelName,\n channelClaimId: user.channelClaimId\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials: function authenticateChannelCredentials(channelName, channelId, userPassword) {\n return new Promise(function (resolve, reject) {\n // hoisted variables\n var channelData = void 0;\n // build the params for finding the channel\n var channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel.findOne({\n where: channelFindParams\n }).then(function (channel) {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) }\n });\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n }).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims: function returnPaginatedChannelClaims(channelName, longChannelClaimId, claims, page) {\n var totalPages = module.exports.determineTotalPages(claims);\n var paginationPage = module.exports.getPageFromQuery(page);\n var viewData = {\n channelName: channelName,\n longChannelClaimId: longChannelClaimId,\n claims: module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage: module.exports.determinePreviousPage(paginationPage),\n currentPage: paginationPage,\n nextPage: module.exports.determineNextPage(totalPages, paginationPage),\n totalPages: totalPages,\n totalResults: module.exports.determineTotalClaims(claims)\n };\n return viewData;\n },\n getPageFromQuery: function getPageFromQuery(page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims: function extractPageFromClaims(claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n var claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n var claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n var pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages: function determineTotalPages(claims) {\n if (!claims) {\n return 0;\n } else {\n var totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n var fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n var remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage: function determinePreviousPage(currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage: function determineNextPage(totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims: function determineTotalClaims(claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n }\n};\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(3),\n host = _require.details;\n\nvar handlePageRender = __webpack_require__(37);\n\nmodule.exports = function (app) {\n // route for the home page\n app.get('/', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', function (req, res) {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', function (req, res) {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', function (req, res) {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', function (_ref, res) {\n var params = _ref.params;\n\n var claimId = params.claimId;\n var name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host: host, claimId: claimId, name: name });\n });\n};\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data\n });\n default:\n return state;\n }\n};\n\nvar _publish_action_types = __webpack_require__(40);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nvar _publish_channel_select_states = __webpack_require__(91);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar _require = __webpack_require__(3),\n publishing = _require.publishing;\n\nvar initialState = {\n disabled: publishing.disabled,\n disabledMessage: publishing.disabledMessage,\n publishInChannel: false,\n selectedChannel: _publish_channel_select_states.LOGIN,\n showMetadataInputs: false,\n status: {\n status: null,\n message: null\n },\n error: {\n file: null,\n url: null,\n channel: null,\n publishSubmit: null\n },\n file: null,\n claim: '',\n metadata: {\n title: '',\n description: '',\n license: '',\n nsfw: false\n },\n thumbnail: null\n};\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOGIN = exports.LOGIN = 'Existing';\nvar CREATE = exports.CREATE = 'New';\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data\n });\n default:\n return state;\n }\n};\n\nvar _channel_action_types = __webpack_require__(41);\n\nvar actions = _interopRequireWildcard(_channel_action_types);\n\nfunction _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; } }\n\nvar initialState = {\n loggedInChannel: {\n name: null,\n shortId: null,\n longId: null\n }\n};\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data\n })\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id: action.data.requestId\n })\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n key: action.data.key\n }))\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n name: action.data.name,\n claimId: action.data.claimId,\n shortId: action.data.shortId,\n claimData: action.data.claimData\n }))\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.id, {\n name: action.data.name,\n longId: action.data.longId,\n shortId: action.data.shortId,\n claimsData: action.data.claimsData\n }))\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.channelListId, Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData\n })))\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data\n })\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error: action.data,\n status: _asset_display_states.ERROR\n })\n });\n default:\n return state;\n }\n};\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _asset_display_states = __webpack_require__(42);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar initialState = {\n request: {\n error: null,\n type: null,\n id: null\n },\n requestList: {},\n channelList: {},\n assetList: {},\n displayAsset: {\n error: null,\n status: _asset_display_states.LOCAL_CHECK\n }\n};\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n default:\n return state;\n }\n};\n\nvar siteConfig = __webpack_require__(3);\n\nvar googleAnalyticsId = siteConfig.analytics.googleId,\n _siteConfig$assetDefa = siteConfig.assetDefaults,\n defaultThumbnail = _siteConfig$assetDefa.thumbnail,\n defaultDescription = _siteConfig$assetDefa.description,\n _siteConfig$details = siteConfig.details,\n description = _siteConfig$details.description,\n host = _siteConfig$details.host,\n title = _siteConfig$details.title,\n twitter = _siteConfig$details.twitter;\n\n\nvar initialState = {\n description: description,\n googleAnalyticsId: googleAnalyticsId,\n host: host,\n title: title,\n twitter: twitter,\n defaultDescription: defaultDescription,\n defaultThumbnail: defaultThumbnail\n};\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-ga\");\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cross-fetch/polyfill\");\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AboutPage = function (_React$Component) {\n _inherits(AboutPage, _React$Component);\n\n function AboutPage() {\n _classCallCheck(this, AboutPage);\n\n return _possibleConstructorReturn(this, (AboutPage.__proto__ || Object.getPrototypeOf(AboutPage)).apply(this, arguments));\n }\n\n _createClass(AboutPage, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'About', pageUri: 'about' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n { className: 'pull-quote' },\n 'Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/spee_ch' },\n 'TWITTER'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch' },\n 'GITHUB'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://discord.gg/YjYbwhS' },\n 'DISCORD CHANNEL'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch/blob/master/README.md' },\n 'DOCUMENTATION'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a media-hosting site that reads from and publishes content to the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io' },\n 'LBRY'\n ),\n ' blockchain.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io/get' },\n 'LBRY'\n ),\n ' network. This means that your images are stored in multiple locations without a single point of failure.'\n ),\n _react2.default.createElement(\n 'h3',\n null,\n 'Contribute'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you have an idea for your own spee.ch-like site on top of LBRY, fork our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch' },\n 'github repo'\n ),\n ' and go to town!'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you want to improve spee.ch, join our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS' },\n 'discord channel'\n ),\n ' or solve one of our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch/issues' },\n 'github issues'\n ),\n '.'\n )\n )\n )\n )\n );\n }\n }]);\n\n return AboutPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = AboutPage;\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _Logo = __webpack_require__(48);\n\nvar _Logo2 = _interopRequireDefault(_Logo);\n\nvar _NavBarChannelOptionsDropdown = __webpack_require__(49);\n\nvar _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar VIEW = 'VIEW';\nvar LOGOUT = 'LOGOUT';\n\nvar NavBar = function (_React$Component) {\n _inherits(NavBar, _React$Component);\n\n function NavBar(props) {\n _classCallCheck(this, NavBar);\n\n var _this = _possibleConstructorReturn(this, (NavBar.__proto__ || Object.getPrototypeOf(NavBar)).call(this, props));\n\n _this.checkForLoggedInUser = _this.checkForLoggedInUser.bind(_this);\n _this.logoutUser = _this.logoutUser.bind(_this);\n _this.handleSelection = _this.handleSelection.bind(_this);\n return _this;\n }\n\n _createClass(NavBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n }, {\n key: 'checkForLoggedInUser',\n value: function checkForLoggedInUser() {\n var _this2 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/user', params).then(function (_ref) {\n var data = _ref.data;\n\n _this2.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n }).catch(function (error) {\n console.log('/user error:', error.message);\n });\n }\n }, {\n key: 'logoutUser',\n value: function logoutUser() {\n var _this3 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/logout', params).then(function () {\n _this3.props.onChannelLogout();\n }).catch(function (error) {\n console.log('/logout error', error.message);\n });\n }\n }, {\n key: 'handleSelection',\n value: function handleSelection(event) {\n var value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push('/' + this.props.channelName + ':' + this.props.channelLongId);\n break;\n default:\n break;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var siteDescription = this.props.siteDescription;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--wide nav-bar' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--short flex-container--row flex-container--space-between-center' },\n _react2.default.createElement(_Logo2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--center' },\n _react2.default.createElement(\n 'span',\n { className: 'nav-bar-tagline' },\n siteDescription\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--right' },\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/', exact: true },\n 'Publish'\n ),\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/about' },\n 'About'\n ),\n this.props.channelName ? _react2.default.createElement(_NavBarChannelOptionsDropdown2.default, {\n channelName: this.props.channelName,\n handleSelection: this.handleSelection,\n defaultSelection: this.props.channelName,\n VIEW: VIEW,\n LOGOUT: LOGOUT\n }) : _react2.default.createElement(\n _reactRouterDom.NavLink,\n { id: 'nav-bar-login-link', className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/login' },\n 'Channel'\n )\n )\n )\n );\n }\n }]);\n\n return NavBar;\n}(_react2.default.Component);\n\nexports.default = (0, _reactRouterDom.withRouter)(NavBar);\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _pageTitle = __webpack_require__(23);\n\nvar _metaTags = __webpack_require__(22);\n\nvar _canonicalLink = __webpack_require__(20);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SEO = function (_React$Component) {\n _inherits(SEO, _React$Component);\n\n function SEO() {\n _classCallCheck(this, SEO);\n\n return _possibleConstructorReturn(this, (SEO.__proto__ || Object.getPrototypeOf(SEO)).apply(this, arguments));\n }\n\n _createClass(SEO, [{\n key: 'render',\n value: function render() {\n // props from state\n var _props = this.props,\n defaultDescription = _props.defaultDescription,\n defaultThumbnail = _props.defaultThumbnail,\n siteDescription = _props.siteDescription,\n siteHost = _props.siteHost,\n siteTitle = _props.siteTitle,\n siteTwitter = _props.siteTwitter;\n // props from parent\n\n var _props2 = this.props,\n asset = _props2.asset,\n channel = _props2.channel,\n pageUri = _props2.pageUri;\n var pageTitle = this.props.pageTitle;\n // create page title, tags, and canonical link\n\n pageTitle = (0, _pageTitle.createPageTitle)(siteTitle, pageTitle);\n var metaTags = (0, _metaTags.createMetaTags)(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n var canonicalLink = (0, _canonicalLink.createCanonicalLink)(asset, channel, pageUri, siteHost);\n // render results\n return _react2.default.createElement(_reactHelmet2.default, {\n title: pageTitle,\n meta: metaTags,\n link: [{ rel: 'canonical', href: canonicalLink }]\n });\n }\n }]);\n\n return SEO;\n}(_react2.default.Component);\n\n;\n\nSEO.propTypes = {\n pageTitle: _propTypes2.default.string,\n pageUri: _propTypes2.default.string,\n channel: _propTypes2.default.object,\n asset: _propTypes2.default.object\n};\n\nexports.default = SEO;\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(101);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel;\n\n return {\n loggedInChannelName: channel.loggedInChannel.name\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelLoginForm = __webpack_require__(102);\n\nvar _ChannelLoginForm2 = _interopRequireDefault(_ChannelLoginForm);\n\nvar _ChannelCreateForm = __webpack_require__(104);\n\nvar _ChannelCreateForm2 = _interopRequireDefault(_ChannelCreateForm);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar LoginPage = function (_React$Component) {\n _inherits(LoginPage, _React$Component);\n\n function LoginPage() {\n _classCallCheck(this, LoginPage);\n\n return _possibleConstructorReturn(this, (LoginPage.__proto__ || Object.getPrototypeOf(LoginPage)).apply(this, arguments));\n }\n\n _createClass(LoginPage, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push('/');\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'Login', pageUri: 'login' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you\\'re ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: '/@catalonia2017:43dcf47163caa21d8404d9fe9b30f78ef3e146a8' },\n 'documenting important events'\n ),\n ', or making a public repository for ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: '/@catGifs' },\n 'cat gifs'\n ),\n ' (password: \\'1234\\'), try creating a channel for it!'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'h3',\n { className: 'h3--no-bottom' },\n 'Log in to an existing channel:'\n ),\n _react2.default.createElement(_ChannelLoginForm2.default, null),\n _react2.default.createElement(\n 'h3',\n { className: 'h3--no-bottom' },\n 'Create a brand new channel:'\n ),\n _react2.default.createElement(_ChannelCreateForm2.default, null)\n )\n )\n )\n );\n }\n }]);\n\n return LoginPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = (0, _reactRouterDom.withRouter)(LoginPage);\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _channel = __webpack_require__(24);\n\nvar _view = __webpack_require__(103);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(25);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 103 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelLoginForm = function (_React$Component) {\n _inherits(ChannelLoginForm, _React$Component);\n\n function ChannelLoginForm(props) {\n _classCallCheck(this, ChannelLoginForm);\n\n var _this = _possibleConstructorReturn(this, (ChannelLoginForm.__proto__ || Object.getPrototypeOf(ChannelLoginForm)).call(this, props));\n\n _this.state = {\n error: null,\n name: '',\n password: ''\n };\n _this.handleInput = _this.handleInput.bind(_this);\n _this.loginToChannel = _this.loginToChannel.bind(_this);\n return _this;\n }\n\n _createClass(ChannelLoginForm, [{\n key: 'handleInput',\n value: function handleInput(event) {\n var name = event.target.name;\n var value = event.target.value;\n this.setState(_defineProperty({}, name, value));\n }\n }, {\n key: 'loginToChannel',\n value: function loginToChannel(event) {\n var _this2 = this;\n\n event.preventDefault();\n var params = {\n method: 'POST',\n body: JSON.stringify({ username: this.state.name, password: this.state.password }),\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n credentials: 'include'\n };\n (0, _request2.default)('login', params).then(function (_ref) {\n var success = _ref.success,\n channelName = _ref.channelName,\n shortChannelId = _ref.shortChannelId,\n channelClaimId = _ref.channelClaimId,\n message = _ref.message;\n\n if (success) {\n _this2.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n _this2.setState({ 'error': message });\n };\n }).catch(function (error) {\n if (error.message) {\n _this2.setState({ 'error': error.message });\n } else {\n _this2.setState({ 'error': error });\n }\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'form',\n { id: 'channel-login-form' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-login-name-input' },\n 'Name:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary flex-container--row flex-container--left-bottom' },\n _react2.default.createElement(\n 'span',\n null,\n '@'\n ),\n _react2.default.createElement('input', { type: 'text', id: 'channel-login-name-input', className: 'input-text', name: 'name', placeholder: 'Your Channel Name', value: this.state.channelName, onChange: this.handleInput })\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-login-password-input' },\n 'Password:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary' },\n _react2.default.createElement('input', { type: 'password', id: 'channel-login-password-input', name: 'password', className: 'input-text', placeholder: '', value: this.state.channelPassword, onChange: this.handleInput })\n )\n )\n ),\n this.state.error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.state.error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Enter the name and password for your channel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary', onClick: this.loginToChannel },\n 'Authenticate'\n )\n )\n );\n }\n }]);\n\n return ChannelLoginForm;\n}(_react2.default.Component);\n\nexports.default = ChannelLoginForm;\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _channel = __webpack_require__(24);\n\nvar _view = __webpack_require__(105);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(25);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(26);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelCreateForm = function (_React$Component) {\n _inherits(ChannelCreateForm, _React$Component);\n\n function ChannelCreateForm(props) {\n _classCallCheck(this, ChannelCreateForm);\n\n var _this = _possibleConstructorReturn(this, (ChannelCreateForm.__proto__ || Object.getPrototypeOf(ChannelCreateForm)).call(this, props));\n\n _this.state = {\n error: null,\n channel: '',\n password: '',\n status: null\n };\n _this.handleChannelInput = _this.handleChannelInput.bind(_this);\n _this.handleInput = _this.handleInput.bind(_this);\n _this.createChannel = _this.createChannel.bind(_this);\n return _this;\n }\n\n _createClass(ChannelCreateForm, [{\n key: 'cleanseChannelInput',\n value: function cleanseChannelInput(input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n }, {\n key: 'handleChannelInput',\n value: function handleChannelInput(event) {\n var value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({ channel: value });\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({ error: 'Please enter a channel name' });\n }\n }\n }, {\n key: 'handleInput',\n value: function handleInput(event) {\n var name = event.target.name;\n var value = event.target.value;\n this.setState(_defineProperty({}, name, value));\n }\n }, {\n key: 'updateIsChannelAvailable',\n value: function updateIsChannelAvailable(channel) {\n var _this2 = this;\n\n var channelWithAtSymbol = '@' + channel;\n (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol).then(function () {\n _this2.setState({ 'error': null });\n }).catch(function (error) {\n _this2.setState({ 'error': error.message });\n });\n }\n }, {\n key: 'checkIsChannelAvailable',\n value: function checkIsChannelAvailable(channel) {\n var channelWithAtSymbol = '@' + channel;\n return (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol);\n }\n }, {\n key: 'checkIsPasswordProvided',\n value: function checkIsPasswordProvided(password) {\n return new Promise(function (resolve, reject) {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n }, {\n key: 'makePublishChannelRequest',\n value: function makePublishChannelRequest(username, password) {\n var params = {\n method: 'POST',\n body: JSON.stringify({ username: username, password: password }),\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n credentials: 'include'\n };\n return new Promise(function (resolve, reject) {\n (0, _request2.default)('/signup', params).then(function (result) {\n return resolve(result);\n }).catch(function (error) {\n reject(new Error('Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ' + error.message));\n });\n });\n }\n }, {\n key: 'createChannel',\n value: function createChannel(event) {\n var _this3 = this;\n\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password).then(function () {\n return _this3.checkIsChannelAvailable(_this3.state.channel);\n }).then(function () {\n _this3.setState({ status: 'We are publishing your new channel. Sit tight...' });\n return _this3.makePublishChannelRequest(_this3.state.channel, _this3.state.password);\n }).then(function (result) {\n _this3.setState({ status: null });\n _this3.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n }).catch(function (error) {\n if (error.message) {\n _this3.setState({ 'error': error.message, status: null });\n } else {\n _this3.setState({ 'error': error, status: null });\n };\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n !this.state.status ? _react2.default.createElement(\n 'form',\n { id: 'publish-channel-form' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'new-channel-name' },\n 'Name:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary flex-container--row flex-container--left-bottom span--relative' },\n _react2.default.createElement(\n 'span',\n null,\n '@'\n ),\n _react2.default.createElement('input', { type: 'text', name: 'channel', id: 'new-channel-name', className: 'input-text', placeholder: 'exampleChannelName', value: this.state.channel, onChange: this.handleChannelInput }),\n this.state.channel && !this.state.error && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--success span--absolute' },\n '\\u2713'\n ),\n this.state.error && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--failure span--absolute' },\n '\\u2716'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'new-channel-password' },\n 'Password:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary' },\n _react2.default.createElement('input', { type: 'password', name: 'password', id: 'new-channel-password', className: 'input-text', placeholder: '', value: this.state.password, onChange: this.handleInput })\n )\n )\n ),\n this.state.error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.state.error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Choose a name and password for your channel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary', onClick: this.createChannel },\n 'Create Channel'\n )\n )\n ) : _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n this.state.status\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 })\n )\n );\n }\n }]);\n\n return ChannelCreateForm;\n}(_react2.default.Component);\n\nexports.default = ChannelCreateForm;\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _show = __webpack_require__(7);\n\nvar _view = __webpack_require__(107);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n return {\n error: show.request.error,\n requestType: show.request.type\n };\n};\n\nvar mapDispatchToProps = {\n onHandleShowPageUri: _show.onHandleShowPageUri\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ErrorPage = __webpack_require__(27);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _ShowAssetLite = __webpack_require__(108);\n\nvar _ShowAssetLite2 = _interopRequireDefault(_ShowAssetLite);\n\nvar _ShowAssetDetails = __webpack_require__(111);\n\nvar _ShowAssetDetails2 = _interopRequireDefault(_ShowAssetDetails);\n\nvar _ShowChannel = __webpack_require__(117);\n\nvar _ShowChannel2 = _interopRequireDefault(_ShowChannel);\n\nvar _show_request_types = __webpack_require__(52);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowPage = function (_React$Component) {\n _inherits(ShowPage, _React$Component);\n\n function ShowPage() {\n _classCallCheck(this, ShowPage);\n\n return _possibleConstructorReturn(this, (ShowPage.__proto__ || Object.getPrototypeOf(ShowPage)).apply(this, arguments));\n }\n\n _createClass(ShowPage, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n error = _props.error,\n requestType = _props.requestType;\n\n if (error) {\n return _react2.default.createElement(_ErrorPage2.default, { error: error });\n }\n switch (requestType) {\n case _show_request_types.CHANNEL:\n return _react2.default.createElement(_ShowChannel2.default, null);\n case _show_request_types.ASSET_LITE:\n return _react2.default.createElement(_ShowAssetLite2.default, null);\n case _show_request_types.ASSET_DETAILS:\n return _react2.default.createElement(_ShowAssetDetails2.default, null);\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'loading...'\n );\n }\n }\n }]);\n\n return ShowPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowPage;\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(109);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select asset info\n var asset = void 0;\n var request = show.requestList[requestId] || null;\n var assetList = show.assetList;\n if (request && assetList) {\n var assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset: asset\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _AssetDisplay = __webpack_require__(53);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowLite = function (_React$Component) {\n _inherits(ShowLite, _React$Component);\n\n function ShowLite() {\n _classCallCheck(this, ShowLite);\n\n return _possibleConstructorReturn(this, (ShowLite.__proto__ || Object.getPrototypeOf(ShowLite)).apply(this, arguments));\n }\n\n _createClass(ShowLite, [{\n key: 'render',\n value: function render() {\n var asset = this.props.asset;\n\n if (asset) {\n var _asset$claimData = asset.claimData,\n name = _asset$claimData.name,\n claimId = _asset$claimData.claimId;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column flex-container--center-center show-lite-container' },\n _react2.default.createElement(_SEO2.default, { pageTitle: name, asset: asset }),\n _react2.default.createElement(_AssetDisplay2.default, null),\n _react2.default.createElement(\n _reactRouterDom.Link,\n { id: 'asset-boilerpate', className: 'link--primary fine-print', to: '/' + claimId + '/' + name },\n 'hosted via Spee.ch'\n )\n );\n }\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded flex-container--column flex-container--center-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'loading asset data...'\n )\n );\n }\n }]);\n\n return ShowLite;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowLite;\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(26);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _asset_display_states = __webpack_require__(42);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AssetDisplay = function (_React$Component) {\n _inherits(AssetDisplay, _React$Component);\n\n function AssetDisplay() {\n _classCallCheck(this, AssetDisplay);\n\n return _possibleConstructorReturn(this, (AssetDisplay.__proto__ || Object.getPrototypeOf(AssetDisplay)).apply(this, arguments));\n }\n\n _createClass(AssetDisplay, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props$asset$claimDat = this.props.asset.claimData,\n name = _props$asset$claimDat.name,\n claimId = _props$asset$claimDat.claimId;\n\n this.props.onFileRequest(name, claimId);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n status = _props.status,\n error = _props.error,\n _props$asset$claimDat2 = _props.asset.claimData,\n name = _props$asset$claimDat2.name,\n claimId = _props$asset$claimDat2.claimId,\n contentType = _props$asset$claimDat2.contentType,\n fileExt = _props$asset$claimDat2.fileExt,\n thumbnail = _props$asset$claimDat2.thumbnail;\n\n return _react2.default.createElement(\n 'div',\n { id: 'asset-display-component' },\n status === _asset_display_states.LOCAL_CHECK && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Checking to see if Spee.ch has your asset locally...'\n )\n ),\n status === _asset_display_states.UNAVAILABLE && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Sit tight, we\\'re searching the LBRY blockchain for your asset!'\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 }),\n _react2.default.createElement(\n 'p',\n null,\n 'Curious what magic is happening here? ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: 'blank', href: 'https://lbry.io/faq/what-is-lbry' },\n 'Learn more.'\n )\n )\n ),\n status === _asset_display_states.ERROR && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Unfortunately, we couldn\\'t download your asset from LBRY. You can help us out by sharing the below error message in the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS', target: '_blank' },\n 'LBRY discord'\n ),\n '.'\n ),\n _react2.default.createElement(\n 'i',\n null,\n _react2.default.createElement(\n 'p',\n { id: 'error-message' },\n error\n )\n )\n ),\n status === _asset_display_states.AVAILABLE && function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return _react2.default.createElement('img', {\n className: 'asset',\n src: '/' + claimId + '/' + name + '.' + fileExt,\n alt: name });\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset',\n src: '/' + claimId + '/' + name + '.' + fileExt,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement(\n 'video',\n { className: 'asset video', controls: true, poster: thumbnail },\n _react2.default.createElement('source', {\n src: '/' + claimId + '/' + name + '.' + fileExt\n }),\n _react2.default.createElement(\n 'p',\n null,\n 'Your browser does not support the ',\n _react2.default.createElement(\n 'code',\n null,\n 'video'\n ),\n ' element.'\n )\n );\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'Unsupported file type'\n );\n }\n }()\n );\n }\n }]);\n\n return AssetDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetDisplay;\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(112);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select asset info\n var asset = void 0;\n var request = show.requestList[requestId] || null;\n var assetList = show.assetList;\n if (request && assetList) {\n var assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset: asset\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ErrorPage = __webpack_require__(27);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _AssetTitle = __webpack_require__(113);\n\nvar _AssetTitle2 = _interopRequireDefault(_AssetTitle);\n\nvar _AssetDisplay = __webpack_require__(53);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nvar _AssetInfo = __webpack_require__(115);\n\nvar _AssetInfo2 = _interopRequireDefault(_AssetInfo);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowAssetDetails = function (_React$Component) {\n _inherits(ShowAssetDetails, _React$Component);\n\n function ShowAssetDetails() {\n _classCallCheck(this, ShowAssetDetails);\n\n return _possibleConstructorReturn(this, (ShowAssetDetails.__proto__ || Object.getPrototypeOf(ShowAssetDetails)).apply(this, arguments));\n }\n\n _createClass(ShowAssetDetails, [{\n key: 'render',\n value: function render() {\n var asset = this.props.asset;\n\n if (asset) {\n var name = asset.claimData.name;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name + ' - details', asset: asset }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_AssetTitle2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded show-details-container' },\n _react2.default.createElement(_AssetDisplay2.default, null)\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(_AssetInfo2.default, null)\n )\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading asset data...' });\n }\n }]);\n\n return ShowAssetDetails;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowAssetDetails;\n\n/***/ }),\n/* 113 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(114);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(12);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n var _selectAsset = (0, _show.selectAsset)(show),\n title = _selectAsset.claimData.title;\n\n return {\n title: title\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 114 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetTitle = function AssetTitle(_ref) {\n var title = _ref.title;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'span',\n { className: 'text--large' },\n title\n )\n );\n};\n\nexports.default = AssetTitle;\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(116);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(12);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select asset\n var asset = (0, _show.selectAsset)(show);\n // return props\n return {\n asset: asset\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 116 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AssetInfo = function (_React$Component) {\n _inherits(AssetInfo, _React$Component);\n\n function AssetInfo(props) {\n _classCallCheck(this, AssetInfo);\n\n var _this = _possibleConstructorReturn(this, (AssetInfo.__proto__ || Object.getPrototypeOf(AssetInfo)).call(this, props));\n\n _this.copyToClipboard = _this.copyToClipboard.bind(_this);\n return _this;\n }\n\n _createClass(AssetInfo, [{\n key: 'copyToClipboard',\n value: function copyToClipboard(event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({ error: 'Oops, unable to copy' });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$asset = this.props.asset,\n shortId = _props$asset.shortId,\n _props$asset$claimDat = _props$asset.claimData,\n channelName = _props$asset$claimDat.channelName,\n certificateId = _props$asset$claimDat.certificateId,\n description = _props$asset$claimDat.description,\n name = _props$asset$claimDat.name,\n claimId = _props$asset$claimDat.claimId,\n fileExt = _props$asset$claimDat.fileExt,\n contentType = _props$asset$claimDat.contentType,\n thumbnail = _props$asset$claimDat.thumbnail,\n host = _props$asset$claimDat.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n channelName && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Channel:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: '/' + channelName + ':' + certificateId },\n channelName\n )\n )\n )\n ),\n description && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n description\n )\n ),\n _react2.default.createElement(\n 'div',\n { id: 'show-share-buttons' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Share:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n {\n className: 'row row--short row--wide flex-container--row flex-container--space-between-bottom flex-container--wrap' },\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/intent/tweet?text=' + host + '/' + shortId + '/' + name },\n 'twitter'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://www.facebook.com/sharer/sharer.php?u=' + host + '/' + shortId + '/' + name },\n 'facebook'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'http://tumblr.com/widgets/share/tool?canonicalUrl=' + host + '/' + shortId + '/' + name },\n 'tumblr'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://www.reddit.com/submit?url=' + host + '/' + shortId + '/' + name + '&title=' + name },\n 'reddit'\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { id: 'show-short-link' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Link:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--short row--wide' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'div',\n { className: 'input-error', id: 'input-error-copy-short-link', hidden: 'true' },\n 'error here'\n ),\n _react2.default.createElement('input', { type: 'text', id: 'short-link', className: 'input-disabled input-text--full-width', readOnly: true,\n spellCheck: 'false',\n value: host + '/' + shortId + '/' + name + '.' + fileExt,\n onClick: this.select })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'short-link',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { id: 'show-embed-code' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Embed:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--short row--wide' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'div',\n { className: 'input-error', id: 'input-error-copy-embed-text', hidden: 'true' },\n 'error here'\n ),\n contentType === 'video/mp4' ? _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: '' }) : _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: ''\n })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'embed-text',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex-container--row flex-container--space-between-bottom' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { className: 'link--primary', to: '/' + shortId + '/' + name + '.' + fileExt },\n _react2.default.createElement(\n 'span',\n {\n className: 'text' },\n 'Direct Link'\n )\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: host + '/' + claimId + '/' + name + '.' + fileExt, download: name },\n 'Download'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://lbry.io/dmca' },\n 'Report'\n )\n )\n );\n }\n }]);\n\n return AssetInfo;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetInfo;\n\n/***/ }),\n/* 117 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(118);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select request\n var previousRequest = show.requestList[requestId] || null;\n // select channel\n var channel = void 0;\n if (previousRequest) {\n var channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel: channel\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 118 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _ErrorPage = __webpack_require__(27);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelClaimsDisplay = __webpack_require__(119);\n\nvar _ChannelClaimsDisplay2 = _interopRequireDefault(_ChannelClaimsDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowChannel = function (_React$Component) {\n _inherits(ShowChannel, _React$Component);\n\n function ShowChannel() {\n _classCallCheck(this, ShowChannel);\n\n return _possibleConstructorReturn(this, (ShowChannel.__proto__ || Object.getPrototypeOf(ShowChannel)).apply(this, arguments));\n }\n\n _createClass(ShowChannel, [{\n key: 'render',\n value: function render() {\n var channel = this.props.channel;\n\n if (channel) {\n var name = channel.name,\n longId = channel.longId,\n shortId = channel.shortId;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name, channel: channel }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(\n 'h2',\n null,\n 'channel name: ',\n name\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'full channel id: ',\n longId\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'short channel id: ',\n shortId\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_ChannelClaimsDisplay2.default, null)\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading channel data...' });\n }\n }]);\n\n return ShowChannel;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowChannel;\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _show = __webpack_require__(7);\n\nvar _view = __webpack_require__(120);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select channel key\n var request = show.requestList[show.request.id];\n var channelKey = request.key;\n // select channel claims\n var channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey: channelKey,\n channel: channel\n };\n};\n\nvar mapDispatchToProps = {\n onUpdateChannelClaims: _show.onUpdateChannelClaims\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 120 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _AssetPreview = __webpack_require__(54);\n\nvar _AssetPreview2 = _interopRequireDefault(_AssetPreview);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelClaimsDisplay = function (_React$Component) {\n _inherits(ChannelClaimsDisplay, _React$Component);\n\n function ChannelClaimsDisplay(props) {\n _classCallCheck(this, ChannelClaimsDisplay);\n\n var _this = _possibleConstructorReturn(this, (ChannelClaimsDisplay.__proto__ || Object.getPrototypeOf(ChannelClaimsDisplay)).call(this, props));\n\n _this.showNextResultsPage = _this.showNextResultsPage.bind(_this);\n _this.showPreviousResultsPage = _this.showPreviousResultsPage.bind(_this);\n return _this;\n }\n\n _createClass(ChannelClaimsDisplay, [{\n key: 'showPreviousResultsPage',\n value: function showPreviousResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n }, {\n key: 'showNextResultsPage',\n value: function showNextResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n }, {\n key: 'showNewPage',\n value: function showNewPage(page) {\n var _props = this.props,\n channelKey = _props.channelKey,\n _props$channel = _props.channel,\n name = _props$channel.name,\n longId = _props$channel.longId;\n\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$channel$claims = this.props.channel.claimsData,\n claims = _props$channel$claims.claims,\n currentPage = _props$channel$claims.currentPage,\n totalPages = _props$channel$claims.totalPages;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall' },\n claims.length > 0 ? _react2.default.createElement(\n 'div',\n null,\n claims.map(function (claim, index) {\n return _react2.default.createElement(_AssetPreview2.default, {\n claimData: claim,\n key: claim.name + '-' + index\n });\n }),\n _react2.default.createElement(\n 'div',\n null,\n currentPage > 1 && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showPreviousResultsPage },\n 'Previous Page'\n ),\n currentPage < totalPages && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showNextResultsPage },\n 'Next Page'\n )\n )\n ) : _react2.default.createElement(\n 'p',\n null,\n 'There are no claims in this channel'\n )\n );\n }\n }]);\n\n return ChannelClaimsDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = ChannelClaimsDisplay;\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetPreview = function AssetPreview(_ref) {\n var defaultThumbnail = _ref.defaultThumbnail,\n _ref$claimData = _ref.claimData,\n name = _ref$claimData.name,\n claimId = _ref$claimData.claimId,\n fileExt = _ref$claimData.fileExt,\n contentType = _ref$claimData.contentType,\n thumbnail = _ref$claimData.thumbnail;\n\n var directSourceLink = claimId + '/' + name + '.' + fileExt;\n var showUrlLink = '/' + claimId + '/' + name;\n return _react2.default.createElement(\n 'div',\n { className: 'asset-holder' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: showUrlLink },\n function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset-preview',\n src: directSourceLink,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement('img', {\n className: 'asset-preview video',\n src: thumbnail || defaultThumbnail,\n alt: name\n });\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'unsupported file type'\n );\n }\n }()\n )\n );\n};\n\nexports.default = AssetPreview;\n\n/***/ }),\n/* 122 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(123);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var _ref$site = _ref.site,\n host = _ref$site.host,\n title = _ref$site.title;\n\n return {\n host: host,\n title: title\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar FourOhForPage = function (_React$Component) {\n _inherits(FourOhForPage, _React$Component);\n\n function FourOhForPage() {\n _classCallCheck(this, FourOhForPage);\n\n return _possibleConstructorReturn(this, (FourOhForPage.__proto__ || Object.getPrototypeOf(FourOhForPage)).apply(this, arguments));\n }\n\n _createClass(FourOhForPage, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n title = _props.title,\n host = _props.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n _reactHelmet2.default,\n null,\n _react2.default.createElement(\n 'title',\n null,\n title,\n ' - 404'\n ),\n _react2.default.createElement('link', { rel: 'canonical', href: host + '/404' })\n ),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'h2',\n null,\n '404'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'That page does not exist'\n )\n )\n );\n }\n }]);\n\n return FourOhForPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = FourOhForPage;\n\n/***/ }),\n/* 124 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _require = __webpack_require__(16),\n sendGAServeEvent = _require.sendGAServeEvent;\n\nvar _require2 = __webpack_require__(125),\n determineResponseType = _require2.determineResponseType,\n flipClaimNameAndIdForBackwardsCompatibility = _require2.flipClaimNameAndIdForBackwardsCompatibility,\n logRequestData = _require2.logRequestData,\n getClaimIdAndServeAsset = _require2.getClaimIdAndServeAsset;\n\nvar lbryUri = __webpack_require__(126);\nvar handleShowRender = __webpack_require__(127);\nvar SERVE = 'SERVE';\n\nmodule.exports = function (app) {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // parse the identifier\n var isChannel = void 0,\n channelName = void 0,\n channelClaimId = void 0,\n claimId = void 0;\n try {\n var _lbryUri$parseIdentif = lbryUri.parseIdentifier(params.identifier);\n\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n if (!isChannel) {\n var _flipClaimNameAndIdFo = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n\n var _flipClaimNameAndIdFo2 = _slicedToArray(_flipClaimNameAndIdFo, 2);\n\n claimId = _flipClaimNameAndIdFo2[0];\n claimName = _flipClaimNameAndIdFo2[1];\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie2 = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie2.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim2 = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim2.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(36),\n getClaimId = _require.getClaimId,\n getLocalFileRecord = _require.getLocalFileRecord;\n\nvar _require2 = __webpack_require__(35),\n handleErrorResponse = _require2.handleErrorResponse;\n\nvar SERVE = 'SERVE';\nvar SHOW = 'SHOW';\nvar NO_FILE = 'NO_FILE';\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml(_ref) {\n var accept = _ref.accept;\n\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser(headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset(_ref2) {\n var accept = _ref2.accept,\n range = _ref2.range;\n\n var imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n var videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId(claimId) {\n return claimId.length === 40 && !/[^A-Za-z0-9]/g.test(claimId);\n};\n\nfunction isValidShortId(claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId(input) {\n return isValidClaimId(input) || isValidShortId(input);\n};\n\nfunction serveAssetToClient(claimId, name, res) {\n return getLocalFileRecord(claimId, name).then(function (fileRecord) {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect('/api/claim/get/' + name + '/' + claimId);\n }\n // serve the file\n var filePath = fileRecord.filePath,\n fileType = fileRecord.fileType;\n\n logger.verbose('serving file: ' + filePath);\n var sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type': fileType || 'image/jpeg'\n }\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n }).catch(function (error) {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset: function getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (fullClaimId) {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'no claim id could be found' });\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'no channel id could be found' });\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n }).catch(function (error) {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType: function determineResponseType(hasFileExtension, headers) {\n var responseType = void 0;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) {\n // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) {\n // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility: function flipClaimNameAndIdForBackwardsCompatibility(identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n var tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData: function logRequestData(responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n }\n};\n\n/***/ }),\n/* 126 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n logger.debug('parsing identifier:', identifier);\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex.exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n logger.debug(proto + ', ' + value + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!value) {\n throw new Error('Check your url. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Invalid characters in channel name: ' + nameBadChars.join(', ') + '.');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId,\n claimId: claimId\n };\n },\n parseClaim: function parseClaim(claim) {\n logger.debug('parsing name:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n modifierSeperator = _componentsRegex$exec4[2],\n modifier = _componentsRegex$exec4[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Invalid characters in claim name: ' + nameBadChars.join(', ') + '.');\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No file extension provided after separator ' + modifierSeperator + '.');\n }\n if (modifierSeperator !== '.') {\n throw new Error('The ' + modifierSeperator + ' modifier is not supported in the claim name');\n }\n }\n // return results\n return {\n claimName: claimName\n };\n },\n parseModifier: function parseModifier(claim) {\n logger.debug('parsing modifier:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec5 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec6 = _slicedToArray(_componentsRegex$exec5, 4),\n proto = _componentsRegex$exec6[0],\n claimName = _componentsRegex$exec6[1],\n modifierSeperator = _componentsRegex$exec6[2],\n modifier = _componentsRegex$exec6[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n // Validate and process modifier\n var hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension: hasFileExtension\n };\n }\n};\n\n/***/ }),\n/* 127 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(38);\n\nvar _redux = __webpack_require__(17);\n\nvar _index = __webpack_require__(39);\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _index3 = __webpack_require__(18);\n\nvar _index4 = _interopRequireDefault(_index3);\n\nvar _app = __webpack_require__(43);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(55);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reduxSaga = __webpack_require__(128);\n\nvar _reduxSaga2 = _interopRequireDefault(_reduxSaga);\n\nvar _effects = __webpack_require__(14);\n\nvar _show_uri = __webpack_require__(129);\n\nvar _show = __webpack_require__(7);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar returnSagaWithParams = function returnSagaWithParams(saga, params) {\n return (/*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return (0, _effects.call)(saga, params);\n\n case 2:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n })\n );\n};\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create and apply middleware\n var sagaMiddleware = (0, _reduxSaga2.default)();\n var middleware = (0, _redux.applyMiddleware)(sagaMiddleware);\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_index2.default, middleware);\n\n // create saga\n var action = (0, _show.onHandleShowPageUri)(req.params);\n var saga = returnSagaWithParams(_show_uri.handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware.run(saga).done.then(function () {\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _index4.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n var preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send((0, _renderFullPage2.default)(helmet, html, preloadedState));\n });\n};\n\n/***/ }),\n/* 128 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga\");\n\n/***/ }),\n/* 129 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleShowPageUri = handleShowPageUri;\nexports.watchHandleShowPageUri = watchHandleShowPageUri;\n\nvar _effects = __webpack_require__(14);\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _show_asset = __webpack_require__(130);\n\nvar _show_channel = __webpack_require__(132);\n\nvar _lbryUri = __webpack_require__(21);\n\nvar _lbryUri2 = _interopRequireDefault(_lbryUri);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateIdentifierAndClaim),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateClaimOnly),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(handleShowPageUri),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchHandleShowPageUri);\n\nfunction parseAndUpdateIdentifierAndClaim(modifier, claim) {\n var isChannel, channelName, channelClaimId, claimId, claimName, extension, _lbryUri$parseIdentif, _lbryUri$parseClaim;\n\n return regeneratorRuntime.wrap(function parseAndUpdateIdentifierAndClaim$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n isChannel = void 0, channelName = void 0, channelClaimId = void 0, claimId = void 0, claimName = void 0, extension = void 0;\n _context.prev = 1;\n _lbryUri$parseIdentif = _lbryUri2.default.parseIdentifier(modifier);\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n _lbryUri$parseClaim = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim.claimName;\n extension = _lbryUri$parseClaim.extension;\n _context.next = 17;\n break;\n\n case 12:\n _context.prev = 12;\n _context.t0 = _context['catch'](1);\n _context.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 16:\n return _context.abrupt('return', _context.sent);\n\n case 17:\n if (!isChannel) {\n _context.next = 21;\n break;\n }\n\n _context.next = 20;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, channelName, channelClaimId, extension));\n\n case 20:\n return _context.abrupt('return', _context.sent);\n\n case 21:\n ;\n _context.next = 24;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, claimId, null, null, extension));\n\n case 24:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[1, 12]]);\n}\nfunction parseAndUpdateClaimOnly(claim) {\n var isChannel, channelName, channelClaimId, _lbryUri$parseIdentif2, claimName, extension, _lbryUri$parseClaim2;\n\n return regeneratorRuntime.wrap(function parseAndUpdateClaimOnly$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n isChannel = void 0, channelName = void 0, channelClaimId = void 0;\n _context2.prev = 1;\n _lbryUri$parseIdentif2 = _lbryUri2.default.parseIdentifier(claim);\n isChannel = _lbryUri$parseIdentif2.isChannel;\n channelName = _lbryUri$parseIdentif2.channelName;\n channelClaimId = _lbryUri$parseIdentif2.channelClaimId;\n _context2.next = 13;\n break;\n\n case 8:\n _context2.prev = 8;\n _context2.t0 = _context2['catch'](1);\n _context2.next = 12;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t0.message));\n\n case 12:\n return _context2.abrupt('return', _context2.sent);\n\n case 13:\n if (!isChannel) {\n _context2.next = 17;\n break;\n }\n\n _context2.next = 16;\n return (0, _effects.call)(_show_channel.newChannelRequest, (0, _show.onNewChannelRequest)(channelName, channelClaimId));\n\n case 16:\n return _context2.abrupt('return', _context2.sent);\n\n case 17:\n // if not for a channel, parse the claim request\n claimName = void 0, extension = void 0;\n _context2.prev = 18;\n _lbryUri$parseClaim2 = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim2.claimName;\n extension = _lbryUri$parseClaim2.extension;\n _context2.next = 29;\n break;\n\n case 24:\n _context2.prev = 24;\n _context2.t1 = _context2['catch'](18);\n _context2.next = 28;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t1.message));\n\n case 28:\n return _context2.abrupt('return', _context2.sent);\n\n case 29:\n _context2.next = 31;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, null, null, extension));\n\n case 31:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this, [[1, 8], [18, 24]]);\n}\n\nfunction handleShowPageUri(action) {\n var _action$data, identifier, claim;\n\n return regeneratorRuntime.wrap(function handleShowPageUri$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data = action.data, identifier = _action$data.identifier, claim = _action$data.claim;\n\n if (!identifier) {\n _context3.next = 5;\n break;\n }\n\n _context3.next = 4;\n return (0, _effects.call)(parseAndUpdateIdentifierAndClaim, identifier, claim);\n\n case 4:\n return _context3.abrupt('return', _context3.sent);\n\n case 5:\n _context3.next = 7;\n return (0, _effects.call)(parseAndUpdateClaimOnly, claim);\n\n case 7:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this);\n};\n\nfunction watchHandleShowPageUri() {\n return regeneratorRuntime.wrap(function watchHandleShowPageUri$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.HANDLE_SHOW_URI, handleShowPageUri);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n};\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newAssetRequest = newAssetRequest;\nexports.watchNewAssetRequest = watchNewAssetRequest;\n\nvar _effects = __webpack_require__(14);\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _assetApi = __webpack_require__(131);\n\nvar _show2 = __webpack_require__(12);\n\nvar _site = __webpack_require__(56);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newAssetRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewAssetRequest);\n\nfunction newAssetRequest(action) {\n var _action$data, requestType, requestId, name, modifier, state, host, longId, _ref, assetKey, shortId, _ref2, claimData, _ref3;\n\n return regeneratorRuntime.wrap(function newAssetRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, name = _action$data.name, modifier = _action$data.modifier;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get long id && add request to request list\n longId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_assetApi.getLongClaimId, host, name, modifier);\n\n case 15:\n _ref = _context.sent;\n longId = _ref.data;\n _context.next = 24;\n break;\n\n case 19:\n _context.prev = 19;\n _context.t0 = _context['catch'](12);\n _context.next = 23;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 23:\n return _context.abrupt('return', _context.sent);\n\n case 24:\n assetKey = 'a#' + name + '#' + longId;\n _context.next = 27;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, assetKey));\n\n case 27:\n if (!state.assetList[assetKey]) {\n _context.next = 29;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 29:\n // get short Id\n shortId = void 0;\n _context.prev = 30;\n _context.next = 33;\n return (0, _effects.call)(_assetApi.getShortId, host, name, longId);\n\n case 33:\n _ref2 = _context.sent;\n shortId = _ref2.data;\n _context.next = 42;\n break;\n\n case 37:\n _context.prev = 37;\n _context.t1 = _context['catch'](30);\n _context.next = 41;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 41:\n return _context.abrupt('return', _context.sent);\n\n case 42:\n // get asset claim data\n claimData = void 0;\n _context.prev = 43;\n _context.next = 46;\n return (0, _effects.call)(_assetApi.getClaimData, host, name, longId);\n\n case 46:\n _ref3 = _context.sent;\n claimData = _ref3.data;\n _context.next = 55;\n break;\n\n case 50:\n _context.prev = 50;\n _context.t2 = _context['catch'](43);\n _context.next = 54;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t2.message));\n\n case 54:\n return _context.abrupt('return', _context.sent);\n\n case 55:\n _context.next = 57;\n return (0, _effects.put)((0, _show.addAssetToAssetList)(assetKey, null, name, longId, shortId, claimData));\n\n case 57:\n _context.next = 59;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 59:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 19], [30, 37], [43, 50]]);\n};\n\nfunction watchNewAssetRequest() {\n return regeneratorRuntime.wrap(function watchNewAssetRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.ASSET_REQUEST_NEW, newAssetRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\n/***/ }),\n/* 131 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getLongClaimId = getLongClaimId;\nexports.getShortId = getShortId;\nexports.getClaimData = getClaimData;\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getLongClaimId(host, name, modifier) {\n var body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n var params = {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body)\n };\n // create url\n var url = host + '/api/claim/long-id';\n // return the request promise\n return (0, _request2.default)(url, params);\n};\n\nfunction getShortId(host, name, claimId) {\n var url = host + '/api/claim/short-id/' + claimId + '/' + name;\n return (0, _request2.default)(url);\n};\n\nfunction getClaimData(host, name, claimId) {\n var url = host + '/api/claim/data/' + name + '/' + claimId;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 132 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newChannelRequest = newChannelRequest;\nexports.watchNewChannelRequest = watchNewChannelRequest;\nexports.watchUpdateChannelClaims = watchUpdateChannelClaims;\n\nvar _effects = __webpack_require__(14);\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _channelApi = __webpack_require__(133);\n\nvar _show2 = __webpack_require__(12);\n\nvar _site = __webpack_require__(56);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newChannelRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewChannelRequest),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(getNewClaimsAndUpdateChannel),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchUpdateChannelClaims);\n\nfunction newChannelRequest(action) {\n var _action$data, requestType, requestId, channelName, channelId, state, host, longId, shortId, _ref, _ref$data, channelKey, claimsData, _ref2;\n\n return regeneratorRuntime.wrap(function newChannelRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, channelName = _action$data.channelName, channelId = _action$data.channelId;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get channel long id\n longId = void 0, shortId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_channelApi.getChannelData, host, channelName, channelId);\n\n case 15:\n _ref = _context.sent;\n _ref$data = _ref.data;\n longId = _ref$data.longChannelClaimId;\n shortId = _ref$data.shortChannelClaimId;\n _context.next = 26;\n break;\n\n case 21:\n _context.prev = 21;\n _context.t0 = _context['catch'](12);\n _context.next = 25;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 25:\n return _context.abrupt('return', _context.sent);\n\n case 26:\n // store the request in the channel requests list\n channelKey = 'c#' + channelName + '#' + longId;\n _context.next = 29;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, channelKey));\n\n case 29:\n if (!state.channelList[channelKey]) {\n _context.next = 31;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 31:\n // get channel claims data\n claimsData = void 0;\n _context.prev = 32;\n _context.next = 35;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, channelName, 1);\n\n case 35:\n _ref2 = _context.sent;\n claimsData = _ref2.data;\n _context.next = 44;\n break;\n\n case 39:\n _context.prev = 39;\n _context.t1 = _context['catch'](32);\n _context.next = 43;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 43:\n return _context.abrupt('return', _context.sent);\n\n case 44:\n _context.next = 46;\n return (0, _effects.put)((0, _show.addNewChannelToChannelList)(channelKey, channelName, shortId, longId, claimsData));\n\n case 46:\n _context.next = 48;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 48:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 21], [32, 39]]);\n}\n\nfunction watchNewChannelRequest() {\n return regeneratorRuntime.wrap(function watchNewChannelRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\nfunction getNewClaimsAndUpdateChannel(action) {\n var _action$data2, channelKey, name, longId, page, host, claimsData, _ref3;\n\n return regeneratorRuntime.wrap(function getNewClaimsAndUpdateChannel$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data2 = action.data, channelKey = _action$data2.channelKey, name = _action$data2.name, longId = _action$data2.longId, page = _action$data2.page;\n _context3.next = 3;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 3:\n host = _context3.sent;\n claimsData = void 0;\n _context3.prev = 5;\n _context3.next = 8;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, name, page);\n\n case 8:\n _ref3 = _context3.sent;\n claimsData = _ref3.data;\n _context3.next = 17;\n break;\n\n case 12:\n _context3.prev = 12;\n _context3.t0 = _context3['catch'](5);\n _context3.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context3.t0.message));\n\n case 16:\n return _context3.abrupt('return', _context3.sent);\n\n case 17:\n _context3.next = 19;\n return (0, _effects.put)((0, _show.updateChannelClaims)(channelKey, claimsData));\n\n case 19:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this, [[5, 12]]);\n}\n\nfunction watchUpdateChannelClaims() {\n return regeneratorRuntime.wrap(function watchUpdateChannelClaims$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n}\n\n/***/ }),\n/* 133 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getChannelData = getChannelData;\nexports.getChannelClaims = getChannelClaims;\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getChannelData(host, id, name) {\n if (!id) id = 'none';\n var url = host + '/api/channel/data/' + name + '/' + id;\n return (0, _request2.default)(url);\n};\n\nfunction getChannelClaims(host, longId, name, page) {\n if (!page) page = 1;\n var url = host + '/api/channel/claims/' + name + '/' + longId + '/' + page;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 134 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar handlePageRender = __webpack_require__(37);\n\nmodule.exports = function (app) {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', function (req, res) {\n // send response\n handlePageRender(req, res);\n });\n};\n\n/***/ }),\n/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(136),\n logLevel = _require.logLevel;\n\nmodule.exports = function (winston) {\n // configure\n winston.configure({\n transports: [new winston.transports.Console({\n level: logLevel,\n timestamp: false,\n colorize: true,\n prettyPrint: true,\n handleExceptions: true,\n humanReadableUnhandledException: true\n })]\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n/***/ }),\n/* 136 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar loggerConfig = {\n logLevel: 'debug' // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n/***/ }),\n/* 137 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar winstonSlackWebHook = __webpack_require__(138).SlackWebHook;\nvar slackConfig = __webpack_require__(30);\n\nmodule.exports = function (winston) {\n var slackWebHook = slackConfig.slackWebHook,\n slackErrorChannel = slackConfig.slackErrorChannel,\n slackInfoChannel = slackConfig.slackInfoChannel;\n\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-errors-transport',\n level: 'warn',\n webhookUrl: slackWebHook,\n channel: slackErrorChannel,\n username: 'spee.ch',\n iconEmoji: ':face_with_head_bandage:'\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-info-transport',\n level: 'info',\n webhookUrl: slackWebHook,\n channel: slackInfoChannel,\n username: 'spee.ch',\n iconEmoji: ':nerd_face:'\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n/***/ }),\n/* 138 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston-slack-webhook\");\n\n/***/ }),\n/* 139 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ActiveStatusBar = __webpack_require__(50);\n\nvar _ActiveStatusBar2 = _interopRequireDefault(_ActiveStatusBar);\n\nvar _AssetPreview = __webpack_require__(54);\n\nvar _AssetPreview2 = _interopRequireDefault(_AssetPreview);\n\nvar _ExpandingTextArea = __webpack_require__(140);\n\nvar _ExpandingTextArea2 = _interopRequireDefault(_ExpandingTextArea);\n\nvar _GAListener = __webpack_require__(18);\n\nvar _GAListener2 = _interopRequireDefault(_GAListener);\n\nvar _InactiveStatusBar = __webpack_require__(51);\n\nvar _InactiveStatusBar2 = _interopRequireDefault(_InactiveStatusBar);\n\nvar _Logo = __webpack_require__(48);\n\nvar _Logo2 = _interopRequireDefault(_Logo);\n\nvar _NavBarChannelOptionsDropdown = __webpack_require__(49);\n\nvar _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown);\n\nvar _ProgressBar = __webpack_require__(26);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _PublishPreview = __webpack_require__(141);\n\nvar _PublishPreview2 = _interopRequireDefault(_PublishPreview);\n\nvar _PublishUrlMiddleDisplay = __webpack_require__(142);\n\nvar _PublishUrlMiddleDisplay2 = _interopRequireDefault(_PublishUrlMiddleDisplay);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar components = {\n ActiveStatusBar: _ActiveStatusBar2.default,\n AssetPreview: _AssetPreview2.default,\n ExpandingTextArea: _ExpandingTextArea2.default,\n GAListener: _GAListener2.default,\n InactiveStatusBar: _InactiveStatusBar2.default,\n Logo: _Logo2.default,\n NavBarChannelOptionsDropdown: _NavBarChannelOptionsDropdown2.default,\n ProgressBar: _ProgressBar2.default,\n PublishPreview: _PublishPreview2.default,\n PublishUrlMiddleDisplay: _PublishUrlMiddleDisplay2.default,\n SEO: _SEO2.default\n};\n\nexports.default = components;\n\n/***/ }),\n/* 140 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ExpandingTextarea = function (_Component) {\n _inherits(ExpandingTextarea, _Component);\n\n function ExpandingTextarea(props) {\n _classCallCheck(this, ExpandingTextarea);\n\n var _this = _possibleConstructorReturn(this, (ExpandingTextarea.__proto__ || Object.getPrototypeOf(ExpandingTextarea)).call(this, props));\n\n _this._handleChange = _this._handleChange.bind(_this);\n return _this;\n }\n\n _createClass(ExpandingTextarea, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.adjustTextarea({});\n }\n }, {\n key: '_handleChange',\n value: function _handleChange(event) {\n var onChange = this.props.onChange;\n\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n }, {\n key: 'adjustTextarea',\n value: function adjustTextarea(_ref) {\n var _ref$target = _ref.target,\n target = _ref$target === undefined ? this.el : _ref$target;\n\n target.style.height = 0;\n target.style.height = target.scrollHeight + 'px';\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var rest = _objectWithoutProperties(this.props, []);\n\n return _react2.default.createElement('textarea', _extends({}, rest, {\n ref: function ref(x) {\n return _this2.el = x;\n },\n onChange: this._handleChange\n }));\n }\n }]);\n\n return ExpandingTextarea;\n}(_react.Component);\n\nExpandingTextarea.propTypes = {\n onChange: _propTypes2.default.func\n};\n\nexports.default = ExpandingTextarea;\n\n/***/ }),\n/* 141 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishPreview = function (_React$Component) {\n _inherits(PublishPreview, _React$Component);\n\n function PublishPreview(props) {\n _classCallCheck(this, PublishPreview);\n\n var _this = _possibleConstructorReturn(this, (PublishPreview.__proto__ || Object.getPrototypeOf(PublishPreview)).call(this, props));\n\n _this.state = {\n imgSource: '',\n defaultThumbnail: '/assets/img/video_thumb_default.png'\n };\n return _this;\n }\n\n _createClass(PublishPreview, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.setPreviewImageSource(this.props.file);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({ imgSource: this.state.defaultThumbnail });\n }\n }\n }\n }, {\n key: 'setPreviewImageSourceFromFile',\n value: function setPreviewImageSourceFromFile(file) {\n var _this2 = this;\n\n var previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = function () {\n _this2.setState({ imgSource: previewReader.result });\n };\n }\n }, {\n key: 'setPreviewImageSource',\n value: function setPreviewImageSource(file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({ imgSource: this.state.defaultThumbnail });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement('img', {\n id: 'dropzone-preview',\n src: this.state.imgSource,\n className: this.props.dimPreview ? 'dim' : '',\n alt: 'publish preview'\n });\n }\n }]);\n\n return PublishPreview;\n}(_react2.default.Component);\n\n;\n\nPublishPreview.propTypes = {\n dimPreview: _propTypes2.default.bool.isRequired,\n file: _propTypes2.default.object.isRequired,\n thumbnail: _propTypes2.default.object\n};\n\nexports.default = PublishPreview;\n\n/***/ }),\n/* 142 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction UrlMiddle(_ref) {\n var publishInChannel = _ref.publishInChannel,\n selectedChannel = _ref.selectedChannel,\n loggedInChannelName = _ref.loggedInChannelName,\n loggedInChannelShortId = _ref.loggedInChannelShortId;\n\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return _react2.default.createElement(\n 'span',\n { id: 'url-channel', className: 'url-text--secondary' },\n loggedInChannelName,\n ':',\n loggedInChannelShortId,\n ' /'\n );\n }\n return _react2.default.createElement(\n 'span',\n { id: 'url-channel-placeholder', className: 'url-text--secondary tooltip' },\n '@channel',\n _react2.default.createElement(\n 'span',\n {\n className: 'tooltip-text' },\n 'Select a channel below'\n ),\n ' /'\n );\n }\n return _react2.default.createElement(\n 'span',\n { id: 'url-no-channel-placeholder', className: 'url-text--secondary tooltip' },\n 'xyz',\n _react2.default.createElement(\n 'span',\n { className: 'tooltip-text' },\n 'This will be a random id'\n ),\n ' /'\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel: _propTypes2.default.bool.isRequired,\n loggedInChannelName: _propTypes2.default.string,\n loggedInChannelShortId: _propTypes2.default.string\n};\n\nexports.default = UrlMiddle;\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// index.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 57);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap fbeed617c134f70061c5","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 0\n// module chunks = 0","module.exports = require(\"winston\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston\"\n// module id = 1\n// module chunks = 0","module.exports = require(\"react-redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-redux\"\n// module id = 2\n// module chunks = 0","function SiteConfig () {\n this.analytics = {\n googleId: 'default',\n };\n this.assetDefaults = {\n description: 'An asset published on Spee.ch',\n thumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',\n title : 'Spee.ch',\n };\n this.auth = {\n sessionKey: 'default',\n };\n this.componentsConfig = {\n components: {},\n containers: {},\n pages : {},\n };\n this.details = {\n description: 'Open-source, decentralized image and video sharing.',\n host : 'default',\n port : 3000,\n title : 'Spee.ch',\n twitter : '@spee_ch',\n };\n this.publishing = {\n additionalClaimAddresses: [],\n disabled : false,\n disabledMessage : 'Please check back soon.',\n primaryClaimAddress : 'default',\n thumbnailChannel : 'default',\n thumbnailChannelId : 'default',\n uploadDirectory : '/home/lbry/Uploads',\n };\n this.configure = (config) => {\n if (!config) {\n return console.log('No site config received.');\n }\n const { analytics, assetDefaults, auth, componentsConfig, details, publishing } = config;\n this.analytics = analytics;\n this.assetDefaults = assetDefaults;\n this.auth = auth;\n this.details = details;\n this.publishing = publishing;\n this.componentsConfig = componentsConfig;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/siteConfig.js","module.exports = require(\"react-router-dom\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-router-dom\"\n// module id = 4\n// module chunks = 0","const Sequelize = require('sequelize');\nconst logger = require('winston');\n\nconsole.log('exporting sequelize models');\nconst { database, username, password } = require('../../config/mysqlConfig');\nconst db = {};\n// set sequelize options\nconst sequelize = new Sequelize(database, username, password, {\n host : 'localhost',\n dialect : 'mysql',\n dialectOptions: {decimalNumbers: true}, // fix to ensure DECIMAL will not be stored as a string\n logging : false,\n pool : {\n max : 5,\n min : 0,\n idle : 10000,\n acquire: 10000,\n },\n});\n\n// establish mysql connection\nsequelize\n .authenticate()\n .then(() => {\n logger.info('Sequelize has established mysql connection successfully.');\n })\n .catch(err => {\n logger.error('Sequelize was unable to connect to the database:', err);\n });\n\n// manually add each model to the db object\nconst Certificate = require('./certificate.js');\nconst Channel = require('./channel.js');\nconst Claim = require('./claim.js');\nconst File = require('./file.js');\nconst Request = require('./request.js');\nconst User = require('./user.js');\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(modelName => {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = (Model, values, condition, tableName) => {\n return Model\n .findOne({\n where: condition,\n })\n .then(obj => {\n if (obj) { // update\n logger.debug(`updating record in db.${tableName}`);\n return obj.update(values);\n } else { // insert\n logger.debug(`creating record in db.${tableName}`);\n return Model.create(values);\n }\n })\n .catch(function (error) {\n logger.error(`${tableName}.upsert error`, error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/index.js","import 'cross-fetch/polyfill';\n\n/**\n * Parses the JSON returned by a network request\n *\n * @param {object} response A response from a network request\n *\n * @return {object} The parsed JSON from the request\n */\nfunction parseJSON (response) {\n if (response.status === 204 || response.status === 205) {\n return null;\n }\n return response.json();\n}\n\n/**\n * Parses the status returned by a network request\n *\n * @param {object} response A response from a network request\n * @param {object} response The parsed JSON from the network request\n *\n * @return {object | undefined} Returns object with status and statusText, or undefined\n */\nfunction checkStatus (response, jsonResponse) {\n if (response.status >= 200 && response.status < 300) {\n return jsonResponse;\n }\n const error = new Error(jsonResponse.message);\n error.response = response;\n throw error;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @param {string} url The URL we want to request\n * @param {object} [options] The options we want to pass to \"fetch\"\n *\n * @return {object} The response data\n */\n\nexport default function request (url, options) {\n return fetch(url, options)\n .then(response => {\n return Promise.all([response, parseJSON(response)]);\n })\n .then(([response, jsonResponse]) => {\n return checkStatus(response, jsonResponse);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/request.js","import * as actions from 'constants/show_action_types';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\n// basic request parsing\nexport function onHandleShowPageUri (params) {\n return {\n type: actions.HANDLE_SHOW_URI,\n data: params,\n };\n};\n\nexport function onRequestError (error) {\n return {\n type: actions.REQUEST_ERROR,\n data: error,\n };\n};\n\nexport function onNewChannelRequest (channelName, channelId) {\n const requestType = CHANNEL;\n const requestId = `cr#${channelName}#${channelId}`;\n return {\n type: actions.CHANNEL_REQUEST_NEW,\n data: { requestType, requestId, channelName, channelId },\n };\n};\n\nexport function onNewAssetRequest (name, id, channelName, channelId, extension) {\n const requestType = extension ? ASSET_LITE : ASSET_DETAILS;\n const requestId = `ar#${name}#${id}#${channelName}#${channelId}`;\n return {\n type: actions.ASSET_REQUEST_NEW,\n data: {\n requestType,\n requestId,\n name,\n modifier: {\n id,\n channel: {\n name: channelName,\n id : channelId,\n },\n },\n },\n };\n};\n\nexport function onRequestUpdate (requestType, requestId) {\n return {\n type: actions.REQUEST_UPDATE,\n data: {\n requestType,\n requestId,\n },\n };\n};\n\nexport function addRequestToRequestList (id, error, key) {\n return {\n type: actions.REQUEST_LIST_ADD,\n data: { id, error, key },\n };\n};\n\n// asset actions\n\nexport function addAssetToAssetList (id, error, name, claimId, shortId, claimData) {\n return {\n type: actions.ASSET_ADD,\n data: { id, error, name, claimId, shortId, claimData },\n };\n}\n\n// channel actions\n\nexport function addNewChannelToChannelList (id, name, shortId, longId, claimsData) {\n return {\n type: actions.CHANNEL_ADD,\n data: { id, name, shortId, longId, claimsData },\n };\n};\n\nexport function onUpdateChannelClaims (channelKey, name, longId, page) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,\n data: {channelKey, name, longId, page},\n };\n};\n\nexport function updateChannelClaims (channelListId, claimsData) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,\n data: {channelListId, claimsData},\n };\n};\n\n// display a file\n\nexport function fileRequested (name, claimId) {\n return {\n type: actions.FILE_REQUESTED,\n data: { name, claimId },\n };\n};\n\nexport function updateFileAvailability (status) {\n return {\n type: actions.FILE_AVAILABILITY_UPDATE,\n data: status,\n };\n};\n\nexport function updateDisplayAssetError (error) {\n return {\n type: actions.DISPLAY_ASSET_ERROR,\n data: error,\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/show.js","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport {updateSelectedChannel} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, site }) => {\n return {\n channelName : channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId : channel.loggedInChannel.longId,\n siteDescription: site.description,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n onChannelLogout: () => {\n dispatch(updateLoggedInChannel(null, null, null));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site }) => {\n const { defaultDescription, defaultThumbnail, description: siteDescription, host: siteHost, title: siteTitle, twitter: siteTwitter } = site;\n return {\n defaultDescription,\n defaultThumbnail,\n siteDescription,\n siteHost,\n siteTitle,\n siteTwitter,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/index.js","module.exports = require(\"prop-types\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 10\n// module chunks = 0","// request actions\nexport const HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nexport const REQUEST_ERROR = 'REQUEST_ERROR';\nexport const REQUEST_UPDATE = 'REQUEST_UPDATE';\nexport const ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nexport const CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nexport const REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nexport const ASSET_ADD = `ASSET_ADD`;\n\n// channel actions\nexport const CHANNEL_ADD = 'CHANNEL_ADD';\n\nexport const CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nexport const CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nexport const FILE_REQUESTED = 'FILE_REQUESTED';\nexport const FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nexport const DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_action_types.js","export const selectAsset = (show) => {\n const request = show.requestList[show.request.id];\n const assetKey = request.key;\n return show.assetList[assetKey];\n};\n\nexport const selectShowState = (state) => {\n return state.show;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/show.js","module.exports = require(\"react-helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-helmet\"\n// module id = 13\n// module chunks = 0","module.exports = require(\"redux-saga/effects\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga/effects\"\n// module id = 14\n// module chunks = 0","const axios = require('axios');\nconst logger = require('winston');\nconst { api: { apiHost, apiPort } } = require('../../config/lbryConfig.js');\nconst lbryApiUri = 'http://' + apiHost + ':' + apiPort;\nconst { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('./googleAnalytics.js');\n\nconst handleLbrynetResponse = ({ data }, resolve, reject) => {\n logger.debug('lbry api data:', data);\n if (data.result) {\n // check for an error\n if (data.result.error) {\n logger.debug('Lbrynet api error:', data.result.error);\n reject(new Error(data.result.error));\n return;\n };\n resolve(data.result);\n return;\n }\n // fallback in case it just timed out\n reject(JSON.stringify(data));\n};\n\nmodule.exports = {\n publishClaim (publishParams) {\n logger.debug(`lbryApi >> Publishing claim to \"${publishParams.name}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'publish',\n params: publishParams,\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaim (uri) {\n logger.debug(`lbryApi >> Getting Claim for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'get',\n params: { uri, timeout: 20 },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimList (claimName) {\n logger.debug(`lbryApi >> Getting claim_list for \"${claimName}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'claim_list',\n params: { name: claimName },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n resolveUri (uri) {\n logger.debug(`lbryApi >> Resolving URI for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'resolve',\n params: { uri },\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now());\n if (data.result[uri].error) { // check for errors\n reject(data.result[uri].error);\n } else { // if no errors, resolve\n resolve(data.result[uri]);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getDownloadDirectory () {\n logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'settings_get',\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now());\n if (data.result) {\n resolve(data.result.download_directory);\n } else {\n return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.');\n }\n })\n .catch(error => {\n logger.error('Lbrynet Error:', error);\n resolve('/home/lbry/Downloads/');\n });\n });\n },\n createChannel (name) {\n logger.debug(`lbryApi >> Creating channel for ${name}...`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'channel_new',\n params: {\n channel_name: name,\n amount : 0.1,\n },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryApi.js","const logger = require('winston');\nconst ua = require('universal-analytics');\nconst { analytics : { googleId }, details: { title } } = require('../../config/siteConfig.js');\n\nfunction createServeEventParams (headers, ip, originalUrl) {\n return {\n eventCategory : 'client requests',\n eventAction : 'serve request',\n eventLabel : originalUrl,\n ipOverride : ip,\n userAgentOverride: headers['user-agent'],\n };\n};\n\nfunction createPublishTimingEventParams (category, variable, label, startTime, endTime) {\n const duration = endTime - startTime;\n return {\n userTimingCategory : category,\n userTimingVariableName: variable,\n userTimingTime : duration,\n userTimingLabel : label,\n };\n};\n\nfunction sendGoogleAnalyticsEvent (ip, params) {\n const visitorId = ip.replace(/\\./g, '-');\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.event(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n });\n};\n\nfunction sendGoogleAnalyticsTiming (visitorId, params) {\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.timing(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n logger.debug(`Timing event successfully sent to google analytics`);\n });\n};\n\nmodule.exports = {\n sendGAServeEvent (headers, ip, originalUrl) {\n const params = createServeEventParams(headers, ip, originalUrl);\n sendGoogleAnalyticsEvent(ip, params);\n },\n sendGATimingEvent (category, variable, label, startTime, endTime) {\n const params = createPublishTimingEventParams(category, variable, label, startTime, endTime);\n sendGoogleAnalyticsTiming(title, params);\n },\n chooseGaLbrynetPublishLabel ({ channel_name: channelName, channel_id: channelId }) {\n return (channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM');\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/googleAnalytics.js","module.exports = require(\"redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux\"\n// module id = 17\n// module chunks = 0","import React from 'react';\nimport GoogleAnalytics from 'react-ga';\nimport { withRouter } from 'react-router-dom';\nconst { analytics: { googleId } } = require('../../../config/siteConfig.js');\n\nGoogleAnalytics.initialize(googleId);\n\nclass GAListener extends React.Component {\n componentDidMount () {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n\n sendPageView (location) {\n GoogleAnalytics.set({ page: location.pathname });\n GoogleAnalytics.pageview(location.pathname);\n }\n\n render () {\n return this.props.children;\n }\n}\n\nexport default withRouter(GAListener);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/GAListener/index.jsx","const { componentsConfig } = require('../../config/siteConfig.js');\n\nfunction getDeepestChildValue (parent, childrenKeys) {\n let childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array\n let child = parent[childKey];\n if (childrenKeys.length >= 1) {\n return getDeepestChildValue(child, childrenKeys);\n }\n return child;\n}\n\nexport const dynamicImport = (filePath) => {\n // validate inputs\n if (!filePath) {\n throw new Error('no file path provided to dynamicImport()');\n }\n if (typeof filePath !== 'string') {\n console.log('dynamicImport > filePath:', filePath);\n console.log('dynamicImport > filePath type:', typeof filePath);\n throw new Error('file path provided to dynamicImport() must be a string');\n }\n if (!componentsConfig) {\n console.log('no componentsConfig found in siteConfig.js');\n return require(`${filePath}`);\n }\n // split out the file folders // filter out any empty or white-space-only strings\n const folders = filePath.split('/').filter(folderName => folderName.replace(/\\s/g, '').length);\n // check for the component corresponding to file path in the site config object\n // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]]\n const customComponent = getDeepestChildValue(componentsConfig, folders);\n if (customComponent) {\n return customComponent; // return custom component\n } else {\n return require(`${filePath}`);\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/dynamicImport.js","const createBasicCanonicalLink = (page, siteHost) => {\n return `${siteHost}/${page}`;\n};\n\nconst createAssetCanonicalLink = (asset, siteHost) => {\n let channelName, certificateId, name, claimId;\n if (asset.claimData) {\n ({ channelName, certificateId, name, claimId } = asset.claimData);\n };\n if (channelName) {\n return `${siteHost}/${channelName}:${certificateId}/${name}`;\n };\n return `${siteHost}/${claimId}/${name}`;\n};\n\nconst createChannelCanonicalLink = (channel, siteHost) => {\n const { name, longId } = channel;\n return `${siteHost}/${name}:${longId}`;\n};\n\nexport const createCanonicalLink = (asset, channel, page, siteHost) => {\n if (asset) {\n return createAssetCanonicalLink(asset, siteHost);\n }\n if (channel) {\n return createChannelCanonicalLink(channel, siteHost);\n }\n return createBasicCanonicalLink(page, siteHost);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/canonicalLink.js","module.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(identifier)\n .map(match => match || null);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your URL. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('Check your URL. No channel name after \"@\".');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in channel name: \"${nameBadChars.join(', ')}\".`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`Check your URL. No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`Check your URL. The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId: channelClaimId || null,\n claimId : claimId || null,\n };\n },\n parseClaim: function (name) {\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first extension)\n '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end)\n );\n const [proto, claimName, extensionSeperator, extension] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(name)\n .map(match => match || null);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('Check your URL. No claim name provided before \".\"');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in claim name: \"${nameBadChars.join(', ')}\".`);\n }\n // Validate and process extension\n if (extensionSeperator) {\n if (!extension) {\n throw new Error(`Check your URL. No file extension provided after separator \"${extensionSeperator}\".`);\n }\n if (extensionSeperator !== '.') {\n throw new Error(`Check your URL. The \"${extensionSeperator}\" separator is not supported in the claim name.`);\n }\n }\n return {\n claimName,\n extension: extension || null,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/lbryUri.js","const determineOgThumbnailContentType = (thumbnail) => {\n if (thumbnail) {\n const fileExt = thumbnail.substring(thumbnail.lastIndexOf('.'));\n switch (fileExt) {\n case 'jpeg':\n case 'jpg':\n return 'image/jpeg';\n case 'png':\n return 'image/png';\n case 'gif':\n return 'image/gif';\n case 'mp4':\n return 'video/mp4';\n default:\n return 'image/jpeg';\n }\n }\n return '';\n};\n\nconst createBasicMetaTags = (siteHost, siteDescription, siteTitle, siteTwitter) => {\n return [\n {property: 'og:title', content: siteTitle},\n {property: 'og:url', content: siteHost},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: siteDescription},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createChannelMetaTags = (siteTitle, siteHost, siteTwitter, channel) => {\n const { name, longId } = channel;\n return [\n {property: 'og:title', content: `${name} on ${siteTitle}`},\n {property: 'og:url', content: `${siteHost}/${name}:${longId}`},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: `${name}, a channel on ${siteTitle}`},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createAssetMetaTags = (siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) => {\n const { claimData } = asset;\n const { contentType } = claimData;\n const embedUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const showUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const source = `${siteHost}/${claimData.claimId}/${claimData.name}.${claimData.fileExt}`;\n const ogTitle = claimData.title || claimData.name;\n const ogDescription = claimData.description || defaultDescription;\n const ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);\n const ogThumbnail = claimData.thumbnail || defaultThumbnail;\n const metaTags = [\n {property: 'og:title', content: ogTitle},\n {property: 'og:url', content: showUrl},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: ogDescription},\n {property: 'og:image:width', content: 600},\n {property: 'og:image:height', content: 315},\n {property: 'twitter:site', content: siteTwitter},\n ];\n if (contentType === 'video/mp4' || contentType === 'video/webm') {\n metaTags.push({property: 'og:video', content: source});\n metaTags.push({property: 'og:video:secure_url', content: source});\n metaTags.push({property: 'og:video:type', content: contentType});\n metaTags.push({property: 'og:image', content: ogThumbnail});\n metaTags.push({property: 'og:image:type', content: ogThumbnailContentType});\n metaTags.push({property: 'og:type', content: 'video'});\n metaTags.push({property: 'twitter:card', content: 'player'});\n metaTags.push({property: 'twitter:player', content: embedUrl});\n metaTags.push({property: 'twitter:player:width', content: 600});\n metaTags.push({property: 'twitter:text:player_width', content: 600});\n metaTags.push({property: 'twitter:player:height', content: 337});\n metaTags.push({property: 'twitter:player:stream', content: source});\n metaTags.push({property: 'twitter:player:stream:content_type', content: contentType});\n } else {\n metaTags.push({property: 'og:image', content: source});\n metaTags.push({property: 'og:image:type', content: contentType});\n metaTags.push({property: 'og:type', content: 'article'});\n metaTags.push({property: 'twitter:card', content: 'summary_large_image'});\n }\n return metaTags;\n};\n\nexport const createMetaTags = (siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) => {\n if (asset) {\n return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail);\n };\n if (channel) {\n return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel);\n };\n return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/metaTags.js","export const createPageTitle = (siteTitle, pageTitle) => {\n if (!pageTitle) {\n return `${siteTitle}`;\n }\n return `${siteTitle} - ${pageTitle}`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/pageTitle.js","import * as actions from 'constants/channel_action_types';\n\n// export action creators\n\nexport function updateLoggedInChannel (name, shortId, longId) {\n return {\n type: actions.CHANNEL_UPDATE,\n data: {\n name,\n shortId,\n longId,\n },\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/channel.js","import * as actions from 'constants/publish_action_types';\n\n// export action creators\nexport function selectFile (file) {\n return {\n type: actions.FILE_SELECTED,\n data: file,\n };\n};\n\nexport function clearFile () {\n return {\n type: actions.FILE_CLEAR,\n };\n};\n\nexport function updateMetadata (name, value) {\n return {\n type: actions.METADATA_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateClaim (value) {\n return {\n type: actions.CLAIM_UPDATE,\n data: value,\n };\n};\n\nexport function setPublishInChannel (channel) {\n return {\n type: actions.SET_PUBLISH_IN_CHANNEL,\n channel,\n };\n};\n\nexport function updatePublishStatus (status, message) {\n return {\n type: actions.PUBLISH_STATUS_UPDATE,\n data: {\n status,\n message,\n },\n };\n};\n\nexport function updateError (name, value) {\n return {\n type: actions.ERROR_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateSelectedChannel (channelName) {\n return {\n type: actions.SELECTED_CHANNEL_UPDATE,\n data: channelName,\n };\n};\n\nexport function toggleMetadataInputs (showMetadataInputs) {\n return {\n type: actions.TOGGLE_METADATA_INPUTS,\n data: showMetadataInputs,\n };\n};\n\nexport function onNewThumbnail (file) {\n return {\n type: actions.THUMBNAIL_NEW,\n data: file,\n };\n};\n\nexport function startPublish (history) {\n return {\n type: actions.PUBLISH_START,\n data: { history },\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/publish.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ActiveStatusBar from 'components/ActiveStatusBar';\nimport InactiveStatusBar from 'components/InactiveStatusBar';\n\nclass ProgressBar extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n bars : [],\n index : 0,\n incrementer: 1,\n };\n this.createBars = this.createBars.bind(this);\n this.startProgressBar = this.startProgressBar.bind(this);\n this.updateProgressBar = this.updateProgressBar.bind(this);\n this.stopProgressBar = this.stopProgressBar.bind(this);\n }\n componentDidMount () {\n this.createBars();\n this.startProgressBar();\n }\n componentWillUnmount () {\n this.stopProgressBar();\n }\n createBars () {\n const bars = [];\n for (let i = 0; i <= this.props.size; i++) {\n bars.push({isActive: false});\n }\n this.setState({ bars });\n }\n startProgressBar () {\n this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);\n };\n updateProgressBar () {\n let index = this.state.index;\n let incrementer = this.state.incrementer;\n let bars = this.state.bars;\n // flip incrementer if necessary, to stay in bounds\n if ((index < 0) || (index > this.props.size)) {\n incrementer = incrementer * -1;\n index += incrementer;\n }\n // update the indexed bar\n if (incrementer > 0) {\n bars[index].isActive = true;\n } else {\n bars[index].isActive = false;\n };\n // increment index\n index += incrementer;\n // update state\n this.setState({\n bars,\n incrementer,\n index,\n });\n };\n stopProgressBar () {\n clearInterval(this.updateInterval);\n };\n render () {\n return (\n
\n {this.state.bars.map((bar, index) => bar.isActive ? : )}\n
\n );\n }\n};\n\nProgressBar.propTypes = {\n size: PropTypes.number.isRequired,\n};\n\nexport default ProgressBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ProgressBar/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\nimport NavBar from 'containers/NavBar';\n\nclass ErrorPage extends React.Component {\n render () {\n const { error } = this.props;\n return (\n
\n \n
\n

{error}

\n
\n
\n );\n }\n};\n\nErrorPage.propTypes = {\n error: PropTypes.string.isRequired,\n};\n\nexport default ErrorPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ErrorPage/index.jsx","module.exports = require(\"passport\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport\"\n// module id = 28\n// module chunks = 0","function MysqlConfig () {\n this.database = 'default';\n this.username = 'default';\n this.password = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No MySQL config received.');\n }\n const {database, username, password} = config;\n this.database = database;\n this.username = username;\n this.password = password;\n };\n};\n\nmodule.exports = new MysqlConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/mysqlConfig.js","function SlackConfig () {\n this.slackWebHook = 'default';\n this.slackErrorChannel = 'default';\n this.slackInfoChannel = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No slack config received.');\n }\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = config;\n this.slackWebHook = slackWebHook;\n this.slackErrorChannel = slackErrorChannel;\n this.slackInfoChannel = slackInfoChannel;\n };\n};\n\nmodule.exports = new SlackConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/slackConfig.js","module.exports = require(\"passport-local\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport-local\"\n// module id = 31\n// module chunks = 0","module.exports = require(\"sequelize\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"sequelize\"\n// module id = 32\n// module chunks = 0","module.exports = {\n returnShortId: function (claimsArray, longId) {\n let claimIndex;\n let shortId = longId.substring(0, 1); // default short id is the first letter\n let shortIdLength = 0;\n // find the index of this claim id\n claimIndex = claimsArray.findIndex(element => {\n return element.claimId === longId;\n });\n if (claimIndex < 0) {\n throw new Error('claim id not found in claims list');\n }\n // get an array of all claims with lower height\n let possibleMatches = claimsArray.slice(0, claimIndex);\n // remove certificates with the same prefixes until none are left.\n while (possibleMatches.length > 0) {\n shortIdLength += 1;\n shortId = longId.substring(0, shortIdLength);\n possibleMatches = possibleMatches.filter(element => {\n return (element.claimId && (element.claimId.substring(0, shortIdLength) === shortId));\n });\n }\n return shortId;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/sequelizeHelpers.js","const logger = require('winston');\nconst fs = require('fs');\n\nconst { details, publishing } = require('../../config/siteConfig.js');\n\nmodule.exports = {\n parsePublishApiRequestBody ({name, nsfw, license, title, description, thumbnail}) {\n // validate name\n if (!name) {\n throw new Error('no name field found in request');\n }\n const invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name);\n if (invalidNameCharacters) {\n throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and \"-\"');\n }\n // optional parameters\n nsfw = (nsfw === 'true');\n license = license || null;\n title = title || null;\n description = description || null;\n thumbnail = thumbnail || null;\n // return results\n return {\n name,\n nsfw,\n license,\n title,\n description,\n thumbnail,\n };\n },\n parsePublishApiRequestFiles ({file, thumbnail}) {\n // make sure a file was provided\n if (!file) {\n throw new Error('no file with key of [file] found in request');\n }\n if (!file.path) {\n throw new Error('no file path found');\n }\n if (!file.type) {\n throw new Error('no file type found');\n }\n if (!file.size) {\n throw new Error('no file type found');\n }\n // validate the file name\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate the file\n module.exports.validateFileTypeAndSize(file);\n // return results\n return {\n fileName : file.name,\n filePath : file.path,\n fileType : file.type,\n thumbnailFileName: (thumbnail ? thumbnail.name : null),\n thumbnailFilePath: (thumbnail ? thumbnail.path : null),\n thumbnailFileType: (thumbnail ? thumbnail.type : null),\n };\n },\n validateFileTypeAndSize (file) {\n // check file type and size\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n logger.debug('publish > file validation > .jpeg/.jpg/.png was too big');\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .gif was too big');\n throw new Error('Sorry, .gifs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .mp4 was too big');\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n logger.debug('publish > file validation > unrecognized file type');\n throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n return file;\n },\n createBasicPublishParams (filePath, name, title, description, license, nsfw, thumbnail) {\n logger.debug(`Creating Publish Parameters`);\n // provide defaults for title\n if (title === null || title.trim() === '') {\n title = name;\n }\n // provide default for description\n if (description === null || description.trim() === '') {\n description = '';\n }\n // provide default for license\n if (license === null || license.trim() === '') {\n license = ' '; // default to empty string\n }\n // create the publish params\n const publishParams = {\n name,\n file_path: filePath,\n bid : 0.01,\n metadata : {\n description,\n title,\n author : details.title,\n language: 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n };\n // add thumbnail to channel if video\n if (thumbnail) {\n publishParams['metadata']['thumbnail'] = thumbnail;\n }\n return publishParams;\n },\n createThumbnailPublishParams (thumbnailFilePath, claimName, license, nsfw) {\n if (!thumbnailFilePath) {\n return;\n }\n logger.debug(`Creating Thumbnail Publish Parameters`);\n // create the publish params\n return {\n name : `${claimName}-thumb`,\n file_path: thumbnailFilePath,\n bid : 0.01,\n metadata : {\n title : `${claimName} thumbnail`,\n description: `a thumbnail for ${claimName}`,\n author : details.title,\n language : 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n channel_name : publishing.thumbnailChannel,\n channel_id : publishing.thumbnailChannelId,\n };\n },\n deleteTemporaryFile (filePath) {\n fs.unlink(filePath, err => {\n if (err) {\n logger.error(`error deleting temporary file ${filePath}`);\n throw err;\n }\n logger.debug(`successfully deleted ${filePath}`);\n });\n },\n addGetResultsToFileData (fileInfo, getResult) {\n fileInfo.fileName = getResult.file_name;\n fileInfo.filePath = getResult.download_path;\n return fileInfo;\n },\n createFileData ({ name, claimId, outpoint, height, address, nsfw, contentType }) {\n return {\n name,\n claimId,\n outpoint,\n height,\n address,\n fileName: '',\n filePath: '',\n fileType: contentType,\n nsfw,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/publishHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n handleErrorResponse: function (originalUrl, ip, error, res) {\n logger.error(`Error on ${originalUrl}`, module.exports.useObjectPropertiesIfNoKeys(error));\n const [status, message] = module.exports.returnErrorMessageAndStatus(error);\n res\n .status(status)\n .json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function (error) {\n let status, message;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function (err) {\n if (Object.keys(err).length === 0) {\n let newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach((key) => {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload (status, message) {\n return {\n status,\n success: false,\n message,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/errorHandlers.js","const db = require('../models/index');\nconst logger = require('winston');\nconst { returnPaginatedChannelClaims } = require('../helpers/channelPagination.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\nconst NO_FILE = 'NO_FILE';\n\nmodule.exports = {\n getClaimId (channelName, channelClaimId, name, claimId) {\n if (channelName) {\n return module.exports.getClaimIdByChannel(channelName, channelClaimId, name);\n } else {\n return module.exports.getClaimIdByClaim(name, claimId);\n }\n },\n getClaimIdByClaim (claimName, claimId) {\n logger.debug(`getClaimIdByClaim(${claimName}, ${claimId})`);\n return new Promise((resolve, reject) => {\n db.Claim.getLongClaimId(claimName, claimId)\n .then(longClaimId => {\n if (!longClaimId) {\n resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimIdByChannel (channelName, channelClaimId, claimName) {\n logger.debug(`getClaimIdByChannel(${channelName}, ${channelClaimId}, ${claimName})`);\n return new Promise((resolve, reject) => {\n db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id\n .then(longChannelId => {\n if (!longChannelId) {\n return [null, null];\n }\n return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id\n })\n .then(([longChannelId, longClaimId]) => {\n if (!longChannelId) {\n return resolve(NO_CHANNEL);\n }\n if (!longClaimId) {\n return resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelData (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]);\n })\n .then(([longChannelClaimId, shortChannelClaimId]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. return all the channel information\n resolve({\n channelName,\n longChannelClaimId,\n shortChannelClaimId,\n });\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelClaims (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]);\n })\n .then(([longChannelClaimId, channelClaimsArray]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. format the data for the view, including pagination\n let paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);\n // 4. return all the channel information and contents\n resolve(paginatedChannelViewData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getLocalFileRecord (claimId, name) {\n return db.File.findOne({where: {claimId, name}})\n .then(file => {\n if (!file) {\n return NO_FILE;\n }\n return file.dataValues;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/serveController.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage.js';\nimport Helmet from 'react-helmet';\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create a new Redux store instance\n const store = createStore(Reducer);\n\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `` was rendered\n return res.redirect(301, context.url);\n } else {\n // we're good, send the response\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handlePageRender.jsx","module.exports = require(\"react-dom/server\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-dom/server\"\n// module id = 38\n// module chunks = 0","import { combineReducers } from 'redux';\nimport PublishReducer from 'reducers/publish';\nimport ChannelReducer from 'reducers/channel';\nimport ShowReducer from 'reducers/show';\nimport SiteReducer from 'reducers/site';\n\nexport default combineReducers({\n channel: ChannelReducer,\n publish: PublishReducer,\n show : ShowReducer,\n site : SiteReducer,\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/index.js","export const FILE_SELECTED = 'FILE_SELECTED';\nexport const FILE_CLEAR = 'FILE_CLEAR';\nexport const METADATA_UPDATE = 'METADATA_UPDATE';\nexport const CLAIM_UPDATE = 'CLAIM_UPDATE';\nexport const SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';\nexport const PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';\nexport const ERROR_UPDATE = 'ERROR_UPDATE';\nexport const SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';\nexport const TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';\nexport const THUMBNAIL_NEW = 'THUMBNAIL_NEW';\nexport const PUBLISH_START = 'PUBLISH_START';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_action_types.js","export const CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/channel_action_types.js","export const LOCAL_CHECK = 'LOCAL_CHECK';\nexport const UNAVAILABLE = 'UNAVAILABLE';\nexport const ERROR = 'ERROR';\nexport const AVAILABLE = 'AVAILABLE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/asset_display_states.js","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport { dynamicImport } from 'utils/dynamicImport';\nimport AboutPage from 'pages/AboutPage';\nimport LoginPage from 'pages/LoginPage';\nimport ShowPage from 'pages/ShowPage';\nimport FourOhFourPage from 'containers/FourOhFourPage';\nconst HomePage = dynamicImport('pages/HomePage'); // or use the provided local homepage\n\nconst App = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default App;\n\n\n\n// WEBPACK FOOTER //\n// ./client/app.js","var map = {\n\t\"./canonicalLink\": 20,\n\t\"./canonicalLink.js\": 20,\n\t\"./dynamicImport\": 19,\n\t\"./dynamicImport.js\": 19,\n\t\"./file\": 45,\n\t\"./file.js\": 45,\n\t\"./lbryUri\": 21,\n\t\"./lbryUri.js\": 21,\n\t\"./metaTags\": 22,\n\t\"./metaTags.js\": 22,\n\t\"./pageTitle\": 23,\n\t\"./pageTitle.js\": 23,\n\t\"./publish\": 46,\n\t\"./publish.js\": 46,\n\t\"./request\": 6,\n\t\"./request.js\": 6,\n\t\"./validate\": 47,\n\t\"./validate.js\": 47\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 44;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/utils ^.*$\n// module id = 44\n// module chunks = 0","module.exports = {\n validateFile (file) {\n if (!file) {\n throw new Error('no file provided');\n }\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate size and type\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n throw new Error('Sorry, GIFs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/file.js","export const createPublishMetadata = (claim, { type }, { title, description, license, nsfw }, publishInChannel, selectedChannel) => {\n let metadata = {\n name: claim,\n title,\n description,\n license,\n nsfw,\n type,\n };\n if (publishInChannel) {\n metadata['channelName'] = selectedChannel;\n }\n return metadata;\n};\n\nexport const createPublishFormData = (file, thumbnail, metadata) => {\n let fd = new FormData();\n // append file\n fd.append('file', file);\n // append thumbnail\n if (thumbnail) {\n fd.append('thumbnail', thumbnail);\n }\n // append metadata\n for (let key in metadata) {\n if (metadata.hasOwnProperty(key)) {\n fd.append(key, metadata[key]);\n }\n }\n return fd;\n};\n\nexport const createThumbnailUrl = (channel, channelId, claim, host) => {\n return `${host}/${channel}:${channelId}/${claim}-thumb.png`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/publish.js","export const validateChannelSelection = (publishInChannel, selectedChannel, loggedInChannel) => {\n if (publishInChannel && (selectedChannel !== loggedInChannel.name)) {\n throw new Error('Log in to a channel or select Anonymous');\n }\n};\n\nexport const validatePublishParams = (file, claim, urlError) => {\n if (!file) {\n throw new Error('Please choose a file');\n }\n if (!claim) {\n throw new Error('Please enter a URL');\n }\n if (urlError) {\n throw new Error('Fix the url');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/validate.js","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nfunction Logo () {\n return (\n \n \n Logo\n Spee.ch logo\n \n \n \n Spee<h\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default Logo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/Logo/index.jsx","import React from 'react';\n\nfunction NavBarChannelDropdown ({ channelName, handleSelection, defaultSelection, VIEW, LOGOUT }) {\n return (\n \n );\n};\n\nexport default NavBarChannelDropdown;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/NavBarChannelOptionsDropdown/index.jsx","import React from 'react';\n\nconst ActiveStatusBar = () => {\n return | ;\n};\n\nexport default ActiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ActiveStatusBar/index.jsx","import React from 'react';\n\nconst InactiveStatusBar = () => {\n return | ;\n};\n\nexport default InactiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/InactiveStatusBar/index.jsx","export const CHANNEL = 'CHANNEL';\nexport const ASSET_LITE = 'ASSET_LITE';\nexport const ASSET_DETAILS = 'ASSET_DETAILS';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_request_types.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { fileRequested } from 'actions/show';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select error and status\n const error = show.displayAsset.error;\n const status = show.displayAsset.status;\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n error,\n status,\n asset,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onFileRequest: (name, claimId) => {\n dispatch(fileRequested(name, claimId));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({site: {defaults: { defaultThumbnail }}}) => {\n return {\n defaultThumbnail,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/index.js","module.exports = (helmet, html, preloadedState) => {\n // take the html and preloadedState and return the full page\n return `\n \n \n \n \n \n \n \n ${helmet.title.toString()}\n ${helmet.meta.toString()}\n ${helmet.link.toString()}\n \n \n \n \n \n \n \n \n
\n
${html}
\n
\n \n \n \n \n `;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/renderFullPage.js","export const selectSiteState = (state) => {\n return state.site;\n};\n\nexport const selectSiteHost = (state) => {\n return state.site.host;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/site.js","module.exports = require(\"babel-polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-polyfill\"\n// module id = 58\n// module chunks = 0","module.exports = require(\"whatwg-fetch\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"whatwg-fetch\"\n// module id = 59\n// module chunks = 0","const server = require('server/server.js');\r\nconst components = require('client/components');\r\n// const containers = require('client/containers');\r\n// const pages = require('client/pages');\r\n\r\nconst exports = {\r\n SpeechServer: server,\r\n Components : components,\r\n // containers,\r\n // pages,\r\n};\r\n\r\nmodule.exports = exports;\r\n\n\n\n// WEBPACK FOOTER //\n// ./speech.js","// app dependencies\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst expressHandlebars = require('express-handlebars');\nconst Handlebars = require('handlebars');\nconst helmet = require('helmet');\nconst passport = require('passport');\nconst { serializeSpeechUser, deserializeSpeechUser } = require('./helpers/authHelpers.js');\nconst cookieSession = require('cookie-session');\nconst http = require('http');\n// logging dependencies\nconst logger = require('winston');\n\nfunction SpeechServer () {\n this.configureMysql = (mysqlConfig) => {\n require('../config/mysqlConfig.js').configure(mysqlConfig);\n };\n this.configureSite = (siteConfig) => {\n require('../config/siteConfig.js').configure(siteConfig);\n console.log(require('../config/siteConfig.js'));\n this.sessionKey = siteConfig.auth.sessionKey;\n this.PORT = siteConfig.details.port;\n };\n this.configureSlack = (slackConfig) => {\n require('../config/slackConfig.js').configure(slackConfig);\n };\n this.createApp = () => {\n // create an Express application\n const app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(`${__dirname}/public`)); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use((req, res, next) => { // custom logging middleware to log all incoming http requests\n logger.verbose(`Request on ${req.originalUrl} from ${req.ip}`);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n const localSignupStrategy = require('./passport/local-signup.js');\n const localLoginStrategy = require('./passport/local-login.js');\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name : 'session',\n keys : [this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000, // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n const hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars : Handlebars,\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n require('./routes/auth-routes.js')(app);\n require('./routes/api-routes.js')(app);\n require('./routes/page-routes.js')(app);\n require('./routes/asset-routes.js')(app);\n require('./routes/fallback-routes.js')(app);\n\n this.app = app;\n };\n this.initialize = () => {\n require('./helpers/configureLogger.js')(logger);\n require('./helpers/configureSlack.js')(logger);\n this.createApp();\n this.server = http.Server(this.app);\n };\n this.start = () => {\n const db = require('./models/index');\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(() => {\n this.server.listen(this.PORT, () => {\n logger.info(`Server is listening on PORT ${this.PORT}`);\n });\n })\n .catch((error) => {\n logger.error(`Startup Error:`, error);\n });\n };\n};\n\nmodule.exports = SpeechServer;\n\n\n\n// WEBPACK FOOTER //\n// ./server/server.js","module.exports = require(\"express\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express\"\n// module id = 62\n// module chunks = 0","module.exports = require(\"body-parser\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"body-parser\"\n// module id = 63\n// module chunks = 0","module.exports = require(\"express-handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express-handlebars\"\n// module id = 64\n// module chunks = 0","module.exports = require(\"handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"handlebars\"\n// module id = 65\n// module chunks = 0","module.exports = require(\"helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"helmet\"\n// module id = 66\n// module chunks = 0","const logger = require('winston');\n\nmodule.exports = {\n serializeSpeechUser (user, done) { // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser (user, done) { // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/authHelpers.js","module.exports = require(\"cookie-session\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cookie-session\"\n// module id = 68\n// module chunks = 0","module.exports = require(\"http\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"http\"\n// module id = 69\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst lbryApi = require('../helpers/lbryApi.js');\nconst logger = require('winston');\nconst db = require('../models/index');\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`);\n let userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel(`@${username}`)\n .then(tx => {\n // create user record\n const userData = {\n userName: username,\n password: password,\n };\n logger.verbose('userData >', userData);\n // create user record\n const channelData = {\n channelName : `@${username}`,\n channelClaimId: tx.claim_id,\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n const certificateData = {\n claimId: tx.claim_id,\n name : `@${username}`,\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n })\n .then(([newUser, newChannel, newCertificate]) => {\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n })\n .then(() => {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n })\n .catch(error => {\n logger.error('signup error', error);\n return done(error);\n });\n }\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-signup.js","module.exports = require(\"axios\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"axios\"\n// module id = 71\n// module chunks = 0","const lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279',\n },\n};\n\nmodule.exports = lbryConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/lbryConfig.js","module.exports = require(\"universal-analytics\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"universal-analytics\"\n// module id = 73\n// module chunks = 0","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Certificate = sequelize.define(\n 'Certificate',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateVersion: {\n type : STRING,\n default: null,\n },\n keyType: {\n type : STRING,\n default: null,\n },\n publicKey: {\n type : TEXT('long'),\n default: null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Certificate.associate = db => {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n logger.debug(`getShortChannelIdFromLongChannelId ${channelName}:${longChannelId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {name: channelName},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelIdFromShortChannelId(${channelName}, ${channelClaimId})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name : channelName,\n claimId: {\n $like: `${channelClaimId}%`,\n },\n },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n logger.debug(`getLongChannelIdFromChannelName(${channelName})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n logger.debug(`validateLongChannelId(${name}, ${claimId})`);\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelId(${channelName}, ${channelClaimId})`);\n if (channelClaimId && (channelClaimId.length === 40)) { // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) { // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/certificate.js","module.exports = (sequelize, { STRING }) => {\n const Channel = sequelize.define(\n 'Channel',\n {\n channelName: {\n type : STRING,\n allowNull: false,\n },\n channelClaimId: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Channel.associate = db => {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/channel.js","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\nconst { assetDefaults: { thumbnail: defaultThumbnail }, details: { host } } = require('../../config/siteConfig.js');\n\nfunction determineFileExtensionFromContentType (contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail (storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData (claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Claim = sequelize.define(\n 'Claim',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateId: {\n type : STRING,\n default: null,\n },\n author: {\n type : STRING,\n default: null,\n },\n description: {\n type : TEXT('long'),\n default: null,\n },\n language: {\n type : STRING,\n default: null,\n },\n license: {\n type : STRING,\n default: null,\n },\n licenseUrl: {\n type : STRING,\n default: null,\n },\n nsfw: {\n type : BOOLEAN,\n default: null,\n },\n preview: {\n type : STRING,\n default: null,\n },\n thumbnail: {\n type : STRING,\n default: null,\n },\n title: {\n type : STRING,\n default: null,\n },\n metadataVersion: {\n type : STRING,\n default: null,\n },\n contentType: {\n type : STRING,\n default: null,\n },\n source: {\n type : STRING,\n default: null,\n },\n sourceType: {\n type : STRING,\n default: null,\n },\n sourceVersion: {\n type : STRING,\n default: null,\n },\n streamVersion: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n channelName: {\n type : STRING,\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Claim.associate = db => {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n logger.debug(`Claim.getShortClaimIdFromLongClaimId for ${claimName}#${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n logger.debug(`Claim.getAllChannelClaims for ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw : true, // returns an array of only data, not an array of instances\n })\n .then(channelClaimsArray => {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(claim => {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n logger.debug(`finding claim id for claim ${claimName} from channel ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(`${result.length} records found for \"${claimName}\" in channel \"${channelClaimId}\"`);\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name,\n claimId: {\n $like: `${shortId}%`,\n }},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']], // note: maybe height and effective amount need to switch?\n })\n .then(result => {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug(`getLongClaimId(${claimName}, ${claimId})`);\n if (claimId && (claimId.length === 40)) { // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n logger.debug(`Claim.resolveClaim: ${name} ${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name, claimId },\n })\n .then(claimArray => {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error(`more than one record matches ${name}#${claimId} in db.Claim`);\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/claim.js","module.exports = (sequelize, { STRING, BOOLEAN, INTEGER }) => {\n const File = sequelize.define(\n 'File',\n {\n name: {\n type : STRING,\n allowNull: false,\n },\n claimId: {\n type : STRING,\n allowNull: false,\n },\n address: {\n type : STRING,\n allowNull: false,\n },\n outpoint: {\n type : STRING,\n allowNull: false,\n },\n height: {\n type : INTEGER,\n allowNull: false,\n default : 0,\n },\n fileName: {\n type : STRING,\n allowNull: false,\n },\n filePath: {\n type : STRING,\n allowNull: false,\n },\n fileType: {\n type: STRING,\n },\n nsfw: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: false,\n },\n trendingEligible: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: true,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n File.associate = db => {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25,\n });\n };\n\n return File;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/file.js","module.exports = (sequelize, { STRING, BOOLEAN, TEXT }) => {\n const Request = sequelize.define(\n 'Request',\n {\n action: {\n type : STRING,\n allowNull: false,\n },\n url: {\n type : STRING,\n allowNull: false,\n },\n ipAddress: {\n type : STRING,\n allowNull: true,\n },\n result: {\n type : TEXT('long'),\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Request.associate = db => {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n return Request;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/request.js","'use strict';\nconst bcrypt = require('bcrypt');\nconst logger = require('winston');\n\nmodule.exports = (sequelize, { STRING }) => {\n const User = sequelize.define(\n 'User',\n {\n userName: {\n type : STRING,\n allowNull: false,\n },\n password: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n User.associate = db => {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n this\n .update({password: hash})\n .then(() => {\n resolve();\n })\n .catch(error => {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', (user, options) => {\n logger.debug('User.beforeCreate hook...');\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/user.js","module.exports = require(\"bcrypt\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"bcrypt\"\n// module id = 80\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst logger = require('winston');\nconst db = require('../models/index');\n\nconst returnUserAndChannelInfo = (userInstance) => {\n return new Promise((resolve, reject) => {\n let userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance\n .getChannel()\n .then(({channelName, channelClaimId}) => {\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n })\n .catch(error => {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n return db.User\n .findOne({\n where: {userName: username},\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n return user.comparePassword(password)\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user)\n .then(userInfo => {\n return done(null, userInfo);\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return done(error);\n });\n },\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-login.js","const logger = require('winston');\nconst passport = require('passport');\n\nmodule.exports = (app) => {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), (req, res) => {\n logger.verbose(`successful signup for ${req.user.channelName}`);\n res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n // route for log in\n app.post('/login', (req, res, next) => {\n passport.authenticate('local-login', (err, user, info) => {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message,\n });\n }\n logger.debug('successful login');\n req.logIn(user, (err) => {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', (req, res) => {\n req.logout();\n res.status(200).json({success: true, message: 'you successfully logged out'});\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', (req, res) => {\n if (req.user) {\n res.status(200).json({success: true, data: req.user});\n } else {\n res.status(401).json({success: false, message: 'user is not logged in'});\n }\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/auth-routes.js","const logger = require('winston');\nconst multipart = require('connect-multiparty');\nconst { publishing: { uploadDirectory }, details: { host } } = require('../../config/siteConfig.js');\nconst multipartMiddleware = multipart({uploadDir: uploadDirectory});\nconst db = require('../models/index');\nconst { claimNameIsAvailable, checkChannelAvailability, publish } = require('../controllers/publishController.js');\nconst { getClaimList, resolveUri, getClaim } = require('../helpers/lbryApi.js');\nconst { addGetResultsToFileData, createBasicPublishParams, createThumbnailPublishParams, parsePublishApiRequestBody, parsePublishApiRequestFiles, createFileData } = require('../helpers/publishHelpers.js');\nconst errorHandlers = require('../helpers/errorHandlers.js');\nconst { sendGATimingEvent } = require('../helpers/googleAnalytics.js');\nconst { authenticateUser } = require('../auth/authentication.js');\nconst { getChannelData, getChannelClaims, getClaimId } = require('../controllers/serveController.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = (app) => {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n checkChannelAvailability(name)\n .then(availableName => {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', ({ ip, originalUrl, params }, res) => {\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json(shortId);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n const page = params.page;\n getChannelClaims(channelName, channelClaimId, page)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', ({ ip, originalUrl, params }, res) => {\n getClaimList(params.name)\n .then(claimsList => {\n res.status(200).json(claimsList);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId)\n .then(resolveResult => {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n let fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(`${name}#${claimId}`)]);\n })\n .then(([ fileData, getResult ]) => {\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, {name, claimId}, 'File'), getResult]);\n })\n .then(([ fileRecord, {message, completed} ]) => {\n res.status(200).json({ success: true, message, completed });\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n claimNameIsAvailable(name)\n .then(result => {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', ({ headers, ip, originalUrl, params }, res) => {\n resolveUri(`${params.name}#${params.claimId}`)\n .then(resolvedUri => {\n res.status(200).json(resolvedUri);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, ({ body, files, headers, ip, originalUrl, user }, res) => {\n // define variables\n let channelName, channelId, channelPassword, description, fileName, filePath, fileType, gaStartTime, license, name, nsfw, thumbnail, thumbnailFileName, thumbnailFilePath, thumbnailFileType, title;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n // validateApiPublishRequest(body, files);\n ({name, nsfw, license, title, description, thumbnail} = parsePublishApiRequestBody(body));\n ({fileName, filePath, fileType, thumbnailFileName, thumbnailFilePath, thumbnailFileType} = parsePublishApiRequestFiles(files));\n ({channelName, channelId, channelPassword} = body);\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // check channel authorization\n Promise.all([\n authenticateUser(channelName, channelId, channelPassword, user),\n claimNameIsAvailable(name),\n createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail),\n createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw),\n ])\n .then(([{channelName, channelClaimId}, validatedClaimName, publishParams, thumbnailPublishParams]) => {\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n })\n .then(result => {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data : {\n name,\n claimId: result.claim_id,\n url : `${host}/${result.claim_id}/${name}`,\n lbryTx : result,\n },\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', ({ ip, originalUrl, body, params }, res) => {\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json({success: true, data: shortId});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', ({ ip, originalUrl, body, params }, res) => {\n logger.debug('body:', body);\n const channelName = body.channelName;\n const channelClaimId = body.channelClaimId;\n const claimName = body.claimName;\n const claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(result => {\n if (result === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel could be found'});\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'No matching claim id could be found'});\n }\n res.status(200).json({success: true, data: result});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', ({ ip, originalUrl, body, params }, res) => {\n const claimName = params.claimName;\n let claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId)\n .then(claimInfo => {\n if (!claimInfo) {\n return res.status(404).json({success: false, message: 'No claim could be found'});\n }\n res.status(200).json({success: true, data: claimInfo});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n db.File.findOne({where: {name, claimId}})\n .then(result => {\n if (result) {\n return res.status(200).json({success: true, data: true});\n }\n res.status(200).json({success: true, data: false});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/api-routes.js","module.exports = require(\"connect-multiparty\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"connect-multiparty\"\n// module id = 84\n// module chunks = 0","const logger = require('winston');\nconst db = require('../models/index');\nconst lbryApi = require('../helpers/lbryApi.js');\nconst publishHelpers = require('../helpers/publishHelpers.js');\nconst { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('../../config/siteConfig.js');\nconst Sequelize = require('sequelize');\nconst Op = Sequelize.Op;\n\nmodule.exports = {\n publish (publishParams, fileName, fileType) {\n return new Promise((resolve, reject) => {\n let publishResults, certificateId, channelName;\n // publish the file\n return lbryApi.publishClaim(publishParams)\n .then(tx => {\n logger.info(`Successfully published ${publishParams.name} ${fileName}`, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug(`this claim was published in channel: ${publishParams.channel_name}`);\n return db.Channel.findOne({where: {channelName: publishParams.channel_name}});\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n })\n .then(channel => {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug(`certificateId: ${certificateId}`);\n })\n .then(() => {\n // create the File record\n const fileRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n fileName,\n filePath : publishParams.file_path,\n fileType,\n nsfw : publishParams.metadata.nsfw,\n };\n // create the Claim record\n const claimRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n thumbnail : publishParams.metadata.thumbnail,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n contentType: fileType,\n nsfw : publishParams.metadata.nsfw,\n amount : publishParams.bid,\n certificateId,\n channelName,\n };\n // upsert criteria\n const upsertCriteria = {\n name : publishParams.name,\n claimId: publishResults.claim_id,\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n })\n .then(([file, claim]) => {\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n })\n .then(() => {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n })\n .catch(error => {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable (name) {\n const claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim\n .findAll({\n attributes: ['address'],\n where : {\n name,\n address: {\n [Op.or]: claimAddresses,\n },\n },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n checkChannelAvailability (name) {\n return db.Channel\n .findAll({\n where: { channelName: name },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/publishController.js","module.exports = require(\"fs\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"fs\"\n// module id = 86\n// module chunks = 0","const db = require('../models/index');\nconst logger = require('winston');\n\nmodule.exports = {\n authenticateUser (channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName : null,\n channelClaimId: null,\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName : user.channelName,\n channelClaimId: user.channelClaimId,\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials (channelName, channelId, userPassword) {\n return new Promise((resolve, reject) => {\n // hoisted variables\n let channelData;\n // build the params for finding the channel\n let channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel\n .findOne({\n where: channelFindParams,\n })\n .then(channel => {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) },\n });\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n })\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/auth/authentication.js","const CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims (channelName, longChannelClaimId, claims, page) {\n const totalPages = module.exports.determineTotalPages(claims);\n const paginationPage = module.exports.getPageFromQuery(page);\n const viewData = {\n channelName : channelName,\n longChannelClaimId: longChannelClaimId,\n claims : module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage : module.exports.determinePreviousPage(paginationPage),\n currentPage : paginationPage,\n nextPage : module.exports.determineNextPage(totalPages, paginationPage),\n totalPages : totalPages,\n totalResults : module.exports.determineTotalClaims(claims),\n };\n return viewData;\n },\n getPageFromQuery (page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims (claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n const claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n const claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n const pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages (claims) {\n if (!claims) {\n return 0;\n } else {\n const totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n const fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n const remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage (currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage (totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims (claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/channelPagination.js","const { details: host } = require('../../config/siteConfig.js');\nconst handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = (app) => {\n // route for the home page\n app.get('/', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', (req, res) => {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', (req, res) => {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', (req, res) => {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', ({ params }, res) => {\n const claimId = params.claimId;\n const name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host, claimId, name });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/page-routes.js","import * as actions from 'constants/publish_action_types';\nimport { LOGIN } from 'constants/publish_channel_select_states';\nconst { publishing } = require('../../config/siteConfig.js');\n\nconst initialState = {\n disabled : publishing.disabled,\n disabledMessage : publishing.disabledMessage,\n publishInChannel : false,\n selectedChannel : LOGIN,\n showMetadataInputs: false,\n status : {\n status : null,\n message: null,\n },\n error: {\n file : null,\n url : null,\n channel : null,\n publishSubmit: null,\n },\n file : null,\n claim : '',\n metadata: {\n title : '',\n description: '',\n license : '',\n nsfw : false,\n },\n thumbnail: null,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data,\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data,\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel,\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data,\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data,\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data,\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/publish.js","export const LOGIN = 'Existing';\nexport const CREATE = 'New';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_channel_select_states.js","import * as actions from 'constants/channel_action_types';\n\nconst initialState = {\n loggedInChannel: {\n name : null,\n shortId: null,\n longId : null,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/channel.js","import * as actions from 'constants/show_action_types';\nimport { LOCAL_CHECK, ERROR } from 'constants/asset_display_states';\n\nconst initialState = {\n request: {\n error: null,\n type : null,\n id : null,\n },\n requestList : {},\n channelList : {},\n assetList : {},\n displayAsset: {\n error : null,\n status: LOCAL_CHECK,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data,\n }),\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id : action.data.requestId,\n }),\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, {\n [action.data.id]: {\n error: action.data.error,\n key : action.data.key,\n },\n }),\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, {\n [action.data.id]: {\n error : action.data.error,\n name : action.data.name,\n claimId : action.data.claimId,\n shortId : action.data.shortId,\n claimData: action.data.claimData,\n },\n }),\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.id]: {\n name : action.data.name,\n longId : action.data.longId,\n shortId : action.data.shortId,\n claimsData: action.data.claimsData,\n },\n }),\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.channelListId]: Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData,\n }),\n }),\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data,\n }),\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error : action.data,\n status: ERROR,\n }),\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/show.js","const siteConfig = require('../../config/siteConfig.js');\n\nconst {\n analytics: {\n googleId: googleAnalyticsId,\n },\n assetDefaults: {\n thumbnail: defaultThumbnail,\n description: defaultDescription,\n },\n details: {\n description,\n host,\n title,\n twitter,\n },\n} = siteConfig;\n\nconst initialState = {\n description,\n googleAnalyticsId,\n host,\n title,\n twitter,\n defaultDescription,\n defaultThumbnail,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/site.js","module.exports = require(\"react-ga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-ga\"\n// module id = 95\n// module chunks = 0","module.exports = require(\"cross-fetch/polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cross-fetch/polyfill\"\n// module id = 96\n// module chunks = 0","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport SEO from 'components/SEO';\n\nclass AboutPage extends React.Component {\n render () {\n return (\n
\n \n \n
\n
\n
\n

Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.

\n

TWITTER

\n

GITHUB

\n

DISCORD CHANNEL

\n

DOCUMENTATION

\n
\n
\n
\n

Spee.ch is a media-hosting site that reads from and publishes content to the LBRY blockchain.

\n

Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the LBRY network. This means that your images are stored in multiple locations without a single point of failure.

\n

Contribute

\n

If you have an idea for your own spee.ch-like site on top of LBRY, fork our github repo and go to town!

\n

If you want to improve spee.ch, join our discord channel or solve one of our github issues.

\n
\n
\n
\n
\n );\n }\n};\n\nexport default AboutPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/AboutPage/index.jsx","import React from 'react';\nimport { NavLink, withRouter } from 'react-router-dom';\nimport Logo from 'components/Logo';\nimport NavBarChannelDropdown from 'components/NavBarChannelOptionsDropdown';\nimport request from 'utils/request';\n\nconst VIEW = 'VIEW';\nconst LOGOUT = 'LOGOUT';\n\nclass NavBar extends React.Component {\n constructor (props) {\n super(props);\n this.checkForLoggedInUser = this.checkForLoggedInUser.bind(this);\n this.logoutUser = this.logoutUser.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n componentDidMount () {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n checkForLoggedInUser () {\n const params = {credentials: 'include'};\n request('/user', params)\n .then(({ data }) => {\n this.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n })\n .catch(error => {\n console.log('/user error:', error.message);\n });\n }\n logoutUser () {\n const params = {credentials: 'include'};\n request('/logout', params)\n .then(() => {\n this.props.onChannelLogout();\n })\n .catch(error => {\n console.log('/logout error', error.message);\n });\n }\n handleSelection (event) {\n const value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push(`/${this.props.channelName}:${this.props.channelLongId}`);\n break;\n default:\n break;\n }\n }\n render () {\n const { siteDescription } = this.props;\n return (\n
\n
\n \n
\n {siteDescription}\n
\n
\n Publish\n About\n { this.props.channelName ? (\n \n ) : (\n Channel\n )}\n
\n
\n
\n );\n }\n}\n\nexport default withRouter(NavBar);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/view.jsx","import React from 'react';\nimport Helmet from 'react-helmet';\nimport PropTypes from 'prop-types';\n\nimport { createPageTitle } from 'utils/pageTitle';\nimport { createMetaTags } from 'utils/metaTags';\nimport { createCanonicalLink } from 'utils/canonicalLink';\n\nclass SEO extends React.Component {\n render () {\n // props from state\n const { defaultDescription, defaultThumbnail, siteDescription, siteHost, siteTitle, siteTwitter } = this.props;\n // props from parent\n const { asset, channel, pageUri } = this.props;\n let { pageTitle } = this.props;\n // create page title, tags, and canonical link\n pageTitle = createPageTitle(siteTitle, pageTitle);\n const metaTags = createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n const canonicalLink = createCanonicalLink(asset, channel, pageUri, siteHost);\n // render results\n return (\n \n );\n }\n};\n\nSEO.propTypes = {\n pageTitle: PropTypes.string,\n pageUri : PropTypes.string,\n channel : PropTypes.object,\n asset : PropTypes.object,\n};\n\nexport default SEO;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/view.jsx","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/index.js","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ChannelLoginForm from 'containers/ChannelLoginForm';\nimport ChannelCreateForm from 'containers/ChannelCreateForm';\n\nclass LoginPage extends React.Component {\n componentWillReceiveProps (newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push(`/`);\n }\n }\n render () {\n return (\n
\n \n \n
\n
\n
\n

Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you're documenting important events, or making a public repository for cat gifs (password: '1234'), try creating a channel for it!

\n
\n
\n
\n

Log in to an existing channel:

\n \n

Create a brand new channel:

\n \n
\n
\n
\n
\n );\n }\n};\n\nexport default withRouter(LoginPage);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/view.jsx","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from '../../actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/index.js","import React from 'react';\nimport request from 'utils/request';\n\nclass ChannelLoginForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n name : '',\n password: '',\n };\n this.handleInput = this.handleInput.bind(this);\n this.loginToChannel = this.loginToChannel.bind(this);\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n loginToChannel (event) {\n event.preventDefault();\n const params = {\n method : 'POST',\n body : JSON.stringify({username: this.state.name, password: this.state.password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n request('login', params)\n .then(({success, channelName, shortChannelId, channelClaimId, message}) => {\n if (success) {\n this.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n this.setState({'error': message});\n };\n })\n .catch(error => {\n if (error.message) {\n this.setState({'error': error.message});\n } else {\n this.setState({'error': error});\n }\n });\n }\n render () {\n return (\n
\n
\n
\n \n
\n
\n @\n \n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n { this.state.error ? (\n

{this.state.error}

\n ) : (\n

Enter the name and password for your channel

\n )}\n
\n \n
\n
\n );\n }\n}\n\nexport default ChannelLoginForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/view.jsx","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from 'actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/index.js","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport request from 'utils/request';\n\nclass ChannelCreateForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n channel : '',\n password: '',\n status : null,\n };\n this.handleChannelInput = this.handleChannelInput.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.createChannel = this.createChannel.bind(this);\n }\n cleanseChannelInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n handleChannelInput (event) {\n let value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({channel: value});\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({error: 'Please enter a channel name'});\n }\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n updateIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n request(`/api/channel/availability/${channelWithAtSymbol}`)\n .then(() => {\n this.setState({'error': null});\n })\n .catch((error) => {\n this.setState({'error': error.message});\n });\n }\n checkIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n return request(`/api/channel/availability/${channelWithAtSymbol}`);\n }\n checkIsPasswordProvided (password) {\n return new Promise((resolve, reject) => {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n makePublishChannelRequest (username, password) {\n const params = {\n method : 'POST',\n body : JSON.stringify({username, password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n return new Promise((resolve, reject) => {\n request('/signup', params)\n .then(result => {\n return resolve(result);\n })\n .catch(error => {\n reject(new Error(`Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ${error.message}`));\n });\n });\n }\n createChannel (event) {\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password)\n .then(() => {\n return this.checkIsChannelAvailable(this.state.channel);\n })\n .then(() => {\n this.setState({status: 'We are publishing your new channel. Sit tight...'});\n return this.makePublishChannelRequest(this.state.channel, this.state.password);\n })\n .then(result => {\n this.setState({status: null});\n this.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n })\n .catch((error) => {\n if (error.message) {\n this.setState({'error': error.message, status: null});\n } else {\n this.setState({'error': error, status: null});\n };\n });\n }\n render () {\n return (\n
\n { !this.state.status ? (\n
\n
\n
\n \n
\n
\n @\n \n { (this.state.channel && !this.state.error) && {'\\u2713'} }\n { this.state.error && {'\\u2716'} }\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n {this.state.error ? (\n

{this.state.error}

\n ) : (\n

Choose a name and password for your channel

\n )}\n
\n \n
\n
\n ) : (\n
\n

{this.state.status}

\n \n
\n )}\n
\n );\n }\n}\n\nexport default ChannelCreateForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/view.jsx","import { connect } from 'react-redux';\nimport { onHandleShowPageUri } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n return {\n error : show.request.error,\n requestType: show.request.type,\n };\n};\n\nconst mapDispatchToProps = {\n onHandleShowPageUri,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/index.js","import React from 'react';\nimport ErrorPage from 'pages/ErrorPage';\nimport ShowAssetLite from 'containers/ShowAssetLite';\nimport ShowAssetDetails from 'containers/ShowAssetDetails';\nimport ShowChannel from 'containers/ShowChannel';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\nclass ShowPage extends React.Component {\n componentDidMount () {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n componentWillReceiveProps (nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n render () {\n const { error, requestType } = this.props;\n if (error) {\n return (\n \n );\n }\n switch (requestType) {\n case CHANNEL:\n return ;\n case ASSET_LITE:\n return ;\n case ASSET_DETAILS:\n return ;\n default:\n return

loading...

;\n }\n }\n};\n\nexport default ShowPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport { Link } from 'react-router-dom';\nimport AssetDisplay from 'containers/AssetDisplay';\n\nclass ShowLite extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { name, claimId } = asset.claimData;\n return (\n
\n \n \n hosted\n via Spee.ch\n
\n );\n }\n return (\n
\n

loading asset data...

\n
\n );\n }\n};\n\nexport default ShowLite;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport { LOCAL_CHECK, UNAVAILABLE, ERROR, AVAILABLE } from 'constants/asset_display_states';\n\nclass AssetDisplay extends React.Component {\n componentDidMount () {\n const { asset: { claimData: { name, claimId } } } = this.props;\n this.props.onFileRequest(name, claimId);\n }\n render () {\n const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props;\n return (\n
\n {(status === LOCAL_CHECK) &&\n
\n

Checking to see if Spee.ch has your asset locally...

\n
\n }\n {(status === UNAVAILABLE) &&\n
\n

Sit tight, we're searching the LBRY blockchain for your asset!

\n \n

Curious what magic is happening here? Learn more.

\n
\n }\n {(status === ERROR) &&\n
\n

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the LBRY discord.

\n

{error}

\n
\n }\n {(status === AVAILABLE) &&\n (() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return (\n \n );\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

Unsupported file type

\n );\n }\n })()\n }\n
\n );\n }\n};\n\nexport default AssetDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ErrorPage from 'pages/ErrorPage';\nimport AssetTitle from 'containers/AssetTitle';\nimport AssetDisplay from 'containers/AssetDisplay';\nimport AssetInfo from 'containers/AssetInfo';\n\nclass ShowAssetDetails extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { claimData: { name } } = asset;\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowAssetDetails;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n const { claimData: { title } } = selectAsset(show);\n return {\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/index.js","import React from 'react';\n\nconst AssetTitle = ({ title }) => {\n return (\n
\n {title}\n
\n );\n};\n\nexport default AssetTitle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/index.js","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nclass AssetInfo extends React.Component {\n constructor (props) {\n super(props);\n this.copyToClipboard = this.copyToClipboard.bind(this);\n }\n copyToClipboard (event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({error: 'Oops, unable to copy'});\n }\n }\n render () {\n const { asset: { shortId, claimData : { channelName, certificateId, description, name, claimId, fileExt, contentType, thumbnail, host } } } = this.props;\n return (\n
\n {channelName &&\n
\n
\n Channel:\n
\n
\n {channelName}\n
\n
\n }\n\n {description &&\n
\n {description}\n
\n }\n\n
\n
\n
\n Share:\n
\n
\n \n twitter\n facebook\n tumblr\n reddit\n
\n
\n
\n
\n\n
\n \n );\n }\n};\n\nexport default AssetInfo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select request\n const previousRequest = show.requestList[requestId] || null;\n // select channel\n let channel;\n if (previousRequest) {\n const channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport ErrorPage from 'pages/ErrorPage';\nimport NavBar from 'containers/NavBar';\nimport ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay';\n\nclass ShowChannel extends React.Component {\n render () {\n const { channel } = this.props;\n if (channel) {\n const { name, longId, shortId } = channel;\n return (\n
\n \n \n
\n
\n

channel name: {name}

\n

full channel id: {longId}

\n

short channel id: {shortId}

\n
\n
\n \n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowChannel;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/view.jsx","import { connect } from 'react-redux';\nimport { onUpdateChannelClaims } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select channel key\n const request = show.requestList[show.request.id];\n const channelKey = request.key;\n // select channel claims\n const channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey,\n channel,\n };\n};\n\nconst mapDispatchToProps = {\n onUpdateChannelClaims,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/index.js","import React from 'react';\nimport AssetPreview from 'components/AssetPreview';\n\nclass ChannelClaimsDisplay extends React.Component {\n constructor (props) {\n super(props);\n this.showNextResultsPage = this.showNextResultsPage.bind(this);\n this.showPreviousResultsPage = this.showPreviousResultsPage.bind(this);\n }\n showPreviousResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n showNextResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n showNewPage (page) {\n const { channelKey, channel: { name, longId } } = this.props;\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n render () {\n const { channel: { claimsData: { claims, currentPage, totalPages } } } = this.props;\n return (\n
\n {(claims.length > 0) ? (\n
\n {claims.map((claim, index) => )}\n
\n {(currentPage > 1) &&\n \n }\n {(currentPage < totalPages) &&\n \n }\n
\n
\n ) : (\n

There are no claims in this channel

\n )}\n
\n );\n }\n};\n\nexport default ChannelClaimsDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/view.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nconst AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail } }) => {\n const directSourceLink = `${claimId}/${name}.${fileExt}`;\n const showUrlLink = `/${claimId}/${name}`;\n return (\n
\n \n {(() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

unsupported file type

\n );\n }\n })()}\n \n
\n );\n};\n\nexport default AssetPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site: { host, title } }) => {\n return {\n host,\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/index.jsx","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport Helmet from 'react-helmet';\n\nclass FourOhForPage extends React.Component {\n render () {\n const {title, host} = this.props;\n return (\n
\n \n {title} - 404\n \n \n \n
\n

404

\n

That page does not exist

\n
\n
\n );\n }\n};\n\nexport default FourOhForPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/view.jsx","const { sendGAServeEvent } = require('../helpers/googleAnalytics');\nconst { determineResponseType, flipClaimNameAndIdForBackwardsCompatibility, logRequestData, getClaimIdAndServeAsset } = require('../helpers/serveHelpers.js');\nconst lbryUri = require('../helpers/lbryUri.js');\nconst handleShowRender = require('../helpers/handleShowRender.jsx');\nconst SERVE = 'SERVE';\n\nmodule.exports = (app) => {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({ claimName } = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // parse the identifier\n let isChannel, channelName, channelClaimId, claimId;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(params.identifier));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n if (!isChannel) {\n [claimId, claimName] = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({claimName} = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/asset-routes.js","const logger = require('winston');\nconst { getClaimId, getLocalFileRecord } = require('../controllers/serveController.js');\nconst { handleErrorResponse } = require('./errorHandlers.js');\n\nconst SERVE = 'SERVE';\nconst SHOW = 'SHOW';\nconst NO_FILE = 'NO_FILE';\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml ({accept}) {\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser (headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset ({accept, range}) {\n const imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n const videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId (claimId) {\n return ((claimId.length === 40) && !/[^A-Za-z0-9]/g.test(claimId));\n};\n\nfunction isValidShortId (claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId (input) {\n return (isValidClaimId(input) || isValidShortId(input));\n};\n\nfunction serveAssetToClient (claimId, name, res) {\n return getLocalFileRecord(claimId, name)\n .then(fileRecord => {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect(`/api/claim/get/${name}/${claimId}`);\n }\n // serve the file\n const {filePath, fileType} = fileRecord;\n logger.verbose(`serving file: ${filePath}`);\n const sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type' : fileType || 'image/jpeg',\n },\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n })\n .catch(error => {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset (channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(fullClaimId => {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'no claim id could be found'});\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'no channel id could be found'});\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n })\n .catch(error => {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType (hasFileExtension, headers) {\n let responseType;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) { // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) { // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility (identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n const tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData (responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/serveHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n logger.debug('parsing identifier:', identifier);\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex\n .exec(identifier)\n .map(match => match || null);\n logger.debug(`${proto}, ${value}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your url. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Invalid characters in channel name: ${nameBadChars.join(', ')}.`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId,\n claimId,\n };\n },\n parseClaim: function (claim) {\n logger.debug('parsing name:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Invalid characters in claim name: ${nameBadChars.join(', ')}.`);\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No file extension provided after separator ${modifierSeperator}.`);\n }\n if (modifierSeperator !== '.') {\n throw new Error(`The ${modifierSeperator} modifier is not supported in the claim name`);\n }\n }\n // return results\n return {\n claimName,\n };\n },\n parseModifier: function (claim) {\n logger.debug('parsing modifier:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n // Validate and process modifier\n let hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryUri.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore, applyMiddleware } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage';\nimport createSagaMiddleware from 'redux-saga';\nimport { call } from 'redux-saga/effects';\nimport { handleShowPageUri } from '../../client/sagas/show_uri';\nimport { onHandleShowPageUri } from '../../client/actions/show';\n\nimport Helmet from 'react-helmet';\n\nconst returnSagaWithParams = (saga, params) => {\n return function * () {\n yield call(saga, params);\n };\n};\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create and apply middleware\n const sagaMiddleware = createSagaMiddleware();\n const middleware = applyMiddleware(sagaMiddleware);\n\n // create a new Redux store instance\n const store = createStore(Reducer, middleware);\n\n // create saga\n const action = onHandleShowPageUri(req.params);\n const saga = returnSagaWithParams(handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware\n .run(saga)\n .done\n .then(() => {\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handleShowRender.jsx","module.exports = require(\"redux-saga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga\"\n// module id = 128\n// module chunks = 0","import { call, put, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { onRequestError, onNewChannelRequest, onNewAssetRequest } from 'actions/show';\nimport { newAssetRequest } from 'sagas/show_asset';\nimport { newChannelRequest } from 'sagas/show_channel';\nimport lbryUri from 'utils/lbryUri';\n\nfunction * parseAndUpdateIdentifierAndClaim (modifier, claim) {\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n let isChannel, channelName, channelClaimId, claimId, claimName, extension;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(modifier));\n ({ claimName, extension } = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n if (isChannel) {\n return yield call(newAssetRequest, onNewAssetRequest(claimName, null, channelName, channelClaimId, extension));\n };\n yield call(newAssetRequest, onNewAssetRequest(claimName, claimId, null, null, extension));\n}\nfunction * parseAndUpdateClaimOnly (claim) {\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n let isChannel, channelName, channelClaimId;\n try {\n ({ isChannel, channelName, channelClaimId } = lbryUri.parseIdentifier(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n // return early if this request is for a channel\n if (isChannel) {\n return yield call(newChannelRequest, onNewChannelRequest(channelName, channelClaimId));\n }\n // if not for a channel, parse the claim request\n let claimName, extension;\n try {\n ({claimName, extension} = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield call(newAssetRequest, onNewAssetRequest(claimName, null, null, null, extension));\n}\n\nexport function * handleShowPageUri (action) {\n const { identifier, claim } = action.data;\n if (identifier) {\n return yield call(parseAndUpdateIdentifierAndClaim, identifier, claim);\n }\n yield call(parseAndUpdateClaimOnly, claim);\n};\n\nexport function * watchHandleShowPageUri () {\n yield takeLatest(actions.HANDLE_SHOW_URI, handleShowPageUri);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_uri.js","import { call, put, select, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addRequestToRequestList, onRequestError, onRequestUpdate, addAssetToAssetList } from 'actions/show';\nimport { getLongClaimId, getShortId, getClaimData } from 'api/assetApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newAssetRequest (action) {\n const { requestType, requestId, name, modifier } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get long id && add request to request list\n let longId;\n try {\n ({data: longId} = yield call(getLongClaimId, host, name, modifier));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n const assetKey = `a#${name}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, assetKey));\n // is this an existing asset?\n // If this asset is in the asset list, it's already been fetched\n if (state.assetList[assetKey]) {\n return null;\n }\n // get short Id\n let shortId;\n try {\n ({data: shortId} = yield call(getShortId, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // get asset claim data\n let claimData;\n try {\n ({data: claimData} = yield call(getClaimData, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // add asset to asset list\n yield put(addAssetToAssetList(assetKey, null, name, longId, shortId, claimData));\n // clear any errors in request error\n yield put(onRequestError(null));\n};\n\nexport function * watchNewAssetRequest () {\n yield takeLatest(actions.ASSET_REQUEST_NEW, newAssetRequest);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_asset.js","import Request from 'utils/request';\n\nexport function getLongClaimId (host, name, modifier) {\n let body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n const params = {\n method : 'POST',\n headers: { 'Content-Type': 'application/json' },\n body : JSON.stringify(body),\n };\n // create url\n const url = `${host}/api/claim/long-id`;\n // return the request promise\n return Request(url, params);\n};\n\nexport function getShortId (host, name, claimId) {\n const url = `${host}/api/claim/short-id/${claimId}/${name}`;\n return Request(url);\n};\n\nexport function getClaimData (host, name, claimId) {\n const url = `${host}/api/claim/data/${name}/${claimId}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/assetApi.js","import {call, put, select, takeLatest} from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addNewChannelToChannelList, addRequestToRequestList, onRequestError, onRequestUpdate, updateChannelClaims } from 'actions/show';\nimport { getChannelClaims, getChannelData } from 'api/channelApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newChannelRequest (action) {\n const { requestType, requestId, channelName, channelId } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get channel long id\n let longId, shortId;\n try {\n ({ data: {longChannelClaimId: longId, shortChannelClaimId: shortId} } = yield call(getChannelData, host, channelName, channelId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the request in the channel requests list\n const channelKey = `c#${channelName}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, channelKey));\n // is this an existing channel?\n // If this channel is in the channel list, it's already been fetched\n if (state.channelList[channelKey]) {\n return null;\n }\n // get channel claims data\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, channelName, 1));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the channel data in the channel list\n yield put(addNewChannelToChannelList(channelKey, channelName, shortId, longId, claimsData));\n // clear any request errors\n yield put(onRequestError(null));\n}\n\nexport function * watchNewChannelRequest () {\n yield takeLatest(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n};\n\nfunction * getNewClaimsAndUpdateChannel (action) {\n const { channelKey, name, longId, page } = action.data;\n const host = yield select(selectSiteHost);\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, name, page));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield put(updateChannelClaims(channelKey, claimsData));\n}\n\nexport function * watchUpdateChannelClaims () {\n yield takeLatest(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_channel.js","import Request from 'utils/request';\n\nexport function getChannelData (host, id, name) {\n if (!id) id = 'none';\n const url = `${host}/api/channel/data/${name}/${id}`;\n return Request(url);\n};\n\nexport function getChannelClaims (host, longId, name, page) {\n if (!page) page = 1;\n const url = `${host}/api/channel/claims/${name}/${longId}/${page}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/channelApi.js","const handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = app => {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', (req, res) => {\n // send response\n handlePageRender(req, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/fallback-routes.js","const { logLevel } = require('../../config/loggerConfig');\n\nmodule.exports = (winston) => {\n // configure\n winston.configure({\n transports: [\n new (winston.transports.Console)({\n level : logLevel,\n timestamp : false,\n colorize : true,\n prettyPrint : true,\n handleExceptions : true,\n humanReadableUnhandledException: true,\n }),\n ],\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureLogger.js","const loggerConfig = {\n logLevel: 'debug', // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/loggerConfig.js","const winstonSlackWebHook = require('winston-slack-webhook').SlackWebHook;\nconst slackConfig = require('../../config/slackConfig.js');\n\nmodule.exports = (winston) => {\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = slackConfig;\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-errors-transport',\n level : 'warn',\n webhookUrl: slackWebHook,\n channel : slackErrorChannel,\n username : 'spee.ch',\n iconEmoji : ':face_with_head_bandage:',\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-info-transport',\n level : 'info',\n webhookUrl: slackWebHook,\n channel : slackInfoChannel,\n username : 'spee.ch',\n iconEmoji : ':nerd_face:',\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureSlack.js","module.exports = require(\"winston-slack-webhook\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston-slack-webhook\"\n// module id = 138\n// module chunks = 0","import ActiveStatusBar from 'components/ActiveStatusBar';\r\nimport AssetPreview from 'components/AssetPreview';\r\nimport ExpandingTextArea from 'components/ExpandingTextArea';\r\nimport GAListener from 'components/GAListener';\r\nimport InactiveStatusBar from 'components/InactiveStatusBar';\r\nimport Logo from 'components/Logo';\r\nimport NavBarChannelOptionsDropdown from 'components/NavBarChannelOptionsDropdown';\r\nimport ProgressBar from 'components/ProgressBar';\r\nimport PublishPreview from 'components/PublishPreview';\r\nimport PublishUrlMiddleDisplay from 'components/PublishUrlMiddleDisplay';\r\nimport SEO from 'components/SEO';\r\n\r\nconst components = {\r\n ActiveStatusBar,\r\n AssetPreview,\r\n ExpandingTextArea,\r\n GAListener,\r\n InactiveStatusBar,\r\n Logo,\r\n NavBarChannelOptionsDropdown,\r\n ProgressBar,\r\n PublishPreview,\r\n PublishUrlMiddleDisplay,\r\n SEO,\r\n}\r\n\r\nexport default components;\r\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/index.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass ExpandingTextarea extends Component {\n constructor (props) {\n super(props);\n this._handleChange = this._handleChange.bind(this);\n }\n componentDidMount () {\n this.adjustTextarea({});\n }\n _handleChange (event) {\n const { onChange } = this.props;\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n adjustTextarea ({ target = this.el }) {\n target.style.height = 0;\n target.style.height = `${target.scrollHeight}px`;\n }\n render () {\n const { ...rest } = this.props;\n return (\n this.el = x}\n onChange={this._handleChange}\n />\n );\n }\n}\n\nExpandingTextarea.propTypes = {\n onChange: PropTypes.func,\n};\n\nexport default ExpandingTextarea;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ExpandingTextArea/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass PublishPreview extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n imgSource : '',\n defaultThumbnail: '/assets/img/video_thumb_default.png',\n };\n }\n componentDidMount () {\n this.setPreviewImageSource(this.props.file);\n }\n componentWillReceiveProps (newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n }\n setPreviewImageSourceFromFile (file) {\n const previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = () => {\n this.setState({imgSource: previewReader.result});\n };\n }\n setPreviewImageSource (file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n render () {\n return (\n \n );\n }\n};\n\nPublishPreview.propTypes = {\n dimPreview: PropTypes.bool.isRequired,\n file : PropTypes.object.isRequired,\n thumbnail : PropTypes.object,\n};\n\nexport default PublishPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishPreview/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction UrlMiddle ({publishInChannel, selectedChannel, loggedInChannelName, loggedInChannelShortId}) {\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return {loggedInChannelName}:{loggedInChannelShortId} /;\n }\n return @channelSelect a channel below /;\n }\n return (\n xyzThis will be a random id /\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel : PropTypes.bool.isRequired,\n loggedInChannelName : PropTypes.string,\n loggedInChannelShortId: PropTypes.string,\n};\n\nexport default UrlMiddle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishUrlMiddleDisplay/index.jsx"],"sourceRoot":""} \ No newline at end of file diff --git a/speech.js b/speech.js index 1a773343..f1307854 100644 --- a/speech.js +++ b/speech.js @@ -4,8 +4,8 @@ const components = require('client/components'); // const pages = require('client/pages'); const exports = { - server, - components, + SpeechServer: server, + Components : components, // containers, // pages, }; -- 2.45.2 From 6713d660b34710766320460271218d1ce4496087 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Tue, 20 Mar 2018 17:08:30 -0700 Subject: [PATCH 4/8] got components exporting properly --- client/components/index.js | 28 +- index.js | 9282 ++++++- public/bundle/bundle.js | 45776 ++++++++++++++++++++++++++++++++++- server/server.js | 4 +- speech.js | 8 +- 5 files changed, 55069 insertions(+), 29 deletions(-) diff --git a/client/components/index.js b/client/components/index.js index 5ddecb15..a0cbae81 100644 --- a/client/components/index.js +++ b/client/components/index.js @@ -1,16 +1,16 @@ -import ActiveStatusBar from 'components/ActiveStatusBar'; -import AssetPreview from 'components/AssetPreview'; -import ExpandingTextArea from 'components/ExpandingTextArea'; -import GAListener from 'components/GAListener'; -import InactiveStatusBar from 'components/InactiveStatusBar'; -import Logo from 'components/Logo'; -import NavBarChannelOptionsDropdown from 'components/NavBarChannelOptionsDropdown'; -import ProgressBar from 'components/ProgressBar'; -import PublishPreview from 'components/PublishPreview'; -import PublishUrlMiddleDisplay from 'components/PublishUrlMiddleDisplay'; -import SEO from 'components/SEO'; +import ActiveStatusBar from './ActiveStatusBar'; +import AssetPreview from './AssetPreview'; +import ExpandingTextArea from './ExpandingTextArea'; +import GAListener from './GAListener'; +import InactiveStatusBar from './InactiveStatusBar'; +import Logo from './Logo'; +import NavBarChannelOptionsDropdown from './NavBarChannelOptionsDropdown'; +import ProgressBar from './ProgressBar'; +import PublishPreview from './PublishPreview'; +import PublishUrlMiddleDisplay from './PublishUrlMiddleDisplay'; +import SEO from './SEO'; -const components = { +module.exports = { ActiveStatusBar, AssetPreview, ExpandingTextArea, @@ -22,6 +22,4 @@ const components = { PublishPreview, PublishUrlMiddleDisplay, SEO, -} - -export default components; +}; diff --git a/index.js b/index.js index e82262b8..1bd57aa5 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,9280 @@ -module.exports=function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=57)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("winston")},function(e,t){e.exports=require("react-redux")},function(e,t,n){"use strict";function r(){var e=this;this.analytics={googleId:"default"},this.assetDefaults={description:"An asset published on Spee.ch",thumbnail:"https://spee.ch/assets/img/video_thumb_default.png",title:"Spee.ch"},this.auth={sessionKey:"default"},this.componentsConfig={components:{},containers:{},pages:{}},this.details={description:"Open-source, decentralized image and video sharing.",host:"default",port:3e3,title:"Spee.ch",twitter:"@spee_ch"},this.publishing={additionalClaimAddresses:[],disabled:!1,disabledMessage:"Please check back soon.",primaryClaimAddress:"default",thumbnailChannel:"default",thumbnailChannelId:"default",uploadDirectory:"/home/lbry/Uploads"},this.configure=function(t){if(!t)return console.log("No site config received.");var n=t.analytics,r=t.assetDefaults,a=t.auth,o=t.componentsConfig,l=t.details,i=t.publishing;e.analytics=n,e.assetDefaults=r,e.auth=a,e.details=l,e.publishing=i,e.componentsConfig=o}}e.exports=new r},function(e,t){e.exports=require("react-router-dom")},function(e,t,n){"use strict";var r=n(32),a=n(1);console.log("exporting sequelize models");var o=n(29),l=o.database,i=o.username,u=o.password,s={},c=new r(l,i,u,{host:"localhost",dialect:"mysql",dialectOptions:{decimalNumbers:!0},logging:!1,pool:{max:5,min:0,idle:1e4,acquire:1e4}});c.authenticate().then(function(){a.info("Sequelize has established mysql connection successfully.")}).catch(function(e){a.error("Sequelize was unable to connect to the database:",e)});var f=n(74),d=n(75),p=n(76),m=n(77),h=n(78),g=n(79);s.Certificate=c.import("Certificate",f),s.Channel=c.import("Channel",d),s.Claim=c.import("Claim",p),s.File=c.import("File",m),s.Request=c.import("Request",h),s.User=c.import("User",g),Object.keys(s).forEach(function(e){s[e].associate&&(a.info("Associating model:",e),s[e].associate(s))}),s.sequelize=c,s.Sequelize=r,s.upsert=function(e,t,n,r){return e.findOne({where:n}).then(function(n){return n?(a.debug("updating record in db."+r),n.update(t)):(a.debug("creating record in db."+r),e.create(t))}).catch(function(e){throw a.error(r+".upsert error",e),e})},e.exports=s},function(e,t,n){"use strict";function r(e){return 204===e.status||205===e.status?null:e.json()}function a(e,t){if(e.status>=200&&e.status<300)return t;var n=new Error(t.message);throw n.response=e,n}function o(e,t){return fetch(e,t).then(function(e){return Promise.all([e,r(e)])}).then(function(e){var t=l(e,2);return a(t[0],t[1])})}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=o,n(96)},function(e,t,n){"use strict";function r(e){return{type:y.HANDLE_SHOW_URI,data:e}}function a(e){return{type:y.REQUEST_ERROR,data:e}}function o(e,t){var n=v.CHANNEL,r="cr#"+e+"#"+t;return{type:y.CHANNEL_REQUEST_NEW,data:{requestType:n,requestId:r,channelName:e,channelId:t}}}function l(e,t,n,r,a){var o=a?v.ASSET_LITE:v.ASSET_DETAILS,l="ar#"+e+"#"+t+"#"+n+"#"+r;return{type:y.ASSET_REQUEST_NEW,data:{requestType:o,requestId:l,name:e,modifier:{id:t,channel:{name:n,id:r}}}}}function i(e,t){return{type:y.REQUEST_UPDATE,data:{requestType:e,requestId:t}}}function u(e,t,n){return{type:y.REQUEST_LIST_ADD,data:{id:e,error:t,key:n}}}function s(e,t,n,r,a,o){return{type:y.ASSET_ADD,data:{id:e,error:t,name:n,claimId:r,shortId:a,claimData:o}}}function c(e,t,n,r,a){return{type:y.CHANNEL_ADD,data:{id:e,name:t,shortId:n,longId:r,claimsData:a}}}function f(e,t,n,r){return{type:y.CHANNEL_CLAIMS_UPDATE_ASYNC,data:{channelKey:e,name:t,longId:n,page:r}}}function d(e,t){return{type:y.CHANNEL_CLAIMS_UPDATE_SUCCESS,data:{channelListId:e,claimsData:t}}}function p(e,t){return{type:y.FILE_REQUESTED,data:{name:e,claimId:t}}}function m(e){return{type:y.FILE_AVAILABILITY_UPDATE,data:e}}function h(e){return{type:y.DISPLAY_ASSET_ERROR,data:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.onHandleShowPageUri=r,t.onRequestError=a,t.onNewChannelRequest=o,t.onNewAssetRequest=l,t.onRequestUpdate=i,t.addRequestToRequestList=u,t.addAssetToAssetList=s,t.addNewChannelToChannelList=c,t.onUpdateChannelClaims=f,t.updateChannelClaims=d,t.fileRequested=p,t.updateFileAvailability=m,t.updateDisplayAssetError=h;var g=n(11),y=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(g),v=n(52)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),a=n(24),o=n(25),l=n(98),i=function(e){return e&&e.__esModule?e:{default:e}}(l),u=function(e){var t=e.channel,n=e.site;return{channelName:t.loggedInChannel.name,channelShortId:t.loggedInChannel.shortId,channelLongId:t.loggedInChannel.longId,siteDescription:n.description}},s=function(e){return{onChannelLogin:function(t,n,r){e((0,a.updateLoggedInChannel)(t,n,r)),e((0,o.updateSelectedChannel)(t))},onChannelLogout:function(){e((0,a.updateLoggedInChannel)(null,null,null))}}};t.default=(0,r.connect)(u,s)(i.default)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),a=n(99),o=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){var t=e.site;return{defaultDescription:t.defaultDescription,defaultThumbnail:t.defaultThumbnail,siteDescription:t.description,siteHost:t.host,siteTitle:t.title,siteTwitter:t.twitter}};t.default=(0,r.connect)(l,null)(o.default)},function(e,t){e.exports=require("prop-types")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.HANDLE_SHOW_URI="HANDLE_SHOW_URI",t.REQUEST_ERROR="REQUEST_ERROR",t.REQUEST_UPDATE="REQUEST_UPDATE",t.ASSET_REQUEST_NEW="ASSET_REQUEST_NEW",t.CHANNEL_REQUEST_NEW="CHANNEL_REQUEST_NEW",t.REQUEST_LIST_ADD="REQUEST_LIST_ADD",t.ASSET_ADD="ASSET_ADD",t.CHANNEL_ADD="CHANNEL_ADD",t.CHANNEL_CLAIMS_UPDATE_ASYNC="CHANNEL_CLAIMS_UPDATE_ASYNC",t.CHANNEL_CLAIMS_UPDATE_SUCCESS="CHANNEL_CLAIMS_UPDATE_SUCCESS",t.FILE_REQUESTED="FILE_REQUESTED",t.FILE_AVAILABILITY_UPDATE="FILE_AVAILABILITY_UPDATE",t.DISPLAY_ASSET_ERROR="DISPLAY_ASSET_ERROR"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.selectAsset=function(e){var t=e.requestList[e.request.id],n=t.key;return e.assetList[n]},t.selectShowState=function(e){return e.show}},function(e,t){e.exports=require("react-helmet")},function(e,t){e.exports=require("redux-saga/effects")},function(e,t,n){"use strict";var r=n(71),a=n(1),o=n(72),l=o.api,i=l.apiHost,u=l.apiPort,s="http://"+i+":"+u,c=n(16),f=c.chooseGaLbrynetPublishLabel,d=c.sendGATimingEvent,p=function(e,t,n){var r=e.data;if(a.debug("lbry api data:",r),r.result)return r.result.error?(a.debug("Lbrynet api error:",r.result.error),void n(new Error(r.result.error))):void t(r.result);n(JSON.stringify(r))};e.exports={publishClaim:function(e){a.debug('lbryApi >> Publishing claim to "'+e.name+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"publish",params:e}).then(function(r){d("lbrynet","publish",f(e),t,Date.now()),p(r,n,a)}).catch(function(e){a(e)})})},getClaim:function(e){a.debug('lbryApi >> Getting Claim for "'+e+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"get",params:{uri:e,timeout:20}}).then(function(e){d("lbrynet","getClaim","GET",t,Date.now()),p(e,n,a)}).catch(function(e){a(e)})})},getClaimList:function(e){a.debug('lbryApi >> Getting claim_list for "'+e+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"claim_list",params:{name:e}}).then(function(e){d("lbrynet","getClaimList","CLAIM_LIST",t,Date.now()),p(e,n,a)}).catch(function(e){a(e)})})},resolveUri:function(e){a.debug('lbryApi >> Resolving URI for "'+e+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"resolve",params:{uri:e}}).then(function(r){var o=r.data;d("lbrynet","resolveUri","RESOLVE",t,Date.now()),o.result[e].error?a(o.result[e].error):n(o.result[e])}).catch(function(e){a(e)})})},getDownloadDirectory:function(){a.debug("lbryApi >> Retrieving the download directory path from lbry daemon...");var e=Date.now();return new Promise(function(t,n){r.post(s,{method:"settings_get"}).then(function(n){var r=n.data;if(d("lbrynet","getDownloadDirectory","SETTINGS_GET",e,Date.now()),!r.result)return new Error("Successfully connected to lbry daemon, but unable to retrieve the download directory.");t(r.result.download_directory)}).catch(function(e){a.error("Lbrynet Error:",e),t("/home/lbry/Downloads/")})})},createChannel:function(e){a.debug("lbryApi >> Creating channel for "+e+"...");var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"channel_new",params:{channel_name:e,amount:.1}}).then(function(e){d("lbrynet","createChannel","CHANNEL_NEW",t,Date.now()),p(e,n,a)}).catch(function(e){a(e)})})}}},function(e,t,n){"use strict";function r(e,t,n){return{eventCategory:"client requests",eventAction:"serve request",eventLabel:n,ipOverride:t,userAgentOverride:e["user-agent"]}}function a(e,t,n,r,a){return{userTimingCategory:e,userTimingVariableName:t,userTimingTime:a-r,userTimingLabel:n}}function o(e,t){var n=e.replace(/\./g,"-");u(c,n,{strictCidFormat:!1,https:!0}).event(t,function(e){e&&i.error("Google Analytics Event Error >>",e)})}function l(e,t){u(c,e,{strictCidFormat:!1,https:!0}).timing(t,function(e){e&&i.error("Google Analytics Event Error >>",e),i.debug("Timing event successfully sent to google analytics")})}var i=n(1),u=n(73),s=n(3),c=s.analytics.googleId,f=s.details.title;e.exports={sendGAServeEvent:function(e,t,n){o(t,r(e,t,n))},sendGATimingEvent:function(e,t,n,r,o){var i=a(e,t,n,r,o);l(f,i)},chooseGaLbrynetPublishLabel:function(e){var t=e.channel_name,n=e.channel_id;return t||n?"PUBLISH_IN_CHANNEL_CLAIM":"PUBLISH_ANONYMOUS_CLAIM"}}},function(e,t){e.exports=require("redux")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=1?r(a,t):a}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n(3),l=o.componentsConfig;t.dynamicImport=function(e){if(!e)throw new Error("no file path provided to dynamicImport()");if("string"!=typeof e)throw console.log("dynamicImport > filePath:",e),console.log("dynamicImport > filePath type:",void 0===e?"undefined":a(e)),new Error("file path provided to dynamicImport() must be a string");if(!l)return console.log("no componentsConfig found in siteConfig.js"),n(44)(""+e);var t=e.split("/").filter(function(e){return e.replace(/\s/g,"").length}),o=r(l,t);return o||n(44)(""+e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return t+"/"+e},a=function(e,t){var n=void 0,r=void 0,a=void 0,o=void 0;if(e.claimData){var l=e.claimData;n=l.channelName,r=l.certificateId,a=l.name,o=l.claimId}return n?t+"/"+n+":"+r+"/"+a:t+"/"+o+"/"+a},o=function(e,t){return t+"/"+e.name+":"+e.longId};t.createCanonicalLink=function(e,t,n,l){return e?a(e,l):t?o(t,l):r(n,l)}},function(e,t,n){"use strict";var r=function(){function e(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.exports={REGEXP_INVALID_CLAIM:/[^A-Za-z0-9-]/g,REGEXP_INVALID_CHANNEL:/[^A-Za-z0-9-@]/g,REGEXP_ADDRESS:/^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,CHANNEL_CHAR:"@",parseIdentifier:function(t){var n=new RegExp("([^:$#/]*)([:$#]?)([^/]*)"),a=n.exec(t).map(function(e){return e||null}),o=r(a,4),l=(o[0],o[1]),i=o[2],u=o[3];if(!l)throw new Error('Check your URL. No channel name provided before "'+i+'"');var s=l.startsWith(e.exports.CHANNEL_CHAR),c=s?l:null,f=void 0;if(s){if(!c)throw new Error('Check your URL. No channel name after "@".');var d=c.match(e.exports.REGEXP_INVALID_CHANNEL);if(d)throw new Error('Check your URL. Invalid characters in channel name: "'+d.join(", ")+'".')}else f=l;var p=void 0;if(i){if(!u)throw new Error('Check your URL. No modifier provided after separator "'+i+'"');if(":"!==i)throw new Error('Check your URL. The "'+i+'" modifier is not currently supported');p=u}return{isChannel:s,channelName:c,channelClaimId:p||null,claimId:f||null}},parseClaim:function(t){var n=new RegExp("([^:$#/.]*)([:$#.]?)([^/]*)"),a=n.exec(t).map(function(e){return e||null}),o=r(a,4),l=(o[0],o[1]),i=o[2],u=o[3];if(!l)throw new Error('Check your URL. No claim name provided before "."');var s=l.match(e.exports.REGEXP_INVALID_CLAIM);if(s)throw new Error('Check your URL. Invalid characters in claim name: "'+s.join(", ")+'".');if(i){if(!u)throw new Error('Check your URL. No file extension provided after separator "'+i+'".');if("."!==i)throw new Error('Check your URL. The "'+i+'" separator is not supported in the claim name.')}return{claimName:l,extension:u||null}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e){switch(e.substring(e.lastIndexOf("."))){case"jpeg":case"jpg":return"image/jpeg";case"png":return"image/png";case"gif":return"image/gif";case"mp4":return"video/mp4";default:return"image/jpeg"}}return""},a=function(e,t,n,r){return[{property:"og:title",content:n},{property:"og:url",content:e},{property:"og:site_name",content:n},{property:"og:description",content:t},{property:"twitter:site",content:r},{property:"twitter:card",content:"summary"}]},o=function(e,t,n,r){var a=r.name;return[{property:"og:title",content:a+" on "+e},{property:"og:url",content:t+"/"+a+":"+r.longId},{property:"og:site_name",content:e},{property:"og:description",content:a+", a channel on "+e},{property:"twitter:site",content:n},{property:"twitter:card",content:"summary"}]},l=function(e,t,n,a,o,l){var i=a.claimData,u=i.contentType,s=e+"/"+i.claimId+"/"+i.name,c=e+"/"+i.claimId+"/"+i.name,f=e+"/"+i.claimId+"/"+i.name+"."+i.fileExt,d=i.title||i.name,p=i.description||o,m=r(i.thumbnail),h=i.thumbnail||l,g=[{property:"og:title",content:d},{property:"og:url",content:c},{property:"og:site_name",content:t},{property:"og:description",content:p},{property:"og:image:width",content:600},{property:"og:image:height",content:315},{property:"twitter:site",content:n}];return"video/mp4"===u||"video/webm"===u?(g.push({property:"og:video",content:f}),g.push({property:"og:video:secure_url",content:f}),g.push({property:"og:video:type",content:u}),g.push({property:"og:image",content:h}),g.push({property:"og:image:type",content:m}),g.push({property:"og:type",content:"video"}),g.push({property:"twitter:card",content:"player"}),g.push({property:"twitter:player",content:s}),g.push({property:"twitter:player:width",content:600}),g.push({property:"twitter:text:player_width",content:600}),g.push({property:"twitter:player:height",content:337}),g.push({property:"twitter:player:stream",content:f}),g.push({property:"twitter:player:stream:content_type",content:u})):(g.push({property:"og:image",content:f}),g.push({property:"og:image:type",content:u}),g.push({property:"og:type",content:"article"}),g.push({property:"twitter:card",content:"summary_large_image"})),g};t.createMetaTags=function(e,t,n,r,i,u,s,c){return i?l(t,n,r,i,s,c):u?o(t,n,r,u):a(e,t,n,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.createPageTitle=function(e,t){return t?e+" - "+t:""+e}},function(e,t,n){"use strict";function r(e,t,n){return{type:o.CHANNEL_UPDATE,data:{name:e,shortId:t,longId:n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.updateLoggedInChannel=r;var a=n(41),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(a)},function(e,t,n){"use strict";function r(e){return{type:h.FILE_SELECTED,data:e}}function a(){return{type:h.FILE_CLEAR}}function o(e,t){return{type:h.METADATA_UPDATE,data:{name:e,value:t}}}function l(e){return{type:h.CLAIM_UPDATE,data:e}}function i(e){return{type:h.SET_PUBLISH_IN_CHANNEL,channel:e}}function u(e,t){return{type:h.PUBLISH_STATUS_UPDATE,data:{status:e,message:t}}}function s(e,t){return{type:h.ERROR_UPDATE,data:{name:e,value:t}}}function c(e){return{type:h.SELECTED_CHANNEL_UPDATE,data:e}}function f(e){return{type:h.TOGGLE_METADATA_INPUTS,data:e}}function d(e){return{type:h.THUMBNAIL_NEW,data:e}}function p(e){return{type:h.PUBLISH_START,data:{history:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.selectFile=r,t.clearFile=a,t.updateMetadata=o,t.updateClaim=l,t.setPublishInChannel=i,t.updatePublishStatus=u,t.updateError=s,t.updateSelectedChannel=c,t.toggleMetadataInputs=f,t.onNewThumbnail=d,t.startPublish=p;var m=n(40),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(m)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;nthis.props.size)&&(t*=-1,e+=t),n[e].isActive=t>0,e+=t,this.setState({bars:n,incrementer:t,index:e})}},{key:"stopProgressBar",value:function(){clearInterval(this.updateInterval)}},{key:"render",value:function(){return s.default.createElement("div",null,this.state.bars.map(function(e,t){return e.isActive?s.default.createElement(p.default,{key:t}):s.default.createElement(h.default,{key:t})}))}}]),t}(s.default.Component);g.propTypes={size:f.default.number.isRequired},t.default=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0;)a+=1,r=t.substring(0,a),o=o.filter(function(e){return e.claimId&&e.claimId.substring(0,a)===r});return r}}},function(e,t,n){"use strict";var r=n(1),a=n(86),o=n(3),l=o.details,i=o.publishing;e.exports={parsePublishApiRequestBody:function(e){var t=e.name,n=e.nsfw,r=e.license,a=e.title,o=e.description,l=e.thumbnail;if(!t)throw new Error("no name field found in request");if(/[^A-Za-z0-9,-]/.exec(t))throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and "-"');return n="true"===n,r=r||null,a=a||null,o=o||null,l=l||null,{name:t,nsfw:n,license:r,title:a,description:o,thumbnail:l}},parsePublishApiRequestFiles:function(t){var n=t.file,r=t.thumbnail;if(!n)throw new Error("no file with key of [file] found in request");if(!n.path)throw new Error("no file path found");if(!n.type)throw new Error("no file type found");if(!n.size)throw new Error("no file type found");if(/'/.test(n.name))throw new Error("apostrophes are not allowed in the file name");return e.exports.validateFileTypeAndSize(n),{fileName:n.name,filePath:n.path,fileType:n.type,thumbnailFileName:r?r.name:null,thumbnailFilePath:r?r.path:null,thumbnailFileType:r?r.type:null}},validateFileTypeAndSize:function(e){switch(e.type){case"image/jpeg":case"image/jpg":case"image/png":if(e.size>1e7)throw r.debug("publish > file validation > .jpeg/.jpg/.png was too big"),new Error("Sorry, images are limited to 10 megabytes.");break;case"image/gif":if(e.size>5e7)throw r.debug("publish > file validation > .gif was too big"),new Error("Sorry, .gifs are limited to 50 megabytes.");break;case"video/mp4":if(e.size>5e7)throw r.debug("publish > file validation > .mp4 was too big"),new Error("Sorry, videos are limited to 50 megabytes.");break;default:throw r.debug("publish > file validation > unrecognized file type"),new Error("The "+e.type+" content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.")}return e},createBasicPublishParams:function(e,t,n,a,o,u,s){r.debug("Creating Publish Parameters"),null!==n&&""!==n.trim()||(n=t),null!==a&&""!==a.trim()||(a=""),null!==o&&""!==o.trim()||(o=" ");var c={name:t,file_path:e,bid:.01,metadata:{description:a,title:n,author:l.title,language:"en",license:o,nsfw:u},claim_address:i.primaryClaimAddress};return s&&(c.metadata.thumbnail=s),c},createThumbnailPublishParams:function(e,t,n,a){if(e)return r.debug("Creating Thumbnail Publish Parameters"),{name:t+"-thumb",file_path:e,bid:.01,metadata:{title:t+" thumbnail",description:"a thumbnail for "+t,author:l.title,language:"en",license:n,nsfw:a},claim_address:i.primaryClaimAddress,channel_name:i.thumbnailChannel,channel_id:i.thumbnailChannelId}},deleteTemporaryFile:function(e){a.unlink(e,function(t){if(t)throw r.error("error deleting temporary file "+e),t;r.debug("successfully deleted "+e)})},addGetResultsToFileData:function(e,t){return e.fileName=t.file_name,e.filePath=t.download_path,e},createFileData:function(e){var t=e.name,n=e.claimId,r=e.outpoint,a=e.height,o=e.address,l=e.nsfw;return{name:t,claimId:n,outpoint:r,height:a,address:o,fileName:"",filePath:"",fileType:e.contentType,nsfw:l}}}},function(e,t,n){"use strict";var r=function(){function e(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=n(1);e.exports={handleErrorResponse:function(t,n,o,l){a.error("Error on "+t,e.exports.useObjectPropertiesIfNoKeys(o));var i=e.exports.returnErrorMessageAndStatus(o),u=r(i,2),s=u[0],c=u[1];l.status(s).json(e.exports.createErrorResponsePayload(s,c))},returnErrorMessageAndStatus:function(e){var t=void 0,n=void 0;return"ECONNREFUSED"===e.code?(t=503,n="Connection refused. The daemon may not be running."):(t=400,n=e.message?e.message:e),[t,n]},useObjectPropertiesIfNoKeys:function(e){if(0===Object.keys(e).length){var t={};return Object.getOwnPropertyNames(e).forEach(function(n){t[n]=e[n]}),t}return e},createErrorResponsePayload:function(e,t){return{status:e,success:!1,message:t}}}},function(e,t,n){"use strict";var r=function(){function e(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=n(5),o=n(1),l=n(88),i=l.returnPaginatedChannelClaims;e.exports={getClaimId:function(t,n,r,a){return t?e.exports.getClaimIdByChannel(t,n,r):e.exports.getClaimIdByClaim(r,a)},getClaimIdByClaim:function(e,t){return o.debug("getClaimIdByClaim("+e+", "+t+")"),new Promise(function(n,r){a.Claim.getLongClaimId(e,t).then(function(e){e||n("NO_CLAIM"),n(e)}).catch(function(e){r(e)})})},getClaimIdByChannel:function(e,t,n){return o.debug("getClaimIdByChannel("+e+", "+t+", "+n+")"),new Promise(function(o,l){a.Certificate.getLongChannelId(e,t).then(function(e){return e?Promise.all([e,a.Claim.getClaimIdByLongChannelId(e,n)]):[null,null]}).then(function(e){var t=r(e,2),n=t[0],a=t[1];return n?a?void o(a):o("NO_CLAIM"):o("NO_CHANNEL")}).catch(function(e){l(e)})})},getChannelData:function(e,t,n){return new Promise(function(n,o){a.Certificate.getLongChannelId(e,t).then(function(t){return t?Promise.all([t,a.Certificate.getShortChannelIdFromLongChannelId(t,e)]):[null,null,null]}).then(function(t){var a=r(t,2),o=a[0],l=a[1];if(!o)return n("NO_CHANNEL");n({channelName:e,longChannelClaimId:o,shortChannelClaimId:l})}).catch(function(e){o(e)})})},getChannelClaims:function(e,t,n){return new Promise(function(o,l){a.Certificate.getLongChannelId(e,t).then(function(e){return e?Promise.all([e,a.Claim.getAllChannelClaims(e)]):[null,null,null]}).then(function(t){var a=r(t,2),l=a[0],u=a[1];if(!l)return o("NO_CHANNEL");var s=i(e,l,u,n);o(s)}).catch(function(e){l(e)})})},getLocalFileRecord:function(e,t){return a.File.findOne({where:{claimId:e,name:t}}).then(function(e){return e?e.dataValues:"NO_FILE"})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(0),o=r(a),l=n(38),i=n(17),u=n(39),s=r(u),c=n(2),f=n(4),d=n(18),p=r(d),m=n(43),h=r(m),g=n(55),y=r(g),v=n(13),b=r(v);e.exports=function(e,t){var n={},r=(0,i.createStore)(s.default),a=(0,l.renderToString)(o.default.createElement(c.Provider,{store:r},o.default.createElement(f.StaticRouter,{location:e.url,context:n},o.default.createElement(p.default,null,o.default.createElement(h.default,null))))),u=b.default.renderStatic();if(n.url)return t.redirect(301,n.url);var d=r.getState();t.send((0,y.default)(u,a,d))}},function(e,t){e.exports=require("react-dom/server")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(17),o=n(90),l=r(o),i=n(92),u=r(i),s=n(93),c=r(s),f=n(94),d=r(f);t.default=(0,a.combineReducers)({channel:u.default,publish:l.default,show:c.default,site:d.default})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.FILE_SELECTED="FILE_SELECTED",t.FILE_CLEAR="FILE_CLEAR",t.METADATA_UPDATE="METADATA_UPDATE",t.CLAIM_UPDATE="CLAIM_UPDATE",t.SET_PUBLISH_IN_CHANNEL="SET_PUBLISH_IN_CHANNEL",t.PUBLISH_STATUS_UPDATE="PUBLISH_STATUS_UPDATE",t.ERROR_UPDATE="ERROR_UPDATE",t.SELECTED_CHANNEL_UPDATE="SELECTED_CHANNEL_UPDATE",t.TOGGLE_METADATA_INPUTS="TOGGLE_METADATA_INPUTS",t.THUMBNAIL_NEW="THUMBNAIL_NEW",t.PUBLISH_START="PUBLISH_START"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CHANNEL_UPDATE="CHANNEL_UPDATE"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.LOCAL_CHECK="LOCAL_CHECK",t.UNAVAILABLE="UNAVAILABLE",t.ERROR="ERROR",t.AVAILABLE="AVAILABLE"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=r(a),l=n(4),i=n(19),u=n(97),s=r(u),c=n(100),f=r(c),d=n(106),p=r(d),m=n(122),h=r(m),g=(0,i.dynamicImport)("pages/HomePage"),y=function(){return o.default.createElement(l.Switch,null,o.default.createElement(l.Route,{exact:!0,path:"/",component:g}),o.default.createElement(l.Route,{exact:!0,path:"/about",component:s.default}),o.default.createElement(l.Route,{exact:!0,path:"/login",component:f.default}),o.default.createElement(l.Route,{exact:!0,path:"/:identifier/:claim",component:p.default}),o.default.createElement(l.Route,{exact:!0,path:"/:claim",component:p.default}),o.default.createElement(l.Route,{component:h.default}))};t.default=y},function(e,t,n){function r(e){return n(a(e))}function a(e){var t=o[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}var o={"./canonicalLink":20,"./canonicalLink.js":20,"./dynamicImport":19,"./dynamicImport.js":19,"./file":45,"./file.js":45,"./lbryUri":21,"./lbryUri.js":21,"./metaTags":22,"./metaTags.js":22,"./pageTitle":23,"./pageTitle.js":23,"./publish":46,"./publish.js":46,"./request":6,"./request.js":6,"./validate":47,"./validate.js":47};r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=44},function(e,t,n){"use strict";e.exports={validateFile:function(e){if(!e)throw new Error("no file provided");if(/'/.test(e.name))throw new Error("apostrophes are not allowed in the file name");switch(e.type){case"image/jpeg":case"image/jpg":case"image/png":if(e.size>1e7)throw new Error("Sorry, images are limited to 10 megabytes.");break;case"image/gif":if(e.size>5e7)throw new Error("Sorry, GIFs are limited to 50 megabytes.");break;case"video/mp4":if(e.size>5e7)throw new Error("Sorry, videos are limited to 50 megabytes.");break;default:throw new Error(e.type+" is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.")}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.createPublishMetadata=function(e,t,n,r,a){var o=t.type,l=n.title,i=n.description,u=n.license,s=n.nsfw,c={name:e,title:l,description:i,license:u,nsfw:s,type:o};return r&&(c.channelName=a),c},t.createPublishFormData=function(e,t,n){var r=new FormData;r.append("file",e),t&&r.append("thumbnail",t);for(var a in n)n.hasOwnProperty(a)&&r.append(a,n[a]);return r},t.createThumbnailUrl=function(e,t,n,r){return r+"/"+e+":"+t+"/"+n+"-thumb.png"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.validateChannelSelection=function(e,t,n){if(e&&t!==n.name)throw new Error("Log in to a channel or select Anonymous")},t.validatePublishParams=function(e,t,n){if(!e)throw new Error("Please choose a file");if(!t)throw new Error("Please enter a URL");if(n)throw new Error("Fix the url")}},function(e,t,n){"use strict";function r(){return o.default.createElement("svg",{version:"1.1",id:"Layer_1",x:"0px",y:"0px",height:"24px",viewBox:"0 0 80 31",enableBackground:"new 0 0 80 31",className:"nav-bar-logo"},o.default.createElement(l.Link,{to:"/"},o.default.createElement("title",null,"Logo"),o.default.createElement("desc",null,"Spee.ch logo"),o.default.createElement("g",{id:"About"},o.default.createElement("g",{id:"Publish-Form-V2-_x28_filled_x29_",transform:"translate(-42.000000, -23.000000)"},o.default.createElement("g",{id:"Group-17",transform:"translate(42.000000, 22.000000)"},o.default.createElement("text",{transform:"matrix(1 0 0 1 0 20)",fontSize:"25",fontFamily:"Roboto"},"Spee\n \n \n \n \n \n \x3c!--helmet--\x3e\n '+e.title.toString()+"\n "+e.meta.toString()+"\n "+e.link.toString()+'\n \x3c!--style sheets--\x3e\n \n \n \n \x3c!--google font--\x3e\n \n \n \n
\n
'+t+"
\n
\n \n \n \n \n '; +}; + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var selectSiteState = exports.selectSiteState = function selectSiteState(state) { + return state.site; +}; + +var selectSiteHost = exports.selectSiteHost = function selectSiteHost(state) { + return state.site.host; +}; + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(58); +__webpack_require__(59); +module.exports = __webpack_require__(60); + + +/***/ }), +/* 58 */ +/***/ (function(module, exports) { + +module.exports = require("babel-polyfill"); + +/***/ }), +/* 59 */ +/***/ (function(module, exports) { + +module.exports = require("whatwg-fetch"); + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var Server = __webpack_require__(61); +var Components = __webpack_require__(139); +// const containers = require('client/containers'); +// const pages = require('client/pages'); + +var _exports = { + Server: Server, + Components: Components + // containers, + // pages, +}; + +module.exports = _exports; + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// app dependencies +var express = __webpack_require__(62); +var bodyParser = __webpack_require__(63); +var expressHandlebars = __webpack_require__(64); +var Handlebars = __webpack_require__(65); +var helmet = __webpack_require__(66); +var passport = __webpack_require__(28); + +var _require = __webpack_require__(67), + serializeSpeechUser = _require.serializeSpeechUser, + deserializeSpeechUser = _require.deserializeSpeechUser; + +var cookieSession = __webpack_require__(68); +var http = __webpack_require__(69); +// logging dependencies +var logger = __webpack_require__(1); + +function Server() { + var _this = this; + + this.configureMysql = function (mysqlConfig) { + __webpack_require__(29).configure(mysqlConfig); + }; + this.configureSite = function (siteConfig) { + __webpack_require__(3).configure(siteConfig); + console.log(__webpack_require__(3)); + _this.sessionKey = siteConfig.auth.sessionKey; + _this.PORT = siteConfig.details.port; + }; + this.configureSlack = function (slackConfig) { + __webpack_require__(30).configure(slackConfig); + }; + this.createApp = function () { + // create an Express application + var app = express(); + + // trust the proxy to get ip address for us + app.enable('trust proxy'); + + // add middleware + app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties + app.use(express.static(__dirname + '/public')); // 'express.static' to serve static files from public directory + app.use(bodyParser.json()); // 'body parser' for parsing application/json + app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded + app.use(function (req, res, next) { + // custom logging middleware to log all incoming http requests + logger.verbose('Request on ' + req.originalUrl + ' from ' + req.ip); + next(); + }); + + // configure passport + passport.serializeUser(serializeSpeechUser); + passport.deserializeUser(deserializeSpeechUser); + var localSignupStrategy = __webpack_require__(70); + var localLoginStrategy = __webpack_require__(81); + passport.use('local-signup', localSignupStrategy); + passport.use('local-login', localLoginStrategy); + // initialize passport + app.use(cookieSession({ + name: 'session', + keys: [_this.sessionKey], + maxAge: 24 * 60 * 60 * 1000 // i.e. 24 hours + })); + app.use(passport.initialize()); + app.use(passport.session()); + + // configure handlebars & register it with express app + var hbs = expressHandlebars.create({ + defaultLayout: 'embed', + handlebars: Handlebars + }); + app.engine('handlebars', hbs.engine); + app.set('view engine', 'handlebars'); + + // set the routes on the app + __webpack_require__(82)(app); + __webpack_require__(83)(app); + __webpack_require__(89)(app); + __webpack_require__(124)(app); + __webpack_require__(134)(app); + + _this.app = app; + }; + this.initialize = function () { + __webpack_require__(135)(logger); + __webpack_require__(137)(logger); + _this.createApp(); + _this.server = http.Server(_this.app); + }; + this.start = function () { + var db = __webpack_require__(5); + // sync sequelize + db.sequelize.sync() + // start the server + .then(function () { + _this.server.listen(_this.PORT, function () { + logger.info('Server is listening on PORT ' + _this.PORT); + }); + }).catch(function (error) { + logger.error('Startup Error:', error); + }); + }; +}; + +module.exports = Server; + +/***/ }), +/* 62 */ +/***/ (function(module, exports) { + +module.exports = require("express"); + +/***/ }), +/* 63 */ +/***/ (function(module, exports) { + +module.exports = require("body-parser"); + +/***/ }), +/* 64 */ +/***/ (function(module, exports) { + +module.exports = require("express-handlebars"); + +/***/ }), +/* 65 */ +/***/ (function(module, exports) { + +module.exports = require("handlebars"); + +/***/ }), +/* 66 */ +/***/ (function(module, exports) { + +module.exports = require("helmet"); + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var logger = __webpack_require__(1); + +module.exports = { + serializeSpeechUser: function serializeSpeechUser(user, done) { + // returns user data to be serialized into session + logger.debug('serializing user'); + done(null, user); + }, + deserializeSpeechUser: function deserializeSpeechUser(user, done) { + // deserializes session and populates additional info to req.user + logger.debug('deserializing user'); + done(null, user); + } +}; + +/***/ }), +/* 68 */ +/***/ (function(module, exports) { + +module.exports = require("cookie-session"); + +/***/ }), +/* 69 */ +/***/ (function(module, exports) { + +module.exports = require("http"); + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + +var PassportLocalStrategy = __webpack_require__(31).Strategy; +var lbryApi = __webpack_require__(15); +var logger = __webpack_require__(1); +var db = __webpack_require__(5); + +module.exports = new PassportLocalStrategy({ + usernameField: 'username', + passwordField: 'password' +}, function (username, password, done) { + logger.verbose('new channel signup request. user: ' + username + ' pass: ' + password + ' .'); + var userInfo = {}; + // server-side validaton of inputs (username, password) + + // create the channel and retrieve the metadata + return lbryApi.createChannel('@' + username).then(function (tx) { + // create user record + var userData = { + userName: username, + password: password + }; + logger.verbose('userData >', userData); + // create user record + var channelData = { + channelName: '@' + username, + channelClaimId: tx.claim_id + }; + logger.verbose('channelData >', channelData); + // create certificate record + var certificateData = { + claimId: tx.claim_id, + name: '@' + username + // address, + }; + logger.verbose('certificateData >', certificateData); + // save user and certificate to db + return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]); + }).then(function (_ref) { + var _ref2 = _slicedToArray(_ref, 3), + newUser = _ref2[0], + newChannel = _ref2[1], + newCertificate = _ref2[2]; + + logger.verbose('user and certificate successfully created'); + // store the relevant newUser info to be passed back for req.User + userInfo['id'] = newUser.id; + userInfo['userName'] = newUser.userName; + userInfo['channelName'] = newChannel.channelName; + userInfo['channelClaimId'] = newChannel.channelClaimId; + // associate the instances + return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]); + }).then(function () { + logger.verbose('user and certificate successfully associated'); + return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName); + }).then(function (shortChannelId) { + userInfo['shortChannelId'] = shortChannelId; + return done(null, userInfo); + }).catch(function (error) { + logger.error('signup error', error); + return done(error); + }); +}); + +/***/ }), +/* 71 */ +/***/ (function(module, exports) { + +module.exports = require("axios"); + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var lbryConfig = { + api: { + apiHost: 'localhost', + apiPort: '5279' + } +}; + +module.exports = lbryConfig; + +/***/ }), +/* 73 */ +/***/ (function(module, exports) { + +module.exports = require("universal-analytics"); + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var logger = __webpack_require__(1); + +var _require = __webpack_require__(33), + returnShortId = _require.returnShortId; + +module.exports = function (sequelize, _ref) { + var STRING = _ref.STRING, + BOOLEAN = _ref.BOOLEAN, + INTEGER = _ref.INTEGER, + TEXT = _ref.TEXT, + DECIMAL = _ref.DECIMAL; + + var Certificate = sequelize.define('Certificate', { + address: { + type: STRING, + default: null + }, + amount: { + type: DECIMAL(19, 8), + default: null + }, + claimId: { + type: STRING, + default: null + }, + claimSequence: { + type: INTEGER, + default: null + }, + decodedClaim: { + type: BOOLEAN, + default: null + }, + depth: { + type: INTEGER, + default: null + }, + effectiveAmount: { + type: DECIMAL(19, 8), + default: null + }, + hasSignature: { + type: BOOLEAN, + default: null + }, + height: { + type: INTEGER, + default: null + }, + hex: { + type: TEXT('long'), + default: null + }, + name: { + type: STRING, + default: null + }, + nout: { + type: INTEGER, + default: null + }, + txid: { + type: STRING, + default: null + }, + validAtHeight: { + type: INTEGER, + default: null + }, + outpoint: { + type: STRING, + default: null + }, + valueVersion: { + type: STRING, + default: null + }, + claimType: { + type: STRING, + default: null + }, + certificateVersion: { + type: STRING, + default: null + }, + keyType: { + type: STRING, + default: null + }, + publicKey: { + type: TEXT('long'), + default: null + } + }, { + freezeTableName: true + }); + + Certificate.associate = function (db) { + Certificate.belongsTo(db.Channel, { + foreignKey: { + allowNull: true + } + }); + }; + + Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) { + var _this = this; + + logger.debug('getShortChannelIdFromLongChannelId ' + channelName + ':' + longChannelId); + return new Promise(function (resolve, reject) { + _this.findAll({ + where: { name: channelName }, + order: [['height', 'ASC']] + }).then(function (result) { + switch (result.length) { + case 0: + throw new Error('No channel(s) found with that channel name'); + default: + return resolve(returnShortId(result, longChannelId)); + } + }).catch(function (error) { + reject(error); + }); + }); + }; + + Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) { + var _this2 = this; + + logger.debug('getLongChannelIdFromShortChannelId(' + channelName + ', ' + channelClaimId + ')'); + return new Promise(function (resolve, reject) { + _this2.findAll({ + where: { + name: channelName, + claimId: { + $like: channelClaimId + '%' + } + }, + order: [['height', 'ASC']] + }).then(function (result) { + switch (result.length) { + case 0: + return resolve(null); + default: + // note results must be sorted + return resolve(result[0].claimId); + } + }).catch(function (error) { + reject(error); + }); + }); + }; + + Certificate.getLongChannelIdFromChannelName = function (channelName) { + var _this3 = this; + + logger.debug('getLongChannelIdFromChannelName(' + channelName + ')'); + return new Promise(function (resolve, reject) { + _this3.findAll({ + where: { name: channelName }, + order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] + }).then(function (result) { + switch (result.length) { + case 0: + return resolve(null); + default: + return resolve(result[0].claimId); + } + }).catch(function (error) { + reject(error); + }); + }); + }; + + Certificate.validateLongChannelId = function (name, claimId) { + var _this4 = this; + + logger.debug('validateLongChannelId(' + name + ', ' + claimId + ')'); + return new Promise(function (resolve, reject) { + _this4.findOne({ + where: { name: name, claimId: claimId } + }).then(function (result) { + if (!result) { + return resolve(null); + }; + resolve(claimId); + }).catch(function (error) { + reject(error); + }); + }); + }; + + Certificate.getLongChannelId = function (channelName, channelClaimId) { + logger.debug('getLongChannelId(' + channelName + ', ' + channelClaimId + ')'); + if (channelClaimId && channelClaimId.length === 40) { + // if a full channel id is provided + return this.validateLongChannelId(channelName, channelClaimId); + } else if (channelClaimId && channelClaimId.length < 40) { + // if a short channel id is provided + return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId); + } else { + return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided + } + }; + + return Certificate; +}; + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function (sequelize, _ref) { + var STRING = _ref.STRING; + + var Channel = sequelize.define('Channel', { + channelName: { + type: STRING, + allowNull: false + }, + channelClaimId: { + type: STRING, + allowNull: false + } + }, { + freezeTableName: true + }); + + Channel.associate = function (db) { + Channel.belongsTo(db.User); + Channel.hasOne(db.Certificate); + }; + + return Channel; +}; + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var logger = __webpack_require__(1); + +var _require = __webpack_require__(33), + returnShortId = _require.returnShortId; + +var _require2 = __webpack_require__(3), + defaultThumbnail = _require2.assetDefaults.thumbnail, + host = _require2.details.host; + +function determineFileExtensionFromContentType(contentType) { + switch (contentType) { + case 'image/jpeg': + case 'image/jpg': + return 'jpeg'; + case 'image/png': + return 'png'; + case 'image/gif': + return 'gif'; + case 'video/mp4': + return 'mp4'; + default: + logger.debug('setting unknown file type as file extension jpeg'); + return 'jpeg'; + } +}; + +function determineThumbnail(storedThumbnail, defaultThumbnail) { + if (storedThumbnail === '') { + return defaultThumbnail; + } + return storedThumbnail; +}; + +function prepareClaimData(claim) { + // logger.debug('preparing claim data based on resolved data:', claim); + claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail); + claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType); + claim['host'] = host; + return claim; +}; + +module.exports = function (sequelize, _ref) { + var STRING = _ref.STRING, + BOOLEAN = _ref.BOOLEAN, + INTEGER = _ref.INTEGER, + TEXT = _ref.TEXT, + DECIMAL = _ref.DECIMAL; + + var Claim = sequelize.define('Claim', { + address: { + type: STRING, + default: null + }, + amount: { + type: DECIMAL(19, 8), + default: null + }, + claimId: { + type: STRING, + default: null + }, + claimSequence: { + type: INTEGER, + default: null + }, + decodedClaim: { + type: BOOLEAN, + default: null + }, + depth: { + type: INTEGER, + default: null + }, + effectiveAmount: { + type: DECIMAL(19, 8), + default: null + }, + hasSignature: { + type: BOOLEAN, + default: null + }, + height: { + type: INTEGER, + default: null + }, + hex: { + type: TEXT('long'), + default: null + }, + name: { + type: STRING, + default: null + }, + nout: { + type: INTEGER, + default: null + }, + txid: { + type: STRING, + default: null + }, + validAtHeight: { + type: INTEGER, + default: null + }, + outpoint: { + type: STRING, + default: null + }, + claimType: { + type: STRING, + default: null + }, + certificateId: { + type: STRING, + default: null + }, + author: { + type: STRING, + default: null + }, + description: { + type: TEXT('long'), + default: null + }, + language: { + type: STRING, + default: null + }, + license: { + type: STRING, + default: null + }, + licenseUrl: { + type: STRING, + default: null + }, + nsfw: { + type: BOOLEAN, + default: null + }, + preview: { + type: STRING, + default: null + }, + thumbnail: { + type: STRING, + default: null + }, + title: { + type: STRING, + default: null + }, + metadataVersion: { + type: STRING, + default: null + }, + contentType: { + type: STRING, + default: null + }, + source: { + type: STRING, + default: null + }, + sourceType: { + type: STRING, + default: null + }, + sourceVersion: { + type: STRING, + default: null + }, + streamVersion: { + type: STRING, + default: null + }, + valueVersion: { + type: STRING, + default: null + }, + channelName: { + type: STRING, + allowNull: true, + default: null + } + }, { + freezeTableName: true + }); + + Claim.associate = function (db) { + Claim.belongsTo(db.File, { + foreignKey: { + allowNull: true + } + }); + }; + + Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) { + var _this = this; + + logger.debug('Claim.getShortClaimIdFromLongClaimId for ' + claimName + '#' + claimId); + return new Promise(function (resolve, reject) { + _this.findAll({ + where: { name: claimName }, + order: [['height', 'ASC']] + }).then(function (result) { + switch (result.length) { + case 0: + throw new Error('No claim(s) found with that claim name'); + default: + resolve(returnShortId(result, claimId)); + } + }).catch(function (error) { + reject(error); + }); + }); + }; + + Claim.getAllChannelClaims = function (channelClaimId) { + var _this2 = this; + + logger.debug('Claim.getAllChannelClaims for ' + channelClaimId); + return new Promise(function (resolve, reject) { + _this2.findAll({ + where: { certificateId: channelClaimId }, + order: [['height', 'ASC']], + raw: true // returns an array of only data, not an array of instances + }).then(function (channelClaimsArray) { + // logger.debug('channelclaimsarray length:', channelClaimsArray.length); + switch (channelClaimsArray.length) { + case 0: + return resolve(null); + default: + channelClaimsArray.forEach(function (claim) { + claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType); + claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail); + return claim; + }); + return resolve(channelClaimsArray); + } + }).catch(function (error) { + reject(error); + }); + }); + }; + + Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) { + var _this3 = this; + + logger.debug('finding claim id for claim ' + claimName + ' from channel ' + channelClaimId); + return new Promise(function (resolve, reject) { + _this3.findAll({ + where: { name: claimName, certificateId: channelClaimId }, + order: [['id', 'ASC']] + }).then(function (result) { + switch (result.length) { + case 0: + return resolve(null); + case 1: + return resolve(result[0].claimId); + default: + logger.error(result.length + ' records found for "' + claimName + '" in channel "' + channelClaimId + '"'); + return resolve(result[0].claimId); + } + }).catch(function (error) { + reject(error); + }); + }); + }; + + Claim.getLongClaimIdFromShortClaimId = function (name, shortId) { + var _this4 = this; + + return new Promise(function (resolve, reject) { + _this4.findAll({ + where: { + name: name, + claimId: { + $like: shortId + '%' + } }, + order: [['height', 'ASC']] + }).then(function (result) { + switch (result.length) { + case 0: + return resolve(null); + default: + // note results must be sorted + return resolve(result[0].claimId); + } + }).catch(function (error) { + reject(error); + }); + }); + }; + + Claim.getTopFreeClaimIdByClaimName = function (name) { + var _this5 = this; + + return new Promise(function (resolve, reject) { + _this5.findAll({ + where: { name: name }, + order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] // note: maybe height and effective amount need to switch? + }).then(function (result) { + logger.debug('length of result', result.length); + switch (result.length) { + case 0: + return resolve(null); + default: + return resolve(result[0].dataValues.claimId); + } + }).catch(function (error) { + reject(error); + }); + }); + }; + + Claim.validateLongClaimId = function (name, claimId) { + var _this6 = this; + + return new Promise(function (resolve, reject) { + _this6.findOne({ + where: { name: name, claimId: claimId } + }).then(function (result) { + if (!result) { + return resolve(null); + }; + resolve(claimId); + }).catch(function (error) { + reject(error); + }); + }); + }; + + Claim.getLongClaimId = function (claimName, claimId) { + logger.debug('getLongClaimId(' + claimName + ', ' + claimId + ')'); + if (claimId && claimId.length === 40) { + // if a full claim id is provided + return this.validateLongClaimId(claimName, claimId); + } else if (claimId && claimId.length < 40) { + return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided + } else { + return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided + } + }; + + Claim.resolveClaim = function (name, claimId) { + var _this7 = this; + + logger.debug('Claim.resolveClaim: ' + name + ' ' + claimId); + return new Promise(function (resolve, reject) { + _this7.findAll({ + where: { name: name, claimId: claimId } + }).then(function (claimArray) { + switch (claimArray.length) { + case 0: + return resolve(null); + case 1: + return resolve(prepareClaimData(claimArray[0].dataValues)); + default: + logger.error('more than one record matches ' + name + '#' + claimId + ' in db.Claim'); + return resolve(prepareClaimData(claimArray[0].dataValues)); + } + }).catch(function (error) { + reject(error); + }); + }); + }; + + return Claim; +}; + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function (sequelize, _ref) { + var STRING = _ref.STRING, + BOOLEAN = _ref.BOOLEAN, + INTEGER = _ref.INTEGER; + + var File = sequelize.define('File', { + name: { + type: STRING, + allowNull: false + }, + claimId: { + type: STRING, + allowNull: false + }, + address: { + type: STRING, + allowNull: false + }, + outpoint: { + type: STRING, + allowNull: false + }, + height: { + type: INTEGER, + allowNull: false, + default: 0 + }, + fileName: { + type: STRING, + allowNull: false + }, + filePath: { + type: STRING, + allowNull: false + }, + fileType: { + type: STRING + }, + nsfw: { + type: BOOLEAN, + allowNull: false, + defaultValue: false + }, + trendingEligible: { + type: BOOLEAN, + allowNull: false, + defaultValue: true + } + }, { + freezeTableName: true + }); + + File.associate = function (db) { + File.hasMany(db.Request); + File.hasOne(db.Claim); + }; + + File.getRecentClaims = function () { + return this.findAll({ + where: { nsfw: false, trendingEligible: true }, + order: [['createdAt', 'DESC']], + limit: 25 + }); + }; + + return File; +}; + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function (sequelize, _ref) { + var STRING = _ref.STRING, + BOOLEAN = _ref.BOOLEAN, + TEXT = _ref.TEXT; + + var Request = sequelize.define('Request', { + action: { + type: STRING, + allowNull: false + }, + url: { + type: STRING, + allowNull: false + }, + ipAddress: { + type: STRING, + allowNull: true + }, + result: { + type: TEXT('long'), + allowNull: true, + default: null + } + }, { + freezeTableName: true + }); + + Request.associate = function (db) { + Request.belongsTo(db.File, { + foreignKey: { + allowNull: true + } + }); + }; + + return Request; +}; + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var bcrypt = __webpack_require__(80); +var logger = __webpack_require__(1); + +module.exports = function (sequelize, _ref) { + var STRING = _ref.STRING; + + var User = sequelize.define('User', { + userName: { + type: STRING, + allowNull: false + }, + password: { + type: STRING, + allowNull: false + } + }, { + freezeTableName: true + }); + + User.associate = function (db) { + User.hasOne(db.Channel); + }; + + User.prototype.comparePassword = function (password) { + return bcrypt.compare(password, this.password); + }; + + User.prototype.changePassword = function (newPassword) { + var _this = this; + + return new Promise(function (resolve, reject) { + // generate a salt string to use for hashing + bcrypt.genSalt(function (saltError, salt) { + if (saltError) { + logger.error('salt error', saltError); + reject(saltError); + return; + } + // generate a hashed version of the user's password + bcrypt.hash(newPassword, salt, function (hashError, hash) { + // if there is an error with the hash generation return the error + if (hashError) { + logger.error('hash error', hashError); + reject(hashError); + return; + } + // replace the current password with the new hash + _this.update({ password: hash }).then(function () { + resolve(); + }).catch(function (error) { + reject(error); + }); + }); + }); + }); + }; + + // pre-save hook method to hash the user's password before the user's info is saved to the db. + User.hook('beforeCreate', function (user, options) { + logger.debug('User.beforeCreate hook...'); + return new Promise(function (resolve, reject) { + // generate a salt string to use for hashing + bcrypt.genSalt(function (saltError, salt) { + if (saltError) { + logger.error('salt error', saltError); + reject(saltError); + return; + } + // generate a hashed version of the user's password + bcrypt.hash(user.password, salt, function (hashError, hash) { + // if there is an error with the hash generation return the error + if (hashError) { + logger.error('hash error', hashError); + reject(hashError); + return; + } + // replace the password string with the hash password value + user.password = hash; + resolve(); + }); + }); + }); + }); + + return User; +}; + +/***/ }), +/* 80 */ +/***/ (function(module, exports) { + +module.exports = require("bcrypt"); + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var PassportLocalStrategy = __webpack_require__(31).Strategy; +var logger = __webpack_require__(1); +var db = __webpack_require__(5); + +var returnUserAndChannelInfo = function returnUserAndChannelInfo(userInstance) { + return new Promise(function (resolve, reject) { + var userInfo = {}; + userInfo['id'] = userInstance.id; + userInfo['userName'] = userInstance.userName; + userInstance.getChannel().then(function (_ref) { + var channelName = _ref.channelName, + channelClaimId = _ref.channelClaimId; + + userInfo['channelName'] = channelName; + userInfo['channelClaimId'] = channelClaimId; + return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName); + }).then(function (shortChannelId) { + userInfo['shortChannelId'] = shortChannelId; + resolve(userInfo); + }).catch(function (error) { + reject(error); + }); + }); +}; + +module.exports = new PassportLocalStrategy({ + usernameField: 'username', + passwordField: 'password' +}, function (username, password, done) { + return db.User.findOne({ + where: { userName: username } + }).then(function (user) { + if (!user) { + logger.debug('no user found'); + return done(null, false, { message: 'Incorrect username or password' }); + } + return user.comparePassword(password).then(function (isMatch) { + if (!isMatch) { + logger.debug('incorrect password'); + return done(null, false, { message: 'Incorrect username or password' }); + } + logger.debug('Password was a match, returning User'); + return returnUserAndChannelInfo(user).then(function (userInfo) { + return done(null, userInfo); + }).catch(function (error) { + return error; + }); + }).catch(function (error) { + return error; + }); + }).catch(function (error) { + return done(error); + }); +}); + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var logger = __webpack_require__(1); +var passport = __webpack_require__(28); + +module.exports = function (app) { + // route for sign up + app.post('/signup', passport.authenticate('local-signup'), function (req, res) { + logger.verbose('successful signup for ' + req.user.channelName); + res.status(200).json({ + success: true, + channelName: req.user.channelName, + channelClaimId: req.user.channelClaimId, + shortChannelId: req.user.shortChannelId + }); + }); + // route for log in + app.post('/login', function (req, res, next) { + passport.authenticate('local-login', function (err, user, info) { + if (err) { + return next(err); + } + if (!user) { + return res.status(400).json({ + success: false, + message: info.message + }); + } + logger.debug('successful login'); + req.logIn(user, function (err) { + if (err) { + return next(err); + } + return res.status(200).json({ + success: true, + channelName: req.user.channelName, + channelClaimId: req.user.channelClaimId, + shortChannelId: req.user.shortChannelId + }); + }); + })(req, res, next); + }); + // route to log out + app.get('/logout', function (req, res) { + req.logout(); + res.status(200).json({ success: true, message: 'you successfully logged out' }); + }); + // see if user is authenticated, and return credentials if so + app.get('/user', function (req, res) { + if (req.user) { + res.status(200).json({ success: true, data: req.user }); + } else { + res.status(401).json({ success: false, message: 'user is not logged in' }); + } + }); +}; + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + +var logger = __webpack_require__(1); +var multipart = __webpack_require__(84); + +var _require = __webpack_require__(3), + uploadDirectory = _require.publishing.uploadDirectory, + host = _require.details.host; + +var multipartMiddleware = multipart({ uploadDir: uploadDirectory }); +var db = __webpack_require__(5); + +var _require2 = __webpack_require__(85), + claimNameIsAvailable = _require2.claimNameIsAvailable, + checkChannelAvailability = _require2.checkChannelAvailability, + publish = _require2.publish; + +var _require3 = __webpack_require__(15), + getClaimList = _require3.getClaimList, + resolveUri = _require3.resolveUri, + getClaim = _require3.getClaim; + +var _require4 = __webpack_require__(34), + addGetResultsToFileData = _require4.addGetResultsToFileData, + createBasicPublishParams = _require4.createBasicPublishParams, + createThumbnailPublishParams = _require4.createThumbnailPublishParams, + parsePublishApiRequestBody = _require4.parsePublishApiRequestBody, + parsePublishApiRequestFiles = _require4.parsePublishApiRequestFiles, + createFileData = _require4.createFileData; + +var errorHandlers = __webpack_require__(35); + +var _require5 = __webpack_require__(16), + sendGATimingEvent = _require5.sendGATimingEvent; + +var _require6 = __webpack_require__(87), + authenticateUser = _require6.authenticateUser; + +var _require7 = __webpack_require__(36), + getChannelData = _require7.getChannelData, + getChannelClaims = _require7.getChannelClaims, + getClaimId = _require7.getClaimId; + +var NO_CHANNEL = 'NO_CHANNEL'; +var NO_CLAIM = 'NO_CLAIM'; + +module.exports = function (app) { + // route to check whether site has published to a channel + app.get('/api/channel/availability/:name', function (_ref, res) { + var ip = _ref.ip, + originalUrl = _ref.originalUrl, + name = _ref.params.name; + + var gaStartTime = Date.now(); + checkChannelAvailability(name).then(function (availableName) { + res.status(200).json(availableName); + sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now()); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); + // route to get a short channel id from long channel Id + app.get('/api/channel/short-id/:longId/:name', function (_ref2, res) { + var ip = _ref2.ip, + originalUrl = _ref2.originalUrl, + params = _ref2.params; + + db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name).then(function (shortId) { + res.status(200).json(shortId); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); + app.get('/api/channel/data/:channelName/:channelClaimId', function (_ref3, res) { + var ip = _ref3.ip, + originalUrl = _ref3.originalUrl, + body = _ref3.body, + params = _ref3.params; + + var channelName = params.channelName; + var channelClaimId = params.channelClaimId; + if (channelClaimId === 'none') channelClaimId = null; + getChannelData(channelName, channelClaimId, 0).then(function (data) { + if (data === NO_CHANNEL) { + return res.status(404).json({ success: false, message: 'No matching channel was found' }); + } + res.status(200).json({ success: true, data: data }); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); + app.get('/api/channel/claims/:channelName/:channelClaimId/:page', function (_ref4, res) { + var ip = _ref4.ip, + originalUrl = _ref4.originalUrl, + body = _ref4.body, + params = _ref4.params; + + var channelName = params.channelName; + var channelClaimId = params.channelClaimId; + if (channelClaimId === 'none') channelClaimId = null; + var page = params.page; + getChannelClaims(channelName, channelClaimId, page).then(function (data) { + if (data === NO_CHANNEL) { + return res.status(404).json({ success: false, message: 'No matching channel was found' }); + } + res.status(200).json({ success: true, data: data }); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); + // route to run a claim_list request on the daemon + app.get('/api/claim/list/:name', function (_ref5, res) { + var ip = _ref5.ip, + originalUrl = _ref5.originalUrl, + params = _ref5.params; + + getClaimList(params.name).then(function (claimsList) { + res.status(200).json(claimsList); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); + // route to get an asset + app.get('/api/claim/get/:name/:claimId', function (_ref6, res) { + var ip = _ref6.ip, + originalUrl = _ref6.originalUrl, + params = _ref6.params; + + var name = params.name; + var claimId = params.claimId; + // resolve the claim + db.Claim.resolveClaim(name, claimId).then(function (resolveResult) { + // make sure a claim actually exists at that uri + if (!resolveResult) { + throw new Error('No matching uri found in Claim table'); + } + var fileData = createFileData(resolveResult); + // get the claim + return Promise.all([fileData, getClaim(name + '#' + claimId)]); + }).then(function (_ref7) { + var _ref8 = _slicedToArray(_ref7, 2), + fileData = _ref8[0], + getResult = _ref8[1]; + + fileData = addGetResultsToFileData(fileData, getResult); + return Promise.all([db.upsert(db.File, fileData, { name: name, claimId: claimId }, 'File'), getResult]); + }).then(function (_ref9) { + var _ref10 = _slicedToArray(_ref9, 2), + fileRecord = _ref10[0], + _ref10$ = _ref10[1], + message = _ref10$.message, + completed = _ref10$.completed; + + res.status(200).json({ success: true, message: message, completed: completed }); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); + // route to check whether this site published to a claim + app.get('/api/claim/availability/:name', function (_ref11, res) { + var ip = _ref11.ip, + originalUrl = _ref11.originalUrl, + name = _ref11.params.name; + + var gaStartTime = Date.now(); + claimNameIsAvailable(name).then(function (result) { + res.status(200).json(result); + sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now()); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); + // route to run a resolve request on the daemon + app.get('/api/claim/resolve/:name/:claimId', function (_ref12, res) { + var headers = _ref12.headers, + ip = _ref12.ip, + originalUrl = _ref12.originalUrl, + params = _ref12.params; + + resolveUri(params.name + '#' + params.claimId).then(function (resolvedUri) { + res.status(200).json(resolvedUri); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); + // route to run a publish request on the daemon + app.post('/api/claim/publish', multipartMiddleware, function (_ref13, res) { + var body = _ref13.body, + files = _ref13.files, + headers = _ref13.headers, + ip = _ref13.ip, + originalUrl = _ref13.originalUrl, + user = _ref13.user; + + // define variables + var channelName = void 0, + channelId = void 0, + channelPassword = void 0, + description = void 0, + fileName = void 0, + filePath = void 0, + fileType = void 0, + gaStartTime = void 0, + license = void 0, + name = void 0, + nsfw = void 0, + thumbnail = void 0, + thumbnailFileName = void 0, + thumbnailFilePath = void 0, + thumbnailFileType = void 0, + title = void 0; + // record the start time of the request + gaStartTime = Date.now(); + // validate the body and files of the request + try { + var _parsePublishApiReque = parsePublishApiRequestBody(body); + // validateApiPublishRequest(body, files); + + + name = _parsePublishApiReque.name; + nsfw = _parsePublishApiReque.nsfw; + license = _parsePublishApiReque.license; + title = _parsePublishApiReque.title; + description = _parsePublishApiReque.description; + thumbnail = _parsePublishApiReque.thumbnail; + + var _parsePublishApiReque2 = parsePublishApiRequestFiles(files); + + fileName = _parsePublishApiReque2.fileName; + filePath = _parsePublishApiReque2.filePath; + fileType = _parsePublishApiReque2.fileType; + thumbnailFileName = _parsePublishApiReque2.thumbnailFileName; + thumbnailFilePath = _parsePublishApiReque2.thumbnailFilePath; + thumbnailFileType = _parsePublishApiReque2.thumbnailFileType; + channelName = body.channelName; + channelId = body.channelId; + channelPassword = body.channelPassword; + } catch (error) { + return res.status(400).json({ success: false, message: error.message }); + } + // check channel authorization + Promise.all([authenticateUser(channelName, channelId, channelPassword, user), claimNameIsAvailable(name), createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail), createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw)]).then(function (_ref14) { + var _ref15 = _slicedToArray(_ref14, 4), + _ref15$ = _ref15[0], + channelName = _ref15$.channelName, + channelClaimId = _ref15$.channelClaimId, + validatedClaimName = _ref15[1], + publishParams = _ref15[2], + thumbnailPublishParams = _ref15[3]; + + // add channel details to the publish params + if (channelName && channelClaimId) { + publishParams['channel_name'] = channelName; + publishParams['channel_id'] = channelClaimId; + } + // publish the thumbnail + if (thumbnailPublishParams) { + publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType); + } + // publish the asset + return publish(publishParams, fileName, fileType); + }).then(function (result) { + res.status(200).json({ + success: true, + message: 'publish completed successfully', + data: { + name: name, + claimId: result.claim_id, + url: host + '/' + result.claim_id + '/' + name, + lbryTx: result + } + }); + // record the publish end time and send to google analytics + sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now()); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); + // route to get a short claim id from long claim Id + app.get('/api/claim/short-id/:longId/:name', function (_ref16, res) { + var ip = _ref16.ip, + originalUrl = _ref16.originalUrl, + body = _ref16.body, + params = _ref16.params; + + db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name).then(function (shortId) { + res.status(200).json({ success: true, data: shortId }); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); + app.post('/api/claim/long-id', function (_ref17, res) { + var ip = _ref17.ip, + originalUrl = _ref17.originalUrl, + body = _ref17.body, + params = _ref17.params; + + logger.debug('body:', body); + var channelName = body.channelName; + var channelClaimId = body.channelClaimId; + var claimName = body.claimName; + var claimId = body.claimId; + getClaimId(channelName, channelClaimId, claimName, claimId).then(function (result) { + if (result === NO_CHANNEL) { + return res.status(404).json({ success: false, message: 'No matching channel could be found' }); + } + if (result === NO_CLAIM) { + return res.status(404).json({ success: false, message: 'No matching claim id could be found' }); + } + res.status(200).json({ success: true, data: result }); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); + app.get('/api/claim/data/:claimName/:claimId', function (_ref18, res) { + var ip = _ref18.ip, + originalUrl = _ref18.originalUrl, + body = _ref18.body, + params = _ref18.params; + + var claimName = params.claimName; + var claimId = params.claimId; + if (claimId === 'none') claimId = null; + db.Claim.resolveClaim(claimName, claimId).then(function (claimInfo) { + if (!claimInfo) { + return res.status(404).json({ success: false, message: 'No claim could be found' }); + } + res.status(200).json({ success: true, data: claimInfo }); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); + // route to see if asset is available locally + app.get('/api/file/availability/:name/:claimId', function (_ref19, res) { + var ip = _ref19.ip, + originalUrl = _ref19.originalUrl, + params = _ref19.params; + + var name = params.name; + var claimId = params.claimId; + db.File.findOne({ where: { name: name, claimId: claimId } }).then(function (result) { + if (result) { + return res.status(200).json({ success: true, data: true }); + } + res.status(200).json({ success: true, data: false }); + }).catch(function (error) { + errorHandlers.handleErrorResponse(originalUrl, ip, error, res); + }); + }); +}; + +/***/ }), +/* 84 */ +/***/ (function(module, exports) { + +module.exports = require("connect-multiparty"); + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + +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; } + +var logger = __webpack_require__(1); +var db = __webpack_require__(5); +var lbryApi = __webpack_require__(15); +var publishHelpers = __webpack_require__(34); + +var _require = __webpack_require__(3), + _require$publishing = _require.publishing, + primaryClaimAddress = _require$publishing.primaryClaimAddress, + additionalClaimAddresses = _require$publishing.additionalClaimAddresses; + +var Sequelize = __webpack_require__(32); +var Op = Sequelize.Op; + +module.exports = { + publish: function publish(publishParams, fileName, fileType) { + return new Promise(function (resolve, reject) { + var publishResults = void 0, + certificateId = void 0, + channelName = void 0; + // publish the file + return lbryApi.publishClaim(publishParams).then(function (tx) { + logger.info('Successfully published ' + publishParams.name + ' ' + fileName, tx); + publishResults = tx; + // get the channel information + if (publishParams.channel_name) { + logger.debug('this claim was published in channel: ' + publishParams.channel_name); + return db.Channel.findOne({ where: { channelName: publishParams.channel_name } }); + } else { + logger.debug('this claim was not published in a channel'); + return null; + } + }).then(function (channel) { + // set channel information + certificateId = null; + channelName = null; + if (channel) { + certificateId = channel.channelClaimId; + channelName = channel.channelName; + } + logger.debug('certificateId: ' + certificateId); + }).then(function () { + // create the File record + var fileRecord = { + name: publishParams.name, + claimId: publishResults.claim_id, + title: publishParams.metadata.title, + description: publishParams.metadata.description, + address: publishParams.claim_address, + outpoint: publishResults.txid + ':' + publishResults.nout, + height: 0, + fileName: fileName, + filePath: publishParams.file_path, + fileType: fileType, + nsfw: publishParams.metadata.nsfw + }; + // create the Claim record + var claimRecord = { + name: publishParams.name, + claimId: publishResults.claim_id, + title: publishParams.metadata.title, + description: publishParams.metadata.description, + address: publishParams.claim_address, + thumbnail: publishParams.metadata.thumbnail, + outpoint: publishResults.txid + ':' + publishResults.nout, + height: 0, + contentType: fileType, + nsfw: publishParams.metadata.nsfw, + amount: publishParams.bid, + certificateId: certificateId, + channelName: channelName + }; + // upsert criteria + var upsertCriteria = { + name: publishParams.name, + claimId: publishResults.claim_id + }; + // upsert the records + return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]); + }).then(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + file = _ref2[0], + claim = _ref2[1]; + + logger.debug('File and Claim records successfully created'); + return Promise.all([file.setClaim(claim), claim.setFile(file)]); + }).then(function () { + logger.debug('File and Claim records successfully associated'); + resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim; + }).catch(function (error) { + logger.error('PUBLISH ERROR', error); + publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file + reject(error); + }); + }); + }, + claimNameIsAvailable: function claimNameIsAvailable(name) { + var claimAddresses = additionalClaimAddresses || []; + claimAddresses.push(primaryClaimAddress); + // find any records where the name is used + return db.Claim.findAll({ + attributes: ['address'], + where: { + name: name, + address: _defineProperty({}, Op.or, claimAddresses) + } + }).then(function (result) { + if (result.length >= 1) { + throw new Error('That claim is already in use'); + }; + return name; + }).catch(function (error) { + throw error; + }); + }, + checkChannelAvailability: function checkChannelAvailability(name) { + return db.Channel.findAll({ + where: { channelName: name } + }).then(function (result) { + if (result.length >= 1) { + throw new Error('That channel has already been claimed'); + } + return name; + }).catch(function (error) { + throw error; + }); + } +}; + +/***/ }), +/* 86 */ +/***/ (function(module, exports) { + +module.exports = require("fs"); + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var db = __webpack_require__(5); +var logger = __webpack_require__(1); + +module.exports = { + authenticateUser: function authenticateUser(channelName, channelId, channelPassword, user) { + // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided + if (!channelName && !channelId) { + return { + channelName: null, + channelClaimId: null + }; + } + // case: channelName or channel Id are provided with user token + if (user) { + if (channelName && channelName !== user.channelName) { + throw new Error('the provided channel name does not match user credentials'); + } + if (channelId && channelId !== user.channelClaimId) { + throw new Error('the provided channel id does not match user credentials'); + } + return { + channelName: user.channelName, + channelClaimId: user.channelClaimId + }; + } + // case: channelName or channel Id are provided with password instead of user token + if (!channelPassword) throw new Error('no channel password provided'); + return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword); + }, + authenticateChannelCredentials: function authenticateChannelCredentials(channelName, channelId, userPassword) { + return new Promise(function (resolve, reject) { + // hoisted variables + var channelData = void 0; + // build the params for finding the channel + var channelFindParams = {}; + if (channelName) channelFindParams['channelName'] = channelName; + if (channelId) channelFindParams['channelClaimId'] = channelId; + // find the channel + db.Channel.findOne({ + where: channelFindParams + }).then(function (channel) { + if (!channel) { + logger.debug('no channel found'); + throw new Error('Authentication failed, you do not have access to that channel'); + } + channelData = channel.get(); + logger.debug('channel data:', channelData); + return db.User.findOne({ + where: { userName: channelData.channelName.substring(1) } + }); + }).then(function (user) { + if (!user) { + logger.debug('no user found'); + throw new Error('Authentication failed, you do not have access to that channel'); + } + return user.comparePassword(userPassword); + }).then(function (isMatch) { + if (!isMatch) { + logger.debug('incorrect password'); + throw new Error('Authentication failed, you do not have access to that channel'); + } + logger.debug('...password was a match...'); + resolve(channelData); + }).catch(function (error) { + reject(error); + }); + }); + } +}; + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var CLAIMS_PER_PAGE = 12; + +module.exports = { + returnPaginatedChannelClaims: function returnPaginatedChannelClaims(channelName, longChannelClaimId, claims, page) { + var totalPages = module.exports.determineTotalPages(claims); + var paginationPage = module.exports.getPageFromQuery(page); + var viewData = { + channelName: channelName, + longChannelClaimId: longChannelClaimId, + claims: module.exports.extractPageFromClaims(claims, paginationPage), + previousPage: module.exports.determinePreviousPage(paginationPage), + currentPage: paginationPage, + nextPage: module.exports.determineNextPage(totalPages, paginationPage), + totalPages: totalPages, + totalResults: module.exports.determineTotalClaims(claims) + }; + return viewData; + }, + getPageFromQuery: function getPageFromQuery(page) { + if (page) { + return parseInt(page); + } + return 1; + }, + extractPageFromClaims: function extractPageFromClaims(claims, pageNumber) { + if (!claims) { + return []; // if no claims, return this default + } + // logger.debug('claims is array?', Array.isArray(claims)); + // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber)); + var claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE; + var claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE; + var pageOfClaims = claims.slice(claimStartIndex, claimEndIndex); + return pageOfClaims; + }, + determineTotalPages: function determineTotalPages(claims) { + if (!claims) { + return 0; + } else { + var totalClaims = claims.length; + if (totalClaims < CLAIMS_PER_PAGE) { + return 1; + } + var fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE); + var remainder = totalClaims % CLAIMS_PER_PAGE; + if (remainder === 0) { + return fullPages; + } + return fullPages + 1; + } + }, + determinePreviousPage: function determinePreviousPage(currentPage) { + if (currentPage === 1) { + return null; + } + return currentPage - 1; + }, + determineNextPage: function determineNextPage(totalPages, currentPage) { + if (currentPage === totalPages) { + return null; + } + return currentPage + 1; + }, + determineTotalClaims: function determineTotalClaims(claims) { + if (!claims) { + return 0; + } + return claims.length; + } +}; + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _require = __webpack_require__(3), + host = _require.details; + +var handlePageRender = __webpack_require__(37); + +module.exports = function (app) { + // route for the home page + app.get('/', function (req, res) { + handlePageRender(req, res); + }); + // route to display login page + app.get('/login', function (req, res) { + handlePageRender(req, res); + }); + // route to show 'about' page + app.get('/about', function (req, res) { + handlePageRender(req, res); + }); + // route to display a list of the trending images + app.get('/trending', function (req, res) { + res.status(301).redirect('/popular'); + }); + app.get('/popular', function (req, res) { + handlePageRender(req, res); + }); + // route to display a list of the trending images + app.get('/new', function (req, res) { + handlePageRender(req, res); + }); + // route to send embedable video player (for twitter) + app.get('/embed/:claimId/:name', function (_ref, res) { + var params = _ref.params; + + var claimId = params.claimId; + var name = params.name; + // get and render the content + res.status(200).render('embed', { layout: 'embed', host: host, claimId: claimId, name: name }); + }); +}; + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + + switch (action.type) { + case actions.FILE_SELECTED: + return Object.assign({}, initialState, { // note: clears to initial state + file: action.data + }); + case actions.FILE_CLEAR: + return initialState; + case actions.METADATA_UPDATE: + return Object.assign({}, state, { + metadata: Object.assign({}, state.metadata, _defineProperty({}, action.data.name, action.data.value)) + }); + case actions.CLAIM_UPDATE: + return Object.assign({}, state, { + claim: action.data + }); + case actions.SET_PUBLISH_IN_CHANNEL: + return Object.assign({}, state, { + publishInChannel: action.channel + }); + case actions.PUBLISH_STATUS_UPDATE: + return Object.assign({}, state, { + status: action.data + }); + case actions.ERROR_UPDATE: + return Object.assign({}, state, { + error: Object.assign({}, state.error, _defineProperty({}, action.data.name, action.data.value)) + }); + case actions.SELECTED_CHANNEL_UPDATE: + return Object.assign({}, state, { + selectedChannel: action.data + }); + case actions.TOGGLE_METADATA_INPUTS: + return Object.assign({}, state, { + showMetadataInputs: action.data + }); + case actions.THUMBNAIL_NEW: + return Object.assign({}, state, { + thumbnail: action.data + }); + default: + return state; + } +}; + +var _publish_action_types = __webpack_require__(40); + +var actions = _interopRequireWildcard(_publish_action_types); + +var _publish_channel_select_states = __webpack_require__(91); + +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 _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; } + +var _require = __webpack_require__(3), + publishing = _require.publishing; + +var initialState = { + disabled: publishing.disabled, + disabledMessage: publishing.disabledMessage, + publishInChannel: false, + selectedChannel: _publish_channel_select_states.LOGIN, + showMetadataInputs: false, + status: { + status: null, + message: null + }, + error: { + file: null, + url: null, + channel: null, + publishSubmit: null + }, + file: null, + claim: '', + metadata: { + title: '', + description: '', + license: '', + nsfw: false + }, + thumbnail: null +}; + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var LOGIN = exports.LOGIN = 'Existing'; +var CREATE = exports.CREATE = 'New'; + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + + switch (action.type) { + case actions.CHANNEL_UPDATE: + return Object.assign({}, state, { + loggedInChannel: action.data + }); + default: + return state; + } +}; + +var _channel_action_types = __webpack_require__(41); + +var actions = _interopRequireWildcard(_channel_action_types); + +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; } } + +var initialState = { + loggedInChannel: { + name: null, + shortId: null, + longId: null + } +}; + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + + switch (action.type) { + // handle request + case actions.REQUEST_ERROR: + return Object.assign({}, state, { + request: Object.assign({}, state.request, { + error: action.data + }) + }); + case actions.REQUEST_UPDATE: + return Object.assign({}, state, { + request: Object.assign({}, state.request, { + type: action.data.requestType, + id: action.data.requestId + }) + }); + // store requests + case actions.REQUEST_LIST_ADD: + return Object.assign({}, state, { + requestList: Object.assign({}, state.requestList, _defineProperty({}, action.data.id, { + error: action.data.error, + key: action.data.key + })) + }); + // asset data + case actions.ASSET_ADD: + return Object.assign({}, state, { + assetList: Object.assign({}, state.assetList, _defineProperty({}, action.data.id, { + error: action.data.error, + name: action.data.name, + claimId: action.data.claimId, + shortId: action.data.shortId, + claimData: action.data.claimData + })) + }); + // channel data + case actions.CHANNEL_ADD: + return Object.assign({}, state, { + channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.id, { + name: action.data.name, + longId: action.data.longId, + shortId: action.data.shortId, + claimsData: action.data.claimsData + })) + }); + case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS: + return Object.assign({}, state, { + channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.channelListId, Object.assign({}, state.channelList[action.data.channelListId], { + claimsData: action.data.claimsData + }))) + }); + // display an asset + case actions.FILE_AVAILABILITY_UPDATE: + return Object.assign({}, state, { + displayAsset: Object.assign({}, state.displayAsset, { + status: action.data + }) + }); + case actions.DISPLAY_ASSET_ERROR: + return Object.assign({}, state, { + displayAsset: Object.assign({}, state.displayAsset, { + error: action.data, + status: _asset_display_states.ERROR + }) + }); + default: + return state; + } +}; + +var _show_action_types = __webpack_require__(11); + +var actions = _interopRequireWildcard(_show_action_types); + +var _asset_display_states = __webpack_require__(42); + +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 _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; } + +var initialState = { + request: { + error: null, + type: null, + id: null + }, + requestList: {}, + channelList: {}, + assetList: {}, + displayAsset: { + error: null, + status: _asset_display_states.LOCAL_CHECK + } +}; + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + + switch (action.type) { + default: + return state; + } +}; + +var siteConfig = __webpack_require__(3); + +var googleAnalyticsId = siteConfig.analytics.googleId, + _siteConfig$assetDefa = siteConfig.assetDefaults, + defaultThumbnail = _siteConfig$assetDefa.thumbnail, + defaultDescription = _siteConfig$assetDefa.description, + _siteConfig$details = siteConfig.details, + description = _siteConfig$details.description, + host = _siteConfig$details.host, + title = _siteConfig$details.title, + twitter = _siteConfig$details.twitter; + + +var initialState = { + description: description, + googleAnalyticsId: googleAnalyticsId, + host: host, + title: title, + twitter: twitter, + defaultDescription: defaultDescription, + defaultThumbnail: defaultThumbnail +}; + +/***/ }), +/* 95 */ +/***/ (function(module, exports) { + +module.exports = require("react-ga"); + +/***/ }), +/* 96 */ +/***/ (function(module, exports) { + +module.exports = require("cross-fetch/polyfill"); + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _NavBar = __webpack_require__(8); + +var _NavBar2 = _interopRequireDefault(_NavBar); + +var _SEO = __webpack_require__(9); + +var _SEO2 = _interopRequireDefault(_SEO); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var AboutPage = function (_React$Component) { + _inherits(AboutPage, _React$Component); + + function AboutPage() { + _classCallCheck(this, AboutPage); + + return _possibleConstructorReturn(this, (AboutPage.__proto__ || Object.getPrototypeOf(AboutPage)).apply(this, arguments)); + } + + _createClass(AboutPage, [{ + key: 'render', + value: function render() { + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_SEO2.default, { pageTitle: 'About', pageUri: 'about' }), + _react2.default.createElement(_NavBar2.default, null), + _react2.default.createElement( + 'div', + { className: 'row row--padded' }, + _react2.default.createElement( + 'div', + { className: 'column column--5 column--med-10 align-content-top' }, + _react2.default.createElement( + 'div', + { className: 'column column--8 column--med-10' }, + _react2.default.createElement( + 'p', + { className: 'pull-quote' }, + 'Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.' + ), + _react2.default.createElement( + 'p', + null, + _react2.default.createElement( + 'a', + { className: 'link--primary', target: '_blank', href: 'https://twitter.com/spee_ch' }, + 'TWITTER' + ) + ), + _react2.default.createElement( + 'p', + null, + _react2.default.createElement( + 'a', + { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch' }, + 'GITHUB' + ) + ), + _react2.default.createElement( + 'p', + null, + _react2.default.createElement( + 'a', + { className: 'link--primary', target: '_blank', href: 'https://discord.gg/YjYbwhS' }, + 'DISCORD CHANNEL' + ) + ), + _react2.default.createElement( + 'p', + null, + _react2.default.createElement( + 'a', + { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch/blob/master/README.md' }, + 'DOCUMENTATION' + ) + ) + ) + ), + _react2.default.createElement( + 'div', + { className: 'column column--5 column--med-10 align-content-top' }, + _react2.default.createElement( + 'div', + { className: 'column column--8 column--med-10' }, + _react2.default.createElement( + 'p', + null, + 'Spee.ch is a media-hosting site that reads from and publishes content to the ', + _react2.default.createElement( + 'a', + { className: 'link--primary', href: 'https://lbry.io' }, + 'LBRY' + ), + ' blockchain.' + ), + _react2.default.createElement( + 'p', + null, + 'Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the ', + _react2.default.createElement( + 'a', + { className: 'link--primary', href: 'https://lbry.io/get' }, + 'LBRY' + ), + ' network. This means that your images are stored in multiple locations without a single point of failure.' + ), + _react2.default.createElement( + 'h3', + null, + 'Contribute' + ), + _react2.default.createElement( + 'p', + null, + 'If you have an idea for your own spee.ch-like site on top of LBRY, fork our ', + _react2.default.createElement( + 'a', + { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch' }, + 'github repo' + ), + ' and go to town!' + ), + _react2.default.createElement( + 'p', + null, + 'If you want to improve spee.ch, join our ', + _react2.default.createElement( + 'a', + { className: 'link--primary', href: 'https://discord.gg/YjYbwhS' }, + 'discord channel' + ), + ' or solve one of our ', + _react2.default.createElement( + 'a', + { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch/issues' }, + 'github issues' + ), + '.' + ) + ) + ) + ) + ); + } + }]); + + return AboutPage; +}(_react2.default.Component); + +; + +exports.default = AboutPage; + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRouterDom = __webpack_require__(4); + +var _Logo = __webpack_require__(48); + +var _Logo2 = _interopRequireDefault(_Logo); + +var _NavBarChannelOptionsDropdown = __webpack_require__(49); + +var _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown); + +var _request = __webpack_require__(6); + +var _request2 = _interopRequireDefault(_request); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var VIEW = 'VIEW'; +var LOGOUT = 'LOGOUT'; + +var NavBar = function (_React$Component) { + _inherits(NavBar, _React$Component); + + function NavBar(props) { + _classCallCheck(this, NavBar); + + var _this = _possibleConstructorReturn(this, (NavBar.__proto__ || Object.getPrototypeOf(NavBar)).call(this, props)); + + _this.checkForLoggedInUser = _this.checkForLoggedInUser.bind(_this); + _this.logoutUser = _this.logoutUser.bind(_this); + _this.handleSelection = _this.handleSelection.bind(_this); + return _this; + } + + _createClass(NavBar, [{ + key: 'componentDidMount', + value: function componentDidMount() { + // check to see if the user is already logged in + this.checkForLoggedInUser(); + } + }, { + key: 'checkForLoggedInUser', + value: function checkForLoggedInUser() { + var _this2 = this; + + var params = { credentials: 'include' }; + (0, _request2.default)('/user', params).then(function (_ref) { + var data = _ref.data; + + _this2.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId); + }).catch(function (error) { + console.log('/user error:', error.message); + }); + } + }, { + key: 'logoutUser', + value: function logoutUser() { + var _this3 = this; + + var params = { credentials: 'include' }; + (0, _request2.default)('/logout', params).then(function () { + _this3.props.onChannelLogout(); + }).catch(function (error) { + console.log('/logout error', error.message); + }); + } + }, { + key: 'handleSelection', + value: function handleSelection(event) { + var value = event.target.selectedOptions[0].value; + switch (value) { + case LOGOUT: + this.logoutUser(); + break; + case VIEW: + // redirect to channel page + this.props.history.push('/' + this.props.channelName + ':' + this.props.channelLongId); + break; + default: + break; + } + } + }, { + key: 'render', + value: function render() { + var siteDescription = this.props.siteDescription; + + return _react2.default.createElement( + 'div', + { className: 'row row--wide nav-bar' }, + _react2.default.createElement( + 'div', + { className: 'row row--padded row--short flex-container--row flex-container--space-between-center' }, + _react2.default.createElement(_Logo2.default, null), + _react2.default.createElement( + 'div', + { className: 'nav-bar--center' }, + _react2.default.createElement( + 'span', + { className: 'nav-bar-tagline' }, + siteDescription + ) + ), + _react2.default.createElement( + 'div', + { className: 'nav-bar--right' }, + _react2.default.createElement( + _reactRouterDom.NavLink, + { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/', exact: true }, + 'Publish' + ), + _react2.default.createElement( + _reactRouterDom.NavLink, + { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/about' }, + 'About' + ), + this.props.channelName ? _react2.default.createElement(_NavBarChannelOptionsDropdown2.default, { + channelName: this.props.channelName, + handleSelection: this.handleSelection, + defaultSelection: this.props.channelName, + VIEW: VIEW, + LOGOUT: LOGOUT + }) : _react2.default.createElement( + _reactRouterDom.NavLink, + { id: 'nav-bar-login-link', className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/login' }, + 'Channel' + ) + ) + ) + ); + } + }]); + + return NavBar; +}(_react2.default.Component); + +exports.default = (0, _reactRouterDom.withRouter)(NavBar); + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactHelmet = __webpack_require__(13); + +var _reactHelmet2 = _interopRequireDefault(_reactHelmet); + +var _propTypes = __webpack_require__(10); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _pageTitle = __webpack_require__(23); + +var _metaTags = __webpack_require__(22); + +var _canonicalLink = __webpack_require__(20); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var SEO = function (_React$Component) { + _inherits(SEO, _React$Component); + + function SEO() { + _classCallCheck(this, SEO); + + return _possibleConstructorReturn(this, (SEO.__proto__ || Object.getPrototypeOf(SEO)).apply(this, arguments)); + } + + _createClass(SEO, [{ + key: 'render', + value: function render() { + // props from state + var _props = this.props, + defaultDescription = _props.defaultDescription, + defaultThumbnail = _props.defaultThumbnail, + siteDescription = _props.siteDescription, + siteHost = _props.siteHost, + siteTitle = _props.siteTitle, + siteTwitter = _props.siteTwitter; + // props from parent + + var _props2 = this.props, + asset = _props2.asset, + channel = _props2.channel, + pageUri = _props2.pageUri; + var pageTitle = this.props.pageTitle; + // create page title, tags, and canonical link + + pageTitle = (0, _pageTitle.createPageTitle)(siteTitle, pageTitle); + var metaTags = (0, _metaTags.createMetaTags)(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail); + var canonicalLink = (0, _canonicalLink.createCanonicalLink)(asset, channel, pageUri, siteHost); + // render results + return _react2.default.createElement(_reactHelmet2.default, { + title: pageTitle, + meta: metaTags, + link: [{ rel: 'canonical', href: canonicalLink }] + }); + } + }]); + + return SEO; +}(_react2.default.Component); + +; + +SEO.propTypes = { + pageTitle: _propTypes2.default.string, + pageUri: _propTypes2.default.string, + channel: _propTypes2.default.object, + asset: _propTypes2.default.object +}; + +exports.default = SEO; + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(2); + +var _view = __webpack_require__(101); + +var _view2 = _interopRequireDefault(_view); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapStateToProps = function mapStateToProps(_ref) { + var channel = _ref.channel; + + return { + loggedInChannelName: channel.loggedInChannel.name + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRouterDom = __webpack_require__(4); + +var _SEO = __webpack_require__(9); + +var _SEO2 = _interopRequireDefault(_SEO); + +var _NavBar = __webpack_require__(8); + +var _NavBar2 = _interopRequireDefault(_NavBar); + +var _ChannelLoginForm = __webpack_require__(102); + +var _ChannelLoginForm2 = _interopRequireDefault(_ChannelLoginForm); + +var _ChannelCreateForm = __webpack_require__(104); + +var _ChannelCreateForm2 = _interopRequireDefault(_ChannelCreateForm); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var LoginPage = function (_React$Component) { + _inherits(LoginPage, _React$Component); + + function LoginPage() { + _classCallCheck(this, LoginPage); + + return _possibleConstructorReturn(this, (LoginPage.__proto__ || Object.getPrototypeOf(LoginPage)).apply(this, arguments)); + } + + _createClass(LoginPage, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(newProps) { + // re-route the user to the homepage if the user is logged in + if (newProps.loggedInChannelName !== this.props.loggedInChannelName) { + this.props.history.push('/'); + } + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_SEO2.default, { pageTitle: 'Login', pageUri: 'login' }), + _react2.default.createElement(_NavBar2.default, null), + _react2.default.createElement( + 'div', + { className: 'row row--padded' }, + _react2.default.createElement( + 'div', + { className: 'column column--5 column--med-10 align-content-top' }, + _react2.default.createElement( + 'div', + { className: 'column column--8 column--med-10' }, + _react2.default.createElement( + 'p', + null, + 'Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you\'re ', + _react2.default.createElement( + 'a', + { className: 'link--primary', target: '_blank', href: '/@catalonia2017:43dcf47163caa21d8404d9fe9b30f78ef3e146a8' }, + 'documenting important events' + ), + ', or making a public repository for ', + _react2.default.createElement( + 'a', + { className: 'link--primary', target: '_blank', href: '/@catGifs' }, + 'cat gifs' + ), + ' (password: \'1234\'), try creating a channel for it!' + ) + ) + ), + _react2.default.createElement( + 'div', + { className: 'column column--5 column--med-10 align-content-top' }, + _react2.default.createElement( + 'div', + { className: 'column column--8 column--med-10' }, + _react2.default.createElement( + 'h3', + { className: 'h3--no-bottom' }, + 'Log in to an existing channel:' + ), + _react2.default.createElement(_ChannelLoginForm2.default, null), + _react2.default.createElement( + 'h3', + { className: 'h3--no-bottom' }, + 'Create a brand new channel:' + ), + _react2.default.createElement(_ChannelCreateForm2.default, null) + ) + ) + ) + ); + } + }]); + + return LoginPage; +}(_react2.default.Component); + +; + +exports.default = (0, _reactRouterDom.withRouter)(LoginPage); + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(2); + +var _channel = __webpack_require__(24); + +var _view = __webpack_require__(103); + +var _view2 = _interopRequireDefault(_view); + +var _publish = __webpack_require__(25); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onChannelLogin: function onChannelLogin(name, shortId, longId) { + dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId)); + dispatch((0, _publish.updateSelectedChannel)(name)); + } + }; +}; + +exports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default); + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _request = __webpack_require__(6); + +var _request2 = _interopRequireDefault(_request); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var ChannelLoginForm = function (_React$Component) { + _inherits(ChannelLoginForm, _React$Component); + + function ChannelLoginForm(props) { + _classCallCheck(this, ChannelLoginForm); + + var _this = _possibleConstructorReturn(this, (ChannelLoginForm.__proto__ || Object.getPrototypeOf(ChannelLoginForm)).call(this, props)); + + _this.state = { + error: null, + name: '', + password: '' + }; + _this.handleInput = _this.handleInput.bind(_this); + _this.loginToChannel = _this.loginToChannel.bind(_this); + return _this; + } + + _createClass(ChannelLoginForm, [{ + key: 'handleInput', + value: function handleInput(event) { + var name = event.target.name; + var value = event.target.value; + this.setState(_defineProperty({}, name, value)); + } + }, { + key: 'loginToChannel', + value: function loginToChannel(event) { + var _this2 = this; + + event.preventDefault(); + var params = { + method: 'POST', + body: JSON.stringify({ username: this.state.name, password: this.state.password }), + headers: new Headers({ + 'Content-Type': 'application/json' + }), + credentials: 'include' + }; + (0, _request2.default)('login', params).then(function (_ref) { + var success = _ref.success, + channelName = _ref.channelName, + shortChannelId = _ref.shortChannelId, + channelClaimId = _ref.channelClaimId, + message = _ref.message; + + if (success) { + _this2.props.onChannelLogin(channelName, shortChannelId, channelClaimId); + } else { + _this2.setState({ 'error': message }); + }; + }).catch(function (error) { + if (error.message) { + _this2.setState({ 'error': error.message }); + } else { + _this2.setState({ 'error': error }); + } + }); + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement( + 'form', + { id: 'channel-login-form' }, + _react2.default.createElement( + 'div', + { className: 'row row--wide row--short' }, + _react2.default.createElement( + 'div', + { className: 'column column--3 column--sml-10' }, + _react2.default.createElement( + 'label', + { className: 'label', htmlFor: 'channel-login-name-input' }, + 'Name:' + ) + ), + _react2.default.createElement( + 'div', + { className: 'column column--6 column--sml-10' }, + _react2.default.createElement( + 'div', + { className: 'input-text--primary flex-container--row flex-container--left-bottom' }, + _react2.default.createElement( + 'span', + null, + '@' + ), + _react2.default.createElement('input', { type: 'text', id: 'channel-login-name-input', className: 'input-text', name: 'name', placeholder: 'Your Channel Name', value: this.state.channelName, onChange: this.handleInput }) + ) + ) + ), + _react2.default.createElement( + 'div', + { className: 'row row--wide row--short' }, + _react2.default.createElement( + 'div', + { className: 'column column--3 column--sml-10' }, + _react2.default.createElement( + 'label', + { className: 'label', htmlFor: 'channel-login-password-input' }, + 'Password:' + ) + ), + _react2.default.createElement( + 'div', + { className: 'column column--6 column--sml-10' }, + _react2.default.createElement( + 'div', + { className: 'input-text--primary' }, + _react2.default.createElement('input', { type: 'password', id: 'channel-login-password-input', name: 'password', className: 'input-text', placeholder: '', value: this.state.channelPassword, onChange: this.handleInput }) + ) + ) + ), + this.state.error ? _react2.default.createElement( + 'p', + { className: 'info-message--failure' }, + this.state.error + ) : _react2.default.createElement( + 'p', + { className: 'info-message' }, + 'Enter the name and password for your channel' + ), + _react2.default.createElement( + 'div', + { className: 'row row--wide' }, + _react2.default.createElement( + 'button', + { className: 'button--primary', onClick: this.loginToChannel }, + 'Authenticate' + ) + ) + ); + } + }]); + + return ChannelLoginForm; +}(_react2.default.Component); + +exports.default = ChannelLoginForm; + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(2); + +var _channel = __webpack_require__(24); + +var _view = __webpack_require__(105); + +var _view2 = _interopRequireDefault(_view); + +var _publish = __webpack_require__(25); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + onChannelLogin: function onChannelLogin(name, shortId, longId) { + dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId)); + dispatch((0, _publish.updateSelectedChannel)(name)); + } + }; +}; + +exports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default); + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _ProgressBar = __webpack_require__(26); + +var _ProgressBar2 = _interopRequireDefault(_ProgressBar); + +var _request = __webpack_require__(6); + +var _request2 = _interopRequireDefault(_request); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var ChannelCreateForm = function (_React$Component) { + _inherits(ChannelCreateForm, _React$Component); + + function ChannelCreateForm(props) { + _classCallCheck(this, ChannelCreateForm); + + var _this = _possibleConstructorReturn(this, (ChannelCreateForm.__proto__ || Object.getPrototypeOf(ChannelCreateForm)).call(this, props)); + + _this.state = { + error: null, + channel: '', + password: '', + status: null + }; + _this.handleChannelInput = _this.handleChannelInput.bind(_this); + _this.handleInput = _this.handleInput.bind(_this); + _this.createChannel = _this.createChannel.bind(_this); + return _this; + } + + _createClass(ChannelCreateForm, [{ + key: 'cleanseChannelInput', + value: function cleanseChannelInput(input) { + input = input.replace(/\s+/g, '-'); // replace spaces with dashes + input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-' + return input; + } + }, { + key: 'handleChannelInput', + value: function handleChannelInput(event) { + var value = event.target.value; + value = this.cleanseChannelInput(value); + this.setState({ channel: value }); + if (value) { + this.updateIsChannelAvailable(value); + } else { + this.setState({ error: 'Please enter a channel name' }); + } + } + }, { + key: 'handleInput', + value: function handleInput(event) { + var name = event.target.name; + var value = event.target.value; + this.setState(_defineProperty({}, name, value)); + } + }, { + key: 'updateIsChannelAvailable', + value: function updateIsChannelAvailable(channel) { + var _this2 = this; + + var channelWithAtSymbol = '@' + channel; + (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol).then(function () { + _this2.setState({ 'error': null }); + }).catch(function (error) { + _this2.setState({ 'error': error.message }); + }); + } + }, { + key: 'checkIsChannelAvailable', + value: function checkIsChannelAvailable(channel) { + var channelWithAtSymbol = '@' + channel; + return (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol); + } + }, { + key: 'checkIsPasswordProvided', + value: function checkIsPasswordProvided(password) { + return new Promise(function (resolve, reject) { + if (!password || password.length < 1) { + return reject(new Error('Please provide a password')); + } + resolve(); + }); + } + }, { + key: 'makePublishChannelRequest', + value: function makePublishChannelRequest(username, password) { + var params = { + method: 'POST', + body: JSON.stringify({ username: username, password: password }), + headers: new Headers({ + 'Content-Type': 'application/json' + }), + credentials: 'include' + }; + return new Promise(function (resolve, reject) { + (0, _request2.default)('/signup', params).then(function (result) { + return resolve(result); + }).catch(function (error) { + reject(new Error('Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ' + error.message)); + }); + }); + } + }, { + key: 'createChannel', + value: function createChannel(event) { + var _this3 = this; + + event.preventDefault(); + this.checkIsPasswordProvided(this.state.password).then(function () { + return _this3.checkIsChannelAvailable(_this3.state.channel); + }).then(function () { + _this3.setState({ status: 'We are publishing your new channel. Sit tight...' }); + return _this3.makePublishChannelRequest(_this3.state.channel, _this3.state.password); + }).then(function (result) { + _this3.setState({ status: null }); + _this3.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId); + }).catch(function (error) { + if (error.message) { + _this3.setState({ 'error': error.message, status: null }); + } else { + _this3.setState({ 'error': error, status: null }); + }; + }); + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement( + 'div', + null, + !this.state.status ? _react2.default.createElement( + 'form', + { id: 'publish-channel-form' }, + _react2.default.createElement( + 'div', + { className: 'row row--wide row--short' }, + _react2.default.createElement( + 'div', + { className: 'column column--3 column--sml-10' }, + _react2.default.createElement( + 'label', + { className: 'label', htmlFor: 'new-channel-name' }, + 'Name:' + ) + ), + _react2.default.createElement( + 'div', + { className: 'column column--6 column--sml-10' }, + _react2.default.createElement( + 'div', + { className: 'input-text--primary flex-container--row flex-container--left-bottom span--relative' }, + _react2.default.createElement( + 'span', + null, + '@' + ), + _react2.default.createElement('input', { type: 'text', name: 'channel', id: 'new-channel-name', className: 'input-text', placeholder: 'exampleChannelName', value: this.state.channel, onChange: this.handleChannelInput }), + this.state.channel && !this.state.error && _react2.default.createElement( + 'span', + { id: 'input-success-channel-name', className: 'info-message--success span--absolute' }, + '\u2713' + ), + this.state.error && _react2.default.createElement( + 'span', + { id: 'input-success-channel-name', className: 'info-message--failure span--absolute' }, + '\u2716' + ) + ) + ) + ), + _react2.default.createElement( + 'div', + { className: 'row row--wide row--short' }, + _react2.default.createElement( + 'div', + { className: 'column column--3 column--sml-10' }, + _react2.default.createElement( + 'label', + { className: 'label', htmlFor: 'new-channel-password' }, + 'Password:' + ) + ), + _react2.default.createElement( + 'div', + { className: 'column column--6 column--sml-10' }, + _react2.default.createElement( + 'div', + { className: 'input-text--primary' }, + _react2.default.createElement('input', { type: 'password', name: 'password', id: 'new-channel-password', className: 'input-text', placeholder: '', value: this.state.password, onChange: this.handleInput }) + ) + ) + ), + this.state.error ? _react2.default.createElement( + 'p', + { className: 'info-message--failure' }, + this.state.error + ) : _react2.default.createElement( + 'p', + { className: 'info-message' }, + 'Choose a name and password for your channel' + ), + _react2.default.createElement( + 'div', + { className: 'row row--wide' }, + _react2.default.createElement( + 'button', + { className: 'button--primary', onClick: this.createChannel }, + 'Create Channel' + ) + ) + ) : _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + 'p', + { className: 'fine-print' }, + this.state.status + ), + _react2.default.createElement(_ProgressBar2.default, { size: 12 }) + ) + ); + } + }]); + + return ChannelCreateForm; +}(_react2.default.Component); + +exports.default = ChannelCreateForm; + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(2); + +var _show = __webpack_require__(7); + +var _view = __webpack_require__(107); + +var _view2 = _interopRequireDefault(_view); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapStateToProps = function mapStateToProps(_ref) { + var show = _ref.show; + + return { + error: show.request.error, + requestType: show.request.type + }; +}; + +var mapDispatchToProps = { + onHandleShowPageUri: _show.onHandleShowPageUri +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default); + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _ErrorPage = __webpack_require__(27); + +var _ErrorPage2 = _interopRequireDefault(_ErrorPage); + +var _ShowAssetLite = __webpack_require__(108); + +var _ShowAssetLite2 = _interopRequireDefault(_ShowAssetLite); + +var _ShowAssetDetails = __webpack_require__(111); + +var _ShowAssetDetails2 = _interopRequireDefault(_ShowAssetDetails); + +var _ShowChannel = __webpack_require__(117); + +var _ShowChannel2 = _interopRequireDefault(_ShowChannel); + +var _show_request_types = __webpack_require__(52); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var ShowPage = function (_React$Component) { + _inherits(ShowPage, _React$Component); + + function ShowPage() { + _classCallCheck(this, ShowPage); + + return _possibleConstructorReturn(this, (ShowPage.__proto__ || Object.getPrototypeOf(ShowPage)).apply(this, arguments)); + } + + _createClass(ShowPage, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.props.onHandleShowPageUri(this.props.match.params); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.match.params !== this.props.match.params) { + this.props.onHandleShowPageUri(nextProps.match.params); + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + error = _props.error, + requestType = _props.requestType; + + if (error) { + return _react2.default.createElement(_ErrorPage2.default, { error: error }); + } + switch (requestType) { + case _show_request_types.CHANNEL: + return _react2.default.createElement(_ShowChannel2.default, null); + case _show_request_types.ASSET_LITE: + return _react2.default.createElement(_ShowAssetLite2.default, null); + case _show_request_types.ASSET_DETAILS: + return _react2.default.createElement(_ShowAssetDetails2.default, null); + default: + return _react2.default.createElement( + 'p', + null, + 'loading...' + ); + } + } + }]); + + return ShowPage; +}(_react2.default.Component); + +; + +exports.default = ShowPage; + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(2); + +var _view = __webpack_require__(109); + +var _view2 = _interopRequireDefault(_view); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapStateToProps = function mapStateToProps(_ref) { + var show = _ref.show; + + // select request info + var requestId = show.request.id; + // select asset info + var asset = void 0; + var request = show.requestList[requestId] || null; + var assetList = show.assetList; + if (request && assetList) { + var assetKey = request.key; // note: just store this in the request + asset = assetList[assetKey] || null; + }; + // return props + return { + asset: asset + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _SEO = __webpack_require__(9); + +var _SEO2 = _interopRequireDefault(_SEO); + +var _reactRouterDom = __webpack_require__(4); + +var _AssetDisplay = __webpack_require__(53); + +var _AssetDisplay2 = _interopRequireDefault(_AssetDisplay); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var ShowLite = function (_React$Component) { + _inherits(ShowLite, _React$Component); + + function ShowLite() { + _classCallCheck(this, ShowLite); + + return _possibleConstructorReturn(this, (ShowLite.__proto__ || Object.getPrototypeOf(ShowLite)).apply(this, arguments)); + } + + _createClass(ShowLite, [{ + key: 'render', + value: function render() { + var asset = this.props.asset; + + if (asset) { + var _asset$claimData = asset.claimData, + name = _asset$claimData.name, + claimId = _asset$claimData.claimId; + + return _react2.default.createElement( + 'div', + { className: 'row row--tall flex-container--column flex-container--center-center show-lite-container' }, + _react2.default.createElement(_SEO2.default, { pageTitle: name, asset: asset }), + _react2.default.createElement(_AssetDisplay2.default, null), + _react2.default.createElement( + _reactRouterDom.Link, + { id: 'asset-boilerpate', className: 'link--primary fine-print', to: '/' + claimId + '/' + name }, + 'hosted via Spee.ch' + ) + ); + } + return _react2.default.createElement( + 'div', + { className: 'row row--tall row--padded flex-container--column flex-container--center-center' }, + _react2.default.createElement( + 'p', + null, + 'loading asset data...' + ) + ); + } + }]); + + return ShowLite; +}(_react2.default.Component); + +; + +exports.default = ShowLite; + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _ProgressBar = __webpack_require__(26); + +var _ProgressBar2 = _interopRequireDefault(_ProgressBar); + +var _asset_display_states = __webpack_require__(42); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var AssetDisplay = function (_React$Component) { + _inherits(AssetDisplay, _React$Component); + + function AssetDisplay() { + _classCallCheck(this, AssetDisplay); + + return _possibleConstructorReturn(this, (AssetDisplay.__proto__ || Object.getPrototypeOf(AssetDisplay)).apply(this, arguments)); + } + + _createClass(AssetDisplay, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var _props$asset$claimDat = this.props.asset.claimData, + name = _props$asset$claimDat.name, + claimId = _props$asset$claimDat.claimId; + + this.props.onFileRequest(name, claimId); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + status = _props.status, + error = _props.error, + _props$asset$claimDat2 = _props.asset.claimData, + name = _props$asset$claimDat2.name, + claimId = _props$asset$claimDat2.claimId, + contentType = _props$asset$claimDat2.contentType, + fileExt = _props$asset$claimDat2.fileExt, + thumbnail = _props$asset$claimDat2.thumbnail; + + return _react2.default.createElement( + 'div', + { id: 'asset-display-component' }, + status === _asset_display_states.LOCAL_CHECK && _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + 'p', + null, + 'Checking to see if Spee.ch has your asset locally...' + ) + ), + status === _asset_display_states.UNAVAILABLE && _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + 'p', + null, + 'Sit tight, we\'re searching the LBRY blockchain for your asset!' + ), + _react2.default.createElement(_ProgressBar2.default, { size: 12 }), + _react2.default.createElement( + 'p', + null, + 'Curious what magic is happening here? ', + _react2.default.createElement( + 'a', + { className: 'link--primary', target: 'blank', href: 'https://lbry.io/faq/what-is-lbry' }, + 'Learn more.' + ) + ) + ), + status === _asset_display_states.ERROR && _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + 'p', + null, + 'Unfortunately, we couldn\'t download your asset from LBRY. You can help us out by sharing the below error message in the ', + _react2.default.createElement( + 'a', + { className: 'link--primary', href: 'https://discord.gg/YjYbwhS', target: '_blank' }, + 'LBRY discord' + ), + '.' + ), + _react2.default.createElement( + 'i', + null, + _react2.default.createElement( + 'p', + { id: 'error-message' }, + error + ) + ) + ), + status === _asset_display_states.AVAILABLE && function () { + switch (contentType) { + case 'image/jpeg': + case 'image/jpg': + case 'image/png': + return _react2.default.createElement('img', { + className: 'asset', + src: '/' + claimId + '/' + name + '.' + fileExt, + alt: name }); + case 'image/gif': + return _react2.default.createElement('img', { + className: 'asset', + src: '/' + claimId + '/' + name + '.' + fileExt, + alt: name + }); + case 'video/mp4': + return _react2.default.createElement( + 'video', + { className: 'asset video', controls: true, poster: thumbnail }, + _react2.default.createElement('source', { + src: '/' + claimId + '/' + name + '.' + fileExt + }), + _react2.default.createElement( + 'p', + null, + 'Your browser does not support the ', + _react2.default.createElement( + 'code', + null, + 'video' + ), + ' element.' + ) + ); + default: + return _react2.default.createElement( + 'p', + null, + 'Unsupported file type' + ); + } + }() + ); + } + }]); + + return AssetDisplay; +}(_react2.default.Component); + +; + +exports.default = AssetDisplay; + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(2); + +var _view = __webpack_require__(112); + +var _view2 = _interopRequireDefault(_view); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapStateToProps = function mapStateToProps(_ref) { + var show = _ref.show; + + // select request info + var requestId = show.request.id; + // select asset info + var asset = void 0; + var request = show.requestList[requestId] || null; + var assetList = show.assetList; + if (request && assetList) { + var assetKey = request.key; // note: just store this in the request + asset = assetList[assetKey] || null; + }; + // return props + return { + asset: asset + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _SEO = __webpack_require__(9); + +var _SEO2 = _interopRequireDefault(_SEO); + +var _NavBar = __webpack_require__(8); + +var _NavBar2 = _interopRequireDefault(_NavBar); + +var _ErrorPage = __webpack_require__(27); + +var _ErrorPage2 = _interopRequireDefault(_ErrorPage); + +var _AssetTitle = __webpack_require__(113); + +var _AssetTitle2 = _interopRequireDefault(_AssetTitle); + +var _AssetDisplay = __webpack_require__(53); + +var _AssetDisplay2 = _interopRequireDefault(_AssetDisplay); + +var _AssetInfo = __webpack_require__(115); + +var _AssetInfo2 = _interopRequireDefault(_AssetInfo); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var ShowAssetDetails = function (_React$Component) { + _inherits(ShowAssetDetails, _React$Component); + + function ShowAssetDetails() { + _classCallCheck(this, ShowAssetDetails); + + return _possibleConstructorReturn(this, (ShowAssetDetails.__proto__ || Object.getPrototypeOf(ShowAssetDetails)).apply(this, arguments)); + } + + _createClass(ShowAssetDetails, [{ + key: 'render', + value: function render() { + var asset = this.props.asset; + + if (asset) { + var name = asset.claimData.name; + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_SEO2.default, { pageTitle: name + ' - details', asset: asset }), + _react2.default.createElement(_NavBar2.default, null), + _react2.default.createElement( + 'div', + { className: 'row row--tall row--padded' }, + _react2.default.createElement( + 'div', + { className: 'column column--10' }, + _react2.default.createElement(_AssetTitle2.default, null) + ), + _react2.default.createElement( + 'div', + { className: 'column column--5 column--sml-10 align-content-top' }, + _react2.default.createElement( + 'div', + { className: 'row row--padded show-details-container' }, + _react2.default.createElement(_AssetDisplay2.default, null) + ) + ), + _react2.default.createElement( + 'div', + { className: 'column column--5 column--sml-10 align-content-top' }, + _react2.default.createElement( + 'div', + { className: 'row row--padded' }, + _react2.default.createElement(_AssetInfo2.default, null) + ) + ) + ) + ); + }; + return _react2.default.createElement(_ErrorPage2.default, { error: 'loading asset data...' }); + } + }]); + + return ShowAssetDetails; +}(_react2.default.Component); + +; + +exports.default = ShowAssetDetails; + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(2); + +var _view = __webpack_require__(114); + +var _view2 = _interopRequireDefault(_view); + +var _show = __webpack_require__(12); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapStateToProps = function mapStateToProps(_ref) { + var show = _ref.show; + + var _selectAsset = (0, _show.selectAsset)(show), + title = _selectAsset.claimData.title; + + return { + title: title + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var AssetTitle = function AssetTitle(_ref) { + var title = _ref.title; + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + 'span', + { className: 'text--large' }, + title + ) + ); +}; + +exports.default = AssetTitle; + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(2); + +var _view = __webpack_require__(116); + +var _view2 = _interopRequireDefault(_view); + +var _show = __webpack_require__(12); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapStateToProps = function mapStateToProps(_ref) { + var show = _ref.show; + + // select asset + var asset = (0, _show.selectAsset)(show); + // return props + return { + asset: asset + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRouterDom = __webpack_require__(4); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var AssetInfo = function (_React$Component) { + _inherits(AssetInfo, _React$Component); + + function AssetInfo(props) { + _classCallCheck(this, AssetInfo); + + var _this = _possibleConstructorReturn(this, (AssetInfo.__proto__ || Object.getPrototypeOf(AssetInfo)).call(this, props)); + + _this.copyToClipboard = _this.copyToClipboard.bind(_this); + return _this; + } + + _createClass(AssetInfo, [{ + key: 'copyToClipboard', + value: function copyToClipboard(event) { + var elementToCopy = event.target.dataset.elementtocopy; + var element = document.getElementById(elementToCopy); + element.select(); + try { + document.execCommand('copy'); + } catch (err) { + this.setState({ error: 'Oops, unable to copy' }); + } + } + }, { + key: 'render', + value: function render() { + var _props$asset = this.props.asset, + shortId = _props$asset.shortId, + _props$asset$claimDat = _props$asset.claimData, + channelName = _props$asset$claimDat.channelName, + certificateId = _props$asset$claimDat.certificateId, + description = _props$asset$claimDat.description, + name = _props$asset$claimDat.name, + claimId = _props$asset$claimDat.claimId, + fileExt = _props$asset$claimDat.fileExt, + contentType = _props$asset$claimDat.contentType, + thumbnail = _props$asset$claimDat.thumbnail, + host = _props$asset$claimDat.host; + + return _react2.default.createElement( + 'div', + null, + channelName && _react2.default.createElement( + 'div', + { className: 'row row--padded row--wide row--no-top' }, + _react2.default.createElement( + 'div', + { className: 'column column--2 column--med-10' }, + _react2.default.createElement( + 'span', + { className: 'text' }, + 'Channel:' + ) + ), + _react2.default.createElement( + 'div', + { className: 'column column--8 column--med-10' }, + _react2.default.createElement( + 'span', + { className: 'text' }, + _react2.default.createElement( + _reactRouterDom.Link, + { to: '/' + channelName + ':' + certificateId }, + channelName + ) + ) + ) + ), + description && _react2.default.createElement( + 'div', + { className: 'row row--padded row--wide row--no-top' }, + _react2.default.createElement( + 'span', + { className: 'text' }, + description + ) + ), + _react2.default.createElement( + 'div', + { id: 'show-share-buttons' }, + _react2.default.createElement( + 'div', + { className: 'row row--padded row--wide row--no-top' }, + _react2.default.createElement( + 'div', + { className: 'column column--2 column--med-10' }, + _react2.default.createElement( + 'span', + { className: 'text' }, + 'Share:' + ) + ), + _react2.default.createElement( + 'div', + { className: 'column column--8 column--med-10' }, + _react2.default.createElement( + 'div', + { + className: 'row row--short row--wide flex-container--row flex-container--space-between-bottom flex-container--wrap' }, + _react2.default.createElement( + 'a', + { className: 'link--primary', target: '_blank', href: 'https://twitter.com/intent/tweet?text=' + host + '/' + shortId + '/' + name }, + 'twitter' + ), + _react2.default.createElement( + 'a', + { className: 'link--primary', target: '_blank', href: 'https://www.facebook.com/sharer/sharer.php?u=' + host + '/' + shortId + '/' + name }, + 'facebook' + ), + _react2.default.createElement( + 'a', + { className: 'link--primary', target: '_blank', href: 'http://tumblr.com/widgets/share/tool?canonicalUrl=' + host + '/' + shortId + '/' + name }, + 'tumblr' + ), + _react2.default.createElement( + 'a', + { className: 'link--primary', target: '_blank', href: 'https://www.reddit.com/submit?url=' + host + '/' + shortId + '/' + name + '&title=' + name }, + 'reddit' + ) + ) + ) + ) + ), + _react2.default.createElement( + 'div', + { className: 'row row--padded row--wide row--no-top' }, + _react2.default.createElement( + 'div', + { id: 'show-short-link' }, + _react2.default.createElement( + 'div', + { className: 'column column--2 column--med-10' }, + _react2.default.createElement( + 'span', + { className: 'text' }, + 'Link:' + ) + ), + _react2.default.createElement( + 'div', + { className: 'column column--8 column--med-10' }, + _react2.default.createElement( + 'div', + { className: 'row row--short row--wide' }, + _react2.default.createElement( + 'div', + { className: 'column column--7' }, + _react2.default.createElement( + 'div', + { className: 'input-error', id: 'input-error-copy-short-link', hidden: 'true' }, + 'error here' + ), + _react2.default.createElement('input', { type: 'text', id: 'short-link', className: 'input-disabled input-text--full-width', readOnly: true, + spellCheck: 'false', + value: host + '/' + shortId + '/' + name + '.' + fileExt, + onClick: this.select }) + ), + _react2.default.createElement('div', { className: 'column column--1' }), + _react2.default.createElement( + 'div', + { className: 'column column--2' }, + _react2.default.createElement( + 'button', + { className: 'button--primary button--wide', 'data-elementtocopy': 'short-link', + onClick: this.copyToClipboard }, + 'copy' + ) + ) + ) + ) + ), + _react2.default.createElement( + 'div', + { id: 'show-embed-code' }, + _react2.default.createElement( + 'div', + { className: 'column column--2 column--med-10' }, + _react2.default.createElement( + 'span', + { className: 'text' }, + 'Embed:' + ) + ), + _react2.default.createElement( + 'div', + { className: 'column column--8 column--med-10' }, + _react2.default.createElement( + 'div', + { className: 'row row--short row--wide' }, + _react2.default.createElement( + 'div', + { className: 'column column--7' }, + _react2.default.createElement( + 'div', + { className: 'input-error', id: 'input-error-copy-embed-text', hidden: 'true' }, + 'error here' + ), + contentType === 'video/mp4' ? _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true, + onClick: this.select, spellCheck: 'false', + value: '' }) : _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true, + onClick: this.select, spellCheck: 'false', + value: '' + }) + ), + _react2.default.createElement('div', { className: 'column column--1' }), + _react2.default.createElement( + 'div', + { className: 'column column--2' }, + _react2.default.createElement( + 'button', + { className: 'button--primary button--wide', 'data-elementtocopy': 'embed-text', + onClick: this.copyToClipboard }, + 'copy' + ) + ) + ) + ) + ) + ), + _react2.default.createElement( + 'div', + { className: 'flex-container--row flex-container--space-between-bottom' }, + _react2.default.createElement( + _reactRouterDom.Link, + { className: 'link--primary', to: '/' + shortId + '/' + name + '.' + fileExt }, + _react2.default.createElement( + 'span', + { + className: 'text' }, + 'Direct Link' + ) + ), + _react2.default.createElement( + 'a', + { className: 'link--primary', href: host + '/' + claimId + '/' + name + '.' + fileExt, download: name }, + 'Download' + ), + _react2.default.createElement( + 'a', + { className: 'link--primary', target: '_blank', href: 'https://lbry.io/dmca' }, + 'Report' + ) + ) + ); + } + }]); + + return AssetInfo; +}(_react2.default.Component); + +; + +exports.default = AssetInfo; + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(2); + +var _view = __webpack_require__(118); + +var _view2 = _interopRequireDefault(_view); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapStateToProps = function mapStateToProps(_ref) { + var show = _ref.show; + + // select request info + var requestId = show.request.id; + // select request + var previousRequest = show.requestList[requestId] || null; + // select channel + var channel = void 0; + if (previousRequest) { + var channelKey = previousRequest.key; + channel = show.channelList[channelKey] || null; + } + return { + channel: channel + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _SEO = __webpack_require__(9); + +var _SEO2 = _interopRequireDefault(_SEO); + +var _ErrorPage = __webpack_require__(27); + +var _ErrorPage2 = _interopRequireDefault(_ErrorPage); + +var _NavBar = __webpack_require__(8); + +var _NavBar2 = _interopRequireDefault(_NavBar); + +var _ChannelClaimsDisplay = __webpack_require__(119); + +var _ChannelClaimsDisplay2 = _interopRequireDefault(_ChannelClaimsDisplay); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var ShowChannel = function (_React$Component) { + _inherits(ShowChannel, _React$Component); + + function ShowChannel() { + _classCallCheck(this, ShowChannel); + + return _possibleConstructorReturn(this, (ShowChannel.__proto__ || Object.getPrototypeOf(ShowChannel)).apply(this, arguments)); + } + + _createClass(ShowChannel, [{ + key: 'render', + value: function render() { + var channel = this.props.channel; + + if (channel) { + var name = channel.name, + longId = channel.longId, + shortId = channel.shortId; + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_SEO2.default, { pageTitle: name, channel: channel }), + _react2.default.createElement(_NavBar2.default, null), + _react2.default.createElement( + 'div', + { className: 'row row--tall row--padded' }, + _react2.default.createElement( + 'div', + { className: 'column column--10' }, + _react2.default.createElement( + 'h2', + null, + 'channel name: ', + name + ), + _react2.default.createElement( + 'p', + { className: 'fine-print' }, + 'full channel id: ', + longId + ), + _react2.default.createElement( + 'p', + { className: 'fine-print' }, + 'short channel id: ', + shortId + ) + ), + _react2.default.createElement( + 'div', + { className: 'column column--10' }, + _react2.default.createElement(_ChannelClaimsDisplay2.default, null) + ) + ) + ); + }; + return _react2.default.createElement(_ErrorPage2.default, { error: 'loading channel data...' }); + } + }]); + + return ShowChannel; +}(_react2.default.Component); + +; + +exports.default = ShowChannel; + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(2); + +var _show = __webpack_require__(7); + +var _view = __webpack_require__(120); + +var _view2 = _interopRequireDefault(_view); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapStateToProps = function mapStateToProps(_ref) { + var show = _ref.show; + + // select channel key + var request = show.requestList[show.request.id]; + var channelKey = request.key; + // select channel claims + var channel = show.channelList[channelKey] || null; + // return props + return { + channelKey: channelKey, + channel: channel + }; +}; + +var mapDispatchToProps = { + onUpdateChannelClaims: _show.onUpdateChannelClaims +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default); + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _AssetPreview = __webpack_require__(54); + +var _AssetPreview2 = _interopRequireDefault(_AssetPreview); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var ChannelClaimsDisplay = function (_React$Component) { + _inherits(ChannelClaimsDisplay, _React$Component); + + function ChannelClaimsDisplay(props) { + _classCallCheck(this, ChannelClaimsDisplay); + + var _this = _possibleConstructorReturn(this, (ChannelClaimsDisplay.__proto__ || Object.getPrototypeOf(ChannelClaimsDisplay)).call(this, props)); + + _this.showNextResultsPage = _this.showNextResultsPage.bind(_this); + _this.showPreviousResultsPage = _this.showPreviousResultsPage.bind(_this); + return _this; + } + + _createClass(ChannelClaimsDisplay, [{ + key: 'showPreviousResultsPage', + value: function showPreviousResultsPage() { + var currentPage = this.props.channel.claimsData.currentPage; + + var previousPage = parseInt(currentPage) - 1; + this.showNewPage(previousPage); + } + }, { + key: 'showNextResultsPage', + value: function showNextResultsPage() { + var currentPage = this.props.channel.claimsData.currentPage; + + var nextPage = parseInt(currentPage) + 1; + this.showNewPage(nextPage); + } + }, { + key: 'showNewPage', + value: function showNewPage(page) { + var _props = this.props, + channelKey = _props.channelKey, + _props$channel = _props.channel, + name = _props$channel.name, + longId = _props$channel.longId; + + this.props.onUpdateChannelClaims(channelKey, name, longId, page); + } + }, { + key: 'render', + value: function render() { + var _props$channel$claims = this.props.channel.claimsData, + claims = _props$channel$claims.claims, + currentPage = _props$channel$claims.currentPage, + totalPages = _props$channel$claims.totalPages; + + return _react2.default.createElement( + 'div', + { className: 'row row--tall' }, + claims.length > 0 ? _react2.default.createElement( + 'div', + null, + claims.map(function (claim, index) { + return _react2.default.createElement(_AssetPreview2.default, { + claimData: claim, + key: claim.name + '-' + index + }); + }), + _react2.default.createElement( + 'div', + null, + currentPage > 1 && _react2.default.createElement( + 'button', + { className: 'button--secondary', onClick: this.showPreviousResultsPage }, + 'Previous Page' + ), + currentPage < totalPages && _react2.default.createElement( + 'button', + { className: 'button--secondary', onClick: this.showNextResultsPage }, + 'Next Page' + ) + ) + ) : _react2.default.createElement( + 'p', + null, + 'There are no claims in this channel' + ) + ); + } + }]); + + return ChannelClaimsDisplay; +}(_react2.default.Component); + +; + +exports.default = ChannelClaimsDisplay; + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRouterDom = __webpack_require__(4); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var AssetPreview = function AssetPreview(_ref) { + var defaultThumbnail = _ref.defaultThumbnail, + _ref$claimData = _ref.claimData, + name = _ref$claimData.name, + claimId = _ref$claimData.claimId, + fileExt = _ref$claimData.fileExt, + contentType = _ref$claimData.contentType, + thumbnail = _ref$claimData.thumbnail; + + var directSourceLink = claimId + '/' + name + '.' + fileExt; + var showUrlLink = '/' + claimId + '/' + name; + return _react2.default.createElement( + 'div', + { className: 'asset-holder' }, + _react2.default.createElement( + _reactRouterDom.Link, + { to: showUrlLink }, + function () { + switch (contentType) { + case 'image/jpeg': + case 'image/jpg': + case 'image/png': + case 'image/gif': + return _react2.default.createElement('img', { + className: 'asset-preview', + src: directSourceLink, + alt: name + }); + case 'video/mp4': + return _react2.default.createElement('img', { + className: 'asset-preview video', + src: thumbnail || defaultThumbnail, + alt: name + }); + default: + return _react2.default.createElement( + 'p', + null, + 'unsupported file type' + ); + } + }() + ) + ); +}; + +exports.default = AssetPreview; + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _reactRedux = __webpack_require__(2); + +var _view = __webpack_require__(123); + +var _view2 = _interopRequireDefault(_view); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var mapStateToProps = function mapStateToProps(_ref) { + var _ref$site = _ref.site, + host = _ref$site.host, + title = _ref$site.title; + + return { + host: host, + title: title + }; +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _NavBar = __webpack_require__(8); + +var _NavBar2 = _interopRequireDefault(_NavBar); + +var _reactHelmet = __webpack_require__(13); + +var _reactHelmet2 = _interopRequireDefault(_reactHelmet); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var FourOhForPage = function (_React$Component) { + _inherits(FourOhForPage, _React$Component); + + function FourOhForPage() { + _classCallCheck(this, FourOhForPage); + + return _possibleConstructorReturn(this, (FourOhForPage.__proto__ || Object.getPrototypeOf(FourOhForPage)).apply(this, arguments)); + } + + _createClass(FourOhForPage, [{ + key: 'render', + value: function render() { + var _props = this.props, + title = _props.title, + host = _props.host; + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reactHelmet2.default, + null, + _react2.default.createElement( + 'title', + null, + title, + ' - 404' + ), + _react2.default.createElement('link', { rel: 'canonical', href: host + '/404' }) + ), + _react2.default.createElement(_NavBar2.default, null), + _react2.default.createElement( + 'div', + { className: 'row row--padded' }, + _react2.default.createElement( + 'h2', + null, + '404' + ), + _react2.default.createElement( + 'p', + null, + 'That page does not exist' + ) + ) + ); + } + }]); + + return FourOhForPage; +}(_react2.default.Component); + +; + +exports.default = FourOhForPage; + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + +var _require = __webpack_require__(16), + sendGAServeEvent = _require.sendGAServeEvent; + +var _require2 = __webpack_require__(125), + determineResponseType = _require2.determineResponseType, + flipClaimNameAndIdForBackwardsCompatibility = _require2.flipClaimNameAndIdForBackwardsCompatibility, + logRequestData = _require2.logRequestData, + getClaimIdAndServeAsset = _require2.getClaimIdAndServeAsset; + +var lbryUri = __webpack_require__(126); +var handleShowRender = __webpack_require__(127); +var SERVE = 'SERVE'; + +module.exports = function (app) { + // route to serve a specific asset using the channel or claim id + app.get('/:identifier/:claim', function (req, res) { + var headers = req.headers, + ip = req.ip, + originalUrl = req.originalUrl, + params = req.params; + // decide if this is a show request + + var hasFileExtension = void 0; + try { + var _lbryUri$parseModifie = lbryUri.parseModifier(params.claim); + + hasFileExtension = _lbryUri$parseModifie.hasFileExtension; + } catch (error) { + return res.status(400).json({ success: false, message: error.message }); + } + var responseType = determineResponseType(hasFileExtension, headers); + if (responseType !== SERVE) { + return handleShowRender(req, res); + } + // handle serve request + // send google analytics + sendGAServeEvent(headers, ip, originalUrl); + // parse the claim + var claimName = void 0; + try { + var _lbryUri$parseClaim = lbryUri.parseClaim(params.claim); + + claimName = _lbryUri$parseClaim.claimName; + } catch (error) { + return res.status(400).json({ success: false, message: error.message }); + } + // parse the identifier + var isChannel = void 0, + channelName = void 0, + channelClaimId = void 0, + claimId = void 0; + try { + var _lbryUri$parseIdentif = lbryUri.parseIdentifier(params.identifier); + + isChannel = _lbryUri$parseIdentif.isChannel; + channelName = _lbryUri$parseIdentif.channelName; + channelClaimId = _lbryUri$parseIdentif.channelClaimId; + claimId = _lbryUri$parseIdentif.claimId; + } catch (error) { + return res.status(400).json({ success: false, message: error.message }); + } + if (!isChannel) { + var _flipClaimNameAndIdFo = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName); + + var _flipClaimNameAndIdFo2 = _slicedToArray(_flipClaimNameAndIdFo, 2); + + claimId = _flipClaimNameAndIdFo2[0]; + claimName = _flipClaimNameAndIdFo2[1]; + } + // log the request data for debugging + logRequestData(responseType, claimName, channelName, claimId); + // get the claim Id and then serve the asset + getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res); + }); + // route to serve the winning asset at a claim or a channel page + app.get('/:claim', function (req, res) { + var headers = req.headers, + ip = req.ip, + originalUrl = req.originalUrl, + params = req.params; + // decide if this is a show request + + var hasFileExtension = void 0; + try { + var _lbryUri$parseModifie2 = lbryUri.parseModifier(params.claim); + + hasFileExtension = _lbryUri$parseModifie2.hasFileExtension; + } catch (error) { + return res.status(400).json({ success: false, message: error.message }); + } + var responseType = determineResponseType(hasFileExtension, headers); + if (responseType !== SERVE) { + return handleShowRender(req, res); + } + // handle serve request + // send google analytics + sendGAServeEvent(headers, ip, originalUrl); + // parse the claim + var claimName = void 0; + try { + var _lbryUri$parseClaim2 = lbryUri.parseClaim(params.claim); + + claimName = _lbryUri$parseClaim2.claimName; + } catch (error) { + return res.status(400).json({ success: false, message: error.message }); + } + // log the request data for debugging + logRequestData(responseType, claimName, null, null); + // get the claim Id and then serve the asset + getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res); + }); +}; + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var logger = __webpack_require__(1); + +var _require = __webpack_require__(36), + getClaimId = _require.getClaimId, + getLocalFileRecord = _require.getLocalFileRecord; + +var _require2 = __webpack_require__(35), + handleErrorResponse = _require2.handleErrorResponse; + +var SERVE = 'SERVE'; +var SHOW = 'SHOW'; +var NO_FILE = 'NO_FILE'; +var NO_CHANNEL = 'NO_CHANNEL'; +var NO_CLAIM = 'NO_CLAIM'; + +function clientAcceptsHtml(_ref) { + var accept = _ref.accept; + + return accept && accept.match(/text\/html/); +}; + +function requestIsFromBrowser(headers) { + return headers['user-agent'] && headers['user-agent'].match(/Mozilla/); +}; + +function clientWantsAsset(_ref2) { + var accept = _ref2.accept, + range = _ref2.range; + + var imageIsWanted = accept && accept.match(/image\/.*/) && !accept.match(/text\/html/) && !accept.match(/text\/\*/); + var videoIsWanted = accept && range; + return imageIsWanted || videoIsWanted; +}; + +function isValidClaimId(claimId) { + return claimId.length === 40 && !/[^A-Za-z0-9]/g.test(claimId); +}; + +function isValidShortId(claimId) { + return claimId.length === 1; // it should really evaluate the short url itself +}; + +function isValidShortIdOrClaimId(input) { + return isValidClaimId(input) || isValidShortId(input); +}; + +function serveAssetToClient(claimId, name, res) { + return getLocalFileRecord(claimId, name).then(function (fileRecord) { + // check that a local record was found + if (fileRecord === NO_FILE) { + return res.status(307).redirect('/api/claim/get/' + name + '/' + claimId); + } + // serve the file + var filePath = fileRecord.filePath, + fileType = fileRecord.fileType; + + logger.verbose('serving file: ' + filePath); + var sendFileOptions = { + headers: { + 'X-Content-Type-Options': 'nosniff', + 'Content-Type': fileType || 'image/jpeg' + } + }; + res.status(200).sendFile(filePath, sendFileOptions); + }).catch(function (error) { + throw error; + }); +}; + +module.exports = { + getClaimIdAndServeAsset: function getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) { + // get the claim Id and then serve the asset + getClaimId(channelName, channelClaimId, claimName, claimId).then(function (fullClaimId) { + if (fullClaimId === NO_CLAIM) { + return res.status(404).json({ success: false, message: 'no claim id could be found' }); + } else if (fullClaimId === NO_CHANNEL) { + return res.status(404).json({ success: false, message: 'no channel id could be found' }); + } + serveAssetToClient(fullClaimId, claimName, res); + // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success'); + }).catch(function (error) { + handleErrorResponse(originalUrl, ip, error, res); + // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail'); + }); + }, + determineResponseType: function determineResponseType(hasFileExtension, headers) { + var responseType = void 0; + if (hasFileExtension) { + responseType = SERVE; // assume a serve request if file extension is present + if (clientAcceptsHtml(headers)) { + // if the request comes from a browser, change it to a show request + responseType = SHOW; + } + } else { + responseType = SHOW; + if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) { + // this is in case someone embeds a show url + logger.debug('Show request came from browser but wants an image/video. Changing response to serve...'); + responseType = SERVE; + } + } + return responseType; + }, + flipClaimNameAndIdForBackwardsCompatibility: function flipClaimNameAndIdForBackwardsCompatibility(identifier, name) { + // this is a patch for backwards compatability with '/name/claim_id' url format + if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) { + var tempName = name; + name = identifier; + identifier = tempName; + } + return [identifier, name]; + }, + logRequestData: function logRequestData(responseType, claimName, channelName, claimId) { + logger.debug('responseType ===', responseType); + logger.debug('claim name === ', claimName); + logger.debug('channel name ===', channelName); + logger.debug('claim id ===', claimId); + } +}; + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + +var logger = __webpack_require__(1); + +module.exports = { + REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g, + REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g, + REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/, + CHANNEL_CHAR: '@', + parseIdentifier: function parseIdentifier(identifier) { + logger.debug('parsing identifier:', identifier); + var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end) + '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end) + ); + + var _componentsRegex$exec = componentsRegex.exec(identifier).map(function (match) { + return match || null; + }), + _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4), + proto = _componentsRegex$exec2[0], + value = _componentsRegex$exec2[1], + modifierSeperator = _componentsRegex$exec2[2], + modifier = _componentsRegex$exec2[3]; + + logger.debug(proto + ', ' + value + ', ' + modifierSeperator + ', ' + modifier); + + // Validate and process name + if (!value) { + throw new Error('Check your url. No channel name provided before "' + modifierSeperator + '"'); + } + var isChannel = value.startsWith(module.exports.CHANNEL_CHAR); + var channelName = isChannel ? value : null; + var claimId = void 0; + if (isChannel) { + if (!channelName) { + throw new Error('No channel name after @.'); + } + var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL); + if (nameBadChars) { + throw new Error('Invalid characters in channel name: ' + nameBadChars.join(', ') + '.'); + } + } else { + claimId = value; + } + + // Validate and process modifier + var channelClaimId = void 0; + if (modifierSeperator) { + if (!modifier) { + throw new Error('No modifier provided after separator "' + modifierSeperator + '"'); + } + + if (modifierSeperator === ':') { + channelClaimId = modifier; + } else { + throw new Error('The "' + modifierSeperator + '" modifier is not currently supported'); + } + } + return { + isChannel: isChannel, + channelName: channelName, + channelClaimId: channelClaimId, + claimId: claimId + }; + }, + parseClaim: function parseClaim(claim) { + logger.debug('parsing name:', claim); + var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier) + '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end) + ); + + var _componentsRegex$exec3 = componentsRegex.exec(claim).map(function (match) { + return match || null; + }), + _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4), + proto = _componentsRegex$exec4[0], + claimName = _componentsRegex$exec4[1], + modifierSeperator = _componentsRegex$exec4[2], + modifier = _componentsRegex$exec4[3]; + + logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier); + + // Validate and process name + if (!claimName) { + throw new Error('No claim name provided before .'); + } + var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM); + if (nameBadChars) { + throw new Error('Invalid characters in claim name: ' + nameBadChars.join(', ') + '.'); + } + // Validate and process modifier + if (modifierSeperator) { + if (!modifier) { + throw new Error('No file extension provided after separator ' + modifierSeperator + '.'); + } + if (modifierSeperator !== '.') { + throw new Error('The ' + modifierSeperator + ' modifier is not supported in the claim name'); + } + } + // return results + return { + claimName: claimName + }; + }, + parseModifier: function parseModifier(claim) { + logger.debug('parsing modifier:', claim); + var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier) + '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end) + ); + + var _componentsRegex$exec5 = componentsRegex.exec(claim).map(function (match) { + return match || null; + }), + _componentsRegex$exec6 = _slicedToArray(_componentsRegex$exec5, 4), + proto = _componentsRegex$exec6[0], + claimName = _componentsRegex$exec6[1], + modifierSeperator = _componentsRegex$exec6[2], + modifier = _componentsRegex$exec6[3]; + + logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier); + // Validate and process modifier + var hasFileExtension = false; + if (modifierSeperator) { + hasFileExtension = true; + } + return { + hasFileExtension: hasFileExtension + }; + } +}; + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _server = __webpack_require__(38); + +var _redux = __webpack_require__(17); + +var _index = __webpack_require__(39); + +var _index2 = _interopRequireDefault(_index); + +var _reactRedux = __webpack_require__(2); + +var _reactRouterDom = __webpack_require__(4); + +var _index3 = __webpack_require__(18); + +var _index4 = _interopRequireDefault(_index3); + +var _app = __webpack_require__(43); + +var _app2 = _interopRequireDefault(_app); + +var _renderFullPage = __webpack_require__(55); + +var _renderFullPage2 = _interopRequireDefault(_renderFullPage); + +var _reduxSaga = __webpack_require__(128); + +var _reduxSaga2 = _interopRequireDefault(_reduxSaga); + +var _effects = __webpack_require__(14); + +var _show_uri = __webpack_require__(129); + +var _show = __webpack_require__(7); + +var _reactHelmet = __webpack_require__(13); + +var _reactHelmet2 = _interopRequireDefault(_reactHelmet); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var returnSagaWithParams = function returnSagaWithParams(saga, params) { + return (/*#__PURE__*/regeneratorRuntime.mark(function _callee() { + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return (0, _effects.call)(saga, params); + + case 2: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + }) + ); +}; + +module.exports = function (req, res) { + var context = {}; + + // create and apply middleware + var sagaMiddleware = (0, _reduxSaga2.default)(); + var middleware = (0, _redux.applyMiddleware)(sagaMiddleware); + + // create a new Redux store instance + var store = (0, _redux.createStore)(_index2.default, middleware); + + // create saga + var action = (0, _show.onHandleShowPageUri)(req.params); + var saga = returnSagaWithParams(_show_uri.handleShowPageUri, action); + + // run the saga middleware + sagaMiddleware.run(saga).done.then(function () { + // render component to a string + var html = (0, _server.renderToString)(_react2.default.createElement( + _reactRedux.Provider, + { store: store }, + _react2.default.createElement( + _reactRouterDom.StaticRouter, + { location: req.url, context: context }, + _react2.default.createElement( + _index4.default, + null, + _react2.default.createElement(_app2.default, null) + ) + ) + )); + + // get head tags from helmet + var helmet = _reactHelmet2.default.renderStatic(); + + // check for a redirect + if (context.url) { + return res.redirect(301, context.url); + } + + // get the initial state from our Redux store + var preloadedState = store.getState(); + + // send the rendered page back to the client + res.send((0, _renderFullPage2.default)(helmet, html, preloadedState)); + }); +}; + +/***/ }), +/* 128 */ +/***/ (function(module, exports) { + +module.exports = require("redux-saga"); + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.handleShowPageUri = handleShowPageUri; +exports.watchHandleShowPageUri = watchHandleShowPageUri; + +var _effects = __webpack_require__(14); + +var _show_action_types = __webpack_require__(11); + +var actions = _interopRequireWildcard(_show_action_types); + +var _show = __webpack_require__(7); + +var _show_asset = __webpack_require__(130); + +var _show_channel = __webpack_require__(132); + +var _lbryUri = __webpack_require__(21); + +var _lbryUri2 = _interopRequireDefault(_lbryUri); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +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; } } + +var _marked = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateIdentifierAndClaim), + _marked2 = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateClaimOnly), + _marked3 = /*#__PURE__*/regeneratorRuntime.mark(handleShowPageUri), + _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchHandleShowPageUri); + +function parseAndUpdateIdentifierAndClaim(modifier, claim) { + var isChannel, channelName, channelClaimId, claimId, claimName, extension, _lbryUri$parseIdentif, _lbryUri$parseClaim; + + return regeneratorRuntime.wrap(function parseAndUpdateIdentifierAndClaim$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + // this is a request for an asset + // claim will be an asset claim + // the identifier could be a channel or a claim id + isChannel = void 0, channelName = void 0, channelClaimId = void 0, claimId = void 0, claimName = void 0, extension = void 0; + _context.prev = 1; + _lbryUri$parseIdentif = _lbryUri2.default.parseIdentifier(modifier); + isChannel = _lbryUri$parseIdentif.isChannel; + channelName = _lbryUri$parseIdentif.channelName; + channelClaimId = _lbryUri$parseIdentif.channelClaimId; + claimId = _lbryUri$parseIdentif.claimId; + _lbryUri$parseClaim = _lbryUri2.default.parseClaim(claim); + claimName = _lbryUri$parseClaim.claimName; + extension = _lbryUri$parseClaim.extension; + _context.next = 17; + break; + + case 12: + _context.prev = 12; + _context.t0 = _context['catch'](1); + _context.next = 16; + return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message)); + + case 16: + return _context.abrupt('return', _context.sent); + + case 17: + if (!isChannel) { + _context.next = 21; + break; + } + + _context.next = 20; + return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, channelName, channelClaimId, extension)); + + case 20: + return _context.abrupt('return', _context.sent); + + case 21: + ; + _context.next = 24; + return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, claimId, null, null, extension)); + + case 24: + case 'end': + return _context.stop(); + } + } + }, _marked, this, [[1, 12]]); +} +function parseAndUpdateClaimOnly(claim) { + var isChannel, channelName, channelClaimId, _lbryUri$parseIdentif2, claimName, extension, _lbryUri$parseClaim2; + + return regeneratorRuntime.wrap(function parseAndUpdateClaimOnly$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + // this could be a request for an asset or a channel page + // claim could be an asset claim or a channel claim + isChannel = void 0, channelName = void 0, channelClaimId = void 0; + _context2.prev = 1; + _lbryUri$parseIdentif2 = _lbryUri2.default.parseIdentifier(claim); + isChannel = _lbryUri$parseIdentif2.isChannel; + channelName = _lbryUri$parseIdentif2.channelName; + channelClaimId = _lbryUri$parseIdentif2.channelClaimId; + _context2.next = 13; + break; + + case 8: + _context2.prev = 8; + _context2.t0 = _context2['catch'](1); + _context2.next = 12; + return (0, _effects.put)((0, _show.onRequestError)(_context2.t0.message)); + + case 12: + return _context2.abrupt('return', _context2.sent); + + case 13: + if (!isChannel) { + _context2.next = 17; + break; + } + + _context2.next = 16; + return (0, _effects.call)(_show_channel.newChannelRequest, (0, _show.onNewChannelRequest)(channelName, channelClaimId)); + + case 16: + return _context2.abrupt('return', _context2.sent); + + case 17: + // if not for a channel, parse the claim request + claimName = void 0, extension = void 0; + _context2.prev = 18; + _lbryUri$parseClaim2 = _lbryUri2.default.parseClaim(claim); + claimName = _lbryUri$parseClaim2.claimName; + extension = _lbryUri$parseClaim2.extension; + _context2.next = 29; + break; + + case 24: + _context2.prev = 24; + _context2.t1 = _context2['catch'](18); + _context2.next = 28; + return (0, _effects.put)((0, _show.onRequestError)(_context2.t1.message)); + + case 28: + return _context2.abrupt('return', _context2.sent); + + case 29: + _context2.next = 31; + return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, null, null, extension)); + + case 31: + case 'end': + return _context2.stop(); + } + } + }, _marked2, this, [[1, 8], [18, 24]]); +} + +function handleShowPageUri(action) { + var _action$data, identifier, claim; + + return regeneratorRuntime.wrap(function handleShowPageUri$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _action$data = action.data, identifier = _action$data.identifier, claim = _action$data.claim; + + if (!identifier) { + _context3.next = 5; + break; + } + + _context3.next = 4; + return (0, _effects.call)(parseAndUpdateIdentifierAndClaim, identifier, claim); + + case 4: + return _context3.abrupt('return', _context3.sent); + + case 5: + _context3.next = 7; + return (0, _effects.call)(parseAndUpdateClaimOnly, claim); + + case 7: + case 'end': + return _context3.stop(); + } + } + }, _marked3, this); +}; + +function watchHandleShowPageUri() { + return regeneratorRuntime.wrap(function watchHandleShowPageUri$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return (0, _effects.takeLatest)(actions.HANDLE_SHOW_URI, handleShowPageUri); + + case 2: + case 'end': + return _context4.stop(); + } + } + }, _marked4, this); +}; + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.newAssetRequest = newAssetRequest; +exports.watchNewAssetRequest = watchNewAssetRequest; + +var _effects = __webpack_require__(14); + +var _show_action_types = __webpack_require__(11); + +var actions = _interopRequireWildcard(_show_action_types); + +var _show = __webpack_require__(7); + +var _assetApi = __webpack_require__(131); + +var _show2 = __webpack_require__(12); + +var _site = __webpack_require__(56); + +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; } } + +var _marked = /*#__PURE__*/regeneratorRuntime.mark(newAssetRequest), + _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewAssetRequest); + +function newAssetRequest(action) { + var _action$data, requestType, requestId, name, modifier, state, host, longId, _ref, assetKey, shortId, _ref2, claimData, _ref3; + + return regeneratorRuntime.wrap(function newAssetRequest$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, name = _action$data.name, modifier = _action$data.modifier; + // put an action to update the request in redux + + _context.next = 3; + return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId)); + + case 3: + _context.next = 5; + return (0, _effects.select)(_show2.selectShowState); + + case 5: + state = _context.sent; + _context.next = 8; + return (0, _effects.select)(_site.selectSiteHost); + + case 8: + host = _context.sent; + + if (!state.requestList[requestId]) { + _context.next = 11; + break; + } + + return _context.abrupt('return', null); + + case 11: + // get long id && add request to request list + longId = void 0; + _context.prev = 12; + _context.next = 15; + return (0, _effects.call)(_assetApi.getLongClaimId, host, name, modifier); + + case 15: + _ref = _context.sent; + longId = _ref.data; + _context.next = 24; + break; + + case 19: + _context.prev = 19; + _context.t0 = _context['catch'](12); + _context.next = 23; + return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message)); + + case 23: + return _context.abrupt('return', _context.sent); + + case 24: + assetKey = 'a#' + name + '#' + longId; + _context.next = 27; + return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, assetKey)); + + case 27: + if (!state.assetList[assetKey]) { + _context.next = 29; + break; + } + + return _context.abrupt('return', null); + + case 29: + // get short Id + shortId = void 0; + _context.prev = 30; + _context.next = 33; + return (0, _effects.call)(_assetApi.getShortId, host, name, longId); + + case 33: + _ref2 = _context.sent; + shortId = _ref2.data; + _context.next = 42; + break; + + case 37: + _context.prev = 37; + _context.t1 = _context['catch'](30); + _context.next = 41; + return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message)); + + case 41: + return _context.abrupt('return', _context.sent); + + case 42: + // get asset claim data + claimData = void 0; + _context.prev = 43; + _context.next = 46; + return (0, _effects.call)(_assetApi.getClaimData, host, name, longId); + + case 46: + _ref3 = _context.sent; + claimData = _ref3.data; + _context.next = 55; + break; + + case 50: + _context.prev = 50; + _context.t2 = _context['catch'](43); + _context.next = 54; + return (0, _effects.put)((0, _show.onRequestError)(_context.t2.message)); + + case 54: + return _context.abrupt('return', _context.sent); + + case 55: + _context.next = 57; + return (0, _effects.put)((0, _show.addAssetToAssetList)(assetKey, null, name, longId, shortId, claimData)); + + case 57: + _context.next = 59; + return (0, _effects.put)((0, _show.onRequestError)(null)); + + case 59: + case 'end': + return _context.stop(); + } + } + }, _marked, this, [[12, 19], [30, 37], [43, 50]]); +}; + +function watchNewAssetRequest() { + return regeneratorRuntime.wrap(function watchNewAssetRequest$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return (0, _effects.takeLatest)(actions.ASSET_REQUEST_NEW, newAssetRequest); + + case 2: + case 'end': + return _context2.stop(); + } + } + }, _marked2, this); +}; + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getLongClaimId = getLongClaimId; +exports.getShortId = getShortId; +exports.getClaimData = getClaimData; + +var _request = __webpack_require__(6); + +var _request2 = _interopRequireDefault(_request); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getLongClaimId(host, name, modifier) { + var body = {}; + // create request params + if (modifier) { + if (modifier.id) { + body['claimId'] = modifier.id; + } else { + body['channelName'] = modifier.channel.name; + body['channelClaimId'] = modifier.channel.id; + } + } + body['claimName'] = name; + var params = { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(body) + }; + // create url + var url = host + '/api/claim/long-id'; + // return the request promise + return (0, _request2.default)(url, params); +}; + +function getShortId(host, name, claimId) { + var url = host + '/api/claim/short-id/' + claimId + '/' + name; + return (0, _request2.default)(url); +}; + +function getClaimData(host, name, claimId) { + var url = host + '/api/claim/data/' + name + '/' + claimId; + return (0, _request2.default)(url); +}; + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.newChannelRequest = newChannelRequest; +exports.watchNewChannelRequest = watchNewChannelRequest; +exports.watchUpdateChannelClaims = watchUpdateChannelClaims; + +var _effects = __webpack_require__(14); + +var _show_action_types = __webpack_require__(11); + +var actions = _interopRequireWildcard(_show_action_types); + +var _show = __webpack_require__(7); + +var _channelApi = __webpack_require__(133); + +var _show2 = __webpack_require__(12); + +var _site = __webpack_require__(56); + +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; } } + +var _marked = /*#__PURE__*/regeneratorRuntime.mark(newChannelRequest), + _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewChannelRequest), + _marked3 = /*#__PURE__*/regeneratorRuntime.mark(getNewClaimsAndUpdateChannel), + _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchUpdateChannelClaims); + +function newChannelRequest(action) { + var _action$data, requestType, requestId, channelName, channelId, state, host, longId, shortId, _ref, _ref$data, channelKey, claimsData, _ref2; + + return regeneratorRuntime.wrap(function newChannelRequest$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, channelName = _action$data.channelName, channelId = _action$data.channelId; + // put an action to update the request in redux + + _context.next = 3; + return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId)); + + case 3: + _context.next = 5; + return (0, _effects.select)(_show2.selectShowState); + + case 5: + state = _context.sent; + _context.next = 8; + return (0, _effects.select)(_site.selectSiteHost); + + case 8: + host = _context.sent; + + if (!state.requestList[requestId]) { + _context.next = 11; + break; + } + + return _context.abrupt('return', null); + + case 11: + // get channel long id + longId = void 0, shortId = void 0; + _context.prev = 12; + _context.next = 15; + return (0, _effects.call)(_channelApi.getChannelData, host, channelName, channelId); + + case 15: + _ref = _context.sent; + _ref$data = _ref.data; + longId = _ref$data.longChannelClaimId; + shortId = _ref$data.shortChannelClaimId; + _context.next = 26; + break; + + case 21: + _context.prev = 21; + _context.t0 = _context['catch'](12); + _context.next = 25; + return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message)); + + case 25: + return _context.abrupt('return', _context.sent); + + case 26: + // store the request in the channel requests list + channelKey = 'c#' + channelName + '#' + longId; + _context.next = 29; + return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, channelKey)); + + case 29: + if (!state.channelList[channelKey]) { + _context.next = 31; + break; + } + + return _context.abrupt('return', null); + + case 31: + // get channel claims data + claimsData = void 0; + _context.prev = 32; + _context.next = 35; + return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, channelName, 1); + + case 35: + _ref2 = _context.sent; + claimsData = _ref2.data; + _context.next = 44; + break; + + case 39: + _context.prev = 39; + _context.t1 = _context['catch'](32); + _context.next = 43; + return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message)); + + case 43: + return _context.abrupt('return', _context.sent); + + case 44: + _context.next = 46; + return (0, _effects.put)((0, _show.addNewChannelToChannelList)(channelKey, channelName, shortId, longId, claimsData)); + + case 46: + _context.next = 48; + return (0, _effects.put)((0, _show.onRequestError)(null)); + + case 48: + case 'end': + return _context.stop(); + } + } + }, _marked, this, [[12, 21], [32, 39]]); +} + +function watchNewChannelRequest() { + return regeneratorRuntime.wrap(function watchNewChannelRequest$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return (0, _effects.takeLatest)(actions.CHANNEL_REQUEST_NEW, newChannelRequest); + + case 2: + case 'end': + return _context2.stop(); + } + } + }, _marked2, this); +}; + +function getNewClaimsAndUpdateChannel(action) { + var _action$data2, channelKey, name, longId, page, host, claimsData, _ref3; + + return regeneratorRuntime.wrap(function getNewClaimsAndUpdateChannel$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _action$data2 = action.data, channelKey = _action$data2.channelKey, name = _action$data2.name, longId = _action$data2.longId, page = _action$data2.page; + _context3.next = 3; + return (0, _effects.select)(_site.selectSiteHost); + + case 3: + host = _context3.sent; + claimsData = void 0; + _context3.prev = 5; + _context3.next = 8; + return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, name, page); + + case 8: + _ref3 = _context3.sent; + claimsData = _ref3.data; + _context3.next = 17; + break; + + case 12: + _context3.prev = 12; + _context3.t0 = _context3['catch'](5); + _context3.next = 16; + return (0, _effects.put)((0, _show.onRequestError)(_context3.t0.message)); + + case 16: + return _context3.abrupt('return', _context3.sent); + + case 17: + _context3.next = 19; + return (0, _effects.put)((0, _show.updateChannelClaims)(channelKey, claimsData)); + + case 19: + case 'end': + return _context3.stop(); + } + } + }, _marked3, this, [[5, 12]]); +} + +function watchUpdateChannelClaims() { + return regeneratorRuntime.wrap(function watchUpdateChannelClaims$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return (0, _effects.takeLatest)(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel); + + case 2: + case 'end': + return _context4.stop(); + } + } + }, _marked4, this); +} + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getChannelData = getChannelData; +exports.getChannelClaims = getChannelClaims; + +var _request = __webpack_require__(6); + +var _request2 = _interopRequireDefault(_request); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getChannelData(host, id, name) { + if (!id) id = 'none'; + var url = host + '/api/channel/data/' + name + '/' + id; + return (0, _request2.default)(url); +}; + +function getChannelClaims(host, longId, name, page) { + if (!page) page = 1; + var url = host + '/api/channel/claims/' + name + '/' + longId + '/' + page; + return (0, _request2.default)(url); +}; + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var handlePageRender = __webpack_require__(37); + +module.exports = function (app) { + // a catch-all route if someone visits a page that does not exist + app.use('*', function (req, res) { + // send response + handlePageRender(req, res); + }); +}; + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _require = __webpack_require__(136), + logLevel = _require.logLevel; + +module.exports = function (winston) { + // configure + winston.configure({ + transports: [new winston.transports.Console({ + level: logLevel, + timestamp: false, + colorize: true, + prettyPrint: true, + handleExceptions: true, + humanReadableUnhandledException: true + })] + }); + // test all the log levels + winston.error('Level 0'); + winston.warn('Level 1'); + winston.info('Level 2'); + winston.verbose('Level 3'); + winston.debug('Level 4'); + winston.silly('Level 5'); +}; + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var loggerConfig = { + logLevel: 'debug' // options: silly, debug, verbose, info +}; + +module.exports = loggerConfig; + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var winstonSlackWebHook = __webpack_require__(138).SlackWebHook; +var slackConfig = __webpack_require__(30); + +module.exports = function (winston) { + var slackWebHook = slackConfig.slackWebHook, + slackErrorChannel = slackConfig.slackErrorChannel, + slackInfoChannel = slackConfig.slackInfoChannel; + + if (slackWebHook) { + // add a transport for errors to slack + if (slackErrorChannel) { + winston.add(winstonSlackWebHook, { + name: 'slack-errors-transport', + level: 'warn', + webhookUrl: slackWebHook, + channel: slackErrorChannel, + username: 'spee.ch', + iconEmoji: ':face_with_head_bandage:' + }); + }; + if (slackInfoChannel) { + winston.add(winstonSlackWebHook, { + name: 'slack-info-transport', + level: 'info', + webhookUrl: slackWebHook, + channel: slackInfoChannel, + username: 'spee.ch', + iconEmoji: ':nerd_face:' + }); + }; + // send test message + winston.error('Slack "error" logging is online.'); + winston.info('Slack "info" logging is online.'); + } else { + winston.warn('Slack logging is not enabled because no slackWebHook config var provided.'); + } +}; + +/***/ }), +/* 138 */ +/***/ (function(module, exports) { + +module.exports = require("winston-slack-webhook"); + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ActiveStatusBar = __webpack_require__(50); + +var _ActiveStatusBar2 = _interopRequireDefault(_ActiveStatusBar); + +var _AssetPreview = __webpack_require__(54); + +var _AssetPreview2 = _interopRequireDefault(_AssetPreview); + +var _ExpandingTextArea = __webpack_require__(140); + +var _ExpandingTextArea2 = _interopRequireDefault(_ExpandingTextArea); + +var _GAListener = __webpack_require__(18); + +var _GAListener2 = _interopRequireDefault(_GAListener); + +var _InactiveStatusBar = __webpack_require__(51); + +var _InactiveStatusBar2 = _interopRequireDefault(_InactiveStatusBar); + +var _Logo = __webpack_require__(48); + +var _Logo2 = _interopRequireDefault(_Logo); + +var _NavBarChannelOptionsDropdown = __webpack_require__(49); + +var _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown); + +var _ProgressBar = __webpack_require__(26); + +var _ProgressBar2 = _interopRequireDefault(_ProgressBar); + +var _PublishPreview = __webpack_require__(141); + +var _PublishPreview2 = _interopRequireDefault(_PublishPreview); + +var _PublishUrlMiddleDisplay = __webpack_require__(142); + +var _PublishUrlMiddleDisplay2 = _interopRequireDefault(_PublishUrlMiddleDisplay); + +var _SEO = __webpack_require__(9); + +var _SEO2 = _interopRequireDefault(_SEO); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = { + ActiveStatusBar: _ActiveStatusBar2.default, + AssetPreview: _AssetPreview2.default, + ExpandingTextArea: _ExpandingTextArea2.default, + GAListener: _GAListener2.default, + InactiveStatusBar: _InactiveStatusBar2.default, + Logo: _Logo2.default, + NavBarChannelOptionsDropdown: _NavBarChannelOptionsDropdown2.default, + ProgressBar: _ProgressBar2.default, + PublishPreview: _PublishPreview2.default, + PublishUrlMiddleDisplay: _PublishUrlMiddleDisplay2.default, + SEO: _SEO2.default +}; + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(10); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var ExpandingTextarea = function (_Component) { + _inherits(ExpandingTextarea, _Component); + + function ExpandingTextarea(props) { + _classCallCheck(this, ExpandingTextarea); + + var _this = _possibleConstructorReturn(this, (ExpandingTextarea.__proto__ || Object.getPrototypeOf(ExpandingTextarea)).call(this, props)); + + _this._handleChange = _this._handleChange.bind(_this); + return _this; + } + + _createClass(ExpandingTextarea, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.adjustTextarea({}); + } + }, { + key: '_handleChange', + value: function _handleChange(event) { + var onChange = this.props.onChange; + + if (onChange) onChange(event); + this.adjustTextarea(event); + } + }, { + key: 'adjustTextarea', + value: function adjustTextarea(_ref) { + var _ref$target = _ref.target, + target = _ref$target === undefined ? this.el : _ref$target; + + target.style.height = 0; + target.style.height = target.scrollHeight + 'px'; + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var rest = _objectWithoutProperties(this.props, []); + + return _react2.default.createElement('textarea', _extends({}, rest, { + ref: function ref(x) { + return _this2.el = x; + }, + onChange: this._handleChange + })); + } + }]); + + return ExpandingTextarea; +}(_react.Component); + +ExpandingTextarea.propTypes = { + onChange: _propTypes2.default.func +}; + +exports.default = ExpandingTextarea; + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(10); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var PublishPreview = function (_React$Component) { + _inherits(PublishPreview, _React$Component); + + function PublishPreview(props) { + _classCallCheck(this, PublishPreview); + + var _this = _possibleConstructorReturn(this, (PublishPreview.__proto__ || Object.getPrototypeOf(PublishPreview)).call(this, props)); + + _this.state = { + imgSource: '', + defaultThumbnail: '/assets/img/video_thumb_default.png' + }; + return _this; + } + + _createClass(PublishPreview, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setPreviewImageSource(this.props.file); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(newProps) { + if (newProps.file !== this.props.file) { + this.setPreviewImageSource(newProps.file); + } + if (newProps.thumbnail !== this.props.thumbnail) { + if (newProps.thumbnail) { + this.setPreviewImageSourceFromFile(newProps.thumbnail); + } else { + this.setState({ imgSource: this.state.defaultThumbnail }); + } + } + } + }, { + key: 'setPreviewImageSourceFromFile', + value: function setPreviewImageSourceFromFile(file) { + var _this2 = this; + + var previewReader = new FileReader(); + previewReader.readAsDataURL(file); + previewReader.onloadend = function () { + _this2.setState({ imgSource: previewReader.result }); + }; + } + }, { + key: 'setPreviewImageSource', + value: function setPreviewImageSource(file) { + if (file.type !== 'video/mp4') { + this.setPreviewImageSourceFromFile(file); + } else { + if (this.props.thumbnail) { + this.setPreviewImageSourceFromFile(this.props.thumbnail); + } + this.setState({ imgSource: this.state.defaultThumbnail }); + } + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement('img', { + id: 'dropzone-preview', + src: this.state.imgSource, + className: this.props.dimPreview ? 'dim' : '', + alt: 'publish preview' + }); + } + }]); + + return PublishPreview; +}(_react2.default.Component); + +; + +PublishPreview.propTypes = { + dimPreview: _propTypes2.default.bool.isRequired, + file: _propTypes2.default.object.isRequired, + thumbnail: _propTypes2.default.object +}; + +exports.default = PublishPreview; + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(10); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function UrlMiddle(_ref) { + var publishInChannel = _ref.publishInChannel, + selectedChannel = _ref.selectedChannel, + loggedInChannelName = _ref.loggedInChannelName, + loggedInChannelShortId = _ref.loggedInChannelShortId; + + if (publishInChannel) { + if (selectedChannel === loggedInChannelName) { + return _react2.default.createElement( + 'span', + { id: 'url-channel', className: 'url-text--secondary' }, + loggedInChannelName, + ':', + loggedInChannelShortId, + ' /' + ); + } + return _react2.default.createElement( + 'span', + { id: 'url-channel-placeholder', className: 'url-text--secondary tooltip' }, + '@channel', + _react2.default.createElement( + 'span', + { + className: 'tooltip-text' }, + 'Select a channel below' + ), + ' /' + ); + } + return _react2.default.createElement( + 'span', + { id: 'url-no-channel-placeholder', className: 'url-text--secondary tooltip' }, + 'xyz', + _react2.default.createElement( + 'span', + { className: 'tooltip-text' }, + 'This will be a random id' + ), + ' /' + ); +} + +UrlMiddle.propTypes = { + publishInChannel: _propTypes2.default.bool.isRequired, + loggedInChannelName: _propTypes2.default.string, + loggedInChannelShortId: _propTypes2.default.string +}; + +exports.default = UrlMiddle; + +/***/ }) +/******/ ]); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgYWUxN2Q0NzI0MDkyZjczMjk2ZDciLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIFwicmVhY3RcIiIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJ3aW5zdG9uXCIiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIFwicmVhY3QtcmVkdXhcIiIsIndlYnBhY2s6Ly8vLi9jb25maWcvc2l0ZUNvbmZpZy5qcyIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJyZWFjdC1yb3V0ZXIt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ICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgaGFzU2lnbmF0dXJlOiB7XG4gICAgICAgIHR5cGUgICA6IEJPT0xFQU4sXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgaGVpZ2h0OiB7XG4gICAgICAgIHR5cGUgICA6IElOVEVHRVIsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgaGV4OiB7XG4gICAgICAgIHR5cGUgICA6IFRFWFQoJ2xvbmcnKSxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBuYW1lOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBub3V0OiB7XG4gICAgICAgIHR5cGUgICA6IElOVEVHRVIsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgdHhpZDoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgdmFsaWRBdEhlaWdodDoge1xuICAgICAgICB0eXBlICAgOiBJTlRFR0VSLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIG91dHBvaW50OiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICB2YWx1ZVZlcnNpb246IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGNsYWltVHlwZToge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgY2VydGlmaWNhdGVWZXJzaW9uOiB7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mF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgY2xhaW1TZXF1ZW5jZToge1xuICAgICAgICB0eXBlICAgOiBJTlRFR0VSLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGRlY29kZWRDbGFpbToge1xuICAgICAgICB0eXBlICAgOiBCT09MRUFOLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGRlcHRoOiB7XG4gICAgICAgIHR5cGUgICA6IElOVEVHRVIsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgZWZmZWN0aXZlQW1vdW50OiB7XG4gICAgICAgIHR5cGUgICA6IERFQ0lNQUwoMTksIDgpLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGhhc1NpZ25hdHVyZToge1xuICAgICAgICB0eXBlICAgOiBCT09MRUFOLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGhlaWdodDoge1xuICAgICAgICB0eXBlICAgOiBJTlRFR0VSLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGhleDoge1xuICAgICAgICB0eXBlICAgOiBURVhUKCdsb25nJyksXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgbmFtZToge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgbm91dDoge1xuICAgICAgICB0eXBlICAgOiBJTlRFR0VSLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIHR4aWQ6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIHZhbGlkQXRIZWlnaHQ6IHtcbiAgICAgICAgdHlwZSAgIDogSU5URUdFUixcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBvdXRwb2ludDoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgY2xhaW1UeXBlOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBjZXJ0aWZpY2F0ZUlkOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBhdXRob3I6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGRlc2NyaXB0aW9uOiB7XG4gICAgICAgIHR5cGUgICA6IFRFWFQoJ2xvbmcnKSxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBsYW5ndWFnZToge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgbGljZW5zZToge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgbGljZW5zZVVybDoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgbnNmdzoge1xuICAgICAgICB0eXBlICAgOiBCT09MRUFOLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIHByZXZpZXc6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIHRodW1ibmFpbDoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgdGl0bGU6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIG1ldGFkYXRhVmVyc2lvbjoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgY29udGVudFR5cGU6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIHNvdXJjZToge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgc291cmNlVHlwZToge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgc291cmNlVmVyc2lvbjoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgc3RyZWFtVmVyc2lvbjoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgdmFsdWVWZXJzaW9uOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBjaGFubmVsTmFtZToge1xuICAgICAgICB0eXBlICAgICA6IFNUUklORyxcbiAgICAgICAgYWxsb3dOdWxsOiB0cnVlLFxuICAgICAgICBkZWZhdWx0ICA6IG51bGwsXG4gICAgICB9LFxuICAgIH0sXG4gICAge1xuICAgICAgZnJlZXplVGFib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VybWluZVRodW1ibmFpbChjbGFpbS50aHVtYm5haWwsIGRlZmF1bHRUaHVtYm5haWwpO1xuICAgICAgICAgICAgICAgIHJldHVybiBjbGFpbTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKGNoYW5uZWxDbGFpbXNBcnJheSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgIH0pO1xuICAgIH0pO1xuICB9O1xuXG4gIENsYWltLmdldENsYWltSWRCeUxvbmdDaGFubmVsSWQgPSBmdW5jdGlvbiAoY2hhbm5lbENsYWltSWQsIGNsYWltTmFtZSkge1xuICAgIGxvZ2dlci5kZWJ1ZyhgZmluZGluZyBjbGFpbSBpZCBmb3IgY2xhaW0gJHtjbGFpbU5hbWV9IGZyb20gY2hhbm5lbCAke2NoYW5uZWxDbGFpbUlkfWApO1xuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICB0aGlzXG4gICAgICAgIC5maW5kQWxsKHtcbiAgICAgICAgICB3aGVyZTogeyBuYW1lOiBjbGFpbU5hbWUsIGNlcnRpZmljYXRlSWQ6IGNoYW5uZWxDbGFpbUlkIH0sXG4gICAgICAgICAgb3JkZXI6IFtbJ2lkJywgJ0FTQyddXSxcbiAgICAgICAgfSlcbiAgICAgICAgLnRoZW4ocmVzdWx0ID0+IHtcbiAgICAgICAgICBzd2l0Y2ggKHJlc3VsdC5sZW5ndGgpIHtcbiAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUobnVsbCk7XG4gICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKHJlc3VsdFswXS5jbGFpbUlkKTtcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgIGxvZ2dlci5lcnJvcihgJHtyZXN1bHQubGVuZ3RofSByZWNvcmRzIGZvdW5kIGZvciBcIiR7Y2xhaW1OYW1lfVwiIGluIGNoYW5uZWwgXCIke2NoYW5uZWxDbGFpbUlkfVwiYCk7XG4gICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKHJlc3VsdFswXS5jbGFpbUlkKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgICAgIC5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG4gIH07XG5cbiAgQ2xhaW0uZ2V0TG9uZ0NsYWltSWRGcm9tU2hvcnRDbGFpbUlkID0gZnVuY3Rpb24gKG5hbWUsIHNob3J0SWQpIHtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgdGhpc1xuICAgICAgICAuZmluZEFsbCh7XG4gICAgICAgICAgd2hlcmU6IHtcbiAgICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgICBjbGFpbUlkOiB7XG4gICAgICAgICAgICAgICRsaWtlOiBgJHtzaG9ydElkfSVgLFxuICAgICAgICAgICAgfX0sXG4gICAgICAgICAgb3JkZXI6IFtbJ2hlaWdodCcsICdBU0MnXV0sXG4gICAgICAgIH0pXG4gICAgICAgIC50aGVuKHJlc3VsdCA9PiB7XG4gICAgICAgICAgc3dpdGNoIChyZXN1bHQubGVuZ3RoKSB7XG4gICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKG51bGwpO1xuICAgICAgICAgICAgZGVmYXVsdDogLy8gbm90ZSByZXN1bHRzIG11c3QgYmUgc29ydGVkXG4gICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKHJlc3VsdFswXS5jbGFpbUlkKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgICAgIC5jYXRjaChlcnJv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ZGVscy9jbGFpbS5qcyIsIm1vZHVsZS5leHBvcnRzID0gKHNlcXVlbGl6ZSwgeyBTVFJJTkcsIEJPT0xFQU4sIElOVEVHRVIgfSkgPT4ge1xuICBjb25zdCBGaWxlID0gc2VxdWVsaXplLmRlZmluZShcbiAgICAnRmlsZScsXG4gICAge1xuICAgICAgbmFtZToge1xuICAgICAgICB0eXBlICAgICA6IFNUUklORyxcbiAgICAgICAgYWxsb3dOdWxsOiBmYWxzZSxcbiAgICAgIH0sXG4gICAgICBjbGFpbUlkOiB7XG4gICAgICAgIHR5cGUgICAgIDogU1RSSU5HLFxuICAgICAgICBhbGxvd051bGw6IGZhbHNlLFxuICAgICAgfSxcbiAgICAgIGFkZHJlc3M6IHtcbiAgICAgICAgdHlwZSAgICAgOiBTVFJJTkcsXG4gICAgICAgIGFsbG93TnVsbDogZmFsc2UsXG4gICAgICB9LFxuICAgICAgb3V0cG9pbnQ6IHtcbiAgICAgICAgdHlwZSAgICAgOiBTVFJJTkcsXG4gICAgICAgIGFsbG93TnVsbDogZmFsc2UsXG4gICAgICB9LFxuICAgICAgaGVpZ2h0OiB7XG4gICAgICAgIHR5cGUgICAgIDogSU5URUdFUixcbiAgICAgICAgYWxsb3dOdWxsOiBmYWxzZSxcbiAgICAgICAgZGVmYXVsdCAgOiAwLFxuICAgICAgfSxcbiAgICAgIGZpbGVOYW1lOiB7XG4gICAgICAgIHR5cGUgICAgIDogU1RSSU5HLFxuICAgICAgICBhbGxvd051bGw6IGZhbHNlLFxuICAgICAgfSxcbiAgICAgIGZpbGVQYXRoOiB7XG4gICAgICAgIHR5cGUgICAgIDogU1RSSU5HLFxuICAgICAgICBhbGxvd051bGw6IGZhbHNlLFxuICAgICAgfSxcbiAgICAgIGZpbGVUeXBlOiB7XG4gICAgICAgIHR5cGU6IFNUUklORyxcbiAgICAgIH0sXG4gICAgICBuc2Z3OiB7XG4gICAgICAgIHR5cGUgICAgICAgIDogQk9PTEVBTixcbiAgICAgICAgYWxsb3dO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XG4gICAgICAgIHsoc3RhdHVzID09PSBBVkFJTEFCTEUpICYmXG4gICAgICAgICgoKSA9PiB7XG4gICAgICAgICAgc3dpdGNoIChjb250ZW50VHlwZSkge1xuICAgICAgICAgICAgY2FzZSAnaW1hZ2UvanBlZyc6XG4gICAgICAgICAgICBjYXNlICdpbWFnZS9qcGcnOlxuICAgICAgICAgICAgY2FzZSAnaW1hZ2UvcG5nJzpcbiAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8aW1nXG4gICAgICAgICAgICAgICAgICBjbGFzc05hbWU9J2Fzc2V0J1xuICAgICAgICAgICAgICAgICAgc3JjPXtgLyR7Y2xhaW1JZH0vJHtuYW1lfS4ke2ZpbGVFeHR9YH1cbiAgICAgICAgICAgICAgICAgIGFsdD17bmFtZX0gLz5cbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNhc2UgJ2ltYWdlL2dpZic6XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGltZ1xuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPSdhc3NldCdcbiAgICAgICAgICAgICAgICAgIHNyYz17YC8ke2NsYWltSWR9LyR7bmFtZX0uJHtmaWxlRXh0fWB9XG4gICAgICAgICAgICAgICAgICBhbHQ9e25hbWV9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNhc2UgJ3ZpZGVvL21wNCc6XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPHZpZGVvIGNsYXNzTmFtZT0nYXNzZXQgdmlkZW8nIGNvbnRyb2xzIHBvc3Rlcj17dGh1bWJuYWlsfT5cbiAgICAgICAgICAgICAgICAgIDxzb3VyY2VcbiAgICAgICAgICAgICAgICAgICAgc3JjPXtgLyR7Y2xhaW1JZH0vJHtuYW1lfS4ke2ZpbGVFeHR9YH1cbiAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgIC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ygoKSA9PiB7XG4gICAgICAgICAgc3dpdGNoIChjb250ZW50VHlwZSkge1xuICAgICAgICAgICAgY2FzZSAnaW1hZ2UvanBlZyc6XG4gICAgICAgICAgICBjYXNlICdpbWFnZS9qcGcnOlxuICAgICAgICAgICAgY2FzZSAnaW1hZ2UvcG5nJzpcbiAgICAgICAgICAgIGNhc2UgJ2ltYWdlL2dpZic6XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGltZ1xuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXsnYXNzZXQtcHJldmlldyd9XG4gICAgICAgICAgICAgICAgICBzcmM9e2RpcmVjdFNvdXJjZUxpbmt9XG4gICAgICAgICAgICAgICAgICBhbHQ9e25hbWV9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNhc2UgJ3ZpZGVvL21wNCc6XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGltZ1xuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXsnYXNzZXQtcHJldmlldyB2aWRlbyd9XG4gICAgICAgICAgICAgICAgICBzcmM9e3RodW1ibmFpbCB8fCBkZWZhdWx0VGh1bWJuYWlsfVxuICAgICAgICAgICAgICAgICAgYWx0PXtuYW1lfVxuICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxwPnVuc3VwcG9ydGVkIGZpbGUgdHlwZTwvcD5cbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pKCl9XG4gICAgICA8L0xpbms+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBBc3NldFByZXZpZXc7XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9jbGllbnQvY29t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zwvc3Bhbj5cbiAgKTtcbn1cblxuVXJsTWlkZGxlLnByb3BUeXBlcyA9IHtcbiAgcHVibGlzaEluQ2hhbm5lbCAgICAgIDogUHJvcFR5cGVzLmJvb2wuaXNSZXF1aXJlZCxcbiAgbG9nZ2VkSW5DaGFubmVsTmFtZSAgIDogUHJvcFR5cGVzLnN0cmluZyxcbiAgbG9nZ2VkSW5DaGFubmVsU2hvcnRJZDogUHJvcFR5cGVzLnN0cmluZyxcbn07XG5cbmV4cG9ydCBkZWZhdWx0IFVybE1pZGRsZTtcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL2NsaWVudC9jb21wb25lbnRzL1B1Ymxpc2hVcmxNaWRkbGVEaXNwbGF5L2luZGV4LmpzeCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/public/bundle/bundle.js b/public/bundle/bundle.js index 0b52bf4d..a8d53e8c 100644 --- a/public/bundle/bundle.js +++ b/public/bundle/bundle.js @@ -1,9 +1,17057 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="public/bundle/",t(t.s=203)}([function(e,t,n){var r=n(3),o=n(27),a=n(16),i=n(17),u=n(24),c=function(e,t,n){var l,s,f,p,d=e&c.F,h=e&c.G,v=e&c.S,y=e&c.P,m=e&c.B,b=h?r:v?r[t]||(r[t]={}):(r[t]||{}).prototype,g=h?o:o[t]||(o[t]={}),w=g.prototype||(g.prototype={});h&&(n=t);for(l in n)s=!d&&b&&void 0!==b[l],f=(s?b:n)[l],p=m&&s?u(f,r):y&&"function"==typeof f?u(Function.call,f):f,b&&i(b,l,f,e&c.U),g[l]!=f&&a(g,l,p),y&&w[l]!=f&&(w[l]=f)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){"use strict";e.exports=n(408)},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(68)("wks"),o=n(40),a=n(3).Symbol,i="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=i&&a[e]||(i?a:o)("Symbol."+e))}).store=r},function(e,t,n){e.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(2),o=n(137),a=n(28),i=Object.defineProperty;t.f=n(7)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),o)try{return i(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(30),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){e.exports=n(420)()},function(e,t,n){var r=n(29);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(419),o=n(173),a=n(424);n.d(t,"Provider",function(){return r.b}),n.d(t,"createProvider",function(){return r.a}),n.d(t,"connectAdvanced",function(){return o.a}),n.d(t,"connect",function(){return a.a})},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(8),o=n(39);e.exports=n(7)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(3),o=n(16),a=n(15),i=n(40)("src"),u=Function.toString,c=(""+u).split("toString");n(27).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,u){var l="function"==typeof n;l&&(a(n,"name")||o(n,"name",t)),e[t]!==n&&(l&&(a(n,i)||o(n,i,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:u?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[i]||u.call(this)})},function(e,t,n){var r=n(0),o=n(4),a=n(29),i=/"/g,u=function(e,t,n,r){var o=String(a(e)),u="<"+t;return""!==n&&(u+=" "+n+'="'+String(r).replace(i,""")+'"'),u+">"+o+""};e.exports=function(e,t){var n={};n[e]=t(u),r(r.P+r.F*o(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){var r=n(61),o=n(29);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(62),o=n(39),a=n(19),i=n(28),u=n(15),c=n(137),l=Object.getOwnPropertyDescriptor;t.f=n(7)?l:function(e,t){if(e=a(e),t=i(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(15),o=n(11),a=n(90)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,i,u){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,u],s=0;c=new Error(t.replace(/%s/g,function(){return l[s++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};e.exports=r},function(e,t,n){"use strict";function r(e,t,n){if(!t(e))throw f("error","uncaught at check",n),new Error(n)}function o(e,t){return P.notUndef(e)&&x.call(e,t)}function a(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=d({},e),n=new Promise(function(e,n){t.resolve=e,t.reject=n});return t.promise=n,t}function u(e){for(var t=[],n=0;n1&&void 0!==arguments[1])||arguments[1],n=void 0,r=new Promise(function(r){n=setTimeout(function(){return r(t)},e)});return r[g]=function(){return clearTimeout(n)},r}function l(){var e,t=!0,n=void 0,r=void 0;return e={},e[y]=!0,e.isRunning=function(){return t},e.result=function(){return n},e.error=function(){return r},e.setRunning=function(e){return t=e},e.setResult=function(e){return n=e},e.setError=function(e){return r=e},e}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3],o={name:n,next:e,throw:t,return:N};return r&&(o[m]=!0),"undefined"!=typeof Symbol&&(o[Symbol.iterator]=function(){return o}),o}function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";"undefined"==typeof window?console.log("redux-saga "+e+": "+t+"\n"+(n&&n.stack||n)):console[e](t,n)}function p(e,t){return function(){return e.apply(void 0,arguments)}}n.d(t,"x",function(){return v}),n.d(t,"e",function(){return y}),n.d(t,"b",function(){return b}),n.d(t,"a",function(){return g}),n.d(t,"c",function(){return w}),n.d(t,"d",function(){return E}),n.d(t,"r",function(){return O}),n.d(t,"u",function(){return T}),n.d(t,"o",function(){return S}),t.h=r,n.d(t,"q",function(){return P}),n.d(t,"v",function(){return C}),t.w=a,n.d(t,"f",function(){return A}),t.l=i,t.g=u,t.m=c,t.j=l,n.d(t,"y",function(){return k}),t.t=s,t.s=f,t.n=p,n.d(t,"z",function(){return R}),n.d(t,"p",function(){return I}),n.d(t,"k",function(){return L}),n.d(t,"A",function(){return M}),n.d(t,"i",function(){return D});var d=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0;return function(){return++e}}(),j=function(e){throw e},N=function(e){return{value:e,done:!0}},R=function(e,t){return e+" has been deprecated in favor of "+t+", please update your code"},I=function(e){return new Error("\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project's github repo.\n Error: "+e+"\n")},L=function(e,t){return(e?e+".":"")+"setContext(props): argument "+t+" is not a plain object"},M=function(e){return function(t){return e(Object.defineProperty(t,w,{value:!0}))}},D=function e(t){return function(){for(var n=arguments.length,r=Array(n),o=0;o0?r:n)(e)}},function(e,t,n){var r=n(0),o=n(27),a=n(4);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],i={};i[e]=t(n),r(r.S+r.F*a(function(){n(1)}),"Object",i)}},function(e,t,n){var r=n(24),o=n(61),a=n(11),i=n(9),u=n(107);e.exports=function(e,t){var n=1==e,c=2==e,l=3==e,s=4==e,f=6==e,p=5==e||f,d=t||u;return function(t,u,h){for(var v,y,m=a(t),b=o(m),g=r(u,h,3),w=i(b.length),E=0,_=n?d(t,w):c?d(t,0):void 0;w>E;E++)if((p||E in b)&&(v=b[E],y=g(v,E,m),e))if(n)_[E]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return E;case 2:_.push(v)}else if(s)return!1;return f?-1:l||s?s:_}}},function(e,t,n){"use strict";if(n(7)){var r=n(41),o=n(3),a=n(4),i=n(0),u=n(78),c=n(113),l=n(24),s=n(47),f=n(39),p=n(16),d=n(49),h=n(30),v=n(9),y=n(163),m=n(43),b=n(28),g=n(15),w=n(63),E=n(5),_=n(11),O=n(104),T=n(44),S=n(21),x=n(45).f,P=n(106),C=n(40),A=n(6),k=n(32),j=n(69),N=n(76),R=n(109),I=n(55),L=n(73),M=n(46),D=n(108),U=n(153),F=n(8),H=n(20),q=F.f,B=H.f,G=o.RangeError,V=o.TypeError,W=o.Uint8Array,z=Array.prototype,K=c.ArrayBuffer,Y=c.DataView,Q=k(0),$=k(2),X=k(3),J=k(4),Z=k(5),ee=k(6),te=j(!0),ne=j(!1),re=R.values,oe=R.keys,ae=R.entries,ie=z.lastIndexOf,ue=z.reduce,ce=z.reduceRight,le=z.join,se=z.sort,fe=z.slice,pe=z.toString,de=z.toLocaleString,he=A("iterator"),ve=A("toStringTag"),ye=C("typed_constructor"),me=C("def_constructor"),be=u.CONSTR,ge=u.TYPED,we=u.VIEW,Ee=k(1,function(e,t){return xe(N(e,e[me]),t)}),_e=a(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),Oe=!!W&&!!W.prototype.set&&a(function(){new W(1).set({})}),Te=function(e,t){var n=h(e);if(n<0||n%t)throw G("Wrong offset!");return n},Se=function(e){if(E(e)&&ge in e)return e;throw V(e+" is not a typed array!")},xe=function(e,t){if(!(E(e)&&ye in e))throw V("It is not a typed array constructor!");return new e(t)},Pe=function(e,t){return Ce(N(e,e[me]),t)},Ce=function(e,t){for(var n=0,r=t.length,o=xe(e,r);r>n;)o[n]=t[n++];return o},Ae=function(e,t,n){q(e,t,{get:function(){return this._d[n]}})},ke=function(e){var t,n,r,o,a,i,u=_(e),c=arguments.length,s=c>1?arguments[1]:void 0,f=void 0!==s,p=P(u);if(void 0!=p&&!O(p)){for(i=p.call(u),r=[],t=0;!(a=i.next()).done;t++)r.push(a.value);u=r}for(f&&c>2&&(s=l(s,arguments[2],2)),t=0,n=v(u.length),o=xe(this,n);n>t;t++)o[t]=f?s(u[t],t):u[t];return o},je=function(){for(var e=0,t=arguments.length,n=xe(this,t);t>e;)n[e]=arguments[e++];return n},Ne=!!W&&a(function(){de.call(new W(1))}),Re=function(){return de.apply(Ne?fe.call(Se(this)):Se(this),arguments)},Ie={copyWithin:function(e,t){return U.call(Se(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return J(Se(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return D.apply(Se(this),arguments)},filter:function(e){return Pe(this,$(Se(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Z(Se(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Se(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Q(Se(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Se(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Se(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return le.apply(Se(this),arguments)},lastIndexOf:function(e){return ie.apply(Se(this),arguments)},map:function(e){return Ee(Se(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ue.apply(Se(this),arguments)},reduceRight:function(e){return ce.apply(Se(this),arguments)},reverse:function(){for(var e,t=this,n=Se(t).length,r=Math.floor(n/2),o=0;o1?arguments[1]:void 0)},sort:function(e){return se.call(Se(this),e)},subarray:function(e,t){var n=Se(this),r=n.length,o=m(e,r);return new(N(n,n[me]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,v((void 0===t?r:m(t,r))-o))}},Le=function(e,t){return Pe(this,fe.call(Se(this),e,t))},Me=function(e){Se(this);var t=Te(arguments[1],1),n=this.length,r=_(e),o=v(r.length),a=0;if(o+t>n)throw G("Wrong length!");for(;a255?255:255&r),o.v[d](n*t+o.o,r,_e)},A=function(e,t){q(e,t,{get:function(){return P(this,t)},set:function(e){return C(this,t,e)},enumerable:!0})};g?(h=n(function(e,n,r,o){s(e,h,l,"_d");var a,i,u,c,f=0,d=0;if(E(n)){if(!(n instanceof K||"ArrayBuffer"==(c=w(n))||"SharedArrayBuffer"==c))return ge in n?Ce(h,n):ke.call(h,n);a=n,d=Te(r,t);var m=n.byteLength;if(void 0===o){if(m%t)throw G("Wrong length!");if((i=m-d)<0)throw G("Wrong length!")}else if((i=v(o)*t)+d>m)throw G("Wrong length!");u=i/t}else u=y(n),i=u*t,a=new K(i);for(p(e,"_d",{b:a,o:d,l:i,e:u,v:new Y(a)});f=200&&e.status<300)return t;var n=new Error(t.message);throw n.response=e,n}function a(e,t){return fetch(e,t).then(function(e){return Promise.all([e,r(e)])}).then(function(e){var t=i(e,2);return o(t[0],t[1])})}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=a,n(484)},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(139),o=n(91);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(30),o=Math.max,a=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):a(e,t)}},function(e,t,n){var r=n(2),o=n(140),a=n(91),i=n(90)("IE_PROTO"),u=function(){},c=function(){var e,t=n(88)("iframe"),r=a.length;for(t.style.display="none",n(92).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("\n \n \n \n '; -}; - -/***/ }), -/* 54 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var selectSiteState = exports.selectSiteState = function selectSiteState(state) { - return state.site; -}; - -var selectSiteHost = exports.selectSiteHost = function selectSiteHost(state) { - return state.site.host; -}; - -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(56); -__webpack_require__(57); -module.exports = __webpack_require__(58); - - -/***/ }), -/* 56 */ -/***/ (function(module, exports) { - -module.exports = require("babel-polyfill"); - -/***/ }), -/* 57 */ -/***/ (function(module, exports) { - -module.exports = require("whatwg-fetch"); - -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var Server = __webpack_require__(59); -var Components = __webpack_require__(141); -var Containers = __webpack_require__(143); -var Pages = __webpack_require__(144); - -var _exports = { - Server: Server, - Components: Components, - Containers: Containers, - Pages: Pages -}; - -module.exports = _exports; - -/***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// app dependencies -var express = __webpack_require__(60); -var bodyParser = __webpack_require__(61); -var expressHandlebars = __webpack_require__(62); -var Handlebars = __webpack_require__(63); -var helmet = __webpack_require__(64); -var passport = __webpack_require__(28); - -var _require = __webpack_require__(65), - serializeSpeechUser = _require.serializeSpeechUser, - deserializeSpeechUser = _require.deserializeSpeechUser; - -var cookieSession = __webpack_require__(66); -var http = __webpack_require__(67); -// logging dependencies -var logger = __webpack_require__(1); - -function Server() { - var _this = this; - - this.configureMysql = function (mysqlConfig) { - __webpack_require__(29).configure(mysqlConfig); - }; - this.configureSite = function (siteConfig) { - __webpack_require__(3).configure(siteConfig); - console.log(__webpack_require__(3)); - _this.sessionKey = siteConfig.auth.sessionKey; - _this.PORT = siteConfig.details.port; - }; - this.configureSlack = function (slackConfig) { - __webpack_require__(30).configure(slackConfig); - }; - this.createApp = function () { - // create an Express application - var app = express(); - - // trust the proxy to get ip address for us - app.enable('trust proxy'); - - // add middleware - app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties - app.use(express.static(__dirname + '/public')); // 'express.static' to serve static files from public directory - app.use(bodyParser.json()); // 'body parser' for parsing application/json - app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded - app.use(function (req, res, next) { - // custom logging middleware to log all incoming http requests - logger.verbose('Request on ' + req.originalUrl + ' from ' + req.ip); - next(); - }); - - // configure passport - passport.serializeUser(serializeSpeechUser); - passport.deserializeUser(deserializeSpeechUser); - var localSignupStrategy = __webpack_require__(68); - var localLoginStrategy = __webpack_require__(79); - passport.use('local-signup', localSignupStrategy); - passport.use('local-login', localLoginStrategy); - // initialize passport - app.use(cookieSession({ - name: 'session', - keys: [_this.sessionKey], - maxAge: 24 * 60 * 60 * 1000 // i.e. 24 hours - })); - app.use(passport.initialize()); - app.use(passport.session()); - - // configure handlebars & register it with express app - var hbs = expressHandlebars.create({ - defaultLayout: 'embed', - handlebars: Handlebars - }); - app.engine('handlebars', hbs.engine); - app.set('view engine', 'handlebars'); - - // set the routes on the app - __webpack_require__(80)(app); - __webpack_require__(81)(app); - __webpack_require__(86)(app); - __webpack_require__(126)(app); - __webpack_require__(136)(app); - - _this.app = app; - }; - this.initialize = function () { - __webpack_require__(137)(logger); - __webpack_require__(139)(logger); - _this.createApp(); - _this.server = http.Server(_this.app); - }; - this.start = function () { - var db = __webpack_require__(5); - // sync sequelize - db.sequelize.sync() - // start the server - .then(function () { - _this.server.listen(_this.PORT, function () { - logger.info('Server is listening on PORT ' + _this.PORT); - }); - }).catch(function (error) { - logger.error('Startup Error:', error); - }); - }; -}; - -module.exports = Server; - -/***/ }), -/* 60 */ -/***/ (function(module, exports) { - -module.exports = require("express"); - -/***/ }), -/* 61 */ -/***/ (function(module, exports) { - -module.exports = require("body-parser"); - -/***/ }), -/* 62 */ -/***/ (function(module, exports) { - -module.exports = require("express-handlebars"); - -/***/ }), -/* 63 */ -/***/ (function(module, exports) { - -module.exports = require("handlebars"); - -/***/ }), -/* 64 */ -/***/ (function(module, exports) { - -module.exports = require("helmet"); - -/***/ }), -/* 65 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var logger = __webpack_require__(1); - -module.exports = { - serializeSpeechUser: function serializeSpeechUser(user, done) { - // returns user data to be serialized into session - logger.debug('serializing user'); - done(null, user); - }, - deserializeSpeechUser: function deserializeSpeechUser(user, done) { - // deserializes session and populates additional info to req.user - logger.debug('deserializing user'); - done(null, user); - } -}; - -/***/ }), -/* 66 */ -/***/ (function(module, exports) { - -module.exports = require("cookie-session"); - -/***/ }), -/* 67 */ -/***/ (function(module, exports) { - -module.exports = require("http"); - -/***/ }), -/* 68 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var PassportLocalStrategy = __webpack_require__(31).Strategy; -var lbryApi = __webpack_require__(16); -var logger = __webpack_require__(1); -var db = __webpack_require__(5); - -module.exports = new PassportLocalStrategy({ - usernameField: 'username', - passwordField: 'password' -}, function (username, password, done) { - logger.verbose('new channel signup request. user: ' + username + ' pass: ' + password + ' .'); - var userInfo = {}; - // server-side validaton of inputs (username, password) - - // create the channel and retrieve the metadata - return lbryApi.createChannel('@' + username).then(function (tx) { - // create user record - var userData = { - userName: username, - password: password - }; - logger.verbose('userData >', userData); - // create user record - var channelData = { - channelName: '@' + username, - channelClaimId: tx.claim_id - }; - logger.verbose('channelData >', channelData); - // create certificate record - var certificateData = { - claimId: tx.claim_id, - name: '@' + username - // address, - }; - logger.verbose('certificateData >', certificateData); - // save user and certificate to db - return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]); - }).then(function (_ref) { - var _ref2 = _slicedToArray(_ref, 3), - newUser = _ref2[0], - newChannel = _ref2[1], - newCertificate = _ref2[2]; - - logger.verbose('user and certificate successfully created'); - // store the relevant newUser info to be passed back for req.User - userInfo['id'] = newUser.id; - userInfo['userName'] = newUser.userName; - userInfo['channelName'] = newChannel.channelName; - userInfo['channelClaimId'] = newChannel.channelClaimId; - // associate the instances - return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]); - }).then(function () { - logger.verbose('user and certificate successfully associated'); - return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName); - }).then(function (shortChannelId) { - userInfo['shortChannelId'] = shortChannelId; - return done(null, userInfo); - }).catch(function (error) { - logger.error('signup error', error); - return done(error); - }); -}); - -/***/ }), -/* 69 */ -/***/ (function(module, exports) { - -module.exports = require("axios"); - -/***/ }), -/* 70 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var lbryConfig = { - api: { - apiHost: 'localhost', - apiPort: '5279' - } -}; - -module.exports = lbryConfig; - -/***/ }), -/* 71 */ -/***/ (function(module, exports) { - -module.exports = require("universal-analytics"); - -/***/ }), -/* 72 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var logger = __webpack_require__(1); - -var _require = __webpack_require__(33), - returnShortId = _require.returnShortId; - -module.exports = function (sequelize, _ref) { - var STRING = _ref.STRING, - BOOLEAN = _ref.BOOLEAN, - INTEGER = _ref.INTEGER, - TEXT = _ref.TEXT, - DECIMAL = _ref.DECIMAL; - - var Certificate = sequelize.define('Certificate', { - address: { - type: STRING, - default: null - }, - amount: { - type: DECIMAL(19, 8), - default: null - }, - claimId: { - type: STRING, - default: null - }, - claimSequence: { - type: INTEGER, - default: null - }, - decodedClaim: { - type: BOOLEAN, - default: null - }, - depth: { - type: INTEGER, - default: null - }, - effectiveAmount: { - type: DECIMAL(19, 8), - default: null - }, - hasSignature: { - type: BOOLEAN, - default: null - }, - height: { - type: INTEGER, - default: null - }, - hex: { - type: TEXT('long'), - default: null - }, - name: { - type: STRING, - default: null - }, - nout: { - type: INTEGER, - default: null - }, - txid: { - type: STRING, - default: null - }, - validAtHeight: { - type: INTEGER, - default: null - }, - outpoint: { - type: STRING, - default: null - }, - valueVersion: { - type: STRING, - default: null - }, - claimType: { - type: STRING, - default: null - }, - certificateVersion: { - type: STRING, - default: null - }, - keyType: { - type: STRING, - default: null - }, - publicKey: { - type: TEXT('long'), - default: null - } - }, { - freezeTableName: true - }); - - Certificate.associate = function (db) { - Certificate.belongsTo(db.Channel, { - foreignKey: { - allowNull: true - } - }); - }; - - Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) { - var _this = this; - - logger.debug('getShortChannelIdFromLongChannelId ' + channelName + ':' + longChannelId); - return new Promise(function (resolve, reject) { - _this.findAll({ - where: { name: channelName }, - order: [['height', 'ASC']] - }).then(function (result) { - switch (result.length) { - case 0: - throw new Error('No channel(s) found with that channel name'); - default: - return resolve(returnShortId(result, longChannelId)); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) { - var _this2 = this; - - logger.debug('getLongChannelIdFromShortChannelId(' + channelName + ', ' + channelClaimId + ')'); - return new Promise(function (resolve, reject) { - _this2.findAll({ - where: { - name: channelName, - claimId: { - $like: channelClaimId + '%' - } - }, - order: [['height', 'ASC']] - }).then(function (result) { - switch (result.length) { - case 0: - return resolve(null); - default: - // note results must be sorted - return resolve(result[0].claimId); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Certificate.getLongChannelIdFromChannelName = function (channelName) { - var _this3 = this; - - logger.debug('getLongChannelIdFromChannelName(' + channelName + ')'); - return new Promise(function (resolve, reject) { - _this3.findAll({ - where: { name: channelName }, - order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] - }).then(function (result) { - switch (result.length) { - case 0: - return resolve(null); - default: - return resolve(result[0].claimId); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Certificate.validateLongChannelId = function (name, claimId) { - var _this4 = this; - - logger.debug('validateLongChannelId(' + name + ', ' + claimId + ')'); - return new Promise(function (resolve, reject) { - _this4.findOne({ - where: { name: name, claimId: claimId } - }).then(function (result) { - if (!result) { - return resolve(null); - }; - resolve(claimId); - }).catch(function (error) { - reject(error); - }); - }); - }; - - Certificate.getLongChannelId = function (channelName, channelClaimId) { - logger.debug('getLongChannelId(' + channelName + ', ' + channelClaimId + ')'); - if (channelClaimId && channelClaimId.length === 40) { - // if a full channel id is provided - return this.validateLongChannelId(channelName, channelClaimId); - } else if (channelClaimId && channelClaimId.length < 40) { - // if a short channel id is provided - return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId); - } else { - return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided - } - }; - - return Certificate; -}; - -/***/ }), -/* 73 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function (sequelize, _ref) { - var STRING = _ref.STRING; - - var Channel = sequelize.define('Channel', { - channelName: { - type: STRING, - allowNull: false - }, - channelClaimId: { - type: STRING, - allowNull: false - } - }, { - freezeTableName: true - }); - - Channel.associate = function (db) { - Channel.belongsTo(db.User); - Channel.hasOne(db.Certificate); - }; - - return Channel; -}; - -/***/ }), -/* 74 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var logger = __webpack_require__(1); - -var _require = __webpack_require__(33), - returnShortId = _require.returnShortId; - -var _require2 = __webpack_require__(3), - defaultThumbnail = _require2.assetDefaults.thumbnail, - host = _require2.details.host; - -function determineFileExtensionFromContentType(contentType) { - switch (contentType) { - case 'image/jpeg': - case 'image/jpg': - return 'jpeg'; - case 'image/png': - return 'png'; - case 'image/gif': - return 'gif'; - case 'video/mp4': - return 'mp4'; - default: - logger.debug('setting unknown file type as file extension jpeg'); - return 'jpeg'; - } -}; - -function determineThumbnail(storedThumbnail, defaultThumbnail) { - if (storedThumbnail === '') { - return defaultThumbnail; - } - return storedThumbnail; -}; - -function prepareClaimData(claim) { - // logger.debug('preparing claim data based on resolved data:', claim); - claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail); - claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType); - claim['host'] = host; - return claim; -}; - -module.exports = function (sequelize, _ref) { - var STRING = _ref.STRING, - BOOLEAN = _ref.BOOLEAN, - INTEGER = _ref.INTEGER, - TEXT = _ref.TEXT, - DECIMAL = _ref.DECIMAL; - - var Claim = sequelize.define('Claim', { - address: { - type: STRING, - default: null - }, - amount: { - type: DECIMAL(19, 8), - default: null - }, - claimId: { - type: STRING, - default: null - }, - claimSequence: { - type: INTEGER, - default: null - }, - decodedClaim: { - type: BOOLEAN, - default: null - }, - depth: { - type: INTEGER, - default: null - }, - effectiveAmount: { - type: DECIMAL(19, 8), - default: null - }, - hasSignature: { - type: BOOLEAN, - default: null - }, - height: { - type: INTEGER, - default: null - }, - hex: { - type: TEXT('long'), - default: null - }, - name: { - type: STRING, - default: null - }, - nout: { - type: INTEGER, - default: null - }, - txid: { - type: STRING, - default: null - }, - validAtHeight: { - type: INTEGER, - default: null - }, - outpoint: { - type: STRING, - default: null - }, - claimType: { - type: STRING, - default: null - }, - certificateId: { - type: STRING, - default: null - }, - author: { - type: STRING, - default: null - }, - description: { - type: TEXT('long'), - default: null - }, - language: { - type: STRING, - default: null - }, - license: { - type: STRING, - default: null - }, - licenseUrl: { - type: STRING, - default: null - }, - nsfw: { - type: BOOLEAN, - default: null - }, - preview: { - type: STRING, - default: null - }, - thumbnail: { - type: STRING, - default: null - }, - title: { - type: STRING, - default: null - }, - metadataVersion: { - type: STRING, - default: null - }, - contentType: { - type: STRING, - default: null - }, - source: { - type: STRING, - default: null - }, - sourceType: { - type: STRING, - default: null - }, - sourceVersion: { - type: STRING, - default: null - }, - streamVersion: { - type: STRING, - default: null - }, - valueVersion: { - type: STRING, - default: null - }, - channelName: { - type: STRING, - allowNull: true, - default: null - } - }, { - freezeTableName: true - }); - - Claim.associate = function (db) { - Claim.belongsTo(db.File, { - foreignKey: { - allowNull: true - } - }); - }; - - Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) { - var _this = this; - - logger.debug('Claim.getShortClaimIdFromLongClaimId for ' + claimName + '#' + claimId); - return new Promise(function (resolve, reject) { - _this.findAll({ - where: { name: claimName }, - order: [['height', 'ASC']] - }).then(function (result) { - switch (result.length) { - case 0: - throw new Error('No claim(s) found with that claim name'); - default: - resolve(returnShortId(result, claimId)); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Claim.getAllChannelClaims = function (channelClaimId) { - var _this2 = this; - - logger.debug('Claim.getAllChannelClaims for ' + channelClaimId); - return new Promise(function (resolve, reject) { - _this2.findAll({ - where: { certificateId: channelClaimId }, - order: [['height', 'ASC']], - raw: true // returns an array of only data, not an array of instances - }).then(function (channelClaimsArray) { - // logger.debug('channelclaimsarray length:', channelClaimsArray.length); - switch (channelClaimsArray.length) { - case 0: - return resolve(null); - default: - channelClaimsArray.forEach(function (claim) { - claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType); - claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail); - return claim; - }); - return resolve(channelClaimsArray); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) { - var _this3 = this; - - logger.debug('finding claim id for claim ' + claimName + ' from channel ' + channelClaimId); - return new Promise(function (resolve, reject) { - _this3.findAll({ - where: { name: claimName, certificateId: channelClaimId }, - order: [['id', 'ASC']] - }).then(function (result) { - switch (result.length) { - case 0: - return resolve(null); - case 1: - return resolve(result[0].claimId); - default: - logger.error(result.length + ' records found for "' + claimName + '" in channel "' + channelClaimId + '"'); - return resolve(result[0].claimId); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Claim.getLongClaimIdFromShortClaimId = function (name, shortId) { - var _this4 = this; - - return new Promise(function (resolve, reject) { - _this4.findAll({ - where: { - name: name, - claimId: { - $like: shortId + '%' - } }, - order: [['height', 'ASC']] - }).then(function (result) { - switch (result.length) { - case 0: - return resolve(null); - default: - // note results must be sorted - return resolve(result[0].claimId); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Claim.getTopFreeClaimIdByClaimName = function (name) { - var _this5 = this; - - return new Promise(function (resolve, reject) { - _this5.findAll({ - where: { name: name }, - order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] // note: maybe height and effective amount need to switch? - }).then(function (result) { - logger.debug('length of result', result.length); - switch (result.length) { - case 0: - return resolve(null); - default: - return resolve(result[0].dataValues.claimId); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - Claim.validateLongClaimId = function (name, claimId) { - var _this6 = this; - - return new Promise(function (resolve, reject) { - _this6.findOne({ - where: { name: name, claimId: claimId } - }).then(function (result) { - if (!result) { - return resolve(null); - }; - resolve(claimId); - }).catch(function (error) { - reject(error); - }); - }); - }; - - Claim.getLongClaimId = function (claimName, claimId) { - logger.debug('getLongClaimId(' + claimName + ', ' + claimId + ')'); - if (claimId && claimId.length === 40) { - // if a full claim id is provided - return this.validateLongClaimId(claimName, claimId); - } else if (claimId && claimId.length < 40) { - return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided - } else { - return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided - } - }; - - Claim.resolveClaim = function (name, claimId) { - var _this7 = this; - - logger.debug('Claim.resolveClaim: ' + name + ' ' + claimId); - return new Promise(function (resolve, reject) { - _this7.findAll({ - where: { name: name, claimId: claimId } - }).then(function (claimArray) { - switch (claimArray.length) { - case 0: - return resolve(null); - case 1: - return resolve(prepareClaimData(claimArray[0].dataValues)); - default: - logger.error('more than one record matches ' + name + '#' + claimId + ' in db.Claim'); - return resolve(prepareClaimData(claimArray[0].dataValues)); - } - }).catch(function (error) { - reject(error); - }); - }); - }; - - return Claim; -}; - -/***/ }), -/* 75 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function (sequelize, _ref) { - var STRING = _ref.STRING, - BOOLEAN = _ref.BOOLEAN, - INTEGER = _ref.INTEGER; - - var File = sequelize.define('File', { - name: { - type: STRING, - allowNull: false - }, - claimId: { - type: STRING, - allowNull: false - }, - address: { - type: STRING, - allowNull: false - }, - outpoint: { - type: STRING, - allowNull: false - }, - height: { - type: INTEGER, - allowNull: false, - default: 0 - }, - fileName: { - type: STRING, - allowNull: false - }, - filePath: { - type: STRING, - allowNull: false - }, - fileType: { - type: STRING - }, - nsfw: { - type: BOOLEAN, - allowNull: false, - defaultValue: false - }, - trendingEligible: { - type: BOOLEAN, - allowNull: false, - defaultValue: true - } - }, { - freezeTableName: true - }); - - File.associate = function (db) { - File.hasMany(db.Request); - File.hasOne(db.Claim); - }; - - File.getRecentClaims = function () { - return this.findAll({ - where: { nsfw: false, trendingEligible: true }, - order: [['createdAt', 'DESC']], - limit: 25 - }); - }; - - return File; -}; - -/***/ }), -/* 76 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function (sequelize, _ref) { - var STRING = _ref.STRING, - BOOLEAN = _ref.BOOLEAN, - TEXT = _ref.TEXT; - - var Request = sequelize.define('Request', { - action: { - type: STRING, - allowNull: false - }, - url: { - type: STRING, - allowNull: false - }, - ipAddress: { - type: STRING, - allowNull: true - }, - result: { - type: TEXT('long'), - allowNull: true, - default: null - } - }, { - freezeTableName: true - }); - - Request.associate = function (db) { - Request.belongsTo(db.File, { - foreignKey: { - allowNull: true - } - }); - }; - - return Request; -}; - -/***/ }), -/* 77 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var bcrypt = __webpack_require__(78); -var logger = __webpack_require__(1); - -module.exports = function (sequelize, _ref) { - var STRING = _ref.STRING; - - var User = sequelize.define('User', { - userName: { - type: STRING, - allowNull: false - }, - password: { - type: STRING, - allowNull: false - } - }, { - freezeTableName: true - }); - - User.associate = function (db) { - User.hasOne(db.Channel); - }; - - User.prototype.comparePassword = function (password) { - return bcrypt.compare(password, this.password); - }; - - User.prototype.changePassword = function (newPassword) { - var _this = this; - - return new Promise(function (resolve, reject) { - // generate a salt string to use for hashing - bcrypt.genSalt(function (saltError, salt) { - if (saltError) { - logger.error('salt error', saltError); - reject(saltError); - return; - } - // generate a hashed version of the user's password - bcrypt.hash(newPassword, salt, function (hashError, hash) { - // if there is an error with the hash generation return the error - if (hashError) { - logger.error('hash error', hashError); - reject(hashError); - return; - } - // replace the current password with the new hash - _this.update({ password: hash }).then(function () { - resolve(); - }).catch(function (error) { - reject(error); - }); - }); - }); - }); - }; - - // pre-save hook method to hash the user's password before the user's info is saved to the db. - User.hook('beforeCreate', function (user, options) { - logger.debug('User.beforeCreate hook...'); - return new Promise(function (resolve, reject) { - // generate a salt string to use for hashing - bcrypt.genSalt(function (saltError, salt) { - if (saltError) { - logger.error('salt error', saltError); - reject(saltError); - return; - } - // generate a hashed version of the user's password - bcrypt.hash(user.password, salt, function (hashError, hash) { - // if there is an error with the hash generation return the error - if (hashError) { - logger.error('hash error', hashError); - reject(hashError); - return; - } - // replace the password string with the hash password value - user.password = hash; - resolve(); - }); - }); - }); - }); - - return User; -}; - -/***/ }), -/* 78 */ -/***/ (function(module, exports) { - -module.exports = require("bcrypt"); - -/***/ }), -/* 79 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var PassportLocalStrategy = __webpack_require__(31).Strategy; -var logger = __webpack_require__(1); -var db = __webpack_require__(5); - -var returnUserAndChannelInfo = function returnUserAndChannelInfo(userInstance) { - return new Promise(function (resolve, reject) { - var userInfo = {}; - userInfo['id'] = userInstance.id; - userInfo['userName'] = userInstance.userName; - userInstance.getChannel().then(function (_ref) { - var channelName = _ref.channelName, - channelClaimId = _ref.channelClaimId; - - userInfo['channelName'] = channelName; - userInfo['channelClaimId'] = channelClaimId; - return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName); - }).then(function (shortChannelId) { - userInfo['shortChannelId'] = shortChannelId; - resolve(userInfo); - }).catch(function (error) { - reject(error); - }); - }); -}; - -module.exports = new PassportLocalStrategy({ - usernameField: 'username', - passwordField: 'password' -}, function (username, password, done) { - return db.User.findOne({ - where: { userName: username } - }).then(function (user) { - if (!user) { - logger.debug('no user found'); - return done(null, false, { message: 'Incorrect username or password' }); - } - return user.comparePassword(password).then(function (isMatch) { - if (!isMatch) { - logger.debug('incorrect password'); - return done(null, false, { message: 'Incorrect username or password' }); - } - logger.debug('Password was a match, returning User'); - return returnUserAndChannelInfo(user).then(function (userInfo) { - return done(null, userInfo); - }).catch(function (error) { - return error; - }); - }).catch(function (error) { - return error; - }); - }).catch(function (error) { - return done(error); - }); -}); - -/***/ }), -/* 80 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var logger = __webpack_require__(1); -var passport = __webpack_require__(28); - -module.exports = function (app) { - // route for sign up - app.post('/signup', passport.authenticate('local-signup'), function (req, res) { - logger.verbose('successful signup for ' + req.user.channelName); - res.status(200).json({ - success: true, - channelName: req.user.channelName, - channelClaimId: req.user.channelClaimId, - shortChannelId: req.user.shortChannelId - }); - }); - // route for log in - app.post('/login', function (req, res, next) { - passport.authenticate('local-login', function (err, user, info) { - if (err) { - return next(err); - } - if (!user) { - return res.status(400).json({ - success: false, - message: info.message - }); - } - logger.debug('successful login'); - req.logIn(user, function (err) { - if (err) { - return next(err); - } - return res.status(200).json({ - success: true, - channelName: req.user.channelName, - channelClaimId: req.user.channelClaimId, - shortChannelId: req.user.shortChannelId - }); - }); - })(req, res, next); - }); - // route to log out - app.get('/logout', function (req, res) { - req.logout(); - res.status(200).json({ success: true, message: 'you successfully logged out' }); - }); - // see if user is authenticated, and return credentials if so - app.get('/user', function (req, res) { - if (req.user) { - res.status(200).json({ success: true, data: req.user }); - } else { - res.status(401).json({ success: false, message: 'user is not logged in' }); - } - }); -}; - -/***/ }), -/* 81 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var logger = __webpack_require__(1); -var multipart = __webpack_require__(82); - -var _require = __webpack_require__(3), - uploadDirectory = _require.publishing.uploadDirectory, - host = _require.details.host; - -var multipartMiddleware = multipart({ uploadDir: uploadDirectory }); -var db = __webpack_require__(5); - -var _require2 = __webpack_require__(83), - claimNameIsAvailable = _require2.claimNameIsAvailable, - checkChannelAvailability = _require2.checkChannelAvailability, - publish = _require2.publish; - -var _require3 = __webpack_require__(16), - getClaimList = _require3.getClaimList, - resolveUri = _require3.resolveUri, - getClaim = _require3.getClaim; - -var _require4 = __webpack_require__(34), - addGetResultsToFileData = _require4.addGetResultsToFileData, - createBasicPublishParams = _require4.createBasicPublishParams, - createThumbnailPublishParams = _require4.createThumbnailPublishParams, - parsePublishApiRequestBody = _require4.parsePublishApiRequestBody, - parsePublishApiRequestFiles = _require4.parsePublishApiRequestFiles, - createFileData = _require4.createFileData; - -var errorHandlers = __webpack_require__(36); - -var _require5 = __webpack_require__(17), - sendGATimingEvent = _require5.sendGATimingEvent; - -var _require6 = __webpack_require__(84), - authenticateUser = _require6.authenticateUser; - -var _require7 = __webpack_require__(37), - getChannelData = _require7.getChannelData, - getChannelClaims = _require7.getChannelClaims, - getClaimId = _require7.getClaimId; - -var NO_CHANNEL = 'NO_CHANNEL'; -var NO_CLAIM = 'NO_CLAIM'; - -module.exports = function (app) { - // route to check whether site has published to a channel - app.get('/api/channel/availability/:name', function (_ref, res) { - var ip = _ref.ip, - originalUrl = _ref.originalUrl, - name = _ref.params.name; - - var gaStartTime = Date.now(); - checkChannelAvailability(name).then(function (availableName) { - res.status(200).json(availableName); - sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now()); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to get a short channel id from long channel Id - app.get('/api/channel/short-id/:longId/:name', function (_ref2, res) { - var ip = _ref2.ip, - originalUrl = _ref2.originalUrl, - params = _ref2.params; - - db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name).then(function (shortId) { - res.status(200).json(shortId); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - app.get('/api/channel/data/:channelName/:channelClaimId', function (_ref3, res) { - var ip = _ref3.ip, - originalUrl = _ref3.originalUrl, - body = _ref3.body, - params = _ref3.params; - - var channelName = params.channelName; - var channelClaimId = params.channelClaimId; - if (channelClaimId === 'none') channelClaimId = null; - getChannelData(channelName, channelClaimId, 0).then(function (data) { - if (data === NO_CHANNEL) { - return res.status(404).json({ success: false, message: 'No matching channel was found' }); - } - res.status(200).json({ success: true, data: data }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - app.get('/api/channel/claims/:channelName/:channelClaimId/:page', function (_ref4, res) { - var ip = _ref4.ip, - originalUrl = _ref4.originalUrl, - body = _ref4.body, - params = _ref4.params; - - var channelName = params.channelName; - var channelClaimId = params.channelClaimId; - if (channelClaimId === 'none') channelClaimId = null; - var page = params.page; - getChannelClaims(channelName, channelClaimId, page).then(function (data) { - if (data === NO_CHANNEL) { - return res.status(404).json({ success: false, message: 'No matching channel was found' }); - } - res.status(200).json({ success: true, data: data }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to run a claim_list request on the daemon - app.get('/api/claim/list/:name', function (_ref5, res) { - var ip = _ref5.ip, - originalUrl = _ref5.originalUrl, - params = _ref5.params; - - getClaimList(params.name).then(function (claimsList) { - res.status(200).json(claimsList); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to get an asset - app.get('/api/claim/get/:name/:claimId', function (_ref6, res) { - var ip = _ref6.ip, - originalUrl = _ref6.originalUrl, - params = _ref6.params; - - var name = params.name; - var claimId = params.claimId; - // resolve the claim - db.Claim.resolveClaim(name, claimId).then(function (resolveResult) { - // make sure a claim actually exists at that uri - if (!resolveResult) { - throw new Error('No matching uri found in Claim table'); - } - var fileData = createFileData(resolveResult); - // get the claim - return Promise.all([fileData, getClaim(name + '#' + claimId)]); - }).then(function (_ref7) { - var _ref8 = _slicedToArray(_ref7, 2), - fileData = _ref8[0], - getResult = _ref8[1]; - - fileData = addGetResultsToFileData(fileData, getResult); - return Promise.all([db.upsert(db.File, fileData, { name: name, claimId: claimId }, 'File'), getResult]); - }).then(function (_ref9) { - var _ref10 = _slicedToArray(_ref9, 2), - fileRecord = _ref10[0], - _ref10$ = _ref10[1], - message = _ref10$.message, - completed = _ref10$.completed; - - res.status(200).json({ success: true, message: message, completed: completed }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to check whether this site published to a claim - app.get('/api/claim/availability/:name', function (_ref11, res) { - var ip = _ref11.ip, - originalUrl = _ref11.originalUrl, - name = _ref11.params.name; - - var gaStartTime = Date.now(); - claimNameIsAvailable(name).then(function (result) { - res.status(200).json(result); - sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now()); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to run a resolve request on the daemon - app.get('/api/claim/resolve/:name/:claimId', function (_ref12, res) { - var headers = _ref12.headers, - ip = _ref12.ip, - originalUrl = _ref12.originalUrl, - params = _ref12.params; - - resolveUri(params.name + '#' + params.claimId).then(function (resolvedUri) { - res.status(200).json(resolvedUri); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to run a publish request on the daemon - app.post('/api/claim/publish', multipartMiddleware, function (_ref13, res) { - var body = _ref13.body, - files = _ref13.files, - headers = _ref13.headers, - ip = _ref13.ip, - originalUrl = _ref13.originalUrl, - user = _ref13.user; - - // define variables - var channelName = void 0, - channelId = void 0, - channelPassword = void 0, - description = void 0, - fileName = void 0, - filePath = void 0, - fileType = void 0, - gaStartTime = void 0, - license = void 0, - name = void 0, - nsfw = void 0, - thumbnail = void 0, - thumbnailFileName = void 0, - thumbnailFilePath = void 0, - thumbnailFileType = void 0, - title = void 0; - // record the start time of the request - gaStartTime = Date.now(); - // validate the body and files of the request - try { - var _parsePublishApiReque = parsePublishApiRequestBody(body); - // validateApiPublishRequest(body, files); - - - name = _parsePublishApiReque.name; - nsfw = _parsePublishApiReque.nsfw; - license = _parsePublishApiReque.license; - title = _parsePublishApiReque.title; - description = _parsePublishApiReque.description; - thumbnail = _parsePublishApiReque.thumbnail; - - var _parsePublishApiReque2 = parsePublishApiRequestFiles(files); - - fileName = _parsePublishApiReque2.fileName; - filePath = _parsePublishApiReque2.filePath; - fileType = _parsePublishApiReque2.fileType; - thumbnailFileName = _parsePublishApiReque2.thumbnailFileName; - thumbnailFilePath = _parsePublishApiReque2.thumbnailFilePath; - thumbnailFileType = _parsePublishApiReque2.thumbnailFileType; - channelName = body.channelName; - channelId = body.channelId; - channelPassword = body.channelPassword; - } catch (error) { - return res.status(400).json({ success: false, message: error.message }); - } - // check channel authorization - Promise.all([authenticateUser(channelName, channelId, channelPassword, user), claimNameIsAvailable(name), createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail), createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw)]).then(function (_ref14) { - var _ref15 = _slicedToArray(_ref14, 4), - _ref15$ = _ref15[0], - channelName = _ref15$.channelName, - channelClaimId = _ref15$.channelClaimId, - validatedClaimName = _ref15[1], - publishParams = _ref15[2], - thumbnailPublishParams = _ref15[3]; - - // add channel details to the publish params - if (channelName && channelClaimId) { - publishParams['channel_name'] = channelName; - publishParams['channel_id'] = channelClaimId; - } - // publish the thumbnail - if (thumbnailPublishParams) { - publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType); - } - // publish the asset - return publish(publishParams, fileName, fileType); - }).then(function (result) { - res.status(200).json({ - success: true, - message: 'publish completed successfully', - data: { - name: name, - claimId: result.claim_id, - url: host + '/' + result.claim_id + '/' + name, - lbryTx: result - } - }); - // record the publish end time and send to google analytics - sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now()); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to get a short claim id from long claim Id - app.get('/api/claim/short-id/:longId/:name', function (_ref16, res) { - var ip = _ref16.ip, - originalUrl = _ref16.originalUrl, - body = _ref16.body, - params = _ref16.params; - - db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name).then(function (shortId) { - res.status(200).json({ success: true, data: shortId }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - app.post('/api/claim/long-id', function (_ref17, res) { - var ip = _ref17.ip, - originalUrl = _ref17.originalUrl, - body = _ref17.body, - params = _ref17.params; - - logger.debug('body:', body); - var channelName = body.channelName; - var channelClaimId = body.channelClaimId; - var claimName = body.claimName; - var claimId = body.claimId; - getClaimId(channelName, channelClaimId, claimName, claimId).then(function (result) { - if (result === NO_CHANNEL) { - return res.status(404).json({ success: false, message: 'No matching channel could be found' }); - } - if (result === NO_CLAIM) { - return res.status(404).json({ success: false, message: 'No matching claim id could be found' }); - } - res.status(200).json({ success: true, data: result }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - app.get('/api/claim/data/:claimName/:claimId', function (_ref18, res) { - var ip = _ref18.ip, - originalUrl = _ref18.originalUrl, - body = _ref18.body, - params = _ref18.params; - - var claimName = params.claimName; - var claimId = params.claimId; - if (claimId === 'none') claimId = null; - db.Claim.resolveClaim(claimName, claimId).then(function (claimInfo) { - if (!claimInfo) { - return res.status(404).json({ success: false, message: 'No claim could be found' }); - } - res.status(200).json({ success: true, data: claimInfo }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); - // route to see if asset is available locally - app.get('/api/file/availability/:name/:claimId', function (_ref19, res) { - var ip = _ref19.ip, - originalUrl = _ref19.originalUrl, - params = _ref19.params; - - var name = params.name; - var claimId = params.claimId; - db.File.findOne({ where: { name: name, claimId: claimId } }).then(function (result) { - if (result) { - return res.status(200).json({ success: true, data: true }); - } - res.status(200).json({ success: true, data: false }); - }).catch(function (error) { - errorHandlers.handleErrorResponse(originalUrl, ip, error, res); - }); - }); -}; - -/***/ }), -/* 82 */ -/***/ (function(module, exports) { - -module.exports = require("connect-multiparty"); - -/***/ }), -/* 83 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -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; } - -var logger = __webpack_require__(1); -var db = __webpack_require__(5); -var lbryApi = __webpack_require__(16); -var publishHelpers = __webpack_require__(34); - -var _require = __webpack_require__(3), - _require$publishing = _require.publishing, - primaryClaimAddress = _require$publishing.primaryClaimAddress, - additionalClaimAddresses = _require$publishing.additionalClaimAddresses; - -var Sequelize = __webpack_require__(32); -var Op = Sequelize.Op; - -module.exports = { - publish: function publish(publishParams, fileName, fileType) { - return new Promise(function (resolve, reject) { - var publishResults = void 0, - certificateId = void 0, - channelName = void 0; - // publish the file - return lbryApi.publishClaim(publishParams).then(function (tx) { - logger.info('Successfully published ' + publishParams.name + ' ' + fileName, tx); - publishResults = tx; - // get the channel information - if (publishParams.channel_name) { - logger.debug('this claim was published in channel: ' + publishParams.channel_name); - return db.Channel.findOne({ where: { channelName: publishParams.channel_name } }); - } else { - logger.debug('this claim was not published in a channel'); - return null; - } - }).then(function (channel) { - // set channel information - certificateId = null; - channelName = null; - if (channel) { - certificateId = channel.channelClaimId; - channelName = channel.channelName; - } - logger.debug('certificateId: ' + certificateId); - }).then(function () { - // create the File record - var fileRecord = { - name: publishParams.name, - claimId: publishResults.claim_id, - title: publishParams.metadata.title, - description: publishParams.metadata.description, - address: publishParams.claim_address, - outpoint: publishResults.txid + ':' + publishResults.nout, - height: 0, - fileName: fileName, - filePath: publishParams.file_path, - fileType: fileType, - nsfw: publishParams.metadata.nsfw - }; - // create the Claim record - var claimRecord = { - name: publishParams.name, - claimId: publishResults.claim_id, - title: publishParams.metadata.title, - description: publishParams.metadata.description, - address: publishParams.claim_address, - thumbnail: publishParams.metadata.thumbnail, - outpoint: publishResults.txid + ':' + publishResults.nout, - height: 0, - contentType: fileType, - nsfw: publishParams.metadata.nsfw, - amount: publishParams.bid, - certificateId: certificateId, - channelName: channelName - }; - // upsert criteria - var upsertCriteria = { - name: publishParams.name, - claimId: publishResults.claim_id - }; - // upsert the records - return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]); - }).then(function (_ref) { - var _ref2 = _slicedToArray(_ref, 2), - file = _ref2[0], - claim = _ref2[1]; - - logger.debug('File and Claim records successfully created'); - return Promise.all([file.setClaim(claim), claim.setFile(file)]); - }).then(function () { - logger.debug('File and Claim records successfully associated'); - resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim; - }).catch(function (error) { - logger.error('PUBLISH ERROR', error); - publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file - reject(error); - }); - }); - }, - claimNameIsAvailable: function claimNameIsAvailable(name) { - var claimAddresses = additionalClaimAddresses || []; - claimAddresses.push(primaryClaimAddress); - // find any records where the name is used - return db.Claim.findAll({ - attributes: ['address'], - where: { - name: name, - address: _defineProperty({}, Op.or, claimAddresses) - } - }).then(function (result) { - if (result.length >= 1) { - throw new Error('That claim is already in use'); - }; - return name; - }).catch(function (error) { - throw error; - }); - }, - checkChannelAvailability: function checkChannelAvailability(name) { - return db.Channel.findAll({ - where: { channelName: name } - }).then(function (result) { - if (result.length >= 1) { - throw new Error('That channel has already been claimed'); - } - return name; - }).catch(function (error) { - throw error; - }); - } -}; - -/***/ }), -/* 84 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var db = __webpack_require__(5); -var logger = __webpack_require__(1); - -module.exports = { - authenticateUser: function authenticateUser(channelName, channelId, channelPassword, user) { - // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided - if (!channelName && !channelId) { - return { - channelName: null, - channelClaimId: null - }; - } - // case: channelName or channel Id are provided with user token - if (user) { - if (channelName && channelName !== user.channelName) { - throw new Error('the provided channel name does not match user credentials'); - } - if (channelId && channelId !== user.channelClaimId) { - throw new Error('the provided channel id does not match user credentials'); - } - return { - channelName: user.channelName, - channelClaimId: user.channelClaimId - }; - } - // case: channelName or channel Id are provided with password instead of user token - if (!channelPassword) throw new Error('no channel password provided'); - return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword); - }, - authenticateChannelCredentials: function authenticateChannelCredentials(channelName, channelId, userPassword) { - return new Promise(function (resolve, reject) { - // hoisted variables - var channelData = void 0; - // build the params for finding the channel - var channelFindParams = {}; - if (channelName) channelFindParams['channelName'] = channelName; - if (channelId) channelFindParams['channelClaimId'] = channelId; - // find the channel - db.Channel.findOne({ - where: channelFindParams - }).then(function (channel) { - if (!channel) { - logger.debug('no channel found'); - throw new Error('Authentication failed, you do not have access to that channel'); - } - channelData = channel.get(); - logger.debug('channel data:', channelData); - return db.User.findOne({ - where: { userName: channelData.channelName.substring(1) } - }); - }).then(function (user) { - if (!user) { - logger.debug('no user found'); - throw new Error('Authentication failed, you do not have access to that channel'); - } - return user.comparePassword(userPassword); - }).then(function (isMatch) { - if (!isMatch) { - logger.debug('incorrect password'); - throw new Error('Authentication failed, you do not have access to that channel'); - } - logger.debug('...password was a match...'); - resolve(channelData); - }).catch(function (error) { - reject(error); - }); - }); - } -}; - -/***/ }), -/* 85 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var CLAIMS_PER_PAGE = 12; - -module.exports = { - returnPaginatedChannelClaims: function returnPaginatedChannelClaims(channelName, longChannelClaimId, claims, page) { - var totalPages = module.exports.determineTotalPages(claims); - var paginationPage = module.exports.getPageFromQuery(page); - var viewData = { - channelName: channelName, - longChannelClaimId: longChannelClaimId, - claims: module.exports.extractPageFromClaims(claims, paginationPage), - previousPage: module.exports.determinePreviousPage(paginationPage), - currentPage: paginationPage, - nextPage: module.exports.determineNextPage(totalPages, paginationPage), - totalPages: totalPages, - totalResults: module.exports.determineTotalClaims(claims) - }; - return viewData; - }, - getPageFromQuery: function getPageFromQuery(page) { - if (page) { - return parseInt(page); - } - return 1; - }, - extractPageFromClaims: function extractPageFromClaims(claims, pageNumber) { - if (!claims) { - return []; // if no claims, return this default - } - // logger.debug('claims is array?', Array.isArray(claims)); - // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber)); - var claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE; - var claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE; - var pageOfClaims = claims.slice(claimStartIndex, claimEndIndex); - return pageOfClaims; - }, - determineTotalPages: function determineTotalPages(claims) { - if (!claims) { - return 0; - } else { - var totalClaims = claims.length; - if (totalClaims < CLAIMS_PER_PAGE) { - return 1; - } - var fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE); - var remainder = totalClaims % CLAIMS_PER_PAGE; - if (remainder === 0) { - return fullPages; - } - return fullPages + 1; - } - }, - determinePreviousPage: function determinePreviousPage(currentPage) { - if (currentPage === 1) { - return null; - } - return currentPage - 1; - }, - determineNextPage: function determineNextPage(totalPages, currentPage) { - if (currentPage === totalPages) { - return null; - } - return currentPage + 1; - }, - determineTotalClaims: function determineTotalClaims(claims) { - if (!claims) { - return 0; - } - return claims.length; - } -}; - -/***/ }), -/* 86 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _require = __webpack_require__(3), - host = _require.details; - -var handlePageRender = __webpack_require__(38); - -module.exports = function (app) { - // route for the home page - app.get('/', function (req, res) { - handlePageRender(req, res); - }); - // route to display login page - app.get('/login', function (req, res) { - handlePageRender(req, res); - }); - // route to show 'about' page - app.get('/about', function (req, res) { - handlePageRender(req, res); - }); - // route to display a list of the trending images - app.get('/trending', function (req, res) { - res.status(301).redirect('/popular'); - }); - app.get('/popular', function (req, res) { - handlePageRender(req, res); - }); - // route to display a list of the trending images - app.get('/new', function (req, res) { - handlePageRender(req, res); - }); - // route to send embedable video player (for twitter) - app.get('/embed/:claimId/:name', function (_ref, res) { - var params = _ref.params; - - var claimId = params.claimId; - var name = params.name; - // get and render the content - res.status(200).render('embed', { layout: 'embed', host: host, claimId: claimId, name: name }); - }); -}; - -/***/ }), -/* 87 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - - switch (action.type) { - case actions.FILE_SELECTED: - return Object.assign({}, initialState, { // note: clears to initial state - file: action.data - }); - case actions.FILE_CLEAR: - return initialState; - case actions.METADATA_UPDATE: - return Object.assign({}, state, { - metadata: Object.assign({}, state.metadata, _defineProperty({}, action.data.name, action.data.value)) - }); - case actions.CLAIM_UPDATE: - return Object.assign({}, state, { - claim: action.data - }); - case actions.SET_PUBLISH_IN_CHANNEL: - return Object.assign({}, state, { - publishInChannel: action.channel - }); - case actions.PUBLISH_STATUS_UPDATE: - return Object.assign({}, state, { - status: action.data - }); - case actions.ERROR_UPDATE: - return Object.assign({}, state, { - error: Object.assign({}, state.error, _defineProperty({}, action.data.name, action.data.value)) - }); - case actions.SELECTED_CHANNEL_UPDATE: - return Object.assign({}, state, { - selectedChannel: action.data - }); - case actions.TOGGLE_METADATA_INPUTS: - return Object.assign({}, state, { - showMetadataInputs: action.data - }); - case actions.THUMBNAIL_NEW: - return Object.assign({}, state, { - thumbnail: action.data - }); - default: - return state; - } -}; - -var _publish_action_types = __webpack_require__(41); - -var actions = _interopRequireWildcard(_publish_action_types); - -var _publish_channel_select_states = __webpack_require__(88); - -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 _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; } - -var _require = __webpack_require__(3), - publishing = _require.publishing; - -var initialState = { - disabled: publishing.disabled, - disabledMessage: publishing.disabledMessage, - publishInChannel: false, - selectedChannel: _publish_channel_select_states.LOGIN, - showMetadataInputs: false, - status: { - status: null, - message: null - }, - error: { - file: null, - url: null, - channel: null, - publishSubmit: null - }, - file: null, - claim: '', - metadata: { - title: '', - description: '', - license: '', - nsfw: false - }, - thumbnail: null -}; - -/***/ }), -/* 88 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var LOGIN = exports.LOGIN = 'Existing'; -var CREATE = exports.CREATE = 'New'; - -/***/ }), -/* 89 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - - switch (action.type) { - case actions.CHANNEL_UPDATE: - return Object.assign({}, state, { - loggedInChannel: action.data - }); - default: - return state; - } -}; - -var _channel_action_types = __webpack_require__(42); - -var actions = _interopRequireWildcard(_channel_action_types); - -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; } } - -var initialState = { - loggedInChannel: { - name: null, - shortId: null, - longId: null - } -}; - -/***/ }), -/* 90 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - - switch (action.type) { - // handle request - case actions.REQUEST_ERROR: - return Object.assign({}, state, { - request: Object.assign({}, state.request, { - error: action.data - }) - }); - case actions.REQUEST_UPDATE: - return Object.assign({}, state, { - request: Object.assign({}, state.request, { - type: action.data.requestType, - id: action.data.requestId - }) - }); - // store requests - case actions.REQUEST_LIST_ADD: - return Object.assign({}, state, { - requestList: Object.assign({}, state.requestList, _defineProperty({}, action.data.id, { - error: action.data.error, - key: action.data.key - })) - }); - // asset data - case actions.ASSET_ADD: - return Object.assign({}, state, { - assetList: Object.assign({}, state.assetList, _defineProperty({}, action.data.id, { - error: action.data.error, - name: action.data.name, - claimId: action.data.claimId, - shortId: action.data.shortId, - claimData: action.data.claimData - })) - }); - // channel data - case actions.CHANNEL_ADD: - return Object.assign({}, state, { - channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.id, { - name: action.data.name, - longId: action.data.longId, - shortId: action.data.shortId, - claimsData: action.data.claimsData - })) - }); - case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS: - return Object.assign({}, state, { - channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.channelListId, Object.assign({}, state.channelList[action.data.channelListId], { - claimsData: action.data.claimsData - }))) - }); - // display an asset - case actions.FILE_AVAILABILITY_UPDATE: - return Object.assign({}, state, { - displayAsset: Object.assign({}, state.displayAsset, { - status: action.data - }) - }); - case actions.DISPLAY_ASSET_ERROR: - return Object.assign({}, state, { - displayAsset: Object.assign({}, state.displayAsset, { - error: action.data, - status: _asset_display_states.ERROR - }) - }); - default: - return state; - } -}; - -var _show_action_types = __webpack_require__(9); - -var actions = _interopRequireWildcard(_show_action_types); - -var _asset_display_states = __webpack_require__(43); - -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 _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; } - -var initialState = { - request: { - error: null, - type: null, - id: null - }, - requestList: {}, - channelList: {}, - assetList: {}, - displayAsset: { - error: null, - status: _asset_display_states.LOCAL_CHECK - } -}; - -/***/ }), -/* 91 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - - switch (action.type) { - default: - return state; - } -}; - -var siteConfig = __webpack_require__(3); - -var googleAnalyticsId = siteConfig.analytics.googleId, - _siteConfig$assetDefa = siteConfig.assetDefaults, - defaultThumbnail = _siteConfig$assetDefa.thumbnail, - defaultDescription = _siteConfig$assetDefa.description, - _siteConfig$details = siteConfig.details, - description = _siteConfig$details.description, - host = _siteConfig$details.host, - title = _siteConfig$details.title, - twitter = _siteConfig$details.twitter; - - -var initialState = { - description: description, - googleAnalyticsId: googleAnalyticsId, - host: host, - title: title, - twitter: twitter, - defaultDescription: defaultDescription, - defaultThumbnail: defaultThumbnail -}; - -/***/ }), -/* 92 */ -/***/ (function(module, exports) { - -module.exports = require("react-ga"); - -/***/ }), -/* 93 */ -/***/ (function(module, exports) { - -module.exports = require("cross-fetch/polyfill"); - -/***/ }), -/* 94 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _NavBar = __webpack_require__(8); - -var _NavBar2 = _interopRequireDefault(_NavBar); - -var _SEO = __webpack_require__(10); - -var _SEO2 = _interopRequireDefault(_SEO); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var AboutPage = function (_React$Component) { - _inherits(AboutPage, _React$Component); - - function AboutPage() { - _classCallCheck(this, AboutPage); - - return _possibleConstructorReturn(this, (AboutPage.__proto__ || Object.getPrototypeOf(AboutPage)).apply(this, arguments)); - } - - _createClass(AboutPage, [{ - key: 'render', - value: function render() { - return _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_SEO2.default, { pageTitle: 'About', pageUri: 'about' }), - _react2.default.createElement(_NavBar2.default, null), - _react2.default.createElement( - 'div', - { className: 'row row--padded' }, - _react2.default.createElement( - 'div', - { className: 'column column--5 column--med-10 align-content-top' }, - _react2.default.createElement( - 'div', - { className: 'column column--8 column--med-10' }, - _react2.default.createElement( - 'p', - { className: 'pull-quote' }, - 'Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.' - ), - _react2.default.createElement( - 'p', - null, - _react2.default.createElement( - 'a', - { className: 'link--primary', target: '_blank', href: 'https://twitter.com/spee_ch' }, - 'TWITTER' - ) - ), - _react2.default.createElement( - 'p', - null, - _react2.default.createElement( - 'a', - { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch' }, - 'GITHUB' - ) - ), - _react2.default.createElement( - 'p', - null, - _react2.default.createElement( - 'a', - { className: 'link--primary', target: '_blank', href: 'https://discord.gg/YjYbwhS' }, - 'DISCORD CHANNEL' - ) - ), - _react2.default.createElement( - 'p', - null, - _react2.default.createElement( - 'a', - { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch/blob/master/README.md' }, - 'DOCUMENTATION' - ) - ) - ) - ), - _react2.default.createElement( - 'div', - { className: 'column column--5 column--med-10 align-content-top' }, - _react2.default.createElement( - 'div', - { className: 'column column--8 column--med-10' }, - _react2.default.createElement( - 'p', - null, - 'Spee.ch is a media-hosting site that reads from and publishes content to the ', - _react2.default.createElement( - 'a', - { className: 'link--primary', href: 'https://lbry.io' }, - 'LBRY' - ), - ' blockchain.' - ), - _react2.default.createElement( - 'p', - null, - 'Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the ', - _react2.default.createElement( - 'a', - { className: 'link--primary', href: 'https://lbry.io/get' }, - 'LBRY' - ), - ' network. This means that your images are stored in multiple locations without a single point of failure.' - ), - _react2.default.createElement( - 'h3', - null, - 'Contribute' - ), - _react2.default.createElement( - 'p', - null, - 'If you have an idea for your own spee.ch-like site on top of LBRY, fork our ', - _react2.default.createElement( - 'a', - { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch' }, - 'github repo' - ), - ' and go to town!' - ), - _react2.default.createElement( - 'p', - null, - 'If you want to improve spee.ch, join our ', - _react2.default.createElement( - 'a', - { className: 'link--primary', href: 'https://discord.gg/YjYbwhS' }, - 'discord channel' - ), - ' or solve one of our ', - _react2.default.createElement( - 'a', - { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch/issues' }, - 'github issues' - ), - '.' - ) - ) - ) - ) - ); - } - }]); - - return AboutPage; -}(_react2.default.Component); - -; - -exports.default = AboutPage; - -/***/ }), -/* 95 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reactRouterDom = __webpack_require__(4); - -var _Logo = __webpack_require__(96); - -var _Logo2 = _interopRequireDefault(_Logo); - -var _NavBarChannelOptionsDropdown = __webpack_require__(97); - -var _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown); - -var _request = __webpack_require__(6); - -var _request2 = _interopRequireDefault(_request); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var VIEW = 'VIEW'; -var LOGOUT = 'LOGOUT'; - -var NavBar = function (_React$Component) { - _inherits(NavBar, _React$Component); - - function NavBar(props) { - _classCallCheck(this, NavBar); - - var _this = _possibleConstructorReturn(this, (NavBar.__proto__ || Object.getPrototypeOf(NavBar)).call(this, props)); - - _this.checkForLoggedInUser = _this.checkForLoggedInUser.bind(_this); - _this.logoutUser = _this.logoutUser.bind(_this); - _this.handleSelection = _this.handleSelection.bind(_this); - return _this; - } - - _createClass(NavBar, [{ - key: 'componentDidMount', - value: function componentDidMount() { - // check to see if the user is already logged in - this.checkForLoggedInUser(); - } - }, { - key: 'checkForLoggedInUser', - value: function checkForLoggedInUser() { - var _this2 = this; - - var params = { credentials: 'include' }; - (0, _request2.default)('/user', params).then(function (_ref) { - var data = _ref.data; - - _this2.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId); - }).catch(function (error) { - console.log('/user error:', error.message); - }); - } - }, { - key: 'logoutUser', - value: function logoutUser() { - var _this3 = this; - - var params = { credentials: 'include' }; - (0, _request2.default)('/logout', params).then(function () { - _this3.props.onChannelLogout(); - }).catch(function (error) { - console.log('/logout error', error.message); - }); - } - }, { - key: 'handleSelection', - value: function handleSelection(event) { - var value = event.target.selectedOptions[0].value; - switch (value) { - case LOGOUT: - this.logoutUser(); - break; - case VIEW: - // redirect to channel page - this.props.history.push('/' + this.props.channelName + ':' + this.props.channelLongId); - break; - default: - break; - } - } - }, { - key: 'render', - value: function render() { - var siteDescription = this.props.siteDescription; - - return _react2.default.createElement( - 'div', - { className: 'row row--wide nav-bar' }, - _react2.default.createElement( - 'div', - { className: 'row row--padded row--short flex-container--row flex-container--space-between-center' }, - _react2.default.createElement(_Logo2.default, null), - _react2.default.createElement( - 'div', - { className: 'nav-bar--center' }, - _react2.default.createElement( - 'span', - { className: 'nav-bar-tagline' }, - siteDescription - ) - ), - _react2.default.createElement( - 'div', - { className: 'nav-bar--right' }, - _react2.default.createElement( - _reactRouterDom.NavLink, - { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/', exact: true }, - 'Publish' - ), - _react2.default.createElement( - _reactRouterDom.NavLink, - { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/about' }, - 'About' - ), - this.props.channelName ? _react2.default.createElement(_NavBarChannelOptionsDropdown2.default, { - channelName: this.props.channelName, - handleSelection: this.handleSelection, - defaultSelection: this.props.channelName, - VIEW: VIEW, - LOGOUT: LOGOUT - }) : _react2.default.createElement( - _reactRouterDom.NavLink, - { id: 'nav-bar-login-link', className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/login' }, - 'Channel' - ) - ) - ) - ); - } - }]); - - return NavBar; -}(_react2.default.Component); - -exports.default = (0, _reactRouterDom.withRouter)(NavBar); - -/***/ }), -/* 96 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reactRouterDom = __webpack_require__(4); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function Logo() { - return _react2.default.createElement( - 'svg', - { version: '1.1', id: 'Layer_1', x: '0px', y: '0px', height: '24px', viewBox: '0 0 80 31', enableBackground: 'new 0 0 80 31', className: 'nav-bar-logo' }, - _react2.default.createElement( - _reactRouterDom.Link, - { to: '/' }, - _react2.default.createElement( - 'title', - null, - 'Logo' - ), - _react2.default.createElement( - 'desc', - null, - 'Spee.ch logo' - ), - _react2.default.createElement( - 'g', - { id: 'About' }, - _react2.default.createElement( - 'g', - { id: 'Publish-Form-V2-_x28_filled_x29_', transform: 'translate(-42.000000, -23.000000)' }, - _react2.default.createElement( - 'g', - { id: 'Group-17', transform: 'translate(42.000000, 22.000000)' }, - _react2.default.createElement( - 'text', - { transform: 'matrix(1 0 0 1 0 20)', fontSize: '25', fontFamily: 'Roboto' }, - 'Spee' }) : _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true, - onClick: this.select, spellCheck: 'false', - value: '' - }) - ), - _react2.default.createElement('div', { className: 'column column--1' }), - _react2.default.createElement( - 'div', - { className: 'column column--2' }, - _react2.default.createElement( - 'button', - { className: 'button--primary button--wide', 'data-elementtocopy': 'embed-text', - onClick: this.copyToClipboard }, - 'copy' - ) - ) - ) - ) - ) - ), - _react2.default.createElement( - 'div', - { className: 'flex-container--row flex-container--space-between-bottom' }, - _react2.default.createElement( - _reactRouterDom.Link, - { className: 'link--primary', to: '/' + shortId + '/' + name + '.' + fileExt }, - _react2.default.createElement( - 'span', - { - className: 'text' }, - 'Direct Link' - ) - ), - _react2.default.createElement( - 'a', - { className: 'link--primary', href: host + '/' + claimId + '/' + name + '.' + fileExt, download: name }, - 'Download' - ), - _react2.default.createElement( - 'a', - { className: 'link--primary', target: '_blank', href: 'https://lbry.io/dmca' }, - 'Report' - ) - ) - ); - } - }]); - - return AssetInfo; -}(_react2.default.Component); - -; - -exports.default = AssetInfo; - -/***/ }), -/* 118 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(2); - -var _view = __webpack_require__(119); - -var _view2 = _interopRequireDefault(_view); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(_ref) { - var show = _ref.show; - - // select request info - var requestId = show.request.id; - // select request - var previousRequest = show.requestList[requestId] || null; - // select channel - var channel = void 0; - if (previousRequest) { - var channelKey = previousRequest.key; - channel = show.channelList[channelKey] || null; - } - return { - channel: channel - }; -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); - -/***/ }), -/* 119 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _SEO = __webpack_require__(10); - -var _SEO2 = _interopRequireDefault(_SEO); - -var _ErrorPage = __webpack_require__(27); - -var _ErrorPage2 = _interopRequireDefault(_ErrorPage); - -var _NavBar = __webpack_require__(8); - -var _NavBar2 = _interopRequireDefault(_NavBar); - -var _ChannelClaimsDisplay = __webpack_require__(120); - -var _ChannelClaimsDisplay2 = _interopRequireDefault(_ChannelClaimsDisplay); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var ShowChannel = function (_React$Component) { - _inherits(ShowChannel, _React$Component); - - function ShowChannel() { - _classCallCheck(this, ShowChannel); - - return _possibleConstructorReturn(this, (ShowChannel.__proto__ || Object.getPrototypeOf(ShowChannel)).apply(this, arguments)); - } - - _createClass(ShowChannel, [{ - key: 'render', - value: function render() { - var channel = this.props.channel; - - if (channel) { - var name = channel.name, - longId = channel.longId, - shortId = channel.shortId; - - return _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_SEO2.default, { pageTitle: name, channel: channel }), - _react2.default.createElement(_NavBar2.default, null), - _react2.default.createElement( - 'div', - { className: 'row row--tall row--padded' }, - _react2.default.createElement( - 'div', - { className: 'column column--10' }, - _react2.default.createElement( - 'h2', - null, - 'channel name: ', - name - ), - _react2.default.createElement( - 'p', - { className: 'fine-print' }, - 'full channel id: ', - longId - ), - _react2.default.createElement( - 'p', - { className: 'fine-print' }, - 'short channel id: ', - shortId - ) - ), - _react2.default.createElement( - 'div', - { className: 'column column--10' }, - _react2.default.createElement(_ChannelClaimsDisplay2.default, null) - ) - ) - ); - }; - return _react2.default.createElement(_ErrorPage2.default, { error: 'loading channel data...' }); - } - }]); - - return ShowChannel; -}(_react2.default.Component); - -; - -exports.default = ShowChannel; - -/***/ }), -/* 120 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(2); - -var _show = __webpack_require__(7); - -var _view = __webpack_require__(121); - -var _view2 = _interopRequireDefault(_view); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(_ref) { - var show = _ref.show; - - // select channel key - var request = show.requestList[show.request.id]; - var channelKey = request.key; - // select channel claims - var channel = show.channelList[channelKey] || null; - // return props - return { - channelKey: channelKey, - channel: channel - }; -}; - -var mapDispatchToProps = { - onUpdateChannelClaims: _show.onUpdateChannelClaims -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default); - -/***/ }), -/* 121 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _AssetPreview = __webpack_require__(122); - -var _AssetPreview2 = _interopRequireDefault(_AssetPreview); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var ChannelClaimsDisplay = function (_React$Component) { - _inherits(ChannelClaimsDisplay, _React$Component); - - function ChannelClaimsDisplay(props) { - _classCallCheck(this, ChannelClaimsDisplay); - - var _this = _possibleConstructorReturn(this, (ChannelClaimsDisplay.__proto__ || Object.getPrototypeOf(ChannelClaimsDisplay)).call(this, props)); - - _this.showNextResultsPage = _this.showNextResultsPage.bind(_this); - _this.showPreviousResultsPage = _this.showPreviousResultsPage.bind(_this); - return _this; - } - - _createClass(ChannelClaimsDisplay, [{ - key: 'showPreviousResultsPage', - value: function showPreviousResultsPage() { - var currentPage = this.props.channel.claimsData.currentPage; - - var previousPage = parseInt(currentPage) - 1; - this.showNewPage(previousPage); - } - }, { - key: 'showNextResultsPage', - value: function showNextResultsPage() { - var currentPage = this.props.channel.claimsData.currentPage; - - var nextPage = parseInt(currentPage) + 1; - this.showNewPage(nextPage); - } - }, { - key: 'showNewPage', - value: function showNewPage(page) { - var _props = this.props, - channelKey = _props.channelKey, - _props$channel = _props.channel, - name = _props$channel.name, - longId = _props$channel.longId; - - this.props.onUpdateChannelClaims(channelKey, name, longId, page); - } - }, { - key: 'render', - value: function render() { - var _props$channel$claims = this.props.channel.claimsData, - claims = _props$channel$claims.claims, - currentPage = _props$channel$claims.currentPage, - totalPages = _props$channel$claims.totalPages; - - return _react2.default.createElement( - 'div', - { className: 'row row--tall' }, - claims.length > 0 ? _react2.default.createElement( - 'div', - null, - claims.map(function (claim, index) { - return _react2.default.createElement(_AssetPreview2.default, { - claimData: claim, - key: claim.name + '-' + index - }); - }), - _react2.default.createElement( - 'div', - null, - currentPage > 1 && _react2.default.createElement( - 'button', - { className: 'button--secondary', onClick: this.showPreviousResultsPage }, - 'Previous Page' - ), - currentPage < totalPages && _react2.default.createElement( - 'button', - { className: 'button--secondary', onClick: this.showNextResultsPage }, - 'Next Page' - ) - ) - ) : _react2.default.createElement( - 'p', - null, - 'There are no claims in this channel' - ) - ); - } - }]); - - return ChannelClaimsDisplay; -}(_react2.default.Component); - -; - -exports.default = ChannelClaimsDisplay; - -/***/ }), -/* 122 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(2); - -var _view = __webpack_require__(123); - -var _view2 = _interopRequireDefault(_view); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(_ref) { - var defaultThumbnail = _ref.site.defaults.defaultThumbnail; - - return { - defaultThumbnail: defaultThumbnail - }; -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); - -/***/ }), -/* 123 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reactRouterDom = __webpack_require__(4); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var AssetPreview = function AssetPreview(_ref) { - var defaultThumbnail = _ref.defaultThumbnail, - _ref$claimData = _ref.claimData, - name = _ref$claimData.name, - claimId = _ref$claimData.claimId, - fileExt = _ref$claimData.fileExt, - contentType = _ref$claimData.contentType, - thumbnail = _ref$claimData.thumbnail; - - var directSourceLink = claimId + '/' + name + '.' + fileExt; - var showUrlLink = '/' + claimId + '/' + name; - return _react2.default.createElement( - 'div', - { className: 'asset-holder' }, - _react2.default.createElement( - _reactRouterDom.Link, - { to: showUrlLink }, - function () { - switch (contentType) { - case 'image/jpeg': - case 'image/jpg': - case 'image/png': - case 'image/gif': - return _react2.default.createElement('img', { - className: 'asset-preview', - src: directSourceLink, - alt: name - }); - case 'video/mp4': - return _react2.default.createElement('img', { - className: 'asset-preview video', - src: thumbnail || defaultThumbnail, - alt: name - }); - default: - return _react2.default.createElement( - 'p', - null, - 'unsupported file type' - ); - } - }() - ) - ); -}; - -exports.default = AssetPreview; - -/***/ }), -/* 124 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reactRedux = __webpack_require__(2); - -var _view = __webpack_require__(125); - -var _view2 = _interopRequireDefault(_view); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var mapStateToProps = function mapStateToProps(_ref) { - var _ref$site = _ref.site, - host = _ref$site.host, - title = _ref$site.title; - - return { - host: host, - title: title - }; -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default); - -/***/ }), -/* 125 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _NavBar = __webpack_require__(8); - -var _NavBar2 = _interopRequireDefault(_NavBar); - -var _reactHelmet = __webpack_require__(13); - -var _reactHelmet2 = _interopRequireDefault(_reactHelmet); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var FourOhForPage = function (_React$Component) { - _inherits(FourOhForPage, _React$Component); - - function FourOhForPage() { - _classCallCheck(this, FourOhForPage); - - return _possibleConstructorReturn(this, (FourOhForPage.__proto__ || Object.getPrototypeOf(FourOhForPage)).apply(this, arguments)); - } - - _createClass(FourOhForPage, [{ - key: 'render', - value: function render() { - var _props = this.props, - title = _props.title, - host = _props.host; - - return _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reactHelmet2.default, - null, - _react2.default.createElement( - 'title', - null, - title, - ' - 404' - ), - _react2.default.createElement('link', { rel: 'canonical', href: host + '/404' }) - ), - _react2.default.createElement(_NavBar2.default, null), - _react2.default.createElement( - 'div', - { className: 'row row--padded' }, - _react2.default.createElement( - 'h2', - null, - '404' - ), - _react2.default.createElement( - 'p', - null, - 'That page does not exist' - ) - ) - ); - } - }]); - - return FourOhForPage; -}(_react2.default.Component); - -; - -exports.default = FourOhForPage; - -/***/ }), -/* 126 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var _require = __webpack_require__(17), - sendGAServeEvent = _require.sendGAServeEvent; - -var _require2 = __webpack_require__(127), - determineResponseType = _require2.determineResponseType, - flipClaimNameAndIdForBackwardsCompatibility = _require2.flipClaimNameAndIdForBackwardsCompatibility, - logRequestData = _require2.logRequestData, - getClaimIdAndServeAsset = _require2.getClaimIdAndServeAsset; - -var lbryUri = __webpack_require__(128); -var handleShowRender = __webpack_require__(129); -var SERVE = 'SERVE'; - -module.exports = function (app) { - // route to serve a specific asset using the channel or claim id - app.get('/:identifier/:claim', function (req, res) { - var headers = req.headers, - ip = req.ip, - originalUrl = req.originalUrl, - params = req.params; - // decide if this is a show request - - var hasFileExtension = void 0; - try { - var _lbryUri$parseModifie = lbryUri.parseModifier(params.claim); - - hasFileExtension = _lbryUri$parseModifie.hasFileExtension; - } catch (error) { - return res.status(400).json({ success: false, message: error.message }); - } - var responseType = determineResponseType(hasFileExtension, headers); - if (responseType !== SERVE) { - return handleShowRender(req, res); - } - // handle serve request - // send google analytics - sendGAServeEvent(headers, ip, originalUrl); - // parse the claim - var claimName = void 0; - try { - var _lbryUri$parseClaim = lbryUri.parseClaim(params.claim); - - claimName = _lbryUri$parseClaim.claimName; - } catch (error) { - return res.status(400).json({ success: false, message: error.message }); - } - // parse the identifier - var isChannel = void 0, - channelName = void 0, - channelClaimId = void 0, - claimId = void 0; - try { - var _lbryUri$parseIdentif = lbryUri.parseIdentifier(params.identifier); - - isChannel = _lbryUri$parseIdentif.isChannel; - channelName = _lbryUri$parseIdentif.channelName; - channelClaimId = _lbryUri$parseIdentif.channelClaimId; - claimId = _lbryUri$parseIdentif.claimId; - } catch (error) { - return res.status(400).json({ success: false, message: error.message }); - } - if (!isChannel) { - var _flipClaimNameAndIdFo = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName); - - var _flipClaimNameAndIdFo2 = _slicedToArray(_flipClaimNameAndIdFo, 2); - - claimId = _flipClaimNameAndIdFo2[0]; - claimName = _flipClaimNameAndIdFo2[1]; - } - // log the request data for debugging - logRequestData(responseType, claimName, channelName, claimId); - // get the claim Id and then serve the asset - getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res); - }); - // route to serve the winning asset at a claim or a channel page - app.get('/:claim', function (req, res) { - var headers = req.headers, - ip = req.ip, - originalUrl = req.originalUrl, - params = req.params; - // decide if this is a show request - - var hasFileExtension = void 0; - try { - var _lbryUri$parseModifie2 = lbryUri.parseModifier(params.claim); - - hasFileExtension = _lbryUri$parseModifie2.hasFileExtension; - } catch (error) { - return res.status(400).json({ success: false, message: error.message }); - } - var responseType = determineResponseType(hasFileExtension, headers); - if (responseType !== SERVE) { - return handleShowRender(req, res); - } - // handle serve request - // send google analytics - sendGAServeEvent(headers, ip, originalUrl); - // parse the claim - var claimName = void 0; - try { - var _lbryUri$parseClaim2 = lbryUri.parseClaim(params.claim); - - claimName = _lbryUri$parseClaim2.claimName; - } catch (error) { - return res.status(400).json({ success: false, message: error.message }); - } - // log the request data for debugging - logRequestData(responseType, claimName, null, null); - // get the claim Id and then serve the asset - getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res); - }); -}; - -/***/ }), -/* 127 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var logger = __webpack_require__(1); - -var _require = __webpack_require__(37), - getClaimId = _require.getClaimId, - getLocalFileRecord = _require.getLocalFileRecord; - -var _require2 = __webpack_require__(36), - handleErrorResponse = _require2.handleErrorResponse; - -var SERVE = 'SERVE'; -var SHOW = 'SHOW'; -var NO_FILE = 'NO_FILE'; -var NO_CHANNEL = 'NO_CHANNEL'; -var NO_CLAIM = 'NO_CLAIM'; - -function clientAcceptsHtml(_ref) { - var accept = _ref.accept; - - return accept && accept.match(/text\/html/); -}; - -function requestIsFromBrowser(headers) { - return headers['user-agent'] && headers['user-agent'].match(/Mozilla/); -}; - -function clientWantsAsset(_ref2) { - var accept = _ref2.accept, - range = _ref2.range; - - var imageIsWanted = accept && accept.match(/image\/.*/) && !accept.match(/text\/html/) && !accept.match(/text\/\*/); - var videoIsWanted = accept && range; - return imageIsWanted || videoIsWanted; -}; - -function isValidClaimId(claimId) { - return claimId.length === 40 && !/[^A-Za-z0-9]/g.test(claimId); -}; - -function isValidShortId(claimId) { - return claimId.length === 1; // it should really evaluate the short url itself -}; - -function isValidShortIdOrClaimId(input) { - return isValidClaimId(input) || isValidShortId(input); -}; - -function serveAssetToClient(claimId, name, res) { - return getLocalFileRecord(claimId, name).then(function (fileRecord) { - // check that a local record was found - if (fileRecord === NO_FILE) { - return res.status(307).redirect('/api/claim/get/' + name + '/' + claimId); - } - // serve the file - var filePath = fileRecord.filePath, - fileType = fileRecord.fileType; - - logger.verbose('serving file: ' + filePath); - var sendFileOptions = { - headers: { - 'X-Content-Type-Options': 'nosniff', - 'Content-Type': fileType || 'image/jpeg' - } - }; - res.status(200).sendFile(filePath, sendFileOptions); - }).catch(function (error) { - throw error; - }); -}; - -module.exports = { - getClaimIdAndServeAsset: function getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) { - // get the claim Id and then serve the asset - getClaimId(channelName, channelClaimId, claimName, claimId).then(function (fullClaimId) { - if (fullClaimId === NO_CLAIM) { - return res.status(404).json({ success: false, message: 'no claim id could be found' }); - } else if (fullClaimId === NO_CHANNEL) { - return res.status(404).json({ success: false, message: 'no channel id could be found' }); - } - serveAssetToClient(fullClaimId, claimName, res); - // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success'); - }).catch(function (error) { - handleErrorResponse(originalUrl, ip, error, res); - // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail'); - }); - }, - determineResponseType: function determineResponseType(hasFileExtension, headers) { - var responseType = void 0; - if (hasFileExtension) { - responseType = SERVE; // assume a serve request if file extension is present - if (clientAcceptsHtml(headers)) { - // if the request comes from a browser, change it to a show request - responseType = SHOW; - } - } else { - responseType = SHOW; - if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) { - // this is in case someone embeds a show url - logger.debug('Show request came from browser but wants an image/video. Changing response to serve...'); - responseType = SERVE; - } - } - return responseType; - }, - flipClaimNameAndIdForBackwardsCompatibility: function flipClaimNameAndIdForBackwardsCompatibility(identifier, name) { - // this is a patch for backwards compatability with '/name/claim_id' url format - if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) { - var tempName = name; - name = identifier; - identifier = tempName; - } - return [identifier, name]; - }, - logRequestData: function logRequestData(responseType, claimName, channelName, claimId) { - logger.debug('responseType ===', responseType); - logger.debug('claim name === ', claimName); - logger.debug('channel name ===', channelName); - logger.debug('claim id ===', claimId); - } -}; - -/***/ }), -/* 128 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var logger = __webpack_require__(1); - -module.exports = { - REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g, - REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g, - REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/, - CHANNEL_CHAR: '@', - parseIdentifier: function parseIdentifier(identifier) { - logger.debug('parsing identifier:', identifier); - var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end) - '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end) - ); - - var _componentsRegex$exec = componentsRegex.exec(identifier).map(function (match) { - return match || null; - }), - _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4), - proto = _componentsRegex$exec2[0], - value = _componentsRegex$exec2[1], - modifierSeperator = _componentsRegex$exec2[2], - modifier = _componentsRegex$exec2[3]; - - logger.debug(proto + ', ' + value + ', ' + modifierSeperator + ', ' + modifier); - - // Validate and process name - if (!value) { - throw new Error('Check your url. No channel name provided before "' + modifierSeperator + '"'); - } - var isChannel = value.startsWith(module.exports.CHANNEL_CHAR); - var channelName = isChannel ? value : null; - var claimId = void 0; - if (isChannel) { - if (!channelName) { - throw new Error('No channel name after @.'); - } - var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL); - if (nameBadChars) { - throw new Error('Invalid characters in channel name: ' + nameBadChars.join(', ') + '.'); - } - } else { - claimId = value; - } - - // Validate and process modifier - var channelClaimId = void 0; - if (modifierSeperator) { - if (!modifier) { - throw new Error('No modifier provided after separator "' + modifierSeperator + '"'); - } - - if (modifierSeperator === ':') { - channelClaimId = modifier; - } else { - throw new Error('The "' + modifierSeperator + '" modifier is not currently supported'); - } - } - return { - isChannel: isChannel, - channelName: channelName, - channelClaimId: channelClaimId, - claimId: claimId - }; - }, - parseClaim: function parseClaim(claim) { - logger.debug('parsing name:', claim); - var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier) - '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end) - ); - - var _componentsRegex$exec3 = componentsRegex.exec(claim).map(function (match) { - return match || null; - }), - _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4), - proto = _componentsRegex$exec4[0], - claimName = _componentsRegex$exec4[1], - modifierSeperator = _componentsRegex$exec4[2], - modifier = _componentsRegex$exec4[3]; - - logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier); - - // Validate and process name - if (!claimName) { - throw new Error('No claim name provided before .'); - } - var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM); - if (nameBadChars) { - throw new Error('Invalid characters in claim name: ' + nameBadChars.join(', ') + '.'); - } - // Validate and process modifier - if (modifierSeperator) { - if (!modifier) { - throw new Error('No file extension provided after separator ' + modifierSeperator + '.'); - } - if (modifierSeperator !== '.') { - throw new Error('The ' + modifierSeperator + ' modifier is not supported in the claim name'); - } - } - // return results - return { - claimName: claimName - }; - }, - parseModifier: function parseModifier(claim) { - logger.debug('parsing modifier:', claim); - var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier) - '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end) - ); - - var _componentsRegex$exec5 = componentsRegex.exec(claim).map(function (match) { - return match || null; - }), - _componentsRegex$exec6 = _slicedToArray(_componentsRegex$exec5, 4), - proto = _componentsRegex$exec6[0], - claimName = _componentsRegex$exec6[1], - modifierSeperator = _componentsRegex$exec6[2], - modifier = _componentsRegex$exec6[3]; - - logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier); - // Validate and process modifier - var hasFileExtension = false; - if (modifierSeperator) { - hasFileExtension = true; - } - return { - hasFileExtension: hasFileExtension - }; - } -}; - -/***/ }), -/* 129 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _server = __webpack_require__(39); - -var _redux = __webpack_require__(18); - -var _index = __webpack_require__(40); - -var _index2 = _interopRequireDefault(_index); - -var _reactRedux = __webpack_require__(2); - -var _reactRouterDom = __webpack_require__(4); - -var _index3 = __webpack_require__(44); - -var _index4 = _interopRequireDefault(_index3); - -var _app = __webpack_require__(45); - -var _app2 = _interopRequireDefault(_app); - -var _renderFullPage = __webpack_require__(53); - -var _renderFullPage2 = _interopRequireDefault(_renderFullPage); - -var _reduxSaga = __webpack_require__(130); - -var _reduxSaga2 = _interopRequireDefault(_reduxSaga); - -var _effects = __webpack_require__(14); - -var _show_uri = __webpack_require__(131); - -var _show = __webpack_require__(7); - -var _reactHelmet = __webpack_require__(13); - -var _reactHelmet2 = _interopRequireDefault(_reactHelmet); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var returnSagaWithParams = function returnSagaWithParams(saga, params) { - return (/*#__PURE__*/regeneratorRuntime.mark(function _callee() { - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return (0, _effects.call)(saga, params); - - case 2: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - }) - ); -}; - -module.exports = function (req, res) { - var context = {}; - - // create and apply middleware - var sagaMiddleware = (0, _reduxSaga2.default)(); - var middleware = (0, _redux.applyMiddleware)(sagaMiddleware); - - // create a new Redux store instance - var store = (0, _redux.createStore)(_index2.default, middleware); - - // create saga - var action = (0, _show.onHandleShowPageUri)(req.params); - var saga = returnSagaWithParams(_show_uri.handleShowPageUri, action); - - // run the saga middleware - sagaMiddleware.run(saga).done.then(function () { - // render component to a string - var html = (0, _server.renderToString)(_react2.default.createElement( - _reactRedux.Provider, - { store: store }, - _react2.default.createElement( - _reactRouterDom.StaticRouter, - { location: req.url, context: context }, - _react2.default.createElement( - _index4.default, - null, - _react2.default.createElement(_app2.default, null) - ) - ) - )); - - // get head tags from helmet - var helmet = _reactHelmet2.default.renderStatic(); - - // check for a redirect - if (context.url) { - return res.redirect(301, context.url); - } - - // get the initial state from our Redux store - var preloadedState = store.getState(); - - // send the rendered page back to the client - res.send((0, _renderFullPage2.default)(helmet, html, preloadedState)); - }); -}; - -/***/ }), -/* 130 */ -/***/ (function(module, exports) { - -module.exports = require("redux-saga"); - -/***/ }), -/* 131 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.handleShowPageUri = handleShowPageUri; -exports.watchHandleShowPageUri = watchHandleShowPageUri; - -var _effects = __webpack_require__(14); - -var _show_action_types = __webpack_require__(9); - -var actions = _interopRequireWildcard(_show_action_types); - -var _show = __webpack_require__(7); - -var _show_asset = __webpack_require__(132); - -var _show_channel = __webpack_require__(134); - -var _lbryUri = __webpack_require__(21); - -var _lbryUri2 = _interopRequireDefault(_lbryUri); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -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; } } - -var _marked = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateIdentifierAndClaim), - _marked2 = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateClaimOnly), - _marked3 = /*#__PURE__*/regeneratorRuntime.mark(handleShowPageUri), - _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchHandleShowPageUri); - -function parseAndUpdateIdentifierAndClaim(modifier, claim) { - var isChannel, channelName, channelClaimId, claimId, claimName, extension, _lbryUri$parseIdentif, _lbryUri$parseClaim; - - return regeneratorRuntime.wrap(function parseAndUpdateIdentifierAndClaim$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - // this is a request for an asset - // claim will be an asset claim - // the identifier could be a channel or a claim id - isChannel = void 0, channelName = void 0, channelClaimId = void 0, claimId = void 0, claimName = void 0, extension = void 0; - _context.prev = 1; - _lbryUri$parseIdentif = _lbryUri2.default.parseIdentifier(modifier); - isChannel = _lbryUri$parseIdentif.isChannel; - channelName = _lbryUri$parseIdentif.channelName; - channelClaimId = _lbryUri$parseIdentif.channelClaimId; - claimId = _lbryUri$parseIdentif.claimId; - _lbryUri$parseClaim = _lbryUri2.default.parseClaim(claim); - claimName = _lbryUri$parseClaim.claimName; - extension = _lbryUri$parseClaim.extension; - _context.next = 17; - break; - - case 12: - _context.prev = 12; - _context.t0 = _context['catch'](1); - _context.next = 16; - return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message)); - - case 16: - return _context.abrupt('return', _context.sent); - - case 17: - if (!isChannel) { - _context.next = 21; - break; - } - - _context.next = 20; - return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, channelName, channelClaimId, extension)); - - case 20: - return _context.abrupt('return', _context.sent); - - case 21: - ; - _context.next = 24; - return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, claimId, null, null, extension)); - - case 24: - case 'end': - return _context.stop(); - } - } - }, _marked, this, [[1, 12]]); -} -function parseAndUpdateClaimOnly(claim) { - var isChannel, channelName, channelClaimId, _lbryUri$parseIdentif2, claimName, extension, _lbryUri$parseClaim2; - - return regeneratorRuntime.wrap(function parseAndUpdateClaimOnly$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - // this could be a request for an asset or a channel page - // claim could be an asset claim or a channel claim - isChannel = void 0, channelName = void 0, channelClaimId = void 0; - _context2.prev = 1; - _lbryUri$parseIdentif2 = _lbryUri2.default.parseIdentifier(claim); - isChannel = _lbryUri$parseIdentif2.isChannel; - channelName = _lbryUri$parseIdentif2.channelName; - channelClaimId = _lbryUri$parseIdentif2.channelClaimId; - _context2.next = 13; - break; - - case 8: - _context2.prev = 8; - _context2.t0 = _context2['catch'](1); - _context2.next = 12; - return (0, _effects.put)((0, _show.onRequestError)(_context2.t0.message)); - - case 12: - return _context2.abrupt('return', _context2.sent); - - case 13: - if (!isChannel) { - _context2.next = 17; - break; - } - - _context2.next = 16; - return (0, _effects.call)(_show_channel.newChannelRequest, (0, _show.onNewChannelRequest)(channelName, channelClaimId)); - - case 16: - return _context2.abrupt('return', _context2.sent); - - case 17: - // if not for a channel, parse the claim request - claimName = void 0, extension = void 0; - _context2.prev = 18; - _lbryUri$parseClaim2 = _lbryUri2.default.parseClaim(claim); - claimName = _lbryUri$parseClaim2.claimName; - extension = _lbryUri$parseClaim2.extension; - _context2.next = 29; - break; - - case 24: - _context2.prev = 24; - _context2.t1 = _context2['catch'](18); - _context2.next = 28; - return (0, _effects.put)((0, _show.onRequestError)(_context2.t1.message)); - - case 28: - return _context2.abrupt('return', _context2.sent); - - case 29: - _context2.next = 31; - return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, null, null, extension)); - - case 31: - case 'end': - return _context2.stop(); - } - } - }, _marked2, this, [[1, 8], [18, 24]]); -} - -function handleShowPageUri(action) { - var _action$data, identifier, claim; - - return regeneratorRuntime.wrap(function handleShowPageUri$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - _action$data = action.data, identifier = _action$data.identifier, claim = _action$data.claim; - - if (!identifier) { - _context3.next = 5; - break; - } - - _context3.next = 4; - return (0, _effects.call)(parseAndUpdateIdentifierAndClaim, identifier, claim); - - case 4: - return _context3.abrupt('return', _context3.sent); - - case 5: - _context3.next = 7; - return (0, _effects.call)(parseAndUpdateClaimOnly, claim); - - case 7: - case 'end': - return _context3.stop(); - } - } - }, _marked3, this); -}; - -function watchHandleShowPageUri() { - return regeneratorRuntime.wrap(function watchHandleShowPageUri$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - _context4.next = 2; - return (0, _effects.takeLatest)(actions.HANDLE_SHOW_URI, handleShowPageUri); - - case 2: - case 'end': - return _context4.stop(); - } - } - }, _marked4, this); -}; - -/***/ }), -/* 132 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.newAssetRequest = newAssetRequest; -exports.watchNewAssetRequest = watchNewAssetRequest; - -var _effects = __webpack_require__(14); - -var _show_action_types = __webpack_require__(9); - -var actions = _interopRequireWildcard(_show_action_types); - -var _show = __webpack_require__(7); - -var _assetApi = __webpack_require__(133); - -var _show2 = __webpack_require__(11); - -var _site = __webpack_require__(54); - -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; } } - -var _marked = /*#__PURE__*/regeneratorRuntime.mark(newAssetRequest), - _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewAssetRequest); - -function newAssetRequest(action) { - var _action$data, requestType, requestId, name, modifier, state, host, longId, _ref, assetKey, shortId, _ref2, claimData, _ref3; - - return regeneratorRuntime.wrap(function newAssetRequest$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, name = _action$data.name, modifier = _action$data.modifier; - // put an action to update the request in redux - - _context.next = 3; - return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId)); - - case 3: - _context.next = 5; - return (0, _effects.select)(_show2.selectShowState); - - case 5: - state = _context.sent; - _context.next = 8; - return (0, _effects.select)(_site.selectSiteHost); - - case 8: - host = _context.sent; - - if (!state.requestList[requestId]) { - _context.next = 11; - break; - } - - return _context.abrupt('return', null); - - case 11: - // get long id && add request to request list - longId = void 0; - _context.prev = 12; - _context.next = 15; - return (0, _effects.call)(_assetApi.getLongClaimId, host, name, modifier); - - case 15: - _ref = _context.sent; - longId = _ref.data; - _context.next = 24; - break; - - case 19: - _context.prev = 19; - _context.t0 = _context['catch'](12); - _context.next = 23; - return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message)); - - case 23: - return _context.abrupt('return', _context.sent); - - case 24: - assetKey = 'a#' + name + '#' + longId; - _context.next = 27; - return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, assetKey)); - - case 27: - if (!state.assetList[assetKey]) { - _context.next = 29; - break; - } - - return _context.abrupt('return', null); - - case 29: - // get short Id - shortId = void 0; - _context.prev = 30; - _context.next = 33; - return (0, _effects.call)(_assetApi.getShortId, host, name, longId); - - case 33: - _ref2 = _context.sent; - shortId = _ref2.data; - _context.next = 42; - break; - - case 37: - _context.prev = 37; - _context.t1 = _context['catch'](30); - _context.next = 41; - return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message)); - - case 41: - return _context.abrupt('return', _context.sent); - - case 42: - // get asset claim data - claimData = void 0; - _context.prev = 43; - _context.next = 46; - return (0, _effects.call)(_assetApi.getClaimData, host, name, longId); - - case 46: - _ref3 = _context.sent; - claimData = _ref3.data; - _context.next = 55; - break; - - case 50: - _context.prev = 50; - _context.t2 = _context['catch'](43); - _context.next = 54; - return (0, _effects.put)((0, _show.onRequestError)(_context.t2.message)); - - case 54: - return _context.abrupt('return', _context.sent); - - case 55: - _context.next = 57; - return (0, _effects.put)((0, _show.addAssetToAssetList)(assetKey, null, name, longId, shortId, claimData)); - - case 57: - _context.next = 59; - return (0, _effects.put)((0, _show.onRequestError)(null)); - - case 59: - case 'end': - return _context.stop(); - } - } - }, _marked, this, [[12, 19], [30, 37], [43, 50]]); -}; - -function watchNewAssetRequest() { - return regeneratorRuntime.wrap(function watchNewAssetRequest$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - _context2.next = 2; - return (0, _effects.takeLatest)(actions.ASSET_REQUEST_NEW, newAssetRequest); - - case 2: - case 'end': - return _context2.stop(); - } - } - }, _marked2, this); -}; - -/***/ }), -/* 133 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getLongClaimId = getLongClaimId; -exports.getShortId = getShortId; -exports.getClaimData = getClaimData; - -var _request = __webpack_require__(6); - -var _request2 = _interopRequireDefault(_request); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getLongClaimId(host, name, modifier) { - var body = {}; - // create request params - if (modifier) { - if (modifier.id) { - body['claimId'] = modifier.id; - } else { - body['channelName'] = modifier.channel.name; - body['channelClaimId'] = modifier.channel.id; - } - } - body['claimName'] = name; - var params = { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(body) - }; - // create url - var url = host + '/api/claim/long-id'; - // return the request promise - return (0, _request2.default)(url, params); -}; - -function getShortId(host, name, claimId) { - var url = host + '/api/claim/short-id/' + claimId + '/' + name; - return (0, _request2.default)(url); -}; - -function getClaimData(host, name, claimId) { - var url = host + '/api/claim/data/' + name + '/' + claimId; - return (0, _request2.default)(url); -}; - -/***/ }), -/* 134 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.newChannelRequest = newChannelRequest; -exports.watchNewChannelRequest = watchNewChannelRequest; -exports.watchUpdateChannelClaims = watchUpdateChannelClaims; - -var _effects = __webpack_require__(14); - -var _show_action_types = __webpack_require__(9); - -var actions = _interopRequireWildcard(_show_action_types); - -var _show = __webpack_require__(7); - -var _channelApi = __webpack_require__(135); - -var _show2 = __webpack_require__(11); - -var _site = __webpack_require__(54); - -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; } } - -var _marked = /*#__PURE__*/regeneratorRuntime.mark(newChannelRequest), - _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewChannelRequest), - _marked3 = /*#__PURE__*/regeneratorRuntime.mark(getNewClaimsAndUpdateChannel), - _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchUpdateChannelClaims); - -function newChannelRequest(action) { - var _action$data, requestType, requestId, channelName, channelId, state, host, longId, shortId, _ref, _ref$data, channelKey, claimsData, _ref2; - - return regeneratorRuntime.wrap(function newChannelRequest$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, channelName = _action$data.channelName, channelId = _action$data.channelId; - // put an action to update the request in redux - - _context.next = 3; - return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId)); - - case 3: - _context.next = 5; - return (0, _effects.select)(_show2.selectShowState); - - case 5: - state = _context.sent; - _context.next = 8; - return (0, _effects.select)(_site.selectSiteHost); - - case 8: - host = _context.sent; - - if (!state.requestList[requestId]) { - _context.next = 11; - break; - } - - return _context.abrupt('return', null); - - case 11: - // get channel long id - longId = void 0, shortId = void 0; - _context.prev = 12; - _context.next = 15; - return (0, _effects.call)(_channelApi.getChannelData, host, channelName, channelId); - - case 15: - _ref = _context.sent; - _ref$data = _ref.data; - longId = _ref$data.longChannelClaimId; - shortId = _ref$data.shortChannelClaimId; - _context.next = 26; - break; - - case 21: - _context.prev = 21; - _context.t0 = _context['catch'](12); - _context.next = 25; - return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message)); - - case 25: - return _context.abrupt('return', _context.sent); - - case 26: - // store the request in the channel requests list - channelKey = 'c#' + channelName + '#' + longId; - _context.next = 29; - return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, channelKey)); - - case 29: - if (!state.channelList[channelKey]) { - _context.next = 31; - break; - } - - return _context.abrupt('return', null); - - case 31: - // get channel claims data - claimsData = void 0; - _context.prev = 32; - _context.next = 35; - return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, channelName, 1); - - case 35: - _ref2 = _context.sent; - claimsData = _ref2.data; - _context.next = 44; - break; - - case 39: - _context.prev = 39; - _context.t1 = _context['catch'](32); - _context.next = 43; - return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message)); - - case 43: - return _context.abrupt('return', _context.sent); - - case 44: - _context.next = 46; - return (0, _effects.put)((0, _show.addNewChannelToChannelList)(channelKey, channelName, shortId, longId, claimsData)); - - case 46: - _context.next = 48; - return (0, _effects.put)((0, _show.onRequestError)(null)); - - case 48: - case 'end': - return _context.stop(); - } - } - }, _marked, this, [[12, 21], [32, 39]]); -} - -function watchNewChannelRequest() { - return regeneratorRuntime.wrap(function watchNewChannelRequest$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - _context2.next = 2; - return (0, _effects.takeLatest)(actions.CHANNEL_REQUEST_NEW, newChannelRequest); - - case 2: - case 'end': - return _context2.stop(); - } - } - }, _marked2, this); -}; - -function getNewClaimsAndUpdateChannel(action) { - var _action$data2, channelKey, name, longId, page, host, claimsData, _ref3; - - return regeneratorRuntime.wrap(function getNewClaimsAndUpdateChannel$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - _action$data2 = action.data, channelKey = _action$data2.channelKey, name = _action$data2.name, longId = _action$data2.longId, page = _action$data2.page; - _context3.next = 3; - return (0, _effects.select)(_site.selectSiteHost); - - case 3: - host = _context3.sent; - claimsData = void 0; - _context3.prev = 5; - _context3.next = 8; - return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, name, page); - - case 8: - _ref3 = _context3.sent; - claimsData = _ref3.data; - _context3.next = 17; - break; - - case 12: - _context3.prev = 12; - _context3.t0 = _context3['catch'](5); - _context3.next = 16; - return (0, _effects.put)((0, _show.onRequestError)(_context3.t0.message)); - - case 16: - return _context3.abrupt('return', _context3.sent); - - case 17: - _context3.next = 19; - return (0, _effects.put)((0, _show.updateChannelClaims)(channelKey, claimsData)); - - case 19: - case 'end': - return _context3.stop(); - } - } - }, _marked3, this, [[5, 12]]); -} - -function watchUpdateChannelClaims() { - return regeneratorRuntime.wrap(function watchUpdateChannelClaims$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - _context4.next = 2; - return (0, _effects.takeLatest)(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel); - - case 2: - case 'end': - return _context4.stop(); - } - } - }, _marked4, this); -} - -/***/ }), -/* 135 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getChannelData = getChannelData; -exports.getChannelClaims = getChannelClaims; - -var _request = __webpack_require__(6); - -var _request2 = _interopRequireDefault(_request); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getChannelData(host, id, name) { - if (!id) id = 'none'; - var url = host + '/api/channel/data/' + name + '/' + id; - return (0, _request2.default)(url); -}; - -function getChannelClaims(host, longId, name, page) { - if (!page) page = 1; - var url = host + '/api/channel/claims/' + name + '/' + longId + '/' + page; - return (0, _request2.default)(url); -}; - -/***/ }), -/* 136 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var handlePageRender = __webpack_require__(38); - -module.exports = function (app) { - // a catch-all route if someone visits a page that does not exist - app.use('*', function (req, res) { - // send response - handlePageRender(req, res); - }); -}; - -/***/ }), -/* 137 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _require = __webpack_require__(138), - logLevel = _require.logLevel; - -module.exports = function (winston) { - // configure - winston.configure({ - transports: [new winston.transports.Console({ - level: logLevel, - timestamp: false, - colorize: true, - prettyPrint: true, - handleExceptions: true, - humanReadableUnhandledException: true - })] - }); - // test all the log levels - winston.error('Level 0'); - winston.warn('Level 1'); - winston.info('Level 2'); - winston.verbose('Level 3'); - winston.debug('Level 4'); - winston.silly('Level 5'); -}; - -/***/ }), -/* 138 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var loggerConfig = { - logLevel: 'debug' // options: silly, debug, verbose, info -}; - -module.exports = loggerConfig; - -/***/ }), -/* 139 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var winstonSlackWebHook = __webpack_require__(140).SlackWebHook; -var slackConfig = __webpack_require__(30); - -module.exports = function (winston) { - var slackWebHook = slackConfig.slackWebHook, - slackErrorChannel = slackConfig.slackErrorChannel, - slackInfoChannel = slackConfig.slackInfoChannel; - - if (slackWebHook) { - // add a transport for errors to slack - if (slackErrorChannel) { - winston.add(winstonSlackWebHook, { - name: 'slack-errors-transport', - level: 'warn', - webhookUrl: slackWebHook, - channel: slackErrorChannel, - username: 'spee.ch', - iconEmoji: ':face_with_head_bandage:' - }); - }; - if (slackInfoChannel) { - winston.add(winstonSlackWebHook, { - name: 'slack-info-transport', - level: 'info', - webhookUrl: slackWebHook, - channel: slackInfoChannel, - username: 'spee.ch', - iconEmoji: ':nerd_face:' - }); - }; - // send test message - winston.error('Slack "error" logging is online.'); - winston.info('Slack "info" logging is online.'); - } else { - winston.warn('Slack logging is not enabled because no slackWebHook config var provided.'); - } -}; - -/***/ }), -/* 140 */ -/***/ (function(module, exports) { - -module.exports = require("winston-slack-webhook"); - -/***/ }), -/* 141 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var Path = __webpack_require__(15); -var importSubModules = __webpack_require__(12); -var thisFolder = Path.resolve(__dirname, 'client/components'); -module.exports = importSubModules(thisFolder); - -/***/ }), -/* 142 */, -/* 143 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var Path = __webpack_require__(15); -var importSubModules = __webpack_require__(12); -var thisFolder = Path.resolve(__dirname, 'client/containers/'); -module.exports = importSubModules(thisFolder); - -/***/ }), -/* 144 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var Path = __webpack_require__(15); -var importSubModules = __webpack_require__(12); -var thisFolder = Path.resolve(__dirname, 'client/pages/'); -module.exports = importSubModules(thisFolder); - -/***/ }), -/* 145 */ -/***/ (function(module, exports, __webpack_require__) { - -var map = { - "./importSubModules": 12, - "./importSubModules.js": 12 -}; -function webpackContext(req) { - return __webpack_require__(webpackContextResolve(req)); -}; -function webpackContextResolve(req) { - var id = map[req]; - if(!(id + 1)) // check for number or string - throw new Error("Cannot find module '" + req + "'."); - return id; -}; -webpackContext.keys = function webpackContextKeys() { - return Object.keys(map); -}; -webpackContext.resolve = webpackContextResolve; -module.exports = webpackContext; -webpackContext.id = 145; - -/***/ }) -/******/ ]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgMDM0MTM3ZGUxODNkOGI5ZjdmZjUiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIFwicmVhY3RcIiIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJ3aW5zdG9uXCIiLCJ3ZWJwY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0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgY2xhaW1TZXF1ZW5jZToge1xuICAgICAgICB0eXBlICAgOiBJTlRFR0VSLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGRlY29kZWRDbGFpbToge1xuICAgICAgICB0eXBlICAgOiBCT09MRUFOLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGRlcHRoOiB7XG4gICAgICAgIHR5cGUgICA6IElOVEVHRVIsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgZWZmZWN0aXZlQW1vdW50OiB7XG4gICAgICAgIHR5cGUgICA6IERFQ0lNQUwoMTksIDgpLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGhhc1NpZ25hdHVyZToge1xuICAgICAgICB0eXBlICAgOiBCT09MRUFOLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGhlaWdodDoge1xuICAgICAgICB0eXBlICAgOiBJTlRFR0VSLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGhleDoge1xuICAgICAgICB0eXBlICAgOiBURVhUKCdsb25nJyksXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgbmFtZToge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgbm91dDoge1xuICAgICAgICB0eXBlICAgOiBJTlRFR0VSLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIHR4aWQ6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIHZhbGlkQXRIZWlnaHQ6IHtcbiAgICAgICAgdHlwZSAgIDogSU5URUdFUixcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBvdXRwb2ludDoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgdmFsdWVWZXJzaW9uOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBjbGFpbVR5cGU6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGNlcnRpZmljYXRlVmVyc2lvbjoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAga2V5VHlwZToge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgcHVibGljS2V5OiB7XG4gICAgICAgIHR5cGUgICA6IFRFWFQoJ2xvbmcnKSxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgfSxcbiAgICB7XG4gICAgICBmcmVlemVUYWJsZU5hbWU6IHRydWUsXG4gICAgfVxuICApO1xuXG4gIENlcnRpZmljYXRlLmFzc29jaWF0ZSA9IGRiID0+IHtcbiAgICBDZXJ0aWZpY2F0ZS5iZWxvbmdzVG8oZGIuQ2hhbm5lbCwge1xuICAgICAgZm9yZWlnbktleToge1xuICAgICAgICBhbGxvd051bGw6IHRydWUsXG4gICAgICB9LFxuICAgIH0pO1xuICB9O1xuXG4gIENlcnRpZmljYXRlLmdldFNob3J0Q2hhbm5lbElkRnJvbUxvbmdDaGFubmVsSWQgPSBmdW5jdGlvbiAobG9uZ0N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ZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgdGhpc1xuICAgICAgICAuZmluZEFsbCh7XG4gICAgICAgICAgd2hlcmU6IHtcbiAgICAgICAgICAgIG5hbWUgICA6IGNoYW5uZWxOYW1lLFxuICAgICAgICAgICAgY2xhaW1JZDoge1xuICAgICAgICAgICAgICAkbGlrZTogYCR7Y2hhbm5lbENsYWltSWR9JWAsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgICAgb3JkZXI6IFtbJ2hlaWdodCcsICdBU0MnXV0sXG4gICAgICAgIH0pXG4gICAgICAgIC50aGVuKHJlc3VsdCA9PiB7XG4gICAgICAgICAgc3dpdGNoIChyZXN1bHQubGVuZ3RoKSB7XG4gICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKG51bGwpO1xuICAgICAgICAgICAgZGVmYXVsdDogLy8gbm90ZSByZXN1bHRzIG11c3QgYmUgc29ydGVkXG4gICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKHJlc3VsdFswXS5jbGFpbUlkKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgICAgIC5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG4gIH07XG5cbiAgQ2VydGlmaWNhdGUuZ2V0TG9uZ0NoYW5uZWxJZEZyb21DaGFubmVsTmFtZSA9IGZ1bmN0aW9uIChjaGFubmVsTmFtZSkge1xuICAgIGxvZ2dlci5kZWJ1ZyhgZ2V0TG9uZ0NoYW5uZWxJZEZyb21DaGFubmVsTmFtZSgke2NoYW5uZWxOYW1lfSlgKTtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgdGhpc1xuICAgICAgICAuZmluZEFsbCh7XG4gICAgICAgICAgd2hlcmU6IHsgbmFtZTogY2hhbm5lbE5hbWUgfSxcbiAgICAgICAgICBvcmRlcjogW1snZWZmZWN0aXZlQW1vdW50JywgJ0RFU0MnXSwgWydoZWlnaHQnLCAnQVNDJ11dLFxuICAgICAgICB9KVxuICAgICAgICAudGhlbihyZXN1bHQgPT4ge1xuICAgICAgICAgIHN3aXRjaCAocmVzdWx0Lmxlbmd0aCkge1xuICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZShudWxsKTtcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKHJlc3VsdFswXS5jbGFpbUlkKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgICAgIC5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgcmVqZWN0KGVycm9yKTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG4gIH07XG5cbiAgQ2VydGlmaWNhdGUudmFsaWRhdGVMb25nQ2hhbm5lbElkID0gZnVuY3Rpb24gKG5hbWUsIGNsYWltSWQpIHtcbiAgICBsb2dnZXIuZGVidWcoYHZhbGlkYXRlTG9uZ0NoYW5uZWxJZCgke25hbWV9LCAke2NsYWltSWR9KWApO1xuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICB0aGlzLmZpbmRPbmUoe1xuICAgICAgICB3aGVyZToge25hbWUsIGNsYWltSWR9LFxuICAgICAgfSlcbiAgICAgICAgLnRoZW4ocmVzdWx0ID0+IHtcbiAgICAgICAgICBpZiAoIXJlc3VsdCkge1xuICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUobnVsbCk7XG4gICAgICAgICAgfTtcbiAgICAgICAgICByZXNvbHZlKGNsYWltSWQpO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgIH0pO1x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VSLCBURVhULCBERUNJTUFMIH0pID0+IHtcbiAgY29uc3QgQ2xhaW0gPSBzZXF1ZWxpemUuZGVmaW5lKFxuICAgICdDbGFpbScsXG4gICAge1xuICAgICAgYWRkcmVzczoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgYW1vdW50OiB7XG4gICAgICAgIHR5cGUgICA6IERFQ0lNQUwoMTksIDgpLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGNsYWltSWQ6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGNsYWltU2VxdWVuY2U6IHtcbiAgICAgICAgdHlwZSAgIDogSU5URUdFUixcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBkZWNvZGVkQ2xhaW06IHtcbiAgICAgICAgdHlwZSAgIDogQk9PTEVBTixcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBkZXB0aDoge1xuICAgICAgICB0eXBlICAgOiBJTlRFR0VSLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGVmZmVjdGl2ZUFtb3VudDoge1xuICAgICAgICB0eXBlICAgOiBERUNJTUFMKDE5LCA4KSxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBoYXNTaWduYXR1cmU6IHtcbiAgICAgICAgdHlwZSAgIDogQk9PTEVBTixcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBoZWlnaHQ6IHtcbiAgICAgICAgdHlwZSAgIDogSU5URUdFUixcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBoZXg6IHtcbiAgICAgICAgdHlwZSAgIDogVEVYVCgnbG9uZycpLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIG5hbWU6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIG5vdXQ6IHtcbiAgICAgICAgdHlwZSAgIDogSU5URUdFUixcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICB0eGlkOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICB2YWxpZEF0SGVpZ2h0OiB7XG4gICAgICAgIHR5cGUgICA6IElOVEVHRVIsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgb3V0cG9pbnQ6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGNsYWltVHlwZToge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgY2VydGlmaWNhdGVJZDoge1xuICAgICAgICB0eXBlICAgOiBTVFJJTkcsXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgYXV0aG9yOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBkZXNjcmlwdGlvbjoge1xuICAgICAgICB0eXBlICAgOiBURVhUKCdsb25nJyksXG4gICAgICAgIGRlZmF1bHQ6IG51bGwsXG4gICAgICB9LFxuICAgICAgbGFuZ3VhZ2U6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGxpY2Vuc2U6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGxpY2Vuc2VVcmw6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIG5zZnc6IHtcbiAgICAgICAgdHlwZSAgIDogQk9PTEVBTixcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBwcmV2aWV3OiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICB0aHVtYm5haWw6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIHRpdGxlOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBtZXRhZGF0YVZlcnNpb246IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIGNvbnRlbnRUeXBlOiB7XG4gICAgICAgIHR5cGUgICA6IFNUUklORyxcbiAgICAgICAgZGVmYXVsdDogbnVsbCxcbiAgICAgIH0sXG4gICAgICBzb3VyY2U6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIHNvdXJjZVR5cGU6IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZhdWx0OiBudWxsLFxuICAgICAgfSxcbiAgICAgIHNvdXJjZVZlcnNpb246IHtcbiAgICAgICAgdHlwZSAgIDogU1RSSU5HLFxuICAgICAgICBkZWZh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Ghpc1xuICAgICAgICAuZmluZEFsbCh7XG4gICAgICAgICAgd2hlcmU6IHsgbmFtZTogY2xhaW1OYW1lLCBjZXJ0aWZpY2F0ZUlkOiBjaGFubmVsQ2xhaW1JZCB9LFxuICAgICAgICAgIG9yZGVyOiBbWydpZCcsICdBU0MnXV0sXG4gICAgICAgIH0pXG4gICAgICAgIC50aGVuKHJlc3VsdCA9PiB7XG4gICAgICAgICAgc3dpdGNoIChyZXN1bHQubGVuZ3RoKSB7XG4gICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKG51bGwpO1xuICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZShyZXN1bHRbMF0uY2xhaW1JZCk7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICBsb2dnZXIuZXJyb3IoYCR7cmVzdWx0Lmxlbmd0aH0gcmVjb3JkcyBmb3VuZCBmb3IgXCIke2NsYWltTmFtZX1cIiBpbiBjaGFubmVsIFwiJHtjaGFubmVsQ2xhaW1JZH1cImApO1xuICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZShyZXN1bHRbMF0uY2xhaW1JZCk7XG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgIH0pO1xuICAgIH0pO1xuICB9O1xuXG4gIENsYWltLmdldExvbmdDbGFpbUlkRnJvbVNob3J0Q2xhaW1JZCA9IGZ1bmN0aW9uIChuYW1lLCBzaG9ydElkKSB7XG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgIHRoaXNcbiAgICAgICAgLmZpbmRBbGwoe1xuICAgICAgICAgIHdoZXJlOiB7XG4gICAgICAgICAgICBuYW1lLFxuICAgICAgICAgICAgY2xhaW1JZDoge1xuICAgICAgIC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ICAgIGhlaWdodDoge1xuICAgICAgICB0eXBlICAgICA6IElOVEVHRVIsXG4gICAgICAgIGFsbG93TnVsbDogZmFsc2UsXG4gICAgICAgIGRlZmF1bHQgIDogMCxcbiAgICAgIH0sXG4gICAgICBmaWxlTmFtZToge1xuICAgICAgICB0eXBlICAgICA6IFNUUklORyxcbiAgICAgICAgYWxsb3dOdWxsOiBmYWxzZSxcbiAgICAgIH0sXG4gICAgICBmaWxlUGF0aDoge1xuICAgICAgICB0eXBlICAgICA6IFNUUklORyxcbiAgICAgICAgYWxsb3dOdWxsOiBmYWxzZSxcbiAgICAgIH0sXG4gICAgICBmaWxlVHlwZToge1xuICAgICAgICB0eXBlOiBTVFJJTkcsXG4gICAgICB9LFxuICAgICAgbnNmdzoge1xuICAgICAgICB0eXBlICAgICAgICA6IEJPT0xFQU4sXG4gICAgICAgIGFsbG93TnVsbCAgIDogZmFsc2UsXG4gICAgICAgIGRlZmF1bHRWYWx1ZTogZmFsc2UsXG4gICAgICB9LFxuICAgICAgdHJlbmRpbmdFbGlnaWJsZToge1xuICAgICAgICB0eXBlICAgICAgICA6IEJPT0xFQU4sXG4gICAgICAgIGFsbG93TnVsbCAgIDogZmFsc2UsXG4gICAgICAgIGRlZmF1bHRWYWx1ZTogdHJ1ZSxcbiAgICAgIH0sXG4gICAgfSxcbiAgICB7XG4gICAgICBmcmVlemVUYWJsZU5hbWU6IHRydWUsXG4gICAgfVxuICApO1xuXG4gIEZpbGUuYXNzb2NpYXRlID0gZGIgPT4ge1xuICAgIEZpbGUuaGFzTWFueShkYi5SZXF1ZXN0KTtcbiAgICBGaWxlLmhhc09uZShkYi5DbGFpbSk7XG4gIH07XG5cbiAgRmlsZS5nZXRSZWNlbnRDbGFpbXMgPSBmdW5jdGlvbiAoKSB7XG4gICAgcmV0dXJuIHRoaXMuZmluZEFsbCh7XG4gICAgICB3aGVyZTogeyBuc2Z3OiBmYWxzZSwgdHJlbmRpbmdFbGlnaWJsZTogdHJ1ZSB9LFxu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bHQgc3RyaW5nIHRvIHVzZSBmb3IgaGFzaGluZ1xuICAgICAgYmNyeXB0LmdlblNhbHQoKHNhbHRFcnJvciwgc2FsdCkgPT4ge1xuICAgICAgICBpZiAoc2FsdEVycm9yKSB7XG4gICAgICAgICAgbG9nZ2VyLmVycm9yKCdzYWx0IGVycm9yJywgc2FsdEVycm9yKTtcbiAgICAgICAgICByZWplY3Qoc2FsdEVycm9yKTtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgLy8gZ2VuZXJhdGUgYSBoYXNoZWQgdmVyc2lvbiBvZiB0aGUgdXNlcidzIHBhc3N3b3JkXG4gICAgICAgIGJjcnlwdC5oYXNoKG5ld1Bhc3N3b3JkLCBzYWx0LCAoaGFzaEVycm9yLCBoYXNoKSA9PiB7XG4gICAgICAgICAgLy8gaWYgdGhlcmUgaXMgYW4gZXJyb3Igd2l0aCB0aGUgaGFzaCBnZW5lcmF0aW9uIHJldHVybiB0aGUgZXJyb3JcbiAgICAgICAgICBpZiAoaGFzaEVycm9yKSB7XG4gICAgICAgICAgICBsb2dnZXIuZXJyb3IoJ2hhc2ggZXJyb3InLCBoYXNoRXJyb3IpO1xuICAgICAgICAgICAgcmVqZWN0KGhhc2hFcnJvcik7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuICAgICAgICAgIC8vIHJlcGxhY2UgdGhlIGN1cnJlbnQgcGFzc3dvcmQgd2l0aCB0aGUgbmV3IGhhc2hcbiAgICAgICAgICB0aGlzXG4gICAgICAgICAgICAudXBkYXRlKHtwYXNzd29yZDogaGFzaH0pXG4gICAgICAgICAgICAudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgICAgfSk7XG4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c2VybmFtZSBvciBwYXNzd29yZCd9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdXNlci5jb21wYXJlUGFzc3dvcmQocGFzc3dvcmQpXG4gICAgICAgICAgLnRoZW4oaXNNYXRjaCA9PiB7XG4gICAgICAgICAgICBpZiAoIWlzTWF0Y2gpIHtcbiAgICAgICAgICAgICAgbG9nZ2VyLmRlYnVnKCdpbmNvcnJlY3QgcGFzc3dvcmQnKTtcbiAgICAgICAgICAgICAgcmV0dXJuIGRvbmUobnVsbCwgZmFsc2UsIHttZXNzYWdlOiAnSW5jb3JyZWN0IHVzZXJuYW1lIG9yIHBhc3N3b3JkJ30pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbG9nZ2VyLmRlYnVnKCdQYXNzd29yZCB3YXMgYSBtYXRjaCwgcmV0dXJuaW5nIFVzZXInKTtcbiAgICAgICAgICAgIHJldHVybiByZXR1cm5Vc2VyQW5kQ2hhbm5lbEluZm8odXNlcilcbiAgICAgICAgICAgICAgLnRoZW4odXNlckluZm8gPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiBkb25lKG51bGwsIHVzZXJJbmZvKTtcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZXJyb3I7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgIHJldHVybiBlcnJvcjtcbiAgICAgICAgICB9KTtcbiAgICAgIH0pXG4gICAgICAuY2F0Y2goZXJyb3IgPT4ge1xuICAgICAgICByZXR1cm4gZG9uZShlcnJvcik7XG4gICAgICB9KTtcbiAgfSxcbik7XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zZXJ2ZXIvcGFzc3BvcnQvbG9jYWwtbG9naW4uanMiLCJjb25zdCBsb2dnZXIgPSByZXF1aX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ICAgICB7KHN0YXR1cyA9PT0gRVJST1IpICYmXG4gICAgICAgIDxkaXY+XG4gICAgICAgICAgPHA+VW5mb3J0dW5hdGVseSwgd2UgY291bGRuJ3QgZG93bmxvYWQgeW91ciBhc3NldCBmcm9tIExCUlkuICBZb3UgY2FuIGhlbHAgdXMgb3V0IGJ5IHNoYXJpbmcgdGhlIGJlbG93IGVycm9yIG1lc3NhZ2UgaW4gdGhlIDxhIGNsYXNzTmFtZT0nbGluay0tcHJpbWFyeScgaHJlZj0naHR0cHM6Ly9kaXNjb3JkLmdnL1lqWWJ3aFMnIHRhcmdldD0nX2JsYW5rJz5MQlJZIGRpc2NvcmQ8L2E+LjwvcD5cbiAgICAgICAgICA8aT48cCBpZD0nZXJyb3ItbWVzc2FnZSc+e2Vycm9yfTwvcD48L2k+XG4gICAgICAgIDwvZGl2PlxuICAgICAgICB9XG4gICAgICAgIHsoc3RhdHVzID09PSBBVkFJTEFCTEUpICYmXG4gICAgICAgICgoKSA9PiB7XG4gICAgICAgICAgc3dpdGNoIChjb250ZW50VHlwZSkge1xuICAgICAgICAgICAgY2FzZSAnaW1hZ2UvanBlZyc6XG4gICAgICAgICAgICBjYXNlICdpbWFnZS9qcGcnOlxuICAgICAgICAgICAgY2FzZSAnaW1hZ2UvcG5nJzpcbiAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8aW1nXG4gICAgICAgICAgICAgICAgICBjbGFzc05hbWU9J2Fzc2V0J1xuICAgICAgICAgICAgICAgICAgc3JjPXtgLyR7Y2xhaW1JZH0vJHtuYW1lfS4ke2ZpbGVFeHR9YH1cbiAgICAgICAgICAgICAgICAgIGFsdD17bmFtZX0gLz5cbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNhc2UgJ2ltYWdlL2dpZic6XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGltZ1xuICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPSdhc3NldCdcbiAgICAgICAgICAgICAgICAgIHNyYz17YC8ke2NsYWltSWR9LyR7bmFtZX0uJHtmaWxlRXh0fWB9XG4gICAgICAgICAgICAgICAgICBhbHQ9e25hbWV9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNhc2UgJ3ZpZGVvL21wNCc6XG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPHZpZGVvIGNsYXNzTmFtZT0nYXNzZXQgdmlkZW8nIGNvbnRyb2xzIHBvc3Rlcj17dGh1bWJuYWlsfT5cbiAgICAgICAgICAgICAgICAgIDxzb3VyY2VcbiAgICAgICAgICAgICAgICAgICAgc3JjPXtgLyR7Y2xhaW1JZH0vJHtuYW1lfS4ke2ZpbGVFeHR9YH1cbiAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICA8cD5Zb3VyIGJyb3dzZXIgZG9lcyBub3Qgc3VwcG9ydCB0aGUgPGNvZGU+dmlkZW88L2NvZGU+IGVsZW1lbnQuPC9wPlxuICAgICAgICAgICAgICAgIDwvdmlkZW8+XG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxwPlVuc3VwcG9ydGVkIGZpbGUgdHlwZTwvcD5cbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pKClcbiAgICAgICAgfVxuICAgICAgPC9kaXY+XG4gICAgKTtcbiAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQXNzZXREaXNwbGF5O1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vY2xpZW50L2NvbnRhaW5lcnMvQXNzZXREaXNwbGF5L3ZpZXcuanN4IiwiaW1wb3J0IHsgY29ubmVjdCB9IGZyb20gJ3JlYWN0LXJlZHV4JztcbmltcG9ydCBWaWV3IGZyb20gJy4vdmlldy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oID4gMCkgPyAoXG4gICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgIHtjbGFpbXMubWFwKChjbGFpbSwgaW5kZXgpID0+IDxBc3NldFByZXZpZXdcbiAgICAgICAgICAgICAgY2xhaW1EYXRhPXtjbGFpbX1cbiAgICAgICAgICAgICAga2V5PXtgJHtjbGFpbS5uYW1lfS0ke2luZGV4fWB9XG4gICAgICAgICAgICAvPil9XG4gICAgICAgICAgICA8ZGl2PlxuICAgICAgICAgICAgICB7KGN1cnJlbnRQYWdlID4gMSkgJiZcbiAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzc05hbWU9eydidXR0b24tLXNlY29uZGFyeSd9IG9uQ2xpY2s9e3RoaXMuc2hvd1ByZXZpb3VzUmVzdWx0c1BhZ2V9PlByZXZpb3VzIFBhZ2U8L2J1dHRvbj5cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB7KGN1cnJlbnRQYWdlIDwgdG90YWxQYWdlcykgJiZcbiAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzc05hbWU9eydidXR0b24tLXNlY29uZGFyeSd9IG9uQ2xpY2s9e3RoaXMuc2hvd05leHRSZXN1bHRzUGFnZX0+TmV4dCBQYWdlPC9idXR0b24+XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICApIDogKFxuICAgICAgICAgIDxwPlRoZXJlIGFyZSBubyBjbGFpbXMgaW4gdGhpcyBjaGFubmVsPC9wPlxuICAgICAgICApfVxuICAgICAgPC9kaXY+XG4gICAgKTtcbiAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ2hhbm5lbENsYWltc0Rpc3BsYXk7XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9jbGllbnQvY29udGFpbmVycy9DaGFubmVsQ2xhaW1zRGlzcGxheS92aWV3LmpzeCIsImltcG9ydCB7IGNvbm5lY3QgfSBmcm9tICdyZW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jYXNlICdpbWFnZS9naWYnOlxuICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxpbWdcbiAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17J2Fzc2V0LXByZXZpZXcnfVxuICAgICAgICAgICAgICAgICAgc3JjPXtkaXJlY3RTb3VyY2VMaW5rfVxuICAgICAgICAgICAgICAgICAgYWx0PXtuYW1lfVxuICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjYXNlICd2aWRlby9tcDQnOlxuICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxpbWdcbiAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17J2Fzc2V0LXByZXZpZXcgdmlkZW8nfVxuICAgICAgICAgICAgICAgICAgc3JjPXt0aHVtYm5haWwgfHwgZGVmYXVsdFRodW1ibmFpbH1cbiAgICAgICAgICAgICAgICAgIGFsdD17bmFtZX1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8cD51bnN1cHBvcnRlZCBmaWxlIHR5cGU8L3A+XG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSgpfVxuICAgICAgPC9MaW5rPlxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQXNzZXRQcmV2aWV3O1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vY2xpZW50L2NvbXBvbmVudHMvQXNzZXRQcmV2aWV3L3ZpZXcuanN4IiwiaW1wb3J0IHsgY29ubmVjdCB9IGZyb20gJ3JlYWN0LXJlZHV4JztcbmltcG9ydCBWaWV3IGZyb20gJy4vdmlldyc7XG5cbmNvbnN0IG1hcFN0YXRlVG9Qcm9wcyA9ICh7IHNpdGU6IHsgaG9zdC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k7XG59O1xuZnVuY3Rpb24gd2VicGFja0NvbnRleHRSZXNvbHZlKHJlcSkge1xuXHR2YXIgaWQgPSBtYXBbcmVxXTtcblx0aWYoIShpZCArIDEpKSAvLyBjaGVjayBmb3IgbnVtYmVyIG9yIHN0cmluZ1xuXHRcdHRocm93IG5ldyBFcnJvcihcIkNhbm5vdCBmaW5kIG1vZHVsZSAnXCIgKyByZXEgKyBcIicuXCIpO1xuXHRyZXR1cm4gaWQ7XG59O1xud2VicGFja0NvbnRleHQua2V5cyA9IGZ1bmN0aW9uIHdlYnBhY2tDb250ZXh0S2V5cygpIHtcblx0cmV0dXJuIE9iamVjdC5rZXlzKG1hcCk7XG59O1xud2VicGFja0NvbnRleHQucmVzb2x2ZSA9IHdlYnBhY2tDb250ZXh0UmVzb2x2ZTtcbm1vZHVsZS5leHBvcnRzID0gd2VicGFja0NvbnRleHQ7XG53ZWJwYWNrQ29udGV4dC5pZCA9IDE0NTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL2J1aWxkL3V0aWxzIF5cXC5cXC8uKiRcbi8vIG1vZHVsZSBpZCA9IDE0NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file +module.exports=function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=115)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("react-redux")},function(e,t){e.exports=require("winston")},function(e,t,n){"use strict";function r(){var e=this;this.analytics={googleId:"default"},this.assetDefaults={description:"An asset published on Spee.ch",thumbnail:"https://spee.ch/assets/img/video_thumb_default.png",title:"Spee.ch"},this.auth={sessionKey:"default"},this.componentsConfig={components:{},containers:{},pages:{}},this.details={description:"Open-source, decentralized image and video sharing.",host:"default",port:3e3,title:"Spee.ch",twitter:"@spee_ch"},this.publishing={additionalClaimAddresses:[],disabled:!1,disabledMessage:"Please check back soon.",primaryClaimAddress:"default",thumbnailChannel:"default",thumbnailChannelId:"default",uploadDirectory:"/home/lbry/Uploads"},this.configure=function(t){if(!t)return console.log("No site config received.");var n=t.analytics,r=t.assetDefaults,a=t.auth,l=t.componentsConfig,o=t.details,i=t.publishing;e.analytics=n,e.assetDefaults=r,e.auth=a,e.details=o,e.publishing=i,e.componentsConfig=l}}e.exports=new r},function(e,t){e.exports=require("react-router-dom")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=n(64),l=n(6),o=n(65),i=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(e){var t=e.channel,n=e.site;return{channelName:t.loggedInChannel.name,channelShortId:t.loggedInChannel.shortId,channelLongId:t.loggedInChannel.longId,siteDescription:n.description}},s=function(e){return{onChannelLogin:function(t,n,r){e((0,a.updateLoggedInChannel)(t,n,r)),e((0,l.updateSelectedChannel)(t))},onChannelLogout:function(){e((0,a.updateLoggedInChannel)(null,null,null))}}};t.default=(0,r.connect)(u,s)(i.default)},function(e,t,n){"use strict";function r(e){return{type:m.FILE_SELECTED,data:e}}function a(){return{type:m.FILE_CLEAR}}function l(e,t){return{type:m.METADATA_UPDATE,data:{name:e,value:t}}}function o(e){return{type:m.CLAIM_UPDATE,data:e}}function i(e){return{type:m.SET_PUBLISH_IN_CHANNEL,channel:e}}function u(e,t){return{type:m.PUBLISH_STATUS_UPDATE,data:{status:e,message:t}}}function s(e,t){return{type:m.ERROR_UPDATE,data:{name:e,value:t}}}function c(e){return{type:m.SELECTED_CHANNEL_UPDATE,data:e}}function d(e){return{type:m.TOGGLE_METADATA_INPUTS,data:e}}function f(e){return{type:m.THUMBNAIL_NEW,data:e}}function p(e){return{type:m.PUBLISH_START,data:{history:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.selectFile=r,t.clearFile=a,t.updateMetadata=l,t.updateClaim=o,t.setPublishInChannel=i,t.updatePublishStatus=u,t.updateError=s,t.updateSelectedChannel=c,t.toggleMetadataInputs=d,t.onNewThumbnail=f,t.startPublish=p;var h=n(104),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=n(66),l=function(e){return e&&e.__esModule?e:{default:e}}(a),o=function(e){var t=e.site;return{defaultDescription:t.defaultDescription,defaultThumbnail:t.defaultThumbnail,siteDescription:t.description,siteHost:t.host,siteTitle:t.title,siteTwitter:t.twitter}};t.default=(0,r.connect)(o,null)(l.default)},function(e,t,n){"use strict";function r(e){return 204===e.status||205===e.status?null:e.json()}function a(e,t){if(e.status>=200&&e.status<300)return t;var n=new Error(t.message);throw n.response=e,n}function l(e,t){return fetch(e,t).then(function(e){return Promise.all([e,r(e)])}).then(function(e){var t=o(e,2);return a(t[0],t[1])})}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],r=!0,a=!1,l=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,l=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw l}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=l,n(152)},function(e,t,n){"use strict";var r=n(95),a=n(2);console.log("exporting sequelize models");var l=n(92),o=l.database,i=l.username,u=l.password,s={},c=new r(o,i,u,{host:"localhost",dialect:"mysql",dialectOptions:{decimalNumbers:!0},logging:!1,pool:{max:5,min:0,idle:1e4,acquire:1e4}});c.authenticate().then(function(){a.info("Sequelize has established mysql connection successfully.")}).catch(function(e){a.error("Sequelize was unable to connect to the database:",e)});var d=n(132),f=n(133),p=n(134),h=n(135),m=n(136),b=n(137);s.Certificate=c.import("Certificate",d),s.Channel=c.import("Channel",f),s.Claim=c.import("Claim",p),s.File=c.import("File",h),s.Request=c.import("Request",m),s.User=c.import("User",b),Object.keys(s).forEach(function(e){s[e].associate&&(a.info("Associating model:",e),s[e].associate(s))}),s.sequelize=c,s.Sequelize=r,s.upsert=function(e,t,n,r){return e.findOne({where:n}).then(function(n){return n?(a.debug("updating record in db."+r),n.update(t)):(a.debug("creating record in db."+r),e.create(t))}).catch(function(e){throw a.error(r+".upsert error",e),e})},e.exports=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;nthis.props.size)&&(t*=-1,e+=t),n[e].isActive=t>0,e+=t,this.setState({bars:n,incrementer:t,index:e})}},{key:"stopProgressBar",value:function(){clearInterval(this.updateInterval)}},{key:"render",value:function(){return s.default.createElement("div",null,this.state.bars.map(function(e,t){return e.isActive?s.default.createElement(p.default,{key:t}):s.default.createElement(m.default,{key:t})}))}}]),t}(s.default.Component);b.propTypes={size:d.default.number.isRequired},t.default=b},function(e,t,n){"use strict";function r(e){return{type:v.HANDLE_SHOW_URI,data:e}}function a(e){return{type:v.REQUEST_ERROR,data:e}}function l(e,t){var n=g.CHANNEL,r="cr#"+e+"#"+t;return{type:v.CHANNEL_REQUEST_NEW,data:{requestType:n,requestId:r,channelName:e,channelId:t}}}function o(e,t,n,r,a){var l=a?g.ASSET_LITE:g.ASSET_DETAILS,o="ar#"+e+"#"+t+"#"+n+"#"+r;return{type:v.ASSET_REQUEST_NEW,data:{requestType:l,requestId:o,name:e,modifier:{id:t,channel:{name:n,id:r}}}}}function i(e,t){return{type:v.REQUEST_UPDATE,data:{requestType:e,requestId:t}}}function u(e,t,n){return{type:v.REQUEST_LIST_ADD,data:{id:e,error:t,key:n}}}function s(e,t,n,r,a,l){return{type:v.ASSET_ADD,data:{id:e,error:t,name:n,claimId:r,shortId:a,claimData:l}}}function c(e,t,n,r,a){return{type:v.CHANNEL_ADD,data:{id:e,name:t,shortId:n,longId:r,claimsData:a}}}function d(e,t,n,r){return{type:v.CHANNEL_CLAIMS_UPDATE_ASYNC,data:{channelKey:e,name:t,longId:n,page:r}}}function f(e,t){return{type:v.CHANNEL_CLAIMS_UPDATE_SUCCESS,data:{channelListId:e,claimsData:t}}}function p(e,t){return{type:v.FILE_REQUESTED,data:{name:e,claimId:t}}}function h(e){return{type:v.FILE_AVAILABILITY_UPDATE,data:e}}function m(e){return{type:v.DISPLAY_ASSET_ERROR,data:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.onHandleShowPageUri=r,t.onRequestError=a,t.onNewChannelRequest=l,t.onNewAssetRequest=o,t.onRequestUpdate=i,t.addRequestToRequestList=u,t.addAssetToAssetList=s,t.addNewChannelToChannelList=c,t.onUpdateChannelClaims=d,t.updateChannelClaims=f,t.fileRequested=p,t.updateFileAvailability=h,t.updateDisplayAssetError=m;var b=n(19),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(b),g=n(112)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t> Publishing claim to "'+e.name+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"publish",params:e}).then(function(r){f("lbrynet","publish",d(e),t,Date.now()),p(r,n,a)}).catch(function(e){a(e)})})},getClaim:function(e){a.debug('lbryApi >> Getting Claim for "'+e+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"get",params:{uri:e,timeout:20}}).then(function(e){f("lbrynet","getClaim","GET",t,Date.now()),p(e,n,a)}).catch(function(e){a(e)})})},getClaimList:function(e){a.debug('lbryApi >> Getting claim_list for "'+e+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"claim_list",params:{name:e}}).then(function(e){f("lbrynet","getClaimList","CLAIM_LIST",t,Date.now()),p(e,n,a)}).catch(function(e){a(e)})})},resolveUri:function(e){a.debug('lbryApi >> Resolving URI for "'+e+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"resolve",params:{uri:e}}).then(function(r){var l=r.data;f("lbrynet","resolveUri","RESOLVE",t,Date.now()),l.result[e].error?a(l.result[e].error):n(l.result[e])}).catch(function(e){a(e)})})},getDownloadDirectory:function(){a.debug("lbryApi >> Retrieving the download directory path from lbry daemon...");var e=Date.now();return new Promise(function(t,n){r.post(s,{method:"settings_get"}).then(function(n){var r=n.data;if(f("lbrynet","getDownloadDirectory","SETTINGS_GET",e,Date.now()),!r.result)return new Error("Successfully connected to lbry daemon, but unable to retrieve the download directory.");t(r.result.download_directory)}).catch(function(e){a.error("Lbrynet Error:",e),t("/home/lbry/Downloads/")})})},createChannel:function(e){a.debug("lbryApi >> Creating channel for "+e+"...");var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"channel_new",params:{channel_name:e,amount:.1}}).then(function(e){f("lbrynet","createChannel","CHANNEL_NEW",t,Date.now()),p(e,n,a)}).catch(function(e){a(e)})})}}},function(e,t,n){"use strict";function r(e,t,n){return{eventCategory:"client requests",eventAction:"serve request",eventLabel:n,ipOverride:t,userAgentOverride:e["user-agent"]}}function a(e,t,n,r,a){return{userTimingCategory:e,userTimingVariableName:t,userTimingTime:a-r,userTimingLabel:n}}function l(e,t){var n=e.replace(/\./g,"-");u(c,n,{strictCidFormat:!1,https:!0}).event(t,function(e){e&&i.error("Google Analytics Event Error >>",e)})}function o(e,t){u(c,e,{strictCidFormat:!1,https:!0}).timing(t,function(e){e&&i.error("Google Analytics Event Error >>",e),i.debug("Timing event successfully sent to google analytics")})}var i=n(2),u=n(131),s=n(3),c=s.analytics.googleId,d=s.details.title;e.exports={sendGAServeEvent:function(e,t,n){l(t,r(e,t,n))},sendGATimingEvent:function(e,t,n,r,l){var i=a(e,t,n,r,l);o(d,i)},chooseGaLbrynetPublishLabel:function(e){var t=e.channel_name,n=e.channel_id;return t||n?"PUBLISH_IN_CHANNEL_CLAIM":"PUBLISH_ANONYMOUS_CLAIM"}}},function(e,t){e.exports=require("redux")},function(e,t,n){"use strict";function r(e,t){var n=t.shift(),a=e[n];return t.length>=1?r(a,t):a}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=n(3),o=l.componentsConfig;t.dynamicImport=function(e){if(!e)throw new Error("no file path provided to dynamicImport()");if("string"!=typeof e)throw console.log("dynamicImport > filePath:",e),console.log("dynamicImport > filePath type:",void 0===e?"undefined":a(e)),new Error("file path provided to dynamicImport() must be a string");if(!o)return console.log("no componentsConfig found in siteConfig.js"),n(109)(""+e);var t=e.split("/").filter(function(e){return e.replace(/\s/g,"").length}),l=r(o,t);return l||n(109)(""+e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return t+"/"+e},a=function(e,t){var n=void 0,r=void 0,a=void 0,l=void 0;if(e.claimData){var o=e.claimData;n=o.channelName,r=o.certificateId,a=o.name,l=o.claimId}return n?t+"/"+n+":"+r+"/"+a:t+"/"+l+"/"+a},l=function(e,t){return t+"/"+e.name+":"+e.longId};t.createCanonicalLink=function(e,t,n,o){return e?a(e,o):t?l(t,o):r(n,o)}},function(e,t,n){"use strict";e.exports={validateFile:function(e){if(!e)throw new Error("no file provided");if(/'/.test(e.name))throw new Error("apostrophes are not allowed in the file name");switch(e.type){case"image/jpeg":case"image/jpg":case"image/png":if(e.size>1e7)throw new Error("Sorry, images are limited to 10 megabytes.");break;case"image/gif":if(e.size>5e7)throw new Error("Sorry, GIFs are limited to 50 megabytes.");break;case"video/mp4":if(e.size>5e7)throw new Error("Sorry, videos are limited to 50 megabytes.");break;default:throw new Error(e.type+" is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.")}}}},function(e,t,n){"use strict";var r=function(){function e(e,t){var n=[],r=!0,a=!1,l=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,l=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw l}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.exports={REGEXP_INVALID_CLAIM:/[^A-Za-z0-9-]/g,REGEXP_INVALID_CHANNEL:/[^A-Za-z0-9-@]/g,REGEXP_ADDRESS:/^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,CHANNEL_CHAR:"@",parseIdentifier:function(t){var n=new RegExp("([^:$#/]*)([:$#]?)([^/]*)"),a=n.exec(t).map(function(e){return e||null}),l=r(a,4),o=(l[0],l[1]),i=l[2],u=l[3];if(!o)throw new Error('Check your URL. No channel name provided before "'+i+'"');var s=o.startsWith(e.exports.CHANNEL_CHAR),c=s?o:null,d=void 0;if(s){if(!c)throw new Error('Check your URL. No channel name after "@".');var f=c.match(e.exports.REGEXP_INVALID_CHANNEL);if(f)throw new Error('Check your URL. Invalid characters in channel name: "'+f.join(", ")+'".')}else d=o;var p=void 0;if(i){if(!u)throw new Error('Check your URL. No modifier provided after separator "'+i+'"');if(":"!==i)throw new Error('Check your URL. The "'+i+'" modifier is not currently supported');p=u}return{isChannel:s,channelName:c,channelClaimId:p||null,claimId:d||null}},parseClaim:function(t){var n=new RegExp("([^:$#/.]*)([:$#.]?)([^/]*)"),a=n.exec(t).map(function(e){return e||null}),l=r(a,4),o=(l[0],l[1]),i=l[2],u=l[3];if(!o)throw new Error('Check your URL. No claim name provided before "."');var s=o.match(e.exports.REGEXP_INVALID_CLAIM);if(s)throw new Error('Check your URL. Invalid characters in claim name: "'+s.join(", ")+'".');if(i){if(!u)throw new Error('Check your URL. No file extension provided after separator "'+i+'".');if("."!==i)throw new Error('Check your URL. The "'+i+'" separator is not supported in the claim name.')}return{claimName:o,extension:u||null}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e){switch(e.substring(e.lastIndexOf("."))){case"jpeg":case"jpg":return"image/jpeg";case"png":return"image/png";case"gif":return"image/gif";case"mp4":return"video/mp4";default:return"image/jpeg"}}return""},a=function(e,t,n,r){return[{property:"og:title",content:n},{property:"og:url",content:e},{property:"og:site_name",content:n},{property:"og:description",content:t},{property:"twitter:site",content:r},{property:"twitter:card",content:"summary"}]},l=function(e,t,n,r){var a=r.name;return[{property:"og:title",content:a+" on "+e},{property:"og:url",content:t+"/"+a+":"+r.longId},{property:"og:site_name",content:e},{property:"og:description",content:a+", a channel on "+e},{property:"twitter:site",content:n},{property:"twitter:card",content:"summary"}]},o=function(e,t,n,a,l,o){var i=a.claimData,u=i.contentType,s=e+"/"+i.claimId+"/"+i.name,c=e+"/"+i.claimId+"/"+i.name,d=e+"/"+i.claimId+"/"+i.name+"."+i.fileExt,f=i.title||i.name,p=i.description||l,h=r(i.thumbnail),m=i.thumbnail||o,b=[{property:"og:title",content:f},{property:"og:url",content:c},{property:"og:site_name",content:t},{property:"og:description",content:p},{property:"og:image:width",content:600},{property:"og:image:height",content:315},{property:"twitter:site",content:n}];return"video/mp4"===u||"video/webm"===u?(b.push({property:"og:video",content:d}),b.push({property:"og:video:secure_url",content:d}),b.push({property:"og:video:type",content:u}),b.push({property:"og:image",content:m}),b.push({property:"og:image:type",content:h}),b.push({property:"og:type",content:"video"}),b.push({property:"twitter:card",content:"player"}),b.push({property:"twitter:player",content:s}),b.push({property:"twitter:player:width",content:600}),b.push({property:"twitter:text:player_width",content:600}),b.push({property:"twitter:player:height",content:337}),b.push({property:"twitter:player:stream",content:d}),b.push({property:"twitter:player:stream:content_type",content:u})):(b.push({property:"og:image",content:d}),b.push({property:"og:image:type",content:u}),b.push({property:"og:type",content:"article"}),b.push({property:"twitter:card",content:"summary_large_image"})),b};t.createMetaTags=function(e,t,n,r,i,u,s,c){return i?o(t,n,r,i,s,c):u?l(t,n,r,u):a(e,t,n,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.createPageTitle=function(e,t){return t?e+" - "+t:""+e}},function(e,t,n){"use strict";function r(e,t,n){return{type:l.CHANNEL_UPDATE,data:{name:e,shortId:t,longId:n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.updateLoggedInChannel=r;var a=n(106),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(a)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n'}):u.default.createElement("input",{type:"text",id:"embed-text",className:"input-disabled input-text--full-width",readOnly:!0,onClick:this.select,spellCheck:"false",value:''})),u.default.createElement("div",{className:"column column--1"}),u.default.createElement("div",{className:"column column--2"},u.default.createElement("button",{className:"button--primary button--wide","data-elementtocopy":"embed-text",onClick:this.copyToClipboard},"copy")))))),u.default.createElement("div",{className:"flex-container--row flex-container--space-between-bottom"},u.default.createElement(s.Link,{className:"link--primary",to:"/"+t+"/"+o+"."+c},u.default.createElement("span",{className:"text"},"Direct Link")),u.default.createElement("a",{className:"link--primary",href:p+"/"+i+"/"+o+"."+c,download:o},"Download"),u.default.createElement("a",{className:"link--primary",target:"_blank",href:"https://lbry.io/dmca"},"Report")))}}]),t}(u.default.Component);t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0?s.default.createElement("div",null,t.map(function(e,t){return s.default.createElement(d.default,{claimData:e,key:e.name+"-"+t})}),s.default.createElement("div",null,n>1&&s.default.createElement("button",{className:"button--secondary",onClick:this.showPreviousResultsPage},"Previous Page"),n0;)a+=1,r=t.substring(0,a),l=l.filter(function(e){return e.claimId&&e.claimId.substring(0,a)===r});return r}}},function(e,t,n){"use strict";var r=n(2),a=n(98),l=n(3),o=l.details,i=l.publishing;e.exports={parsePublishApiRequestBody:function(e){var t=e.name,n=e.nsfw,r=e.license,a=e.title,l=e.description,o=e.thumbnail;if(!t)throw new Error("no name field found in request");if(/[^A-Za-z0-9,-]/.exec(t))throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and "-"');return n="true"===n,r=r||null,a=a||null,l=l||null,o=o||null,{name:t,nsfw:n,license:r,title:a,description:l,thumbnail:o}},parsePublishApiRequestFiles:function(t){var n=t.file,r=t.thumbnail;if(!n)throw new Error("no file with key of [file] found in request");if(!n.path)throw new Error("no file path found");if(!n.type)throw new Error("no file type found");if(!n.size)throw new Error("no file type found");if(/'/.test(n.name))throw new Error("apostrophes are not allowed in the file name");return e.exports.validateFileTypeAndSize(n),{fileName:n.name,filePath:n.path,fileType:n.type,thumbnailFileName:r?r.name:null,thumbnailFilePath:r?r.path:null,thumbnailFileType:r?r.type:null}},validateFileTypeAndSize:function(e){switch(e.type){case"image/jpeg":case"image/jpg":case"image/png":if(e.size>1e7)throw r.debug("publish > file validation > .jpeg/.jpg/.png was too big"),new Error("Sorry, images are limited to 10 megabytes.");break;case"image/gif":if(e.size>5e7)throw r.debug("publish > file validation > .gif was too big"),new Error("Sorry, .gifs are limited to 50 megabytes.");break;case"video/mp4":if(e.size>5e7)throw r.debug("publish > file validation > .mp4 was too big"),new Error("Sorry, videos are limited to 50 megabytes.");break;default:throw r.debug("publish > file validation > unrecognized file type"),new Error("The "+e.type+" content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.")}return e},createBasicPublishParams:function(e,t,n,a,l,u,s){r.debug("Creating Publish Parameters"),null!==n&&""!==n.trim()||(n=t),null!==a&&""!==a.trim()||(a=""),null!==l&&""!==l.trim()||(l=" ");var c={name:t,file_path:e,bid:.01,metadata:{description:a,title:n,author:o.title,language:"en",license:l,nsfw:u},claim_address:i.primaryClaimAddress};return s&&(c.metadata.thumbnail=s),c},createThumbnailPublishParams:function(e,t,n,a){if(e)return r.debug("Creating Thumbnail Publish Parameters"),{name:t+"-thumb",file_path:e,bid:.01,metadata:{title:t+" thumbnail",description:"a thumbnail for "+t,author:o.title,language:"en",license:n,nsfw:a},claim_address:i.primaryClaimAddress,channel_name:i.thumbnailChannel,channel_id:i.thumbnailChannelId}},deleteTemporaryFile:function(e){a.unlink(e,function(t){if(t)throw r.error("error deleting temporary file "+e),t;r.debug("successfully deleted "+e)})},addGetResultsToFileData:function(e,t){return e.fileName=t.file_name,e.filePath=t.download_path,e},createFileData:function(e){var t=e.name,n=e.claimId,r=e.outpoint,a=e.height,l=e.address,o=e.nsfw;return{name:t,claimId:n,outpoint:r,height:a,address:l,fileName:"",filePath:"",fileType:e.contentType,nsfw:o}}}},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";var r=function(){function e(e,t){var n=[],r=!0,a=!1,l=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,l=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw l}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=n(2);e.exports={handleErrorResponse:function(t,n,l,o){a.error("Error on "+t,e.exports.useObjectPropertiesIfNoKeys(l));var i=e.exports.returnErrorMessageAndStatus(l),u=r(i,2),s=u[0],c=u[1];o.status(s).json(e.exports.createErrorResponsePayload(s,c))},returnErrorMessageAndStatus:function(e){var t=void 0,n=void 0;return"ECONNREFUSED"===e.code?(t=503,n="Connection refused. The daemon may not be running."):(t=400,n=e.message?e.message:e),[t,n]},useObjectPropertiesIfNoKeys:function(e){if(0===Object.keys(e).length){var t={};return Object.getOwnPropertyNames(e).forEach(function(n){t[n]=e[n]}),t}return e},createErrorResponsePayload:function(e,t){return{status:e,success:!1,message:t}}}},function(e,t,n){"use strict";var r=function(){function e(e,t){var n=[],r=!0,a=!1,l=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,l=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw l}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=n(9),l=n(2),o=n(145),i=o.returnPaginatedChannelClaims;e.exports={getClaimId:function(t,n,r,a){return t?e.exports.getClaimIdByChannel(t,n,r):e.exports.getClaimIdByClaim(r,a)},getClaimIdByClaim:function(e,t){return l.debug("getClaimIdByClaim("+e+", "+t+")"),new Promise(function(n,r){a.Claim.getLongClaimId(e,t).then(function(e){e||n("NO_CLAIM"),n(e)}).catch(function(e){r(e)})})},getClaimIdByChannel:function(e,t,n){return l.debug("getClaimIdByChannel("+e+", "+t+", "+n+")"),new Promise(function(l,o){a.Certificate.getLongChannelId(e,t).then(function(e){return e?Promise.all([e,a.Claim.getClaimIdByLongChannelId(e,n)]):[null,null]}).then(function(e){var t=r(e,2),n=t[0],a=t[1];return n?a?void l(a):l("NO_CLAIM"):l("NO_CHANNEL")}).catch(function(e){o(e)})})},getChannelData:function(e,t,n){return new Promise(function(n,l){a.Certificate.getLongChannelId(e,t).then(function(t){return t?Promise.all([t,a.Certificate.getShortChannelIdFromLongChannelId(t,e)]):[null,null,null]}).then(function(t){var a=r(t,2),l=a[0],o=a[1];if(!l)return n("NO_CHANNEL");n({channelName:e,longChannelClaimId:l,shortChannelClaimId:o})}).catch(function(e){l(e)})})},getChannelClaims:function(e,t,n){return new Promise(function(l,o){a.Certificate.getLongChannelId(e,t).then(function(e){return e?Promise.all([e,a.Claim.getAllChannelClaims(e)]):[null,null,null]}).then(function(t){var a=r(t,2),o=a[0],u=a[1];if(!o)return l("NO_CHANNEL");var s=i(e,o,u,n);l(s)}).catch(function(e){o(e)})})},getLocalFileRecord:function(e,t){return a.File.findOne({where:{claimId:e,name:t}}).then(function(e){return e?e.dataValues:"NO_FILE"})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(0),l=r(a),o=n(102),i=n(57),u=n(103),s=r(u),c=n(1),d=n(4),f=n(13),p=r(f),h=n(108),m=r(h),b=n(113),v=r(b),g=n(48),y=r(g);e.exports=function(e,t){var n={},r=(0,i.createStore)(s.default),a=(0,o.renderToString)(l.default.createElement(c.Provider,{store:r},l.default.createElement(d.StaticRouter,{location:e.url,context:n},l.default.createElement(p.default,null,l.default.createElement(m.default,null))))),u=y.default.renderStatic();if(n.url)return t.redirect(301,n.url);var f=r.getState();t.send((0,v.default)(u,a,f))}},function(e,t){e.exports=require("react-dom/server")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(57),l=n(147),o=r(l),i=n(148),u=r(i),s=n(149),c=r(s),d=n(150),f=r(d);t.default=(0,a.combineReducers)({channel:u.default,publish:o.default,show:c.default,site:f.default})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.FILE_SELECTED="FILE_SELECTED",t.FILE_CLEAR="FILE_CLEAR",t.METADATA_UPDATE="METADATA_UPDATE",t.CLAIM_UPDATE="CLAIM_UPDATE",t.SET_PUBLISH_IN_CHANNEL="SET_PUBLISH_IN_CHANNEL",t.PUBLISH_STATUS_UPDATE="PUBLISH_STATUS_UPDATE",t.ERROR_UPDATE="ERROR_UPDATE",t.SELECTED_CHANNEL_UPDATE="SELECTED_CHANNEL_UPDATE",t.TOGGLE_METADATA_INPUTS="TOGGLE_METADATA_INPUTS",t.THUMBNAIL_NEW="THUMBNAIL_NEW",t.PUBLISH_START="PUBLISH_START"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.LOGIN="Existing",t.CREATE="New"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CHANNEL_UPDATE="CHANNEL_UPDATE"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.LOCAL_CHECK="LOCAL_CHECK",t.UNAVAILABLE="UNAVAILABLE",t.ERROR="ERROR",t.AVAILABLE="AVAILABLE"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),l=r(a),o=n(4),i=n(58),u=n(20),s=r(u),c=n(23),d=r(c),f=n(26),p=r(f),h=n(35),m=r(h),b=(0,i.dynamicImport)("pages/HomePage"),v=function(){return l.default.createElement(o.Switch,null,l.default.createElement(o.Route,{exact:!0,path:"/",component:b}),l.default.createElement(o.Route,{exact:!0,path:"/about",component:s.default}),l.default.createElement(o.Route,{exact:!0,path:"/login",component:d.default}),l.default.createElement(o.Route,{exact:!0,path:"/:identifier/:claim",component:p.default}),l.default.createElement(o.Route,{exact:!0,path:"/:claim",component:p.default}),l.default.createElement(o.Route,{component:m.default}))};t.default=v},function(e,t,n){function r(e){return n(a(e))}function a(e){var t=l[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}var l={"./canonicalLink":59,"./canonicalLink.js":59,"./dynamicImport":58,"./dynamicImport.js":58,"./file":60,"./file.js":60,"./lbryUri":61,"./lbryUri.js":61,"./metaTags":62,"./metaTags.js":62,"./pageTitle":63,"./pageTitle.js":63,"./publish":110,"./publish.js":110,"./request":8,"./request.js":8,"./validate":111,"./validate.js":111};r.keys=function(){return Object.keys(l)},r.resolve=a,e.exports=r,r.id=109},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.createPublishMetadata=function(e,t,n,r,a){var l=t.type,o=n.title,i=n.description,u=n.license,s=n.nsfw,c={name:e,title:o,description:i,license:u,nsfw:s,type:l};return r&&(c.channelName=a),c},t.createPublishFormData=function(e,t,n){var r=new FormData;r.append("file",e),t&&r.append("thumbnail",t);for(var a in n)n.hasOwnProperty(a)&&r.append(a,n[a]);return r},t.createThumbnailUrl=function(e,t,n,r){return r+"/"+e+":"+t+"/"+n+"-thumb.png"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.validateChannelSelection=function(e,t,n){if(e&&t!==n.name)throw new Error("Log in to a channel or select Anonymous")},t.validatePublishParams=function(e,t,n){if(!e)throw new Error("Please choose a file");if(!t)throw new Error("Please enter a URL");if(n)throw new Error("Fix the url")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CHANNEL="CHANNEL",t.ASSET_LITE="ASSET_LITE",t.ASSET_DETAILS="ASSET_DETAILS"},function(e,t,n){"use strict";e.exports=function(e,t,n){return'\n \n \n \n \n \n \n \x3c!--helmet--\x3e\n '+e.title.toString()+"\n "+e.meta.toString()+"\n "+e.link.toString()+'\n \x3c!--style sheets--\x3e\n \n \n \n \x3c!--google font--\x3e\n \n \n \n
\n
'+t+"
\n
\n \\n \\n \\n \\n ';\n};\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar selectSiteState = exports.selectSiteState = function selectSiteState(state) {\n return state.site;\n};\n\nvar selectSiteHost = exports.selectSiteHost = function selectSiteHost(state) {\n return state.site.host;\n};\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(58);\n__webpack_require__(59);\nmodule.exports = __webpack_require__(60);\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"babel-polyfill\");\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"whatwg-fetch\");\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar server = __webpack_require__(61);\nvar components = __webpack_require__(139);\n// const containers = require('client/containers');\n// const pages = require('client/pages');\n\nvar _exports = {\n SpeechServer: server,\n Components: components\n // containers,\n // pages,\n};\n\nmodule.exports = _exports;\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// app dependencies\nvar express = __webpack_require__(62);\nvar bodyParser = __webpack_require__(63);\nvar expressHandlebars = __webpack_require__(64);\nvar Handlebars = __webpack_require__(65);\nvar helmet = __webpack_require__(66);\nvar passport = __webpack_require__(28);\n\nvar _require = __webpack_require__(67),\n serializeSpeechUser = _require.serializeSpeechUser,\n deserializeSpeechUser = _require.deserializeSpeechUser;\n\nvar cookieSession = __webpack_require__(68);\nvar http = __webpack_require__(69);\n// logging dependencies\nvar logger = __webpack_require__(1);\n\nfunction SpeechServer() {\n var _this = this;\n\n this.configureMysql = function (mysqlConfig) {\n __webpack_require__(29).configure(mysqlConfig);\n };\n this.configureSite = function (siteConfig) {\n __webpack_require__(3).configure(siteConfig);\n console.log(__webpack_require__(3));\n _this.sessionKey = siteConfig.auth.sessionKey;\n _this.PORT = siteConfig.details.port;\n };\n this.configureSlack = function (slackConfig) {\n __webpack_require__(30).configure(slackConfig);\n };\n this.createApp = function () {\n // create an Express application\n var app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(__dirname + '/public')); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use(function (req, res, next) {\n // custom logging middleware to log all incoming http requests\n logger.verbose('Request on ' + req.originalUrl + ' from ' + req.ip);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n var localSignupStrategy = __webpack_require__(70);\n var localLoginStrategy = __webpack_require__(81);\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name: 'session',\n keys: [_this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000 // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n var hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars: Handlebars\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n __webpack_require__(82)(app);\n __webpack_require__(83)(app);\n __webpack_require__(89)(app);\n __webpack_require__(124)(app);\n __webpack_require__(134)(app);\n\n _this.app = app;\n };\n this.initialize = function () {\n __webpack_require__(135)(logger);\n __webpack_require__(137)(logger);\n _this.createApp();\n _this.server = http.Server(_this.app);\n };\n this.start = function () {\n var db = __webpack_require__(5);\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(function () {\n _this.server.listen(_this.PORT, function () {\n logger.info('Server is listening on PORT ' + _this.PORT);\n });\n }).catch(function (error) {\n logger.error('Startup Error:', error);\n });\n };\n};\n\nmodule.exports = SpeechServer;\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express\");\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"body-parser\");\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express-handlebars\");\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"handlebars\");\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"helmet\");\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n serializeSpeechUser: function serializeSpeechUser(user, done) {\n // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser: function deserializeSpeechUser(user, done) {\n // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n }\n};\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cookie-session\");\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"http\");\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar PassportLocalStrategy = __webpack_require__(31).Strategy;\nvar lbryApi = __webpack_require__(15);\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n logger.verbose('new channel signup request. user: ' + username + ' pass: ' + password + ' .');\n var userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel('@' + username).then(function (tx) {\n // create user record\n var userData = {\n userName: username,\n password: password\n };\n logger.verbose('userData >', userData);\n // create user record\n var channelData = {\n channelName: '@' + username,\n channelClaimId: tx.claim_id\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n var certificateData = {\n claimId: tx.claim_id,\n name: '@' + username\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 3),\n newUser = _ref2[0],\n newChannel = _ref2[1],\n newCertificate = _ref2[2];\n\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n }).then(function () {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n }).catch(function (error) {\n logger.error('signup error', error);\n return done(error);\n });\n});\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"axios\");\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279'\n }\n};\n\nmodule.exports = lbryConfig;\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"universal-analytics\");\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(33),\n returnShortId = _require.returnShortId;\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Certificate = sequelize.define('Certificate', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateVersion: {\n type: STRING,\n default: null\n },\n keyType: {\n type: STRING,\n default: null\n },\n publicKey: {\n type: TEXT('long'),\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Certificate.associate = function (db) {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n var _this = this;\n\n logger.debug('getShortChannelIdFromLongChannelId ' + channelName + ':' + longChannelId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: channelName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n var _this2 = this;\n\n logger.debug('getLongChannelIdFromShortChannelId(' + channelName + ', ' + channelClaimId + ')');\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: {\n name: channelName,\n claimId: {\n $like: channelClaimId + '%'\n }\n },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n var _this3 = this;\n\n logger.debug('getLongChannelIdFromChannelName(' + channelName + ')');\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n var _this4 = this;\n\n logger.debug('validateLongChannelId(' + name + ', ' + claimId + ')');\n return new Promise(function (resolve, reject) {\n _this4.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug('getLongChannelId(' + channelName + ', ' + channelClaimId + ')');\n if (channelClaimId && channelClaimId.length === 40) {\n // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) {\n // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var Channel = sequelize.define('Channel', {\n channelName: {\n type: STRING,\n allowNull: false\n },\n channelClaimId: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n Channel.associate = function (db) {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n/***/ }),\n/* 76 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(33),\n returnShortId = _require.returnShortId;\n\nvar _require2 = __webpack_require__(3),\n defaultThumbnail = _require2.assetDefaults.thumbnail,\n host = _require2.details.host;\n\nfunction determineFileExtensionFromContentType(contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail(storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData(claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Claim = sequelize.define('Claim', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateId: {\n type: STRING,\n default: null\n },\n author: {\n type: STRING,\n default: null\n },\n description: {\n type: TEXT('long'),\n default: null\n },\n language: {\n type: STRING,\n default: null\n },\n license: {\n type: STRING,\n default: null\n },\n licenseUrl: {\n type: STRING,\n default: null\n },\n nsfw: {\n type: BOOLEAN,\n default: null\n },\n preview: {\n type: STRING,\n default: null\n },\n thumbnail: {\n type: STRING,\n default: null\n },\n title: {\n type: STRING,\n default: null\n },\n metadataVersion: {\n type: STRING,\n default: null\n },\n contentType: {\n type: STRING,\n default: null\n },\n source: {\n type: STRING,\n default: null\n },\n sourceType: {\n type: STRING,\n default: null\n },\n sourceVersion: {\n type: STRING,\n default: null\n },\n streamVersion: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n channelName: {\n type: STRING,\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Claim.associate = function (db) {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n var _this = this;\n\n logger.debug('Claim.getShortClaimIdFromLongClaimId for ' + claimName + '#' + claimId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: claimName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n var _this2 = this;\n\n logger.debug('Claim.getAllChannelClaims for ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw: true // returns an array of only data, not an array of instances\n }).then(function (channelClaimsArray) {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(function (claim) {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n var _this3 = this;\n\n logger.debug('finding claim id for claim ' + claimName + ' from channel ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(result.length + ' records found for \"' + claimName + '\" in channel \"' + channelClaimId + '\"');\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n var _this4 = this;\n\n return new Promise(function (resolve, reject) {\n _this4.findAll({\n where: {\n name: name,\n claimId: {\n $like: shortId + '%'\n } },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n var _this5 = this;\n\n return new Promise(function (resolve, reject) {\n _this5.findAll({\n where: { name: name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] // note: maybe height and effective amount need to switch?\n }).then(function (result) {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n var _this6 = this;\n\n return new Promise(function (resolve, reject) {\n _this6.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug('getLongClaimId(' + claimName + ', ' + claimId + ')');\n if (claimId && claimId.length === 40) {\n // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n var _this7 = this;\n\n logger.debug('Claim.resolveClaim: ' + name + ' ' + claimId);\n return new Promise(function (resolve, reject) {\n _this7.findAll({\n where: { name: name, claimId: claimId }\n }).then(function (claimArray) {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error('more than one record matches ' + name + '#' + claimId + ' in db.Claim');\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER;\n\n var File = sequelize.define('File', {\n name: {\n type: STRING,\n allowNull: false\n },\n claimId: {\n type: STRING,\n allowNull: false\n },\n address: {\n type: STRING,\n allowNull: false\n },\n outpoint: {\n type: STRING,\n allowNull: false\n },\n height: {\n type: INTEGER,\n allowNull: false,\n default: 0\n },\n fileName: {\n type: STRING,\n allowNull: false\n },\n filePath: {\n type: STRING,\n allowNull: false\n },\n fileType: {\n type: STRING\n },\n nsfw: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: false\n },\n trendingEligible: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: true\n }\n }, {\n freezeTableName: true\n });\n\n File.associate = function (db) {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25\n });\n };\n\n return File;\n};\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n TEXT = _ref.TEXT;\n\n var Request = sequelize.define('Request', {\n action: {\n type: STRING,\n allowNull: false\n },\n url: {\n type: STRING,\n allowNull: false\n },\n ipAddress: {\n type: STRING,\n allowNull: true\n },\n result: {\n type: TEXT('long'),\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Request.associate = function (db) {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n return Request;\n};\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar bcrypt = __webpack_require__(80);\nvar logger = __webpack_require__(1);\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var User = sequelize.define('User', {\n userName: {\n type: STRING,\n allowNull: false\n },\n password: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n User.associate = function (db) {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n _this.update({ password: hash }).then(function () {\n resolve();\n }).catch(function (error) {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', function (user, options) {\n logger.debug('User.beforeCreate hook...');\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"bcrypt\");\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PassportLocalStrategy = __webpack_require__(31).Strategy;\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\n\nvar returnUserAndChannelInfo = function returnUserAndChannelInfo(userInstance) {\n return new Promise(function (resolve, reject) {\n var userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance.getChannel().then(function (_ref) {\n var channelName = _ref.channelName,\n channelClaimId = _ref.channelClaimId;\n\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n }).catch(function (error) {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n return db.User.findOne({\n where: { userName: username }\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n return user.comparePassword(password).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user).then(function (userInfo) {\n return done(null, userInfo);\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return done(error);\n });\n});\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\nvar passport = __webpack_require__(28);\n\nmodule.exports = function (app) {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), function (req, res) {\n logger.verbose('successful signup for ' + req.user.channelName);\n res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n // route for log in\n app.post('/login', function (req, res, next) {\n passport.authenticate('local-login', function (err, user, info) {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message\n });\n }\n logger.debug('successful login');\n req.logIn(user, function (err) {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', function (req, res) {\n req.logout();\n res.status(200).json({ success: true, message: 'you successfully logged out' });\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', function (req, res) {\n if (req.user) {\n res.status(200).json({ success: true, data: req.user });\n } else {\n res.status(401).json({ success: false, message: 'user is not logged in' });\n }\n });\n};\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(1);\nvar multipart = __webpack_require__(84);\n\nvar _require = __webpack_require__(3),\n uploadDirectory = _require.publishing.uploadDirectory,\n host = _require.details.host;\n\nvar multipartMiddleware = multipart({ uploadDir: uploadDirectory });\nvar db = __webpack_require__(5);\n\nvar _require2 = __webpack_require__(85),\n claimNameIsAvailable = _require2.claimNameIsAvailable,\n checkChannelAvailability = _require2.checkChannelAvailability,\n publish = _require2.publish;\n\nvar _require3 = __webpack_require__(15),\n getClaimList = _require3.getClaimList,\n resolveUri = _require3.resolveUri,\n getClaim = _require3.getClaim;\n\nvar _require4 = __webpack_require__(34),\n addGetResultsToFileData = _require4.addGetResultsToFileData,\n createBasicPublishParams = _require4.createBasicPublishParams,\n createThumbnailPublishParams = _require4.createThumbnailPublishParams,\n parsePublishApiRequestBody = _require4.parsePublishApiRequestBody,\n parsePublishApiRequestFiles = _require4.parsePublishApiRequestFiles,\n createFileData = _require4.createFileData;\n\nvar errorHandlers = __webpack_require__(35);\n\nvar _require5 = __webpack_require__(16),\n sendGATimingEvent = _require5.sendGATimingEvent;\n\nvar _require6 = __webpack_require__(87),\n authenticateUser = _require6.authenticateUser;\n\nvar _require7 = __webpack_require__(36),\n getChannelData = _require7.getChannelData,\n getChannelClaims = _require7.getChannelClaims,\n getClaimId = _require7.getClaimId;\n\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = function (app) {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', function (_ref, res) {\n var ip = _ref.ip,\n originalUrl = _ref.originalUrl,\n name = _ref.params.name;\n\n var gaStartTime = Date.now();\n checkChannelAvailability(name).then(function (availableName) {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', function (_ref2, res) {\n var ip = _ref2.ip,\n originalUrl = _ref2.originalUrl,\n params = _ref2.params;\n\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name).then(function (shortId) {\n res.status(200).json(shortId);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', function (_ref3, res) {\n var ip = _ref3.ip,\n originalUrl = _ref3.originalUrl,\n body = _ref3.body,\n params = _ref3.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', function (_ref4, res) {\n var ip = _ref4.ip,\n originalUrl = _ref4.originalUrl,\n body = _ref4.body,\n params = _ref4.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n var page = params.page;\n getChannelClaims(channelName, channelClaimId, page).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', function (_ref5, res) {\n var ip = _ref5.ip,\n originalUrl = _ref5.originalUrl,\n params = _ref5.params;\n\n getClaimList(params.name).then(function (claimsList) {\n res.status(200).json(claimsList);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', function (_ref6, res) {\n var ip = _ref6.ip,\n originalUrl = _ref6.originalUrl,\n params = _ref6.params;\n\n var name = params.name;\n var claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId).then(function (resolveResult) {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n var fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(name + '#' + claimId)]);\n }).then(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n fileData = _ref8[0],\n getResult = _ref8[1];\n\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, { name: name, claimId: claimId }, 'File'), getResult]);\n }).then(function (_ref9) {\n var _ref10 = _slicedToArray(_ref9, 2),\n fileRecord = _ref10[0],\n _ref10$ = _ref10[1],\n message = _ref10$.message,\n completed = _ref10$.completed;\n\n res.status(200).json({ success: true, message: message, completed: completed });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', function (_ref11, res) {\n var ip = _ref11.ip,\n originalUrl = _ref11.originalUrl,\n name = _ref11.params.name;\n\n var gaStartTime = Date.now();\n claimNameIsAvailable(name).then(function (result) {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', function (_ref12, res) {\n var headers = _ref12.headers,\n ip = _ref12.ip,\n originalUrl = _ref12.originalUrl,\n params = _ref12.params;\n\n resolveUri(params.name + '#' + params.claimId).then(function (resolvedUri) {\n res.status(200).json(resolvedUri);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, function (_ref13, res) {\n var body = _ref13.body,\n files = _ref13.files,\n headers = _ref13.headers,\n ip = _ref13.ip,\n originalUrl = _ref13.originalUrl,\n user = _ref13.user;\n\n // define variables\n var channelName = void 0,\n channelId = void 0,\n channelPassword = void 0,\n description = void 0,\n fileName = void 0,\n filePath = void 0,\n fileType = void 0,\n gaStartTime = void 0,\n license = void 0,\n name = void 0,\n nsfw = void 0,\n thumbnail = void 0,\n thumbnailFileName = void 0,\n thumbnailFilePath = void 0,\n thumbnailFileType = void 0,\n title = void 0;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n var _parsePublishApiReque = parsePublishApiRequestBody(body);\n // validateApiPublishRequest(body, files);\n\n\n name = _parsePublishApiReque.name;\n nsfw = _parsePublishApiReque.nsfw;\n license = _parsePublishApiReque.license;\n title = _parsePublishApiReque.title;\n description = _parsePublishApiReque.description;\n thumbnail = _parsePublishApiReque.thumbnail;\n\n var _parsePublishApiReque2 = parsePublishApiRequestFiles(files);\n\n fileName = _parsePublishApiReque2.fileName;\n filePath = _parsePublishApiReque2.filePath;\n fileType = _parsePublishApiReque2.fileType;\n thumbnailFileName = _parsePublishApiReque2.thumbnailFileName;\n thumbnailFilePath = _parsePublishApiReque2.thumbnailFilePath;\n thumbnailFileType = _parsePublishApiReque2.thumbnailFileType;\n channelName = body.channelName;\n channelId = body.channelId;\n channelPassword = body.channelPassword;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // check channel authorization\n Promise.all([authenticateUser(channelName, channelId, channelPassword, user), claimNameIsAvailable(name), createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail), createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw)]).then(function (_ref14) {\n var _ref15 = _slicedToArray(_ref14, 4),\n _ref15$ = _ref15[0],\n channelName = _ref15$.channelName,\n channelClaimId = _ref15$.channelClaimId,\n validatedClaimName = _ref15[1],\n publishParams = _ref15[2],\n thumbnailPublishParams = _ref15[3];\n\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n }).then(function (result) {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data: {\n name: name,\n claimId: result.claim_id,\n url: host + '/' + result.claim_id + '/' + name,\n lbryTx: result\n }\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', function (_ref16, res) {\n var ip = _ref16.ip,\n originalUrl = _ref16.originalUrl,\n body = _ref16.body,\n params = _ref16.params;\n\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name).then(function (shortId) {\n res.status(200).json({ success: true, data: shortId });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', function (_ref17, res) {\n var ip = _ref17.ip,\n originalUrl = _ref17.originalUrl,\n body = _ref17.body,\n params = _ref17.params;\n\n logger.debug('body:', body);\n var channelName = body.channelName;\n var channelClaimId = body.channelClaimId;\n var claimName = body.claimName;\n var claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (result) {\n if (result === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel could be found' });\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'No matching claim id could be found' });\n }\n res.status(200).json({ success: true, data: result });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', function (_ref18, res) {\n var ip = _ref18.ip,\n originalUrl = _ref18.originalUrl,\n body = _ref18.body,\n params = _ref18.params;\n\n var claimName = params.claimName;\n var claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId).then(function (claimInfo) {\n if (!claimInfo) {\n return res.status(404).json({ success: false, message: 'No claim could be found' });\n }\n res.status(200).json({ success: true, data: claimInfo });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', function (_ref19, res) {\n var ip = _ref19.ip,\n originalUrl = _ref19.originalUrl,\n params = _ref19.params;\n\n var name = params.name;\n var claimId = params.claimId;\n db.File.findOne({ where: { name: name, claimId: claimId } }).then(function (result) {\n if (result) {\n return res.status(200).json({ success: true, data: true });\n }\n res.status(200).json({ success: true, data: false });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"connect-multiparty\");\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _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; }\n\nvar logger = __webpack_require__(1);\nvar db = __webpack_require__(5);\nvar lbryApi = __webpack_require__(15);\nvar publishHelpers = __webpack_require__(34);\n\nvar _require = __webpack_require__(3),\n _require$publishing = _require.publishing,\n primaryClaimAddress = _require$publishing.primaryClaimAddress,\n additionalClaimAddresses = _require$publishing.additionalClaimAddresses;\n\nvar Sequelize = __webpack_require__(32);\nvar Op = Sequelize.Op;\n\nmodule.exports = {\n publish: function publish(publishParams, fileName, fileType) {\n return new Promise(function (resolve, reject) {\n var publishResults = void 0,\n certificateId = void 0,\n channelName = void 0;\n // publish the file\n return lbryApi.publishClaim(publishParams).then(function (tx) {\n logger.info('Successfully published ' + publishParams.name + ' ' + fileName, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug('this claim was published in channel: ' + publishParams.channel_name);\n return db.Channel.findOne({ where: { channelName: publishParams.channel_name } });\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n }).then(function (channel) {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug('certificateId: ' + certificateId);\n }).then(function () {\n // create the File record\n var fileRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n fileName: fileName,\n filePath: publishParams.file_path,\n fileType: fileType,\n nsfw: publishParams.metadata.nsfw\n };\n // create the Claim record\n var claimRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n thumbnail: publishParams.metadata.thumbnail,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n contentType: fileType,\n nsfw: publishParams.metadata.nsfw,\n amount: publishParams.bid,\n certificateId: certificateId,\n channelName: channelName\n };\n // upsert criteria\n var upsertCriteria = {\n name: publishParams.name,\n claimId: publishResults.claim_id\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n file = _ref2[0],\n claim = _ref2[1];\n\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n }).then(function () {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n }).catch(function (error) {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable: function claimNameIsAvailable(name) {\n var claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim.findAll({\n attributes: ['address'],\n where: {\n name: name,\n address: _defineProperty({}, Op.or, claimAddresses)\n }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n }).catch(function (error) {\n throw error;\n });\n },\n checkChannelAvailability: function checkChannelAvailability(name) {\n return db.Channel.findAll({\n where: { channelName: name }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n }).catch(function (error) {\n throw error;\n });\n }\n};\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"fs\");\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar db = __webpack_require__(5);\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n authenticateUser: function authenticateUser(channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName: null,\n channelClaimId: null\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName: user.channelName,\n channelClaimId: user.channelClaimId\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials: function authenticateChannelCredentials(channelName, channelId, userPassword) {\n return new Promise(function (resolve, reject) {\n // hoisted variables\n var channelData = void 0;\n // build the params for finding the channel\n var channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel.findOne({\n where: channelFindParams\n }).then(function (channel) {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) }\n });\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n }).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims: function returnPaginatedChannelClaims(channelName, longChannelClaimId, claims, page) {\n var totalPages = module.exports.determineTotalPages(claims);\n var paginationPage = module.exports.getPageFromQuery(page);\n var viewData = {\n channelName: channelName,\n longChannelClaimId: longChannelClaimId,\n claims: module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage: module.exports.determinePreviousPage(paginationPage),\n currentPage: paginationPage,\n nextPage: module.exports.determineNextPage(totalPages, paginationPage),\n totalPages: totalPages,\n totalResults: module.exports.determineTotalClaims(claims)\n };\n return viewData;\n },\n getPageFromQuery: function getPageFromQuery(page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims: function extractPageFromClaims(claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n var claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n var claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n var pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages: function determineTotalPages(claims) {\n if (!claims) {\n return 0;\n } else {\n var totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n var fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n var remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage: function determinePreviousPage(currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage: function determineNextPage(totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims: function determineTotalClaims(claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n }\n};\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(3),\n host = _require.details;\n\nvar handlePageRender = __webpack_require__(37);\n\nmodule.exports = function (app) {\n // route for the home page\n app.get('/', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', function (req, res) {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', function (req, res) {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', function (req, res) {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', function (_ref, res) {\n var params = _ref.params;\n\n var claimId = params.claimId;\n var name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host: host, claimId: claimId, name: name });\n });\n};\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data\n });\n default:\n return state;\n }\n};\n\nvar _publish_action_types = __webpack_require__(40);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nvar _publish_channel_select_states = __webpack_require__(91);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar _require = __webpack_require__(3),\n publishing = _require.publishing;\n\nvar initialState = {\n disabled: publishing.disabled,\n disabledMessage: publishing.disabledMessage,\n publishInChannel: false,\n selectedChannel: _publish_channel_select_states.LOGIN,\n showMetadataInputs: false,\n status: {\n status: null,\n message: null\n },\n error: {\n file: null,\n url: null,\n channel: null,\n publishSubmit: null\n },\n file: null,\n claim: '',\n metadata: {\n title: '',\n description: '',\n license: '',\n nsfw: false\n },\n thumbnail: null\n};\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOGIN = exports.LOGIN = 'Existing';\nvar CREATE = exports.CREATE = 'New';\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data\n });\n default:\n return state;\n }\n};\n\nvar _channel_action_types = __webpack_require__(41);\n\nvar actions = _interopRequireWildcard(_channel_action_types);\n\nfunction _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; } }\n\nvar initialState = {\n loggedInChannel: {\n name: null,\n shortId: null,\n longId: null\n }\n};\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data\n })\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id: action.data.requestId\n })\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n key: action.data.key\n }))\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n name: action.data.name,\n claimId: action.data.claimId,\n shortId: action.data.shortId,\n claimData: action.data.claimData\n }))\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.id, {\n name: action.data.name,\n longId: action.data.longId,\n shortId: action.data.shortId,\n claimsData: action.data.claimsData\n }))\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.channelListId, Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData\n })))\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data\n })\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error: action.data,\n status: _asset_display_states.ERROR\n })\n });\n default:\n return state;\n }\n};\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _asset_display_states = __webpack_require__(42);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar initialState = {\n request: {\n error: null,\n type: null,\n id: null\n },\n requestList: {},\n channelList: {},\n assetList: {},\n displayAsset: {\n error: null,\n status: _asset_display_states.LOCAL_CHECK\n }\n};\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n default:\n return state;\n }\n};\n\nvar siteConfig = __webpack_require__(3);\n\nvar googleAnalyticsId = siteConfig.analytics.googleId,\n _siteConfig$assetDefa = siteConfig.assetDefaults,\n defaultThumbnail = _siteConfig$assetDefa.thumbnail,\n defaultDescription = _siteConfig$assetDefa.description,\n _siteConfig$details = siteConfig.details,\n description = _siteConfig$details.description,\n host = _siteConfig$details.host,\n title = _siteConfig$details.title,\n twitter = _siteConfig$details.twitter;\n\n\nvar initialState = {\n description: description,\n googleAnalyticsId: googleAnalyticsId,\n host: host,\n title: title,\n twitter: twitter,\n defaultDescription: defaultDescription,\n defaultThumbnail: defaultThumbnail\n};\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-ga\");\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cross-fetch/polyfill\");\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AboutPage = function (_React$Component) {\n _inherits(AboutPage, _React$Component);\n\n function AboutPage() {\n _classCallCheck(this, AboutPage);\n\n return _possibleConstructorReturn(this, (AboutPage.__proto__ || Object.getPrototypeOf(AboutPage)).apply(this, arguments));\n }\n\n _createClass(AboutPage, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'About', pageUri: 'about' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n { className: 'pull-quote' },\n 'Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/spee_ch' },\n 'TWITTER'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch' },\n 'GITHUB'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://discord.gg/YjYbwhS' },\n 'DISCORD CHANNEL'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch/blob/master/README.md' },\n 'DOCUMENTATION'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a media-hosting site that reads from and publishes content to the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io' },\n 'LBRY'\n ),\n ' blockchain.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io/get' },\n 'LBRY'\n ),\n ' network. This means that your images are stored in multiple locations without a single point of failure.'\n ),\n _react2.default.createElement(\n 'h3',\n null,\n 'Contribute'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you have an idea for your own spee.ch-like site on top of LBRY, fork our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch' },\n 'github repo'\n ),\n ' and go to town!'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you want to improve spee.ch, join our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS' },\n 'discord channel'\n ),\n ' or solve one of our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch/issues' },\n 'github issues'\n ),\n '.'\n )\n )\n )\n )\n );\n }\n }]);\n\n return AboutPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = AboutPage;\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _Logo = __webpack_require__(48);\n\nvar _Logo2 = _interopRequireDefault(_Logo);\n\nvar _NavBarChannelOptionsDropdown = __webpack_require__(49);\n\nvar _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar VIEW = 'VIEW';\nvar LOGOUT = 'LOGOUT';\n\nvar NavBar = function (_React$Component) {\n _inherits(NavBar, _React$Component);\n\n function NavBar(props) {\n _classCallCheck(this, NavBar);\n\n var _this = _possibleConstructorReturn(this, (NavBar.__proto__ || Object.getPrototypeOf(NavBar)).call(this, props));\n\n _this.checkForLoggedInUser = _this.checkForLoggedInUser.bind(_this);\n _this.logoutUser = _this.logoutUser.bind(_this);\n _this.handleSelection = _this.handleSelection.bind(_this);\n return _this;\n }\n\n _createClass(NavBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n }, {\n key: 'checkForLoggedInUser',\n value: function checkForLoggedInUser() {\n var _this2 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/user', params).then(function (_ref) {\n var data = _ref.data;\n\n _this2.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n }).catch(function (error) {\n console.log('/user error:', error.message);\n });\n }\n }, {\n key: 'logoutUser',\n value: function logoutUser() {\n var _this3 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/logout', params).then(function () {\n _this3.props.onChannelLogout();\n }).catch(function (error) {\n console.log('/logout error', error.message);\n });\n }\n }, {\n key: 'handleSelection',\n value: function handleSelection(event) {\n var value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push('/' + this.props.channelName + ':' + this.props.channelLongId);\n break;\n default:\n break;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var siteDescription = this.props.siteDescription;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--wide nav-bar' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--short flex-container--row flex-container--space-between-center' },\n _react2.default.createElement(_Logo2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--center' },\n _react2.default.createElement(\n 'span',\n { className: 'nav-bar-tagline' },\n siteDescription\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--right' },\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/', exact: true },\n 'Publish'\n ),\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/about' },\n 'About'\n ),\n this.props.channelName ? _react2.default.createElement(_NavBarChannelOptionsDropdown2.default, {\n channelName: this.props.channelName,\n handleSelection: this.handleSelection,\n defaultSelection: this.props.channelName,\n VIEW: VIEW,\n LOGOUT: LOGOUT\n }) : _react2.default.createElement(\n _reactRouterDom.NavLink,\n { id: 'nav-bar-login-link', className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/login' },\n 'Channel'\n )\n )\n )\n );\n }\n }]);\n\n return NavBar;\n}(_react2.default.Component);\n\nexports.default = (0, _reactRouterDom.withRouter)(NavBar);\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _pageTitle = __webpack_require__(23);\n\nvar _metaTags = __webpack_require__(22);\n\nvar _canonicalLink = __webpack_require__(20);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SEO = function (_React$Component) {\n _inherits(SEO, _React$Component);\n\n function SEO() {\n _classCallCheck(this, SEO);\n\n return _possibleConstructorReturn(this, (SEO.__proto__ || Object.getPrototypeOf(SEO)).apply(this, arguments));\n }\n\n _createClass(SEO, [{\n key: 'render',\n value: function render() {\n // props from state\n var _props = this.props,\n defaultDescription = _props.defaultDescription,\n defaultThumbnail = _props.defaultThumbnail,\n siteDescription = _props.siteDescription,\n siteHost = _props.siteHost,\n siteTitle = _props.siteTitle,\n siteTwitter = _props.siteTwitter;\n // props from parent\n\n var _props2 = this.props,\n asset = _props2.asset,\n channel = _props2.channel,\n pageUri = _props2.pageUri;\n var pageTitle = this.props.pageTitle;\n // create page title, tags, and canonical link\n\n pageTitle = (0, _pageTitle.createPageTitle)(siteTitle, pageTitle);\n var metaTags = (0, _metaTags.createMetaTags)(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n var canonicalLink = (0, _canonicalLink.createCanonicalLink)(asset, channel, pageUri, siteHost);\n // render results\n return _react2.default.createElement(_reactHelmet2.default, {\n title: pageTitle,\n meta: metaTags,\n link: [{ rel: 'canonical', href: canonicalLink }]\n });\n }\n }]);\n\n return SEO;\n}(_react2.default.Component);\n\n;\n\nSEO.propTypes = {\n pageTitle: _propTypes2.default.string,\n pageUri: _propTypes2.default.string,\n channel: _propTypes2.default.object,\n asset: _propTypes2.default.object\n};\n\nexports.default = SEO;\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(101);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel;\n\n return {\n loggedInChannelName: channel.loggedInChannel.name\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelLoginForm = __webpack_require__(102);\n\nvar _ChannelLoginForm2 = _interopRequireDefault(_ChannelLoginForm);\n\nvar _ChannelCreateForm = __webpack_require__(104);\n\nvar _ChannelCreateForm2 = _interopRequireDefault(_ChannelCreateForm);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar LoginPage = function (_React$Component) {\n _inherits(LoginPage, _React$Component);\n\n function LoginPage() {\n _classCallCheck(this, LoginPage);\n\n return _possibleConstructorReturn(this, (LoginPage.__proto__ || Object.getPrototypeOf(LoginPage)).apply(this, arguments));\n }\n\n _createClass(LoginPage, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push('/');\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'Login', pageUri: 'login' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you\\'re ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: '/@catalonia2017:43dcf47163caa21d8404d9fe9b30f78ef3e146a8' },\n 'documenting important events'\n ),\n ', or making a public repository for ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: '/@catGifs' },\n 'cat gifs'\n ),\n ' (password: \\'1234\\'), try creating a channel for it!'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'h3',\n { className: 'h3--no-bottom' },\n 'Log in to an existing channel:'\n ),\n _react2.default.createElement(_ChannelLoginForm2.default, null),\n _react2.default.createElement(\n 'h3',\n { className: 'h3--no-bottom' },\n 'Create a brand new channel:'\n ),\n _react2.default.createElement(_ChannelCreateForm2.default, null)\n )\n )\n )\n );\n }\n }]);\n\n return LoginPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = (0, _reactRouterDom.withRouter)(LoginPage);\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _channel = __webpack_require__(24);\n\nvar _view = __webpack_require__(103);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(25);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 103 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelLoginForm = function (_React$Component) {\n _inherits(ChannelLoginForm, _React$Component);\n\n function ChannelLoginForm(props) {\n _classCallCheck(this, ChannelLoginForm);\n\n var _this = _possibleConstructorReturn(this, (ChannelLoginForm.__proto__ || Object.getPrototypeOf(ChannelLoginForm)).call(this, props));\n\n _this.state = {\n error: null,\n name: '',\n password: ''\n };\n _this.handleInput = _this.handleInput.bind(_this);\n _this.loginToChannel = _this.loginToChannel.bind(_this);\n return _this;\n }\n\n _createClass(ChannelLoginForm, [{\n key: 'handleInput',\n value: function handleInput(event) {\n var name = event.target.name;\n var value = event.target.value;\n this.setState(_defineProperty({}, name, value));\n }\n }, {\n key: 'loginToChannel',\n value: function loginToChannel(event) {\n var _this2 = this;\n\n event.preventDefault();\n var params = {\n method: 'POST',\n body: JSON.stringify({ username: this.state.name, password: this.state.password }),\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n credentials: 'include'\n };\n (0, _request2.default)('login', params).then(function (_ref) {\n var success = _ref.success,\n channelName = _ref.channelName,\n shortChannelId = _ref.shortChannelId,\n channelClaimId = _ref.channelClaimId,\n message = _ref.message;\n\n if (success) {\n _this2.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n _this2.setState({ 'error': message });\n };\n }).catch(function (error) {\n if (error.message) {\n _this2.setState({ 'error': error.message });\n } else {\n _this2.setState({ 'error': error });\n }\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'form',\n { id: 'channel-login-form' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-login-name-input' },\n 'Name:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary flex-container--row flex-container--left-bottom' },\n _react2.default.createElement(\n 'span',\n null,\n '@'\n ),\n _react2.default.createElement('input', { type: 'text', id: 'channel-login-name-input', className: 'input-text', name: 'name', placeholder: 'Your Channel Name', value: this.state.channelName, onChange: this.handleInput })\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-login-password-input' },\n 'Password:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary' },\n _react2.default.createElement('input', { type: 'password', id: 'channel-login-password-input', name: 'password', className: 'input-text', placeholder: '', value: this.state.channelPassword, onChange: this.handleInput })\n )\n )\n ),\n this.state.error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.state.error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Enter the name and password for your channel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary', onClick: this.loginToChannel },\n 'Authenticate'\n )\n )\n );\n }\n }]);\n\n return ChannelLoginForm;\n}(_react2.default.Component);\n\nexports.default = ChannelLoginForm;\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _channel = __webpack_require__(24);\n\nvar _view = __webpack_require__(105);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(25);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(26);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelCreateForm = function (_React$Component) {\n _inherits(ChannelCreateForm, _React$Component);\n\n function ChannelCreateForm(props) {\n _classCallCheck(this, ChannelCreateForm);\n\n var _this = _possibleConstructorReturn(this, (ChannelCreateForm.__proto__ || Object.getPrototypeOf(ChannelCreateForm)).call(this, props));\n\n _this.state = {\n error: null,\n channel: '',\n password: '',\n status: null\n };\n _this.handleChannelInput = _this.handleChannelInput.bind(_this);\n _this.handleInput = _this.handleInput.bind(_this);\n _this.createChannel = _this.createChannel.bind(_this);\n return _this;\n }\n\n _createClass(ChannelCreateForm, [{\n key: 'cleanseChannelInput',\n value: function cleanseChannelInput(input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n }, {\n key: 'handleChannelInput',\n value: function handleChannelInput(event) {\n var value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({ channel: value });\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({ error: 'Please enter a channel name' });\n }\n }\n }, {\n key: 'handleInput',\n value: function handleInput(event) {\n var name = event.target.name;\n var value = event.target.value;\n this.setState(_defineProperty({}, name, value));\n }\n }, {\n key: 'updateIsChannelAvailable',\n value: function updateIsChannelAvailable(channel) {\n var _this2 = this;\n\n var channelWithAtSymbol = '@' + channel;\n (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol).then(function () {\n _this2.setState({ 'error': null });\n }).catch(function (error) {\n _this2.setState({ 'error': error.message });\n });\n }\n }, {\n key: 'checkIsChannelAvailable',\n value: function checkIsChannelAvailable(channel) {\n var channelWithAtSymbol = '@' + channel;\n return (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol);\n }\n }, {\n key: 'checkIsPasswordProvided',\n value: function checkIsPasswordProvided(password) {\n return new Promise(function (resolve, reject) {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n }, {\n key: 'makePublishChannelRequest',\n value: function makePublishChannelRequest(username, password) {\n var params = {\n method: 'POST',\n body: JSON.stringify({ username: username, password: password }),\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n credentials: 'include'\n };\n return new Promise(function (resolve, reject) {\n (0, _request2.default)('/signup', params).then(function (result) {\n return resolve(result);\n }).catch(function (error) {\n reject(new Error('Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ' + error.message));\n });\n });\n }\n }, {\n key: 'createChannel',\n value: function createChannel(event) {\n var _this3 = this;\n\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password).then(function () {\n return _this3.checkIsChannelAvailable(_this3.state.channel);\n }).then(function () {\n _this3.setState({ status: 'We are publishing your new channel. Sit tight...' });\n return _this3.makePublishChannelRequest(_this3.state.channel, _this3.state.password);\n }).then(function (result) {\n _this3.setState({ status: null });\n _this3.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n }).catch(function (error) {\n if (error.message) {\n _this3.setState({ 'error': error.message, status: null });\n } else {\n _this3.setState({ 'error': error, status: null });\n };\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n !this.state.status ? _react2.default.createElement(\n 'form',\n { id: 'publish-channel-form' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'new-channel-name' },\n 'Name:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary flex-container--row flex-container--left-bottom span--relative' },\n _react2.default.createElement(\n 'span',\n null,\n '@'\n ),\n _react2.default.createElement('input', { type: 'text', name: 'channel', id: 'new-channel-name', className: 'input-text', placeholder: 'exampleChannelName', value: this.state.channel, onChange: this.handleChannelInput }),\n this.state.channel && !this.state.error && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--success span--absolute' },\n '\\u2713'\n ),\n this.state.error && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--failure span--absolute' },\n '\\u2716'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'new-channel-password' },\n 'Password:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary' },\n _react2.default.createElement('input', { type: 'password', name: 'password', id: 'new-channel-password', className: 'input-text', placeholder: '', value: this.state.password, onChange: this.handleInput })\n )\n )\n ),\n this.state.error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.state.error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Choose a name and password for your channel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary', onClick: this.createChannel },\n 'Create Channel'\n )\n )\n ) : _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n this.state.status\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 })\n )\n );\n }\n }]);\n\n return ChannelCreateForm;\n}(_react2.default.Component);\n\nexports.default = ChannelCreateForm;\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _show = __webpack_require__(7);\n\nvar _view = __webpack_require__(107);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n return {\n error: show.request.error,\n requestType: show.request.type\n };\n};\n\nvar mapDispatchToProps = {\n onHandleShowPageUri: _show.onHandleShowPageUri\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ErrorPage = __webpack_require__(27);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _ShowAssetLite = __webpack_require__(108);\n\nvar _ShowAssetLite2 = _interopRequireDefault(_ShowAssetLite);\n\nvar _ShowAssetDetails = __webpack_require__(111);\n\nvar _ShowAssetDetails2 = _interopRequireDefault(_ShowAssetDetails);\n\nvar _ShowChannel = __webpack_require__(117);\n\nvar _ShowChannel2 = _interopRequireDefault(_ShowChannel);\n\nvar _show_request_types = __webpack_require__(52);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowPage = function (_React$Component) {\n _inherits(ShowPage, _React$Component);\n\n function ShowPage() {\n _classCallCheck(this, ShowPage);\n\n return _possibleConstructorReturn(this, (ShowPage.__proto__ || Object.getPrototypeOf(ShowPage)).apply(this, arguments));\n }\n\n _createClass(ShowPage, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n error = _props.error,\n requestType = _props.requestType;\n\n if (error) {\n return _react2.default.createElement(_ErrorPage2.default, { error: error });\n }\n switch (requestType) {\n case _show_request_types.CHANNEL:\n return _react2.default.createElement(_ShowChannel2.default, null);\n case _show_request_types.ASSET_LITE:\n return _react2.default.createElement(_ShowAssetLite2.default, null);\n case _show_request_types.ASSET_DETAILS:\n return _react2.default.createElement(_ShowAssetDetails2.default, null);\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'loading...'\n );\n }\n }\n }]);\n\n return ShowPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowPage;\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(109);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select asset info\n var asset = void 0;\n var request = show.requestList[requestId] || null;\n var assetList = show.assetList;\n if (request && assetList) {\n var assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset: asset\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _AssetDisplay = __webpack_require__(53);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowLite = function (_React$Component) {\n _inherits(ShowLite, _React$Component);\n\n function ShowLite() {\n _classCallCheck(this, ShowLite);\n\n return _possibleConstructorReturn(this, (ShowLite.__proto__ || Object.getPrototypeOf(ShowLite)).apply(this, arguments));\n }\n\n _createClass(ShowLite, [{\n key: 'render',\n value: function render() {\n var asset = this.props.asset;\n\n if (asset) {\n var _asset$claimData = asset.claimData,\n name = _asset$claimData.name,\n claimId = _asset$claimData.claimId;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column flex-container--center-center show-lite-container' },\n _react2.default.createElement(_SEO2.default, { pageTitle: name, asset: asset }),\n _react2.default.createElement(_AssetDisplay2.default, null),\n _react2.default.createElement(\n _reactRouterDom.Link,\n { id: 'asset-boilerpate', className: 'link--primary fine-print', to: '/' + claimId + '/' + name },\n 'hosted via Spee.ch'\n )\n );\n }\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded flex-container--column flex-container--center-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'loading asset data...'\n )\n );\n }\n }]);\n\n return ShowLite;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowLite;\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(26);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _asset_display_states = __webpack_require__(42);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AssetDisplay = function (_React$Component) {\n _inherits(AssetDisplay, _React$Component);\n\n function AssetDisplay() {\n _classCallCheck(this, AssetDisplay);\n\n return _possibleConstructorReturn(this, (AssetDisplay.__proto__ || Object.getPrototypeOf(AssetDisplay)).apply(this, arguments));\n }\n\n _createClass(AssetDisplay, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props$asset$claimDat = this.props.asset.claimData,\n name = _props$asset$claimDat.name,\n claimId = _props$asset$claimDat.claimId;\n\n this.props.onFileRequest(name, claimId);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n status = _props.status,\n error = _props.error,\n _props$asset$claimDat2 = _props.asset.claimData,\n name = _props$asset$claimDat2.name,\n claimId = _props$asset$claimDat2.claimId,\n contentType = _props$asset$claimDat2.contentType,\n fileExt = _props$asset$claimDat2.fileExt,\n thumbnail = _props$asset$claimDat2.thumbnail;\n\n return _react2.default.createElement(\n 'div',\n { id: 'asset-display-component' },\n status === _asset_display_states.LOCAL_CHECK && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Checking to see if Spee.ch has your asset locally...'\n )\n ),\n status === _asset_display_states.UNAVAILABLE && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Sit tight, we\\'re searching the LBRY blockchain for your asset!'\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 }),\n _react2.default.createElement(\n 'p',\n null,\n 'Curious what magic is happening here? ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: 'blank', href: 'https://lbry.io/faq/what-is-lbry' },\n 'Learn more.'\n )\n )\n ),\n status === _asset_display_states.ERROR && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Unfortunately, we couldn\\'t download your asset from LBRY. You can help us out by sharing the below error message in the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS', target: '_blank' },\n 'LBRY discord'\n ),\n '.'\n ),\n _react2.default.createElement(\n 'i',\n null,\n _react2.default.createElement(\n 'p',\n { id: 'error-message' },\n error\n )\n )\n ),\n status === _asset_display_states.AVAILABLE && function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return _react2.default.createElement('img', {\n className: 'asset',\n src: '/' + claimId + '/' + name + '.' + fileExt,\n alt: name });\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset',\n src: '/' + claimId + '/' + name + '.' + fileExt,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement(\n 'video',\n { className: 'asset video', controls: true, poster: thumbnail },\n _react2.default.createElement('source', {\n src: '/' + claimId + '/' + name + '.' + fileExt\n }),\n _react2.default.createElement(\n 'p',\n null,\n 'Your browser does not support the ',\n _react2.default.createElement(\n 'code',\n null,\n 'video'\n ),\n ' element.'\n )\n );\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'Unsupported file type'\n );\n }\n }()\n );\n }\n }]);\n\n return AssetDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetDisplay;\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(112);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select asset info\n var asset = void 0;\n var request = show.requestList[requestId] || null;\n var assetList = show.assetList;\n if (request && assetList) {\n var assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset: asset\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ErrorPage = __webpack_require__(27);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _AssetTitle = __webpack_require__(113);\n\nvar _AssetTitle2 = _interopRequireDefault(_AssetTitle);\n\nvar _AssetDisplay = __webpack_require__(53);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nvar _AssetInfo = __webpack_require__(115);\n\nvar _AssetInfo2 = _interopRequireDefault(_AssetInfo);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowAssetDetails = function (_React$Component) {\n _inherits(ShowAssetDetails, _React$Component);\n\n function ShowAssetDetails() {\n _classCallCheck(this, ShowAssetDetails);\n\n return _possibleConstructorReturn(this, (ShowAssetDetails.__proto__ || Object.getPrototypeOf(ShowAssetDetails)).apply(this, arguments));\n }\n\n _createClass(ShowAssetDetails, [{\n key: 'render',\n value: function render() {\n var asset = this.props.asset;\n\n if (asset) {\n var name = asset.claimData.name;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name + ' - details', asset: asset }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_AssetTitle2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded show-details-container' },\n _react2.default.createElement(_AssetDisplay2.default, null)\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(_AssetInfo2.default, null)\n )\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading asset data...' });\n }\n }]);\n\n return ShowAssetDetails;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowAssetDetails;\n\n/***/ }),\n/* 113 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(114);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(12);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n var _selectAsset = (0, _show.selectAsset)(show),\n title = _selectAsset.claimData.title;\n\n return {\n title: title\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 114 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetTitle = function AssetTitle(_ref) {\n var title = _ref.title;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'span',\n { className: 'text--large' },\n title\n )\n );\n};\n\nexports.default = AssetTitle;\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(116);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(12);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select asset\n var asset = (0, _show.selectAsset)(show);\n // return props\n return {\n asset: asset\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 116 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AssetInfo = function (_React$Component) {\n _inherits(AssetInfo, _React$Component);\n\n function AssetInfo(props) {\n _classCallCheck(this, AssetInfo);\n\n var _this = _possibleConstructorReturn(this, (AssetInfo.__proto__ || Object.getPrototypeOf(AssetInfo)).call(this, props));\n\n _this.copyToClipboard = _this.copyToClipboard.bind(_this);\n return _this;\n }\n\n _createClass(AssetInfo, [{\n key: 'copyToClipboard',\n value: function copyToClipboard(event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({ error: 'Oops, unable to copy' });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$asset = this.props.asset,\n shortId = _props$asset.shortId,\n _props$asset$claimDat = _props$asset.claimData,\n channelName = _props$asset$claimDat.channelName,\n certificateId = _props$asset$claimDat.certificateId,\n description = _props$asset$claimDat.description,\n name = _props$asset$claimDat.name,\n claimId = _props$asset$claimDat.claimId,\n fileExt = _props$asset$claimDat.fileExt,\n contentType = _props$asset$claimDat.contentType,\n thumbnail = _props$asset$claimDat.thumbnail,\n host = _props$asset$claimDat.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n channelName && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Channel:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: '/' + channelName + ':' + certificateId },\n channelName\n )\n )\n )\n ),\n description && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n description\n )\n ),\n _react2.default.createElement(\n 'div',\n { id: 'show-share-buttons' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Share:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n {\n className: 'row row--short row--wide flex-container--row flex-container--space-between-bottom flex-container--wrap' },\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/intent/tweet?text=' + host + '/' + shortId + '/' + name },\n 'twitter'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://www.facebook.com/sharer/sharer.php?u=' + host + '/' + shortId + '/' + name },\n 'facebook'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'http://tumblr.com/widgets/share/tool?canonicalUrl=' + host + '/' + shortId + '/' + name },\n 'tumblr'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://www.reddit.com/submit?url=' + host + '/' + shortId + '/' + name + '&title=' + name },\n 'reddit'\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { id: 'show-short-link' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Link:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--short row--wide' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'div',\n { className: 'input-error', id: 'input-error-copy-short-link', hidden: 'true' },\n 'error here'\n ),\n _react2.default.createElement('input', { type: 'text', id: 'short-link', className: 'input-disabled input-text--full-width', readOnly: true,\n spellCheck: 'false',\n value: host + '/' + shortId + '/' + name + '.' + fileExt,\n onClick: this.select })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'short-link',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { id: 'show-embed-code' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Embed:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--short row--wide' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'div',\n { className: 'input-error', id: 'input-error-copy-embed-text', hidden: 'true' },\n 'error here'\n ),\n contentType === 'video/mp4' ? _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: '' }) : _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: ''\n })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'embed-text',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex-container--row flex-container--space-between-bottom' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { className: 'link--primary', to: '/' + shortId + '/' + name + '.' + fileExt },\n _react2.default.createElement(\n 'span',\n {\n className: 'text' },\n 'Direct Link'\n )\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: host + '/' + claimId + '/' + name + '.' + fileExt, download: name },\n 'Download'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://lbry.io/dmca' },\n 'Report'\n )\n )\n );\n }\n }]);\n\n return AssetInfo;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetInfo;\n\n/***/ }),\n/* 117 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(118);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select request info\n var requestId = show.request.id;\n // select request\n var previousRequest = show.requestList[requestId] || null;\n // select channel\n var channel = void 0;\n if (previousRequest) {\n var channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel: channel\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 118 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _ErrorPage = __webpack_require__(27);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelClaimsDisplay = __webpack_require__(119);\n\nvar _ChannelClaimsDisplay2 = _interopRequireDefault(_ChannelClaimsDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowChannel = function (_React$Component) {\n _inherits(ShowChannel, _React$Component);\n\n function ShowChannel() {\n _classCallCheck(this, ShowChannel);\n\n return _possibleConstructorReturn(this, (ShowChannel.__proto__ || Object.getPrototypeOf(ShowChannel)).apply(this, arguments));\n }\n\n _createClass(ShowChannel, [{\n key: 'render',\n value: function render() {\n var channel = this.props.channel;\n\n if (channel) {\n var name = channel.name,\n longId = channel.longId,\n shortId = channel.shortId;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name, channel: channel }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(\n 'h2',\n null,\n 'channel name: ',\n name\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'full channel id: ',\n longId\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'short channel id: ',\n shortId\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_ChannelClaimsDisplay2.default, null)\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading channel data...' });\n }\n }]);\n\n return ShowChannel;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowChannel;\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _show = __webpack_require__(7);\n\nvar _view = __webpack_require__(120);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select channel key\n var request = show.requestList[show.request.id];\n var channelKey = request.key;\n // select channel claims\n var channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey: channelKey,\n channel: channel\n };\n};\n\nvar mapDispatchToProps = {\n onUpdateChannelClaims: _show.onUpdateChannelClaims\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 120 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _AssetPreview = __webpack_require__(54);\n\nvar _AssetPreview2 = _interopRequireDefault(_AssetPreview);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelClaimsDisplay = function (_React$Component) {\n _inherits(ChannelClaimsDisplay, _React$Component);\n\n function ChannelClaimsDisplay(props) {\n _classCallCheck(this, ChannelClaimsDisplay);\n\n var _this = _possibleConstructorReturn(this, (ChannelClaimsDisplay.__proto__ || Object.getPrototypeOf(ChannelClaimsDisplay)).call(this, props));\n\n _this.showNextResultsPage = _this.showNextResultsPage.bind(_this);\n _this.showPreviousResultsPage = _this.showPreviousResultsPage.bind(_this);\n return _this;\n }\n\n _createClass(ChannelClaimsDisplay, [{\n key: 'showPreviousResultsPage',\n value: function showPreviousResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n }, {\n key: 'showNextResultsPage',\n value: function showNextResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n }, {\n key: 'showNewPage',\n value: function showNewPage(page) {\n var _props = this.props,\n channelKey = _props.channelKey,\n _props$channel = _props.channel,\n name = _props$channel.name,\n longId = _props$channel.longId;\n\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$channel$claims = this.props.channel.claimsData,\n claims = _props$channel$claims.claims,\n currentPage = _props$channel$claims.currentPage,\n totalPages = _props$channel$claims.totalPages;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall' },\n claims.length > 0 ? _react2.default.createElement(\n 'div',\n null,\n claims.map(function (claim, index) {\n return _react2.default.createElement(_AssetPreview2.default, {\n claimData: claim,\n key: claim.name + '-' + index\n });\n }),\n _react2.default.createElement(\n 'div',\n null,\n currentPage > 1 && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showPreviousResultsPage },\n 'Previous Page'\n ),\n currentPage < totalPages && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showNextResultsPage },\n 'Next Page'\n )\n )\n ) : _react2.default.createElement(\n 'p',\n null,\n 'There are no claims in this channel'\n )\n );\n }\n }]);\n\n return ChannelClaimsDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = ChannelClaimsDisplay;\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetPreview = function AssetPreview(_ref) {\n var defaultThumbnail = _ref.defaultThumbnail,\n _ref$claimData = _ref.claimData,\n name = _ref$claimData.name,\n claimId = _ref$claimData.claimId,\n fileExt = _ref$claimData.fileExt,\n contentType = _ref$claimData.contentType,\n thumbnail = _ref$claimData.thumbnail;\n\n var directSourceLink = claimId + '/' + name + '.' + fileExt;\n var showUrlLink = '/' + claimId + '/' + name;\n return _react2.default.createElement(\n 'div',\n { className: 'asset-holder' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: showUrlLink },\n function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset-preview',\n src: directSourceLink,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement('img', {\n className: 'asset-preview video',\n src: thumbnail || defaultThumbnail,\n alt: name\n });\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'unsupported file type'\n );\n }\n }()\n )\n );\n};\n\nexports.default = AssetPreview;\n\n/***/ }),\n/* 122 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _view = __webpack_require__(123);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var _ref$site = _ref.site,\n host = _ref$site.host,\n title = _ref$site.title;\n\n return {\n host: host,\n title: title\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(8);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar FourOhForPage = function (_React$Component) {\n _inherits(FourOhForPage, _React$Component);\n\n function FourOhForPage() {\n _classCallCheck(this, FourOhForPage);\n\n return _possibleConstructorReturn(this, (FourOhForPage.__proto__ || Object.getPrototypeOf(FourOhForPage)).apply(this, arguments));\n }\n\n _createClass(FourOhForPage, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n title = _props.title,\n host = _props.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n _reactHelmet2.default,\n null,\n _react2.default.createElement(\n 'title',\n null,\n title,\n ' - 404'\n ),\n _react2.default.createElement('link', { rel: 'canonical', href: host + '/404' })\n ),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'h2',\n null,\n '404'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'That page does not exist'\n )\n )\n );\n }\n }]);\n\n return FourOhForPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = FourOhForPage;\n\n/***/ }),\n/* 124 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _require = __webpack_require__(16),\n sendGAServeEvent = _require.sendGAServeEvent;\n\nvar _require2 = __webpack_require__(125),\n determineResponseType = _require2.determineResponseType,\n flipClaimNameAndIdForBackwardsCompatibility = _require2.flipClaimNameAndIdForBackwardsCompatibility,\n logRequestData = _require2.logRequestData,\n getClaimIdAndServeAsset = _require2.getClaimIdAndServeAsset;\n\nvar lbryUri = __webpack_require__(126);\nvar handleShowRender = __webpack_require__(127);\nvar SERVE = 'SERVE';\n\nmodule.exports = function (app) {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // parse the identifier\n var isChannel = void 0,\n channelName = void 0,\n channelClaimId = void 0,\n claimId = void 0;\n try {\n var _lbryUri$parseIdentif = lbryUri.parseIdentifier(params.identifier);\n\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n if (!isChannel) {\n var _flipClaimNameAndIdFo = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n\n var _flipClaimNameAndIdFo2 = _slicedToArray(_flipClaimNameAndIdFo, 2);\n\n claimId = _flipClaimNameAndIdFo2[0];\n claimName = _flipClaimNameAndIdFo2[1];\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie2 = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie2.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim2 = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim2.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(1);\n\nvar _require = __webpack_require__(36),\n getClaimId = _require.getClaimId,\n getLocalFileRecord = _require.getLocalFileRecord;\n\nvar _require2 = __webpack_require__(35),\n handleErrorResponse = _require2.handleErrorResponse;\n\nvar SERVE = 'SERVE';\nvar SHOW = 'SHOW';\nvar NO_FILE = 'NO_FILE';\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml(_ref) {\n var accept = _ref.accept;\n\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser(headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset(_ref2) {\n var accept = _ref2.accept,\n range = _ref2.range;\n\n var imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n var videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId(claimId) {\n return claimId.length === 40 && !/[^A-Za-z0-9]/g.test(claimId);\n};\n\nfunction isValidShortId(claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId(input) {\n return isValidClaimId(input) || isValidShortId(input);\n};\n\nfunction serveAssetToClient(claimId, name, res) {\n return getLocalFileRecord(claimId, name).then(function (fileRecord) {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect('/api/claim/get/' + name + '/' + claimId);\n }\n // serve the file\n var filePath = fileRecord.filePath,\n fileType = fileRecord.fileType;\n\n logger.verbose('serving file: ' + filePath);\n var sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type': fileType || 'image/jpeg'\n }\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n }).catch(function (error) {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset: function getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (fullClaimId) {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'no claim id could be found' });\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'no channel id could be found' });\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n }).catch(function (error) {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType: function determineResponseType(hasFileExtension, headers) {\n var responseType = void 0;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) {\n // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) {\n // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility: function flipClaimNameAndIdForBackwardsCompatibility(identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n var tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData: function logRequestData(responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n }\n};\n\n/***/ }),\n/* 126 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(1);\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n logger.debug('parsing identifier:', identifier);\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex.exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n logger.debug(proto + ', ' + value + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!value) {\n throw new Error('Check your url. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Invalid characters in channel name: ' + nameBadChars.join(', ') + '.');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId,\n claimId: claimId\n };\n },\n parseClaim: function parseClaim(claim) {\n logger.debug('parsing name:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n modifierSeperator = _componentsRegex$exec4[2],\n modifier = _componentsRegex$exec4[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Invalid characters in claim name: ' + nameBadChars.join(', ') + '.');\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No file extension provided after separator ' + modifierSeperator + '.');\n }\n if (modifierSeperator !== '.') {\n throw new Error('The ' + modifierSeperator + ' modifier is not supported in the claim name');\n }\n }\n // return results\n return {\n claimName: claimName\n };\n },\n parseModifier: function parseModifier(claim) {\n logger.debug('parsing modifier:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec5 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec6 = _slicedToArray(_componentsRegex$exec5, 4),\n proto = _componentsRegex$exec6[0],\n claimName = _componentsRegex$exec6[1],\n modifierSeperator = _componentsRegex$exec6[2],\n modifier = _componentsRegex$exec6[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n // Validate and process modifier\n var hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension: hasFileExtension\n };\n }\n};\n\n/***/ }),\n/* 127 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(38);\n\nvar _redux = __webpack_require__(17);\n\nvar _index = __webpack_require__(39);\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _reactRedux = __webpack_require__(2);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _index3 = __webpack_require__(18);\n\nvar _index4 = _interopRequireDefault(_index3);\n\nvar _app = __webpack_require__(43);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(55);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reduxSaga = __webpack_require__(128);\n\nvar _reduxSaga2 = _interopRequireDefault(_reduxSaga);\n\nvar _effects = __webpack_require__(14);\n\nvar _show_uri = __webpack_require__(129);\n\nvar _show = __webpack_require__(7);\n\nvar _reactHelmet = __webpack_require__(13);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar returnSagaWithParams = function returnSagaWithParams(saga, params) {\n return (/*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return (0, _effects.call)(saga, params);\n\n case 2:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n })\n );\n};\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create and apply middleware\n var sagaMiddleware = (0, _reduxSaga2.default)();\n var middleware = (0, _redux.applyMiddleware)(sagaMiddleware);\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_index2.default, middleware);\n\n // create saga\n var action = (0, _show.onHandleShowPageUri)(req.params);\n var saga = returnSagaWithParams(_show_uri.handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware.run(saga).done.then(function () {\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _index4.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n var preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send((0, _renderFullPage2.default)(helmet, html, preloadedState));\n });\n};\n\n/***/ }),\n/* 128 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga\");\n\n/***/ }),\n/* 129 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleShowPageUri = handleShowPageUri;\nexports.watchHandleShowPageUri = watchHandleShowPageUri;\n\nvar _effects = __webpack_require__(14);\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _show_asset = __webpack_require__(130);\n\nvar _show_channel = __webpack_require__(132);\n\nvar _lbryUri = __webpack_require__(21);\n\nvar _lbryUri2 = _interopRequireDefault(_lbryUri);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateIdentifierAndClaim),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateClaimOnly),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(handleShowPageUri),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchHandleShowPageUri);\n\nfunction parseAndUpdateIdentifierAndClaim(modifier, claim) {\n var isChannel, channelName, channelClaimId, claimId, claimName, extension, _lbryUri$parseIdentif, _lbryUri$parseClaim;\n\n return regeneratorRuntime.wrap(function parseAndUpdateIdentifierAndClaim$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n isChannel = void 0, channelName = void 0, channelClaimId = void 0, claimId = void 0, claimName = void 0, extension = void 0;\n _context.prev = 1;\n _lbryUri$parseIdentif = _lbryUri2.default.parseIdentifier(modifier);\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n _lbryUri$parseClaim = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim.claimName;\n extension = _lbryUri$parseClaim.extension;\n _context.next = 17;\n break;\n\n case 12:\n _context.prev = 12;\n _context.t0 = _context['catch'](1);\n _context.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 16:\n return _context.abrupt('return', _context.sent);\n\n case 17:\n if (!isChannel) {\n _context.next = 21;\n break;\n }\n\n _context.next = 20;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, channelName, channelClaimId, extension));\n\n case 20:\n return _context.abrupt('return', _context.sent);\n\n case 21:\n ;\n _context.next = 24;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, claimId, null, null, extension));\n\n case 24:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[1, 12]]);\n}\nfunction parseAndUpdateClaimOnly(claim) {\n var isChannel, channelName, channelClaimId, _lbryUri$parseIdentif2, claimName, extension, _lbryUri$parseClaim2;\n\n return regeneratorRuntime.wrap(function parseAndUpdateClaimOnly$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n isChannel = void 0, channelName = void 0, channelClaimId = void 0;\n _context2.prev = 1;\n _lbryUri$parseIdentif2 = _lbryUri2.default.parseIdentifier(claim);\n isChannel = _lbryUri$parseIdentif2.isChannel;\n channelName = _lbryUri$parseIdentif2.channelName;\n channelClaimId = _lbryUri$parseIdentif2.channelClaimId;\n _context2.next = 13;\n break;\n\n case 8:\n _context2.prev = 8;\n _context2.t0 = _context2['catch'](1);\n _context2.next = 12;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t0.message));\n\n case 12:\n return _context2.abrupt('return', _context2.sent);\n\n case 13:\n if (!isChannel) {\n _context2.next = 17;\n break;\n }\n\n _context2.next = 16;\n return (0, _effects.call)(_show_channel.newChannelRequest, (0, _show.onNewChannelRequest)(channelName, channelClaimId));\n\n case 16:\n return _context2.abrupt('return', _context2.sent);\n\n case 17:\n // if not for a channel, parse the claim request\n claimName = void 0, extension = void 0;\n _context2.prev = 18;\n _lbryUri$parseClaim2 = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim2.claimName;\n extension = _lbryUri$parseClaim2.extension;\n _context2.next = 29;\n break;\n\n case 24:\n _context2.prev = 24;\n _context2.t1 = _context2['catch'](18);\n _context2.next = 28;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t1.message));\n\n case 28:\n return _context2.abrupt('return', _context2.sent);\n\n case 29:\n _context2.next = 31;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, null, null, extension));\n\n case 31:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this, [[1, 8], [18, 24]]);\n}\n\nfunction handleShowPageUri(action) {\n var _action$data, identifier, claim;\n\n return regeneratorRuntime.wrap(function handleShowPageUri$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data = action.data, identifier = _action$data.identifier, claim = _action$data.claim;\n\n if (!identifier) {\n _context3.next = 5;\n break;\n }\n\n _context3.next = 4;\n return (0, _effects.call)(parseAndUpdateIdentifierAndClaim, identifier, claim);\n\n case 4:\n return _context3.abrupt('return', _context3.sent);\n\n case 5:\n _context3.next = 7;\n return (0, _effects.call)(parseAndUpdateClaimOnly, claim);\n\n case 7:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this);\n};\n\nfunction watchHandleShowPageUri() {\n return regeneratorRuntime.wrap(function watchHandleShowPageUri$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.HANDLE_SHOW_URI, handleShowPageUri);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n};\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newAssetRequest = newAssetRequest;\nexports.watchNewAssetRequest = watchNewAssetRequest;\n\nvar _effects = __webpack_require__(14);\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _assetApi = __webpack_require__(131);\n\nvar _show2 = __webpack_require__(12);\n\nvar _site = __webpack_require__(56);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newAssetRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewAssetRequest);\n\nfunction newAssetRequest(action) {\n var _action$data, requestType, requestId, name, modifier, state, host, longId, _ref, assetKey, shortId, _ref2, claimData, _ref3;\n\n return regeneratorRuntime.wrap(function newAssetRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, name = _action$data.name, modifier = _action$data.modifier;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get long id && add request to request list\n longId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_assetApi.getLongClaimId, host, name, modifier);\n\n case 15:\n _ref = _context.sent;\n longId = _ref.data;\n _context.next = 24;\n break;\n\n case 19:\n _context.prev = 19;\n _context.t0 = _context['catch'](12);\n _context.next = 23;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 23:\n return _context.abrupt('return', _context.sent);\n\n case 24:\n assetKey = 'a#' + name + '#' + longId;\n _context.next = 27;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, assetKey));\n\n case 27:\n if (!state.assetList[assetKey]) {\n _context.next = 29;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 29:\n // get short Id\n shortId = void 0;\n _context.prev = 30;\n _context.next = 33;\n return (0, _effects.call)(_assetApi.getShortId, host, name, longId);\n\n case 33:\n _ref2 = _context.sent;\n shortId = _ref2.data;\n _context.next = 42;\n break;\n\n case 37:\n _context.prev = 37;\n _context.t1 = _context['catch'](30);\n _context.next = 41;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 41:\n return _context.abrupt('return', _context.sent);\n\n case 42:\n // get asset claim data\n claimData = void 0;\n _context.prev = 43;\n _context.next = 46;\n return (0, _effects.call)(_assetApi.getClaimData, host, name, longId);\n\n case 46:\n _ref3 = _context.sent;\n claimData = _ref3.data;\n _context.next = 55;\n break;\n\n case 50:\n _context.prev = 50;\n _context.t2 = _context['catch'](43);\n _context.next = 54;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t2.message));\n\n case 54:\n return _context.abrupt('return', _context.sent);\n\n case 55:\n _context.next = 57;\n return (0, _effects.put)((0, _show.addAssetToAssetList)(assetKey, null, name, longId, shortId, claimData));\n\n case 57:\n _context.next = 59;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 59:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 19], [30, 37], [43, 50]]);\n};\n\nfunction watchNewAssetRequest() {\n return regeneratorRuntime.wrap(function watchNewAssetRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.ASSET_REQUEST_NEW, newAssetRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\n/***/ }),\n/* 131 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getLongClaimId = getLongClaimId;\nexports.getShortId = getShortId;\nexports.getClaimData = getClaimData;\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getLongClaimId(host, name, modifier) {\n var body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n var params = {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body)\n };\n // create url\n var url = host + '/api/claim/long-id';\n // return the request promise\n return (0, _request2.default)(url, params);\n};\n\nfunction getShortId(host, name, claimId) {\n var url = host + '/api/claim/short-id/' + claimId + '/' + name;\n return (0, _request2.default)(url);\n};\n\nfunction getClaimData(host, name, claimId) {\n var url = host + '/api/claim/data/' + name + '/' + claimId;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 132 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newChannelRequest = newChannelRequest;\nexports.watchNewChannelRequest = watchNewChannelRequest;\nexports.watchUpdateChannelClaims = watchUpdateChannelClaims;\n\nvar _effects = __webpack_require__(14);\n\nvar _show_action_types = __webpack_require__(11);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(7);\n\nvar _channelApi = __webpack_require__(133);\n\nvar _show2 = __webpack_require__(12);\n\nvar _site = __webpack_require__(56);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newChannelRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewChannelRequest),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(getNewClaimsAndUpdateChannel),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchUpdateChannelClaims);\n\nfunction newChannelRequest(action) {\n var _action$data, requestType, requestId, channelName, channelId, state, host, longId, shortId, _ref, _ref$data, channelKey, claimsData, _ref2;\n\n return regeneratorRuntime.wrap(function newChannelRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, channelName = _action$data.channelName, channelId = _action$data.channelId;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get channel long id\n longId = void 0, shortId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_channelApi.getChannelData, host, channelName, channelId);\n\n case 15:\n _ref = _context.sent;\n _ref$data = _ref.data;\n longId = _ref$data.longChannelClaimId;\n shortId = _ref$data.shortChannelClaimId;\n _context.next = 26;\n break;\n\n case 21:\n _context.prev = 21;\n _context.t0 = _context['catch'](12);\n _context.next = 25;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 25:\n return _context.abrupt('return', _context.sent);\n\n case 26:\n // store the request in the channel requests list\n channelKey = 'c#' + channelName + '#' + longId;\n _context.next = 29;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, channelKey));\n\n case 29:\n if (!state.channelList[channelKey]) {\n _context.next = 31;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 31:\n // get channel claims data\n claimsData = void 0;\n _context.prev = 32;\n _context.next = 35;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, channelName, 1);\n\n case 35:\n _ref2 = _context.sent;\n claimsData = _ref2.data;\n _context.next = 44;\n break;\n\n case 39:\n _context.prev = 39;\n _context.t1 = _context['catch'](32);\n _context.next = 43;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 43:\n return _context.abrupt('return', _context.sent);\n\n case 44:\n _context.next = 46;\n return (0, _effects.put)((0, _show.addNewChannelToChannelList)(channelKey, channelName, shortId, longId, claimsData));\n\n case 46:\n _context.next = 48;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 48:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 21], [32, 39]]);\n}\n\nfunction watchNewChannelRequest() {\n return regeneratorRuntime.wrap(function watchNewChannelRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\nfunction getNewClaimsAndUpdateChannel(action) {\n var _action$data2, channelKey, name, longId, page, host, claimsData, _ref3;\n\n return regeneratorRuntime.wrap(function getNewClaimsAndUpdateChannel$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data2 = action.data, channelKey = _action$data2.channelKey, name = _action$data2.name, longId = _action$data2.longId, page = _action$data2.page;\n _context3.next = 3;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 3:\n host = _context3.sent;\n claimsData = void 0;\n _context3.prev = 5;\n _context3.next = 8;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, name, page);\n\n case 8:\n _ref3 = _context3.sent;\n claimsData = _ref3.data;\n _context3.next = 17;\n break;\n\n case 12:\n _context3.prev = 12;\n _context3.t0 = _context3['catch'](5);\n _context3.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context3.t0.message));\n\n case 16:\n return _context3.abrupt('return', _context3.sent);\n\n case 17:\n _context3.next = 19;\n return (0, _effects.put)((0, _show.updateChannelClaims)(channelKey, claimsData));\n\n case 19:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this, [[5, 12]]);\n}\n\nfunction watchUpdateChannelClaims() {\n return regeneratorRuntime.wrap(function watchUpdateChannelClaims$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n}\n\n/***/ }),\n/* 133 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getChannelData = getChannelData;\nexports.getChannelClaims = getChannelClaims;\n\nvar _request = __webpack_require__(6);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getChannelData(host, id, name) {\n if (!id) id = 'none';\n var url = host + '/api/channel/data/' + name + '/' + id;\n return (0, _request2.default)(url);\n};\n\nfunction getChannelClaims(host, longId, name, page) {\n if (!page) page = 1;\n var url = host + '/api/channel/claims/' + name + '/' + longId + '/' + page;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 134 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar handlePageRender = __webpack_require__(37);\n\nmodule.exports = function (app) {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', function (req, res) {\n // send response\n handlePageRender(req, res);\n });\n};\n\n/***/ }),\n/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(136),\n logLevel = _require.logLevel;\n\nmodule.exports = function (winston) {\n // configure\n winston.configure({\n transports: [new winston.transports.Console({\n level: logLevel,\n timestamp: false,\n colorize: true,\n prettyPrint: true,\n handleExceptions: true,\n humanReadableUnhandledException: true\n })]\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n/***/ }),\n/* 136 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar loggerConfig = {\n logLevel: 'debug' // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n/***/ }),\n/* 137 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar winstonSlackWebHook = __webpack_require__(138).SlackWebHook;\nvar slackConfig = __webpack_require__(30);\n\nmodule.exports = function (winston) {\n var slackWebHook = slackConfig.slackWebHook,\n slackErrorChannel = slackConfig.slackErrorChannel,\n slackInfoChannel = slackConfig.slackInfoChannel;\n\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-errors-transport',\n level: 'warn',\n webhookUrl: slackWebHook,\n channel: slackErrorChannel,\n username: 'spee.ch',\n iconEmoji: ':face_with_head_bandage:'\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-info-transport',\n level: 'info',\n webhookUrl: slackWebHook,\n channel: slackInfoChannel,\n username: 'spee.ch',\n iconEmoji: ':nerd_face:'\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n/***/ }),\n/* 138 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston-slack-webhook\");\n\n/***/ }),\n/* 139 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ActiveStatusBar = __webpack_require__(50);\n\nvar _ActiveStatusBar2 = _interopRequireDefault(_ActiveStatusBar);\n\nvar _AssetPreview = __webpack_require__(54);\n\nvar _AssetPreview2 = _interopRequireDefault(_AssetPreview);\n\nvar _ExpandingTextArea = __webpack_require__(140);\n\nvar _ExpandingTextArea2 = _interopRequireDefault(_ExpandingTextArea);\n\nvar _GAListener = __webpack_require__(18);\n\nvar _GAListener2 = _interopRequireDefault(_GAListener);\n\nvar _InactiveStatusBar = __webpack_require__(51);\n\nvar _InactiveStatusBar2 = _interopRequireDefault(_InactiveStatusBar);\n\nvar _Logo = __webpack_require__(48);\n\nvar _Logo2 = _interopRequireDefault(_Logo);\n\nvar _NavBarChannelOptionsDropdown = __webpack_require__(49);\n\nvar _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown);\n\nvar _ProgressBar = __webpack_require__(26);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _PublishPreview = __webpack_require__(141);\n\nvar _PublishPreview2 = _interopRequireDefault(_PublishPreview);\n\nvar _PublishUrlMiddleDisplay = __webpack_require__(142);\n\nvar _PublishUrlMiddleDisplay2 = _interopRequireDefault(_PublishUrlMiddleDisplay);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar components = {\n ActiveStatusBar: _ActiveStatusBar2.default,\n AssetPreview: _AssetPreview2.default,\n ExpandingTextArea: _ExpandingTextArea2.default,\n GAListener: _GAListener2.default,\n InactiveStatusBar: _InactiveStatusBar2.default,\n Logo: _Logo2.default,\n NavBarChannelOptionsDropdown: _NavBarChannelOptionsDropdown2.default,\n ProgressBar: _ProgressBar2.default,\n PublishPreview: _PublishPreview2.default,\n PublishUrlMiddleDisplay: _PublishUrlMiddleDisplay2.default,\n SEO: _SEO2.default\n};\n\nexports.default = components;\n\n/***/ }),\n/* 140 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ExpandingTextarea = function (_Component) {\n _inherits(ExpandingTextarea, _Component);\n\n function ExpandingTextarea(props) {\n _classCallCheck(this, ExpandingTextarea);\n\n var _this = _possibleConstructorReturn(this, (ExpandingTextarea.__proto__ || Object.getPrototypeOf(ExpandingTextarea)).call(this, props));\n\n _this._handleChange = _this._handleChange.bind(_this);\n return _this;\n }\n\n _createClass(ExpandingTextarea, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.adjustTextarea({});\n }\n }, {\n key: '_handleChange',\n value: function _handleChange(event) {\n var onChange = this.props.onChange;\n\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n }, {\n key: 'adjustTextarea',\n value: function adjustTextarea(_ref) {\n var _ref$target = _ref.target,\n target = _ref$target === undefined ? this.el : _ref$target;\n\n target.style.height = 0;\n target.style.height = target.scrollHeight + 'px';\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var rest = _objectWithoutProperties(this.props, []);\n\n return _react2.default.createElement('textarea', _extends({}, rest, {\n ref: function ref(x) {\n return _this2.el = x;\n },\n onChange: this._handleChange\n }));\n }\n }]);\n\n return ExpandingTextarea;\n}(_react.Component);\n\nExpandingTextarea.propTypes = {\n onChange: _propTypes2.default.func\n};\n\nexports.default = ExpandingTextarea;\n\n/***/ }),\n/* 141 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishPreview = function (_React$Component) {\n _inherits(PublishPreview, _React$Component);\n\n function PublishPreview(props) {\n _classCallCheck(this, PublishPreview);\n\n var _this = _possibleConstructorReturn(this, (PublishPreview.__proto__ || Object.getPrototypeOf(PublishPreview)).call(this, props));\n\n _this.state = {\n imgSource: '',\n defaultThumbnail: '/assets/img/video_thumb_default.png'\n };\n return _this;\n }\n\n _createClass(PublishPreview, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.setPreviewImageSource(this.props.file);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({ imgSource: this.state.defaultThumbnail });\n }\n }\n }\n }, {\n key: 'setPreviewImageSourceFromFile',\n value: function setPreviewImageSourceFromFile(file) {\n var _this2 = this;\n\n var previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = function () {\n _this2.setState({ imgSource: previewReader.result });\n };\n }\n }, {\n key: 'setPreviewImageSource',\n value: function setPreviewImageSource(file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({ imgSource: this.state.defaultThumbnail });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement('img', {\n id: 'dropzone-preview',\n src: this.state.imgSource,\n className: this.props.dimPreview ? 'dim' : '',\n alt: 'publish preview'\n });\n }\n }]);\n\n return PublishPreview;\n}(_react2.default.Component);\n\n;\n\nPublishPreview.propTypes = {\n dimPreview: _propTypes2.default.bool.isRequired,\n file: _propTypes2.default.object.isRequired,\n thumbnail: _propTypes2.default.object\n};\n\nexports.default = PublishPreview;\n\n/***/ }),\n/* 142 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction UrlMiddle(_ref) {\n var publishInChannel = _ref.publishInChannel,\n selectedChannel = _ref.selectedChannel,\n loggedInChannelName = _ref.loggedInChannelName,\n loggedInChannelShortId = _ref.loggedInChannelShortId;\n\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return _react2.default.createElement(\n 'span',\n { id: 'url-channel', className: 'url-text--secondary' },\n loggedInChannelName,\n ':',\n loggedInChannelShortId,\n ' /'\n );\n }\n return _react2.default.createElement(\n 'span',\n { id: 'url-channel-placeholder', className: 'url-text--secondary tooltip' },\n '@channel',\n _react2.default.createElement(\n 'span',\n {\n className: 'tooltip-text' },\n 'Select a channel below'\n ),\n ' /'\n );\n }\n return _react2.default.createElement(\n 'span',\n { id: 'url-no-channel-placeholder', className: 'url-text--secondary tooltip' },\n 'xyz',\n _react2.default.createElement(\n 'span',\n { className: 'tooltip-text' },\n 'This will be a random id'\n ),\n ' /'\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel: _propTypes2.default.bool.isRequired,\n loggedInChannelName: _propTypes2.default.string,\n loggedInChannelShortId: _propTypes2.default.string\n};\n\nexports.default = UrlMiddle;\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// index.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 57);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap fbeed617c134f70061c5","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 0\n// module chunks = 0","module.exports = require(\"winston\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston\"\n// module id = 1\n// module chunks = 0","module.exports = require(\"react-redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-redux\"\n// module id = 2\n// module chunks = 0","function SiteConfig () {\n this.analytics = {\n googleId: 'default',\n };\n this.assetDefaults = {\n description: 'An asset published on Spee.ch',\n thumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',\n title : 'Spee.ch',\n };\n this.auth = {\n sessionKey: 'default',\n };\n this.componentsConfig = {\n components: {},\n containers: {},\n pages : {},\n };\n this.details = {\n description: 'Open-source, decentralized image and video sharing.',\n host : 'default',\n port : 3000,\n title : 'Spee.ch',\n twitter : '@spee_ch',\n };\n this.publishing = {\n additionalClaimAddresses: [],\n disabled : false,\n disabledMessage : 'Please check back soon.',\n primaryClaimAddress : 'default',\n thumbnailChannel : 'default',\n thumbnailChannelId : 'default',\n uploadDirectory : '/home/lbry/Uploads',\n };\n this.configure = (config) => {\n if (!config) {\n return console.log('No site config received.');\n }\n const { analytics, assetDefaults, auth, componentsConfig, details, publishing } = config;\n this.analytics = analytics;\n this.assetDefaults = assetDefaults;\n this.auth = auth;\n this.details = details;\n this.publishing = publishing;\n this.componentsConfig = componentsConfig;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/siteConfig.js","module.exports = require(\"react-router-dom\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-router-dom\"\n// module id = 4\n// module chunks = 0","const Sequelize = require('sequelize');\nconst logger = require('winston');\n\nconsole.log('exporting sequelize models');\nconst { database, username, password } = require('../../config/mysqlConfig');\nconst db = {};\n// set sequelize options\nconst sequelize = new Sequelize(database, username, password, {\n host : 'localhost',\n dialect : 'mysql',\n dialectOptions: {decimalNumbers: true}, // fix to ensure DECIMAL will not be stored as a string\n logging : false,\n pool : {\n max : 5,\n min : 0,\n idle : 10000,\n acquire: 10000,\n },\n});\n\n// establish mysql connection\nsequelize\n .authenticate()\n .then(() => {\n logger.info('Sequelize has established mysql connection successfully.');\n })\n .catch(err => {\n logger.error('Sequelize was unable to connect to the database:', err);\n });\n\n// manually add each model to the db object\nconst Certificate = require('./certificate.js');\nconst Channel = require('./channel.js');\nconst Claim = require('./claim.js');\nconst File = require('./file.js');\nconst Request = require('./request.js');\nconst User = require('./user.js');\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(modelName => {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = (Model, values, condition, tableName) => {\n return Model\n .findOne({\n where: condition,\n })\n .then(obj => {\n if (obj) { // update\n logger.debug(`updating record in db.${tableName}`);\n return obj.update(values);\n } else { // insert\n logger.debug(`creating record in db.${tableName}`);\n return Model.create(values);\n }\n })\n .catch(function (error) {\n logger.error(`${tableName}.upsert error`, error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/index.js","import 'cross-fetch/polyfill';\n\n/**\n * Parses the JSON returned by a network request\n *\n * @param {object} response A response from a network request\n *\n * @return {object} The parsed JSON from the request\n */\nfunction parseJSON (response) {\n if (response.status === 204 || response.status === 205) {\n return null;\n }\n return response.json();\n}\n\n/**\n * Parses the status returned by a network request\n *\n * @param {object} response A response from a network request\n * @param {object} response The parsed JSON from the network request\n *\n * @return {object | undefined} Returns object with status and statusText, or undefined\n */\nfunction checkStatus (response, jsonResponse) {\n if (response.status >= 200 && response.status < 300) {\n return jsonResponse;\n }\n const error = new Error(jsonResponse.message);\n error.response = response;\n throw error;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @param {string} url The URL we want to request\n * @param {object} [options] The options we want to pass to \"fetch\"\n *\n * @return {object} The response data\n */\n\nexport default function request (url, options) {\n return fetch(url, options)\n .then(response => {\n return Promise.all([response, parseJSON(response)]);\n })\n .then(([response, jsonResponse]) => {\n return checkStatus(response, jsonResponse);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/request.js","import * as actions from 'constants/show_action_types';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\n// basic request parsing\nexport function onHandleShowPageUri (params) {\n return {\n type: actions.HANDLE_SHOW_URI,\n data: params,\n };\n};\n\nexport function onRequestError (error) {\n return {\n type: actions.REQUEST_ERROR,\n data: error,\n };\n};\n\nexport function onNewChannelRequest (channelName, channelId) {\n const requestType = CHANNEL;\n const requestId = `cr#${channelName}#${channelId}`;\n return {\n type: actions.CHANNEL_REQUEST_NEW,\n data: { requestType, requestId, channelName, channelId },\n };\n};\n\nexport function onNewAssetRequest (name, id, channelName, channelId, extension) {\n const requestType = extension ? ASSET_LITE : ASSET_DETAILS;\n const requestId = `ar#${name}#${id}#${channelName}#${channelId}`;\n return {\n type: actions.ASSET_REQUEST_NEW,\n data: {\n requestType,\n requestId,\n name,\n modifier: {\n id,\n channel: {\n name: channelName,\n id : channelId,\n },\n },\n },\n };\n};\n\nexport function onRequestUpdate (requestType, requestId) {\n return {\n type: actions.REQUEST_UPDATE,\n data: {\n requestType,\n requestId,\n },\n };\n};\n\nexport function addRequestToRequestList (id, error, key) {\n return {\n type: actions.REQUEST_LIST_ADD,\n data: { id, error, key },\n };\n};\n\n// asset actions\n\nexport function addAssetToAssetList (id, error, name, claimId, shortId, claimData) {\n return {\n type: actions.ASSET_ADD,\n data: { id, error, name, claimId, shortId, claimData },\n };\n}\n\n// channel actions\n\nexport function addNewChannelToChannelList (id, name, shortId, longId, claimsData) {\n return {\n type: actions.CHANNEL_ADD,\n data: { id, name, shortId, longId, claimsData },\n };\n};\n\nexport function onUpdateChannelClaims (channelKey, name, longId, page) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,\n data: {channelKey, name, longId, page},\n };\n};\n\nexport function updateChannelClaims (channelListId, claimsData) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,\n data: {channelListId, claimsData},\n };\n};\n\n// display a file\n\nexport function fileRequested (name, claimId) {\n return {\n type: actions.FILE_REQUESTED,\n data: { name, claimId },\n };\n};\n\nexport function updateFileAvailability (status) {\n return {\n type: actions.FILE_AVAILABILITY_UPDATE,\n data: status,\n };\n};\n\nexport function updateDisplayAssetError (error) {\n return {\n type: actions.DISPLAY_ASSET_ERROR,\n data: error,\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/show.js","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport {updateSelectedChannel} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, site }) => {\n return {\n channelName : channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId : channel.loggedInChannel.longId,\n siteDescription: site.description,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n onChannelLogout: () => {\n dispatch(updateLoggedInChannel(null, null, null));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site }) => {\n const { defaultDescription, defaultThumbnail, description: siteDescription, host: siteHost, title: siteTitle, twitter: siteTwitter } = site;\n return {\n defaultDescription,\n defaultThumbnail,\n siteDescription,\n siteHost,\n siteTitle,\n siteTwitter,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/index.js","module.exports = require(\"prop-types\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 10\n// module chunks = 0","// request actions\nexport const HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nexport const REQUEST_ERROR = 'REQUEST_ERROR';\nexport const REQUEST_UPDATE = 'REQUEST_UPDATE';\nexport const ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nexport const CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nexport const REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nexport const ASSET_ADD = `ASSET_ADD`;\n\n// channel actions\nexport const CHANNEL_ADD = 'CHANNEL_ADD';\n\nexport const CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nexport const CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nexport const FILE_REQUESTED = 'FILE_REQUESTED';\nexport const FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nexport const DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_action_types.js","export const selectAsset = (show) => {\n const request = show.requestList[show.request.id];\n const assetKey = request.key;\n return show.assetList[assetKey];\n};\n\nexport const selectShowState = (state) => {\n return state.show;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/show.js","module.exports = require(\"react-helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-helmet\"\n// module id = 13\n// module chunks = 0","module.exports = require(\"redux-saga/effects\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga/effects\"\n// module id = 14\n// module chunks = 0","const axios = require('axios');\nconst logger = require('winston');\nconst { api: { apiHost, apiPort } } = require('../../config/lbryConfig.js');\nconst lbryApiUri = 'http://' + apiHost + ':' + apiPort;\nconst { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('./googleAnalytics.js');\n\nconst handleLbrynetResponse = ({ data }, resolve, reject) => {\n logger.debug('lbry api data:', data);\n if (data.result) {\n // check for an error\n if (data.result.error) {\n logger.debug('Lbrynet api error:', data.result.error);\n reject(new Error(data.result.error));\n return;\n };\n resolve(data.result);\n return;\n }\n // fallback in case it just timed out\n reject(JSON.stringify(data));\n};\n\nmodule.exports = {\n publishClaim (publishParams) {\n logger.debug(`lbryApi >> Publishing claim to \"${publishParams.name}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'publish',\n params: publishParams,\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaim (uri) {\n logger.debug(`lbryApi >> Getting Claim for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'get',\n params: { uri, timeout: 20 },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimList (claimName) {\n logger.debug(`lbryApi >> Getting claim_list for \"${claimName}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'claim_list',\n params: { name: claimName },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n resolveUri (uri) {\n logger.debug(`lbryApi >> Resolving URI for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'resolve',\n params: { uri },\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now());\n if (data.result[uri].error) { // check for errors\n reject(data.result[uri].error);\n } else { // if no errors, resolve\n resolve(data.result[uri]);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getDownloadDirectory () {\n logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'settings_get',\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now());\n if (data.result) {\n resolve(data.result.download_directory);\n } else {\n return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.');\n }\n })\n .catch(error => {\n logger.error('Lbrynet Error:', error);\n resolve('/home/lbry/Downloads/');\n });\n });\n },\n createChannel (name) {\n logger.debug(`lbryApi >> Creating channel for ${name}...`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'channel_new',\n params: {\n channel_name: name,\n amount : 0.1,\n },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryApi.js","const logger = require('winston');\nconst ua = require('universal-analytics');\nconst { analytics : { googleId }, details: { title } } = require('../../config/siteConfig.js');\n\nfunction createServeEventParams (headers, ip, originalUrl) {\n return {\n eventCategory : 'client requests',\n eventAction : 'serve request',\n eventLabel : originalUrl,\n ipOverride : ip,\n userAgentOverride: headers['user-agent'],\n };\n};\n\nfunction createPublishTimingEventParams (category, variable, label, startTime, endTime) {\n const duration = endTime - startTime;\n return {\n userTimingCategory : category,\n userTimingVariableName: variable,\n userTimingTime : duration,\n userTimingLabel : label,\n };\n};\n\nfunction sendGoogleAnalyticsEvent (ip, params) {\n const visitorId = ip.replace(/\\./g, '-');\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.event(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n });\n};\n\nfunction sendGoogleAnalyticsTiming (visitorId, params) {\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.timing(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n logger.debug(`Timing event successfully sent to google analytics`);\n });\n};\n\nmodule.exports = {\n sendGAServeEvent (headers, ip, originalUrl) {\n const params = createServeEventParams(headers, ip, originalUrl);\n sendGoogleAnalyticsEvent(ip, params);\n },\n sendGATimingEvent (category, variable, label, startTime, endTime) {\n const params = createPublishTimingEventParams(category, variable, label, startTime, endTime);\n sendGoogleAnalyticsTiming(title, params);\n },\n chooseGaLbrynetPublishLabel ({ channel_name: channelName, channel_id: channelId }) {\n return (channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM');\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/googleAnalytics.js","module.exports = require(\"redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux\"\n// module id = 17\n// module chunks = 0","import React from 'react';\nimport GoogleAnalytics from 'react-ga';\nimport { withRouter } from 'react-router-dom';\nconst { analytics: { googleId } } = require('../../../config/siteConfig.js');\n\nGoogleAnalytics.initialize(googleId);\n\nclass GAListener extends React.Component {\n componentDidMount () {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n\n sendPageView (location) {\n GoogleAnalytics.set({ page: location.pathname });\n GoogleAnalytics.pageview(location.pathname);\n }\n\n render () {\n return this.props.children;\n }\n}\n\nexport default withRouter(GAListener);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/GAListener/index.jsx","const { componentsConfig } = require('../../config/siteConfig.js');\n\nfunction getDeepestChildValue (parent, childrenKeys) {\n let childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array\n let child = parent[childKey];\n if (childrenKeys.length >= 1) {\n return getDeepestChildValue(child, childrenKeys);\n }\n return child;\n}\n\nexport const dynamicImport = (filePath) => {\n // validate inputs\n if (!filePath) {\n throw new Error('no file path provided to dynamicImport()');\n }\n if (typeof filePath !== 'string') {\n console.log('dynamicImport > filePath:', filePath);\n console.log('dynamicImport > filePath type:', typeof filePath);\n throw new Error('file path provided to dynamicImport() must be a string');\n }\n if (!componentsConfig) {\n console.log('no componentsConfig found in siteConfig.js');\n return require(`${filePath}`);\n }\n // split out the file folders // filter out any empty or white-space-only strings\n const folders = filePath.split('/').filter(folderName => folderName.replace(/\\s/g, '').length);\n // check for the component corresponding to file path in the site config object\n // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]]\n const customComponent = getDeepestChildValue(componentsConfig, folders);\n if (customComponent) {\n return customComponent; // return custom component\n } else {\n return require(`${filePath}`);\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/dynamicImport.js","const createBasicCanonicalLink = (page, siteHost) => {\n return `${siteHost}/${page}`;\n};\n\nconst createAssetCanonicalLink = (asset, siteHost) => {\n let channelName, certificateId, name, claimId;\n if (asset.claimData) {\n ({ channelName, certificateId, name, claimId } = asset.claimData);\n };\n if (channelName) {\n return `${siteHost}/${channelName}:${certificateId}/${name}`;\n };\n return `${siteHost}/${claimId}/${name}`;\n};\n\nconst createChannelCanonicalLink = (channel, siteHost) => {\n const { name, longId } = channel;\n return `${siteHost}/${name}:${longId}`;\n};\n\nexport const createCanonicalLink = (asset, channel, page, siteHost) => {\n if (asset) {\n return createAssetCanonicalLink(asset, siteHost);\n }\n if (channel) {\n return createChannelCanonicalLink(channel, siteHost);\n }\n return createBasicCanonicalLink(page, siteHost);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/canonicalLink.js","module.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(identifier)\n .map(match => match || null);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your URL. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('Check your URL. No channel name after \"@\".');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in channel name: \"${nameBadChars.join(', ')}\".`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`Check your URL. No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`Check your URL. The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId: channelClaimId || null,\n claimId : claimId || null,\n };\n },\n parseClaim: function (name) {\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first extension)\n '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end)\n );\n const [proto, claimName, extensionSeperator, extension] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(name)\n .map(match => match || null);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('Check your URL. No claim name provided before \".\"');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in claim name: \"${nameBadChars.join(', ')}\".`);\n }\n // Validate and process extension\n if (extensionSeperator) {\n if (!extension) {\n throw new Error(`Check your URL. No file extension provided after separator \"${extensionSeperator}\".`);\n }\n if (extensionSeperator !== '.') {\n throw new Error(`Check your URL. The \"${extensionSeperator}\" separator is not supported in the claim name.`);\n }\n }\n return {\n claimName,\n extension: extension || null,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/lbryUri.js","const determineOgThumbnailContentType = (thumbnail) => {\n if (thumbnail) {\n const fileExt = thumbnail.substring(thumbnail.lastIndexOf('.'));\n switch (fileExt) {\n case 'jpeg':\n case 'jpg':\n return 'image/jpeg';\n case 'png':\n return 'image/png';\n case 'gif':\n return 'image/gif';\n case 'mp4':\n return 'video/mp4';\n default:\n return 'image/jpeg';\n }\n }\n return '';\n};\n\nconst createBasicMetaTags = (siteHost, siteDescription, siteTitle, siteTwitter) => {\n return [\n {property: 'og:title', content: siteTitle},\n {property: 'og:url', content: siteHost},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: siteDescription},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createChannelMetaTags = (siteTitle, siteHost, siteTwitter, channel) => {\n const { name, longId } = channel;\n return [\n {property: 'og:title', content: `${name} on ${siteTitle}`},\n {property: 'og:url', content: `${siteHost}/${name}:${longId}`},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: `${name}, a channel on ${siteTitle}`},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createAssetMetaTags = (siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) => {\n const { claimData } = asset;\n const { contentType } = claimData;\n const embedUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const showUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const source = `${siteHost}/${claimData.claimId}/${claimData.name}.${claimData.fileExt}`;\n const ogTitle = claimData.title || claimData.name;\n const ogDescription = claimData.description || defaultDescription;\n const ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);\n const ogThumbnail = claimData.thumbnail || defaultThumbnail;\n const metaTags = [\n {property: 'og:title', content: ogTitle},\n {property: 'og:url', content: showUrl},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: ogDescription},\n {property: 'og:image:width', content: 600},\n {property: 'og:image:height', content: 315},\n {property: 'twitter:site', content: siteTwitter},\n ];\n if (contentType === 'video/mp4' || contentType === 'video/webm') {\n metaTags.push({property: 'og:video', content: source});\n metaTags.push({property: 'og:video:secure_url', content: source});\n metaTags.push({property: 'og:video:type', content: contentType});\n metaTags.push({property: 'og:image', content: ogThumbnail});\n metaTags.push({property: 'og:image:type', content: ogThumbnailContentType});\n metaTags.push({property: 'og:type', content: 'video'});\n metaTags.push({property: 'twitter:card', content: 'player'});\n metaTags.push({property: 'twitter:player', content: embedUrl});\n metaTags.push({property: 'twitter:player:width', content: 600});\n metaTags.push({property: 'twitter:text:player_width', content: 600});\n metaTags.push({property: 'twitter:player:height', content: 337});\n metaTags.push({property: 'twitter:player:stream', content: source});\n metaTags.push({property: 'twitter:player:stream:content_type', content: contentType});\n } else {\n metaTags.push({property: 'og:image', content: source});\n metaTags.push({property: 'og:image:type', content: contentType});\n metaTags.push({property: 'og:type', content: 'article'});\n metaTags.push({property: 'twitter:card', content: 'summary_large_image'});\n }\n return metaTags;\n};\n\nexport const createMetaTags = (siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) => {\n if (asset) {\n return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail);\n };\n if (channel) {\n return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel);\n };\n return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/metaTags.js","export const createPageTitle = (siteTitle, pageTitle) => {\n if (!pageTitle) {\n return `${siteTitle}`;\n }\n return `${siteTitle} - ${pageTitle}`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/pageTitle.js","import * as actions from 'constants/channel_action_types';\n\n// export action creators\n\nexport function updateLoggedInChannel (name, shortId, longId) {\n return {\n type: actions.CHANNEL_UPDATE,\n data: {\n name,\n shortId,\n longId,\n },\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/channel.js","import * as actions from 'constants/publish_action_types';\n\n// export action creators\nexport function selectFile (file) {\n return {\n type: actions.FILE_SELECTED,\n data: file,\n };\n};\n\nexport function clearFile () {\n return {\n type: actions.FILE_CLEAR,\n };\n};\n\nexport function updateMetadata (name, value) {\n return {\n type: actions.METADATA_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateClaim (value) {\n return {\n type: actions.CLAIM_UPDATE,\n data: value,\n };\n};\n\nexport function setPublishInChannel (channel) {\n return {\n type: actions.SET_PUBLISH_IN_CHANNEL,\n channel,\n };\n};\n\nexport function updatePublishStatus (status, message) {\n return {\n type: actions.PUBLISH_STATUS_UPDATE,\n data: {\n status,\n message,\n },\n };\n};\n\nexport function updateError (name, value) {\n return {\n type: actions.ERROR_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateSelectedChannel (channelName) {\n return {\n type: actions.SELECTED_CHANNEL_UPDATE,\n data: channelName,\n };\n};\n\nexport function toggleMetadataInputs (showMetadataInputs) {\n return {\n type: actions.TOGGLE_METADATA_INPUTS,\n data: showMetadataInputs,\n };\n};\n\nexport function onNewThumbnail (file) {\n return {\n type: actions.THUMBNAIL_NEW,\n data: file,\n };\n};\n\nexport function startPublish (history) {\n return {\n type: actions.PUBLISH_START,\n data: { history },\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/publish.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ActiveStatusBar from 'components/ActiveStatusBar';\nimport InactiveStatusBar from 'components/InactiveStatusBar';\n\nclass ProgressBar extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n bars : [],\n index : 0,\n incrementer: 1,\n };\n this.createBars = this.createBars.bind(this);\n this.startProgressBar = this.startProgressBar.bind(this);\n this.updateProgressBar = this.updateProgressBar.bind(this);\n this.stopProgressBar = this.stopProgressBar.bind(this);\n }\n componentDidMount () {\n this.createBars();\n this.startProgressBar();\n }\n componentWillUnmount () {\n this.stopProgressBar();\n }\n createBars () {\n const bars = [];\n for (let i = 0; i <= this.props.size; i++) {\n bars.push({isActive: false});\n }\n this.setState({ bars });\n }\n startProgressBar () {\n this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);\n };\n updateProgressBar () {\n let index = this.state.index;\n let incrementer = this.state.incrementer;\n let bars = this.state.bars;\n // flip incrementer if necessary, to stay in bounds\n if ((index < 0) || (index > this.props.size)) {\n incrementer = incrementer * -1;\n index += incrementer;\n }\n // update the indexed bar\n if (incrementer > 0) {\n bars[index].isActive = true;\n } else {\n bars[index].isActive = false;\n };\n // increment index\n index += incrementer;\n // update state\n this.setState({\n bars,\n incrementer,\n index,\n });\n };\n stopProgressBar () {\n clearInterval(this.updateInterval);\n };\n render () {\n return (\n
\n {this.state.bars.map((bar, index) => bar.isActive ? : )}\n
\n );\n }\n};\n\nProgressBar.propTypes = {\n size: PropTypes.number.isRequired,\n};\n\nexport default ProgressBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ProgressBar/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\nimport NavBar from 'containers/NavBar';\n\nclass ErrorPage extends React.Component {\n render () {\n const { error } = this.props;\n return (\n
\n \n
\n

{error}

\n
\n
\n );\n }\n};\n\nErrorPage.propTypes = {\n error: PropTypes.string.isRequired,\n};\n\nexport default ErrorPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ErrorPage/index.jsx","module.exports = require(\"passport\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport\"\n// module id = 28\n// module chunks = 0","function MysqlConfig () {\n this.database = 'default';\n this.username = 'default';\n this.password = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No MySQL config received.');\n }\n const {database, username, password} = config;\n this.database = database;\n this.username = username;\n this.password = password;\n };\n};\n\nmodule.exports = new MysqlConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/mysqlConfig.js","function SlackConfig () {\n this.slackWebHook = 'default';\n this.slackErrorChannel = 'default';\n this.slackInfoChannel = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No slack config received.');\n }\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = config;\n this.slackWebHook = slackWebHook;\n this.slackErrorChannel = slackErrorChannel;\n this.slackInfoChannel = slackInfoChannel;\n };\n};\n\nmodule.exports = new SlackConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/slackConfig.js","module.exports = require(\"passport-local\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport-local\"\n// module id = 31\n// module chunks = 0","module.exports = require(\"sequelize\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"sequelize\"\n// module id = 32\n// module chunks = 0","module.exports = {\n returnShortId: function (claimsArray, longId) {\n let claimIndex;\n let shortId = longId.substring(0, 1); // default short id is the first letter\n let shortIdLength = 0;\n // find the index of this claim id\n claimIndex = claimsArray.findIndex(element => {\n return element.claimId === longId;\n });\n if (claimIndex < 0) {\n throw new Error('claim id not found in claims list');\n }\n // get an array of all claims with lower height\n let possibleMatches = claimsArray.slice(0, claimIndex);\n // remove certificates with the same prefixes until none are left.\n while (possibleMatches.length > 0) {\n shortIdLength += 1;\n shortId = longId.substring(0, shortIdLength);\n possibleMatches = possibleMatches.filter(element => {\n return (element.claimId && (element.claimId.substring(0, shortIdLength) === shortId));\n });\n }\n return shortId;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/sequelizeHelpers.js","const logger = require('winston');\nconst fs = require('fs');\n\nconst { details, publishing } = require('../../config/siteConfig.js');\n\nmodule.exports = {\n parsePublishApiRequestBody ({name, nsfw, license, title, description, thumbnail}) {\n // validate name\n if (!name) {\n throw new Error('no name field found in request');\n }\n const invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name);\n if (invalidNameCharacters) {\n throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and \"-\"');\n }\n // optional parameters\n nsfw = (nsfw === 'true');\n license = license || null;\n title = title || null;\n description = description || null;\n thumbnail = thumbnail || null;\n // return results\n return {\n name,\n nsfw,\n license,\n title,\n description,\n thumbnail,\n };\n },\n parsePublishApiRequestFiles ({file, thumbnail}) {\n // make sure a file was provided\n if (!file) {\n throw new Error('no file with key of [file] found in request');\n }\n if (!file.path) {\n throw new Error('no file path found');\n }\n if (!file.type) {\n throw new Error('no file type found');\n }\n if (!file.size) {\n throw new Error('no file type found');\n }\n // validate the file name\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate the file\n module.exports.validateFileTypeAndSize(file);\n // return results\n return {\n fileName : file.name,\n filePath : file.path,\n fileType : file.type,\n thumbnailFileName: (thumbnail ? thumbnail.name : null),\n thumbnailFilePath: (thumbnail ? thumbnail.path : null),\n thumbnailFileType: (thumbnail ? thumbnail.type : null),\n };\n },\n validateFileTypeAndSize (file) {\n // check file type and size\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n logger.debug('publish > file validation > .jpeg/.jpg/.png was too big');\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .gif was too big');\n throw new Error('Sorry, .gifs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .mp4 was too big');\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n logger.debug('publish > file validation > unrecognized file type');\n throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n return file;\n },\n createBasicPublishParams (filePath, name, title, description, license, nsfw, thumbnail) {\n logger.debug(`Creating Publish Parameters`);\n // provide defaults for title\n if (title === null || title.trim() === '') {\n title = name;\n }\n // provide default for description\n if (description === null || description.trim() === '') {\n description = '';\n }\n // provide default for license\n if (license === null || license.trim() === '') {\n license = ' '; // default to empty string\n }\n // create the publish params\n const publishParams = {\n name,\n file_path: filePath,\n bid : 0.01,\n metadata : {\n description,\n title,\n author : details.title,\n language: 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n };\n // add thumbnail to channel if video\n if (thumbnail) {\n publishParams['metadata']['thumbnail'] = thumbnail;\n }\n return publishParams;\n },\n createThumbnailPublishParams (thumbnailFilePath, claimName, license, nsfw) {\n if (!thumbnailFilePath) {\n return;\n }\n logger.debug(`Creating Thumbnail Publish Parameters`);\n // create the publish params\n return {\n name : `${claimName}-thumb`,\n file_path: thumbnailFilePath,\n bid : 0.01,\n metadata : {\n title : `${claimName} thumbnail`,\n description: `a thumbnail for ${claimName}`,\n author : details.title,\n language : 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n channel_name : publishing.thumbnailChannel,\n channel_id : publishing.thumbnailChannelId,\n };\n },\n deleteTemporaryFile (filePath) {\n fs.unlink(filePath, err => {\n if (err) {\n logger.error(`error deleting temporary file ${filePath}`);\n throw err;\n }\n logger.debug(`successfully deleted ${filePath}`);\n });\n },\n addGetResultsToFileData (fileInfo, getResult) {\n fileInfo.fileName = getResult.file_name;\n fileInfo.filePath = getResult.download_path;\n return fileInfo;\n },\n createFileData ({ name, claimId, outpoint, height, address, nsfw, contentType }) {\n return {\n name,\n claimId,\n outpoint,\n height,\n address,\n fileName: '',\n filePath: '',\n fileType: contentType,\n nsfw,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/publishHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n handleErrorResponse: function (originalUrl, ip, error, res) {\n logger.error(`Error on ${originalUrl}`, module.exports.useObjectPropertiesIfNoKeys(error));\n const [status, message] = module.exports.returnErrorMessageAndStatus(error);\n res\n .status(status)\n .json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function (error) {\n let status, message;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function (err) {\n if (Object.keys(err).length === 0) {\n let newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach((key) => {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload (status, message) {\n return {\n status,\n success: false,\n message,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/errorHandlers.js","const db = require('../models/index');\nconst logger = require('winston');\nconst { returnPaginatedChannelClaims } = require('../helpers/channelPagination.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\nconst NO_FILE = 'NO_FILE';\n\nmodule.exports = {\n getClaimId (channelName, channelClaimId, name, claimId) {\n if (channelName) {\n return module.exports.getClaimIdByChannel(channelName, channelClaimId, name);\n } else {\n return module.exports.getClaimIdByClaim(name, claimId);\n }\n },\n getClaimIdByClaim (claimName, claimId) {\n logger.debug(`getClaimIdByClaim(${claimName}, ${claimId})`);\n return new Promise((resolve, reject) => {\n db.Claim.getLongClaimId(claimName, claimId)\n .then(longClaimId => {\n if (!longClaimId) {\n resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimIdByChannel (channelName, channelClaimId, claimName) {\n logger.debug(`getClaimIdByChannel(${channelName}, ${channelClaimId}, ${claimName})`);\n return new Promise((resolve, reject) => {\n db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id\n .then(longChannelId => {\n if (!longChannelId) {\n return [null, null];\n }\n return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id\n })\n .then(([longChannelId, longClaimId]) => {\n if (!longChannelId) {\n return resolve(NO_CHANNEL);\n }\n if (!longClaimId) {\n return resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelData (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]);\n })\n .then(([longChannelClaimId, shortChannelClaimId]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. return all the channel information\n resolve({\n channelName,\n longChannelClaimId,\n shortChannelClaimId,\n });\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelClaims (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]);\n })\n .then(([longChannelClaimId, channelClaimsArray]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. format the data for the view, including pagination\n let paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);\n // 4. return all the channel information and contents\n resolve(paginatedChannelViewData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getLocalFileRecord (claimId, name) {\n return db.File.findOne({where: {claimId, name}})\n .then(file => {\n if (!file) {\n return NO_FILE;\n }\n return file.dataValues;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/serveController.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage.js';\nimport Helmet from 'react-helmet';\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create a new Redux store instance\n const store = createStore(Reducer);\n\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `` was rendered\n return res.redirect(301, context.url);\n } else {\n // we're good, send the response\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handlePageRender.jsx","module.exports = require(\"react-dom/server\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-dom/server\"\n// module id = 38\n// module chunks = 0","import { combineReducers } from 'redux';\nimport PublishReducer from 'reducers/publish';\nimport ChannelReducer from 'reducers/channel';\nimport ShowReducer from 'reducers/show';\nimport SiteReducer from 'reducers/site';\n\nexport default combineReducers({\n channel: ChannelReducer,\n publish: PublishReducer,\n show : ShowReducer,\n site : SiteReducer,\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/index.js","export const FILE_SELECTED = 'FILE_SELECTED';\nexport const FILE_CLEAR = 'FILE_CLEAR';\nexport const METADATA_UPDATE = 'METADATA_UPDATE';\nexport const CLAIM_UPDATE = 'CLAIM_UPDATE';\nexport const SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';\nexport const PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';\nexport const ERROR_UPDATE = 'ERROR_UPDATE';\nexport const SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';\nexport const TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';\nexport const THUMBNAIL_NEW = 'THUMBNAIL_NEW';\nexport const PUBLISH_START = 'PUBLISH_START';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_action_types.js","export const CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/channel_action_types.js","export const LOCAL_CHECK = 'LOCAL_CHECK';\nexport const UNAVAILABLE = 'UNAVAILABLE';\nexport const ERROR = 'ERROR';\nexport const AVAILABLE = 'AVAILABLE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/asset_display_states.js","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport { dynamicImport } from 'utils/dynamicImport';\nimport AboutPage from 'pages/AboutPage';\nimport LoginPage from 'pages/LoginPage';\nimport ShowPage from 'pages/ShowPage';\nimport FourOhFourPage from 'containers/FourOhFourPage';\nconst HomePage = dynamicImport('pages/HomePage'); // or use the provided local homepage\n\nconst App = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default App;\n\n\n\n// WEBPACK FOOTER //\n// ./client/app.js","var map = {\n\t\"./canonicalLink\": 20,\n\t\"./canonicalLink.js\": 20,\n\t\"./dynamicImport\": 19,\n\t\"./dynamicImport.js\": 19,\n\t\"./file\": 45,\n\t\"./file.js\": 45,\n\t\"./lbryUri\": 21,\n\t\"./lbryUri.js\": 21,\n\t\"./metaTags\": 22,\n\t\"./metaTags.js\": 22,\n\t\"./pageTitle\": 23,\n\t\"./pageTitle.js\": 23,\n\t\"./publish\": 46,\n\t\"./publish.js\": 46,\n\t\"./request\": 6,\n\t\"./request.js\": 6,\n\t\"./validate\": 47,\n\t\"./validate.js\": 47\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 44;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/utils ^.*$\n// module id = 44\n// module chunks = 0","module.exports = {\n validateFile (file) {\n if (!file) {\n throw new Error('no file provided');\n }\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate size and type\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n throw new Error('Sorry, GIFs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/file.js","export const createPublishMetadata = (claim, { type }, { title, description, license, nsfw }, publishInChannel, selectedChannel) => {\n let metadata = {\n name: claim,\n title,\n description,\n license,\n nsfw,\n type,\n };\n if (publishInChannel) {\n metadata['channelName'] = selectedChannel;\n }\n return metadata;\n};\n\nexport const createPublishFormData = (file, thumbnail, metadata) => {\n let fd = new FormData();\n // append file\n fd.append('file', file);\n // append thumbnail\n if (thumbnail) {\n fd.append('thumbnail', thumbnail);\n }\n // append metadata\n for (let key in metadata) {\n if (metadata.hasOwnProperty(key)) {\n fd.append(key, metadata[key]);\n }\n }\n return fd;\n};\n\nexport const createThumbnailUrl = (channel, channelId, claim, host) => {\n return `${host}/${channel}:${channelId}/${claim}-thumb.png`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/publish.js","export const validateChannelSelection = (publishInChannel, selectedChannel, loggedInChannel) => {\n if (publishInChannel && (selectedChannel !== loggedInChannel.name)) {\n throw new Error('Log in to a channel or select Anonymous');\n }\n};\n\nexport const validatePublishParams = (file, claim, urlError) => {\n if (!file) {\n throw new Error('Please choose a file');\n }\n if (!claim) {\n throw new Error('Please enter a URL');\n }\n if (urlError) {\n throw new Error('Fix the url');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/validate.js","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nfunction Logo () {\n return (\n \n \n Logo\n Spee.ch logo\n \n \n \n Spee<h\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default Logo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/Logo/index.jsx","import React from 'react';\n\nfunction NavBarChannelDropdown ({ channelName, handleSelection, defaultSelection, VIEW, LOGOUT }) {\n return (\n \n );\n};\n\nexport default NavBarChannelDropdown;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/NavBarChannelOptionsDropdown/index.jsx","import React from 'react';\n\nconst ActiveStatusBar = () => {\n return | ;\n};\n\nexport default ActiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ActiveStatusBar/index.jsx","import React from 'react';\n\nconst InactiveStatusBar = () => {\n return | ;\n};\n\nexport default InactiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/InactiveStatusBar/index.jsx","export const CHANNEL = 'CHANNEL';\nexport const ASSET_LITE = 'ASSET_LITE';\nexport const ASSET_DETAILS = 'ASSET_DETAILS';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_request_types.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { fileRequested } from 'actions/show';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select error and status\n const error = show.displayAsset.error;\n const status = show.displayAsset.status;\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n error,\n status,\n asset,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onFileRequest: (name, claimId) => {\n dispatch(fileRequested(name, claimId));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({site: {defaults: { defaultThumbnail }}}) => {\n return {\n defaultThumbnail,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/index.js","module.exports = (helmet, html, preloadedState) => {\n // take the html and preloadedState and return the full page\n return `\n \n \n \n \n \n \n \n ${helmet.title.toString()}\n ${helmet.meta.toString()}\n ${helmet.link.toString()}\n \n \n \n \n \n \n \n \n
\n
${html}
\n
\n \n \n \n \n `;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/renderFullPage.js","export const selectSiteState = (state) => {\n return state.site;\n};\n\nexport const selectSiteHost = (state) => {\n return state.site.host;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/site.js","module.exports = require(\"babel-polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-polyfill\"\n// module id = 58\n// module chunks = 0","module.exports = require(\"whatwg-fetch\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"whatwg-fetch\"\n// module id = 59\n// module chunks = 0","const server = require('server/server.js');\r\nconst components = require('client/components');\r\n// const containers = require('client/containers');\r\n// const pages = require('client/pages');\r\n\r\nconst exports = {\r\n SpeechServer: server,\r\n Components : components,\r\n // containers,\r\n // pages,\r\n};\r\n\r\nmodule.exports = exports;\r\n\n\n\n// WEBPACK FOOTER //\n// ./speech.js","// app dependencies\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst expressHandlebars = require('express-handlebars');\nconst Handlebars = require('handlebars');\nconst helmet = require('helmet');\nconst passport = require('passport');\nconst { serializeSpeechUser, deserializeSpeechUser } = require('./helpers/authHelpers.js');\nconst cookieSession = require('cookie-session');\nconst http = require('http');\n// logging dependencies\nconst logger = require('winston');\n\nfunction SpeechServer () {\n this.configureMysql = (mysqlConfig) => {\n require('../config/mysqlConfig.js').configure(mysqlConfig);\n };\n this.configureSite = (siteConfig) => {\n require('../config/siteConfig.js').configure(siteConfig);\n console.log(require('../config/siteConfig.js'));\n this.sessionKey = siteConfig.auth.sessionKey;\n this.PORT = siteConfig.details.port;\n };\n this.configureSlack = (slackConfig) => {\n require('../config/slackConfig.js').configure(slackConfig);\n };\n this.createApp = () => {\n // create an Express application\n const app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(`${__dirname}/public`)); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use((req, res, next) => { // custom logging middleware to log all incoming http requests\n logger.verbose(`Request on ${req.originalUrl} from ${req.ip}`);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n const localSignupStrategy = require('./passport/local-signup.js');\n const localLoginStrategy = require('./passport/local-login.js');\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name : 'session',\n keys : [this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000, // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n const hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars : Handlebars,\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n require('./routes/auth-routes.js')(app);\n require('./routes/api-routes.js')(app);\n require('./routes/page-routes.js')(app);\n require('./routes/asset-routes.js')(app);\n require('./routes/fallback-routes.js')(app);\n\n this.app = app;\n };\n this.initialize = () => {\n require('./helpers/configureLogger.js')(logger);\n require('./helpers/configureSlack.js')(logger);\n this.createApp();\n this.server = http.Server(this.app);\n };\n this.start = () => {\n const db = require('./models/index');\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(() => {\n this.server.listen(this.PORT, () => {\n logger.info(`Server is listening on PORT ${this.PORT}`);\n });\n })\n .catch((error) => {\n logger.error(`Startup Error:`, error);\n });\n };\n};\n\nmodule.exports = SpeechServer;\n\n\n\n// WEBPACK FOOTER //\n// ./server/server.js","module.exports = require(\"express\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express\"\n// module id = 62\n// module chunks = 0","module.exports = require(\"body-parser\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"body-parser\"\n// module id = 63\n// module chunks = 0","module.exports = require(\"express-handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express-handlebars\"\n// module id = 64\n// module chunks = 0","module.exports = require(\"handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"handlebars\"\n// module id = 65\n// module chunks = 0","module.exports = require(\"helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"helmet\"\n// module id = 66\n// module chunks = 0","const logger = require('winston');\n\nmodule.exports = {\n serializeSpeechUser (user, done) { // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser (user, done) { // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/authHelpers.js","module.exports = require(\"cookie-session\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cookie-session\"\n// module id = 68\n// module chunks = 0","module.exports = require(\"http\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"http\"\n// module id = 69\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst lbryApi = require('../helpers/lbryApi.js');\nconst logger = require('winston');\nconst db = require('../models/index');\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`);\n let userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel(`@${username}`)\n .then(tx => {\n // create user record\n const userData = {\n userName: username,\n password: password,\n };\n logger.verbose('userData >', userData);\n // create user record\n const channelData = {\n channelName : `@${username}`,\n channelClaimId: tx.claim_id,\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n const certificateData = {\n claimId: tx.claim_id,\n name : `@${username}`,\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n })\n .then(([newUser, newChannel, newCertificate]) => {\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n })\n .then(() => {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n })\n .catch(error => {\n logger.error('signup error', error);\n return done(error);\n });\n }\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-signup.js","module.exports = require(\"axios\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"axios\"\n// module id = 71\n// module chunks = 0","const lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279',\n },\n};\n\nmodule.exports = lbryConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/lbryConfig.js","module.exports = require(\"universal-analytics\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"universal-analytics\"\n// module id = 73\n// module chunks = 0","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Certificate = sequelize.define(\n 'Certificate',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateVersion: {\n type : STRING,\n default: null,\n },\n keyType: {\n type : STRING,\n default: null,\n },\n publicKey: {\n type : TEXT('long'),\n default: null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Certificate.associate = db => {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n logger.debug(`getShortChannelIdFromLongChannelId ${channelName}:${longChannelId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {name: channelName},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelIdFromShortChannelId(${channelName}, ${channelClaimId})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name : channelName,\n claimId: {\n $like: `${channelClaimId}%`,\n },\n },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n logger.debug(`getLongChannelIdFromChannelName(${channelName})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n logger.debug(`validateLongChannelId(${name}, ${claimId})`);\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelId(${channelName}, ${channelClaimId})`);\n if (channelClaimId && (channelClaimId.length === 40)) { // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) { // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/certificate.js","module.exports = (sequelize, { STRING }) => {\n const Channel = sequelize.define(\n 'Channel',\n {\n channelName: {\n type : STRING,\n allowNull: false,\n },\n channelClaimId: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Channel.associate = db => {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/channel.js","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\nconst { assetDefaults: { thumbnail: defaultThumbnail }, details: { host } } = require('../../config/siteConfig.js');\n\nfunction determineFileExtensionFromContentType (contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail (storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData (claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Claim = sequelize.define(\n 'Claim',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateId: {\n type : STRING,\n default: null,\n },\n author: {\n type : STRING,\n default: null,\n },\n description: {\n type : TEXT('long'),\n default: null,\n },\n language: {\n type : STRING,\n default: null,\n },\n license: {\n type : STRING,\n default: null,\n },\n licenseUrl: {\n type : STRING,\n default: null,\n },\n nsfw: {\n type : BOOLEAN,\n default: null,\n },\n preview: {\n type : STRING,\n default: null,\n },\n thumbnail: {\n type : STRING,\n default: null,\n },\n title: {\n type : STRING,\n default: null,\n },\n metadataVersion: {\n type : STRING,\n default: null,\n },\n contentType: {\n type : STRING,\n default: null,\n },\n source: {\n type : STRING,\n default: null,\n },\n sourceType: {\n type : STRING,\n default: null,\n },\n sourceVersion: {\n type : STRING,\n default: null,\n },\n streamVersion: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n channelName: {\n type : STRING,\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Claim.associate = db => {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n logger.debug(`Claim.getShortClaimIdFromLongClaimId for ${claimName}#${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n logger.debug(`Claim.getAllChannelClaims for ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw : true, // returns an array of only data, not an array of instances\n })\n .then(channelClaimsArray => {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(claim => {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n logger.debug(`finding claim id for claim ${claimName} from channel ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(`${result.length} records found for \"${claimName}\" in channel \"${channelClaimId}\"`);\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name,\n claimId: {\n $like: `${shortId}%`,\n }},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']], // note: maybe height and effective amount need to switch?\n })\n .then(result => {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug(`getLongClaimId(${claimName}, ${claimId})`);\n if (claimId && (claimId.length === 40)) { // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n logger.debug(`Claim.resolveClaim: ${name} ${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name, claimId },\n })\n .then(claimArray => {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error(`more than one record matches ${name}#${claimId} in db.Claim`);\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/claim.js","module.exports = (sequelize, { STRING, BOOLEAN, INTEGER }) => {\n const File = sequelize.define(\n 'File',\n {\n name: {\n type : STRING,\n allowNull: false,\n },\n claimId: {\n type : STRING,\n allowNull: false,\n },\n address: {\n type : STRING,\n allowNull: false,\n },\n outpoint: {\n type : STRING,\n allowNull: false,\n },\n height: {\n type : INTEGER,\n allowNull: false,\n default : 0,\n },\n fileName: {\n type : STRING,\n allowNull: false,\n },\n filePath: {\n type : STRING,\n allowNull: false,\n },\n fileType: {\n type: STRING,\n },\n nsfw: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: false,\n },\n trendingEligible: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: true,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n File.associate = db => {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25,\n });\n };\n\n return File;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/file.js","module.exports = (sequelize, { STRING, BOOLEAN, TEXT }) => {\n const Request = sequelize.define(\n 'Request',\n {\n action: {\n type : STRING,\n allowNull: false,\n },\n url: {\n type : STRING,\n allowNull: false,\n },\n ipAddress: {\n type : STRING,\n allowNull: true,\n },\n result: {\n type : TEXT('long'),\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Request.associate = db => {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n return Request;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/request.js","'use strict';\nconst bcrypt = require('bcrypt');\nconst logger = require('winston');\n\nmodule.exports = (sequelize, { STRING }) => {\n const User = sequelize.define(\n 'User',\n {\n userName: {\n type : STRING,\n allowNull: false,\n },\n password: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n User.associate = db => {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n this\n .update({password: hash})\n .then(() => {\n resolve();\n })\n .catch(error => {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', (user, options) => {\n logger.debug('User.beforeCreate hook...');\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/user.js","module.exports = require(\"bcrypt\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"bcrypt\"\n// module id = 80\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst logger = require('winston');\nconst db = require('../models/index');\n\nconst returnUserAndChannelInfo = (userInstance) => {\n return new Promise((resolve, reject) => {\n let userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance\n .getChannel()\n .then(({channelName, channelClaimId}) => {\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n })\n .catch(error => {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n return db.User\n .findOne({\n where: {userName: username},\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n return user.comparePassword(password)\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user)\n .then(userInfo => {\n return done(null, userInfo);\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return done(error);\n });\n },\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-login.js","const logger = require('winston');\nconst passport = require('passport');\n\nmodule.exports = (app) => {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), (req, res) => {\n logger.verbose(`successful signup for ${req.user.channelName}`);\n res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n // route for log in\n app.post('/login', (req, res, next) => {\n passport.authenticate('local-login', (err, user, info) => {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message,\n });\n }\n logger.debug('successful login');\n req.logIn(user, (err) => {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', (req, res) => {\n req.logout();\n res.status(200).json({success: true, message: 'you successfully logged out'});\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', (req, res) => {\n if (req.user) {\n res.status(200).json({success: true, data: req.user});\n } else {\n res.status(401).json({success: false, message: 'user is not logged in'});\n }\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/auth-routes.js","const logger = require('winston');\nconst multipart = require('connect-multiparty');\nconst { publishing: { uploadDirectory }, details: { host } } = require('../../config/siteConfig.js');\nconst multipartMiddleware = multipart({uploadDir: uploadDirectory});\nconst db = require('../models/index');\nconst { claimNameIsAvailable, checkChannelAvailability, publish } = require('../controllers/publishController.js');\nconst { getClaimList, resolveUri, getClaim } = require('../helpers/lbryApi.js');\nconst { addGetResultsToFileData, createBasicPublishParams, createThumbnailPublishParams, parsePublishApiRequestBody, parsePublishApiRequestFiles, createFileData } = require('../helpers/publishHelpers.js');\nconst errorHandlers = require('../helpers/errorHandlers.js');\nconst { sendGATimingEvent } = require('../helpers/googleAnalytics.js');\nconst { authenticateUser } = require('../auth/authentication.js');\nconst { getChannelData, getChannelClaims, getClaimId } = require('../controllers/serveController.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = (app) => {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n checkChannelAvailability(name)\n .then(availableName => {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', ({ ip, originalUrl, params }, res) => {\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json(shortId);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n const page = params.page;\n getChannelClaims(channelName, channelClaimId, page)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', ({ ip, originalUrl, params }, res) => {\n getClaimList(params.name)\n .then(claimsList => {\n res.status(200).json(claimsList);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId)\n .then(resolveResult => {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n let fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(`${name}#${claimId}`)]);\n })\n .then(([ fileData, getResult ]) => {\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, {name, claimId}, 'File'), getResult]);\n })\n .then(([ fileRecord, {message, completed} ]) => {\n res.status(200).json({ success: true, message, completed });\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n claimNameIsAvailable(name)\n .then(result => {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', ({ headers, ip, originalUrl, params }, res) => {\n resolveUri(`${params.name}#${params.claimId}`)\n .then(resolvedUri => {\n res.status(200).json(resolvedUri);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, ({ body, files, headers, ip, originalUrl, user }, res) => {\n // define variables\n let channelName, channelId, channelPassword, description, fileName, filePath, fileType, gaStartTime, license, name, nsfw, thumbnail, thumbnailFileName, thumbnailFilePath, thumbnailFileType, title;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n // validateApiPublishRequest(body, files);\n ({name, nsfw, license, title, description, thumbnail} = parsePublishApiRequestBody(body));\n ({fileName, filePath, fileType, thumbnailFileName, thumbnailFilePath, thumbnailFileType} = parsePublishApiRequestFiles(files));\n ({channelName, channelId, channelPassword} = body);\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // check channel authorization\n Promise.all([\n authenticateUser(channelName, channelId, channelPassword, user),\n claimNameIsAvailable(name),\n createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail),\n createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw),\n ])\n .then(([{channelName, channelClaimId}, validatedClaimName, publishParams, thumbnailPublishParams]) => {\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n })\n .then(result => {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data : {\n name,\n claimId: result.claim_id,\n url : `${host}/${result.claim_id}/${name}`,\n lbryTx : result,\n },\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', ({ ip, originalUrl, body, params }, res) => {\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json({success: true, data: shortId});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', ({ ip, originalUrl, body, params }, res) => {\n logger.debug('body:', body);\n const channelName = body.channelName;\n const channelClaimId = body.channelClaimId;\n const claimName = body.claimName;\n const claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(result => {\n if (result === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel could be found'});\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'No matching claim id could be found'});\n }\n res.status(200).json({success: true, data: result});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', ({ ip, originalUrl, body, params }, res) => {\n const claimName = params.claimName;\n let claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId)\n .then(claimInfo => {\n if (!claimInfo) {\n return res.status(404).json({success: false, message: 'No claim could be found'});\n }\n res.status(200).json({success: true, data: claimInfo});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n db.File.findOne({where: {name, claimId}})\n .then(result => {\n if (result) {\n return res.status(200).json({success: true, data: true});\n }\n res.status(200).json({success: true, data: false});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/api-routes.js","module.exports = require(\"connect-multiparty\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"connect-multiparty\"\n// module id = 84\n// module chunks = 0","const logger = require('winston');\nconst db = require('../models/index');\nconst lbryApi = require('../helpers/lbryApi.js');\nconst publishHelpers = require('../helpers/publishHelpers.js');\nconst { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('../../config/siteConfig.js');\nconst Sequelize = require('sequelize');\nconst Op = Sequelize.Op;\n\nmodule.exports = {\n publish (publishParams, fileName, fileType) {\n return new Promise((resolve, reject) => {\n let publishResults, certificateId, channelName;\n // publish the file\n return lbryApi.publishClaim(publishParams)\n .then(tx => {\n logger.info(`Successfully published ${publishParams.name} ${fileName}`, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug(`this claim was published in channel: ${publishParams.channel_name}`);\n return db.Channel.findOne({where: {channelName: publishParams.channel_name}});\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n })\n .then(channel => {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug(`certificateId: ${certificateId}`);\n })\n .then(() => {\n // create the File record\n const fileRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n fileName,\n filePath : publishParams.file_path,\n fileType,\n nsfw : publishParams.metadata.nsfw,\n };\n // create the Claim record\n const claimRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n thumbnail : publishParams.metadata.thumbnail,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n contentType: fileType,\n nsfw : publishParams.metadata.nsfw,\n amount : publishParams.bid,\n certificateId,\n channelName,\n };\n // upsert criteria\n const upsertCriteria = {\n name : publishParams.name,\n claimId: publishResults.claim_id,\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n })\n .then(([file, claim]) => {\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n })\n .then(() => {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n })\n .catch(error => {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable (name) {\n const claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim\n .findAll({\n attributes: ['address'],\n where : {\n name,\n address: {\n [Op.or]: claimAddresses,\n },\n },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n checkChannelAvailability (name) {\n return db.Channel\n .findAll({\n where: { channelName: name },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/publishController.js","module.exports = require(\"fs\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"fs\"\n// module id = 86\n// module chunks = 0","const db = require('../models/index');\nconst logger = require('winston');\n\nmodule.exports = {\n authenticateUser (channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName : null,\n channelClaimId: null,\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName : user.channelName,\n channelClaimId: user.channelClaimId,\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials (channelName, channelId, userPassword) {\n return new Promise((resolve, reject) => {\n // hoisted variables\n let channelData;\n // build the params for finding the channel\n let channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel\n .findOne({\n where: channelFindParams,\n })\n .then(channel => {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) },\n });\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n })\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/auth/authentication.js","const CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims (channelName, longChannelClaimId, claims, page) {\n const totalPages = module.exports.determineTotalPages(claims);\n const paginationPage = module.exports.getPageFromQuery(page);\n const viewData = {\n channelName : channelName,\n longChannelClaimId: longChannelClaimId,\n claims : module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage : module.exports.determinePreviousPage(paginationPage),\n currentPage : paginationPage,\n nextPage : module.exports.determineNextPage(totalPages, paginationPage),\n totalPages : totalPages,\n totalResults : module.exports.determineTotalClaims(claims),\n };\n return viewData;\n },\n getPageFromQuery (page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims (claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n const claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n const claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n const pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages (claims) {\n if (!claims) {\n return 0;\n } else {\n const totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n const fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n const remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage (currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage (totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims (claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/channelPagination.js","const { details: host } = require('../../config/siteConfig.js');\nconst handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = (app) => {\n // route for the home page\n app.get('/', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', (req, res) => {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', (req, res) => {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', (req, res) => {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', ({ params }, res) => {\n const claimId = params.claimId;\n const name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host, claimId, name });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/page-routes.js","import * as actions from 'constants/publish_action_types';\nimport { LOGIN } from 'constants/publish_channel_select_states';\nconst { publishing } = require('../../config/siteConfig.js');\n\nconst initialState = {\n disabled : publishing.disabled,\n disabledMessage : publishing.disabledMessage,\n publishInChannel : false,\n selectedChannel : LOGIN,\n showMetadataInputs: false,\n status : {\n status : null,\n message: null,\n },\n error: {\n file : null,\n url : null,\n channel : null,\n publishSubmit: null,\n },\n file : null,\n claim : '',\n metadata: {\n title : '',\n description: '',\n license : '',\n nsfw : false,\n },\n thumbnail: null,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data,\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data,\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel,\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data,\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data,\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data,\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/publish.js","export const LOGIN = 'Existing';\nexport const CREATE = 'New';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_channel_select_states.js","import * as actions from 'constants/channel_action_types';\n\nconst initialState = {\n loggedInChannel: {\n name : null,\n shortId: null,\n longId : null,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/channel.js","import * as actions from 'constants/show_action_types';\nimport { LOCAL_CHECK, ERROR } from 'constants/asset_display_states';\n\nconst initialState = {\n request: {\n error: null,\n type : null,\n id : null,\n },\n requestList : {},\n channelList : {},\n assetList : {},\n displayAsset: {\n error : null,\n status: LOCAL_CHECK,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data,\n }),\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id : action.data.requestId,\n }),\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, {\n [action.data.id]: {\n error: action.data.error,\n key : action.data.key,\n },\n }),\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, {\n [action.data.id]: {\n error : action.data.error,\n name : action.data.name,\n claimId : action.data.claimId,\n shortId : action.data.shortId,\n claimData: action.data.claimData,\n },\n }),\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.id]: {\n name : action.data.name,\n longId : action.data.longId,\n shortId : action.data.shortId,\n claimsData: action.data.claimsData,\n },\n }),\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.channelListId]: Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData,\n }),\n }),\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data,\n }),\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error : action.data,\n status: ERROR,\n }),\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/show.js","const siteConfig = require('../../config/siteConfig.js');\n\nconst {\n analytics: {\n googleId: googleAnalyticsId,\n },\n assetDefaults: {\n thumbnail: defaultThumbnail,\n description: defaultDescription,\n },\n details: {\n description,\n host,\n title,\n twitter,\n },\n} = siteConfig;\n\nconst initialState = {\n description,\n googleAnalyticsId,\n host,\n title,\n twitter,\n defaultDescription,\n defaultThumbnail,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/site.js","module.exports = require(\"react-ga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-ga\"\n// module id = 95\n// module chunks = 0","module.exports = require(\"cross-fetch/polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cross-fetch/polyfill\"\n// module id = 96\n// module chunks = 0","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport SEO from 'components/SEO';\n\nclass AboutPage extends React.Component {\n render () {\n return (\n
\n \n \n
\n
\n
\n

Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.

\n

TWITTER

\n

GITHUB

\n

DISCORD CHANNEL

\n

DOCUMENTATION

\n
\n
\n
\n

Spee.ch is a media-hosting site that reads from and publishes content to the LBRY blockchain.

\n

Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the LBRY network. This means that your images are stored in multiple locations without a single point of failure.

\n

Contribute

\n

If you have an idea for your own spee.ch-like site on top of LBRY, fork our github repo and go to town!

\n

If you want to improve spee.ch, join our discord channel or solve one of our github issues.

\n
\n
\n
\n
\n );\n }\n};\n\nexport default AboutPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/AboutPage/index.jsx","import React from 'react';\nimport { NavLink, withRouter } from 'react-router-dom';\nimport Logo from 'components/Logo';\nimport NavBarChannelDropdown from 'components/NavBarChannelOptionsDropdown';\nimport request from 'utils/request';\n\nconst VIEW = 'VIEW';\nconst LOGOUT = 'LOGOUT';\n\nclass NavBar extends React.Component {\n constructor (props) {\n super(props);\n this.checkForLoggedInUser = this.checkForLoggedInUser.bind(this);\n this.logoutUser = this.logoutUser.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n componentDidMount () {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n checkForLoggedInUser () {\n const params = {credentials: 'include'};\n request('/user', params)\n .then(({ data }) => {\n this.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n })\n .catch(error => {\n console.log('/user error:', error.message);\n });\n }\n logoutUser () {\n const params = {credentials: 'include'};\n request('/logout', params)\n .then(() => {\n this.props.onChannelLogout();\n })\n .catch(error => {\n console.log('/logout error', error.message);\n });\n }\n handleSelection (event) {\n const value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push(`/${this.props.channelName}:${this.props.channelLongId}`);\n break;\n default:\n break;\n }\n }\n render () {\n const { siteDescription } = this.props;\n return (\n
\n
\n \n
\n {siteDescription}\n
\n
\n Publish\n About\n { this.props.channelName ? (\n \n ) : (\n Channel\n )}\n
\n
\n
\n );\n }\n}\n\nexport default withRouter(NavBar);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/view.jsx","import React from 'react';\nimport Helmet from 'react-helmet';\nimport PropTypes from 'prop-types';\n\nimport { createPageTitle } from 'utils/pageTitle';\nimport { createMetaTags } from 'utils/metaTags';\nimport { createCanonicalLink } from 'utils/canonicalLink';\n\nclass SEO extends React.Component {\n render () {\n // props from state\n const { defaultDescription, defaultThumbnail, siteDescription, siteHost, siteTitle, siteTwitter } = this.props;\n // props from parent\n const { asset, channel, pageUri } = this.props;\n let { pageTitle } = this.props;\n // create page title, tags, and canonical link\n pageTitle = createPageTitle(siteTitle, pageTitle);\n const metaTags = createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n const canonicalLink = createCanonicalLink(asset, channel, pageUri, siteHost);\n // render results\n return (\n \n );\n }\n};\n\nSEO.propTypes = {\n pageTitle: PropTypes.string,\n pageUri : PropTypes.string,\n channel : PropTypes.object,\n asset : PropTypes.object,\n};\n\nexport default SEO;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/view.jsx","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/index.js","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ChannelLoginForm from 'containers/ChannelLoginForm';\nimport ChannelCreateForm from 'containers/ChannelCreateForm';\n\nclass LoginPage extends React.Component {\n componentWillReceiveProps (newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push(`/`);\n }\n }\n render () {\n return (\n
\n \n \n
\n
\n
\n

Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you're documenting important events, or making a public repository for cat gifs (password: '1234'), try creating a channel for it!

\n
\n
\n
\n

Log in to an existing channel:

\n \n

Create a brand new channel:

\n \n
\n
\n
\n
\n );\n }\n};\n\nexport default withRouter(LoginPage);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/view.jsx","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from '../../actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/index.js","import React from 'react';\nimport request from 'utils/request';\n\nclass ChannelLoginForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n name : '',\n password: '',\n };\n this.handleInput = this.handleInput.bind(this);\n this.loginToChannel = this.loginToChannel.bind(this);\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n loginToChannel (event) {\n event.preventDefault();\n const params = {\n method : 'POST',\n body : JSON.stringify({username: this.state.name, password: this.state.password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n request('login', params)\n .then(({success, channelName, shortChannelId, channelClaimId, message}) => {\n if (success) {\n this.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n this.setState({'error': message});\n };\n })\n .catch(error => {\n if (error.message) {\n this.setState({'error': error.message});\n } else {\n this.setState({'error': error});\n }\n });\n }\n render () {\n return (\n
\n
\n
\n \n
\n
\n @\n \n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n { this.state.error ? (\n

{this.state.error}

\n ) : (\n

Enter the name and password for your channel

\n )}\n
\n \n
\n
\n );\n }\n}\n\nexport default ChannelLoginForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/view.jsx","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from 'actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/index.js","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport request from 'utils/request';\n\nclass ChannelCreateForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n channel : '',\n password: '',\n status : null,\n };\n this.handleChannelInput = this.handleChannelInput.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.createChannel = this.createChannel.bind(this);\n }\n cleanseChannelInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n handleChannelInput (event) {\n let value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({channel: value});\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({error: 'Please enter a channel name'});\n }\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n updateIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n request(`/api/channel/availability/${channelWithAtSymbol}`)\n .then(() => {\n this.setState({'error': null});\n })\n .catch((error) => {\n this.setState({'error': error.message});\n });\n }\n checkIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n return request(`/api/channel/availability/${channelWithAtSymbol}`);\n }\n checkIsPasswordProvided (password) {\n return new Promise((resolve, reject) => {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n makePublishChannelRequest (username, password) {\n const params = {\n method : 'POST',\n body : JSON.stringify({username, password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n return new Promise((resolve, reject) => {\n request('/signup', params)\n .then(result => {\n return resolve(result);\n })\n .catch(error => {\n reject(new Error(`Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ${error.message}`));\n });\n });\n }\n createChannel (event) {\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password)\n .then(() => {\n return this.checkIsChannelAvailable(this.state.channel);\n })\n .then(() => {\n this.setState({status: 'We are publishing your new channel. Sit tight...'});\n return this.makePublishChannelRequest(this.state.channel, this.state.password);\n })\n .then(result => {\n this.setState({status: null});\n this.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n })\n .catch((error) => {\n if (error.message) {\n this.setState({'error': error.message, status: null});\n } else {\n this.setState({'error': error, status: null});\n };\n });\n }\n render () {\n return (\n
\n { !this.state.status ? (\n
\n
\n
\n \n
\n
\n @\n \n { (this.state.channel && !this.state.error) && {'\\u2713'} }\n { this.state.error && {'\\u2716'} }\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n {this.state.error ? (\n

{this.state.error}

\n ) : (\n

Choose a name and password for your channel

\n )}\n
\n \n
\n
\n ) : (\n
\n

{this.state.status}

\n \n
\n )}\n
\n );\n }\n}\n\nexport default ChannelCreateForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/view.jsx","import { connect } from 'react-redux';\nimport { onHandleShowPageUri } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n return {\n error : show.request.error,\n requestType: show.request.type,\n };\n};\n\nconst mapDispatchToProps = {\n onHandleShowPageUri,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/index.js","import React from 'react';\nimport ErrorPage from 'pages/ErrorPage';\nimport ShowAssetLite from 'containers/ShowAssetLite';\nimport ShowAssetDetails from 'containers/ShowAssetDetails';\nimport ShowChannel from 'containers/ShowChannel';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\nclass ShowPage extends React.Component {\n componentDidMount () {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n componentWillReceiveProps (nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n render () {\n const { error, requestType } = this.props;\n if (error) {\n return (\n \n );\n }\n switch (requestType) {\n case CHANNEL:\n return ;\n case ASSET_LITE:\n return ;\n case ASSET_DETAILS:\n return ;\n default:\n return

loading...

;\n }\n }\n};\n\nexport default ShowPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport { Link } from 'react-router-dom';\nimport AssetDisplay from 'containers/AssetDisplay';\n\nclass ShowLite extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { name, claimId } = asset.claimData;\n return (\n
\n \n \n hosted\n via Spee.ch\n
\n );\n }\n return (\n
\n

loading asset data...

\n
\n );\n }\n};\n\nexport default ShowLite;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport { LOCAL_CHECK, UNAVAILABLE, ERROR, AVAILABLE } from 'constants/asset_display_states';\n\nclass AssetDisplay extends React.Component {\n componentDidMount () {\n const { asset: { claimData: { name, claimId } } } = this.props;\n this.props.onFileRequest(name, claimId);\n }\n render () {\n const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props;\n return (\n
\n {(status === LOCAL_CHECK) &&\n
\n

Checking to see if Spee.ch has your asset locally...

\n
\n }\n {(status === UNAVAILABLE) &&\n
\n

Sit tight, we're searching the LBRY blockchain for your asset!

\n \n

Curious what magic is happening here? Learn more.

\n
\n }\n {(status === ERROR) &&\n
\n

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the LBRY discord.

\n

{error}

\n
\n }\n {(status === AVAILABLE) &&\n (() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return (\n \n );\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

Unsupported file type

\n );\n }\n })()\n }\n
\n );\n }\n};\n\nexport default AssetDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ErrorPage from 'pages/ErrorPage';\nimport AssetTitle from 'containers/AssetTitle';\nimport AssetDisplay from 'containers/AssetDisplay';\nimport AssetInfo from 'containers/AssetInfo';\n\nclass ShowAssetDetails extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { claimData: { name } } = asset;\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowAssetDetails;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n const { claimData: { title } } = selectAsset(show);\n return {\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/index.js","import React from 'react';\n\nconst AssetTitle = ({ title }) => {\n return (\n
\n {title}\n
\n );\n};\n\nexport default AssetTitle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/index.js","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nclass AssetInfo extends React.Component {\n constructor (props) {\n super(props);\n this.copyToClipboard = this.copyToClipboard.bind(this);\n }\n copyToClipboard (event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({error: 'Oops, unable to copy'});\n }\n }\n render () {\n const { asset: { shortId, claimData : { channelName, certificateId, description, name, claimId, fileExt, contentType, thumbnail, host } } } = this.props;\n return (\n
\n {channelName &&\n
\n
\n Channel:\n
\n
\n {channelName}\n
\n
\n }\n\n {description &&\n
\n {description}\n
\n }\n\n
\n
\n
\n Share:\n
\n
\n \n twitter\n facebook\n tumblr\n reddit\n
\n
\n
\n
\n\n
\n \n );\n }\n};\n\nexport default AssetInfo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select request\n const previousRequest = show.requestList[requestId] || null;\n // select channel\n let channel;\n if (previousRequest) {\n const channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport ErrorPage from 'pages/ErrorPage';\nimport NavBar from 'containers/NavBar';\nimport ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay';\n\nclass ShowChannel extends React.Component {\n render () {\n const { channel } = this.props;\n if (channel) {\n const { name, longId, shortId } = channel;\n return (\n
\n \n \n
\n
\n

channel name: {name}

\n

full channel id: {longId}

\n

short channel id: {shortId}

\n
\n
\n \n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowChannel;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/view.jsx","import { connect } from 'react-redux';\nimport { onUpdateChannelClaims } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select channel key\n const request = show.requestList[show.request.id];\n const channelKey = request.key;\n // select channel claims\n const channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey,\n channel,\n };\n};\n\nconst mapDispatchToProps = {\n onUpdateChannelClaims,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/index.js","import React from 'react';\nimport AssetPreview from 'components/AssetPreview';\n\nclass ChannelClaimsDisplay extends React.Component {\n constructor (props) {\n super(props);\n this.showNextResultsPage = this.showNextResultsPage.bind(this);\n this.showPreviousResultsPage = this.showPreviousResultsPage.bind(this);\n }\n showPreviousResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n showNextResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n showNewPage (page) {\n const { channelKey, channel: { name, longId } } = this.props;\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n render () {\n const { channel: { claimsData: { claims, currentPage, totalPages } } } = this.props;\n return (\n
\n {(claims.length > 0) ? (\n
\n {claims.map((claim, index) => )}\n
\n {(currentPage > 1) &&\n \n }\n {(currentPage < totalPages) &&\n \n }\n
\n
\n ) : (\n

There are no claims in this channel

\n )}\n
\n );\n }\n};\n\nexport default ChannelClaimsDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/view.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nconst AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail } }) => {\n const directSourceLink = `${claimId}/${name}.${fileExt}`;\n const showUrlLink = `/${claimId}/${name}`;\n return (\n
\n \n {(() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

unsupported file type

\n );\n }\n })()}\n \n
\n );\n};\n\nexport default AssetPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/view.jsx","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site: { host, title } }) => {\n return {\n host,\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/index.jsx","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport Helmet from 'react-helmet';\n\nclass FourOhForPage extends React.Component {\n render () {\n const {title, host} = this.props;\n return (\n
\n \n {title} - 404\n \n \n \n
\n

404

\n

That page does not exist

\n
\n
\n );\n }\n};\n\nexport default FourOhForPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/view.jsx","const { sendGAServeEvent } = require('../helpers/googleAnalytics');\nconst { determineResponseType, flipClaimNameAndIdForBackwardsCompatibility, logRequestData, getClaimIdAndServeAsset } = require('../helpers/serveHelpers.js');\nconst lbryUri = require('../helpers/lbryUri.js');\nconst handleShowRender = require('../helpers/handleShowRender.jsx');\nconst SERVE = 'SERVE';\n\nmodule.exports = (app) => {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({ claimName } = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // parse the identifier\n let isChannel, channelName, channelClaimId, claimId;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(params.identifier));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n if (!isChannel) {\n [claimId, claimName] = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({claimName} = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/asset-routes.js","const logger = require('winston');\nconst { getClaimId, getLocalFileRecord } = require('../controllers/serveController.js');\nconst { handleErrorResponse } = require('./errorHandlers.js');\n\nconst SERVE = 'SERVE';\nconst SHOW = 'SHOW';\nconst NO_FILE = 'NO_FILE';\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml ({accept}) {\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser (headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset ({accept, range}) {\n const imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n const videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId (claimId) {\n return ((claimId.length === 40) && !/[^A-Za-z0-9]/g.test(claimId));\n};\n\nfunction isValidShortId (claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId (input) {\n return (isValidClaimId(input) || isValidShortId(input));\n};\n\nfunction serveAssetToClient (claimId, name, res) {\n return getLocalFileRecord(claimId, name)\n .then(fileRecord => {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect(`/api/claim/get/${name}/${claimId}`);\n }\n // serve the file\n const {filePath, fileType} = fileRecord;\n logger.verbose(`serving file: ${filePath}`);\n const sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type' : fileType || 'image/jpeg',\n },\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n })\n .catch(error => {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset (channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(fullClaimId => {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'no claim id could be found'});\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'no channel id could be found'});\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n })\n .catch(error => {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType (hasFileExtension, headers) {\n let responseType;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) { // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) { // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility (identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n const tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData (responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/serveHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n logger.debug('parsing identifier:', identifier);\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex\n .exec(identifier)\n .map(match => match || null);\n logger.debug(`${proto}, ${value}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your url. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Invalid characters in channel name: ${nameBadChars.join(', ')}.`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId,\n claimId,\n };\n },\n parseClaim: function (claim) {\n logger.debug('parsing name:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Invalid characters in claim name: ${nameBadChars.join(', ')}.`);\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No file extension provided after separator ${modifierSeperator}.`);\n }\n if (modifierSeperator !== '.') {\n throw new Error(`The ${modifierSeperator} modifier is not supported in the claim name`);\n }\n }\n // return results\n return {\n claimName,\n };\n },\n parseModifier: function (claim) {\n logger.debug('parsing modifier:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n // Validate and process modifier\n let hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryUri.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore, applyMiddleware } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage';\nimport createSagaMiddleware from 'redux-saga';\nimport { call } from 'redux-saga/effects';\nimport { handleShowPageUri } from '../../client/sagas/show_uri';\nimport { onHandleShowPageUri } from '../../client/actions/show';\n\nimport Helmet from 'react-helmet';\n\nconst returnSagaWithParams = (saga, params) => {\n return function * () {\n yield call(saga, params);\n };\n};\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create and apply middleware\n const sagaMiddleware = createSagaMiddleware();\n const middleware = applyMiddleware(sagaMiddleware);\n\n // create a new Redux store instance\n const store = createStore(Reducer, middleware);\n\n // create saga\n const action = onHandleShowPageUri(req.params);\n const saga = returnSagaWithParams(handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware\n .run(saga)\n .done\n .then(() => {\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handleShowRender.jsx","module.exports = require(\"redux-saga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga\"\n// module id = 128\n// module chunks = 0","import { call, put, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { onRequestError, onNewChannelRequest, onNewAssetRequest } from 'actions/show';\nimport { newAssetRequest } from 'sagas/show_asset';\nimport { newChannelRequest } from 'sagas/show_channel';\nimport lbryUri from 'utils/lbryUri';\n\nfunction * parseAndUpdateIdentifierAndClaim (modifier, claim) {\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n let isChannel, channelName, channelClaimId, claimId, claimName, extension;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(modifier));\n ({ claimName, extension } = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n if (isChannel) {\n return yield call(newAssetRequest, onNewAssetRequest(claimName, null, channelName, channelClaimId, extension));\n };\n yield call(newAssetRequest, onNewAssetRequest(claimName, claimId, null, null, extension));\n}\nfunction * parseAndUpdateClaimOnly (claim) {\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n let isChannel, channelName, channelClaimId;\n try {\n ({ isChannel, channelName, channelClaimId } = lbryUri.parseIdentifier(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n // return early if this request is for a channel\n if (isChannel) {\n return yield call(newChannelRequest, onNewChannelRequest(channelName, channelClaimId));\n }\n // if not for a channel, parse the claim request\n let claimName, extension;\n try {\n ({claimName, extension} = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield call(newAssetRequest, onNewAssetRequest(claimName, null, null, null, extension));\n}\n\nexport function * handleShowPageUri (action) {\n const { identifier, claim } = action.data;\n if (identifier) {\n return yield call(parseAndUpdateIdentifierAndClaim, identifier, claim);\n }\n yield call(parseAndUpdateClaimOnly, claim);\n};\n\nexport function * watchHandleShowPageUri () {\n yield takeLatest(actions.HANDLE_SHOW_URI, handleShowPageUri);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_uri.js","import { call, put, select, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addRequestToRequestList, onRequestError, onRequestUpdate, addAssetToAssetList } from 'actions/show';\nimport { getLongClaimId, getShortId, getClaimData } from 'api/assetApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newAssetRequest (action) {\n const { requestType, requestId, name, modifier } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get long id && add request to request list\n let longId;\n try {\n ({data: longId} = yield call(getLongClaimId, host, name, modifier));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n const assetKey = `a#${name}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, assetKey));\n // is this an existing asset?\n // If this asset is in the asset list, it's already been fetched\n if (state.assetList[assetKey]) {\n return null;\n }\n // get short Id\n let shortId;\n try {\n ({data: shortId} = yield call(getShortId, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // get asset claim data\n let claimData;\n try {\n ({data: claimData} = yield call(getClaimData, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // add asset to asset list\n yield put(addAssetToAssetList(assetKey, null, name, longId, shortId, claimData));\n // clear any errors in request error\n yield put(onRequestError(null));\n};\n\nexport function * watchNewAssetRequest () {\n yield takeLatest(actions.ASSET_REQUEST_NEW, newAssetRequest);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_asset.js","import Request from 'utils/request';\n\nexport function getLongClaimId (host, name, modifier) {\n let body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n const params = {\n method : 'POST',\n headers: { 'Content-Type': 'application/json' },\n body : JSON.stringify(body),\n };\n // create url\n const url = `${host}/api/claim/long-id`;\n // return the request promise\n return Request(url, params);\n};\n\nexport function getShortId (host, name, claimId) {\n const url = `${host}/api/claim/short-id/${claimId}/${name}`;\n return Request(url);\n};\n\nexport function getClaimData (host, name, claimId) {\n const url = `${host}/api/claim/data/${name}/${claimId}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/assetApi.js","import {call, put, select, takeLatest} from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addNewChannelToChannelList, addRequestToRequestList, onRequestError, onRequestUpdate, updateChannelClaims } from 'actions/show';\nimport { getChannelClaims, getChannelData } from 'api/channelApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newChannelRequest (action) {\n const { requestType, requestId, channelName, channelId } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get channel long id\n let longId, shortId;\n try {\n ({ data: {longChannelClaimId: longId, shortChannelClaimId: shortId} } = yield call(getChannelData, host, channelName, channelId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the request in the channel requests list\n const channelKey = `c#${channelName}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, channelKey));\n // is this an existing channel?\n // If this channel is in the channel list, it's already been fetched\n if (state.channelList[channelKey]) {\n return null;\n }\n // get channel claims data\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, channelName, 1));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the channel data in the channel list\n yield put(addNewChannelToChannelList(channelKey, channelName, shortId, longId, claimsData));\n // clear any request errors\n yield put(onRequestError(null));\n}\n\nexport function * watchNewChannelRequest () {\n yield takeLatest(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n};\n\nfunction * getNewClaimsAndUpdateChannel (action) {\n const { channelKey, name, longId, page } = action.data;\n const host = yield select(selectSiteHost);\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, name, page));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield put(updateChannelClaims(channelKey, claimsData));\n}\n\nexport function * watchUpdateChannelClaims () {\n yield takeLatest(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_channel.js","import Request from 'utils/request';\n\nexport function getChannelData (host, id, name) {\n if (!id) id = 'none';\n const url = `${host}/api/channel/data/${name}/${id}`;\n return Request(url);\n};\n\nexport function getChannelClaims (host, longId, name, page) {\n if (!page) page = 1;\n const url = `${host}/api/channel/claims/${name}/${longId}/${page}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/channelApi.js","const handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = app => {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', (req, res) => {\n // send response\n handlePageRender(req, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/fallback-routes.js","const { logLevel } = require('../../config/loggerConfig');\n\nmodule.exports = (winston) => {\n // configure\n winston.configure({\n transports: [\n new (winston.transports.Console)({\n level : logLevel,\n timestamp : false,\n colorize : true,\n prettyPrint : true,\n handleExceptions : true,\n humanReadableUnhandledException: true,\n }),\n ],\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureLogger.js","const loggerConfig = {\n logLevel: 'debug', // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/loggerConfig.js","const winstonSlackWebHook = require('winston-slack-webhook').SlackWebHook;\nconst slackConfig = require('../../config/slackConfig.js');\n\nmodule.exports = (winston) => {\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = slackConfig;\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-errors-transport',\n level : 'warn',\n webhookUrl: slackWebHook,\n channel : slackErrorChannel,\n username : 'spee.ch',\n iconEmoji : ':face_with_head_bandage:',\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-info-transport',\n level : 'info',\n webhookUrl: slackWebHook,\n channel : slackInfoChannel,\n username : 'spee.ch',\n iconEmoji : ':nerd_face:',\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureSlack.js","module.exports = require(\"winston-slack-webhook\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston-slack-webhook\"\n// module id = 138\n// module chunks = 0","import ActiveStatusBar from 'components/ActiveStatusBar';\r\nimport AssetPreview from 'components/AssetPreview';\r\nimport ExpandingTextArea from 'components/ExpandingTextArea';\r\nimport GAListener from 'components/GAListener';\r\nimport InactiveStatusBar from 'components/InactiveStatusBar';\r\nimport Logo from 'components/Logo';\r\nimport NavBarChannelOptionsDropdown from 'components/NavBarChannelOptionsDropdown';\r\nimport ProgressBar from 'components/ProgressBar';\r\nimport PublishPreview from 'components/PublishPreview';\r\nimport PublishUrlMiddleDisplay from 'components/PublishUrlMiddleDisplay';\r\nimport SEO from 'components/SEO';\r\n\r\nconst components = {\r\n ActiveStatusBar,\r\n AssetPreview,\r\n ExpandingTextArea,\r\n GAListener,\r\n InactiveStatusBar,\r\n Logo,\r\n NavBarChannelOptionsDropdown,\r\n ProgressBar,\r\n PublishPreview,\r\n PublishUrlMiddleDisplay,\r\n SEO,\r\n}\r\n\r\nexport default components;\r\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/index.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass ExpandingTextarea extends Component {\n constructor (props) {\n super(props);\n this._handleChange = this._handleChange.bind(this);\n }\n componentDidMount () {\n this.adjustTextarea({});\n }\n _handleChange (event) {\n const { onChange } = this.props;\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n adjustTextarea ({ target = this.el }) {\n target.style.height = 0;\n target.style.height = `${target.scrollHeight}px`;\n }\n render () {\n const { ...rest } = this.props;\n return (\n this.el = x}\n onChange={this._handleChange}\n />\n );\n }\n}\n\nExpandingTextarea.propTypes = {\n onChange: PropTypes.func,\n};\n\nexport default ExpandingTextarea;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ExpandingTextArea/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass PublishPreview extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n imgSource : '',\n defaultThumbnail: '/assets/img/video_thumb_default.png',\n };\n }\n componentDidMount () {\n this.setPreviewImageSource(this.props.file);\n }\n componentWillReceiveProps (newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n }\n setPreviewImageSourceFromFile (file) {\n const previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = () => {\n this.setState({imgSource: previewReader.result});\n };\n }\n setPreviewImageSource (file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n render () {\n return (\n \n );\n }\n};\n\nPublishPreview.propTypes = {\n dimPreview: PropTypes.bool.isRequired,\n file : PropTypes.object.isRequired,\n thumbnail : PropTypes.object,\n};\n\nexport default PublishPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishPreview/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction UrlMiddle ({publishInChannel, selectedChannel, loggedInChannelName, loggedInChannelShortId}) {\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return {loggedInChannelName}:{loggedInChannelShortId} /;\n }\n return @channelSelect a channel below /;\n }\n return (\n xyzThis will be a random id /\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel : PropTypes.bool.isRequired,\n loggedInChannelName : PropTypes.string,\n loggedInChannelShortId: PropTypes.string,\n};\n\nexport default UrlMiddle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishUrlMiddleDisplay/index.jsx"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///index.js","webpack:///webpack/bootstrap 663af5f6934a69121924","webpack:///external \"react\"","webpack:///external \"react-redux\"","webpack:///external \"winston\"","webpack:///./config/siteConfig.js","webpack:///external \"react-router-dom\"","webpack:///./client/containers/NavBar/index.js","webpack:///./client/actions/publish.js","webpack:///./client/components/SEO/index.js","webpack:///./client/utils/request.js","webpack:///./server/models/index.js","webpack:///./client/components/ProgressBar/index.jsx","webpack:///./client/actions/show.js","webpack:///./client/pages/ErrorPage/index.jsx","webpack:///./client/components/GAListener/index.jsx","webpack:///external \"prop-types\"","webpack:///./client/containers/ChannelLoginForm/index.js","webpack:///./client/containers/ChannelCreateForm/index.js","webpack:///./client/containers/AssetDisplay/index.js","webpack:///./client/containers/Dropzone/index.js","webpack:///./client/constants/show_action_types.js","webpack:///./client/pages/AboutPage/index.jsx","webpack:///./client/components/Logo/index.jsx","webpack:///./client/components/NavBarChannelOptionsDropdown/index.jsx","webpack:///./client/pages/LoginPage/index.js","webpack:///./client/components/ActiveStatusBar/index.jsx","webpack:///./client/components/InactiveStatusBar/index.jsx","webpack:///./client/pages/ShowPage/index.js","webpack:///./client/containers/ShowAssetLite/index.js","webpack:///./client/selectors/show.js","webpack:///./client/containers/ShowAssetDetails/index.js","webpack:///./client/containers/AssetTitle/index.js","webpack:///./client/containers/AssetInfo/index.js","webpack:///./client/containers/ShowChannel/index.js","webpack:///./client/containers/ChannelClaimsDisplay/index.js","webpack:///./client/components/AssetPreview/index.js","webpack:///./client/containers/FourOhFourPage/index.jsx","webpack:///./client/components/ExpandingTextArea/index.jsx","webpack:///./client/components/PublishPreview/index.jsx","webpack:///./client/components/PublishUrlMiddleDisplay/index.jsx","webpack:///./client/containers/ChannelSelect/index.js","webpack:///./client/containers/PublishDetails/index.js","webpack:///./client/containers/PublishTitleInput/index.js","webpack:///./client/containers/PublishUrlInput/index.js","webpack:///./client/containers/PublishThumbnailInput/index.js","webpack:///./client/containers/PublishMetadataInputs/index.js","webpack:///./client/containers/PublishDisabledMessage/index.js","webpack:///./client/containers/PublishStatus/index.js","webpack:///./client/containers/PublishTool/index.js","webpack:///external \"react-helmet\"","webpack:///external \"redux-saga/effects\"","webpack:///./client/components/index.js","webpack:///external \"path\"","webpack:///./client/containers/index.js","webpack:///./client/pages/index.js","webpack:///./client/pages/HomePage/index.jsx","webpack:///./server/helpers/lbryApi.js","webpack:///./server/helpers/googleAnalytics.js","webpack:///external \"redux\"","webpack:///./client/utils/dynamicImport.js","webpack:///./client/utils/canonicalLink.js","webpack:///./client/utils/file.js","webpack:///./client/utils/lbryUri.js","webpack:///./client/utils/metaTags.js","webpack:///./client/utils/pageTitle.js","webpack:///./client/actions/channel.js","webpack:///./client/containers/NavBar/view.jsx","webpack:///./client/components/SEO/view.jsx","webpack:///./client/pages/LoginPage/view.jsx","webpack:///./client/containers/ChannelLoginForm/view.jsx","webpack:///./client/containers/ChannelCreateForm/view.jsx","webpack:///./client/pages/ShowPage/view.jsx","webpack:///./client/containers/ShowAssetLite/view.jsx","webpack:///./client/containers/AssetDisplay/view.jsx","webpack:///./client/containers/ShowAssetDetails/view.jsx","webpack:///./client/containers/AssetTitle/view.jsx","webpack:///./client/containers/AssetInfo/view.jsx","webpack:///./client/containers/ShowChannel/view.jsx","webpack:///./client/containers/ChannelClaimsDisplay/view.jsx","webpack:///./client/components/AssetPreview/view.jsx","webpack:///./client/containers/FourOhFourPage/view.jsx","webpack:///./build/getFolderNames.js","webpack:///./client/containers/ChannelSelect/view.jsx","webpack:///./client/containers/Dropzone/view.jsx","webpack:///./client/containers/PublishDetails/view.jsx","webpack:///./client/containers/PublishTitleInput/view.jsx","webpack:///./client/containers/PublishUrlInput/view.jsx","webpack:///./client/containers/PublishThumbnailInput/view.jsx","webpack:///./client/containers/PublishMetadataInputs/view.jsx","webpack:///./client/containers/PublishDisabledMessage/view.jsx","webpack:///./client/containers/PublishStatus/view.jsx","webpack:///./client/containers/PublishTool/view.jsx","webpack:///external \"passport\"","webpack:///./config/mysqlConfig.js","webpack:///./config/slackConfig.js","webpack:///external \"passport-local\"","webpack:///external \"sequelize\"","webpack:///./server/helpers/sequelizeHelpers.js","webpack:///./server/helpers/publishHelpers.js","webpack:///external \"fs\"","webpack:///./server/helpers/errorHandlers.js","webpack:///./server/controllers/serveController.js","webpack:///./server/helpers/handlePageRender.jsx","webpack:///external \"react-dom/server\"","webpack:///./client/reducers/index.js","webpack:///./client/constants/publish_action_types.js","webpack:///./client/constants/publish_channel_select_states.js","webpack:///./client/constants/channel_action_types.js","webpack:///./client/constants/asset_display_states.js","webpack:///./client/app.js","webpack:///./client/utils ^.*$","webpack:///./client/utils/publish.js","webpack:///./client/utils/validate.js","webpack:///./client/constants/show_request_types.js","webpack:///./server/helpers/renderFullPage.js","webpack:///./client/selectors/site.js","webpack:///external \"babel-polyfill\"","webpack:///external \"whatwg-fetch\"","webpack:///./speech.js","webpack:///./server/server.js","webpack:///external \"express\"","webpack:///external \"body-parser\"","webpack:///external \"express-handlebars\"","webpack:///external \"handlebars\"","webpack:///external \"helmet\"","webpack:///./server/helpers/authHelpers.js","webpack:///external \"cookie-session\"","webpack:///external \"http\"","webpack:///./server/passport/local-signup.js","webpack:///external \"axios\"","webpack:///./config/lbryConfig.js","webpack:///external \"universal-analytics\"","webpack:///./server/models/certificate.js","webpack:///./server/models/channel.js","webpack:///./server/models/claim.js","webpack:///./server/models/file.js","webpack:///./server/models/request.js","webpack:///./server/models/user.js","webpack:///external \"bcrypt\"","webpack:///./server/passport/local-login.js","webpack:///./server/routes/auth-routes.js","webpack:///./server/routes/api-routes.js","webpack:///external \"connect-multiparty\"","webpack:///./server/controllers/publishController.js","webpack:///./server/auth/authentication.js","webpack:///./server/helpers/channelPagination.js","webpack:///./server/routes/page-routes.js","webpack:///./client/reducers/publish.js","webpack:///./client/reducers/channel.js","webpack:///./client/reducers/show.js","webpack:///./client/reducers/site.js","webpack:///external \"react-ga\"","webpack:///external \"cross-fetch/polyfill\"","webpack:///./server/routes/asset-routes.js","webpack:///./server/helpers/serveHelpers.js","webpack:///./server/helpers/lbryUri.js","webpack:///./server/helpers/handleShowRender.jsx","webpack:///external \"redux-saga\"","webpack:///./client/sagas/show_uri.js","webpack:///./client/sagas/show_asset.js","webpack:///./client/api/assetApi.js","webpack:///./client/sagas/show_channel.js","webpack:///./client/api/channelApi.js","webpack:///./server/routes/fallback-routes.js","webpack:///./server/helpers/configureLogger.js","webpack:///./config/loggerConfig.js","webpack:///./server/helpers/configureSlack.js","webpack:///external \"winston-slack-webhook\"","webpack:///./client/components ^\\.\\/.*$","webpack:///./client/containers ^\\.\\/.*$","webpack:///./client/constants/publish_claim_states.js","webpack:///./client/pages ^\\.\\/.*$"],"names":["module","exports","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","require","SiteConfig","_this","this","analytics","googleId","assetDefaults","description","thumbnail","title","auth","sessionKey","componentsConfig","components","containers","pages","details","host","port","twitter","publishing","additionalClaimAddresses","disabled","disabledMessage","primaryClaimAddress","thumbnailChannel","thumbnailChannelId","uploadDirectory","configure","config","console","log","value","_reactRedux","_channel","_publish","_view","_view2","obj","default","mapStateToProps","_ref","channel","site","channelName","loggedInChannel","channelShortId","shortId","channelLongId","longId","siteDescription","mapDispatchToProps","dispatch","onChannelLogin","updateLoggedInChannel","updateSelectedChannel","onChannelLogout","connect","selectFile","file","type","actions","FILE_SELECTED","data","clearFile","FILE_CLEAR","updateMetadata","METADATA_UPDATE","updateClaim","CLAIM_UPDATE","setPublishInChannel","SET_PUBLISH_IN_CHANNEL","updatePublishStatus","status","message","PUBLISH_STATUS_UPDATE","updateError","ERROR_UPDATE","SELECTED_CHANNEL_UPDATE","toggleMetadataInputs","showMetadataInputs","TOGGLE_METADATA_INPUTS","onNewThumbnail","THUMBNAIL_NEW","startPublish","history","PUBLISH_START","_publish_action_types","newObj","key","defaultDescription","defaultThumbnail","siteHost","siteTitle","siteTwitter","parseJSON","response","json","checkStatus","jsonResponse","error","Error","request","url","options","fetch","then","Promise","all","_ref2","_slicedToArray","sliceIterator","arr","_arr","_n","_d","_e","undefined","_s","_i","Symbol","iterator","next","done","push","length","err","Array","isArray","TypeError","Sequelize","logger","_require","database","username","password","db","sequelize","dialect","dialectOptions","decimalNumbers","logging","pool","max","min","idle","acquire","authenticate","info","catch","Certificate","Channel","Claim","File","Request","User","import","keys","forEach","modelName","associate","upsert","Model","values","condition","tableName","findOne","where","debug","update","create","_interopRequireDefault","_classCallCheck","instance","Constructor","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","constructor","writable","setPrototypeOf","__proto__","_createClass","defineProperties","target","props","descriptor","protoProps","staticProps","_react","_react2","_propTypes","_propTypes2","_ActiveStatusBar","_ActiveStatusBar2","_InactiveStatusBar","_InactiveStatusBar2","ProgressBar","_React$Component","getPrototypeOf","state","bars","index","incrementer","createBars","bind","startProgressBar","updateProgressBar","stopProgressBar","size","isActive","setState","updateInterval","setInterval","clearInterval","createElement","map","bar","Component","propTypes","number","isRequired","onHandleShowPageUri","params","HANDLE_SHOW_URI","onRequestError","REQUEST_ERROR","onNewChannelRequest","channelId","requestType","requestId","CHANNEL_REQUEST_NEW","onNewAssetRequest","id","extension","ASSET_REQUEST_NEW","modifier","onRequestUpdate","REQUEST_UPDATE","addRequestToRequestList","REQUEST_LIST_ADD","addAssetToAssetList","claimId","claimData","ASSET_ADD","addNewChannelToChannelList","claimsData","CHANNEL_ADD","onUpdateChannelClaims","channelKey","page","CHANNEL_CLAIMS_UPDATE_ASYNC","updateChannelClaims","channelListId","CHANNEL_CLAIMS_UPDATE_SUCCESS","fileRequested","FILE_REQUESTED","updateFileAvailability","FILE_AVAILABILITY_UPDATE","updateDisplayAssetError","DISPLAY_ASSET_ERROR","_show_action_types","_show_request_types","_NavBar","_NavBar2","ErrorPage","apply","arguments","className","string","_reactGa","_reactGa2","_reactRouterDom","initialize","GAListener","sendPageView","location","listen","set","pathname","pageview","children","withRouter","_show","_show2","show","displayAsset","asset","selectAsset","onFileRequest","publish","fileError","setFileError","_SEO","_SEO2","AboutPage","pageTitle","pageUri","href","Logo","version","x","y","height","viewBox","enableBackground","Link","to","transform","fontSize","fontFamily","fill","stroke","strokeWidth","strokeLinecap","NavBarChannelDropdown","handleSelection","defaultSelection","VIEW","LOGOUT","onChange","loggedInChannelName","ActiveStatusBar","InactiveStatusBar","requestList","assetList","assetKey","selectShowState","previousRequest","channelList","defaults","_ref$site","_objectWithoutProperties","indexOf","_extends","assign","source","ExpandingTextarea","_Component","_handleChange","adjustTextarea","event","_ref$target","el","style","scrollHeight","_this2","rest","ref","func","PublishPreview","imgSource","setPreviewImageSource","newProps","setPreviewImageSourceFromFile","previewReader","FileReader","readAsDataURL","onloadend","result","src","dimPreview","alt","bool","UrlMiddle","publishInChannel","selectedChannel","loggedInChannelShortId","channelError","onPublishInChannelChange","onChannelSelect","metadata","onMetadataChange","fileName","claim","urlError","onClaimChange","onUrlError","license","nsfw","onToggleMetadataInputs","Path","getSubDirectoryNames","thisFolder","resolve","__dirname","_PublishTool","_PublishTool2","HomePage","axios","_require$api","api","apiHost","apiPort","lbryApiUri","_require2","chooseGaLbrynetPublishLabel","sendGATimingEvent","handleLbrynetResponse","reject","JSON","stringify","publishClaim","publishParams","gaStartTime","Date","now","post","method","getClaim","uri","timeout","getClaimList","claimName","resolveUri","getDownloadDirectory","_ref3","download_directory","createChannel","channel_name","amount","createServeEventParams","headers","ip","originalUrl","eventCategory","eventAction","eventLabel","ipOverride","userAgentOverride","createPublishTimingEventParams","category","variable","label","startTime","endTime","userTimingCategory","userTimingVariableName","userTimingTime","userTimingLabel","sendGoogleAnalyticsEvent","visitorId","replace","ua","strictCidFormat","https","sendGoogleAnalyticsTiming","timing","sendGAServeEvent","channel_id","getDeepestChildValue","parent","childrenKeys","childKey","shift","child","_typeof","dynamicImport","filePath","folders","split","filter","folderName","customComponent","createBasicCanonicalLink","createAssetCanonicalLink","certificateId","_asset$claimData","createChannelCanonicalLink","createCanonicalLink","validateFile","test","REGEXP_INVALID_CLAIM","REGEXP_INVALID_CHANNEL","REGEXP_ADDRESS","CHANNEL_CHAR","parseIdentifier","identifier","componentsRegex","RegExp","_componentsRegex$exec","exec","match","_componentsRegex$exec2","modifierSeperator","isChannel","startsWith","nameBadChars","join","channelClaimId","parseClaim","_componentsRegex$exec3","_componentsRegex$exec4","extensionSeperator","determineOgThumbnailContentType","substring","lastIndexOf","createBasicMetaTags","content","createChannelMetaTags","createAssetMetaTags","contentType","embedUrl","showUrl","fileExt","ogTitle","ogDescription","ogThumbnailContentType","ogThumbnail","metaTags","createMetaTags","createPageTitle","CHANNEL_UPDATE","_channel_action_types","_Logo","_Logo2","_NavBarChannelOptionsDropdown","_NavBarChannelOptionsDropdown2","_request","_request2","NavBar","checkForLoggedInUser","logoutUser","credentials","shortChannelId","_this3","selectedOptions","NavLink","activeClassName","exact","_reactHelmet","_reactHelmet2","_pageTitle","_metaTags","_canonicalLink","SEO","_props","_props2","canonicalLink","meta","link","rel","_ChannelLoginForm","_ChannelLoginForm2","_ChannelCreateForm","_ChannelCreateForm2","LoginPage","_defineProperty","ChannelLoginForm","handleInput","loginToChannel","preventDefault","body","Headers","Content-Type","success","htmlFor","placeholder","channelPassword","onClick","_ProgressBar","_ProgressBar2","ChannelCreateForm","handleChannelInput","input","cleanseChannelInput","updateIsChannelAvailable","channelWithAtSymbol","checkIsPasswordProvided","checkIsChannelAvailable","makePublishChannelRequest","_ErrorPage","_ErrorPage2","_ShowAssetLite","_ShowAssetLite2","_ShowAssetDetails","_ShowAssetDetails2","_ShowChannel","_ShowChannel2","ShowPage","nextProps","CHANNEL","ASSET_LITE","ASSET_DETAILS","_AssetDisplay","_AssetDisplay2","ShowLite","_asset_display_states","AssetDisplay","_props$asset$claimDat","_props$asset$claimDat2","controls","poster","_AssetTitle","_AssetTitle2","_AssetInfo","_AssetInfo2","ShowAssetDetails","AssetTitle","AssetInfo","copyToClipboard","elementToCopy","dataset","elementtocopy","document","getElementById","select","execCommand","_props$asset","hidden","readOnly","spellCheck","data-elementtocopy","download","_ChannelClaimsDisplay","_ChannelClaimsDisplay2","ShowChannel","_AssetPreview","_AssetPreview2","ChannelClaimsDisplay","showNextResultsPage","showPreviousResultsPage","currentPage","previousPage","parseInt","showNewPage","nextPage","_props$channel","_props$channel$claims","claims","totalPages","AssetPreview","_ref$claimData","directSourceLink","showUrlLink","FourOhForPage","lstatSync","readdirSync","root","fullPath","isDirectory","_publish_channel_select_states","states","ChannelSelect","toggleAnonymousPublish","selectedOption","checked","LOGIN","CREATE","_file","_PublishPreview","_PublishPreview2","Dropzone","dragOver","mouseOver","handleDrop","handleDragOver","handleDragEnd","handleDragEnter","handleDragLeave","handleMouseEnter","handleMouseLeave","handleClick","handleFileInput","chooseFile","dt","dataTransfer","items","kind","droppedFile","getAsFile","remove","clearData","click","fileList","files","accept","encType","onDrop","onDragOver","onDragEnd","onDragEnter","onDragLeave","onMouseEnter","onMouseLeave","_Dropzone","_Dropzone2","_PublishTitleInput","_PublishTitleInput2","_PublishUrlInput","_PublishUrlInput2","_PublishThumbnailInput","_PublishThumbnailInput2","_PublishMetadataInputs","_PublishMetadataInputs2","_ChannelSelect","_ChannelSelect2","PublishDetails","onPublishSubmit","PublishTitleInput","e","_PublishUrlMiddleDisplay","_PublishUrlMiddleDisplay2","PublishUrlInput","setClaimName","validateClaim","cleanseInput","fileNameWithoutEnding","cleanClaimName","dataURItoBlob","dataURI","byteString","atob","mimeString","ia","Uint8Array","charCodeAt","Blob","PublishThumbnailInput","videoSource","sliderMinRange","sliderMaxRange","sliderValue","handleVideoLoadedData","handleSliderChange","createThumbnail","setVideoSource","dataUri","blob","URL","createObjectURL","duration","totalMinutes","Math","floor","totalSeconds","currentTime","video","canvas","width","videoWidth","videoHeight","getContext","drawImage","dataUrl","toDataURL","snapshot","_state","preload","muted","display","playsInline","onLoadedData","onSeeked","_ExpandingTextArea","_ExpandingTextArea2","PublishMetadataInputs","toggleShowInputs","handleSelect","rows","maxLength","maxHeight","PublishDisabledMessage","_publish_claim_states","publishStates","PublishStatus","LOAD_START","LOADING","PUBLISHING","SUCCESS","FAILED","_PublishDetails","_PublishDetails2","_PublishStatus","_PublishStatus2","_PublishDisabledMessage","_PublishDisabledMessage2","PublishTool","MysqlConfig","SlackConfig","slackWebHook","slackErrorChannel","slackInfoChannel","returnShortId","claimsArray","claimIndex","shortIdLength","findIndex","element","possibleMatches","slice","fs","parsePublishApiRequestBody","parsePublishApiRequestFiles","path","validateFileTypeAndSize","fileType","thumbnailFileName","thumbnailFilePath","thumbnailFileType","createBasicPublishParams","trim","file_path","bid","author","language","claim_address","createThumbnailPublishParams","deleteTemporaryFile","unlink","addGetResultsToFileData","fileInfo","getResult","file_name","download_path","createFileData","outpoint","address","handleErrorResponse","res","useObjectPropertiesIfNoKeys","_module$exports$retur","returnErrorMessageAndStatus","_module$exports$retur2","createErrorResponsePayload","code","newErrorObject","getOwnPropertyNames","returnPaginatedChannelClaims","getClaimId","getClaimIdByChannel","getClaimIdByClaim","getLongClaimId","longClaimId","getLongChannelId","longChannelId","getClaimIdByLongChannelId","getChannelData","longChannelClaimId","getShortChannelIdFromLongChannelId","_ref4","shortChannelClaimId","getChannelClaims","getAllChannelClaims","_ref5","_ref6","channelClaimsArray","paginatedChannelViewData","getLocalFileRecord","dataValues","_server","_redux","_reducers","_reducers2","_GAListener","_GAListener2","_app","_app2","_renderFullPage","_renderFullPage2","req","context","store","createStore","html","renderToString","Provider","StaticRouter","helmet","renderStatic","redirect","preloadedState","getState","send","_publish2","_channel2","_site","_site2","combineReducers","LOCAL_CHECK","UNAVAILABLE","ERROR","AVAILABLE","_dynamicImport","_AboutPage","_AboutPage2","_LoginPage","_LoginPage2","_ShowPage","_ShowPage2","_FourOhFourPage","_FourOhFourPage2","App","Switch","Route","component","webpackContext","webpackContextResolve","./canonicalLink","./canonicalLink.js","./dynamicImport","./dynamicImport.js","./file","./file.js","./lbryUri","./lbryUri.js","./metaTags","./metaTags.js","./pageTitle","./pageTitle.js","./publish","./publish.js","./request","./request.js","./validate","./validate.js","createPublishMetadata","createPublishFormData","fd","FormData","append","createThumbnailUrl","validateChannelSelection","validatePublishParams","toString","selectSiteState","selectSiteHost","Server","Components","Containers","Pages","configureMysql","mysqlConfig","configureSite","siteConfig","PORT","configureSlack","slackConfig","createApp","app","express","enable","use","static","bodyParser","urlencoded","extended","verbose","passport","serializeUser","serializeSpeechUser","deserializeUser","deserializeSpeechUser","localSignupStrategy","localLoginStrategy","cookieSession","maxAge","session","hbs","expressHandlebars","defaultLayout","handlebars","Handlebars","engine","server","http","start","sync","user","PassportLocalStrategy","Strategy","lbryApi","usernameField","passwordField","userInfo","tx","userData","userName","channelData","claim_id","certificateData","newUser","newChannel","newCertificate","setChannel","setUser","lbryConfig","STRING","BOOLEAN","INTEGER","TEXT","DECIMAL","define","claimSequence","decodedClaim","depth","effectiveAmount","hasSignature","hex","nout","txid","validAtHeight","valueVersion","claimType","certificateVersion","keyType","publicKey","freezeTableName","belongsTo","foreignKey","allowNull","findAll","order","getLongChannelIdFromShortChannelId","$like","getLongChannelIdFromChannelName","validateLongChannelId","_this4","hasOne","determineFileExtensionFromContentType","determineThumbnail","storedThumbnail","prepareClaimData","licenseUrl","preview","metadataVersion","sourceType","sourceVersion","streamVersion","getShortClaimIdFromLongClaimId","raw","getLongClaimIdFromShortClaimId","getTopFreeClaimIdByClaimName","_this5","validateLongClaimId","_this6","resolveClaim","_this7","claimArray","defaultValue","trendingEligible","hasMany","getRecentClaims","limit","action","ipAddress","bcrypt","comparePassword","compare","changePassword","newPassword","genSalt","saltError","salt","hash","hashError","hook","returnUserAndChannelInfo","userInstance","getChannel","isMatch","logIn","logout","multipart","multipartMiddleware","uploadDir","claimNameIsAvailable","checkChannelAvailability","_require3","_require4","errorHandlers","_require5","_require6","authenticateUser","_require7","availableName","claimsList","resolveResult","fileData","_ref7","_ref8","_ref9","_ref10","_ref10$","completed","_ref11","_ref12","resolvedUri","_ref13","_parsePublishApiReque","_parsePublishApiReque2","_ref14","_ref15","_ref15$","thumbnailPublishParams","lbryTx","_ref16","_ref17","_ref18","claimInfo","_ref19","publishHelpers","_require$publishing","Op","publishResults","fileRecord","claimRecord","upsertCriteria","setClaim","setFile","claimAddresses","attributes","or","authenticateChannelCredentials","userPassword","channelFindParams","determineTotalPages","paginationPage","getPageFromQuery","extractPageFromClaims","determinePreviousPage","determineNextPage","totalResults","determineTotalClaims","pageNumber","claimStartIndex","claimEndIndex","totalClaims","fullPages","handlePageRender","render","layout","initialState","publishSubmit","googleAnalyticsId","_siteConfig$assetDefa","_siteConfig$details","determineResponseType","flipClaimNameAndIdForBackwardsCompatibility","logRequestData","getClaimIdAndServeAsset","lbryUri","handleShowRender","hasFileExtension","parseModifier","responseType","_lbryUri$parseIdentif","_flipClaimNameAndIdFo","_flipClaimNameAndIdFo2","clientAcceptsHtml","requestIsFromBrowser","clientWantsAsset","range","imageIsWanted","videoIsWanted","isValidClaimId","isValidShortId","isValidShortIdOrClaimId","serveAssetToClient","NO_FILE","sendFileOptions","X-Content-Type-Options","sendFile","fullClaimId","tempName","proto","_componentsRegex$exec5","_componentsRegex$exec6","_index","_index2","_index3","_index4","_reduxSaga","_reduxSaga2","_effects","_show_uri","returnSagaWithParams","saga","regeneratorRuntime","mark","_callee","wrap","_context","prev","stop","sagaMiddleware","middleware","applyMiddleware","run","parseAndUpdateIdentifierAndClaim","_lbryUri$parseClaim","_lbryUri2","t0","put","abrupt","sent","_show_asset","newAssetRequest","_marked","parseAndUpdateClaimOnly","_lbryUri$parseIdentif2","_lbryUri$parseClaim2","_context2","_show_channel","newChannelRequest","t1","_marked2","handleShowPageUri","_action$data","_context3","_marked3","watchHandleShowPageUri","_context4","takeLatest","_marked4","_lbryUri","_assetApi","getShortId","getClaimData","t2","watchNewAssetRequest","_ref$data","_channelApi","watchNewChannelRequest","getNewClaimsAndUpdateChannel","_action$data2","watchUpdateChannelClaims","logLevel","winston","transports","Console","level","timestamp","colorize","prettyPrint","handleExceptions","humanReadableUnhandledException","warn","silly","loggerConfig","winstonSlackWebHook","SlackWebHook","add","webhookUrl","iconEmoji","./","./ActiveStatusBar","./ActiveStatusBar/","./ActiveStatusBar/index","./ActiveStatusBar/index.jsx","./AssetPreview","./AssetPreview/","./AssetPreview/index","./AssetPreview/index.js","./AssetPreview/view","./AssetPreview/view.jsx","./ExpandingTextArea","./ExpandingTextArea/","./ExpandingTextArea/index","./ExpandingTextArea/index.jsx","./GAListener","./GAListener/","./GAListener/index","./GAListener/index.jsx","./InactiveStatusBar","./InactiveStatusBar/","./InactiveStatusBar/index","./InactiveStatusBar/index.jsx","./Logo","./Logo/","./Logo/index","./Logo/index.jsx","./NavBarChannelOptionsDropdown","./NavBarChannelOptionsDropdown/","./NavBarChannelOptionsDropdown/index","./NavBarChannelOptionsDropdown/index.jsx","./ProgressBar","./ProgressBar/","./ProgressBar/index","./ProgressBar/index.jsx","./PublishPreview","./PublishPreview/","./PublishPreview/index","./PublishPreview/index.jsx","./PublishUrlMiddleDisplay","./PublishUrlMiddleDisplay/","./PublishUrlMiddleDisplay/index","./PublishUrlMiddleDisplay/index.jsx","./SEO","./SEO/","./SEO/index","./SEO/index.js","./SEO/view","./SEO/view.jsx","./index","./index.js","./AssetDisplay","./AssetDisplay/","./AssetDisplay/index","./AssetDisplay/index.js","./AssetDisplay/view","./AssetDisplay/view.jsx","./AssetInfo","./AssetInfo/","./AssetInfo/index","./AssetInfo/index.js","./AssetInfo/view","./AssetInfo/view.jsx","./AssetTitle","./AssetTitle/","./AssetTitle/index","./AssetTitle/index.js","./AssetTitle/view","./AssetTitle/view.jsx","./ChannelClaimsDisplay","./ChannelClaimsDisplay/","./ChannelClaimsDisplay/index","./ChannelClaimsDisplay/index.js","./ChannelClaimsDisplay/view","./ChannelClaimsDisplay/view.jsx","./ChannelCreateForm","./ChannelCreateForm/","./ChannelCreateForm/index","./ChannelCreateForm/index.js","./ChannelCreateForm/view","./ChannelCreateForm/view.jsx","./ChannelLoginForm","./ChannelLoginForm/","./ChannelLoginForm/index","./ChannelLoginForm/index.js","./ChannelLoginForm/view","./ChannelLoginForm/view.jsx","./ChannelSelect","./ChannelSelect/","./ChannelSelect/index","./ChannelSelect/index.js","./ChannelSelect/view","./ChannelSelect/view.jsx","./Dropzone","./Dropzone/","./Dropzone/index","./Dropzone/index.js","./Dropzone/view","./Dropzone/view.jsx","./FourOhFourPage","./FourOhFourPage/","./FourOhFourPage/index","./FourOhFourPage/index.jsx","./FourOhFourPage/view","./FourOhFourPage/view.jsx","./NavBar","./NavBar/","./NavBar/index","./NavBar/index.js","./NavBar/view","./NavBar/view.jsx","./PublishDetails","./PublishDetails/","./PublishDetails/index","./PublishDetails/index.js","./PublishDetails/view","./PublishDetails/view.jsx","./PublishDisabledMessage","./PublishDisabledMessage/","./PublishDisabledMessage/index","./PublishDisabledMessage/index.js","./PublishDisabledMessage/view","./PublishDisabledMessage/view.jsx","./PublishMetadataInputs","./PublishMetadataInputs/","./PublishMetadataInputs/index","./PublishMetadataInputs/index.js","./PublishMetadataInputs/view","./PublishMetadataInputs/view.jsx","./PublishStatus","./PublishStatus/","./PublishStatus/index","./PublishStatus/index.js","./PublishStatus/view","./PublishStatus/view.jsx","./PublishThumbnailInput","./PublishThumbnailInput/","./PublishThumbnailInput/index","./PublishThumbnailInput/index.js","./PublishThumbnailInput/view","./PublishThumbnailInput/view.jsx","./PublishTitleInput","./PublishTitleInput/","./PublishTitleInput/index","./PublishTitleInput/index.js","./PublishTitleInput/view","./PublishTitleInput/view.jsx","./PublishTool","./PublishTool/","./PublishTool/index","./PublishTool/index.js","./PublishTool/view","./PublishTool/view.jsx","./PublishUrlInput","./PublishUrlInput/","./PublishUrlInput/index","./PublishUrlInput/index.js","./PublishUrlInput/view","./PublishUrlInput/view.jsx","./ShowAssetDetails","./ShowAssetDetails/","./ShowAssetDetails/index","./ShowAssetDetails/index.js","./ShowAssetDetails/view","./ShowAssetDetails/view.jsx","./ShowAssetLite","./ShowAssetLite/","./ShowAssetLite/index","./ShowAssetLite/index.js","./ShowAssetLite/view","./ShowAssetLite/view.jsx","./ShowChannel","./ShowChannel/","./ShowChannel/index","./ShowChannel/index.js","./ShowChannel/view","./ShowChannel/view.jsx","./AboutPage","./AboutPage/","./AboutPage/index","./AboutPage/index.jsx","./ErrorPage","./ErrorPage/","./ErrorPage/index","./ErrorPage/index.jsx","./HomePage","./HomePage/","./HomePage/index","./HomePage/index.jsx","./LoginPage","./LoginPage/","./LoginPage/index","./LoginPage/index.js","./LoginPage/view","./LoginPage/view.jsx","./ShowPage","./ShowPage/","./ShowPage/index","./ShowPage/index.js","./ShowPage/view","./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AAAnnB,EAAA,GACA,SAAAvI,OAAA,uBAAA0vB,EAAA,KACA,OAAAnnB,GApCA,GAAAjB,IACAqgC,KAAA,GACAiL,cAAA,GACAC,eAAA,GACAC,oBAAA,GACAC,wBAAA,GACAC,cAAA,GACAC,eAAA,GACAC,oBAAA,GACAC,wBAAA,GACAC,aAAA,GACAC,cAAA,GACAC,mBAAA,GACAC,uBAAA,GACAC,cAAA,GACAC,eAAA,GACAC,oBAAA,GACAC,uBAAA,GACAC,mBAAA,GACAC,uBAAA,GACAC,aAAA,GACAC,cAAA,GACAC,mBAAA,GACAC,sBAAA,GACAC,kBAAA,GACAC,sBAAA,GACAvJ,UAAA,GACAC,aAAA,GAWA/Y,GAAAtuB,KAAA,WACA,MAAA1K,QAAA0K,KAAA8D,IAEAwqB,EAAAhgB,QAAAigB,EACAh6B,EAAAC,QAAA85B,EACAA,EAAAvpB,GAAA","file":"index.js","sourcesContent":["module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 115);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react\");\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-redux\");\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston\");\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction SiteConfig() {\n var _this = this;\n\n this.analytics = {\n googleId: 'default'\n };\n this.assetDefaults = {\n description: 'An asset published on Spee.ch',\n thumbnail: 'https://spee.ch/assets/img/video_thumb_default.png',\n title: 'Spee.ch'\n };\n this.auth = {\n sessionKey: 'default'\n };\n this.componentsConfig = {\n components: {},\n containers: {},\n pages: {}\n };\n this.details = {\n description: 'Open-source, decentralized image and video sharing.',\n host: 'default',\n port: 3000,\n title: 'Spee.ch',\n twitter: '@spee_ch'\n };\n this.publishing = {\n additionalClaimAddresses: [],\n disabled: false,\n disabledMessage: 'Please check back soon.',\n primaryClaimAddress: 'default',\n thumbnailChannel: 'default',\n thumbnailChannelId: 'default',\n uploadDirectory: '/home/lbry/Uploads'\n };\n this.configure = function (config) {\n if (!config) {\n return console.log('No site config received.');\n }\n var analytics = config.analytics,\n assetDefaults = config.assetDefaults,\n auth = config.auth,\n componentsConfig = config.componentsConfig,\n details = config.details,\n publishing = config.publishing;\n\n _this.analytics = analytics;\n _this.assetDefaults = assetDefaults;\n _this.auth = auth;\n _this.details = details;\n _this.publishing = publishing;\n _this.componentsConfig = componentsConfig;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-router-dom\");\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _channel = __webpack_require__(64);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(65);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel,\n site = _ref.site;\n\n return {\n channelName: channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId: channel.loggedInChannel.longId,\n siteDescription: site.description\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n },\n onChannelLogout: function onChannelLogout() {\n dispatch((0, _channel.updateLoggedInChannel)(null, null, null));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.selectFile = selectFile;\nexports.clearFile = clearFile;\nexports.updateMetadata = updateMetadata;\nexports.updateClaim = updateClaim;\nexports.setPublishInChannel = setPublishInChannel;\nexports.updatePublishStatus = updatePublishStatus;\nexports.updateError = updateError;\nexports.updateSelectedChannel = updateSelectedChannel;\nexports.toggleMetadataInputs = toggleMetadataInputs;\nexports.onNewThumbnail = onNewThumbnail;\nexports.startPublish = startPublish;\n\nvar _publish_action_types = __webpack_require__(104);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nfunction _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; } }\n\n// export action creators\nfunction selectFile(file) {\n return {\n type: actions.FILE_SELECTED,\n data: file\n };\n};\n\nfunction clearFile() {\n return {\n type: actions.FILE_CLEAR\n };\n};\n\nfunction updateMetadata(name, value) {\n return {\n type: actions.METADATA_UPDATE,\n data: {\n name: name,\n value: value\n }\n };\n};\n\nfunction updateClaim(value) {\n return {\n type: actions.CLAIM_UPDATE,\n data: value\n };\n};\n\nfunction setPublishInChannel(channel) {\n return {\n type: actions.SET_PUBLISH_IN_CHANNEL,\n channel: channel\n };\n};\n\nfunction updatePublishStatus(status, message) {\n return {\n type: actions.PUBLISH_STATUS_UPDATE,\n data: {\n status: status,\n message: message\n }\n };\n};\n\nfunction updateError(name, value) {\n return {\n type: actions.ERROR_UPDATE,\n data: {\n name: name,\n value: value\n }\n };\n};\n\nfunction updateSelectedChannel(channelName) {\n return {\n type: actions.SELECTED_CHANNEL_UPDATE,\n data: channelName\n };\n};\n\nfunction toggleMetadataInputs(showMetadataInputs) {\n return {\n type: actions.TOGGLE_METADATA_INPUTS,\n data: showMetadataInputs\n };\n};\n\nfunction onNewThumbnail(file) {\n return {\n type: actions.THUMBNAIL_NEW,\n data: file\n };\n};\n\nfunction startPublish(history) {\n return {\n type: actions.PUBLISH_START,\n data: { history: history }\n };\n}\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(66);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var site = _ref.site;\n var defaultDescription = site.defaultDescription,\n defaultThumbnail = site.defaultThumbnail,\n siteDescription = site.description,\n siteHost = site.host,\n siteTitle = site.title,\n siteTwitter = site.twitter;\n\n return {\n defaultDescription: defaultDescription,\n defaultThumbnail: defaultThumbnail,\n siteDescription: siteDescription,\n siteHost: siteHost,\n siteTitle: siteTitle,\n siteTwitter: siteTwitter\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.default = request;\n\n__webpack_require__(152);\n\n/**\n * Parses the JSON returned by a network request\n *\n * @param {object} response A response from a network request\n *\n * @return {object} The parsed JSON from the request\n */\nfunction parseJSON(response) {\n if (response.status === 204 || response.status === 205) {\n return null;\n }\n return response.json();\n}\n\n/**\n * Parses the status returned by a network request\n *\n * @param {object} response A response from a network request\n * @param {object} response The parsed JSON from the network request\n *\n * @return {object | undefined} Returns object with status and statusText, or undefined\n */\nfunction checkStatus(response, jsonResponse) {\n if (response.status >= 200 && response.status < 300) {\n return jsonResponse;\n }\n var error = new Error(jsonResponse.message);\n error.response = response;\n throw error;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @param {string} url The URL we want to request\n * @param {object} [options] The options we want to pass to \"fetch\"\n *\n * @return {object} The response data\n */\n\nfunction request(url, options) {\n return fetch(url, options).then(function (response) {\n return Promise.all([response, parseJSON(response)]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n response = _ref2[0],\n jsonResponse = _ref2[1];\n\n return checkStatus(response, jsonResponse);\n });\n}\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Sequelize = __webpack_require__(95);\nvar logger = __webpack_require__(2);\n\nconsole.log('exporting sequelize models');\n\nvar _require = __webpack_require__(92),\n database = _require.database,\n username = _require.username,\n password = _require.password;\n\nvar db = {};\n// set sequelize options\nvar sequelize = new Sequelize(database, username, password, {\n host: 'localhost',\n dialect: 'mysql',\n dialectOptions: { decimalNumbers: true }, // fix to ensure DECIMAL will not be stored as a string\n logging: false,\n pool: {\n max: 5,\n min: 0,\n idle: 10000,\n acquire: 10000\n }\n});\n\n// establish mysql connection\nsequelize.authenticate().then(function () {\n logger.info('Sequelize has established mysql connection successfully.');\n}).catch(function (err) {\n logger.error('Sequelize was unable to connect to the database:', err);\n});\n\n// manually add each model to the db object\nvar Certificate = __webpack_require__(132);\nvar Channel = __webpack_require__(133);\nvar Claim = __webpack_require__(134);\nvar File = __webpack_require__(135);\nvar Request = __webpack_require__(136);\nvar User = __webpack_require__(137);\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(function (modelName) {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = function (Model, values, condition, tableName) {\n return Model.findOne({\n where: condition\n }).then(function (obj) {\n if (obj) {\n // update\n logger.debug('updating record in db.' + tableName);\n return obj.update(values);\n } else {\n // insert\n logger.debug('creating record in db.' + tableName);\n return Model.create(values);\n }\n }).catch(function (error) {\n logger.error(tableName + '.upsert error', error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(14);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _ActiveStatusBar = __webpack_require__(24);\n\nvar _ActiveStatusBar2 = _interopRequireDefault(_ActiveStatusBar);\n\nvar _InactiveStatusBar = __webpack_require__(25);\n\nvar _InactiveStatusBar2 = _interopRequireDefault(_InactiveStatusBar);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ProgressBar = function (_React$Component) {\n _inherits(ProgressBar, _React$Component);\n\n function ProgressBar(props) {\n _classCallCheck(this, ProgressBar);\n\n var _this = _possibleConstructorReturn(this, (ProgressBar.__proto__ || Object.getPrototypeOf(ProgressBar)).call(this, props));\n\n _this.state = {\n bars: [],\n index: 0,\n incrementer: 1\n };\n _this.createBars = _this.createBars.bind(_this);\n _this.startProgressBar = _this.startProgressBar.bind(_this);\n _this.updateProgressBar = _this.updateProgressBar.bind(_this);\n _this.stopProgressBar = _this.stopProgressBar.bind(_this);\n return _this;\n }\n\n _createClass(ProgressBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.createBars();\n this.startProgressBar();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.stopProgressBar();\n }\n }, {\n key: 'createBars',\n value: function createBars() {\n var bars = [];\n for (var i = 0; i <= this.props.size; i++) {\n bars.push({ isActive: false });\n }\n this.setState({ bars: bars });\n }\n }, {\n key: 'startProgressBar',\n value: function startProgressBar() {\n this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);\n }\n }, {\n key: 'updateProgressBar',\n value: function updateProgressBar() {\n var index = this.state.index;\n var incrementer = this.state.incrementer;\n var bars = this.state.bars;\n // flip incrementer if necessary, to stay in bounds\n if (index < 0 || index > this.props.size) {\n incrementer = incrementer * -1;\n index += incrementer;\n }\n // update the indexed bar\n if (incrementer > 0) {\n bars[index].isActive = true;\n } else {\n bars[index].isActive = false;\n };\n // increment index\n index += incrementer;\n // update state\n this.setState({\n bars: bars,\n incrementer: incrementer,\n index: index\n });\n }\n }, {\n key: 'stopProgressBar',\n value: function stopProgressBar() {\n clearInterval(this.updateInterval);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n this.state.bars.map(function (bar, index) {\n return bar.isActive ? _react2.default.createElement(_ActiveStatusBar2.default, { key: index }) : _react2.default.createElement(_InactiveStatusBar2.default, { key: index });\n })\n );\n }\n }]);\n\n return ProgressBar;\n}(_react2.default.Component);\n\n;\n\nProgressBar.propTypes = {\n size: _propTypes2.default.number.isRequired\n};\n\nexports.default = ProgressBar;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.onHandleShowPageUri = onHandleShowPageUri;\nexports.onRequestError = onRequestError;\nexports.onNewChannelRequest = onNewChannelRequest;\nexports.onNewAssetRequest = onNewAssetRequest;\nexports.onRequestUpdate = onRequestUpdate;\nexports.addRequestToRequestList = addRequestToRequestList;\nexports.addAssetToAssetList = addAssetToAssetList;\nexports.addNewChannelToChannelList = addNewChannelToChannelList;\nexports.onUpdateChannelClaims = onUpdateChannelClaims;\nexports.updateChannelClaims = updateChannelClaims;\nexports.fileRequested = fileRequested;\nexports.updateFileAvailability = updateFileAvailability;\nexports.updateDisplayAssetError = updateDisplayAssetError;\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show_request_types = __webpack_require__(112);\n\nfunction _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; } }\n\n// basic request parsing\nfunction onHandleShowPageUri(params) {\n return {\n type: actions.HANDLE_SHOW_URI,\n data: params\n };\n};\n\nfunction onRequestError(error) {\n return {\n type: actions.REQUEST_ERROR,\n data: error\n };\n};\n\nfunction onNewChannelRequest(channelName, channelId) {\n var requestType = _show_request_types.CHANNEL;\n var requestId = 'cr#' + channelName + '#' + channelId;\n return {\n type: actions.CHANNEL_REQUEST_NEW,\n data: { requestType: requestType, requestId: requestId, channelName: channelName, channelId: channelId }\n };\n};\n\nfunction onNewAssetRequest(name, id, channelName, channelId, extension) {\n var requestType = extension ? _show_request_types.ASSET_LITE : _show_request_types.ASSET_DETAILS;\n var requestId = 'ar#' + name + '#' + id + '#' + channelName + '#' + channelId;\n return {\n type: actions.ASSET_REQUEST_NEW,\n data: {\n requestType: requestType,\n requestId: requestId,\n name: name,\n modifier: {\n id: id,\n channel: {\n name: channelName,\n id: channelId\n }\n }\n }\n };\n};\n\nfunction onRequestUpdate(requestType, requestId) {\n return {\n type: actions.REQUEST_UPDATE,\n data: {\n requestType: requestType,\n requestId: requestId\n }\n };\n};\n\nfunction addRequestToRequestList(id, error, key) {\n return {\n type: actions.REQUEST_LIST_ADD,\n data: { id: id, error: error, key: key }\n };\n};\n\n// asset actions\n\nfunction addAssetToAssetList(id, error, name, claimId, shortId, claimData) {\n return {\n type: actions.ASSET_ADD,\n data: { id: id, error: error, name: name, claimId: claimId, shortId: shortId, claimData: claimData }\n };\n}\n\n// channel actions\n\nfunction addNewChannelToChannelList(id, name, shortId, longId, claimsData) {\n return {\n type: actions.CHANNEL_ADD,\n data: { id: id, name: name, shortId: shortId, longId: longId, claimsData: claimsData }\n };\n};\n\nfunction onUpdateChannelClaims(channelKey, name, longId, page) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,\n data: { channelKey: channelKey, name: name, longId: longId, page: page }\n };\n};\n\nfunction updateChannelClaims(channelListId, claimsData) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,\n data: { channelListId: channelListId, claimsData: claimsData }\n };\n};\n\n// display a file\n\nfunction fileRequested(name, claimId) {\n return {\n type: actions.FILE_REQUESTED,\n data: { name: name, claimId: claimId }\n };\n};\n\nfunction updateFileAvailability(status) {\n return {\n type: actions.FILE_AVAILABILITY_UPDATE,\n data: status\n };\n};\n\nfunction updateDisplayAssetError(error) {\n return {\n type: actions.DISPLAY_ASSET_ERROR,\n data: error\n };\n};\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(14);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ErrorPage = function (_React$Component) {\n _inherits(ErrorPage, _React$Component);\n\n function ErrorPage() {\n _classCallCheck(this, ErrorPage);\n\n return _possibleConstructorReturn(this, (ErrorPage.__proto__ || Object.getPrototypeOf(ErrorPage)).apply(this, arguments));\n }\n\n _createClass(ErrorPage, [{\n key: 'render',\n value: function render() {\n var error = this.props.error;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'p',\n null,\n error\n )\n )\n );\n }\n }]);\n\n return ErrorPage;\n}(_react2.default.Component);\n\n;\n\nErrorPage.propTypes = {\n error: _propTypes2.default.string.isRequired\n};\n\nexports.default = ErrorPage;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactGa = __webpack_require__(151);\n\nvar _reactGa2 = _interopRequireDefault(_reactGa);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _require = __webpack_require__(3),\n googleId = _require.analytics.googleId;\n\n_reactGa2.default.initialize(googleId);\n\nvar GAListener = function (_React$Component) {\n _inherits(GAListener, _React$Component);\n\n function GAListener() {\n _classCallCheck(this, GAListener);\n\n return _possibleConstructorReturn(this, (GAListener.__proto__ || Object.getPrototypeOf(GAListener)).apply(this, arguments));\n }\n\n _createClass(GAListener, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n }, {\n key: 'sendPageView',\n value: function sendPageView(location) {\n _reactGa2.default.set({ page: location.pathname });\n _reactGa2.default.pageview(location.pathname);\n }\n }, {\n key: 'render',\n value: function render() {\n return this.props.children;\n }\n }]);\n\n return GAListener;\n}(_react2.default.Component);\n\nexports.default = (0, _reactRouterDom.withRouter)(GAListener);\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"prop-types\");\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _channel = __webpack_require__(64);\n\nvar _view = __webpack_require__(68);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(6);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _channel = __webpack_require__(64);\n\nvar _view = __webpack_require__(69);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(6);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(72);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(11);\n\nvar _show2 = __webpack_require__(28);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select error and status\n var error = show.displayAsset.error;\n var status = show.displayAsset.status;\n // select asset\n var asset = (0, _show2.selectAsset)(show);\n // return props\n return {\n error: error,\n status: status,\n asset: asset\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onFileRequest: function onFileRequest(name, claimId) {\n dispatch((0, _show.fileRequested)(name, claimId));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(82);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n file: publish.file,\n thumbnail: publish.thumbnail,\n fileError: publish.error.file\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n selectFile: function selectFile(file) {\n dispatch((0, _publish.selectFile)(file));\n },\n setFileError: function setFileError(value) {\n dispatch((0, _publish.clearFile)());\n dispatch((0, _publish.updateError)('file', value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n// request actions\nvar HANDLE_SHOW_URI = exports.HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nvar REQUEST_ERROR = exports.REQUEST_ERROR = 'REQUEST_ERROR';\nvar REQUEST_UPDATE = exports.REQUEST_UPDATE = 'REQUEST_UPDATE';\nvar ASSET_REQUEST_NEW = exports.ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nvar CHANNEL_REQUEST_NEW = exports.CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nvar REQUEST_LIST_ADD = exports.REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nvar ASSET_ADD = exports.ASSET_ADD = 'ASSET_ADD';\n\n// channel actions\nvar CHANNEL_ADD = exports.CHANNEL_ADD = 'CHANNEL_ADD';\n\nvar CHANNEL_CLAIMS_UPDATE_ASYNC = exports.CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nvar CHANNEL_CLAIMS_UPDATE_SUCCESS = exports.CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nvar FILE_REQUESTED = exports.FILE_REQUESTED = 'FILE_REQUESTED';\nvar FILE_AVAILABILITY_UPDATE = exports.FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nvar DISPLAY_ASSET_ERROR = exports.DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _SEO = __webpack_require__(7);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AboutPage = function (_React$Component) {\n _inherits(AboutPage, _React$Component);\n\n function AboutPage() {\n _classCallCheck(this, AboutPage);\n\n return _possibleConstructorReturn(this, (AboutPage.__proto__ || Object.getPrototypeOf(AboutPage)).apply(this, arguments));\n }\n\n _createClass(AboutPage, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'About', pageUri: 'about' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n { className: 'pull-quote' },\n 'Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/spee_ch' },\n 'TWITTER'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch' },\n 'GITHUB'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://discord.gg/YjYbwhS' },\n 'DISCORD CHANNEL'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch/blob/master/README.md' },\n 'DOCUMENTATION'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a media-hosting site that reads from and publishes content to the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io' },\n 'LBRY'\n ),\n ' blockchain.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io/get' },\n 'LBRY'\n ),\n ' network. This means that your images are stored in multiple locations without a single point of failure.'\n ),\n _react2.default.createElement(\n 'h3',\n null,\n 'Contribute'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you have an idea for your own spee.ch-like site on top of LBRY, fork our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch' },\n 'github repo'\n ),\n ' and go to town!'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you want to improve spee.ch, join our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS' },\n 'discord channel'\n ),\n ' or solve one of our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch/issues' },\n 'github issues'\n ),\n '.'\n )\n )\n )\n )\n );\n }\n }]);\n\n return AboutPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = AboutPage;\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Logo() {\n return _react2.default.createElement(\n 'svg',\n { version: '1.1', id: 'Layer_1', x: '0px', y: '0px', height: '24px', viewBox: '0 0 80 31', enableBackground: 'new 0 0 80 31', className: 'nav-bar-logo' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: '/' },\n _react2.default.createElement(\n 'title',\n null,\n 'Logo'\n ),\n _react2.default.createElement(\n 'desc',\n null,\n 'Spee.ch logo'\n ),\n _react2.default.createElement(\n 'g',\n { id: 'About' },\n _react2.default.createElement(\n 'g',\n { id: 'Publish-Form-V2-_x28_filled_x29_', transform: 'translate(-42.000000, -23.000000)' },\n _react2.default.createElement(\n 'g',\n { id: 'Group-17', transform: 'translate(42.000000, 22.000000)' },\n _react2.default.createElement(\n 'text',\n { transform: 'matrix(1 0 0 1 0 20)', fontSize: '25', fontFamily: 'Roboto' },\n 'Spee= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ExpandingTextarea = function (_Component) {\n _inherits(ExpandingTextarea, _Component);\n\n function ExpandingTextarea(props) {\n _classCallCheck(this, ExpandingTextarea);\n\n var _this = _possibleConstructorReturn(this, (ExpandingTextarea.__proto__ || Object.getPrototypeOf(ExpandingTextarea)).call(this, props));\n\n _this._handleChange = _this._handleChange.bind(_this);\n return _this;\n }\n\n _createClass(ExpandingTextarea, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.adjustTextarea({});\n }\n }, {\n key: '_handleChange',\n value: function _handleChange(event) {\n var onChange = this.props.onChange;\n\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n }, {\n key: 'adjustTextarea',\n value: function adjustTextarea(_ref) {\n var _ref$target = _ref.target,\n target = _ref$target === undefined ? this.el : _ref$target;\n\n target.style.height = 0;\n target.style.height = target.scrollHeight + 'px';\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var rest = _objectWithoutProperties(this.props, []);\n\n return _react2.default.createElement('textarea', _extends({}, rest, {\n ref: function ref(x) {\n return _this2.el = x;\n },\n onChange: this._handleChange\n }));\n }\n }]);\n\n return ExpandingTextarea;\n}(_react.Component);\n\nExpandingTextarea.propTypes = {\n onChange: _propTypes2.default.func\n};\n\nexports.default = ExpandingTextarea;\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(14);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishPreview = function (_React$Component) {\n _inherits(PublishPreview, _React$Component);\n\n function PublishPreview(props) {\n _classCallCheck(this, PublishPreview);\n\n var _this = _possibleConstructorReturn(this, (PublishPreview.__proto__ || Object.getPrototypeOf(PublishPreview)).call(this, props));\n\n _this.state = {\n imgSource: '',\n defaultThumbnail: '/assets/img/video_thumb_default.png'\n };\n return _this;\n }\n\n _createClass(PublishPreview, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.setPreviewImageSource(this.props.file);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({ imgSource: this.state.defaultThumbnail });\n }\n }\n }\n }, {\n key: 'setPreviewImageSourceFromFile',\n value: function setPreviewImageSourceFromFile(file) {\n var _this2 = this;\n\n var previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = function () {\n _this2.setState({ imgSource: previewReader.result });\n };\n }\n }, {\n key: 'setPreviewImageSource',\n value: function setPreviewImageSource(file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({ imgSource: this.state.defaultThumbnail });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement('img', {\n id: 'dropzone-preview',\n src: this.state.imgSource,\n className: this.props.dimPreview ? 'dim' : '',\n alt: 'publish preview'\n });\n }\n }]);\n\n return PublishPreview;\n}(_react2.default.Component);\n\n;\n\nPublishPreview.propTypes = {\n dimPreview: _propTypes2.default.bool.isRequired,\n file: _propTypes2.default.object.isRequired,\n thumbnail: _propTypes2.default.object\n};\n\nexports.default = PublishPreview;\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(14);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction UrlMiddle(_ref) {\n var publishInChannel = _ref.publishInChannel,\n selectedChannel = _ref.selectedChannel,\n loggedInChannelName = _ref.loggedInChannelName,\n loggedInChannelShortId = _ref.loggedInChannelShortId;\n\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return _react2.default.createElement(\n 'span',\n { id: 'url-channel', className: 'url-text--secondary' },\n loggedInChannelName,\n ':',\n loggedInChannelShortId,\n ' /'\n );\n }\n return _react2.default.createElement(\n 'span',\n { id: 'url-channel-placeholder', className: 'url-text--secondary tooltip' },\n '@channel',\n _react2.default.createElement(\n 'span',\n {\n className: 'tooltip-text' },\n 'Select a channel below'\n ),\n ' /'\n );\n }\n return _react2.default.createElement(\n 'span',\n { id: 'url-no-channel-placeholder', className: 'url-text--secondary tooltip' },\n 'xyz',\n _react2.default.createElement(\n 'span',\n { className: 'tooltip-text' },\n 'This will be a random id'\n ),\n ' /'\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel: _propTypes2.default.bool.isRequired,\n loggedInChannelName: _propTypes2.default.string,\n loggedInChannelShortId: _propTypes2.default.string\n};\n\nexports.default = UrlMiddle;\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(81);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel,\n publish = _ref.publish;\n\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n publishInChannel: publish.publishInChannel,\n selectedChannel: publish.selectedChannel,\n channelError: publish.error.channel\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onPublishInChannelChange: function onPublishInChannelChange(value) {\n dispatch((0, _publish.updateError)('channel', null));\n dispatch((0, _publish.setPublishInChannel)(value));\n },\n onChannelSelect: function onChannelSelect(value) {\n dispatch((0, _publish.updateError)('channel', null));\n dispatch((0, _publish.updateSelectedChannel)(value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(83);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel,\n publish = _ref.publish;\n\n return {\n file: publish.file\n };\n};\n\nvar mapDispatchToProps = {\n clearFile: _publish.clearFile,\n startPublish: _publish.startPublish\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(84);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n title: publish.metadata.title\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onMetadataChange: function onMetadataChange(name, value) {\n dispatch((0, _publish.updateMetadata)(name, value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _publish = __webpack_require__(6);\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(85);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel,\n publish = _ref.publish;\n\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n loggedInChannelShortId: channel.loggedInChannel.shortId,\n fileName: publish.file.name,\n publishInChannel: publish.publishInChannel,\n selectedChannel: publish.selectedChannel,\n claim: publish.claim,\n urlError: publish.error.url\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onClaimChange: function onClaimChange(value) {\n dispatch((0, _publish.updateClaim)(value));\n dispatch((0, _publish.updateError)('publishSubmit', null));\n },\n onUrlError: function onUrlError(value) {\n dispatch((0, _publish.updateError)('url', value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(86);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var file = _ref.publish.file;\n\n return {\n file: file\n };\n};\n\nvar mapDispatchToProps = {\n onNewThumbnail: _publish.onNewThumbnail\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(87);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n showMetadataInputs: publish.showMetadataInputs,\n description: publish.metadata.description,\n license: publish.metadata.license,\n nsfw: publish.metadata.nsfw\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onMetadataChange: function onMetadataChange(name, value) {\n dispatch((0, _publish.updateMetadata)(name, value));\n },\n onToggleMetadataInputs: function onToggleMetadataInputs(value) {\n dispatch((0, _publish.toggleMetadataInputs)(value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(88);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n message: publish.disabledMessage\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(89);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n status: publish.status.status,\n message: publish.status.message\n };\n};\n\nvar mapDispatchToProps = {\n clearFile: _publish.clearFile\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(90);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n disabled: publish.disabled,\n file: publish.file,\n status: publish.status.status\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-helmet\");\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga/effects\");\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Path = __webpack_require__(51);\n\nvar _require = __webpack_require__(80),\n getSubDirectoryNames = _require.getSubDirectoryNames;\n\nvar thisFolder = Path.resolve(__dirname, 'client/components/');\nvar modules = {};\n\ngetSubDirectoryNames(thisFolder).forEach(function (name) {\n modules[name] = __webpack_require__(168)(\"./\" + name).default;\n});\n\nmodule.exports = modules;\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"path\");\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Path = __webpack_require__(51);\n\nvar _require = __webpack_require__(80),\n getSubDirectoryNames = _require.getSubDirectoryNames;\n\nvar thisFolder = Path.resolve(__dirname, 'client/containers/');\n\nvar modules = {};\n\ngetSubDirectoryNames(thisFolder).forEach(function (name) {\n modules[name] = __webpack_require__(169)(\"./\" + name).default;\n});\n\nmodule.exports = modules;\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Path = __webpack_require__(51);\n\nvar _require = __webpack_require__(80),\n getSubDirectoryNames = _require.getSubDirectoryNames;\n\nvar thisFolder = Path.resolve(__dirname, 'client/pages/');\n\nvar modules = {};\n\ngetSubDirectoryNames(thisFolder).forEach(function (name) {\n modules[name] = __webpack_require__(171)(\"./\" + name).default;\n});\n\nmodule.exports = modules;\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(7);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _PublishTool = __webpack_require__(47);\n\nvar _PublishTool2 = _interopRequireDefault(_PublishTool);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar HomePage = function (_React$Component) {\n _inherits(HomePage, _React$Component);\n\n function HomePage() {\n _classCallCheck(this, HomePage);\n\n return _possibleConstructorReturn(this, (HomePage.__proto__ || Object.getPrototypeOf(HomePage)).apply(this, arguments));\n }\n\n _createClass(HomePage, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column' },\n _react2.default.createElement(_SEO2.default, null),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded flex-container--column' },\n _react2.default.createElement(_PublishTool2.default, null)\n )\n );\n }\n }]);\n\n return HomePage;\n}(_react2.default.Component);\n\n;\n\nexports.default = HomePage;\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar axios = __webpack_require__(129);\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(130),\n _require$api = _require.api,\n apiHost = _require$api.apiHost,\n apiPort = _require$api.apiPort;\n\nvar lbryApiUri = 'http://' + apiHost + ':' + apiPort;\n\nvar _require2 = __webpack_require__(56),\n chooseGaLbrynetPublishLabel = _require2.chooseGaLbrynetPublishLabel,\n sendGATimingEvent = _require2.sendGATimingEvent;\n\nvar handleLbrynetResponse = function handleLbrynetResponse(_ref, resolve, reject) {\n var data = _ref.data;\n\n logger.debug('lbry api data:', data);\n if (data.result) {\n // check for an error\n if (data.result.error) {\n logger.debug('Lbrynet api error:', data.result.error);\n reject(new Error(data.result.error));\n return;\n };\n resolve(data.result);\n return;\n }\n // fallback in case it just timed out\n reject(JSON.stringify(data));\n};\n\nmodule.exports = {\n publishClaim: function publishClaim(publishParams) {\n logger.debug('lbryApi >> Publishing claim to \"' + publishParams.name + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'publish',\n params: publishParams\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getClaim: function getClaim(uri) {\n logger.debug('lbryApi >> Getting Claim for \"' + uri + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'get',\n params: { uri: uri, timeout: 20 }\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getClaimList: function getClaimList(claimName) {\n logger.debug('lbryApi >> Getting claim_list for \"' + claimName + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'claim_list',\n params: { name: claimName }\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n resolveUri: function resolveUri(uri) {\n logger.debug('lbryApi >> Resolving URI for \"' + uri + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'resolve',\n params: { uri: uri }\n }).then(function (_ref2) {\n var data = _ref2.data;\n\n sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now());\n if (data.result[uri].error) {\n // check for errors\n reject(data.result[uri].error);\n } else {\n // if no errors, resolve\n resolve(data.result[uri]);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getDownloadDirectory: function getDownloadDirectory() {\n logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'settings_get'\n }).then(function (_ref3) {\n var data = _ref3.data;\n\n sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now());\n if (data.result) {\n resolve(data.result.download_directory);\n } else {\n return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.');\n }\n }).catch(function (error) {\n logger.error('Lbrynet Error:', error);\n resolve('/home/lbry/Downloads/');\n });\n });\n },\n createChannel: function createChannel(name) {\n logger.debug('lbryApi >> Creating channel for ' + name + '...');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'channel_new',\n params: {\n channel_name: name,\n amount: 0.1\n }\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\nvar ua = __webpack_require__(131);\n\nvar _require = __webpack_require__(3),\n googleId = _require.analytics.googleId,\n title = _require.details.title;\n\nfunction createServeEventParams(headers, ip, originalUrl) {\n return {\n eventCategory: 'client requests',\n eventAction: 'serve request',\n eventLabel: originalUrl,\n ipOverride: ip,\n userAgentOverride: headers['user-agent']\n };\n};\n\nfunction createPublishTimingEventParams(category, variable, label, startTime, endTime) {\n var duration = endTime - startTime;\n return {\n userTimingCategory: category,\n userTimingVariableName: variable,\n userTimingTime: duration,\n userTimingLabel: label\n };\n};\n\nfunction sendGoogleAnalyticsEvent(ip, params) {\n var visitorId = ip.replace(/\\./g, '-');\n var visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.event(params, function (err) {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n });\n};\n\nfunction sendGoogleAnalyticsTiming(visitorId, params) {\n var visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.timing(params, function (err) {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n logger.debug('Timing event successfully sent to google analytics');\n });\n};\n\nmodule.exports = {\n sendGAServeEvent: function sendGAServeEvent(headers, ip, originalUrl) {\n var params = createServeEventParams(headers, ip, originalUrl);\n sendGoogleAnalyticsEvent(ip, params);\n },\n sendGATimingEvent: function sendGATimingEvent(category, variable, label, startTime, endTime) {\n var params = createPublishTimingEventParams(category, variable, label, startTime, endTime);\n sendGoogleAnalyticsTiming(title, params);\n },\n chooseGaLbrynetPublishLabel: function chooseGaLbrynetPublishLabel(_ref) {\n var channelName = _ref.channel_name,\n channelId = _ref.channel_id;\n\n return channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM';\n }\n};\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux\");\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _require = __webpack_require__(3),\n componentsConfig = _require.componentsConfig;\n\nfunction getDeepestChildValue(parent, childrenKeys) {\n var childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array\n var child = parent[childKey];\n if (childrenKeys.length >= 1) {\n return getDeepestChildValue(child, childrenKeys);\n }\n return child;\n}\n\nvar dynamicImport = exports.dynamicImport = function dynamicImport(filePath) {\n // validate inputs\n if (!filePath) {\n throw new Error('no file path provided to dynamicImport()');\n }\n if (typeof filePath !== 'string') {\n console.log('dynamicImport > filePath:', filePath);\n console.log('dynamicImport > filePath type:', typeof filePath === 'undefined' ? 'undefined' : _typeof(filePath));\n throw new Error('file path provided to dynamicImport() must be a string');\n }\n if (!componentsConfig) {\n console.log('no componentsConfig found in siteConfig.js');\n return __webpack_require__(109)(\"\" + filePath);\n }\n // split out the file folders // filter out any empty or white-space-only strings\n var folders = filePath.split('/').filter(function (folderName) {\n return folderName.replace(/\\s/g, '').length;\n });\n // check for the component corresponding to file path in the site config object\n // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]]\n var customComponent = getDeepestChildValue(componentsConfig, folders);\n if (customComponent) {\n return customComponent; // return custom component\n } else {\n return __webpack_require__(109)(\"\" + filePath);\n }\n};\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createBasicCanonicalLink = function createBasicCanonicalLink(page, siteHost) {\n return siteHost + \"/\" + page;\n};\n\nvar createAssetCanonicalLink = function createAssetCanonicalLink(asset, siteHost) {\n var channelName = void 0,\n certificateId = void 0,\n name = void 0,\n claimId = void 0;\n if (asset.claimData) {\n var _asset$claimData = asset.claimData;\n channelName = _asset$claimData.channelName;\n certificateId = _asset$claimData.certificateId;\n name = _asset$claimData.name;\n claimId = _asset$claimData.claimId;\n };\n if (channelName) {\n return siteHost + \"/\" + channelName + \":\" + certificateId + \"/\" + name;\n };\n return siteHost + \"/\" + claimId + \"/\" + name;\n};\n\nvar createChannelCanonicalLink = function createChannelCanonicalLink(channel, siteHost) {\n var name = channel.name,\n longId = channel.longId;\n\n return siteHost + \"/\" + name + \":\" + longId;\n};\n\nvar createCanonicalLink = exports.createCanonicalLink = function createCanonicalLink(asset, channel, page, siteHost) {\n if (asset) {\n return createAssetCanonicalLink(asset, siteHost);\n }\n if (channel) {\n return createChannelCanonicalLink(channel, siteHost);\n }\n return createBasicCanonicalLink(page, siteHost);\n};\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n validateFile: function validateFile(file) {\n if (!file) {\n throw new Error('no file provided');\n }\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate size and type\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n throw new Error('Sorry, GIFs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n }\n};\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex // eslint-disable-line no-unused-vars\n .exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n // Validate and process name\n\n\n if (!value) {\n throw new Error('Check your URL. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('Check your URL. No channel name after \"@\".');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Check your URL. Invalid characters in channel name: \"' + nameBadChars.join(', ') + '\".');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('Check your URL. No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('Check your URL. The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId || null,\n claimId: claimId || null\n };\n },\n parseClaim: function parseClaim(name) {\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first extension)\n '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex // eslint-disable-line no-unused-vars\n .exec(name).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n extensionSeperator = _componentsRegex$exec4[2],\n extension = _componentsRegex$exec4[3];\n\n // Validate and process name\n\n\n if (!claimName) {\n throw new Error('Check your URL. No claim name provided before \".\"');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Check your URL. Invalid characters in claim name: \"' + nameBadChars.join(', ') + '\".');\n }\n // Validate and process extension\n if (extensionSeperator) {\n if (!extension) {\n throw new Error('Check your URL. No file extension provided after separator \"' + extensionSeperator + '\".');\n }\n if (extensionSeperator !== '.') {\n throw new Error('Check your URL. The \"' + extensionSeperator + '\" separator is not supported in the claim name.');\n }\n }\n return {\n claimName: claimName,\n extension: extension || null\n };\n }\n};\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar determineOgThumbnailContentType = function determineOgThumbnailContentType(thumbnail) {\n if (thumbnail) {\n var fileExt = thumbnail.substring(thumbnail.lastIndexOf('.'));\n switch (fileExt) {\n case 'jpeg':\n case 'jpg':\n return 'image/jpeg';\n case 'png':\n return 'image/png';\n case 'gif':\n return 'image/gif';\n case 'mp4':\n return 'video/mp4';\n default:\n return 'image/jpeg';\n }\n }\n return '';\n};\n\nvar createBasicMetaTags = function createBasicMetaTags(siteHost, siteDescription, siteTitle, siteTwitter) {\n return [{ property: 'og:title', content: siteTitle }, { property: 'og:url', content: siteHost }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: siteDescription }, { property: 'twitter:site', content: siteTwitter }, { property: 'twitter:card', content: 'summary' }];\n};\n\nvar createChannelMetaTags = function createChannelMetaTags(siteTitle, siteHost, siteTwitter, channel) {\n var name = channel.name,\n longId = channel.longId;\n\n return [{ property: 'og:title', content: name + ' on ' + siteTitle }, { property: 'og:url', content: siteHost + '/' + name + ':' + longId }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: name + ', a channel on ' + siteTitle }, { property: 'twitter:site', content: siteTwitter }, { property: 'twitter:card', content: 'summary' }];\n};\n\nvar createAssetMetaTags = function createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) {\n var claimData = asset.claimData;\n var contentType = claimData.contentType;\n\n var embedUrl = siteHost + '/' + claimData.claimId + '/' + claimData.name;\n var showUrl = siteHost + '/' + claimData.claimId + '/' + claimData.name;\n var source = siteHost + '/' + claimData.claimId + '/' + claimData.name + '.' + claimData.fileExt;\n var ogTitle = claimData.title || claimData.name;\n var ogDescription = claimData.description || defaultDescription;\n var ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);\n var ogThumbnail = claimData.thumbnail || defaultThumbnail;\n var metaTags = [{ property: 'og:title', content: ogTitle }, { property: 'og:url', content: showUrl }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: ogDescription }, { property: 'og:image:width', content: 600 }, { property: 'og:image:height', content: 315 }, { property: 'twitter:site', content: siteTwitter }];\n if (contentType === 'video/mp4' || contentType === 'video/webm') {\n metaTags.push({ property: 'og:video', content: source });\n metaTags.push({ property: 'og:video:secure_url', content: source });\n metaTags.push({ property: 'og:video:type', content: contentType });\n metaTags.push({ property: 'og:image', content: ogThumbnail });\n metaTags.push({ property: 'og:image:type', content: ogThumbnailContentType });\n metaTags.push({ property: 'og:type', content: 'video' });\n metaTags.push({ property: 'twitter:card', content: 'player' });\n metaTags.push({ property: 'twitter:player', content: embedUrl });\n metaTags.push({ property: 'twitter:player:width', content: 600 });\n metaTags.push({ property: 'twitter:text:player_width', content: 600 });\n metaTags.push({ property: 'twitter:player:height', content: 337 });\n metaTags.push({ property: 'twitter:player:stream', content: source });\n metaTags.push({ property: 'twitter:player:stream:content_type', content: contentType });\n } else {\n metaTags.push({ property: 'og:image', content: source });\n metaTags.push({ property: 'og:image:type', content: contentType });\n metaTags.push({ property: 'og:type', content: 'article' });\n metaTags.push({ property: 'twitter:card', content: 'summary_large_image' });\n }\n return metaTags;\n};\n\nvar createMetaTags = exports.createMetaTags = function createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) {\n if (asset) {\n return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail);\n };\n if (channel) {\n return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel);\n };\n return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter);\n};\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createPageTitle = exports.createPageTitle = function createPageTitle(siteTitle, pageTitle) {\n if (!pageTitle) {\n return \"\" + siteTitle;\n }\n return siteTitle + \" - \" + pageTitle;\n};\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.updateLoggedInChannel = updateLoggedInChannel;\n\nvar _channel_action_types = __webpack_require__(106);\n\nvar actions = _interopRequireWildcard(_channel_action_types);\n\nfunction _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; } }\n\n// export action creators\n\nfunction updateLoggedInChannel(name, shortId, longId) {\n return {\n type: actions.CHANNEL_UPDATE,\n data: {\n name: name,\n shortId: shortId,\n longId: longId\n }\n };\n};\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _Logo = __webpack_require__(21);\n\nvar _Logo2 = _interopRequireDefault(_Logo);\n\nvar _NavBarChannelOptionsDropdown = __webpack_require__(22);\n\nvar _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown);\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar VIEW = 'VIEW';\nvar LOGOUT = 'LOGOUT';\n\nvar NavBar = function (_React$Component) {\n _inherits(NavBar, _React$Component);\n\n function NavBar(props) {\n _classCallCheck(this, NavBar);\n\n var _this = _possibleConstructorReturn(this, (NavBar.__proto__ || Object.getPrototypeOf(NavBar)).call(this, props));\n\n _this.checkForLoggedInUser = _this.checkForLoggedInUser.bind(_this);\n _this.logoutUser = _this.logoutUser.bind(_this);\n _this.handleSelection = _this.handleSelection.bind(_this);\n return _this;\n }\n\n _createClass(NavBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n }, {\n key: 'checkForLoggedInUser',\n value: function checkForLoggedInUser() {\n var _this2 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/user', params).then(function (_ref) {\n var data = _ref.data;\n\n _this2.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n }).catch(function (error) {\n console.log('/user error:', error.message);\n });\n }\n }, {\n key: 'logoutUser',\n value: function logoutUser() {\n var _this3 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/logout', params).then(function () {\n _this3.props.onChannelLogout();\n }).catch(function (error) {\n console.log('/logout error', error.message);\n });\n }\n }, {\n key: 'handleSelection',\n value: function handleSelection(event) {\n var value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push('/' + this.props.channelName + ':' + this.props.channelLongId);\n break;\n default:\n break;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var siteDescription = this.props.siteDescription;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--wide nav-bar' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--short flex-container--row flex-container--space-between-center' },\n _react2.default.createElement(_Logo2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--center' },\n _react2.default.createElement(\n 'span',\n { className: 'nav-bar-tagline' },\n siteDescription\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--right' },\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/', exact: true },\n 'Publish'\n ),\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/about' },\n 'About'\n ),\n this.props.channelName ? _react2.default.createElement(_NavBarChannelOptionsDropdown2.default, {\n channelName: this.props.channelName,\n handleSelection: this.handleSelection,\n defaultSelection: this.props.channelName,\n VIEW: VIEW,\n LOGOUT: LOGOUT\n }) : _react2.default.createElement(\n _reactRouterDom.NavLink,\n { id: 'nav-bar-login-link', className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/login' },\n 'Channel'\n )\n )\n )\n );\n }\n }]);\n\n return NavBar;\n}(_react2.default.Component);\n\nexports.default = (0, _reactRouterDom.withRouter)(NavBar);\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactHelmet = __webpack_require__(48);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nvar _propTypes = __webpack_require__(14);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _pageTitle = __webpack_require__(63);\n\nvar _metaTags = __webpack_require__(62);\n\nvar _canonicalLink = __webpack_require__(59);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SEO = function (_React$Component) {\n _inherits(SEO, _React$Component);\n\n function SEO() {\n _classCallCheck(this, SEO);\n\n return _possibleConstructorReturn(this, (SEO.__proto__ || Object.getPrototypeOf(SEO)).apply(this, arguments));\n }\n\n _createClass(SEO, [{\n key: 'render',\n value: function render() {\n // props from state\n var _props = this.props,\n defaultDescription = _props.defaultDescription,\n defaultThumbnail = _props.defaultThumbnail,\n siteDescription = _props.siteDescription,\n siteHost = _props.siteHost,\n siteTitle = _props.siteTitle,\n siteTwitter = _props.siteTwitter;\n // props from parent\n\n var _props2 = this.props,\n asset = _props2.asset,\n channel = _props2.channel,\n pageUri = _props2.pageUri;\n var pageTitle = this.props.pageTitle;\n // create page title, tags, and canonical link\n\n pageTitle = (0, _pageTitle.createPageTitle)(siteTitle, pageTitle);\n var metaTags = (0, _metaTags.createMetaTags)(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n var canonicalLink = (0, _canonicalLink.createCanonicalLink)(asset, channel, pageUri, siteHost);\n // render results\n return _react2.default.createElement(_reactHelmet2.default, {\n title: pageTitle,\n meta: metaTags,\n link: [{ rel: 'canonical', href: canonicalLink }]\n });\n }\n }]);\n\n return SEO;\n}(_react2.default.Component);\n\n;\n\nSEO.propTypes = {\n pageTitle: _propTypes2.default.string,\n pageUri: _propTypes2.default.string,\n channel: _propTypes2.default.object,\n asset: _propTypes2.default.object\n};\n\nexports.default = SEO;\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _SEO = __webpack_require__(7);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelLoginForm = __webpack_require__(15);\n\nvar _ChannelLoginForm2 = _interopRequireDefault(_ChannelLoginForm);\n\nvar _ChannelCreateForm = __webpack_require__(16);\n\nvar _ChannelCreateForm2 = _interopRequireDefault(_ChannelCreateForm);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar LoginPage = function (_React$Component) {\n _inherits(LoginPage, _React$Component);\n\n function LoginPage() {\n _classCallCheck(this, LoginPage);\n\n return _possibleConstructorReturn(this, (LoginPage.__proto__ || Object.getPrototypeOf(LoginPage)).apply(this, arguments));\n }\n\n _createClass(LoginPage, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push('/');\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'Login', pageUri: 'login' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you\\'re ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: '/@catalonia2017:43dcf47163caa21d8404d9fe9b30f78ef3e146a8' },\n 'documenting important events'\n ),\n ', or making a public repository for ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: '/@catGifs' },\n 'cat gifs'\n ),\n ' (password: \\'1234\\'), try creating a channel for it!'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'h3',\n { className: 'h3--no-bottom' },\n 'Log in to an existing channel:'\n ),\n _react2.default.createElement(_ChannelLoginForm2.default, null),\n _react2.default.createElement(\n 'h3',\n { className: 'h3--no-bottom' },\n 'Create a brand new channel:'\n ),\n _react2.default.createElement(_ChannelCreateForm2.default, null)\n )\n )\n )\n );\n }\n }]);\n\n return LoginPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = (0, _reactRouterDom.withRouter)(LoginPage);\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelLoginForm = function (_React$Component) {\n _inherits(ChannelLoginForm, _React$Component);\n\n function ChannelLoginForm(props) {\n _classCallCheck(this, ChannelLoginForm);\n\n var _this = _possibleConstructorReturn(this, (ChannelLoginForm.__proto__ || Object.getPrototypeOf(ChannelLoginForm)).call(this, props));\n\n _this.state = {\n error: null,\n name: '',\n password: ''\n };\n _this.handleInput = _this.handleInput.bind(_this);\n _this.loginToChannel = _this.loginToChannel.bind(_this);\n return _this;\n }\n\n _createClass(ChannelLoginForm, [{\n key: 'handleInput',\n value: function handleInput(event) {\n var name = event.target.name;\n var value = event.target.value;\n this.setState(_defineProperty({}, name, value));\n }\n }, {\n key: 'loginToChannel',\n value: function loginToChannel(event) {\n var _this2 = this;\n\n event.preventDefault();\n var params = {\n method: 'POST',\n body: JSON.stringify({ username: this.state.name, password: this.state.password }),\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n credentials: 'include'\n };\n (0, _request2.default)('login', params).then(function (_ref) {\n var success = _ref.success,\n channelName = _ref.channelName,\n shortChannelId = _ref.shortChannelId,\n channelClaimId = _ref.channelClaimId,\n message = _ref.message;\n\n if (success) {\n _this2.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n _this2.setState({ 'error': message });\n };\n }).catch(function (error) {\n if (error.message) {\n _this2.setState({ 'error': error.message });\n } else {\n _this2.setState({ 'error': error });\n }\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'form',\n { id: 'channel-login-form' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-login-name-input' },\n 'Name:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary flex-container--row flex-container--left-bottom' },\n _react2.default.createElement(\n 'span',\n null,\n '@'\n ),\n _react2.default.createElement('input', { type: 'text', id: 'channel-login-name-input', className: 'input-text', name: 'name', placeholder: 'Your Channel Name', value: this.state.channelName, onChange: this.handleInput })\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-login-password-input' },\n 'Password:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary' },\n _react2.default.createElement('input', { type: 'password', id: 'channel-login-password-input', name: 'password', className: 'input-text', placeholder: '', value: this.state.channelPassword, onChange: this.handleInput })\n )\n )\n ),\n this.state.error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.state.error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Enter the name and password for your channel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary', onClick: this.loginToChannel },\n 'Authenticate'\n )\n )\n );\n }\n }]);\n\n return ChannelLoginForm;\n}(_react2.default.Component);\n\nexports.default = ChannelLoginForm;\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(10);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelCreateForm = function (_React$Component) {\n _inherits(ChannelCreateForm, _React$Component);\n\n function ChannelCreateForm(props) {\n _classCallCheck(this, ChannelCreateForm);\n\n var _this = _possibleConstructorReturn(this, (ChannelCreateForm.__proto__ || Object.getPrototypeOf(ChannelCreateForm)).call(this, props));\n\n _this.state = {\n error: null,\n channel: '',\n password: '',\n status: null\n };\n _this.handleChannelInput = _this.handleChannelInput.bind(_this);\n _this.handleInput = _this.handleInput.bind(_this);\n _this.createChannel = _this.createChannel.bind(_this);\n return _this;\n }\n\n _createClass(ChannelCreateForm, [{\n key: 'cleanseChannelInput',\n value: function cleanseChannelInput(input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n }, {\n key: 'handleChannelInput',\n value: function handleChannelInput(event) {\n var value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({ channel: value });\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({ error: 'Please enter a channel name' });\n }\n }\n }, {\n key: 'handleInput',\n value: function handleInput(event) {\n var name = event.target.name;\n var value = event.target.value;\n this.setState(_defineProperty({}, name, value));\n }\n }, {\n key: 'updateIsChannelAvailable',\n value: function updateIsChannelAvailable(channel) {\n var _this2 = this;\n\n var channelWithAtSymbol = '@' + channel;\n (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol).then(function () {\n _this2.setState({ 'error': null });\n }).catch(function (error) {\n _this2.setState({ 'error': error.message });\n });\n }\n }, {\n key: 'checkIsChannelAvailable',\n value: function checkIsChannelAvailable(channel) {\n var channelWithAtSymbol = '@' + channel;\n return (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol);\n }\n }, {\n key: 'checkIsPasswordProvided',\n value: function checkIsPasswordProvided(password) {\n return new Promise(function (resolve, reject) {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n }, {\n key: 'makePublishChannelRequest',\n value: function makePublishChannelRequest(username, password) {\n var params = {\n method: 'POST',\n body: JSON.stringify({ username: username, password: password }),\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n credentials: 'include'\n };\n return new Promise(function (resolve, reject) {\n (0, _request2.default)('/signup', params).then(function (result) {\n return resolve(result);\n }).catch(function (error) {\n reject(new Error('Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ' + error.message));\n });\n });\n }\n }, {\n key: 'createChannel',\n value: function createChannel(event) {\n var _this3 = this;\n\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password).then(function () {\n return _this3.checkIsChannelAvailable(_this3.state.channel);\n }).then(function () {\n _this3.setState({ status: 'We are publishing your new channel. Sit tight...' });\n return _this3.makePublishChannelRequest(_this3.state.channel, _this3.state.password);\n }).then(function (result) {\n _this3.setState({ status: null });\n _this3.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n }).catch(function (error) {\n if (error.message) {\n _this3.setState({ 'error': error.message, status: null });\n } else {\n _this3.setState({ 'error': error, status: null });\n };\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n !this.state.status ? _react2.default.createElement(\n 'form',\n { id: 'publish-channel-form' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'new-channel-name' },\n 'Name:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary flex-container--row flex-container--left-bottom span--relative' },\n _react2.default.createElement(\n 'span',\n null,\n '@'\n ),\n _react2.default.createElement('input', { type: 'text', name: 'channel', id: 'new-channel-name', className: 'input-text', placeholder: 'exampleChannelName', value: this.state.channel, onChange: this.handleChannelInput }),\n this.state.channel && !this.state.error && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--success span--absolute' },\n '\\u2713'\n ),\n this.state.error && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--failure span--absolute' },\n '\\u2716'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'new-channel-password' },\n 'Password:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary' },\n _react2.default.createElement('input', { type: 'password', name: 'password', id: 'new-channel-password', className: 'input-text', placeholder: '', value: this.state.password, onChange: this.handleInput })\n )\n )\n ),\n this.state.error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.state.error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Choose a name and password for your channel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary', onClick: this.createChannel },\n 'Create Channel'\n )\n )\n ) : _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n this.state.status\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 })\n )\n );\n }\n }]);\n\n return ChannelCreateForm;\n}(_react2.default.Component);\n\nexports.default = ChannelCreateForm;\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ErrorPage = __webpack_require__(12);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _ShowAssetLite = __webpack_require__(27);\n\nvar _ShowAssetLite2 = _interopRequireDefault(_ShowAssetLite);\n\nvar _ShowAssetDetails = __webpack_require__(29);\n\nvar _ShowAssetDetails2 = _interopRequireDefault(_ShowAssetDetails);\n\nvar _ShowChannel = __webpack_require__(32);\n\nvar _ShowChannel2 = _interopRequireDefault(_ShowChannel);\n\nvar _show_request_types = __webpack_require__(112);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowPage = function (_React$Component) {\n _inherits(ShowPage, _React$Component);\n\n function ShowPage() {\n _classCallCheck(this, ShowPage);\n\n return _possibleConstructorReturn(this, (ShowPage.__proto__ || Object.getPrototypeOf(ShowPage)).apply(this, arguments));\n }\n\n _createClass(ShowPage, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n error = _props.error,\n requestType = _props.requestType;\n\n if (error) {\n return _react2.default.createElement(_ErrorPage2.default, { error: error });\n }\n switch (requestType) {\n case _show_request_types.CHANNEL:\n return _react2.default.createElement(_ShowChannel2.default, null);\n case _show_request_types.ASSET_LITE:\n return _react2.default.createElement(_ShowAssetLite2.default, null);\n case _show_request_types.ASSET_DETAILS:\n return _react2.default.createElement(_ShowAssetDetails2.default, null);\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'loading...'\n );\n }\n }\n }]);\n\n return ShowPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowPage;\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(7);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _AssetDisplay = __webpack_require__(17);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowLite = function (_React$Component) {\n _inherits(ShowLite, _React$Component);\n\n function ShowLite() {\n _classCallCheck(this, ShowLite);\n\n return _possibleConstructorReturn(this, (ShowLite.__proto__ || Object.getPrototypeOf(ShowLite)).apply(this, arguments));\n }\n\n _createClass(ShowLite, [{\n key: 'render',\n value: function render() {\n var asset = this.props.asset;\n\n if (asset) {\n var _asset$claimData = asset.claimData,\n name = _asset$claimData.name,\n claimId = _asset$claimData.claimId;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column flex-container--center-center show-lite-container' },\n _react2.default.createElement(_SEO2.default, { pageTitle: name, asset: asset }),\n _react2.default.createElement(_AssetDisplay2.default, null),\n _react2.default.createElement(\n _reactRouterDom.Link,\n { id: 'asset-boilerpate', className: 'link--primary fine-print', to: '/' + claimId + '/' + name },\n 'hosted via Spee.ch'\n )\n );\n }\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded flex-container--column flex-container--center-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'loading asset data...'\n )\n );\n }\n }]);\n\n return ShowLite;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowLite;\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(10);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _asset_display_states = __webpack_require__(107);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AssetDisplay = function (_React$Component) {\n _inherits(AssetDisplay, _React$Component);\n\n function AssetDisplay() {\n _classCallCheck(this, AssetDisplay);\n\n return _possibleConstructorReturn(this, (AssetDisplay.__proto__ || Object.getPrototypeOf(AssetDisplay)).apply(this, arguments));\n }\n\n _createClass(AssetDisplay, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props$asset$claimDat = this.props.asset.claimData,\n name = _props$asset$claimDat.name,\n claimId = _props$asset$claimDat.claimId;\n\n this.props.onFileRequest(name, claimId);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n status = _props.status,\n error = _props.error,\n _props$asset$claimDat2 = _props.asset.claimData,\n name = _props$asset$claimDat2.name,\n claimId = _props$asset$claimDat2.claimId,\n contentType = _props$asset$claimDat2.contentType,\n fileExt = _props$asset$claimDat2.fileExt,\n thumbnail = _props$asset$claimDat2.thumbnail;\n\n return _react2.default.createElement(\n 'div',\n { id: 'asset-display-component' },\n status === _asset_display_states.LOCAL_CHECK && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Checking to see if Spee.ch has your asset locally...'\n )\n ),\n status === _asset_display_states.UNAVAILABLE && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Sit tight, we\\'re searching the LBRY blockchain for your asset!'\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 }),\n _react2.default.createElement(\n 'p',\n null,\n 'Curious what magic is happening here? ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: 'blank', href: 'https://lbry.io/faq/what-is-lbry' },\n 'Learn more.'\n )\n )\n ),\n status === _asset_display_states.ERROR && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Unfortunately, we couldn\\'t download your asset from LBRY. You can help us out by sharing the below error message in the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS', target: '_blank' },\n 'LBRY discord'\n ),\n '.'\n ),\n _react2.default.createElement(\n 'i',\n null,\n _react2.default.createElement(\n 'p',\n { id: 'error-message' },\n error\n )\n )\n ),\n status === _asset_display_states.AVAILABLE && function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return _react2.default.createElement('img', {\n className: 'asset',\n src: '/' + claimId + '/' + name + '.' + fileExt,\n alt: name });\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset',\n src: '/' + claimId + '/' + name + '.' + fileExt,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement(\n 'video',\n { className: 'asset video', controls: true, poster: thumbnail },\n _react2.default.createElement('source', {\n src: '/' + claimId + '/' + name + '.' + fileExt\n }),\n _react2.default.createElement(\n 'p',\n null,\n 'Your browser does not support the ',\n _react2.default.createElement(\n 'code',\n null,\n 'video'\n ),\n ' element.'\n )\n );\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'Unsupported file type'\n );\n }\n }()\n );\n }\n }]);\n\n return AssetDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetDisplay;\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(7);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ErrorPage = __webpack_require__(12);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _AssetTitle = __webpack_require__(30);\n\nvar _AssetTitle2 = _interopRequireDefault(_AssetTitle);\n\nvar _AssetDisplay = __webpack_require__(17);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nvar _AssetInfo = __webpack_require__(31);\n\nvar _AssetInfo2 = _interopRequireDefault(_AssetInfo);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowAssetDetails = function (_React$Component) {\n _inherits(ShowAssetDetails, _React$Component);\n\n function ShowAssetDetails() {\n _classCallCheck(this, ShowAssetDetails);\n\n return _possibleConstructorReturn(this, (ShowAssetDetails.__proto__ || Object.getPrototypeOf(ShowAssetDetails)).apply(this, arguments));\n }\n\n _createClass(ShowAssetDetails, [{\n key: 'render',\n value: function render() {\n var asset = this.props.asset;\n\n if (asset) {\n var name = asset.claimData.name;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name + ' - details', asset: asset }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_AssetTitle2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded show-details-container' },\n _react2.default.createElement(_AssetDisplay2.default, null)\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(_AssetInfo2.default, null)\n )\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading asset data...' });\n }\n }]);\n\n return ShowAssetDetails;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowAssetDetails;\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetTitle = function AssetTitle(_ref) {\n var title = _ref.title;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'span',\n { className: 'text--large' },\n title\n )\n );\n};\n\nexports.default = AssetTitle;\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AssetInfo = function (_React$Component) {\n _inherits(AssetInfo, _React$Component);\n\n function AssetInfo(props) {\n _classCallCheck(this, AssetInfo);\n\n var _this = _possibleConstructorReturn(this, (AssetInfo.__proto__ || Object.getPrototypeOf(AssetInfo)).call(this, props));\n\n _this.copyToClipboard = _this.copyToClipboard.bind(_this);\n return _this;\n }\n\n _createClass(AssetInfo, [{\n key: 'copyToClipboard',\n value: function copyToClipboard(event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({ error: 'Oops, unable to copy' });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$asset = this.props.asset,\n shortId = _props$asset.shortId,\n _props$asset$claimDat = _props$asset.claimData,\n channelName = _props$asset$claimDat.channelName,\n certificateId = _props$asset$claimDat.certificateId,\n description = _props$asset$claimDat.description,\n name = _props$asset$claimDat.name,\n claimId = _props$asset$claimDat.claimId,\n fileExt = _props$asset$claimDat.fileExt,\n contentType = _props$asset$claimDat.contentType,\n thumbnail = _props$asset$claimDat.thumbnail,\n host = _props$asset$claimDat.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n channelName && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Channel:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: '/' + channelName + ':' + certificateId },\n channelName\n )\n )\n )\n ),\n description && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n description\n )\n ),\n _react2.default.createElement(\n 'div',\n { id: 'show-share-buttons' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Share:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n {\n className: 'row row--short row--wide flex-container--row flex-container--space-between-bottom flex-container--wrap' },\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/intent/tweet?text=' + host + '/' + shortId + '/' + name },\n 'twitter'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://www.facebook.com/sharer/sharer.php?u=' + host + '/' + shortId + '/' + name },\n 'facebook'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'http://tumblr.com/widgets/share/tool?canonicalUrl=' + host + '/' + shortId + '/' + name },\n 'tumblr'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://www.reddit.com/submit?url=' + host + '/' + shortId + '/' + name + '&title=' + name },\n 'reddit'\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { id: 'show-short-link' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Link:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--short row--wide' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'div',\n { className: 'input-error', id: 'input-error-copy-short-link', hidden: 'true' },\n 'error here'\n ),\n _react2.default.createElement('input', { type: 'text', id: 'short-link', className: 'input-disabled input-text--full-width', readOnly: true,\n spellCheck: 'false',\n value: host + '/' + shortId + '/' + name + '.' + fileExt,\n onClick: this.select })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'short-link',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { id: 'show-embed-code' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Embed:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--short row--wide' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'div',\n { className: 'input-error', id: 'input-error-copy-embed-text', hidden: 'true' },\n 'error here'\n ),\n contentType === 'video/mp4' ? _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: '' }) : _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: ''\n })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'embed-text',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex-container--row flex-container--space-between-bottom' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { className: 'link--primary', to: '/' + shortId + '/' + name + '.' + fileExt },\n _react2.default.createElement(\n 'span',\n {\n className: 'text' },\n 'Direct Link'\n )\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: host + '/' + claimId + '/' + name + '.' + fileExt, download: name },\n 'Download'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://lbry.io/dmca' },\n 'Report'\n )\n )\n );\n }\n }]);\n\n return AssetInfo;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetInfo;\n\n/***/ }),\n/* 76 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(7);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _ErrorPage = __webpack_require__(12);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelClaimsDisplay = __webpack_require__(33);\n\nvar _ChannelClaimsDisplay2 = _interopRequireDefault(_ChannelClaimsDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowChannel = function (_React$Component) {\n _inherits(ShowChannel, _React$Component);\n\n function ShowChannel() {\n _classCallCheck(this, ShowChannel);\n\n return _possibleConstructorReturn(this, (ShowChannel.__proto__ || Object.getPrototypeOf(ShowChannel)).apply(this, arguments));\n }\n\n _createClass(ShowChannel, [{\n key: 'render',\n value: function render() {\n var channel = this.props.channel;\n\n if (channel) {\n var name = channel.name,\n longId = channel.longId,\n shortId = channel.shortId;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name, channel: channel }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(\n 'h2',\n null,\n 'channel name: ',\n name\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'full channel id: ',\n longId\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'short channel id: ',\n shortId\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_ChannelClaimsDisplay2.default, null)\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading channel data...' });\n }\n }]);\n\n return ShowChannel;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowChannel;\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _AssetPreview = __webpack_require__(34);\n\nvar _AssetPreview2 = _interopRequireDefault(_AssetPreview);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelClaimsDisplay = function (_React$Component) {\n _inherits(ChannelClaimsDisplay, _React$Component);\n\n function ChannelClaimsDisplay(props) {\n _classCallCheck(this, ChannelClaimsDisplay);\n\n var _this = _possibleConstructorReturn(this, (ChannelClaimsDisplay.__proto__ || Object.getPrototypeOf(ChannelClaimsDisplay)).call(this, props));\n\n _this.showNextResultsPage = _this.showNextResultsPage.bind(_this);\n _this.showPreviousResultsPage = _this.showPreviousResultsPage.bind(_this);\n return _this;\n }\n\n _createClass(ChannelClaimsDisplay, [{\n key: 'showPreviousResultsPage',\n value: function showPreviousResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n }, {\n key: 'showNextResultsPage',\n value: function showNextResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n }, {\n key: 'showNewPage',\n value: function showNewPage(page) {\n var _props = this.props,\n channelKey = _props.channelKey,\n _props$channel = _props.channel,\n name = _props$channel.name,\n longId = _props$channel.longId;\n\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$channel$claims = this.props.channel.claimsData,\n claims = _props$channel$claims.claims,\n currentPage = _props$channel$claims.currentPage,\n totalPages = _props$channel$claims.totalPages;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall' },\n claims.length > 0 ? _react2.default.createElement(\n 'div',\n null,\n claims.map(function (claim, index) {\n return _react2.default.createElement(_AssetPreview2.default, {\n claimData: claim,\n key: claim.name + '-' + index\n });\n }),\n _react2.default.createElement(\n 'div',\n null,\n currentPage > 1 && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showPreviousResultsPage },\n 'Previous Page'\n ),\n currentPage < totalPages && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showNextResultsPage },\n 'Next Page'\n )\n )\n ) : _react2.default.createElement(\n 'p',\n null,\n 'There are no claims in this channel'\n )\n );\n }\n }]);\n\n return ChannelClaimsDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = ChannelClaimsDisplay;\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetPreview = function AssetPreview(_ref) {\n var defaultThumbnail = _ref.defaultThumbnail,\n _ref$claimData = _ref.claimData,\n name = _ref$claimData.name,\n claimId = _ref$claimData.claimId,\n fileExt = _ref$claimData.fileExt,\n contentType = _ref$claimData.contentType,\n thumbnail = _ref$claimData.thumbnail;\n\n var directSourceLink = claimId + '/' + name + '.' + fileExt;\n var showUrlLink = '/' + claimId + '/' + name;\n return _react2.default.createElement(\n 'div',\n { className: 'asset-holder' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: showUrlLink },\n function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset-preview',\n src: directSourceLink,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement('img', {\n className: 'asset-preview video',\n src: thumbnail || defaultThumbnail,\n alt: name\n });\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'unsupported file type'\n );\n }\n }()\n )\n );\n};\n\nexports.default = AssetPreview;\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _reactHelmet = __webpack_require__(48);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar FourOhForPage = function (_React$Component) {\n _inherits(FourOhForPage, _React$Component);\n\n function FourOhForPage() {\n _classCallCheck(this, FourOhForPage);\n\n return _possibleConstructorReturn(this, (FourOhForPage.__proto__ || Object.getPrototypeOf(FourOhForPage)).apply(this, arguments));\n }\n\n _createClass(FourOhForPage, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n title = _props.title,\n host = _props.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n _reactHelmet2.default,\n null,\n _react2.default.createElement(\n 'title',\n null,\n title,\n ' - 404'\n ),\n _react2.default.createElement('link', { rel: 'canonical', href: host + '/404' })\n ),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'h2',\n null,\n '404'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'That page does not exist'\n )\n )\n );\n }\n }]);\n\n return FourOhForPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = FourOhForPage;\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _require = __webpack_require__(98),\n lstatSync = _require.lstatSync,\n readdirSync = _require.readdirSync;\n\nvar _require2 = __webpack_require__(51),\n join = _require2.join;\n\nvar getSubDirectoryNames = exports.getSubDirectoryNames = function getSubDirectoryNames(root) {\n return readdirSync(root).filter(function (name) {\n var fullPath = join(root, name);\n return lstatSync(fullPath).isDirectory();\n });\n};\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ChannelLoginForm = __webpack_require__(15);\n\nvar _ChannelLoginForm2 = _interopRequireDefault(_ChannelLoginForm);\n\nvar _ChannelCreateForm = __webpack_require__(16);\n\nvar _ChannelCreateForm2 = _interopRequireDefault(_ChannelCreateForm);\n\nvar _publish_channel_select_states = __webpack_require__(105);\n\nvar states = _interopRequireWildcard(_publish_channel_select_states);\n\nfunction _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; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelSelect = function (_React$Component) {\n _inherits(ChannelSelect, _React$Component);\n\n function ChannelSelect(props) {\n _classCallCheck(this, ChannelSelect);\n\n var _this = _possibleConstructorReturn(this, (ChannelSelect.__proto__ || Object.getPrototypeOf(ChannelSelect)).call(this, props));\n\n _this.toggleAnonymousPublish = _this.toggleAnonymousPublish.bind(_this);\n _this.handleSelection = _this.handleSelection.bind(_this);\n return _this;\n }\n\n _createClass(ChannelSelect, [{\n key: 'toggleAnonymousPublish',\n value: function toggleAnonymousPublish(event) {\n var value = event.target.value;\n if (value === 'anonymous') {\n this.props.onPublishInChannelChange(false);\n } else {\n this.props.onPublishInChannelChange(true);\n }\n }\n }, {\n key: 'handleSelection',\n value: function handleSelection(event) {\n var selectedOption = event.target.selectedOptions[0].value;\n this.props.onChannelSelect(selectedOption);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'form',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--med-10' },\n _react2.default.createElement('input', { type: 'radio', name: 'anonymous-or-channel', id: 'anonymous-radio', className: 'input-radio', value: 'anonymous', checked: !this.props.publishInChannel, onChange: this.toggleAnonymousPublish }),\n _react2.default.createElement(\n 'label',\n { className: 'label label--pointer', htmlFor: 'anonymous-radio' },\n 'Anonymous'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7 column--med-10' },\n _react2.default.createElement('input', { type: 'radio', name: 'anonymous-or-channel', id: 'channel-radio', className: 'input-radio', value: 'in a channel', checked: this.props.publishInChannel, onChange: this.toggleAnonymousPublish }),\n _react2.default.createElement(\n 'label',\n { className: 'label label--pointer', htmlFor: 'channel-radio' },\n 'In a channel'\n )\n ),\n this.props.channelError ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.props.channelError\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Publish anonymously or in a channel'\n )\n ),\n this.props.publishInChannel && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'column column--3' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-name-select' },\n 'Channel:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'select',\n { type: 'text', id: 'channel-name-select', className: 'select select--arrow', value: this.props.selectedChannel, onChange: this.handleSelection },\n this.props.loggedInChannelName && _react2.default.createElement(\n 'option',\n { value: this.props.loggedInChannelName, id: 'publish-channel-select-channel-option' },\n this.props.loggedInChannelName\n ),\n _react2.default.createElement(\n 'option',\n { value: states.LOGIN },\n 'Existing'\n ),\n _react2.default.createElement(\n 'option',\n { value: states.CREATE },\n 'New'\n )\n )\n ),\n this.props.selectedChannel === states.LOGIN && _react2.default.createElement(_ChannelLoginForm2.default, null),\n this.props.selectedChannel === states.CREATE && _react2.default.createElement(_ChannelCreateForm2.default, null)\n )\n );\n }\n }]);\n\n return ChannelSelect;\n}(_react2.default.Component);\n\nexports.default = ChannelSelect;\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _file = __webpack_require__(60);\n\nvar _PublishPreview = __webpack_require__(37);\n\nvar _PublishPreview2 = _interopRequireDefault(_PublishPreview);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Dropzone = function (_React$Component) {\n _inherits(Dropzone, _React$Component);\n\n function Dropzone(props) {\n _classCallCheck(this, Dropzone);\n\n var _this = _possibleConstructorReturn(this, (Dropzone.__proto__ || Object.getPrototypeOf(Dropzone)).call(this, props));\n\n _this.state = {\n dragOver: false,\n mouseOver: false,\n dimPreview: false\n };\n _this.handleDrop = _this.handleDrop.bind(_this);\n _this.handleDragOver = _this.handleDragOver.bind(_this);\n _this.handleDragEnd = _this.handleDragEnd.bind(_this);\n _this.handleDragEnter = _this.handleDragEnter.bind(_this);\n _this.handleDragLeave = _this.handleDragLeave.bind(_this);\n _this.handleMouseEnter = _this.handleMouseEnter.bind(_this);\n _this.handleMouseLeave = _this.handleMouseLeave.bind(_this);\n _this.handleClick = _this.handleClick.bind(_this);\n _this.handleFileInput = _this.handleFileInput.bind(_this);\n _this.chooseFile = _this.chooseFile.bind(_this);\n return _this;\n }\n\n _createClass(Dropzone, [{\n key: 'handleDrop',\n value: function handleDrop(event) {\n event.preventDefault();\n this.setState({ dragOver: false });\n // if dropped items aren't files, reject them\n var dt = event.dataTransfer;\n if (dt.items) {\n if (dt.items[0].kind === 'file') {\n var droppedFile = dt.items[0].getAsFile();\n this.chooseFile(droppedFile);\n }\n }\n }\n }, {\n key: 'handleDragOver',\n value: function handleDragOver(event) {\n event.preventDefault();\n }\n }, {\n key: 'handleDragEnd',\n value: function handleDragEnd(event) {\n var dt = event.dataTransfer;\n if (dt.items) {\n for (var i = 0; i < dt.items.length; i++) {\n dt.items.remove(i);\n }\n } else {\n event.dataTransfer.clearData();\n }\n }\n }, {\n key: 'handleDragEnter',\n value: function handleDragEnter() {\n this.setState({ dragOver: true, dimPreview: true });\n }\n }, {\n key: 'handleDragLeave',\n value: function handleDragLeave() {\n this.setState({ dragOver: false, dimPreview: false });\n }\n }, {\n key: 'handleMouseEnter',\n value: function handleMouseEnter() {\n this.setState({ mouseOver: true, dimPreview: true });\n }\n }, {\n key: 'handleMouseLeave',\n value: function handleMouseLeave() {\n this.setState({ mouseOver: false, dimPreview: false });\n }\n }, {\n key: 'handleClick',\n value: function handleClick(event) {\n event.preventDefault();\n document.getElementById('file_input').click();\n }\n }, {\n key: 'handleFileInput',\n value: function handleFileInput(event) {\n event.preventDefault();\n var fileList = event.target.files;\n this.chooseFile(fileList[0]);\n }\n }, {\n key: 'chooseFile',\n value: function chooseFile(file) {\n if (file) {\n try {\n (0, _file.validateFile)(file); // validate the file's name, type, and size\n } catch (error) {\n return this.props.setFileError(error.message);\n }\n // stage it so it will be ready when the publish button is clicked\n this.props.selectFile(file);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column' },\n _react2.default.createElement(\n 'form',\n null,\n _react2.default.createElement('input', { className: 'input-file', type: 'file', id: 'file_input', name: 'file_input', accept: 'video/*,image/*', onChange: this.handleFileInput, encType: 'multipart/form-data' })\n ),\n _react2.default.createElement(\n 'div',\n { id: 'preview-dropzone', className: 'row row--padded row--tall dropzone' + (this.state.dragOver ? ' dropzone--drag-over' : ''), onDrop: this.handleDrop, onDragOver: this.handleDragOver, onDragEnd: this.handleDragEnd, onDragEnter: this.handleDragEnter, onDragLeave: this.handleDragLeave, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onClick: this.handleClick },\n this.props.file ? _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_PublishPreview2.default, {\n dimPreview: this.state.dimPreview,\n file: this.props.file,\n thumbnail: this.props.thumbnail\n }),\n _react2.default.createElement(\n 'div',\n { id: 'dropzone-text-holder', className: 'flex-container--column flex-container--center-center' },\n this.state.dragOver ? _react2.default.createElement(\n 'div',\n { id: 'dropzone-dragover' },\n _react2.default.createElement(\n 'p',\n { className: 'blue' },\n 'Drop it.'\n )\n ) : null,\n this.state.mouseOver ? _react2.default.createElement(\n 'div',\n { id: 'dropzone-instructions' },\n _react2.default.createElement(\n 'p',\n { className: 'info-message-placeholder info-message--failure', id: 'input-error-file-selection' },\n this.props.fileError\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Drag & drop image or video here to publish'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'OR'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'blue--underlined' },\n 'CHOOSE FILE'\n )\n ) : null\n )\n ) : _react2.default.createElement(\n 'div',\n { id: 'dropzone-text-holder', className: 'flex-container--column flex-container--center-center' },\n this.state.dragOver ? _react2.default.createElement(\n 'div',\n { id: 'dropzone-dragover' },\n _react2.default.createElement(\n 'p',\n { className: 'blue' },\n 'Drop it.'\n )\n ) : _react2.default.createElement(\n 'div',\n { id: 'dropzone-instructions' },\n _react2.default.createElement(\n 'p',\n { className: 'info-message-placeholder info-message--failure', id: 'input-error-file-selection' },\n this.props.fileError\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Drag & drop image or video here to publish'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'OR'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'blue--underlined' },\n 'CHOOSE FILE'\n )\n )\n )\n )\n );\n }\n }]);\n\n return Dropzone;\n}(_react2.default.Component);\n\n;\n\nexports.default = Dropzone;\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _Dropzone = __webpack_require__(18);\n\nvar _Dropzone2 = _interopRequireDefault(_Dropzone);\n\nvar _PublishTitleInput = __webpack_require__(41);\n\nvar _PublishTitleInput2 = _interopRequireDefault(_PublishTitleInput);\n\nvar _PublishUrlInput = __webpack_require__(42);\n\nvar _PublishUrlInput2 = _interopRequireDefault(_PublishUrlInput);\n\nvar _PublishThumbnailInput = __webpack_require__(43);\n\nvar _PublishThumbnailInput2 = _interopRequireDefault(_PublishThumbnailInput);\n\nvar _PublishMetadataInputs = __webpack_require__(44);\n\nvar _PublishMetadataInputs2 = _interopRequireDefault(_PublishMetadataInputs);\n\nvar _ChannelSelect = __webpack_require__(39);\n\nvar _ChannelSelect2 = _interopRequireDefault(_ChannelSelect);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishDetails = function (_React$Component) {\n _inherits(PublishDetails, _React$Component);\n\n function PublishDetails(props) {\n _classCallCheck(this, PublishDetails);\n\n var _this = _possibleConstructorReturn(this, (PublishDetails.__proto__ || Object.getPrototypeOf(PublishDetails)).call(this, props));\n\n _this.onPublishSubmit = _this.onPublishSubmit.bind(_this);\n return _this;\n }\n\n _createClass(PublishDetails, [{\n key: 'onPublishSubmit',\n value: function onPublishSubmit() {\n this.props.startPublish(this.props.history);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'row row--no-bottom' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_PublishTitleInput2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(_Dropzone2.default, null)\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { id: 'publish-active-area', className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-top row--wide' },\n _react2.default.createElement(_PublishUrlInput2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-top row--wide' },\n _react2.default.createElement(_ChannelSelect2.default, null)\n ),\n this.props.file.type === 'video/mp4' && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-top row--wide ' },\n _react2.default.createElement(_PublishThumbnailInput2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-top row--no-bottom row--wide' },\n _react2.default.createElement(_PublishMetadataInputs2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide align-content-center' },\n _react2.default.createElement(\n 'button',\n { id: 'publish-submit', className: 'button--primary button--large', onClick: this.onPublishSubmit },\n 'Publish'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-bottom align-content-center' },\n _react2.default.createElement(\n 'button',\n { className: 'button--cancel', onClick: this.props.clearFile },\n 'Cancel'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--short align-content-center' },\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'By clicking \\'Publish\\', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://lbry.io/learn' },\n 'Read more.'\n )\n )\n )\n )\n )\n );\n }\n }]);\n\n return PublishDetails;\n}(_react2.default.Component);\n\n;\n\nexports.default = (0, _reactRouterDom.withRouter)(PublishDetails);\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishTitleInput = function (_React$Component) {\n _inherits(PublishTitleInput, _React$Component);\n\n function PublishTitleInput(props) {\n _classCallCheck(this, PublishTitleInput);\n\n var _this = _possibleConstructorReturn(this, (PublishTitleInput.__proto__ || Object.getPrototypeOf(PublishTitleInput)).call(this, props));\n\n _this.handleInput = _this.handleInput.bind(_this);\n return _this;\n }\n\n _createClass(PublishTitleInput, [{\n key: 'handleInput',\n value: function handleInput(e) {\n var name = e.target.name;\n var value = e.target.value;\n this.props.onMetadataChange(name, value);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement('input', { type: 'text', id: 'publish-title', className: 'input-text text--large input-text--full-width', name: 'title', placeholder: 'Give your post a title...', onChange: this.handleInput, value: this.props.title });\n }\n }]);\n\n return PublishTitleInput;\n}(_react2.default.Component);\n\nexports.default = PublishTitleInput;\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nvar _PublishUrlMiddleDisplay = __webpack_require__(38);\n\nvar _PublishUrlMiddleDisplay2 = _interopRequireDefault(_PublishUrlMiddleDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishUrlInput = function (_React$Component) {\n _inherits(PublishUrlInput, _React$Component);\n\n function PublishUrlInput(props) {\n _classCallCheck(this, PublishUrlInput);\n\n var _this = _possibleConstructorReturn(this, (PublishUrlInput.__proto__ || Object.getPrototypeOf(PublishUrlInput)).call(this, props));\n\n _this.handleInput = _this.handleInput.bind(_this);\n return _this;\n }\n\n _createClass(PublishUrlInput, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props = this.props,\n claim = _props.claim,\n fileName = _props.fileName;\n\n if (!claim) {\n this.setClaimName(fileName);\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(_ref) {\n var claim = _ref.claim,\n fileName = _ref.fileName;\n\n // if a new file was chosen, update the claim name\n if (fileName !== this.props.fileName) {\n return this.setClaimName(fileName);\n }\n // if the claim has updated, check its availability\n if (claim !== this.props.claim) {\n this.validateClaim(claim);\n }\n }\n }, {\n key: 'handleInput',\n value: function handleInput(event) {\n var value = event.target.value;\n value = this.cleanseInput(value);\n // update the state\n this.props.onClaimChange(value);\n }\n }, {\n key: 'cleanseInput',\n value: function cleanseInput(input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n }, {\n key: 'setClaimName',\n value: function setClaimName(fileName) {\n var fileNameWithoutEnding = fileName.substring(0, fileName.lastIndexOf('.'));\n var cleanClaimName = this.cleanseInput(fileNameWithoutEnding);\n this.props.onClaimChange(cleanClaimName);\n }\n }, {\n key: 'validateClaim',\n value: function validateClaim(claim) {\n var _this2 = this;\n\n if (!claim) {\n return this.props.onUrlError('Enter a url above');\n }\n (0, _request2.default)('/api/claim/availability/' + claim).then(function () {\n _this2.props.onUrlError(null);\n }).catch(function (error) {\n _this2.props.onUrlError(error.message);\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _props2 = this.props,\n claim = _props2.claim,\n loggedInChannelName = _props2.loggedInChannelName,\n loggedInChannelShortId = _props2.loggedInChannelShortId,\n publishInChannel = _props2.publishInChannel,\n selectedChannel = _props2.selectedChannel,\n urlError = _props2.urlError;\n\n return _react2.default.createElement(\n 'div',\n { className: 'column column--10 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary span--relative' },\n _react2.default.createElement(\n 'span',\n { className: 'url-text--secondary' },\n 'spee.ch / '\n ),\n _react2.default.createElement(_PublishUrlMiddleDisplay2.default, {\n publishInChannel: publishInChannel,\n selectedChannel: selectedChannel,\n loggedInChannelName: loggedInChannelName,\n loggedInChannelShortId: loggedInChannelShortId\n }),\n _react2.default.createElement('input', { type: 'text', id: 'claim-name-input', className: 'input-text', name: 'claim', placeholder: 'your-url-here', onChange: this.handleInput, value: claim }),\n claim && !urlError && _react2.default.createElement(\n 'span',\n { id: 'input-success-claim-name', className: 'info-message--success span--absolute' },\n '\\u2713'\n ),\n urlError && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--failure span--absolute' },\n '\\u2716'\n )\n ),\n _react2.default.createElement(\n 'div',\n null,\n urlError ? _react2.default.createElement(\n 'p',\n { id: 'input-error-claim-name', className: 'info-message--failure' },\n urlError\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Choose a custom url'\n )\n )\n );\n }\n }]);\n\n return PublishUrlInput;\n}(_react2.default.Component);\n\nexports.default = PublishUrlInput;\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction dataURItoBlob(dataURI) {\n // convert base64/URLEncoded data component to raw binary data held in a string\n var byteString = atob(dataURI.split(',')[1]);\n // separate out the mime component\n var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n // write the bytes of the string to a typed array\n var ia = new Uint8Array(byteString.length);\n for (var i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n return new Blob([ia], { type: mimeString });\n}\n\nvar PublishThumbnailInput = function (_React$Component) {\n _inherits(PublishThumbnailInput, _React$Component);\n\n function PublishThumbnailInput(props) {\n _classCallCheck(this, PublishThumbnailInput);\n\n var _this = _possibleConstructorReturn(this, (PublishThumbnailInput.__proto__ || Object.getPrototypeOf(PublishThumbnailInput)).call(this, props));\n\n _this.state = {\n videoSource: null,\n error: null,\n sliderMinRange: 1,\n sliderMaxRange: null,\n sliderValue: null\n };\n _this.handleVideoLoadedData = _this.handleVideoLoadedData.bind(_this);\n _this.handleSliderChange = _this.handleSliderChange.bind(_this);\n _this.createThumbnail = _this.createThumbnail.bind(_this);\n return _this;\n }\n\n _createClass(PublishThumbnailInput, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var file = this.props.file;\n\n this.setVideoSource(file);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n // if file changes\n if (nextProps.file && nextProps.file !== this.props.file) {\n var file = nextProps.file;\n\n this.setVideoSource(file);\n };\n }\n }, {\n key: 'setVideoSource',\n value: function setVideoSource(file) {\n var _this2 = this;\n\n var previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = function () {\n var dataUri = previewReader.result;\n var blob = dataURItoBlob(dataUri);\n var videoSource = URL.createObjectURL(blob);\n _this2.setState({ videoSource: videoSource });\n };\n }\n }, {\n key: 'handleVideoLoadedData',\n value: function handleVideoLoadedData(event) {\n var duration = event.target.duration;\n var totalMinutes = Math.floor(duration / 60);\n var totalSeconds = Math.floor(duration % 60);\n // set the slider\n this.setState({\n sliderMaxRange: duration * 100,\n sliderValue: duration * 100 / 2,\n totalMinutes: totalMinutes,\n totalSeconds: totalSeconds\n });\n // update the current time of the video\n var video = document.getElementById('video-thumb-player');\n video.currentTime = duration / 2;\n }\n }, {\n key: 'handleSliderChange',\n value: function handleSliderChange(event) {\n var value = parseInt(event.target.value);\n // update the slider value\n this.setState({\n sliderValue: value\n });\n // update the current time of the video\n var video = document.getElementById('video-thumb-player');\n video.currentTime = value / 100;\n }\n }, {\n key: 'createThumbnail',\n value: function createThumbnail() {\n // take a snapshot\n var video = document.getElementById('video-thumb-player');\n var canvas = document.createElement('canvas');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);\n var dataUrl = canvas.toDataURL();\n var blob = dataURItoBlob(dataUrl);\n var snapshot = new File([blob], 'thumbnail.png', {\n type: 'image/png'\n });\n // set the thumbnail in redux store\n if (snapshot) {\n this.props.onNewThumbnail(snapshot);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _state = this.state,\n error = _state.error,\n videoSource = _state.videoSource,\n sliderMinRange = _state.sliderMinRange,\n sliderMaxRange = _state.sliderMaxRange,\n sliderValue = _state.sliderValue,\n totalMinutes = _state.totalMinutes,\n totalSeconds = _state.totalSeconds;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'label',\n { className: 'label' },\n 'Thumbnail:'\n ),\n _react2.default.createElement('video', {\n id: 'video-thumb-player',\n preload: 'metadata',\n muted: true,\n style: { display: 'none' },\n playsInline: true,\n onLoadedData: this.handleVideoLoadedData,\n src: videoSource,\n onSeeked: this.createThumbnail\n }),\n sliderValue ? _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'flex-container--row flex-container--space-between-center', style: { width: '100%' } },\n _react2.default.createElement(\n 'span',\n { className: 'info-message' },\n '0\\'00\"'\n ),\n _react2.default.createElement(\n 'span',\n { className: 'info-message' },\n totalMinutes,\n '\\'',\n totalSeconds,\n '\"'\n )\n ),\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('input', {\n type: 'range',\n min: sliderMinRange,\n max: sliderMaxRange,\n value: sliderValue,\n className: 'slider',\n onChange: this.handleSliderChange\n })\n )\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'loading... '\n ),\n error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Use slider to set thumbnail'\n )\n );\n }\n }]);\n\n return PublishThumbnailInput;\n}(_react2.default.Component);\n\nexports.default = PublishThumbnailInput;\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ExpandingTextArea = __webpack_require__(36);\n\nvar _ExpandingTextArea2 = _interopRequireDefault(_ExpandingTextArea);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishMetadataInputs = function (_React$Component) {\n _inherits(PublishMetadataInputs, _React$Component);\n\n function PublishMetadataInputs(props) {\n _classCallCheck(this, PublishMetadataInputs);\n\n var _this = _possibleConstructorReturn(this, (PublishMetadataInputs.__proto__ || Object.getPrototypeOf(PublishMetadataInputs)).call(this, props));\n\n _this.toggleShowInputs = _this.toggleShowInputs.bind(_this);\n _this.handleInput = _this.handleInput.bind(_this);\n _this.handleSelect = _this.handleSelect.bind(_this);\n return _this;\n }\n\n _createClass(PublishMetadataInputs, [{\n key: 'toggleShowInputs',\n value: function toggleShowInputs() {\n this.props.onToggleMetadataInputs(!this.props.showMetadataInputs);\n }\n }, {\n key: 'handleInput',\n value: function handleInput(event) {\n var target = event.target;\n var value = target.type === 'checkbox' ? target.checked : target.value;\n var name = target.name;\n this.props.onMetadataChange(name, value);\n }\n }, {\n key: 'handleSelect',\n value: function handleSelect(event) {\n var name = event.target.name;\n var selectedOption = event.target.selectedOptions[0].value;\n this.props.onMetadataChange(name, selectedOption);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { id: 'publish-details', className: 'row row--padded row--no-top row--wide' },\n this.props.showMetadataInputs && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'row row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'label',\n { htmlFor: 'publish-license', className: 'label' },\n 'Description:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7 column--sml-10' },\n _react2.default.createElement(_ExpandingTextArea2.default, {\n id: 'publish-description',\n className: 'textarea textarea--primary textarea--full-width',\n rows: 1,\n maxLength: 2000,\n style: { maxHeight: 200 },\n name: 'description',\n placeholder: 'Optional description',\n value: this.props.description,\n onChange: this.handleInput })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--med-10' },\n _react2.default.createElement(\n 'label',\n { htmlFor: 'publish-license', className: 'label' },\n 'License:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7 column--sml-10' },\n _react2.default.createElement(\n 'select',\n { type: 'text', name: 'license', id: 'publish-license', className: 'select select--primary', onChange: this.handleSelect },\n _react2.default.createElement(\n 'option',\n { value: ' ' },\n 'Unspecified'\n ),\n _react2.default.createElement(\n 'option',\n { value: 'Public Domain' },\n 'Public Domain'\n ),\n _react2.default.createElement(\n 'option',\n { value: 'Creative Commons' },\n 'Creative Commons'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3' },\n _react2.default.createElement(\n 'label',\n { htmlFor: 'publish-nsfw', className: 'label' },\n 'Mature:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement('input', { className: 'input-checkbox', type: 'checkbox', id: 'publish-nsfw', name: 'nsfw', value: this.props.nsfw, onChange: this.handleInput })\n )\n )\n ),\n _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.toggleShowInputs },\n this.props.showMetadataInputs ? 'less' : 'more'\n )\n );\n }\n }]);\n\n return PublishMetadataInputs;\n}(_react2.default.Component);\n\nexports.default = PublishMetadataInputs;\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishDisabledMessage = function (_React$Component) {\n _inherits(PublishDisabledMessage, _React$Component);\n\n function PublishDisabledMessage() {\n _classCallCheck(this, PublishDisabledMessage);\n\n return _possibleConstructorReturn(this, (PublishDisabledMessage.__proto__ || Object.getPrototypeOf(PublishDisabledMessage)).apply(this, arguments));\n }\n\n _createClass(PublishDisabledMessage, [{\n key: 'render',\n value: function render() {\n var message = this.props.message;\n console.log('this.props.message:', message);\n return _react2.default.createElement(\n 'div',\n { className: 'row dropzone--disabled row--tall flex-container--column flex-container--center-center' },\n _react2.default.createElement(\n 'p',\n { className: 'text--disabled' },\n 'Publishing is currently disabled.'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'text--disabled' },\n message\n )\n );\n }\n }]);\n\n return PublishDisabledMessage;\n}(_react2.default.Component);\n\nexports.default = PublishDisabledMessage;\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(10);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _publish_claim_states = __webpack_require__(170);\n\nvar publishStates = _interopRequireWildcard(_publish_claim_states);\n\nfunction _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; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishStatus = function (_React$Component) {\n _inherits(PublishStatus, _React$Component);\n\n function PublishStatus() {\n _classCallCheck(this, PublishStatus);\n\n return _possibleConstructorReturn(this, (PublishStatus.__proto__ || Object.getPrototypeOf(PublishStatus)).apply(this, arguments));\n }\n\n _createClass(PublishStatus, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n status = _props.status,\n message = _props.message,\n clearFile = _props.clearFile;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column flex-container--center-center' },\n status === publishStates.LOAD_START && _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'File is loading to server'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'blue' },\n '0%'\n )\n ),\n status === publishStates.LOADING && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'File is loading to server'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'blue' },\n message\n )\n )\n ),\n status === publishStates.PUBLISHING && _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'Upload complete. Your file is now being published on the blockchain...'\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 }),\n _react2.default.createElement(\n 'p',\n null,\n 'Curious what magic is happening here? ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: 'blank', href: 'https://lbry.io/faq/what-is-lbry' },\n 'Learn more.'\n )\n )\n ),\n status === publishStates.SUCCESS && _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'Your publish is complete! You are being redirected to it now.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you are not automatically redirected, ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: message },\n 'click here.'\n )\n )\n ),\n status === publishStates.FAILED && _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'Something went wrong...'\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'strong',\n null,\n message\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'For help, post the above error text in the #speech channel on the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS', target: '_blank' },\n 'lbry discord'\n )\n ),\n _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: clearFile },\n 'Reset'\n )\n )\n );\n }\n }]);\n\n return PublishStatus;\n}(_react2.default.Component);\n\n;\n\nexports.default = PublishStatus;\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _Dropzone = __webpack_require__(18);\n\nvar _Dropzone2 = _interopRequireDefault(_Dropzone);\n\nvar _PublishDetails = __webpack_require__(40);\n\nvar _PublishDetails2 = _interopRequireDefault(_PublishDetails);\n\nvar _PublishStatus = __webpack_require__(46);\n\nvar _PublishStatus2 = _interopRequireDefault(_PublishStatus);\n\nvar _PublishDisabledMessage = __webpack_require__(45);\n\nvar _PublishDisabledMessage2 = _interopRequireDefault(_PublishDisabledMessage);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishTool = function (_React$Component) {\n _inherits(PublishTool, _React$Component);\n\n function PublishTool() {\n _classCallCheck(this, PublishTool);\n\n return _possibleConstructorReturn(this, (PublishTool.__proto__ || Object.getPrototypeOf(PublishTool)).apply(this, arguments));\n }\n\n _createClass(PublishTool, [{\n key: 'render',\n value: function render() {\n if (this.props.disabled) {\n console.log('publish is disabled');\n return _react2.default.createElement(_PublishDisabledMessage2.default, null);\n } else {\n console.log('publish is not disabled');\n if (this.props.file) {\n if (this.props.status) {\n return _react2.default.createElement(_PublishStatus2.default, null);\n } else {\n return _react2.default.createElement(_PublishDetails2.default, null);\n }\n }\n return _react2.default.createElement(_Dropzone2.default, null);\n }\n }\n }]);\n\n return PublishTool;\n}(_react2.default.Component);\n\n;\n\nexports.default = PublishTool;\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"passport\");\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction MysqlConfig() {\n var _this = this;\n\n this.database = 'default';\n this.username = 'default';\n this.password = 'default';\n this.configure = function (config) {\n if (!config) {\n return console.log('No MySQL config received.');\n }\n var database = config.database,\n username = config.username,\n password = config.password;\n\n _this.database = database;\n _this.username = username;\n _this.password = password;\n };\n};\n\nmodule.exports = new MysqlConfig();\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction SlackConfig() {\n var _this = this;\n\n this.slackWebHook = 'default';\n this.slackErrorChannel = 'default';\n this.slackInfoChannel = 'default';\n this.configure = function (config) {\n if (!config) {\n return console.log('No slack config received.');\n }\n var slackWebHook = config.slackWebHook,\n slackErrorChannel = config.slackErrorChannel,\n slackInfoChannel = config.slackInfoChannel;\n\n _this.slackWebHook = slackWebHook;\n _this.slackErrorChannel = slackErrorChannel;\n _this.slackInfoChannel = slackInfoChannel;\n };\n};\n\nmodule.exports = new SlackConfig();\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"passport-local\");\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"sequelize\");\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n returnShortId: function returnShortId(claimsArray, longId) {\n var claimIndex = void 0;\n var shortId = longId.substring(0, 1); // default short id is the first letter\n var shortIdLength = 0;\n // find the index of this claim id\n claimIndex = claimsArray.findIndex(function (element) {\n return element.claimId === longId;\n });\n if (claimIndex < 0) {\n throw new Error('claim id not found in claims list');\n }\n // get an array of all claims with lower height\n var possibleMatches = claimsArray.slice(0, claimIndex);\n // remove certificates with the same prefixes until none are left.\n while (possibleMatches.length > 0) {\n shortIdLength += 1;\n shortId = longId.substring(0, shortIdLength);\n possibleMatches = possibleMatches.filter(function (element) {\n return element.claimId && element.claimId.substring(0, shortIdLength) === shortId;\n });\n }\n return shortId;\n }\n};\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\nvar fs = __webpack_require__(98);\n\nvar _require = __webpack_require__(3),\n details = _require.details,\n publishing = _require.publishing;\n\nmodule.exports = {\n parsePublishApiRequestBody: function parsePublishApiRequestBody(_ref) {\n var name = _ref.name,\n nsfw = _ref.nsfw,\n license = _ref.license,\n title = _ref.title,\n description = _ref.description,\n thumbnail = _ref.thumbnail;\n\n // validate name\n if (!name) {\n throw new Error('no name field found in request');\n }\n var invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name);\n if (invalidNameCharacters) {\n throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and \"-\"');\n }\n // optional parameters\n nsfw = nsfw === 'true';\n license = license || null;\n title = title || null;\n description = description || null;\n thumbnail = thumbnail || null;\n // return results\n return {\n name: name,\n nsfw: nsfw,\n license: license,\n title: title,\n description: description,\n thumbnail: thumbnail\n };\n },\n parsePublishApiRequestFiles: function parsePublishApiRequestFiles(_ref2) {\n var file = _ref2.file,\n thumbnail = _ref2.thumbnail;\n\n // make sure a file was provided\n if (!file) {\n throw new Error('no file with key of [file] found in request');\n }\n if (!file.path) {\n throw new Error('no file path found');\n }\n if (!file.type) {\n throw new Error('no file type found');\n }\n if (!file.size) {\n throw new Error('no file type found');\n }\n // validate the file name\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate the file\n module.exports.validateFileTypeAndSize(file);\n // return results\n return {\n fileName: file.name,\n filePath: file.path,\n fileType: file.type,\n thumbnailFileName: thumbnail ? thumbnail.name : null,\n thumbnailFilePath: thumbnail ? thumbnail.path : null,\n thumbnailFileType: thumbnail ? thumbnail.type : null\n };\n },\n validateFileTypeAndSize: function validateFileTypeAndSize(file) {\n // check file type and size\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n logger.debug('publish > file validation > .jpeg/.jpg/.png was too big');\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .gif was too big');\n throw new Error('Sorry, .gifs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .mp4 was too big');\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n logger.debug('publish > file validation > unrecognized file type');\n throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n return file;\n },\n createBasicPublishParams: function createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail) {\n logger.debug('Creating Publish Parameters');\n // provide defaults for title\n if (title === null || title.trim() === '') {\n title = name;\n }\n // provide default for description\n if (description === null || description.trim() === '') {\n description = '';\n }\n // provide default for license\n if (license === null || license.trim() === '') {\n license = ' '; // default to empty string\n }\n // create the publish params\n var publishParams = {\n name: name,\n file_path: filePath,\n bid: 0.01,\n metadata: {\n description: description,\n title: title,\n author: details.title,\n language: 'en',\n license: license,\n nsfw: nsfw\n },\n claim_address: publishing.primaryClaimAddress\n };\n // add thumbnail to channel if video\n if (thumbnail) {\n publishParams['metadata']['thumbnail'] = thumbnail;\n }\n return publishParams;\n },\n createThumbnailPublishParams: function createThumbnailPublishParams(thumbnailFilePath, claimName, license, nsfw) {\n if (!thumbnailFilePath) {\n return;\n }\n logger.debug('Creating Thumbnail Publish Parameters');\n // create the publish params\n return {\n name: claimName + '-thumb',\n file_path: thumbnailFilePath,\n bid: 0.01,\n metadata: {\n title: claimName + ' thumbnail',\n description: 'a thumbnail for ' + claimName,\n author: details.title,\n language: 'en',\n license: license,\n nsfw: nsfw\n },\n claim_address: publishing.primaryClaimAddress,\n channel_name: publishing.thumbnailChannel,\n channel_id: publishing.thumbnailChannelId\n };\n },\n deleteTemporaryFile: function deleteTemporaryFile(filePath) {\n fs.unlink(filePath, function (err) {\n if (err) {\n logger.error('error deleting temporary file ' + filePath);\n throw err;\n }\n logger.debug('successfully deleted ' + filePath);\n });\n },\n addGetResultsToFileData: function addGetResultsToFileData(fileInfo, getResult) {\n fileInfo.fileName = getResult.file_name;\n fileInfo.filePath = getResult.download_path;\n return fileInfo;\n },\n createFileData: function createFileData(_ref3) {\n var name = _ref3.name,\n claimId = _ref3.claimId,\n outpoint = _ref3.outpoint,\n height = _ref3.height,\n address = _ref3.address,\n nsfw = _ref3.nsfw,\n contentType = _ref3.contentType;\n\n return {\n name: name,\n claimId: claimId,\n outpoint: outpoint,\n height: height,\n address: address,\n fileName: '',\n filePath: '',\n fileType: contentType,\n nsfw: nsfw\n };\n }\n};\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"fs\");\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n handleErrorResponse: function handleErrorResponse(originalUrl, ip, error, res) {\n logger.error('Error on ' + originalUrl, module.exports.useObjectPropertiesIfNoKeys(error));\n\n var _module$exports$retur = module.exports.returnErrorMessageAndStatus(error),\n _module$exports$retur2 = _slicedToArray(_module$exports$retur, 2),\n status = _module$exports$retur2[0],\n message = _module$exports$retur2[1];\n\n res.status(status).json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function returnErrorMessageAndStatus(error) {\n var status = void 0,\n message = void 0;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function useObjectPropertiesIfNoKeys(err) {\n if (Object.keys(err).length === 0) {\n var newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach(function (key) {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload: function createErrorResponsePayload(status, message) {\n return {\n status: status,\n success: false,\n message: message\n };\n }\n};\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar db = __webpack_require__(9);\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(145),\n returnPaginatedChannelClaims = _require.returnPaginatedChannelClaims;\n\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\nvar NO_FILE = 'NO_FILE';\n\nmodule.exports = {\n getClaimId: function getClaimId(channelName, channelClaimId, name, claimId) {\n if (channelName) {\n return module.exports.getClaimIdByChannel(channelName, channelClaimId, name);\n } else {\n return module.exports.getClaimIdByClaim(name, claimId);\n }\n },\n getClaimIdByClaim: function getClaimIdByClaim(claimName, claimId) {\n logger.debug('getClaimIdByClaim(' + claimName + ', ' + claimId + ')');\n return new Promise(function (resolve, reject) {\n db.Claim.getLongClaimId(claimName, claimId).then(function (longClaimId) {\n if (!longClaimId) {\n resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getClaimIdByChannel: function getClaimIdByChannel(channelName, channelClaimId, claimName) {\n logger.debug('getClaimIdByChannel(' + channelName + ', ' + channelClaimId + ', ' + claimName + ')');\n return new Promise(function (resolve, reject) {\n db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id\n .then(function (longChannelId) {\n if (!longChannelId) {\n return [null, null];\n }\n return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n longChannelId = _ref2[0],\n longClaimId = _ref2[1];\n\n if (!longChannelId) {\n return resolve(NO_CHANNEL);\n }\n if (!longClaimId) {\n return resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getChannelData: function getChannelData(channelName, channelClaimId, page) {\n return new Promise(function (resolve, reject) {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId).then(function (longChannelClaimId) {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]);\n }).then(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n longChannelClaimId = _ref4[0],\n shortChannelClaimId = _ref4[1];\n\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. return all the channel information\n resolve({\n channelName: channelName,\n longChannelClaimId: longChannelClaimId,\n shortChannelClaimId: shortChannelClaimId\n });\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getChannelClaims: function getChannelClaims(channelName, channelClaimId, page) {\n return new Promise(function (resolve, reject) {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId).then(function (longChannelClaimId) {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]);\n }).then(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n longChannelClaimId = _ref6[0],\n channelClaimsArray = _ref6[1];\n\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. format the data for the view, including pagination\n var paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);\n // 4. return all the channel information and contents\n resolve(paginatedChannelViewData);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getLocalFileRecord: function getLocalFileRecord(claimId, name) {\n return db.File.findOne({ where: { claimId: claimId, name: name } }).then(function (file) {\n if (!file) {\n return NO_FILE;\n }\n return file.dataValues;\n });\n }\n};\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(102);\n\nvar _redux = __webpack_require__(57);\n\nvar _reducers = __webpack_require__(103);\n\nvar _reducers2 = _interopRequireDefault(_reducers);\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _GAListener = __webpack_require__(13);\n\nvar _GAListener2 = _interopRequireDefault(_GAListener);\n\nvar _app = __webpack_require__(108);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(113);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reactHelmet = __webpack_require__(48);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_reducers2.default);\n\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _GAListener2.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `` was rendered\n return res.redirect(301, context.url);\n } else {}\n // we're good, send the response\n\n\n // get the initial state from our Redux store\n var preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send((0, _renderFullPage2.default)(helmet, html, preloadedState));\n};\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-dom/server\");\n\n/***/ }),\n/* 103 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _redux = __webpack_require__(57);\n\nvar _publish = __webpack_require__(147);\n\nvar _publish2 = _interopRequireDefault(_publish);\n\nvar _channel = __webpack_require__(148);\n\nvar _channel2 = _interopRequireDefault(_channel);\n\nvar _show = __webpack_require__(149);\n\nvar _show2 = _interopRequireDefault(_show);\n\nvar _site = __webpack_require__(150);\n\nvar _site2 = _interopRequireDefault(_site);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = (0, _redux.combineReducers)({\n channel: _channel2.default,\n publish: _publish2.default,\n show: _show2.default,\n site: _site2.default\n});\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar FILE_SELECTED = exports.FILE_SELECTED = 'FILE_SELECTED';\nvar FILE_CLEAR = exports.FILE_CLEAR = 'FILE_CLEAR';\nvar METADATA_UPDATE = exports.METADATA_UPDATE = 'METADATA_UPDATE';\nvar CLAIM_UPDATE = exports.CLAIM_UPDATE = 'CLAIM_UPDATE';\nvar SET_PUBLISH_IN_CHANNEL = exports.SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';\nvar PUBLISH_STATUS_UPDATE = exports.PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';\nvar ERROR_UPDATE = exports.ERROR_UPDATE = 'ERROR_UPDATE';\nvar SELECTED_CHANNEL_UPDATE = exports.SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';\nvar TOGGLE_METADATA_INPUTS = exports.TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';\nvar THUMBNAIL_NEW = exports.THUMBNAIL_NEW = 'THUMBNAIL_NEW';\nvar PUBLISH_START = exports.PUBLISH_START = 'PUBLISH_START';\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOGIN = exports.LOGIN = 'Existing';\nvar CREATE = exports.CREATE = 'New';\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar CHANNEL_UPDATE = exports.CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOCAL_CHECK = exports.LOCAL_CHECK = 'LOCAL_CHECK';\nvar UNAVAILABLE = exports.UNAVAILABLE = 'UNAVAILABLE';\nvar ERROR = exports.ERROR = 'ERROR';\nvar AVAILABLE = exports.AVAILABLE = 'AVAILABLE';\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _dynamicImport = __webpack_require__(58);\n\nvar _AboutPage = __webpack_require__(20);\n\nvar _AboutPage2 = _interopRequireDefault(_AboutPage);\n\nvar _LoginPage = __webpack_require__(23);\n\nvar _LoginPage2 = _interopRequireDefault(_LoginPage);\n\nvar _ShowPage = __webpack_require__(26);\n\nvar _ShowPage2 = _interopRequireDefault(_ShowPage);\n\nvar _FourOhFourPage = __webpack_require__(35);\n\nvar _FourOhFourPage2 = _interopRequireDefault(_FourOhFourPage);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HomePage = (0, _dynamicImport.dynamicImport)('pages/HomePage'); // or use the provided local homepage\n\nvar App = function App() {\n return _react2.default.createElement(\n _reactRouterDom.Switch,\n null,\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/', component: HomePage }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/about', component: _AboutPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/login', component: _LoginPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/:identifier/:claim', component: _ShowPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/:claim', component: _ShowPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { component: _FourOhFourPage2.default })\n );\n};\n\nexports.default = App;\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./canonicalLink\": 59,\n\t\"./canonicalLink.js\": 59,\n\t\"./dynamicImport\": 58,\n\t\"./dynamicImport.js\": 58,\n\t\"./file\": 60,\n\t\"./file.js\": 60,\n\t\"./lbryUri\": 61,\n\t\"./lbryUri.js\": 61,\n\t\"./metaTags\": 62,\n\t\"./metaTags.js\": 62,\n\t\"./pageTitle\": 63,\n\t\"./pageTitle.js\": 63,\n\t\"./publish\": 110,\n\t\"./publish.js\": 110,\n\t\"./request\": 8,\n\t\"./request.js\": 8,\n\t\"./validate\": 111,\n\t\"./validate.js\": 111\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 109;\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createPublishMetadata = exports.createPublishMetadata = function createPublishMetadata(claim, _ref, _ref2, publishInChannel, selectedChannel) {\n var type = _ref.type;\n var title = _ref2.title,\n description = _ref2.description,\n license = _ref2.license,\n nsfw = _ref2.nsfw;\n\n var metadata = {\n name: claim,\n title: title,\n description: description,\n license: license,\n nsfw: nsfw,\n type: type\n };\n if (publishInChannel) {\n metadata['channelName'] = selectedChannel;\n }\n return metadata;\n};\n\nvar createPublishFormData = exports.createPublishFormData = function createPublishFormData(file, thumbnail, metadata) {\n var fd = new FormData();\n // append file\n fd.append('file', file);\n // append thumbnail\n if (thumbnail) {\n fd.append('thumbnail', thumbnail);\n }\n // append metadata\n for (var key in metadata) {\n if (metadata.hasOwnProperty(key)) {\n fd.append(key, metadata[key]);\n }\n }\n return fd;\n};\n\nvar createThumbnailUrl = exports.createThumbnailUrl = function createThumbnailUrl(channel, channelId, claim, host) {\n return host + '/' + channel + ':' + channelId + '/' + claim + '-thumb.png';\n};\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar validateChannelSelection = exports.validateChannelSelection = function validateChannelSelection(publishInChannel, selectedChannel, loggedInChannel) {\n if (publishInChannel && selectedChannel !== loggedInChannel.name) {\n throw new Error('Log in to a channel or select Anonymous');\n }\n};\n\nvar validatePublishParams = exports.validatePublishParams = function validatePublishParams(file, claim, urlError) {\n if (!file) {\n throw new Error('Please choose a file');\n }\n if (!claim) {\n throw new Error('Please enter a URL');\n }\n if (urlError) {\n throw new Error('Fix the url');\n }\n};\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar CHANNEL = exports.CHANNEL = 'CHANNEL';\nvar ASSET_LITE = exports.ASSET_LITE = 'ASSET_LITE';\nvar ASSET_DETAILS = exports.ASSET_DETAILS = 'ASSET_DETAILS';\n\n/***/ }),\n/* 113 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (helmet, html, preloadedState) {\n // take the html and preloadedState and return the full page\n return '\\n \\n \\n \\n \\n \\n \\n \\n ' + helmet.title.toString() + '\\n ' + helmet.meta.toString() + '\\n ' + helmet.link.toString() + '\\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n
' + html + '
\\n
\\n \\n \\n \\n \\n ';\n};\n\n/***/ }),\n/* 114 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar selectSiteState = exports.selectSiteState = function selectSiteState(state) {\n return state.site;\n};\n\nvar selectSiteHost = exports.selectSiteHost = function selectSiteHost(state) {\n return state.site.host;\n};\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(116);\n__webpack_require__(117);\nmodule.exports = __webpack_require__(118);\n\n\n/***/ }),\n/* 116 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"babel-polyfill\");\n\n/***/ }),\n/* 117 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"whatwg-fetch\");\n\n/***/ }),\n/* 118 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Server = __webpack_require__(119);\nvar Components = __webpack_require__(50);\nvar Containers = __webpack_require__(52);\nvar Pages = __webpack_require__(53);\n\nvar _exports = {\n Server: Server,\n Components: Components,\n Containers: Containers,\n Pages: Pages\n};\n\nmodule.exports = _exports;\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// app dependencies\nvar express = __webpack_require__(120);\nvar bodyParser = __webpack_require__(121);\nvar expressHandlebars = __webpack_require__(122);\nvar Handlebars = __webpack_require__(123);\nvar helmet = __webpack_require__(124);\nvar passport = __webpack_require__(91);\n\nvar _require = __webpack_require__(125),\n serializeSpeechUser = _require.serializeSpeechUser,\n deserializeSpeechUser = _require.deserializeSpeechUser;\n\nvar cookieSession = __webpack_require__(126);\nvar http = __webpack_require__(127);\n// logging dependencies\nvar logger = __webpack_require__(2);\n\nfunction Server() {\n var _this = this;\n\n this.configureMysql = function (mysqlConfig) {\n __webpack_require__(92).configure(mysqlConfig);\n };\n this.configureSite = function (siteConfig) {\n __webpack_require__(3).configure(siteConfig);\n _this.sessionKey = siteConfig.auth.sessionKey;\n _this.PORT = siteConfig.details.port;\n };\n this.configureSlack = function (slackConfig) {\n __webpack_require__(93).configure(slackConfig);\n };\n this.createApp = function () {\n // create an Express application\n var app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(__dirname + '/public')); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use(function (req, res, next) {\n // custom logging middleware to log all incoming http requests\n logger.verbose('Request on ' + req.originalUrl + ' from ' + req.ip);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n var localSignupStrategy = __webpack_require__(128);\n var localLoginStrategy = __webpack_require__(139);\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name: 'session',\n keys: [_this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000 // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n var hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars: Handlebars\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n __webpack_require__(140)(app);\n __webpack_require__(141)(app);\n __webpack_require__(146)(app);\n __webpack_require__(153)(app);\n __webpack_require__(163)(app);\n\n _this.app = app;\n };\n this.initialize = function () {\n __webpack_require__(164)(logger);\n __webpack_require__(166)(logger);\n _this.createApp();\n _this.server = http.Server(_this.app);\n };\n this.start = function () {\n var db = __webpack_require__(9);\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(function () {\n _this.server.listen(_this.PORT, function () {\n logger.info('Server is listening on PORT ' + _this.PORT);\n });\n }).catch(function (error) {\n logger.error('Startup Error:', error);\n });\n };\n};\n\nmodule.exports = Server;\n\n/***/ }),\n/* 120 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express\");\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"body-parser\");\n\n/***/ }),\n/* 122 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express-handlebars\");\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"handlebars\");\n\n/***/ }),\n/* 124 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"helmet\");\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n serializeSpeechUser: function serializeSpeechUser(user, done) {\n // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser: function deserializeSpeechUser(user, done) {\n // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n }\n};\n\n/***/ }),\n/* 126 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cookie-session\");\n\n/***/ }),\n/* 127 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"http\");\n\n/***/ }),\n/* 128 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar PassportLocalStrategy = __webpack_require__(94).Strategy;\nvar lbryApi = __webpack_require__(55);\nvar logger = __webpack_require__(2);\nvar db = __webpack_require__(9);\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n logger.verbose('new channel signup request. user: ' + username + ' pass: ' + password + ' .');\n var userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel('@' + username).then(function (tx) {\n // create user record\n var userData = {\n userName: username,\n password: password\n };\n logger.verbose('userData >', userData);\n // create user record\n var channelData = {\n channelName: '@' + username,\n channelClaimId: tx.claim_id\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n var certificateData = {\n claimId: tx.claim_id,\n name: '@' + username\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 3),\n newUser = _ref2[0],\n newChannel = _ref2[1],\n newCertificate = _ref2[2];\n\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n }).then(function () {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n }).catch(function (error) {\n logger.error('signup error', error);\n return done(error);\n });\n});\n\n/***/ }),\n/* 129 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"axios\");\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279'\n }\n};\n\nmodule.exports = lbryConfig;\n\n/***/ }),\n/* 131 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"universal-analytics\");\n\n/***/ }),\n/* 132 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(96),\n returnShortId = _require.returnShortId;\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Certificate = sequelize.define('Certificate', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateVersion: {\n type: STRING,\n default: null\n },\n keyType: {\n type: STRING,\n default: null\n },\n publicKey: {\n type: TEXT('long'),\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Certificate.associate = function (db) {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n var _this = this;\n\n logger.debug('getShortChannelIdFromLongChannelId ' + channelName + ':' + longChannelId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: channelName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n var _this2 = this;\n\n logger.debug('getLongChannelIdFromShortChannelId(' + channelName + ', ' + channelClaimId + ')');\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: {\n name: channelName,\n claimId: {\n $like: channelClaimId + '%'\n }\n },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n var _this3 = this;\n\n logger.debug('getLongChannelIdFromChannelName(' + channelName + ')');\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n var _this4 = this;\n\n logger.debug('validateLongChannelId(' + name + ', ' + claimId + ')');\n return new Promise(function (resolve, reject) {\n _this4.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug('getLongChannelId(' + channelName + ', ' + channelClaimId + ')');\n if (channelClaimId && channelClaimId.length === 40) {\n // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) {\n // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n/***/ }),\n/* 133 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var Channel = sequelize.define('Channel', {\n channelName: {\n type: STRING,\n allowNull: false\n },\n channelClaimId: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n Channel.associate = function (db) {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n/***/ }),\n/* 134 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(96),\n returnShortId = _require.returnShortId;\n\nvar _require2 = __webpack_require__(3),\n defaultThumbnail = _require2.assetDefaults.thumbnail,\n host = _require2.details.host;\n\nfunction determineFileExtensionFromContentType(contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail(storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData(claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Claim = sequelize.define('Claim', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateId: {\n type: STRING,\n default: null\n },\n author: {\n type: STRING,\n default: null\n },\n description: {\n type: TEXT('long'),\n default: null\n },\n language: {\n type: STRING,\n default: null\n },\n license: {\n type: STRING,\n default: null\n },\n licenseUrl: {\n type: STRING,\n default: null\n },\n nsfw: {\n type: BOOLEAN,\n default: null\n },\n preview: {\n type: STRING,\n default: null\n },\n thumbnail: {\n type: STRING,\n default: null\n },\n title: {\n type: STRING,\n default: null\n },\n metadataVersion: {\n type: STRING,\n default: null\n },\n contentType: {\n type: STRING,\n default: null\n },\n source: {\n type: STRING,\n default: null\n },\n sourceType: {\n type: STRING,\n default: null\n },\n sourceVersion: {\n type: STRING,\n default: null\n },\n streamVersion: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n channelName: {\n type: STRING,\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Claim.associate = function (db) {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n var _this = this;\n\n logger.debug('Claim.getShortClaimIdFromLongClaimId for ' + claimName + '#' + claimId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: claimName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n var _this2 = this;\n\n logger.debug('Claim.getAllChannelClaims for ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw: true // returns an array of only data, not an array of instances\n }).then(function (channelClaimsArray) {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(function (claim) {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n var _this3 = this;\n\n logger.debug('finding claim id for claim ' + claimName + ' from channel ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(result.length + ' records found for \"' + claimName + '\" in channel \"' + channelClaimId + '\"');\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n var _this4 = this;\n\n return new Promise(function (resolve, reject) {\n _this4.findAll({\n where: {\n name: name,\n claimId: {\n $like: shortId + '%'\n } },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n var _this5 = this;\n\n return new Promise(function (resolve, reject) {\n _this5.findAll({\n where: { name: name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] // note: maybe height and effective amount need to switch?\n }).then(function (result) {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n var _this6 = this;\n\n return new Promise(function (resolve, reject) {\n _this6.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug('getLongClaimId(' + claimName + ', ' + claimId + ')');\n if (claimId && claimId.length === 40) {\n // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n var _this7 = this;\n\n logger.debug('Claim.resolveClaim: ' + name + ' ' + claimId);\n return new Promise(function (resolve, reject) {\n _this7.findAll({\n where: { name: name, claimId: claimId }\n }).then(function (claimArray) {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error('more than one record matches ' + name + '#' + claimId + ' in db.Claim');\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n/***/ }),\n/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER;\n\n var File = sequelize.define('File', {\n name: {\n type: STRING,\n allowNull: false\n },\n claimId: {\n type: STRING,\n allowNull: false\n },\n address: {\n type: STRING,\n allowNull: false\n },\n outpoint: {\n type: STRING,\n allowNull: false\n },\n height: {\n type: INTEGER,\n allowNull: false,\n default: 0\n },\n fileName: {\n type: STRING,\n allowNull: false\n },\n filePath: {\n type: STRING,\n allowNull: false\n },\n fileType: {\n type: STRING\n },\n nsfw: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: false\n },\n trendingEligible: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: true\n }\n }, {\n freezeTableName: true\n });\n\n File.associate = function (db) {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25\n });\n };\n\n return File;\n};\n\n/***/ }),\n/* 136 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n TEXT = _ref.TEXT;\n\n var Request = sequelize.define('Request', {\n action: {\n type: STRING,\n allowNull: false\n },\n url: {\n type: STRING,\n allowNull: false\n },\n ipAddress: {\n type: STRING,\n allowNull: true\n },\n result: {\n type: TEXT('long'),\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Request.associate = function (db) {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n return Request;\n};\n\n/***/ }),\n/* 137 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar bcrypt = __webpack_require__(138);\nvar logger = __webpack_require__(2);\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var User = sequelize.define('User', {\n userName: {\n type: STRING,\n allowNull: false\n },\n password: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n User.associate = function (db) {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n _this.update({ password: hash }).then(function () {\n resolve();\n }).catch(function (error) {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', function (user, options) {\n logger.debug('User.beforeCreate hook...');\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n/***/ }),\n/* 138 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"bcrypt\");\n\n/***/ }),\n/* 139 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PassportLocalStrategy = __webpack_require__(94).Strategy;\nvar logger = __webpack_require__(2);\nvar db = __webpack_require__(9);\n\nvar returnUserAndChannelInfo = function returnUserAndChannelInfo(userInstance) {\n return new Promise(function (resolve, reject) {\n var userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance.getChannel().then(function (_ref) {\n var channelName = _ref.channelName,\n channelClaimId = _ref.channelClaimId;\n\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n }).catch(function (error) {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n return db.User.findOne({\n where: { userName: username }\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n return user.comparePassword(password).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user).then(function (userInfo) {\n return done(null, userInfo);\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return done(error);\n });\n});\n\n/***/ }),\n/* 140 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\nvar passport = __webpack_require__(91);\n\nmodule.exports = function (app) {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), function (req, res) {\n logger.verbose('successful signup for ' + req.user.channelName);\n res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n // route for log in\n app.post('/login', function (req, res, next) {\n passport.authenticate('local-login', function (err, user, info) {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message\n });\n }\n logger.debug('successful login');\n req.logIn(user, function (err) {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', function (req, res) {\n req.logout();\n res.status(200).json({ success: true, message: 'you successfully logged out' });\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', function (req, res) {\n if (req.user) {\n res.status(200).json({ success: true, data: req.user });\n } else {\n res.status(401).json({ success: false, message: 'user is not logged in' });\n }\n });\n};\n\n/***/ }),\n/* 141 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(2);\nvar multipart = __webpack_require__(142);\n\nvar _require = __webpack_require__(3),\n uploadDirectory = _require.publishing.uploadDirectory,\n host = _require.details.host;\n\nvar multipartMiddleware = multipart({ uploadDir: uploadDirectory });\nvar db = __webpack_require__(9);\n\nvar _require2 = __webpack_require__(143),\n claimNameIsAvailable = _require2.claimNameIsAvailable,\n checkChannelAvailability = _require2.checkChannelAvailability,\n publish = _require2.publish;\n\nvar _require3 = __webpack_require__(55),\n getClaimList = _require3.getClaimList,\n resolveUri = _require3.resolveUri,\n getClaim = _require3.getClaim;\n\nvar _require4 = __webpack_require__(97),\n addGetResultsToFileData = _require4.addGetResultsToFileData,\n createBasicPublishParams = _require4.createBasicPublishParams,\n createThumbnailPublishParams = _require4.createThumbnailPublishParams,\n parsePublishApiRequestBody = _require4.parsePublishApiRequestBody,\n parsePublishApiRequestFiles = _require4.parsePublishApiRequestFiles,\n createFileData = _require4.createFileData;\n\nvar errorHandlers = __webpack_require__(99);\n\nvar _require5 = __webpack_require__(56),\n sendGATimingEvent = _require5.sendGATimingEvent;\n\nvar _require6 = __webpack_require__(144),\n authenticateUser = _require6.authenticateUser;\n\nvar _require7 = __webpack_require__(100),\n getChannelData = _require7.getChannelData,\n getChannelClaims = _require7.getChannelClaims,\n getClaimId = _require7.getClaimId;\n\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = function (app) {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', function (_ref, res) {\n var ip = _ref.ip,\n originalUrl = _ref.originalUrl,\n name = _ref.params.name;\n\n var gaStartTime = Date.now();\n checkChannelAvailability(name).then(function (availableName) {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', function (_ref2, res) {\n var ip = _ref2.ip,\n originalUrl = _ref2.originalUrl,\n params = _ref2.params;\n\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name).then(function (shortId) {\n res.status(200).json(shortId);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', function (_ref3, res) {\n var ip = _ref3.ip,\n originalUrl = _ref3.originalUrl,\n body = _ref3.body,\n params = _ref3.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', function (_ref4, res) {\n var ip = _ref4.ip,\n originalUrl = _ref4.originalUrl,\n body = _ref4.body,\n params = _ref4.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n var page = params.page;\n getChannelClaims(channelName, channelClaimId, page).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', function (_ref5, res) {\n var ip = _ref5.ip,\n originalUrl = _ref5.originalUrl,\n params = _ref5.params;\n\n getClaimList(params.name).then(function (claimsList) {\n res.status(200).json(claimsList);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', function (_ref6, res) {\n var ip = _ref6.ip,\n originalUrl = _ref6.originalUrl,\n params = _ref6.params;\n\n var name = params.name;\n var claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId).then(function (resolveResult) {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n var fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(name + '#' + claimId)]);\n }).then(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n fileData = _ref8[0],\n getResult = _ref8[1];\n\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, { name: name, claimId: claimId }, 'File'), getResult]);\n }).then(function (_ref9) {\n var _ref10 = _slicedToArray(_ref9, 2),\n fileRecord = _ref10[0],\n _ref10$ = _ref10[1],\n message = _ref10$.message,\n completed = _ref10$.completed;\n\n res.status(200).json({ success: true, message: message, completed: completed });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', function (_ref11, res) {\n var ip = _ref11.ip,\n originalUrl = _ref11.originalUrl,\n name = _ref11.params.name;\n\n var gaStartTime = Date.now();\n claimNameIsAvailable(name).then(function (result) {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', function (_ref12, res) {\n var headers = _ref12.headers,\n ip = _ref12.ip,\n originalUrl = _ref12.originalUrl,\n params = _ref12.params;\n\n resolveUri(params.name + '#' + params.claimId).then(function (resolvedUri) {\n res.status(200).json(resolvedUri);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, function (_ref13, res) {\n var body = _ref13.body,\n files = _ref13.files,\n headers = _ref13.headers,\n ip = _ref13.ip,\n originalUrl = _ref13.originalUrl,\n user = _ref13.user;\n\n // define variables\n var channelName = void 0,\n channelId = void 0,\n channelPassword = void 0,\n description = void 0,\n fileName = void 0,\n filePath = void 0,\n fileType = void 0,\n gaStartTime = void 0,\n license = void 0,\n name = void 0,\n nsfw = void 0,\n thumbnail = void 0,\n thumbnailFileName = void 0,\n thumbnailFilePath = void 0,\n thumbnailFileType = void 0,\n title = void 0;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n var _parsePublishApiReque = parsePublishApiRequestBody(body);\n // validateApiPublishRequest(body, files);\n\n\n name = _parsePublishApiReque.name;\n nsfw = _parsePublishApiReque.nsfw;\n license = _parsePublishApiReque.license;\n title = _parsePublishApiReque.title;\n description = _parsePublishApiReque.description;\n thumbnail = _parsePublishApiReque.thumbnail;\n\n var _parsePublishApiReque2 = parsePublishApiRequestFiles(files);\n\n fileName = _parsePublishApiReque2.fileName;\n filePath = _parsePublishApiReque2.filePath;\n fileType = _parsePublishApiReque2.fileType;\n thumbnailFileName = _parsePublishApiReque2.thumbnailFileName;\n thumbnailFilePath = _parsePublishApiReque2.thumbnailFilePath;\n thumbnailFileType = _parsePublishApiReque2.thumbnailFileType;\n channelName = body.channelName;\n channelId = body.channelId;\n channelPassword = body.channelPassword;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // check channel authorization\n Promise.all([authenticateUser(channelName, channelId, channelPassword, user), claimNameIsAvailable(name), createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail), createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw)]).then(function (_ref14) {\n var _ref15 = _slicedToArray(_ref14, 4),\n _ref15$ = _ref15[0],\n channelName = _ref15$.channelName,\n channelClaimId = _ref15$.channelClaimId,\n validatedClaimName = _ref15[1],\n publishParams = _ref15[2],\n thumbnailPublishParams = _ref15[3];\n\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n }).then(function (result) {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data: {\n name: name,\n claimId: result.claim_id,\n url: host + '/' + result.claim_id + '/' + name,\n lbryTx: result\n }\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', function (_ref16, res) {\n var ip = _ref16.ip,\n originalUrl = _ref16.originalUrl,\n body = _ref16.body,\n params = _ref16.params;\n\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name).then(function (shortId) {\n res.status(200).json({ success: true, data: shortId });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', function (_ref17, res) {\n var ip = _ref17.ip,\n originalUrl = _ref17.originalUrl,\n body = _ref17.body,\n params = _ref17.params;\n\n logger.debug('body:', body);\n var channelName = body.channelName;\n var channelClaimId = body.channelClaimId;\n var claimName = body.claimName;\n var claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (result) {\n if (result === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel could be found' });\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'No matching claim id could be found' });\n }\n res.status(200).json({ success: true, data: result });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', function (_ref18, res) {\n var ip = _ref18.ip,\n originalUrl = _ref18.originalUrl,\n body = _ref18.body,\n params = _ref18.params;\n\n var claimName = params.claimName;\n var claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId).then(function (claimInfo) {\n if (!claimInfo) {\n return res.status(404).json({ success: false, message: 'No claim could be found' });\n }\n res.status(200).json({ success: true, data: claimInfo });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', function (_ref19, res) {\n var ip = _ref19.ip,\n originalUrl = _ref19.originalUrl,\n params = _ref19.params;\n\n var name = params.name;\n var claimId = params.claimId;\n db.File.findOne({ where: { name: name, claimId: claimId } }).then(function (result) {\n if (result) {\n return res.status(200).json({ success: true, data: true });\n }\n res.status(200).json({ success: true, data: false });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n/***/ }),\n/* 142 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"connect-multiparty\");\n\n/***/ }),\n/* 143 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _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; }\n\nvar logger = __webpack_require__(2);\nvar db = __webpack_require__(9);\nvar lbryApi = __webpack_require__(55);\nvar publishHelpers = __webpack_require__(97);\n\nvar _require = __webpack_require__(3),\n _require$publishing = _require.publishing,\n primaryClaimAddress = _require$publishing.primaryClaimAddress,\n additionalClaimAddresses = _require$publishing.additionalClaimAddresses;\n\nvar Sequelize = __webpack_require__(95);\nvar Op = Sequelize.Op;\n\nmodule.exports = {\n publish: function publish(publishParams, fileName, fileType) {\n return new Promise(function (resolve, reject) {\n var publishResults = void 0,\n certificateId = void 0,\n channelName = void 0;\n // publish the file\n return lbryApi.publishClaim(publishParams).then(function (tx) {\n logger.info('Successfully published ' + publishParams.name + ' ' + fileName, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug('this claim was published in channel: ' + publishParams.channel_name);\n return db.Channel.findOne({ where: { channelName: publishParams.channel_name } });\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n }).then(function (channel) {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug('certificateId: ' + certificateId);\n }).then(function () {\n // create the File record\n var fileRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n fileName: fileName,\n filePath: publishParams.file_path,\n fileType: fileType,\n nsfw: publishParams.metadata.nsfw\n };\n // create the Claim record\n var claimRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n thumbnail: publishParams.metadata.thumbnail,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n contentType: fileType,\n nsfw: publishParams.metadata.nsfw,\n amount: publishParams.bid,\n certificateId: certificateId,\n channelName: channelName\n };\n // upsert criteria\n var upsertCriteria = {\n name: publishParams.name,\n claimId: publishResults.claim_id\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n file = _ref2[0],\n claim = _ref2[1];\n\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n }).then(function () {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n }).catch(function (error) {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable: function claimNameIsAvailable(name) {\n var claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim.findAll({\n attributes: ['address'],\n where: {\n name: name,\n address: _defineProperty({}, Op.or, claimAddresses)\n }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n }).catch(function (error) {\n throw error;\n });\n },\n checkChannelAvailability: function checkChannelAvailability(name) {\n return db.Channel.findAll({\n where: { channelName: name }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n }).catch(function (error) {\n throw error;\n });\n }\n};\n\n/***/ }),\n/* 144 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar db = __webpack_require__(9);\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n authenticateUser: function authenticateUser(channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName: null,\n channelClaimId: null\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName: user.channelName,\n channelClaimId: user.channelClaimId\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials: function authenticateChannelCredentials(channelName, channelId, userPassword) {\n return new Promise(function (resolve, reject) {\n // hoisted variables\n var channelData = void 0;\n // build the params for finding the channel\n var channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel.findOne({\n where: channelFindParams\n }).then(function (channel) {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) }\n });\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n }).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 145 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims: function returnPaginatedChannelClaims(channelName, longChannelClaimId, claims, page) {\n var totalPages = module.exports.determineTotalPages(claims);\n var paginationPage = module.exports.getPageFromQuery(page);\n var viewData = {\n channelName: channelName,\n longChannelClaimId: longChannelClaimId,\n claims: module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage: module.exports.determinePreviousPage(paginationPage),\n currentPage: paginationPage,\n nextPage: module.exports.determineNextPage(totalPages, paginationPage),\n totalPages: totalPages,\n totalResults: module.exports.determineTotalClaims(claims)\n };\n return viewData;\n },\n getPageFromQuery: function getPageFromQuery(page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims: function extractPageFromClaims(claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n var claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n var claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n var pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages: function determineTotalPages(claims) {\n if (!claims) {\n return 0;\n } else {\n var totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n var fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n var remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage: function determinePreviousPage(currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage: function determineNextPage(totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims: function determineTotalClaims(claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n }\n};\n\n/***/ }),\n/* 146 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(3),\n host = _require.details;\n\nvar handlePageRender = __webpack_require__(101);\n\nmodule.exports = function (app) {\n // route for the home page\n app.get('/', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', function (req, res) {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', function (req, res) {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', function (req, res) {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', function (_ref, res) {\n var params = _ref.params;\n\n var claimId = params.claimId;\n var name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host: host, claimId: claimId, name: name });\n });\n};\n\n/***/ }),\n/* 147 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data\n });\n default:\n return state;\n }\n};\n\nvar _publish_action_types = __webpack_require__(104);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nvar _publish_channel_select_states = __webpack_require__(105);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar _require = __webpack_require__(3),\n publishing = _require.publishing;\n\nvar initialState = {\n disabled: publishing.disabled,\n disabledMessage: publishing.disabledMessage,\n publishInChannel: false,\n selectedChannel: _publish_channel_select_states.LOGIN,\n showMetadataInputs: false,\n status: {\n status: null,\n message: null\n },\n error: {\n file: null,\n url: null,\n channel: null,\n publishSubmit: null\n },\n file: null,\n claim: '',\n metadata: {\n title: '',\n description: '',\n license: '',\n nsfw: false\n },\n thumbnail: null\n};\n\n/***/ }),\n/* 148 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data\n });\n default:\n return state;\n }\n};\n\nvar _channel_action_types = __webpack_require__(106);\n\nvar actions = _interopRequireWildcard(_channel_action_types);\n\nfunction _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; } }\n\nvar initialState = {\n loggedInChannel: {\n name: null,\n shortId: null,\n longId: null\n }\n};\n\n/***/ }),\n/* 149 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data\n })\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id: action.data.requestId\n })\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n key: action.data.key\n }))\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n name: action.data.name,\n claimId: action.data.claimId,\n shortId: action.data.shortId,\n claimData: action.data.claimData\n }))\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.id, {\n name: action.data.name,\n longId: action.data.longId,\n shortId: action.data.shortId,\n claimsData: action.data.claimsData\n }))\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.channelListId, Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData\n })))\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data\n })\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error: action.data,\n status: _asset_display_states.ERROR\n })\n });\n default:\n return state;\n }\n};\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _asset_display_states = __webpack_require__(107);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar initialState = {\n request: {\n error: null,\n type: null,\n id: null\n },\n requestList: {},\n channelList: {},\n assetList: {},\n displayAsset: {\n error: null,\n status: _asset_display_states.LOCAL_CHECK\n }\n};\n\n/***/ }),\n/* 150 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n default:\n return state;\n }\n};\n\nvar siteConfig = __webpack_require__(3);\n\nvar googleAnalyticsId = siteConfig.analytics.googleId,\n _siteConfig$assetDefa = siteConfig.assetDefaults,\n defaultThumbnail = _siteConfig$assetDefa.thumbnail,\n defaultDescription = _siteConfig$assetDefa.description,\n _siteConfig$details = siteConfig.details,\n description = _siteConfig$details.description,\n host = _siteConfig$details.host,\n title = _siteConfig$details.title,\n twitter = _siteConfig$details.twitter;\n\n\nvar initialState = {\n description: description,\n googleAnalyticsId: googleAnalyticsId,\n host: host,\n title: title,\n twitter: twitter,\n defaultDescription: defaultDescription,\n defaultThumbnail: defaultThumbnail\n};\n\n/***/ }),\n/* 151 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-ga\");\n\n/***/ }),\n/* 152 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cross-fetch/polyfill\");\n\n/***/ }),\n/* 153 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _require = __webpack_require__(56),\n sendGAServeEvent = _require.sendGAServeEvent;\n\nvar _require2 = __webpack_require__(154),\n determineResponseType = _require2.determineResponseType,\n flipClaimNameAndIdForBackwardsCompatibility = _require2.flipClaimNameAndIdForBackwardsCompatibility,\n logRequestData = _require2.logRequestData,\n getClaimIdAndServeAsset = _require2.getClaimIdAndServeAsset;\n\nvar lbryUri = __webpack_require__(155);\nvar handleShowRender = __webpack_require__(156);\nvar SERVE = 'SERVE';\n\nmodule.exports = function (app) {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // parse the identifier\n var isChannel = void 0,\n channelName = void 0,\n channelClaimId = void 0,\n claimId = void 0;\n try {\n var _lbryUri$parseIdentif = lbryUri.parseIdentifier(params.identifier);\n\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n if (!isChannel) {\n var _flipClaimNameAndIdFo = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n\n var _flipClaimNameAndIdFo2 = _slicedToArray(_flipClaimNameAndIdFo, 2);\n\n claimId = _flipClaimNameAndIdFo2[0];\n claimName = _flipClaimNameAndIdFo2[1];\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie2 = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie2.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim2 = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim2.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n/***/ }),\n/* 154 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(100),\n getClaimId = _require.getClaimId,\n getLocalFileRecord = _require.getLocalFileRecord;\n\nvar _require2 = __webpack_require__(99),\n handleErrorResponse = _require2.handleErrorResponse;\n\nvar SERVE = 'SERVE';\nvar SHOW = 'SHOW';\nvar NO_FILE = 'NO_FILE';\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml(_ref) {\n var accept = _ref.accept;\n\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser(headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset(_ref2) {\n var accept = _ref2.accept,\n range = _ref2.range;\n\n var imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n var videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId(claimId) {\n return claimId.length === 40 && !/[^A-Za-z0-9]/g.test(claimId);\n};\n\nfunction isValidShortId(claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId(input) {\n return isValidClaimId(input) || isValidShortId(input);\n};\n\nfunction serveAssetToClient(claimId, name, res) {\n return getLocalFileRecord(claimId, name).then(function (fileRecord) {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect('/api/claim/get/' + name + '/' + claimId);\n }\n // serve the file\n var filePath = fileRecord.filePath,\n fileType = fileRecord.fileType;\n\n logger.verbose('serving file: ' + filePath);\n var sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type': fileType || 'image/jpeg'\n }\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n }).catch(function (error) {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset: function getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (fullClaimId) {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'no claim id could be found' });\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'no channel id could be found' });\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n }).catch(function (error) {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType: function determineResponseType(hasFileExtension, headers) {\n var responseType = void 0;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) {\n // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) {\n // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility: function flipClaimNameAndIdForBackwardsCompatibility(identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n var tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData: function logRequestData(responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n }\n};\n\n/***/ }),\n/* 155 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n logger.debug('parsing identifier:', identifier);\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex.exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n logger.debug(proto + ', ' + value + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!value) {\n throw new Error('Check your url. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Invalid characters in channel name: ' + nameBadChars.join(', ') + '.');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId,\n claimId: claimId\n };\n },\n parseClaim: function parseClaim(claim) {\n logger.debug('parsing name:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n modifierSeperator = _componentsRegex$exec4[2],\n modifier = _componentsRegex$exec4[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Invalid characters in claim name: ' + nameBadChars.join(', ') + '.');\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No file extension provided after separator ' + modifierSeperator + '.');\n }\n if (modifierSeperator !== '.') {\n throw new Error('The ' + modifierSeperator + ' modifier is not supported in the claim name');\n }\n }\n // return results\n return {\n claimName: claimName\n };\n },\n parseModifier: function parseModifier(claim) {\n logger.debug('parsing modifier:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec5 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec6 = _slicedToArray(_componentsRegex$exec5, 4),\n proto = _componentsRegex$exec6[0],\n claimName = _componentsRegex$exec6[1],\n modifierSeperator = _componentsRegex$exec6[2],\n modifier = _componentsRegex$exec6[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n // Validate and process modifier\n var hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension: hasFileExtension\n };\n }\n};\n\n/***/ }),\n/* 156 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(102);\n\nvar _redux = __webpack_require__(57);\n\nvar _index = __webpack_require__(103);\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _index3 = __webpack_require__(13);\n\nvar _index4 = _interopRequireDefault(_index3);\n\nvar _app = __webpack_require__(108);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(113);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reduxSaga = __webpack_require__(157);\n\nvar _reduxSaga2 = _interopRequireDefault(_reduxSaga);\n\nvar _effects = __webpack_require__(49);\n\nvar _show_uri = __webpack_require__(158);\n\nvar _show = __webpack_require__(11);\n\nvar _reactHelmet = __webpack_require__(48);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar returnSagaWithParams = function returnSagaWithParams(saga, params) {\n return (/*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return (0, _effects.call)(saga, params);\n\n case 2:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n })\n );\n};\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create and apply middleware\n var sagaMiddleware = (0, _reduxSaga2.default)();\n var middleware = (0, _redux.applyMiddleware)(sagaMiddleware);\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_index2.default, middleware);\n\n // create saga\n var action = (0, _show.onHandleShowPageUri)(req.params);\n var saga = returnSagaWithParams(_show_uri.handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware.run(saga).done.then(function () {\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _index4.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n var preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send((0, _renderFullPage2.default)(helmet, html, preloadedState));\n });\n};\n\n/***/ }),\n/* 157 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga\");\n\n/***/ }),\n/* 158 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleShowPageUri = handleShowPageUri;\nexports.watchHandleShowPageUri = watchHandleShowPageUri;\n\nvar _effects = __webpack_require__(49);\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(11);\n\nvar _show_asset = __webpack_require__(159);\n\nvar _show_channel = __webpack_require__(161);\n\nvar _lbryUri = __webpack_require__(61);\n\nvar _lbryUri2 = _interopRequireDefault(_lbryUri);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateIdentifierAndClaim),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateClaimOnly),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(handleShowPageUri),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchHandleShowPageUri);\n\nfunction parseAndUpdateIdentifierAndClaim(modifier, claim) {\n var isChannel, channelName, channelClaimId, claimId, claimName, extension, _lbryUri$parseIdentif, _lbryUri$parseClaim;\n\n return regeneratorRuntime.wrap(function parseAndUpdateIdentifierAndClaim$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n isChannel = void 0, channelName = void 0, channelClaimId = void 0, claimId = void 0, claimName = void 0, extension = void 0;\n _context.prev = 1;\n _lbryUri$parseIdentif = _lbryUri2.default.parseIdentifier(modifier);\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n _lbryUri$parseClaim = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim.claimName;\n extension = _lbryUri$parseClaim.extension;\n _context.next = 17;\n break;\n\n case 12:\n _context.prev = 12;\n _context.t0 = _context['catch'](1);\n _context.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 16:\n return _context.abrupt('return', _context.sent);\n\n case 17:\n if (!isChannel) {\n _context.next = 21;\n break;\n }\n\n _context.next = 20;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, channelName, channelClaimId, extension));\n\n case 20:\n return _context.abrupt('return', _context.sent);\n\n case 21:\n ;\n _context.next = 24;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, claimId, null, null, extension));\n\n case 24:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[1, 12]]);\n}\nfunction parseAndUpdateClaimOnly(claim) {\n var isChannel, channelName, channelClaimId, _lbryUri$parseIdentif2, claimName, extension, _lbryUri$parseClaim2;\n\n return regeneratorRuntime.wrap(function parseAndUpdateClaimOnly$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n isChannel = void 0, channelName = void 0, channelClaimId = void 0;\n _context2.prev = 1;\n _lbryUri$parseIdentif2 = _lbryUri2.default.parseIdentifier(claim);\n isChannel = _lbryUri$parseIdentif2.isChannel;\n channelName = _lbryUri$parseIdentif2.channelName;\n channelClaimId = _lbryUri$parseIdentif2.channelClaimId;\n _context2.next = 13;\n break;\n\n case 8:\n _context2.prev = 8;\n _context2.t0 = _context2['catch'](1);\n _context2.next = 12;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t0.message));\n\n case 12:\n return _context2.abrupt('return', _context2.sent);\n\n case 13:\n if (!isChannel) {\n _context2.next = 17;\n break;\n }\n\n _context2.next = 16;\n return (0, _effects.call)(_show_channel.newChannelRequest, (0, _show.onNewChannelRequest)(channelName, channelClaimId));\n\n case 16:\n return _context2.abrupt('return', _context2.sent);\n\n case 17:\n // if not for a channel, parse the claim request\n claimName = void 0, extension = void 0;\n _context2.prev = 18;\n _lbryUri$parseClaim2 = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim2.claimName;\n extension = _lbryUri$parseClaim2.extension;\n _context2.next = 29;\n break;\n\n case 24:\n _context2.prev = 24;\n _context2.t1 = _context2['catch'](18);\n _context2.next = 28;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t1.message));\n\n case 28:\n return _context2.abrupt('return', _context2.sent);\n\n case 29:\n _context2.next = 31;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, null, null, extension));\n\n case 31:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this, [[1, 8], [18, 24]]);\n}\n\nfunction handleShowPageUri(action) {\n var _action$data, identifier, claim;\n\n return regeneratorRuntime.wrap(function handleShowPageUri$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data = action.data, identifier = _action$data.identifier, claim = _action$data.claim;\n\n if (!identifier) {\n _context3.next = 5;\n break;\n }\n\n _context3.next = 4;\n return (0, _effects.call)(parseAndUpdateIdentifierAndClaim, identifier, claim);\n\n case 4:\n return _context3.abrupt('return', _context3.sent);\n\n case 5:\n _context3.next = 7;\n return (0, _effects.call)(parseAndUpdateClaimOnly, claim);\n\n case 7:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this);\n};\n\nfunction watchHandleShowPageUri() {\n return regeneratorRuntime.wrap(function watchHandleShowPageUri$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.HANDLE_SHOW_URI, handleShowPageUri);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n};\n\n/***/ }),\n/* 159 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newAssetRequest = newAssetRequest;\nexports.watchNewAssetRequest = watchNewAssetRequest;\n\nvar _effects = __webpack_require__(49);\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(11);\n\nvar _assetApi = __webpack_require__(160);\n\nvar _show2 = __webpack_require__(28);\n\nvar _site = __webpack_require__(114);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newAssetRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewAssetRequest);\n\nfunction newAssetRequest(action) {\n var _action$data, requestType, requestId, name, modifier, state, host, longId, _ref, assetKey, shortId, _ref2, claimData, _ref3;\n\n return regeneratorRuntime.wrap(function newAssetRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, name = _action$data.name, modifier = _action$data.modifier;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get long id && add request to request list\n longId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_assetApi.getLongClaimId, host, name, modifier);\n\n case 15:\n _ref = _context.sent;\n longId = _ref.data;\n _context.next = 24;\n break;\n\n case 19:\n _context.prev = 19;\n _context.t0 = _context['catch'](12);\n _context.next = 23;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 23:\n return _context.abrupt('return', _context.sent);\n\n case 24:\n assetKey = 'a#' + name + '#' + longId;\n _context.next = 27;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, assetKey));\n\n case 27:\n if (!state.assetList[assetKey]) {\n _context.next = 29;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 29:\n // get short Id\n shortId = void 0;\n _context.prev = 30;\n _context.next = 33;\n return (0, _effects.call)(_assetApi.getShortId, host, name, longId);\n\n case 33:\n _ref2 = _context.sent;\n shortId = _ref2.data;\n _context.next = 42;\n break;\n\n case 37:\n _context.prev = 37;\n _context.t1 = _context['catch'](30);\n _context.next = 41;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 41:\n return _context.abrupt('return', _context.sent);\n\n case 42:\n // get asset claim data\n claimData = void 0;\n _context.prev = 43;\n _context.next = 46;\n return (0, _effects.call)(_assetApi.getClaimData, host, name, longId);\n\n case 46:\n _ref3 = _context.sent;\n claimData = _ref3.data;\n _context.next = 55;\n break;\n\n case 50:\n _context.prev = 50;\n _context.t2 = _context['catch'](43);\n _context.next = 54;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t2.message));\n\n case 54:\n return _context.abrupt('return', _context.sent);\n\n case 55:\n _context.next = 57;\n return (0, _effects.put)((0, _show.addAssetToAssetList)(assetKey, null, name, longId, shortId, claimData));\n\n case 57:\n _context.next = 59;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 59:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 19], [30, 37], [43, 50]]);\n};\n\nfunction watchNewAssetRequest() {\n return regeneratorRuntime.wrap(function watchNewAssetRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.ASSET_REQUEST_NEW, newAssetRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\n/***/ }),\n/* 160 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getLongClaimId = getLongClaimId;\nexports.getShortId = getShortId;\nexports.getClaimData = getClaimData;\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getLongClaimId(host, name, modifier) {\n var body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n var params = {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body)\n };\n // create url\n var url = host + '/api/claim/long-id';\n // return the request promise\n return (0, _request2.default)(url, params);\n};\n\nfunction getShortId(host, name, claimId) {\n var url = host + '/api/claim/short-id/' + claimId + '/' + name;\n return (0, _request2.default)(url);\n};\n\nfunction getClaimData(host, name, claimId) {\n var url = host + '/api/claim/data/' + name + '/' + claimId;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 161 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newChannelRequest = newChannelRequest;\nexports.watchNewChannelRequest = watchNewChannelRequest;\nexports.watchUpdateChannelClaims = watchUpdateChannelClaims;\n\nvar _effects = __webpack_require__(49);\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(11);\n\nvar _channelApi = __webpack_require__(162);\n\nvar _show2 = __webpack_require__(28);\n\nvar _site = __webpack_require__(114);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newChannelRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewChannelRequest),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(getNewClaimsAndUpdateChannel),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchUpdateChannelClaims);\n\nfunction newChannelRequest(action) {\n var _action$data, requestType, requestId, channelName, channelId, state, host, longId, shortId, _ref, _ref$data, channelKey, claimsData, _ref2;\n\n return regeneratorRuntime.wrap(function newChannelRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, channelName = _action$data.channelName, channelId = _action$data.channelId;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get channel long id\n longId = void 0, shortId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_channelApi.getChannelData, host, channelName, channelId);\n\n case 15:\n _ref = _context.sent;\n _ref$data = _ref.data;\n longId = _ref$data.longChannelClaimId;\n shortId = _ref$data.shortChannelClaimId;\n _context.next = 26;\n break;\n\n case 21:\n _context.prev = 21;\n _context.t0 = _context['catch'](12);\n _context.next = 25;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 25:\n return _context.abrupt('return', _context.sent);\n\n case 26:\n // store the request in the channel requests list\n channelKey = 'c#' + channelName + '#' + longId;\n _context.next = 29;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, channelKey));\n\n case 29:\n if (!state.channelList[channelKey]) {\n _context.next = 31;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 31:\n // get channel claims data\n claimsData = void 0;\n _context.prev = 32;\n _context.next = 35;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, channelName, 1);\n\n case 35:\n _ref2 = _context.sent;\n claimsData = _ref2.data;\n _context.next = 44;\n break;\n\n case 39:\n _context.prev = 39;\n _context.t1 = _context['catch'](32);\n _context.next = 43;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 43:\n return _context.abrupt('return', _context.sent);\n\n case 44:\n _context.next = 46;\n return (0, _effects.put)((0, _show.addNewChannelToChannelList)(channelKey, channelName, shortId, longId, claimsData));\n\n case 46:\n _context.next = 48;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 48:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 21], [32, 39]]);\n}\n\nfunction watchNewChannelRequest() {\n return regeneratorRuntime.wrap(function watchNewChannelRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\nfunction getNewClaimsAndUpdateChannel(action) {\n var _action$data2, channelKey, name, longId, page, host, claimsData, _ref3;\n\n return regeneratorRuntime.wrap(function getNewClaimsAndUpdateChannel$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data2 = action.data, channelKey = _action$data2.channelKey, name = _action$data2.name, longId = _action$data2.longId, page = _action$data2.page;\n _context3.next = 3;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 3:\n host = _context3.sent;\n claimsData = void 0;\n _context3.prev = 5;\n _context3.next = 8;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, name, page);\n\n case 8:\n _ref3 = _context3.sent;\n claimsData = _ref3.data;\n _context3.next = 17;\n break;\n\n case 12:\n _context3.prev = 12;\n _context3.t0 = _context3['catch'](5);\n _context3.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context3.t0.message));\n\n case 16:\n return _context3.abrupt('return', _context3.sent);\n\n case 17:\n _context3.next = 19;\n return (0, _effects.put)((0, _show.updateChannelClaims)(channelKey, claimsData));\n\n case 19:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this, [[5, 12]]);\n}\n\nfunction watchUpdateChannelClaims() {\n return regeneratorRuntime.wrap(function watchUpdateChannelClaims$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n}\n\n/***/ }),\n/* 162 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getChannelData = getChannelData;\nexports.getChannelClaims = getChannelClaims;\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getChannelData(host, id, name) {\n if (!id) id = 'none';\n var url = host + '/api/channel/data/' + name + '/' + id;\n return (0, _request2.default)(url);\n};\n\nfunction getChannelClaims(host, longId, name, page) {\n if (!page) page = 1;\n var url = host + '/api/channel/claims/' + name + '/' + longId + '/' + page;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 163 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar handlePageRender = __webpack_require__(101);\n\nmodule.exports = function (app) {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', function (req, res) {\n // send response\n handlePageRender(req, res);\n });\n};\n\n/***/ }),\n/* 164 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(165),\n logLevel = _require.logLevel;\n\nmodule.exports = function (winston) {\n // configure\n winston.configure({\n transports: [new winston.transports.Console({\n level: logLevel,\n timestamp: false,\n colorize: true,\n prettyPrint: true,\n handleExceptions: true,\n humanReadableUnhandledException: true\n })]\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n/***/ }),\n/* 165 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar loggerConfig = {\n logLevel: 'debug' // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n/***/ }),\n/* 166 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar winstonSlackWebHook = __webpack_require__(167).SlackWebHook;\nvar slackConfig = __webpack_require__(93);\n\nmodule.exports = function (winston) {\n var slackWebHook = slackConfig.slackWebHook,\n slackErrorChannel = slackConfig.slackErrorChannel,\n slackInfoChannel = slackConfig.slackInfoChannel;\n\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-errors-transport',\n level: 'warn',\n webhookUrl: slackWebHook,\n channel: slackErrorChannel,\n username: 'spee.ch',\n iconEmoji: ':face_with_head_bandage:'\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-info-transport',\n level: 'info',\n webhookUrl: slackWebHook,\n channel: slackInfoChannel,\n username: 'spee.ch',\n iconEmoji: ':nerd_face:'\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n/***/ }),\n/* 167 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston-slack-webhook\");\n\n/***/ }),\n/* 168 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./\": 50,\n\t\"./ActiveStatusBar\": 24,\n\t\"./ActiveStatusBar/\": 24,\n\t\"./ActiveStatusBar/index\": 24,\n\t\"./ActiveStatusBar/index.jsx\": 24,\n\t\"./AssetPreview\": 34,\n\t\"./AssetPreview/\": 34,\n\t\"./AssetPreview/index\": 34,\n\t\"./AssetPreview/index.js\": 34,\n\t\"./AssetPreview/view\": 78,\n\t\"./AssetPreview/view.jsx\": 78,\n\t\"./ExpandingTextArea\": 36,\n\t\"./ExpandingTextArea/\": 36,\n\t\"./ExpandingTextArea/index\": 36,\n\t\"./ExpandingTextArea/index.jsx\": 36,\n\t\"./GAListener\": 13,\n\t\"./GAListener/\": 13,\n\t\"./GAListener/index\": 13,\n\t\"./GAListener/index.jsx\": 13,\n\t\"./InactiveStatusBar\": 25,\n\t\"./InactiveStatusBar/\": 25,\n\t\"./InactiveStatusBar/index\": 25,\n\t\"./InactiveStatusBar/index.jsx\": 25,\n\t\"./Logo\": 21,\n\t\"./Logo/\": 21,\n\t\"./Logo/index\": 21,\n\t\"./Logo/index.jsx\": 21,\n\t\"./NavBarChannelOptionsDropdown\": 22,\n\t\"./NavBarChannelOptionsDropdown/\": 22,\n\t\"./NavBarChannelOptionsDropdown/index\": 22,\n\t\"./NavBarChannelOptionsDropdown/index.jsx\": 22,\n\t\"./ProgressBar\": 10,\n\t\"./ProgressBar/\": 10,\n\t\"./ProgressBar/index\": 10,\n\t\"./ProgressBar/index.jsx\": 10,\n\t\"./PublishPreview\": 37,\n\t\"./PublishPreview/\": 37,\n\t\"./PublishPreview/index\": 37,\n\t\"./PublishPreview/index.jsx\": 37,\n\t\"./PublishUrlMiddleDisplay\": 38,\n\t\"./PublishUrlMiddleDisplay/\": 38,\n\t\"./PublishUrlMiddleDisplay/index\": 38,\n\t\"./PublishUrlMiddleDisplay/index.jsx\": 38,\n\t\"./SEO\": 7,\n\t\"./SEO/\": 7,\n\t\"./SEO/index\": 7,\n\t\"./SEO/index.js\": 7,\n\t\"./SEO/view\": 66,\n\t\"./SEO/view.jsx\": 66,\n\t\"./index\": 50,\n\t\"./index.js\": 50\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 168;\n\n/***/ }),\n/* 169 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./\": 52,\n\t\"./AssetDisplay\": 17,\n\t\"./AssetDisplay/\": 17,\n\t\"./AssetDisplay/index\": 17,\n\t\"./AssetDisplay/index.js\": 17,\n\t\"./AssetDisplay/view\": 72,\n\t\"./AssetDisplay/view.jsx\": 72,\n\t\"./AssetInfo\": 31,\n\t\"./AssetInfo/\": 31,\n\t\"./AssetInfo/index\": 31,\n\t\"./AssetInfo/index.js\": 31,\n\t\"./AssetInfo/view\": 75,\n\t\"./AssetInfo/view.jsx\": 75,\n\t\"./AssetTitle\": 30,\n\t\"./AssetTitle/\": 30,\n\t\"./AssetTitle/index\": 30,\n\t\"./AssetTitle/index.js\": 30,\n\t\"./AssetTitle/view\": 74,\n\t\"./AssetTitle/view.jsx\": 74,\n\t\"./ChannelClaimsDisplay\": 33,\n\t\"./ChannelClaimsDisplay/\": 33,\n\t\"./ChannelClaimsDisplay/index\": 33,\n\t\"./ChannelClaimsDisplay/index.js\": 33,\n\t\"./ChannelClaimsDisplay/view\": 77,\n\t\"./ChannelClaimsDisplay/view.jsx\": 77,\n\t\"./ChannelCreateForm\": 16,\n\t\"./ChannelCreateForm/\": 16,\n\t\"./ChannelCreateForm/index\": 16,\n\t\"./ChannelCreateForm/index.js\": 16,\n\t\"./ChannelCreateForm/view\": 69,\n\t\"./ChannelCreateForm/view.jsx\": 69,\n\t\"./ChannelLoginForm\": 15,\n\t\"./ChannelLoginForm/\": 15,\n\t\"./ChannelLoginForm/index\": 15,\n\t\"./ChannelLoginForm/index.js\": 15,\n\t\"./ChannelLoginForm/view\": 68,\n\t\"./ChannelLoginForm/view.jsx\": 68,\n\t\"./ChannelSelect\": 39,\n\t\"./ChannelSelect/\": 39,\n\t\"./ChannelSelect/index\": 39,\n\t\"./ChannelSelect/index.js\": 39,\n\t\"./ChannelSelect/view\": 81,\n\t\"./ChannelSelect/view.jsx\": 81,\n\t\"./Dropzone\": 18,\n\t\"./Dropzone/\": 18,\n\t\"./Dropzone/index\": 18,\n\t\"./Dropzone/index.js\": 18,\n\t\"./Dropzone/view\": 82,\n\t\"./Dropzone/view.jsx\": 82,\n\t\"./FourOhFourPage\": 35,\n\t\"./FourOhFourPage/\": 35,\n\t\"./FourOhFourPage/index\": 35,\n\t\"./FourOhFourPage/index.jsx\": 35,\n\t\"./FourOhFourPage/view\": 79,\n\t\"./FourOhFourPage/view.jsx\": 79,\n\t\"./NavBar\": 5,\n\t\"./NavBar/\": 5,\n\t\"./NavBar/index\": 5,\n\t\"./NavBar/index.js\": 5,\n\t\"./NavBar/view\": 65,\n\t\"./NavBar/view.jsx\": 65,\n\t\"./PublishDetails\": 40,\n\t\"./PublishDetails/\": 40,\n\t\"./PublishDetails/index\": 40,\n\t\"./PublishDetails/index.js\": 40,\n\t\"./PublishDetails/view\": 83,\n\t\"./PublishDetails/view.jsx\": 83,\n\t\"./PublishDisabledMessage\": 45,\n\t\"./PublishDisabledMessage/\": 45,\n\t\"./PublishDisabledMessage/index\": 45,\n\t\"./PublishDisabledMessage/index.js\": 45,\n\t\"./PublishDisabledMessage/view\": 88,\n\t\"./PublishDisabledMessage/view.jsx\": 88,\n\t\"./PublishMetadataInputs\": 44,\n\t\"./PublishMetadataInputs/\": 44,\n\t\"./PublishMetadataInputs/index\": 44,\n\t\"./PublishMetadataInputs/index.js\": 44,\n\t\"./PublishMetadataInputs/view\": 87,\n\t\"./PublishMetadataInputs/view.jsx\": 87,\n\t\"./PublishStatus\": 46,\n\t\"./PublishStatus/\": 46,\n\t\"./PublishStatus/index\": 46,\n\t\"./PublishStatus/index.js\": 46,\n\t\"./PublishStatus/view\": 89,\n\t\"./PublishStatus/view.jsx\": 89,\n\t\"./PublishThumbnailInput\": 43,\n\t\"./PublishThumbnailInput/\": 43,\n\t\"./PublishThumbnailInput/index\": 43,\n\t\"./PublishThumbnailInput/index.js\": 43,\n\t\"./PublishThumbnailInput/view\": 86,\n\t\"./PublishThumbnailInput/view.jsx\": 86,\n\t\"./PublishTitleInput\": 41,\n\t\"./PublishTitleInput/\": 41,\n\t\"./PublishTitleInput/index\": 41,\n\t\"./PublishTitleInput/index.js\": 41,\n\t\"./PublishTitleInput/view\": 84,\n\t\"./PublishTitleInput/view.jsx\": 84,\n\t\"./PublishTool\": 47,\n\t\"./PublishTool/\": 47,\n\t\"./PublishTool/index\": 47,\n\t\"./PublishTool/index.js\": 47,\n\t\"./PublishTool/view\": 90,\n\t\"./PublishTool/view.jsx\": 90,\n\t\"./PublishUrlInput\": 42,\n\t\"./PublishUrlInput/\": 42,\n\t\"./PublishUrlInput/index\": 42,\n\t\"./PublishUrlInput/index.js\": 42,\n\t\"./PublishUrlInput/view\": 85,\n\t\"./PublishUrlInput/view.jsx\": 85,\n\t\"./ShowAssetDetails\": 29,\n\t\"./ShowAssetDetails/\": 29,\n\t\"./ShowAssetDetails/index\": 29,\n\t\"./ShowAssetDetails/index.js\": 29,\n\t\"./ShowAssetDetails/view\": 73,\n\t\"./ShowAssetDetails/view.jsx\": 73,\n\t\"./ShowAssetLite\": 27,\n\t\"./ShowAssetLite/\": 27,\n\t\"./ShowAssetLite/index\": 27,\n\t\"./ShowAssetLite/index.js\": 27,\n\t\"./ShowAssetLite/view\": 71,\n\t\"./ShowAssetLite/view.jsx\": 71,\n\t\"./ShowChannel\": 32,\n\t\"./ShowChannel/\": 32,\n\t\"./ShowChannel/index\": 32,\n\t\"./ShowChannel/index.js\": 32,\n\t\"./ShowChannel/view\": 76,\n\t\"./ShowChannel/view.jsx\": 76,\n\t\"./index\": 52,\n\t\"./index.js\": 52\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 169;\n\n/***/ }),\n/* 170 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOAD_START = exports.LOAD_START = 'LOAD_START';\nvar LOADING = exports.LOADING = 'LOADING';\nvar PUBLISHING = exports.PUBLISHING = 'PUBLISHING';\nvar SUCCESS = exports.SUCCESS = 'SUCCESS';\nvar FAILED = exports.FAILED = 'FAILED';\n\n/***/ }),\n/* 171 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./\": 53,\n\t\"./AboutPage\": 20,\n\t\"./AboutPage/\": 20,\n\t\"./AboutPage/index\": 20,\n\t\"./AboutPage/index.jsx\": 20,\n\t\"./ErrorPage\": 12,\n\t\"./ErrorPage/\": 12,\n\t\"./ErrorPage/index\": 12,\n\t\"./ErrorPage/index.jsx\": 12,\n\t\"./HomePage\": 54,\n\t\"./HomePage/\": 54,\n\t\"./HomePage/index\": 54,\n\t\"./HomePage/index.jsx\": 54,\n\t\"./LoginPage\": 23,\n\t\"./LoginPage/\": 23,\n\t\"./LoginPage/index\": 23,\n\t\"./LoginPage/index.js\": 23,\n\t\"./LoginPage/view\": 67,\n\t\"./LoginPage/view.jsx\": 67,\n\t\"./ShowPage\": 26,\n\t\"./ShowPage/\": 26,\n\t\"./ShowPage/index\": 26,\n\t\"./ShowPage/index.js\": 26,\n\t\"./ShowPage/view\": 70,\n\t\"./ShowPage/view.jsx\": 70,\n\t\"./index\": 53,\n\t\"./index.js\": 53\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 171;\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// index.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 115);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 663af5f6934a69121924","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 0\n// module chunks = 0","module.exports = require(\"react-redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-redux\"\n// module id = 1\n// module chunks = 0","module.exports = require(\"winston\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston\"\n// module id = 2\n// module chunks = 0","function SiteConfig () {\n this.analytics = {\n googleId: 'default',\n };\n this.assetDefaults = {\n description: 'An asset published on Spee.ch',\n thumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',\n title : 'Spee.ch',\n };\n this.auth = {\n sessionKey: 'default',\n };\n this.componentsConfig = {\n components: {},\n containers: {},\n pages : {},\n };\n this.details = {\n description: 'Open-source, decentralized image and video sharing.',\n host : 'default',\n port : 3000,\n title : 'Spee.ch',\n twitter : '@spee_ch',\n };\n this.publishing = {\n additionalClaimAddresses: [],\n disabled : false,\n disabledMessage : 'Please check back soon.',\n primaryClaimAddress : 'default',\n thumbnailChannel : 'default',\n thumbnailChannelId : 'default',\n uploadDirectory : '/home/lbry/Uploads',\n };\n this.configure = (config) => {\n if (!config) {\n return console.log('No site config received.');\n }\n const { analytics, assetDefaults, auth, componentsConfig, details, publishing } = config;\n this.analytics = analytics;\n this.assetDefaults = assetDefaults;\n this.auth = auth;\n this.details = details;\n this.publishing = publishing;\n this.componentsConfig = componentsConfig;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/siteConfig.js","module.exports = require(\"react-router-dom\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-router-dom\"\n// module id = 4\n// module chunks = 0","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport {updateSelectedChannel} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, site }) => {\n return {\n channelName : channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId : channel.loggedInChannel.longId,\n siteDescription: site.description,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n onChannelLogout: () => {\n dispatch(updateLoggedInChannel(null, null, null));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/index.js","import * as actions from 'constants/publish_action_types';\n\n// export action creators\nexport function selectFile (file) {\n return {\n type: actions.FILE_SELECTED,\n data: file,\n };\n};\n\nexport function clearFile () {\n return {\n type: actions.FILE_CLEAR,\n };\n};\n\nexport function updateMetadata (name, value) {\n return {\n type: actions.METADATA_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateClaim (value) {\n return {\n type: actions.CLAIM_UPDATE,\n data: value,\n };\n};\n\nexport function setPublishInChannel (channel) {\n return {\n type: actions.SET_PUBLISH_IN_CHANNEL,\n channel,\n };\n};\n\nexport function updatePublishStatus (status, message) {\n return {\n type: actions.PUBLISH_STATUS_UPDATE,\n data: {\n status,\n message,\n },\n };\n};\n\nexport function updateError (name, value) {\n return {\n type: actions.ERROR_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateSelectedChannel (channelName) {\n return {\n type: actions.SELECTED_CHANNEL_UPDATE,\n data: channelName,\n };\n};\n\nexport function toggleMetadataInputs (showMetadataInputs) {\n return {\n type: actions.TOGGLE_METADATA_INPUTS,\n data: showMetadataInputs,\n };\n};\n\nexport function onNewThumbnail (file) {\n return {\n type: actions.THUMBNAIL_NEW,\n data: file,\n };\n};\n\nexport function startPublish (history) {\n return {\n type: actions.PUBLISH_START,\n data: { history },\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/publish.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site }) => {\n const { defaultDescription, defaultThumbnail, description: siteDescription, host: siteHost, title: siteTitle, twitter: siteTwitter } = site;\n return {\n defaultDescription,\n defaultThumbnail,\n siteDescription,\n siteHost,\n siteTitle,\n siteTwitter,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/index.js","import 'cross-fetch/polyfill';\n\n/**\n * Parses the JSON returned by a network request\n *\n * @param {object} response A response from a network request\n *\n * @return {object} The parsed JSON from the request\n */\nfunction parseJSON (response) {\n if (response.status === 204 || response.status === 205) {\n return null;\n }\n return response.json();\n}\n\n/**\n * Parses the status returned by a network request\n *\n * @param {object} response A response from a network request\n * @param {object} response The parsed JSON from the network request\n *\n * @return {object | undefined} Returns object with status and statusText, or undefined\n */\nfunction checkStatus (response, jsonResponse) {\n if (response.status >= 200 && response.status < 300) {\n return jsonResponse;\n }\n const error = new Error(jsonResponse.message);\n error.response = response;\n throw error;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @param {string} url The URL we want to request\n * @param {object} [options] The options we want to pass to \"fetch\"\n *\n * @return {object} The response data\n */\n\nexport default function request (url, options) {\n return fetch(url, options)\n .then(response => {\n return Promise.all([response, parseJSON(response)]);\n })\n .then(([response, jsonResponse]) => {\n return checkStatus(response, jsonResponse);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/request.js","const Sequelize = require('sequelize');\nconst logger = require('winston');\n\nconsole.log('exporting sequelize models');\nconst { database, username, password } = require('../../config/mysqlConfig');\nconst db = {};\n// set sequelize options\nconst sequelize = new Sequelize(database, username, password, {\n host : 'localhost',\n dialect : 'mysql',\n dialectOptions: {decimalNumbers: true}, // fix to ensure DECIMAL will not be stored as a string\n logging : false,\n pool : {\n max : 5,\n min : 0,\n idle : 10000,\n acquire: 10000,\n },\n});\n\n// establish mysql connection\nsequelize\n .authenticate()\n .then(() => {\n logger.info('Sequelize has established mysql connection successfully.');\n })\n .catch(err => {\n logger.error('Sequelize was unable to connect to the database:', err);\n });\n\n// manually add each model to the db object\nconst Certificate = require('./certificate.js');\nconst Channel = require('./channel.js');\nconst Claim = require('./claim.js');\nconst File = require('./file.js');\nconst Request = require('./request.js');\nconst User = require('./user.js');\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(modelName => {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = (Model, values, condition, tableName) => {\n return Model\n .findOne({\n where: condition,\n })\n .then(obj => {\n if (obj) { // update\n logger.debug(`updating record in db.${tableName}`);\n return obj.update(values);\n } else { // insert\n logger.debug(`creating record in db.${tableName}`);\n return Model.create(values);\n }\n })\n .catch(function (error) {\n logger.error(`${tableName}.upsert error`, error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/index.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ActiveStatusBar from 'components/ActiveStatusBar';\nimport InactiveStatusBar from 'components/InactiveStatusBar';\n\nclass ProgressBar extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n bars : [],\n index : 0,\n incrementer: 1,\n };\n this.createBars = this.createBars.bind(this);\n this.startProgressBar = this.startProgressBar.bind(this);\n this.updateProgressBar = this.updateProgressBar.bind(this);\n this.stopProgressBar = this.stopProgressBar.bind(this);\n }\n componentDidMount () {\n this.createBars();\n this.startProgressBar();\n }\n componentWillUnmount () {\n this.stopProgressBar();\n }\n createBars () {\n const bars = [];\n for (let i = 0; i <= this.props.size; i++) {\n bars.push({isActive: false});\n }\n this.setState({ bars });\n }\n startProgressBar () {\n this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);\n };\n updateProgressBar () {\n let index = this.state.index;\n let incrementer = this.state.incrementer;\n let bars = this.state.bars;\n // flip incrementer if necessary, to stay in bounds\n if ((index < 0) || (index > this.props.size)) {\n incrementer = incrementer * -1;\n index += incrementer;\n }\n // update the indexed bar\n if (incrementer > 0) {\n bars[index].isActive = true;\n } else {\n bars[index].isActive = false;\n };\n // increment index\n index += incrementer;\n // update state\n this.setState({\n bars,\n incrementer,\n index,\n });\n };\n stopProgressBar () {\n clearInterval(this.updateInterval);\n };\n render () {\n return (\n
\n {this.state.bars.map((bar, index) => bar.isActive ? : )}\n
\n );\n }\n};\n\nProgressBar.propTypes = {\n size: PropTypes.number.isRequired,\n};\n\nexport default ProgressBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ProgressBar/index.jsx","import * as actions from 'constants/show_action_types';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\n// basic request parsing\nexport function onHandleShowPageUri (params) {\n return {\n type: actions.HANDLE_SHOW_URI,\n data: params,\n };\n};\n\nexport function onRequestError (error) {\n return {\n type: actions.REQUEST_ERROR,\n data: error,\n };\n};\n\nexport function onNewChannelRequest (channelName, channelId) {\n const requestType = CHANNEL;\n const requestId = `cr#${channelName}#${channelId}`;\n return {\n type: actions.CHANNEL_REQUEST_NEW,\n data: { requestType, requestId, channelName, channelId },\n };\n};\n\nexport function onNewAssetRequest (name, id, channelName, channelId, extension) {\n const requestType = extension ? ASSET_LITE : ASSET_DETAILS;\n const requestId = `ar#${name}#${id}#${channelName}#${channelId}`;\n return {\n type: actions.ASSET_REQUEST_NEW,\n data: {\n requestType,\n requestId,\n name,\n modifier: {\n id,\n channel: {\n name: channelName,\n id : channelId,\n },\n },\n },\n };\n};\n\nexport function onRequestUpdate (requestType, requestId) {\n return {\n type: actions.REQUEST_UPDATE,\n data: {\n requestType,\n requestId,\n },\n };\n};\n\nexport function addRequestToRequestList (id, error, key) {\n return {\n type: actions.REQUEST_LIST_ADD,\n data: { id, error, key },\n };\n};\n\n// asset actions\n\nexport function addAssetToAssetList (id, error, name, claimId, shortId, claimData) {\n return {\n type: actions.ASSET_ADD,\n data: { id, error, name, claimId, shortId, claimData },\n };\n}\n\n// channel actions\n\nexport function addNewChannelToChannelList (id, name, shortId, longId, claimsData) {\n return {\n type: actions.CHANNEL_ADD,\n data: { id, name, shortId, longId, claimsData },\n };\n};\n\nexport function onUpdateChannelClaims (channelKey, name, longId, page) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,\n data: {channelKey, name, longId, page},\n };\n};\n\nexport function updateChannelClaims (channelListId, claimsData) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,\n data: {channelListId, claimsData},\n };\n};\n\n// display a file\n\nexport function fileRequested (name, claimId) {\n return {\n type: actions.FILE_REQUESTED,\n data: { name, claimId },\n };\n};\n\nexport function updateFileAvailability (status) {\n return {\n type: actions.FILE_AVAILABILITY_UPDATE,\n data: status,\n };\n};\n\nexport function updateDisplayAssetError (error) {\n return {\n type: actions.DISPLAY_ASSET_ERROR,\n data: error,\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/show.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport NavBar from 'containers/NavBar';\n\nclass ErrorPage extends React.Component {\n render () {\n const { error } = this.props;\n return (\n
\n \n
\n

{error}

\n
\n
\n );\n }\n};\n\nErrorPage.propTypes = {\n error: PropTypes.string.isRequired,\n};\n\nexport default ErrorPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ErrorPage/index.jsx","import React from 'react';\nimport GoogleAnalytics from 'react-ga';\nimport { withRouter } from 'react-router-dom';\nconst { analytics: { googleId } } = require('../../../config/siteConfig.js');\n\nGoogleAnalytics.initialize(googleId);\n\nclass GAListener extends React.Component {\n componentDidMount () {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n\n sendPageView (location) {\n GoogleAnalytics.set({ page: location.pathname });\n GoogleAnalytics.pageview(location.pathname);\n }\n\n render () {\n return this.props.children;\n }\n}\n\nexport default withRouter(GAListener);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/GAListener/index.jsx","module.exports = require(\"prop-types\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 14\n// module chunks = 0","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from '../../actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/index.js","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from 'actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/index.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { fileRequested } from 'actions/show';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select error and status\n const error = show.displayAsset.error;\n const status = show.displayAsset.status;\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n error,\n status,\n asset,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onFileRequest: (name, claimId) => {\n dispatch(fileRequested(name, claimId));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/index.js","import { connect } from 'react-redux';\nimport { selectFile, updateError, clearFile } from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n file : publish.file,\n thumbnail: publish.thumbnail,\n fileError: publish.error.file,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n selectFile: (file) => {\n dispatch(selectFile(file));\n },\n setFileError: (value) => {\n dispatch(clearFile());\n dispatch(updateError('file', value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/Dropzone/index.js","// request actions\nexport const HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nexport const REQUEST_ERROR = 'REQUEST_ERROR';\nexport const REQUEST_UPDATE = 'REQUEST_UPDATE';\nexport const ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nexport const CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nexport const REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nexport const ASSET_ADD = `ASSET_ADD`;\n\n// channel actions\nexport const CHANNEL_ADD = 'CHANNEL_ADD';\n\nexport const CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nexport const CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nexport const FILE_REQUESTED = 'FILE_REQUESTED';\nexport const FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nexport const DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_action_types.js","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport SEO from 'components/SEO';\n\nclass AboutPage extends React.Component {\n render () {\n return (\n
\n \n \n
\n
\n
\n

Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.

\n

TWITTER

\n

GITHUB

\n

DISCORD CHANNEL

\n

DOCUMENTATION

\n
\n
\n
\n

Spee.ch is a media-hosting site that reads from and publishes content to the LBRY blockchain.

\n

Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the LBRY network. This means that your images are stored in multiple locations without a single point of failure.

\n

Contribute

\n

If you have an idea for your own spee.ch-like site on top of LBRY, fork our github repo and go to town!

\n

If you want to improve spee.ch, join our discord channel or solve one of our github issues.

\n
\n
\n
\n
\n );\n }\n};\n\nexport default AboutPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/AboutPage/index.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nfunction Logo () {\n return (\n \n \n Logo\n Spee.ch logo\n \n \n \n Spee<h\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default Logo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/Logo/index.jsx","import React from 'react';\n\nfunction NavBarChannelDropdown ({ channelName, handleSelection, defaultSelection, VIEW, LOGOUT }) {\n return (\n \n );\n};\n\nexport default NavBarChannelDropdown;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/NavBarChannelOptionsDropdown/index.jsx","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/index.js","import React from 'react';\n\nconst ActiveStatusBar = () => {\n return | ;\n};\n\nexport default ActiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ActiveStatusBar/index.jsx","import React from 'react';\n\nconst InactiveStatusBar = () => {\n return | ;\n};\n\nexport default InactiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/InactiveStatusBar/index.jsx","import { connect } from 'react-redux';\nimport { onHandleShowPageUri } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n return {\n error : show.request.error,\n requestType: show.request.type,\n };\n};\n\nconst mapDispatchToProps = {\n onHandleShowPageUri,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/index.js","export const selectAsset = (show) => {\n const request = show.requestList[show.request.id];\n const assetKey = request.key;\n return show.assetList[assetKey];\n};\n\nexport const selectShowState = (state) => {\n return state.show;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/show.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/index.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n const { claimData: { title } } = selectAsset(show);\n return {\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/index.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select request\n const previousRequest = show.requestList[requestId] || null;\n // select channel\n let channel;\n if (previousRequest) {\n const channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/index.js","import { connect } from 'react-redux';\nimport { onUpdateChannelClaims } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select channel key\n const request = show.requestList[show.request.id];\n const channelKey = request.key;\n // select channel claims\n const channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey,\n channel,\n };\n};\n\nconst mapDispatchToProps = {\n onUpdateChannelClaims,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({site: {defaults: { defaultThumbnail }}}) => {\n return {\n defaultThumbnail,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site: { host, title } }) => {\n return {\n host,\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/index.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass ExpandingTextarea extends Component {\n constructor (props) {\n super(props);\n this._handleChange = this._handleChange.bind(this);\n }\n componentDidMount () {\n this.adjustTextarea({});\n }\n _handleChange (event) {\n const { onChange } = this.props;\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n adjustTextarea ({ target = this.el }) {\n target.style.height = 0;\n target.style.height = `${target.scrollHeight}px`;\n }\n render () {\n const { ...rest } = this.props;\n return (\n this.el = x}\n onChange={this._handleChange}\n />\n );\n }\n}\n\nExpandingTextarea.propTypes = {\n onChange: PropTypes.func,\n};\n\nexport default ExpandingTextarea;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ExpandingTextArea/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass PublishPreview extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n imgSource : '',\n defaultThumbnail: '/assets/img/video_thumb_default.png',\n };\n }\n componentDidMount () {\n this.setPreviewImageSource(this.props.file);\n }\n componentWillReceiveProps (newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n }\n setPreviewImageSourceFromFile (file) {\n const previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = () => {\n this.setState({imgSource: previewReader.result});\n };\n }\n setPreviewImageSource (file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n render () {\n return (\n \n );\n }\n};\n\nPublishPreview.propTypes = {\n dimPreview: PropTypes.bool.isRequired,\n file : PropTypes.object.isRequired,\n thumbnail : PropTypes.object,\n};\n\nexport default PublishPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishPreview/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction UrlMiddle ({publishInChannel, selectedChannel, loggedInChannelName, loggedInChannelShortId}) {\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return {loggedInChannelName}:{loggedInChannelShortId} /;\n }\n return @channelSelect a channel below /;\n }\n return (\n xyzThis will be a random id /\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel : PropTypes.bool.isRequired,\n loggedInChannelName : PropTypes.string,\n loggedInChannelShortId: PropTypes.string,\n};\n\nexport default UrlMiddle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishUrlMiddleDisplay/index.jsx","import {connect} from 'react-redux';\nimport {setPublishInChannel, updateSelectedChannel, updateError} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, publish }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n publishInChannel : publish.publishInChannel,\n selectedChannel : publish.selectedChannel,\n channelError : publish.error.channel,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onPublishInChannelChange: (value) => {\n dispatch(updateError('channel', null));\n dispatch(setPublishInChannel(value));\n },\n onChannelSelect: (value) => {\n dispatch(updateError('channel', null));\n dispatch(updateSelectedChannel(value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelSelect/index.js","import {connect} from 'react-redux';\nimport {clearFile, startPublish} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, publish }) => {\n return {\n file: publish.file,\n };\n};\n\nconst mapDispatchToProps = {\n clearFile,\n startPublish,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishDetails/index.js","import {connect} from 'react-redux';\nimport {updateMetadata} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n title: publish.metadata.title,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onMetadataChange: (name, value) => {\n dispatch(updateMetadata(name, value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishTitleInput/index.js","import {updateClaim, updateError} from 'actions/publish';\nimport {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, publish }) => {\n return {\n loggedInChannelName : channel.loggedInChannel.name,\n loggedInChannelShortId: channel.loggedInChannel.shortId,\n fileName : publish.file.name,\n publishInChannel : publish.publishInChannel,\n selectedChannel : publish.selectedChannel,\n claim : publish.claim,\n urlError : publish.error.url,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onClaimChange: (value) => {\n dispatch(updateClaim(value));\n dispatch(updateError('publishSubmit', null));\n },\n onUrlError: (value) => {\n dispatch(updateError('url', value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishUrlInput/index.js","import { connect } from 'react-redux';\nimport { onNewThumbnail } from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish: { file } }) => {\n return {\n file,\n };\n};\n\nconst mapDispatchToProps = {\n onNewThumbnail,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishThumbnailInput/index.js","import {connect} from 'react-redux';\nimport {updateMetadata, toggleMetadataInputs} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n showMetadataInputs: publish.showMetadataInputs,\n description : publish.metadata.description,\n license : publish.metadata.license,\n nsfw : publish.metadata.nsfw,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onMetadataChange: (name, value) => {\n dispatch(updateMetadata(name, value));\n },\n onToggleMetadataInputs: (value) => {\n dispatch(toggleMetadataInputs(value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishMetadataInputs/index.js","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n message: publish.disabledMessage,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishDisabledMessage/index.js","import {connect} from 'react-redux';\nimport {clearFile} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n status : publish.status.status,\n message: publish.status.message,\n };\n};\n\nconst mapDispatchToProps = {\n clearFile,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishStatus/index.js","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n disabled: publish.disabled,\n file : publish.file,\n status : publish.status.status,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishTool/index.js","module.exports = require(\"react-helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-helmet\"\n// module id = 48\n// module chunks = 0","module.exports = require(\"redux-saga/effects\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga/effects\"\n// module id = 49\n// module chunks = 0","const Path = require('path');\nconst { getSubDirectoryNames } = require('build/getFolderNames.js');\n\nconst thisFolder = Path.resolve(__dirname, 'client/components/');\nlet modules = {};\n\ngetSubDirectoryNames(thisFolder)\n .forEach((name) => {\n modules[name] = require(`./${name}`).default;\n });\n\nmodule.exports = modules;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/index.js","module.exports = require(\"path\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"path\"\n// module id = 51\n// module chunks = 0","const Path = require('path');\nconst { getSubDirectoryNames } = require('build/getFolderNames.js');\nconst thisFolder = Path.resolve(__dirname, 'client/containers/');\n\nlet modules = {};\n\ngetSubDirectoryNames(thisFolder)\n .forEach((name) => {\n modules[name] = require(`./${name}`).default;\n });\n\nmodule.exports = modules;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/index.js","const Path = require('path');\nconst { getSubDirectoryNames } = require('build/getFolderNames.js');\nconst thisFolder = Path.resolve(__dirname, 'client/pages/');\n\nlet modules = {};\n\ngetSubDirectoryNames(thisFolder)\n .forEach((name) => {\n modules[name] = require(`./${name}`).default;\n });\n\nmodule.exports = modules;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport PublishTool from 'containers/PublishTool';\n\nclass HomePage extends React.Component {\n render () {\n return (\n
\n \n \n
\n \n
\n
\n );\n }\n};\n\nexport default HomePage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/HomePage/index.jsx","const axios = require('axios');\nconst logger = require('winston');\nconst { api: { apiHost, apiPort } } = require('../../config/lbryConfig.js');\nconst lbryApiUri = 'http://' + apiHost + ':' + apiPort;\nconst { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('./googleAnalytics.js');\n\nconst handleLbrynetResponse = ({ data }, resolve, reject) => {\n logger.debug('lbry api data:', data);\n if (data.result) {\n // check for an error\n if (data.result.error) {\n logger.debug('Lbrynet api error:', data.result.error);\n reject(new Error(data.result.error));\n return;\n };\n resolve(data.result);\n return;\n }\n // fallback in case it just timed out\n reject(JSON.stringify(data));\n};\n\nmodule.exports = {\n publishClaim (publishParams) {\n logger.debug(`lbryApi >> Publishing claim to \"${publishParams.name}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'publish',\n params: publishParams,\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaim (uri) {\n logger.debug(`lbryApi >> Getting Claim for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'get',\n params: { uri, timeout: 20 },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimList (claimName) {\n logger.debug(`lbryApi >> Getting claim_list for \"${claimName}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'claim_list',\n params: { name: claimName },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n resolveUri (uri) {\n logger.debug(`lbryApi >> Resolving URI for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'resolve',\n params: { uri },\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now());\n if (data.result[uri].error) { // check for errors\n reject(data.result[uri].error);\n } else { // if no errors, resolve\n resolve(data.result[uri]);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getDownloadDirectory () {\n logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'settings_get',\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now());\n if (data.result) {\n resolve(data.result.download_directory);\n } else {\n return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.');\n }\n })\n .catch(error => {\n logger.error('Lbrynet Error:', error);\n resolve('/home/lbry/Downloads/');\n });\n });\n },\n createChannel (name) {\n logger.debug(`lbryApi >> Creating channel for ${name}...`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'channel_new',\n params: {\n channel_name: name,\n amount : 0.1,\n },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryApi.js","const logger = require('winston');\nconst ua = require('universal-analytics');\nconst { analytics : { googleId }, details: { title } } = require('../../config/siteConfig.js');\n\nfunction createServeEventParams (headers, ip, originalUrl) {\n return {\n eventCategory : 'client requests',\n eventAction : 'serve request',\n eventLabel : originalUrl,\n ipOverride : ip,\n userAgentOverride: headers['user-agent'],\n };\n};\n\nfunction createPublishTimingEventParams (category, variable, label, startTime, endTime) {\n const duration = endTime - startTime;\n return {\n userTimingCategory : category,\n userTimingVariableName: variable,\n userTimingTime : duration,\n userTimingLabel : label,\n };\n};\n\nfunction sendGoogleAnalyticsEvent (ip, params) {\n const visitorId = ip.replace(/\\./g, '-');\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.event(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n });\n};\n\nfunction sendGoogleAnalyticsTiming (visitorId, params) {\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.timing(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n logger.debug(`Timing event successfully sent to google analytics`);\n });\n};\n\nmodule.exports = {\n sendGAServeEvent (headers, ip, originalUrl) {\n const params = createServeEventParams(headers, ip, originalUrl);\n sendGoogleAnalyticsEvent(ip, params);\n },\n sendGATimingEvent (category, variable, label, startTime, endTime) {\n const params = createPublishTimingEventParams(category, variable, label, startTime, endTime);\n sendGoogleAnalyticsTiming(title, params);\n },\n chooseGaLbrynetPublishLabel ({ channel_name: channelName, channel_id: channelId }) {\n return (channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM');\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/googleAnalytics.js","module.exports = require(\"redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux\"\n// module id = 57\n// module chunks = 0","const { componentsConfig } = require('../../config/siteConfig.js');\n\nfunction getDeepestChildValue (parent, childrenKeys) {\n let childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array\n let child = parent[childKey];\n if (childrenKeys.length >= 1) {\n return getDeepestChildValue(child, childrenKeys);\n }\n return child;\n}\n\nexport const dynamicImport = (filePath) => {\n // validate inputs\n if (!filePath) {\n throw new Error('no file path provided to dynamicImport()');\n }\n if (typeof filePath !== 'string') {\n console.log('dynamicImport > filePath:', filePath);\n console.log('dynamicImport > filePath type:', typeof filePath);\n throw new Error('file path provided to dynamicImport() must be a string');\n }\n if (!componentsConfig) {\n console.log('no componentsConfig found in siteConfig.js');\n return require(`${filePath}`);\n }\n // split out the file folders // filter out any empty or white-space-only strings\n const folders = filePath.split('/').filter(folderName => folderName.replace(/\\s/g, '').length);\n // check for the component corresponding to file path in the site config object\n // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]]\n const customComponent = getDeepestChildValue(componentsConfig, folders);\n if (customComponent) {\n return customComponent; // return custom component\n } else {\n return require(`${filePath}`);\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/dynamicImport.js","const createBasicCanonicalLink = (page, siteHost) => {\n return `${siteHost}/${page}`;\n};\n\nconst createAssetCanonicalLink = (asset, siteHost) => {\n let channelName, certificateId, name, claimId;\n if (asset.claimData) {\n ({ channelName, certificateId, name, claimId } = asset.claimData);\n };\n if (channelName) {\n return `${siteHost}/${channelName}:${certificateId}/${name}`;\n };\n return `${siteHost}/${claimId}/${name}`;\n};\n\nconst createChannelCanonicalLink = (channel, siteHost) => {\n const { name, longId } = channel;\n return `${siteHost}/${name}:${longId}`;\n};\n\nexport const createCanonicalLink = (asset, channel, page, siteHost) => {\n if (asset) {\n return createAssetCanonicalLink(asset, siteHost);\n }\n if (channel) {\n return createChannelCanonicalLink(channel, siteHost);\n }\n return createBasicCanonicalLink(page, siteHost);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/canonicalLink.js","module.exports = {\n validateFile (file) {\n if (!file) {\n throw new Error('no file provided');\n }\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate size and type\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n throw new Error('Sorry, GIFs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/file.js","module.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(identifier)\n .map(match => match || null);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your URL. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('Check your URL. No channel name after \"@\".');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in channel name: \"${nameBadChars.join(', ')}\".`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`Check your URL. No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`Check your URL. The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId: channelClaimId || null,\n claimId : claimId || null,\n };\n },\n parseClaim: function (name) {\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first extension)\n '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end)\n );\n const [proto, claimName, extensionSeperator, extension] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(name)\n .map(match => match || null);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('Check your URL. No claim name provided before \".\"');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in claim name: \"${nameBadChars.join(', ')}\".`);\n }\n // Validate and process extension\n if (extensionSeperator) {\n if (!extension) {\n throw new Error(`Check your URL. No file extension provided after separator \"${extensionSeperator}\".`);\n }\n if (extensionSeperator !== '.') {\n throw new Error(`Check your URL. The \"${extensionSeperator}\" separator is not supported in the claim name.`);\n }\n }\n return {\n claimName,\n extension: extension || null,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/lbryUri.js","const determineOgThumbnailContentType = (thumbnail) => {\n if (thumbnail) {\n const fileExt = thumbnail.substring(thumbnail.lastIndexOf('.'));\n switch (fileExt) {\n case 'jpeg':\n case 'jpg':\n return 'image/jpeg';\n case 'png':\n return 'image/png';\n case 'gif':\n return 'image/gif';\n case 'mp4':\n return 'video/mp4';\n default:\n return 'image/jpeg';\n }\n }\n return '';\n};\n\nconst createBasicMetaTags = (siteHost, siteDescription, siteTitle, siteTwitter) => {\n return [\n {property: 'og:title', content: siteTitle},\n {property: 'og:url', content: siteHost},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: siteDescription},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createChannelMetaTags = (siteTitle, siteHost, siteTwitter, channel) => {\n const { name, longId } = channel;\n return [\n {property: 'og:title', content: `${name} on ${siteTitle}`},\n {property: 'og:url', content: `${siteHost}/${name}:${longId}`},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: `${name}, a channel on ${siteTitle}`},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createAssetMetaTags = (siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) => {\n const { claimData } = asset;\n const { contentType } = claimData;\n const embedUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const showUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const source = `${siteHost}/${claimData.claimId}/${claimData.name}.${claimData.fileExt}`;\n const ogTitle = claimData.title || claimData.name;\n const ogDescription = claimData.description || defaultDescription;\n const ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);\n const ogThumbnail = claimData.thumbnail || defaultThumbnail;\n const metaTags = [\n {property: 'og:title', content: ogTitle},\n {property: 'og:url', content: showUrl},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: ogDescription},\n {property: 'og:image:width', content: 600},\n {property: 'og:image:height', content: 315},\n {property: 'twitter:site', content: siteTwitter},\n ];\n if (contentType === 'video/mp4' || contentType === 'video/webm') {\n metaTags.push({property: 'og:video', content: source});\n metaTags.push({property: 'og:video:secure_url', content: source});\n metaTags.push({property: 'og:video:type', content: contentType});\n metaTags.push({property: 'og:image', content: ogThumbnail});\n metaTags.push({property: 'og:image:type', content: ogThumbnailContentType});\n metaTags.push({property: 'og:type', content: 'video'});\n metaTags.push({property: 'twitter:card', content: 'player'});\n metaTags.push({property: 'twitter:player', content: embedUrl});\n metaTags.push({property: 'twitter:player:width', content: 600});\n metaTags.push({property: 'twitter:text:player_width', content: 600});\n metaTags.push({property: 'twitter:player:height', content: 337});\n metaTags.push({property: 'twitter:player:stream', content: source});\n metaTags.push({property: 'twitter:player:stream:content_type', content: contentType});\n } else {\n metaTags.push({property: 'og:image', content: source});\n metaTags.push({property: 'og:image:type', content: contentType});\n metaTags.push({property: 'og:type', content: 'article'});\n metaTags.push({property: 'twitter:card', content: 'summary_large_image'});\n }\n return metaTags;\n};\n\nexport const createMetaTags = (siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) => {\n if (asset) {\n return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail);\n };\n if (channel) {\n return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel);\n };\n return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/metaTags.js","export const createPageTitle = (siteTitle, pageTitle) => {\n if (!pageTitle) {\n return `${siteTitle}`;\n }\n return `${siteTitle} - ${pageTitle}`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/pageTitle.js","import * as actions from 'constants/channel_action_types';\n\n// export action creators\n\nexport function updateLoggedInChannel (name, shortId, longId) {\n return {\n type: actions.CHANNEL_UPDATE,\n data: {\n name,\n shortId,\n longId,\n },\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/channel.js","import React from 'react';\nimport { NavLink, withRouter } from 'react-router-dom';\nimport Logo from 'components/Logo';\nimport NavBarChannelDropdown from 'components/NavBarChannelOptionsDropdown';\nimport request from 'utils/request';\n\nconst VIEW = 'VIEW';\nconst LOGOUT = 'LOGOUT';\n\nclass NavBar extends React.Component {\n constructor (props) {\n super(props);\n this.checkForLoggedInUser = this.checkForLoggedInUser.bind(this);\n this.logoutUser = this.logoutUser.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n componentDidMount () {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n checkForLoggedInUser () {\n const params = {credentials: 'include'};\n request('/user', params)\n .then(({ data }) => {\n this.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n })\n .catch(error => {\n console.log('/user error:', error.message);\n });\n }\n logoutUser () {\n const params = {credentials: 'include'};\n request('/logout', params)\n .then(() => {\n this.props.onChannelLogout();\n })\n .catch(error => {\n console.log('/logout error', error.message);\n });\n }\n handleSelection (event) {\n const value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push(`/${this.props.channelName}:${this.props.channelLongId}`);\n break;\n default:\n break;\n }\n }\n render () {\n const { siteDescription } = this.props;\n return (\n
\n
\n \n
\n {siteDescription}\n
\n
\n Publish\n About\n { this.props.channelName ? (\n \n ) : (\n Channel\n )}\n
\n
\n
\n );\n }\n}\n\nexport default withRouter(NavBar);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/view.jsx","import React from 'react';\nimport Helmet from 'react-helmet';\nimport PropTypes from 'prop-types';\n\nimport { createPageTitle } from 'utils/pageTitle';\nimport { createMetaTags } from 'utils/metaTags';\nimport { createCanonicalLink } from 'utils/canonicalLink';\n\nclass SEO extends React.Component {\n render () {\n // props from state\n const { defaultDescription, defaultThumbnail, siteDescription, siteHost, siteTitle, siteTwitter } = this.props;\n // props from parent\n const { asset, channel, pageUri } = this.props;\n let { pageTitle } = this.props;\n // create page title, tags, and canonical link\n pageTitle = createPageTitle(siteTitle, pageTitle);\n const metaTags = createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n const canonicalLink = createCanonicalLink(asset, channel, pageUri, siteHost);\n // render results\n return (\n \n );\n }\n};\n\nSEO.propTypes = {\n pageTitle: PropTypes.string,\n pageUri : PropTypes.string,\n channel : PropTypes.object,\n asset : PropTypes.object,\n};\n\nexport default SEO;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/view.jsx","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ChannelLoginForm from 'containers/ChannelLoginForm';\nimport ChannelCreateForm from 'containers/ChannelCreateForm';\n\nclass LoginPage extends React.Component {\n componentWillReceiveProps (newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push(`/`);\n }\n }\n render () {\n return (\n
\n \n \n
\n
\n
\n

Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you're documenting important events, or making a public repository for cat gifs (password: '1234'), try creating a channel for it!

\n
\n
\n
\n

Log in to an existing channel:

\n \n

Create a brand new channel:

\n \n
\n
\n
\n
\n );\n }\n};\n\nexport default withRouter(LoginPage);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/view.jsx","import React from 'react';\nimport request from 'utils/request';\n\nclass ChannelLoginForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n name : '',\n password: '',\n };\n this.handleInput = this.handleInput.bind(this);\n this.loginToChannel = this.loginToChannel.bind(this);\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n loginToChannel (event) {\n event.preventDefault();\n const params = {\n method : 'POST',\n body : JSON.stringify({username: this.state.name, password: this.state.password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n request('login', params)\n .then(({success, channelName, shortChannelId, channelClaimId, message}) => {\n if (success) {\n this.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n this.setState({'error': message});\n };\n })\n .catch(error => {\n if (error.message) {\n this.setState({'error': error.message});\n } else {\n this.setState({'error': error});\n }\n });\n }\n render () {\n return (\n
\n
\n
\n \n
\n
\n @\n \n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n { this.state.error ? (\n

{this.state.error}

\n ) : (\n

Enter the name and password for your channel

\n )}\n
\n \n
\n
\n );\n }\n}\n\nexport default ChannelLoginForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport request from 'utils/request';\n\nclass ChannelCreateForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n channel : '',\n password: '',\n status : null,\n };\n this.handleChannelInput = this.handleChannelInput.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.createChannel = this.createChannel.bind(this);\n }\n cleanseChannelInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n handleChannelInput (event) {\n let value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({channel: value});\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({error: 'Please enter a channel name'});\n }\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n updateIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n request(`/api/channel/availability/${channelWithAtSymbol}`)\n .then(() => {\n this.setState({'error': null});\n })\n .catch((error) => {\n this.setState({'error': error.message});\n });\n }\n checkIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n return request(`/api/channel/availability/${channelWithAtSymbol}`);\n }\n checkIsPasswordProvided (password) {\n return new Promise((resolve, reject) => {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n makePublishChannelRequest (username, password) {\n const params = {\n method : 'POST',\n body : JSON.stringify({username, password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n return new Promise((resolve, reject) => {\n request('/signup', params)\n .then(result => {\n return resolve(result);\n })\n .catch(error => {\n reject(new Error(`Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ${error.message}`));\n });\n });\n }\n createChannel (event) {\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password)\n .then(() => {\n return this.checkIsChannelAvailable(this.state.channel);\n })\n .then(() => {\n this.setState({status: 'We are publishing your new channel. Sit tight...'});\n return this.makePublishChannelRequest(this.state.channel, this.state.password);\n })\n .then(result => {\n this.setState({status: null});\n this.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n })\n .catch((error) => {\n if (error.message) {\n this.setState({'error': error.message, status: null});\n } else {\n this.setState({'error': error, status: null});\n };\n });\n }\n render () {\n return (\n
\n { !this.state.status ? (\n
\n
\n
\n \n
\n
\n @\n \n { (this.state.channel && !this.state.error) && {'\\u2713'} }\n { this.state.error && {'\\u2716'} }\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n {this.state.error ? (\n

{this.state.error}

\n ) : (\n

Choose a name and password for your channel

\n )}\n
\n \n
\n
\n ) : (\n
\n

{this.state.status}

\n \n
\n )}\n
\n );\n }\n}\n\nexport default ChannelCreateForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/view.jsx","import React from 'react';\nimport ErrorPage from 'pages/ErrorPage';\nimport ShowAssetLite from 'containers/ShowAssetLite';\nimport ShowAssetDetails from 'containers/ShowAssetDetails';\nimport ShowChannel from 'containers/ShowChannel';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\nclass ShowPage extends React.Component {\n componentDidMount () {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n componentWillReceiveProps (nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n render () {\n const { error, requestType } = this.props;\n if (error) {\n return (\n \n );\n }\n switch (requestType) {\n case CHANNEL:\n return ;\n case ASSET_LITE:\n return ;\n case ASSET_DETAILS:\n return ;\n default:\n return

loading...

;\n }\n }\n};\n\nexport default ShowPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/view.jsx","import React from 'react';\nimport SEO from 'components/SEO';\nimport { Link } from 'react-router-dom';\nimport AssetDisplay from 'containers/AssetDisplay';\n\nclass ShowLite extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { name, claimId } = asset.claimData;\n return (\n
\n \n \n hosted\n via Spee.ch\n
\n );\n }\n return (\n
\n

loading asset data...

\n
\n );\n }\n};\n\nexport default ShowLite;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport { LOCAL_CHECK, UNAVAILABLE, ERROR, AVAILABLE } from 'constants/asset_display_states';\n\nclass AssetDisplay extends React.Component {\n componentDidMount () {\n const { asset: { claimData: { name, claimId } } } = this.props;\n this.props.onFileRequest(name, claimId);\n }\n render () {\n const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props;\n return (\n
\n {(status === LOCAL_CHECK) &&\n
\n

Checking to see if Spee.ch has your asset locally...

\n
\n }\n {(status === UNAVAILABLE) &&\n
\n

Sit tight, we're searching the LBRY blockchain for your asset!

\n \n

Curious what magic is happening here? Learn more.

\n
\n }\n {(status === ERROR) &&\n
\n

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the LBRY discord.

\n

{error}

\n
\n }\n {(status === AVAILABLE) &&\n (() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return (\n \n );\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

Unsupported file type

\n );\n }\n })()\n }\n
\n );\n }\n};\n\nexport default AssetDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/view.jsx","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ErrorPage from 'pages/ErrorPage';\nimport AssetTitle from 'containers/AssetTitle';\nimport AssetDisplay from 'containers/AssetDisplay';\nimport AssetInfo from 'containers/AssetInfo';\n\nclass ShowAssetDetails extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { claimData: { name } } = asset;\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowAssetDetails;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/view.jsx","import React from 'react';\n\nconst AssetTitle = ({ title }) => {\n return (\n
\n {title}\n
\n );\n};\n\nexport default AssetTitle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/view.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nclass AssetInfo extends React.Component {\n constructor (props) {\n super(props);\n this.copyToClipboard = this.copyToClipboard.bind(this);\n }\n copyToClipboard (event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({error: 'Oops, unable to copy'});\n }\n }\n render () {\n const { asset: { shortId, claimData : { channelName, certificateId, description, name, claimId, fileExt, contentType, thumbnail, host } } } = this.props;\n return (\n
\n {channelName &&\n
\n
\n Channel:\n
\n
\n {channelName}\n
\n
\n }\n\n {description &&\n
\n {description}\n
\n }\n\n
\n
\n
\n Share:\n
\n
\n \n twitter\n facebook\n tumblr\n reddit\n
\n
\n
\n
\n\n
\n \n );\n }\n};\n\nexport default AssetInfo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/view.jsx","import React from 'react';\nimport SEO from 'components/SEO';\nimport ErrorPage from 'pages/ErrorPage';\nimport NavBar from 'containers/NavBar';\nimport ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay';\n\nclass ShowChannel extends React.Component {\n render () {\n const { channel } = this.props;\n if (channel) {\n const { name, longId, shortId } = channel;\n return (\n
\n \n \n
\n
\n

channel name: {name}

\n

full channel id: {longId}

\n

short channel id: {shortId}

\n
\n
\n \n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowChannel;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/view.jsx","import React from 'react';\nimport AssetPreview from 'components/AssetPreview';\n\nclass ChannelClaimsDisplay extends React.Component {\n constructor (props) {\n super(props);\n this.showNextResultsPage = this.showNextResultsPage.bind(this);\n this.showPreviousResultsPage = this.showPreviousResultsPage.bind(this);\n }\n showPreviousResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n showNextResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n showNewPage (page) {\n const { channelKey, channel: { name, longId } } = this.props;\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n render () {\n const { channel: { claimsData: { claims, currentPage, totalPages } } } = this.props;\n return (\n
\n {(claims.length > 0) ? (\n
\n {claims.map((claim, index) => )}\n
\n {(currentPage > 1) &&\n \n }\n {(currentPage < totalPages) &&\n \n }\n
\n
\n ) : (\n

There are no claims in this channel

\n )}\n
\n );\n }\n};\n\nexport default ChannelClaimsDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/view.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nconst AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail } }) => {\n const directSourceLink = `${claimId}/${name}.${fileExt}`;\n const showUrlLink = `/${claimId}/${name}`;\n return (\n
\n \n {(() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

unsupported file type

\n );\n }\n })()}\n \n
\n );\n};\n\nexport default AssetPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/view.jsx","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport Helmet from 'react-helmet';\n\nclass FourOhForPage extends React.Component {\n render () {\n const {title, host} = this.props;\n return (\n
\n \n {title} - 404\n \n \n \n
\n

404

\n

That page does not exist

\n
\n
\n );\n }\n};\n\nexport default FourOhForPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/view.jsx","const { lstatSync, readdirSync } = require('fs');\nconst { join } = require('path');\n\nexport const getSubDirectoryNames = (root) => {\n return readdirSync(root)\n .filter(name => {\n let fullPath = join(root, name);\n return lstatSync(fullPath).isDirectory();\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./build/getFolderNames.js","import React from 'react';\nimport ChannelLoginForm from 'containers/ChannelLoginForm';\nimport ChannelCreateForm from 'containers/ChannelCreateForm';\nimport * as states from 'constants/publish_channel_select_states';\n\nclass ChannelSelect extends React.Component {\n constructor (props) {\n super(props);\n this.toggleAnonymousPublish = this.toggleAnonymousPublish.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n toggleAnonymousPublish (event) {\n const value = event.target.value;\n if (value === 'anonymous') {\n this.props.onPublishInChannelChange(false);\n } else {\n this.props.onPublishInChannelChange(true);\n }\n }\n handleSelection (event) {\n const selectedOption = event.target.selectedOptions[0].value;\n this.props.onChannelSelect(selectedOption);\n }\n render () {\n return (\n
\n
\n
\n \n \n
\n
\n \n \n
\n { this.props.channelError ? (\n

{this.props.channelError}

\n ) : (\n

Publish anonymously or in a channel

\n )}\n
\n { this.props.publishInChannel && (\n
\n
\n \n
\n \n
\n { (this.props.selectedChannel === states.LOGIN) && }\n { (this.props.selectedChannel === states.CREATE) && }\n
\n )}\n
\n );\n }\n}\n\nexport default ChannelSelect;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelSelect/view.jsx","import React from 'react';\nimport { validateFile } from 'utils/file';\nimport PublishPreview from 'components/PublishPreview';\n\nclass Dropzone extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n dragOver : false,\n mouseOver : false,\n dimPreview: false,\n };\n this.handleDrop = this.handleDrop.bind(this);\n this.handleDragOver = this.handleDragOver.bind(this);\n this.handleDragEnd = this.handleDragEnd.bind(this);\n this.handleDragEnter = this.handleDragEnter.bind(this);\n this.handleDragLeave = this.handleDragLeave.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n this.handleClick = this.handleClick.bind(this);\n this.handleFileInput = this.handleFileInput.bind(this);\n this.chooseFile = this.chooseFile.bind(this);\n }\n handleDrop (event) {\n event.preventDefault();\n this.setState({dragOver: false});\n // if dropped items aren't files, reject them\n const dt = event.dataTransfer;\n if (dt.items) {\n if (dt.items[0].kind === 'file') {\n const droppedFile = dt.items[0].getAsFile();\n this.chooseFile(droppedFile);\n }\n }\n }\n handleDragOver (event) {\n event.preventDefault();\n }\n handleDragEnd (event) {\n var dt = event.dataTransfer;\n if (dt.items) {\n for (var i = 0; i < dt.items.length; i++) {\n dt.items.remove(i);\n }\n } else {\n event.dataTransfer.clearData();\n }\n }\n handleDragEnter () {\n this.setState({dragOver: true, dimPreview: true});\n }\n handleDragLeave () {\n this.setState({dragOver: false, dimPreview: false});\n }\n handleMouseEnter () {\n this.setState({mouseOver: true, dimPreview: true});\n }\n handleMouseLeave () {\n this.setState({mouseOver: false, dimPreview: false});\n }\n handleClick (event) {\n event.preventDefault();\n document.getElementById('file_input').click();\n }\n handleFileInput (event) {\n event.preventDefault();\n const fileList = event.target.files;\n this.chooseFile(fileList[0]);\n }\n chooseFile (file) {\n if (file) {\n try {\n validateFile(file); // validate the file's name, type, and size\n } catch (error) {\n return this.props.setFileError(error.message);\n }\n // stage it so it will be ready when the publish button is clicked\n this.props.selectFile(file);\n }\n }\n render () {\n return (\n
\n
\n \n
\n
\n {this.props.file ? (\n
\n \n
\n { this.state.dragOver ? (\n
\n

Drop it.

\n
\n ) : (\n null\n )}\n { this.state.mouseOver ? (\n
\n

{this.props.fileError}

\n

Drag & drop image or video here to publish

\n

OR

\n

CHOOSE FILE

\n
\n ) : (\n null\n )}\n
\n
\n ) : (\n
\n { this.state.dragOver ? (\n
\n

Drop it.

\n
\n ) : (\n
\n

{this.props.fileError}

\n

Drag & drop image or video here to publish

\n

OR

\n

CHOOSE FILE

\n
\n )}\n
\n )}\n
\n
\n );\n }\n};\n\nexport default Dropzone;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/Dropzone/view.jsx","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport Dropzone from 'containers/Dropzone';\nimport PublishTitleInput from 'containers/PublishTitleInput';\nimport PublishUrlInput from 'containers/PublishUrlInput';\nimport PublishThumbnailInput from 'containers/PublishThumbnailInput';\nimport PublishMetadataInputs from 'containers/PublishMetadataInputs';\nimport ChannelSelect from 'containers/ChannelSelect';\n\nclass PublishDetails extends React.Component {\n constructor (props) {\n super(props)\n this.onPublishSubmit = this.onPublishSubmit.bind(this);\n }\n onPublishSubmit () {\n this.props.startPublish(this.props.history);\n }\n render () {\n return (\n
\n
\n \n
\n {/* left column */}\n
\n
\n \n
\n
\n {/* right column */}\n
\n
\n
\n \n
\n
\n \n
\n { (this.props.file.type === 'video/mp4') && (\n
\n \n
\n )}\n
\n \n
\n
\n \n
\n
\n \n
\n
\n

By clicking 'Publish', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. Read more.

\n
\n
\n
\n
\n );\n }\n};\n\nexport default withRouter(PublishDetails);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishDetails/view.jsx","import React from 'react';\n\nclass PublishTitleInput extends React.Component {\n constructor (props) {\n super(props);\n this.handleInput = this.handleInput.bind(this);\n }\n handleInput (e) {\n const name = e.target.name;\n const value = e.target.value;\n this.props.onMetadataChange(name, value);\n }\n render () {\n return (\n \n );\n }\n}\n\nexport default PublishTitleInput;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishTitleInput/view.jsx","import React from 'react';\nimport request from 'utils/request';\nimport UrlMiddle from 'components/PublishUrlMiddleDisplay';\n\nclass PublishUrlInput extends React.Component {\n constructor (props) {\n super(props);\n this.handleInput = this.handleInput.bind(this);\n }\n componentDidMount () {\n const { claim, fileName } = this.props;\n if (!claim) {\n this.setClaimName(fileName);\n }\n }\n componentWillReceiveProps ({ claim, fileName }) {\n // if a new file was chosen, update the claim name\n if (fileName !== this.props.fileName) {\n return this.setClaimName(fileName);\n }\n // if the claim has updated, check its availability\n if (claim !== this.props.claim) {\n this.validateClaim(claim);\n }\n }\n handleInput (event) {\n let value = event.target.value;\n value = this.cleanseInput(value);\n // update the state\n this.props.onClaimChange(value);\n }\n cleanseInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n setClaimName (fileName) {\n const fileNameWithoutEnding = fileName.substring(0, fileName.lastIndexOf('.'));\n const cleanClaimName = this.cleanseInput(fileNameWithoutEnding);\n this.props.onClaimChange(cleanClaimName);\n }\n validateClaim (claim) {\n if (!claim) {\n return this.props.onUrlError('Enter a url above');\n }\n request(`/api/claim/availability/${claim}`)\n .then(() => {\n this.props.onUrlError(null);\n })\n .catch((error) => {\n this.props.onUrlError(error.message);\n });\n }\n render () {\n const { claim, loggedInChannelName, loggedInChannelShortId, publishInChannel, selectedChannel, urlError } = this.props;\n return (\n
\n
\n spee.ch / \n \n \n { (claim && !urlError) && {'\\u2713'} }\n { urlError && {'\\u2716'} }\n
\n
\n { urlError ? (\n

{urlError}

\n ) : (\n

Choose a custom url

\n )}\n
\n
\n );\n }\n}\n\nexport default PublishUrlInput;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishUrlInput/view.jsx","import React from 'react';\n\nfunction dataURItoBlob(dataURI) {\n // convert base64/URLEncoded data component to raw binary data held in a string\n let byteString = atob(dataURI.split(',')[1]);\n // separate out the mime component\n let mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n // write the bytes of the string to a typed array\n let ia = new Uint8Array(byteString.length);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n return new Blob([ia], {type: mimeString});\n}\n\nclass PublishThumbnailInput extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n videoSource : null,\n error : null,\n sliderMinRange: 1,\n sliderMaxRange: null,\n sliderValue : null,\n };\n this.handleVideoLoadedData = this.handleVideoLoadedData.bind(this);\n this.handleSliderChange = this.handleSliderChange.bind(this);\n this.createThumbnail = this.createThumbnail.bind(this);\n }\n componentDidMount () {\n const { file } = this.props;\n this.setVideoSource(file);\n }\n componentWillReceiveProps (nextProps) {\n // if file changes\n if (nextProps.file && nextProps.file !== this.props.file) {\n const { file } = nextProps;\n this.setVideoSource(file);\n };\n }\n setVideoSource (file) {\n const previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = () => {\n const dataUri = previewReader.result;\n const blob = dataURItoBlob(dataUri);\n const videoSource = URL.createObjectURL(blob);\n this.setState({ videoSource });\n };\n }\n handleVideoLoadedData (event) {\n const duration = event.target.duration;\n const totalMinutes = Math.floor(duration / 60);\n const totalSeconds = Math.floor(duration % 60);\n // set the slider\n this.setState({\n sliderMaxRange: duration * 100,\n sliderValue : duration * 100 / 2,\n totalMinutes,\n totalSeconds,\n });\n // update the current time of the video\n let video = document.getElementById('video-thumb-player');\n video.currentTime = duration / 2;\n }\n handleSliderChange (event) {\n const value = parseInt(event.target.value);\n // update the slider value\n this.setState({\n sliderValue: value,\n });\n // update the current time of the video\n let video = document.getElementById('video-thumb-player');\n video.currentTime = value / 100;\n }\n createThumbnail () {\n // take a snapshot\n let video = document.getElementById('video-thumb-player');\n let canvas = document.createElement('canvas');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);\n const dataUrl = canvas.toDataURL();\n const blob = dataURItoBlob(dataUrl);\n const snapshot = new File([blob], `thumbnail.png`, {\n type: 'image/png',\n });\n // set the thumbnail in redux store\n if (snapshot) {\n this.props.onNewThumbnail(snapshot);\n }\n }\n render () {\n const { error, videoSource, sliderMinRange, sliderMaxRange, sliderValue, totalMinutes, totalSeconds } = this.state;\n return (\n
\n \n \n {\n sliderValue ? (\n
\n
\n 0'00\"\n {totalMinutes}'{totalSeconds}\"\n
\n
\n \n
\n
\n ) : (\n

loading...

\n )\n }\n { error ? (\n

{error}

\n ) : (\n

Use slider to set thumbnail

\n )}\n
\n );\n }\n}\n\nexport default PublishThumbnailInput;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishThumbnailInput/view.jsx","import React from 'react';\nimport ExpandingTextArea from 'components/ExpandingTextArea';\n\nclass PublishMetadataInputs extends React.Component {\n constructor (props) {\n super(props);\n this.toggleShowInputs = this.toggleShowInputs.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.handleSelect = this.handleSelect.bind(this);\n }\n toggleShowInputs () {\n this.props.onToggleMetadataInputs(!this.props.showMetadataInputs);\n }\n handleInput (event) {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.props.onMetadataChange(name, value);\n }\n handleSelect (event) {\n const name = event.target.name;\n const selectedOption = event.target.selectedOptions[0].value;\n this.props.onMetadataChange(name, selectedOption);\n }\n render () {\n return (\n
\n {this.props.showMetadataInputs && (\n
\n
\n
\n \n
\n \n
\n
\n\n
\n
\n \n
\n \n
\n
\n\n
\n
\n \n
\n \n
\n
\n
\n )}\n \n
\n );\n }\n}\n\nexport default PublishMetadataInputs;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishMetadataInputs/view.jsx","import React from 'react';\n\nclass PublishDisabledMessage extends React.Component {\n render () {\n const message = this.props.message;\n console.log('this.props.message:', message);\n return (\n
\n

Publishing is currently disabled.

\n

{message}

\n
\n );\n }\n}\n\nexport default PublishDisabledMessage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishDisabledMessage/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport * as publishStates from 'constants/publish_claim_states';\n\nclass PublishStatus extends React.Component {\n render () {\n const { status, message, clearFile } = this.props;\n return (\n
\n {status === publishStates.LOAD_START &&\n
\n

File is loading to server

\n

0%

\n
\n }\n {status === publishStates.LOADING &&\n
\n
\n

File is loading to server

\n

{message}

\n
\n
\n }\n {status === publishStates.PUBLISHING &&\n
\n

Upload complete. Your file is now being published on the blockchain...

\n \n

Curious what magic is happening here? Learn more.

\n
\n }\n {status === publishStates.SUCCESS &&\n
\n

Your publish is complete! You are being redirected to it now.

\n

If you are not automatically redirected, click here.

\n
\n }\n {status === publishStates.FAILED &&\n
\n

Something went wrong...

\n

{message}

\n

For help, post the above error text in the #speech channel on the lbry discord

\n \n
\n }\n
\n );\n }\n};\n\nexport default PublishStatus;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishStatus/view.jsx","import React from 'react';\nimport Dropzone from 'containers/Dropzone';\nimport PublishDetails from 'containers/PublishDetails';\nimport PublishStatus from 'containers/PublishStatus';\nimport PublishDisabledMessage from 'containers/PublishDisabledMessage';\n\nclass PublishTool extends React.Component {\n render () {\n if (this.props.disabled) {\n console.log('publish is disabled');\n return (\n \n );\n } else {\n console.log('publish is not disabled');\n if (this.props.file) {\n if (this.props.status) {\n return (\n \n );\n } else {\n return ;\n }\n }\n return ;\n }\n }\n};\n\nexport default PublishTool;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishTool/view.jsx","module.exports = require(\"passport\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport\"\n// module id = 91\n// module chunks = 0","function MysqlConfig () {\n this.database = 'default';\n this.username = 'default';\n this.password = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No MySQL config received.');\n }\n const {database, username, password} = config;\n this.database = database;\n this.username = username;\n this.password = password;\n };\n};\n\nmodule.exports = new MysqlConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/mysqlConfig.js","function SlackConfig () {\n this.slackWebHook = 'default';\n this.slackErrorChannel = 'default';\n this.slackInfoChannel = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No slack config received.');\n }\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = config;\n this.slackWebHook = slackWebHook;\n this.slackErrorChannel = slackErrorChannel;\n this.slackInfoChannel = slackInfoChannel;\n };\n};\n\nmodule.exports = new SlackConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/slackConfig.js","module.exports = require(\"passport-local\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport-local\"\n// module id = 94\n// module chunks = 0","module.exports = require(\"sequelize\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"sequelize\"\n// module id = 95\n// module chunks = 0","module.exports = {\n returnShortId: function (claimsArray, longId) {\n let claimIndex;\n let shortId = longId.substring(0, 1); // default short id is the first letter\n let shortIdLength = 0;\n // find the index of this claim id\n claimIndex = claimsArray.findIndex(element => {\n return element.claimId === longId;\n });\n if (claimIndex < 0) {\n throw new Error('claim id not found in claims list');\n }\n // get an array of all claims with lower height\n let possibleMatches = claimsArray.slice(0, claimIndex);\n // remove certificates with the same prefixes until none are left.\n while (possibleMatches.length > 0) {\n shortIdLength += 1;\n shortId = longId.substring(0, shortIdLength);\n possibleMatches = possibleMatches.filter(element => {\n return (element.claimId && (element.claimId.substring(0, shortIdLength) === shortId));\n });\n }\n return shortId;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/sequelizeHelpers.js","const logger = require('winston');\nconst fs = require('fs');\n\nconst { details, publishing } = require('../../config/siteConfig.js');\n\nmodule.exports = {\n parsePublishApiRequestBody ({name, nsfw, license, title, description, thumbnail}) {\n // validate name\n if (!name) {\n throw new Error('no name field found in request');\n }\n const invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name);\n if (invalidNameCharacters) {\n throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and \"-\"');\n }\n // optional parameters\n nsfw = (nsfw === 'true');\n license = license || null;\n title = title || null;\n description = description || null;\n thumbnail = thumbnail || null;\n // return results\n return {\n name,\n nsfw,\n license,\n title,\n description,\n thumbnail,\n };\n },\n parsePublishApiRequestFiles ({file, thumbnail}) {\n // make sure a file was provided\n if (!file) {\n throw new Error('no file with key of [file] found in request');\n }\n if (!file.path) {\n throw new Error('no file path found');\n }\n if (!file.type) {\n throw new Error('no file type found');\n }\n if (!file.size) {\n throw new Error('no file type found');\n }\n // validate the file name\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate the file\n module.exports.validateFileTypeAndSize(file);\n // return results\n return {\n fileName : file.name,\n filePath : file.path,\n fileType : file.type,\n thumbnailFileName: (thumbnail ? thumbnail.name : null),\n thumbnailFilePath: (thumbnail ? thumbnail.path : null),\n thumbnailFileType: (thumbnail ? thumbnail.type : null),\n };\n },\n validateFileTypeAndSize (file) {\n // check file type and size\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n logger.debug('publish > file validation > .jpeg/.jpg/.png was too big');\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .gif was too big');\n throw new Error('Sorry, .gifs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .mp4 was too big');\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n logger.debug('publish > file validation > unrecognized file type');\n throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n return file;\n },\n createBasicPublishParams (filePath, name, title, description, license, nsfw, thumbnail) {\n logger.debug(`Creating Publish Parameters`);\n // provide defaults for title\n if (title === null || title.trim() === '') {\n title = name;\n }\n // provide default for description\n if (description === null || description.trim() === '') {\n description = '';\n }\n // provide default for license\n if (license === null || license.trim() === '') {\n license = ' '; // default to empty string\n }\n // create the publish params\n const publishParams = {\n name,\n file_path: filePath,\n bid : 0.01,\n metadata : {\n description,\n title,\n author : details.title,\n language: 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n };\n // add thumbnail to channel if video\n if (thumbnail) {\n publishParams['metadata']['thumbnail'] = thumbnail;\n }\n return publishParams;\n },\n createThumbnailPublishParams (thumbnailFilePath, claimName, license, nsfw) {\n if (!thumbnailFilePath) {\n return;\n }\n logger.debug(`Creating Thumbnail Publish Parameters`);\n // create the publish params\n return {\n name : `${claimName}-thumb`,\n file_path: thumbnailFilePath,\n bid : 0.01,\n metadata : {\n title : `${claimName} thumbnail`,\n description: `a thumbnail for ${claimName}`,\n author : details.title,\n language : 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n channel_name : publishing.thumbnailChannel,\n channel_id : publishing.thumbnailChannelId,\n };\n },\n deleteTemporaryFile (filePath) {\n fs.unlink(filePath, err => {\n if (err) {\n logger.error(`error deleting temporary file ${filePath}`);\n throw err;\n }\n logger.debug(`successfully deleted ${filePath}`);\n });\n },\n addGetResultsToFileData (fileInfo, getResult) {\n fileInfo.fileName = getResult.file_name;\n fileInfo.filePath = getResult.download_path;\n return fileInfo;\n },\n createFileData ({ name, claimId, outpoint, height, address, nsfw, contentType }) {\n return {\n name,\n claimId,\n outpoint,\n height,\n address,\n fileName: '',\n filePath: '',\n fileType: contentType,\n nsfw,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/publishHelpers.js","module.exports = require(\"fs\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"fs\"\n// module id = 98\n// module chunks = 0","const logger = require('winston');\n\nmodule.exports = {\n handleErrorResponse: function (originalUrl, ip, error, res) {\n logger.error(`Error on ${originalUrl}`, module.exports.useObjectPropertiesIfNoKeys(error));\n const [status, message] = module.exports.returnErrorMessageAndStatus(error);\n res\n .status(status)\n .json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function (error) {\n let status, message;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function (err) {\n if (Object.keys(err).length === 0) {\n let newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach((key) => {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload (status, message) {\n return {\n status,\n success: false,\n message,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/errorHandlers.js","const db = require('../models/index');\nconst logger = require('winston');\nconst { returnPaginatedChannelClaims } = require('../helpers/channelPagination.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\nconst NO_FILE = 'NO_FILE';\n\nmodule.exports = {\n getClaimId (channelName, channelClaimId, name, claimId) {\n if (channelName) {\n return module.exports.getClaimIdByChannel(channelName, channelClaimId, name);\n } else {\n return module.exports.getClaimIdByClaim(name, claimId);\n }\n },\n getClaimIdByClaim (claimName, claimId) {\n logger.debug(`getClaimIdByClaim(${claimName}, ${claimId})`);\n return new Promise((resolve, reject) => {\n db.Claim.getLongClaimId(claimName, claimId)\n .then(longClaimId => {\n if (!longClaimId) {\n resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimIdByChannel (channelName, channelClaimId, claimName) {\n logger.debug(`getClaimIdByChannel(${channelName}, ${channelClaimId}, ${claimName})`);\n return new Promise((resolve, reject) => {\n db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id\n .then(longChannelId => {\n if (!longChannelId) {\n return [null, null];\n }\n return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id\n })\n .then(([longChannelId, longClaimId]) => {\n if (!longChannelId) {\n return resolve(NO_CHANNEL);\n }\n if (!longClaimId) {\n return resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelData (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]);\n })\n .then(([longChannelClaimId, shortChannelClaimId]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. return all the channel information\n resolve({\n channelName,\n longChannelClaimId,\n shortChannelClaimId,\n });\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelClaims (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]);\n })\n .then(([longChannelClaimId, channelClaimsArray]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. format the data for the view, including pagination\n let paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);\n // 4. return all the channel information and contents\n resolve(paginatedChannelViewData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getLocalFileRecord (claimId, name) {\n return db.File.findOne({where: {claimId, name}})\n .then(file => {\n if (!file) {\n return NO_FILE;\n }\n return file.dataValues;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/serveController.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore } from 'redux';\nimport Reducer from 'client/reducers';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from 'client/components/GAListener/';\nimport App from 'client/app';\nimport renderFullPage from './renderFullPage.js';\nimport Helmet from 'react-helmet';\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create a new Redux store instance\n const store = createStore(Reducer);\n\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `` was rendered\n return res.redirect(301, context.url);\n } else {\n // we're good, send the response\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handlePageRender.jsx","module.exports = require(\"react-dom/server\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-dom/server\"\n// module id = 102\n// module chunks = 0","import { combineReducers } from 'redux';\nimport PublishReducer from 'reducers/publish';\nimport ChannelReducer from 'reducers/channel';\nimport ShowReducer from 'reducers/show';\nimport SiteReducer from 'reducers/site';\n\nexport default combineReducers({\n channel: ChannelReducer,\n publish: PublishReducer,\n show : ShowReducer,\n site : SiteReducer,\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/index.js","export const FILE_SELECTED = 'FILE_SELECTED';\nexport const FILE_CLEAR = 'FILE_CLEAR';\nexport const METADATA_UPDATE = 'METADATA_UPDATE';\nexport const CLAIM_UPDATE = 'CLAIM_UPDATE';\nexport const SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';\nexport const PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';\nexport const ERROR_UPDATE = 'ERROR_UPDATE';\nexport const SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';\nexport const TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';\nexport const THUMBNAIL_NEW = 'THUMBNAIL_NEW';\nexport const PUBLISH_START = 'PUBLISH_START';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_action_types.js","export const LOGIN = 'Existing';\nexport const CREATE = 'New';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_channel_select_states.js","export const CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/channel_action_types.js","export const LOCAL_CHECK = 'LOCAL_CHECK';\nexport const UNAVAILABLE = 'UNAVAILABLE';\nexport const ERROR = 'ERROR';\nexport const AVAILABLE = 'AVAILABLE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/asset_display_states.js","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport { dynamicImport } from 'utils/dynamicImport';\nimport AboutPage from 'pages/AboutPage';\nimport LoginPage from 'pages/LoginPage';\nimport ShowPage from 'pages/ShowPage';\nimport FourOhFourPage from 'containers/FourOhFourPage';\nconst HomePage = dynamicImport('pages/HomePage'); // or use the provided local homepage\n\nconst App = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default App;\n\n\n\n// WEBPACK FOOTER //\n// ./client/app.js","var map = {\n\t\"./canonicalLink\": 59,\n\t\"./canonicalLink.js\": 59,\n\t\"./dynamicImport\": 58,\n\t\"./dynamicImport.js\": 58,\n\t\"./file\": 60,\n\t\"./file.js\": 60,\n\t\"./lbryUri\": 61,\n\t\"./lbryUri.js\": 61,\n\t\"./metaTags\": 62,\n\t\"./metaTags.js\": 62,\n\t\"./pageTitle\": 63,\n\t\"./pageTitle.js\": 63,\n\t\"./publish\": 110,\n\t\"./publish.js\": 110,\n\t\"./request\": 8,\n\t\"./request.js\": 8,\n\t\"./validate\": 111,\n\t\"./validate.js\": 111\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 109;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/utils ^.*$\n// module id = 109\n// module chunks = 0","export const createPublishMetadata = (claim, { type }, { title, description, license, nsfw }, publishInChannel, selectedChannel) => {\n let metadata = {\n name: claim,\n title,\n description,\n license,\n nsfw,\n type,\n };\n if (publishInChannel) {\n metadata['channelName'] = selectedChannel;\n }\n return metadata;\n};\n\nexport const createPublishFormData = (file, thumbnail, metadata) => {\n let fd = new FormData();\n // append file\n fd.append('file', file);\n // append thumbnail\n if (thumbnail) {\n fd.append('thumbnail', thumbnail);\n }\n // append metadata\n for (let key in metadata) {\n if (metadata.hasOwnProperty(key)) {\n fd.append(key, metadata[key]);\n }\n }\n return fd;\n};\n\nexport const createThumbnailUrl = (channel, channelId, claim, host) => {\n return `${host}/${channel}:${channelId}/${claim}-thumb.png`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/publish.js","export const validateChannelSelection = (publishInChannel, selectedChannel, loggedInChannel) => {\n if (publishInChannel && (selectedChannel !== loggedInChannel.name)) {\n throw new Error('Log in to a channel or select Anonymous');\n }\n};\n\nexport const validatePublishParams = (file, claim, urlError) => {\n if (!file) {\n throw new Error('Please choose a file');\n }\n if (!claim) {\n throw new Error('Please enter a URL');\n }\n if (urlError) {\n throw new Error('Fix the url');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/validate.js","export const CHANNEL = 'CHANNEL';\nexport const ASSET_LITE = 'ASSET_LITE';\nexport const ASSET_DETAILS = 'ASSET_DETAILS';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_request_types.js","module.exports = (helmet, html, preloadedState) => {\n // take the html and preloadedState and return the full page\n return `\n \n \n \n \n \n \n \n ${helmet.title.toString()}\n ${helmet.meta.toString()}\n ${helmet.link.toString()}\n \n \n \n \n \n \n \n \n
\n
${html}
\n
\n \n \n \n \n `;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/renderFullPage.js","export const selectSiteState = (state) => {\n return state.site;\n};\n\nexport const selectSiteHost = (state) => {\n return state.site.host;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/site.js","module.exports = require(\"babel-polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-polyfill\"\n// module id = 116\n// module chunks = 0","module.exports = require(\"whatwg-fetch\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"whatwg-fetch\"\n// module id = 117\n// module chunks = 0","const Server = require('./server/server.js');\r\nconst Components = require('./client/components');\r\nconst Containers = require('./client/containers');\r\nconst Pages = require('./client/pages');\r\n\r\nconst exports = {\r\n Server,\r\n Components,\r\n Containers,\r\n Pages,\r\n};\r\n\r\nmodule.exports = exports;\r\n\n\n\n// WEBPACK FOOTER //\n// ./speech.js","// app dependencies\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst expressHandlebars = require('express-handlebars');\nconst Handlebars = require('handlebars');\nconst helmet = require('helmet');\nconst passport = require('passport');\nconst { serializeSpeechUser, deserializeSpeechUser } = require('./helpers/authHelpers.js');\nconst cookieSession = require('cookie-session');\nconst http = require('http');\n// logging dependencies\nconst logger = require('winston');\n\nfunction Server () {\n this.configureMysql = (mysqlConfig) => {\n require('../config/mysqlConfig.js').configure(mysqlConfig);\n };\n this.configureSite = (siteConfig) => {\n require('../config/siteConfig.js').configure(siteConfig);\n this.sessionKey = siteConfig.auth.sessionKey;\n this.PORT = siteConfig.details.port;\n };\n this.configureSlack = (slackConfig) => {\n require('../config/slackConfig.js').configure(slackConfig);\n };\n this.createApp = () => {\n // create an Express application\n const app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(`${__dirname}/public`)); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use((req, res, next) => { // custom logging middleware to log all incoming http requests\n logger.verbose(`Request on ${req.originalUrl} from ${req.ip}`);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n const localSignupStrategy = require('./passport/local-signup.js');\n const localLoginStrategy = require('./passport/local-login.js');\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name : 'session',\n keys : [this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000, // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n const hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars : Handlebars,\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n require('./routes/auth-routes.js')(app);\n require('./routes/api-routes.js')(app);\n require('./routes/page-routes.js')(app);\n require('./routes/asset-routes.js')(app);\n require('./routes/fallback-routes.js')(app);\n\n this.app = app;\n };\n this.initialize = () => {\n require('./helpers/configureLogger.js')(logger);\n require('./helpers/configureSlack.js')(logger);\n this.createApp();\n this.server = http.Server(this.app);\n };\n this.start = () => {\n const db = require('./models/index');\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(() => {\n this.server.listen(this.PORT, () => {\n logger.info(`Server is listening on PORT ${this.PORT}`);\n });\n })\n .catch((error) => {\n logger.error(`Startup Error:`, error);\n });\n };\n};\n\nmodule.exports = Server;\n\n\n\n// WEBPACK FOOTER //\n// ./server/server.js","module.exports = require(\"express\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express\"\n// module id = 120\n// module chunks = 0","module.exports = require(\"body-parser\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"body-parser\"\n// module id = 121\n// module chunks = 0","module.exports = require(\"express-handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express-handlebars\"\n// module id = 122\n// module chunks = 0","module.exports = require(\"handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"handlebars\"\n// module id = 123\n// module chunks = 0","module.exports = require(\"helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"helmet\"\n// module id = 124\n// module chunks = 0","const logger = require('winston');\n\nmodule.exports = {\n serializeSpeechUser (user, done) { // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser (user, done) { // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/authHelpers.js","module.exports = require(\"cookie-session\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cookie-session\"\n// module id = 126\n// module chunks = 0","module.exports = require(\"http\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"http\"\n// module id = 127\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst lbryApi = require('../helpers/lbryApi.js');\nconst logger = require('winston');\nconst db = require('../models');\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`);\n let userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel(`@${username}`)\n .then(tx => {\n // create user record\n const userData = {\n userName: username,\n password: password,\n };\n logger.verbose('userData >', userData);\n // create user record\n const channelData = {\n channelName : `@${username}`,\n channelClaimId: tx.claim_id,\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n const certificateData = {\n claimId: tx.claim_id,\n name : `@${username}`,\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n })\n .then(([newUser, newChannel, newCertificate]) => {\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n })\n .then(() => {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n })\n .catch(error => {\n logger.error('signup error', error);\n return done(error);\n });\n }\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-signup.js","module.exports = require(\"axios\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"axios\"\n// module id = 129\n// module chunks = 0","const lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279',\n },\n};\n\nmodule.exports = lbryConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/lbryConfig.js","module.exports = require(\"universal-analytics\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"universal-analytics\"\n// module id = 131\n// module chunks = 0","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Certificate = sequelize.define(\n 'Certificate',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateVersion: {\n type : STRING,\n default: null,\n },\n keyType: {\n type : STRING,\n default: null,\n },\n publicKey: {\n type : TEXT('long'),\n default: null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Certificate.associate = db => {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n logger.debug(`getShortChannelIdFromLongChannelId ${channelName}:${longChannelId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {name: channelName},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelIdFromShortChannelId(${channelName}, ${channelClaimId})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name : channelName,\n claimId: {\n $like: `${channelClaimId}%`,\n },\n },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n logger.debug(`getLongChannelIdFromChannelName(${channelName})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n logger.debug(`validateLongChannelId(${name}, ${claimId})`);\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelId(${channelName}, ${channelClaimId})`);\n if (channelClaimId && (channelClaimId.length === 40)) { // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) { // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/certificate.js","module.exports = (sequelize, { STRING }) => {\n const Channel = sequelize.define(\n 'Channel',\n {\n channelName: {\n type : STRING,\n allowNull: false,\n },\n channelClaimId: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Channel.associate = db => {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/channel.js","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\nconst { assetDefaults: { thumbnail: defaultThumbnail }, details: { host } } = require('../../config/siteConfig.js');\n\nfunction determineFileExtensionFromContentType (contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail (storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData (claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Claim = sequelize.define(\n 'Claim',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateId: {\n type : STRING,\n default: null,\n },\n author: {\n type : STRING,\n default: null,\n },\n description: {\n type : TEXT('long'),\n default: null,\n },\n language: {\n type : STRING,\n default: null,\n },\n license: {\n type : STRING,\n default: null,\n },\n licenseUrl: {\n type : STRING,\n default: null,\n },\n nsfw: {\n type : BOOLEAN,\n default: null,\n },\n preview: {\n type : STRING,\n default: null,\n },\n thumbnail: {\n type : STRING,\n default: null,\n },\n title: {\n type : STRING,\n default: null,\n },\n metadataVersion: {\n type : STRING,\n default: null,\n },\n contentType: {\n type : STRING,\n default: null,\n },\n source: {\n type : STRING,\n default: null,\n },\n sourceType: {\n type : STRING,\n default: null,\n },\n sourceVersion: {\n type : STRING,\n default: null,\n },\n streamVersion: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n channelName: {\n type : STRING,\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Claim.associate = db => {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n logger.debug(`Claim.getShortClaimIdFromLongClaimId for ${claimName}#${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n logger.debug(`Claim.getAllChannelClaims for ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw : true, // returns an array of only data, not an array of instances\n })\n .then(channelClaimsArray => {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(claim => {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n logger.debug(`finding claim id for claim ${claimName} from channel ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(`${result.length} records found for \"${claimName}\" in channel \"${channelClaimId}\"`);\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name,\n claimId: {\n $like: `${shortId}%`,\n }},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']], // note: maybe height and effective amount need to switch?\n })\n .then(result => {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug(`getLongClaimId(${claimName}, ${claimId})`);\n if (claimId && (claimId.length === 40)) { // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n logger.debug(`Claim.resolveClaim: ${name} ${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name, claimId },\n })\n .then(claimArray => {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error(`more than one record matches ${name}#${claimId} in db.Claim`);\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/claim.js","module.exports = (sequelize, { STRING, BOOLEAN, INTEGER }) => {\n const File = sequelize.define(\n 'File',\n {\n name: {\n type : STRING,\n allowNull: false,\n },\n claimId: {\n type : STRING,\n allowNull: false,\n },\n address: {\n type : STRING,\n allowNull: false,\n },\n outpoint: {\n type : STRING,\n allowNull: false,\n },\n height: {\n type : INTEGER,\n allowNull: false,\n default : 0,\n },\n fileName: {\n type : STRING,\n allowNull: false,\n },\n filePath: {\n type : STRING,\n allowNull: false,\n },\n fileType: {\n type: STRING,\n },\n nsfw: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: false,\n },\n trendingEligible: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: true,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n File.associate = db => {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25,\n });\n };\n\n return File;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/file.js","module.exports = (sequelize, { STRING, BOOLEAN, TEXT }) => {\n const Request = sequelize.define(\n 'Request',\n {\n action: {\n type : STRING,\n allowNull: false,\n },\n url: {\n type : STRING,\n allowNull: false,\n },\n ipAddress: {\n type : STRING,\n allowNull: true,\n },\n result: {\n type : TEXT('long'),\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Request.associate = db => {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n return Request;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/request.js","'use strict';\nconst bcrypt = require('bcrypt');\nconst logger = require('winston');\n\nmodule.exports = (sequelize, { STRING }) => {\n const User = sequelize.define(\n 'User',\n {\n userName: {\n type : STRING,\n allowNull: false,\n },\n password: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n User.associate = db => {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n this\n .update({password: hash})\n .then(() => {\n resolve();\n })\n .catch(error => {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', (user, options) => {\n logger.debug('User.beforeCreate hook...');\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/user.js","module.exports = require(\"bcrypt\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"bcrypt\"\n// module id = 138\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst logger = require('winston');\nconst db = require('../models/index');\n\nconst returnUserAndChannelInfo = (userInstance) => {\n return new Promise((resolve, reject) => {\n let userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance\n .getChannel()\n .then(({channelName, channelClaimId}) => {\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n })\n .catch(error => {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n return db.User\n .findOne({\n where: {userName: username},\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n return user.comparePassword(password)\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user)\n .then(userInfo => {\n return done(null, userInfo);\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return done(error);\n });\n },\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-login.js","const logger = require('winston');\nconst passport = require('passport');\n\nmodule.exports = (app) => {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), (req, res) => {\n logger.verbose(`successful signup for ${req.user.channelName}`);\n res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n // route for log in\n app.post('/login', (req, res, next) => {\n passport.authenticate('local-login', (err, user, info) => {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message,\n });\n }\n logger.debug('successful login');\n req.logIn(user, (err) => {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', (req, res) => {\n req.logout();\n res.status(200).json({success: true, message: 'you successfully logged out'});\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', (req, res) => {\n if (req.user) {\n res.status(200).json({success: true, data: req.user});\n } else {\n res.status(401).json({success: false, message: 'user is not logged in'});\n }\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/auth-routes.js","const logger = require('winston');\nconst multipart = require('connect-multiparty');\nconst { publishing: { uploadDirectory }, details: { host } } = require('../../config/siteConfig.js');\nconst multipartMiddleware = multipart({uploadDir: uploadDirectory});\nconst db = require('../models/index');\nconst { claimNameIsAvailable, checkChannelAvailability, publish } = require('../controllers/publishController.js');\nconst { getClaimList, resolveUri, getClaim } = require('../helpers/lbryApi.js');\nconst { addGetResultsToFileData, createBasicPublishParams, createThumbnailPublishParams, parsePublishApiRequestBody, parsePublishApiRequestFiles, createFileData } = require('../helpers/publishHelpers.js');\nconst errorHandlers = require('../helpers/errorHandlers.js');\nconst { sendGATimingEvent } = require('../helpers/googleAnalytics.js');\nconst { authenticateUser } = require('../auth/authentication.js');\nconst { getChannelData, getChannelClaims, getClaimId } = require('../controllers/serveController.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = (app) => {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n checkChannelAvailability(name)\n .then(availableName => {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', ({ ip, originalUrl, params }, res) => {\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json(shortId);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n const page = params.page;\n getChannelClaims(channelName, channelClaimId, page)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', ({ ip, originalUrl, params }, res) => {\n getClaimList(params.name)\n .then(claimsList => {\n res.status(200).json(claimsList);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId)\n .then(resolveResult => {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n let fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(`${name}#${claimId}`)]);\n })\n .then(([ fileData, getResult ]) => {\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, {name, claimId}, 'File'), getResult]);\n })\n .then(([ fileRecord, {message, completed} ]) => {\n res.status(200).json({ success: true, message, completed });\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n claimNameIsAvailable(name)\n .then(result => {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', ({ headers, ip, originalUrl, params }, res) => {\n resolveUri(`${params.name}#${params.claimId}`)\n .then(resolvedUri => {\n res.status(200).json(resolvedUri);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, ({ body, files, headers, ip, originalUrl, user }, res) => {\n // define variables\n let channelName, channelId, channelPassword, description, fileName, filePath, fileType, gaStartTime, license, name, nsfw, thumbnail, thumbnailFileName, thumbnailFilePath, thumbnailFileType, title;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n // validateApiPublishRequest(body, files);\n ({name, nsfw, license, title, description, thumbnail} = parsePublishApiRequestBody(body));\n ({fileName, filePath, fileType, thumbnailFileName, thumbnailFilePath, thumbnailFileType} = parsePublishApiRequestFiles(files));\n ({channelName, channelId, channelPassword} = body);\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // check channel authorization\n Promise.all([\n authenticateUser(channelName, channelId, channelPassword, user),\n claimNameIsAvailable(name),\n createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail),\n createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw),\n ])\n .then(([{channelName, channelClaimId}, validatedClaimName, publishParams, thumbnailPublishParams]) => {\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n })\n .then(result => {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data : {\n name,\n claimId: result.claim_id,\n url : `${host}/${result.claim_id}/${name}`,\n lbryTx : result,\n },\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', ({ ip, originalUrl, body, params }, res) => {\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json({success: true, data: shortId});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', ({ ip, originalUrl, body, params }, res) => {\n logger.debug('body:', body);\n const channelName = body.channelName;\n const channelClaimId = body.channelClaimId;\n const claimName = body.claimName;\n const claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(result => {\n if (result === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel could be found'});\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'No matching claim id could be found'});\n }\n res.status(200).json({success: true, data: result});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', ({ ip, originalUrl, body, params }, res) => {\n const claimName = params.claimName;\n let claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId)\n .then(claimInfo => {\n if (!claimInfo) {\n return res.status(404).json({success: false, message: 'No claim could be found'});\n }\n res.status(200).json({success: true, data: claimInfo});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n db.File.findOne({where: {name, claimId}})\n .then(result => {\n if (result) {\n return res.status(200).json({success: true, data: true});\n }\n res.status(200).json({success: true, data: false});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/api-routes.js","module.exports = require(\"connect-multiparty\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"connect-multiparty\"\n// module id = 142\n// module chunks = 0","const logger = require('winston');\nconst db = require('../models/index');\nconst lbryApi = require('../helpers/lbryApi.js');\nconst publishHelpers = require('../helpers/publishHelpers.js');\nconst { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('../../config/siteConfig.js');\nconst Sequelize = require('sequelize');\nconst Op = Sequelize.Op;\n\nmodule.exports = {\n publish (publishParams, fileName, fileType) {\n return new Promise((resolve, reject) => {\n let publishResults, certificateId, channelName;\n // publish the file\n return lbryApi.publishClaim(publishParams)\n .then(tx => {\n logger.info(`Successfully published ${publishParams.name} ${fileName}`, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug(`this claim was published in channel: ${publishParams.channel_name}`);\n return db.Channel.findOne({where: {channelName: publishParams.channel_name}});\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n })\n .then(channel => {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug(`certificateId: ${certificateId}`);\n })\n .then(() => {\n // create the File record\n const fileRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n fileName,\n filePath : publishParams.file_path,\n fileType,\n nsfw : publishParams.metadata.nsfw,\n };\n // create the Claim record\n const claimRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n thumbnail : publishParams.metadata.thumbnail,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n contentType: fileType,\n nsfw : publishParams.metadata.nsfw,\n amount : publishParams.bid,\n certificateId,\n channelName,\n };\n // upsert criteria\n const upsertCriteria = {\n name : publishParams.name,\n claimId: publishResults.claim_id,\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n })\n .then(([file, claim]) => {\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n })\n .then(() => {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n })\n .catch(error => {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable (name) {\n const claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim\n .findAll({\n attributes: ['address'],\n where : {\n name,\n address: {\n [Op.or]: claimAddresses,\n },\n },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n checkChannelAvailability (name) {\n return db.Channel\n .findAll({\n where: { channelName: name },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/publishController.js","const db = require('../models');\nconst logger = require('winston');\n\nmodule.exports = {\n authenticateUser (channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName : null,\n channelClaimId: null,\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName : user.channelName,\n channelClaimId: user.channelClaimId,\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials (channelName, channelId, userPassword) {\n return new Promise((resolve, reject) => {\n // hoisted variables\n let channelData;\n // build the params for finding the channel\n let channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel\n .findOne({\n where: channelFindParams,\n })\n .then(channel => {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) },\n });\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n })\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/auth/authentication.js","const CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims (channelName, longChannelClaimId, claims, page) {\n const totalPages = module.exports.determineTotalPages(claims);\n const paginationPage = module.exports.getPageFromQuery(page);\n const viewData = {\n channelName : channelName,\n longChannelClaimId: longChannelClaimId,\n claims : module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage : module.exports.determinePreviousPage(paginationPage),\n currentPage : paginationPage,\n nextPage : module.exports.determineNextPage(totalPages, paginationPage),\n totalPages : totalPages,\n totalResults : module.exports.determineTotalClaims(claims),\n };\n return viewData;\n },\n getPageFromQuery (page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims (claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n const claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n const claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n const pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages (claims) {\n if (!claims) {\n return 0;\n } else {\n const totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n const fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n const remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage (currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage (totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims (claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/channelPagination.js","const { details: host } = require('../../config/siteConfig.js');\nconst handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = (app) => {\n // route for the home page\n app.get('/', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', (req, res) => {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', (req, res) => {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', (req, res) => {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', ({ params }, res) => {\n const claimId = params.claimId;\n const name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host, claimId, name });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/page-routes.js","import * as actions from 'constants/publish_action_types';\nimport { LOGIN } from 'constants/publish_channel_select_states';\nconst { publishing } = require('../../config/siteConfig.js');\n\nconst initialState = {\n disabled : publishing.disabled,\n disabledMessage : publishing.disabledMessage,\n publishInChannel : false,\n selectedChannel : LOGIN,\n showMetadataInputs: false,\n status : {\n status : null,\n message: null,\n },\n error: {\n file : null,\n url : null,\n channel : null,\n publishSubmit: null,\n },\n file : null,\n claim : '',\n metadata: {\n title : '',\n description: '',\n license : '',\n nsfw : false,\n },\n thumbnail: null,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data,\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data,\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel,\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data,\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data,\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data,\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/publish.js","import * as actions from 'constants/channel_action_types';\n\nconst initialState = {\n loggedInChannel: {\n name : null,\n shortId: null,\n longId : null,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/channel.js","import * as actions from 'constants/show_action_types';\nimport { LOCAL_CHECK, ERROR } from 'constants/asset_display_states';\n\nconst initialState = {\n request: {\n error: null,\n type : null,\n id : null,\n },\n requestList : {},\n channelList : {},\n assetList : {},\n displayAsset: {\n error : null,\n status: LOCAL_CHECK,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data,\n }),\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id : action.data.requestId,\n }),\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, {\n [action.data.id]: {\n error: action.data.error,\n key : action.data.key,\n },\n }),\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, {\n [action.data.id]: {\n error : action.data.error,\n name : action.data.name,\n claimId : action.data.claimId,\n shortId : action.data.shortId,\n claimData: action.data.claimData,\n },\n }),\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.id]: {\n name : action.data.name,\n longId : action.data.longId,\n shortId : action.data.shortId,\n claimsData: action.data.claimsData,\n },\n }),\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.channelListId]: Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData,\n }),\n }),\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data,\n }),\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error : action.data,\n status: ERROR,\n }),\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/show.js","const siteConfig = require('../../config/siteConfig.js');\n\nconst {\n analytics: {\n googleId: googleAnalyticsId,\n },\n assetDefaults: {\n thumbnail: defaultThumbnail,\n description: defaultDescription,\n },\n details: {\n description,\n host,\n title,\n twitter,\n },\n} = siteConfig;\n\nconst initialState = {\n description,\n googleAnalyticsId,\n host,\n title,\n twitter,\n defaultDescription,\n defaultThumbnail,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/site.js","module.exports = require(\"react-ga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-ga\"\n// module id = 151\n// module chunks = 0","module.exports = require(\"cross-fetch/polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cross-fetch/polyfill\"\n// module id = 152\n// module chunks = 0","const { sendGAServeEvent } = require('../helpers/googleAnalytics');\nconst { determineResponseType, flipClaimNameAndIdForBackwardsCompatibility, logRequestData, getClaimIdAndServeAsset } = require('../helpers/serveHelpers.js');\nconst lbryUri = require('../helpers/lbryUri.js');\nconst handleShowRender = require('../helpers/handleShowRender.jsx');\nconst SERVE = 'SERVE';\n\nmodule.exports = (app) => {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({ claimName } = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // parse the identifier\n let isChannel, channelName, channelClaimId, claimId;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(params.identifier));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n if (!isChannel) {\n [claimId, claimName] = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({claimName} = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/asset-routes.js","const logger = require('winston');\nconst { getClaimId, getLocalFileRecord } = require('../controllers/serveController.js');\nconst { handleErrorResponse } = require('./errorHandlers.js');\n\nconst SERVE = 'SERVE';\nconst SHOW = 'SHOW';\nconst NO_FILE = 'NO_FILE';\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml ({accept}) {\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser (headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset ({accept, range}) {\n const imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n const videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId (claimId) {\n return ((claimId.length === 40) && !/[^A-Za-z0-9]/g.test(claimId));\n};\n\nfunction isValidShortId (claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId (input) {\n return (isValidClaimId(input) || isValidShortId(input));\n};\n\nfunction serveAssetToClient (claimId, name, res) {\n return getLocalFileRecord(claimId, name)\n .then(fileRecord => {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect(`/api/claim/get/${name}/${claimId}`);\n }\n // serve the file\n const {filePath, fileType} = fileRecord;\n logger.verbose(`serving file: ${filePath}`);\n const sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type' : fileType || 'image/jpeg',\n },\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n })\n .catch(error => {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset (channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(fullClaimId => {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'no claim id could be found'});\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'no channel id could be found'});\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n })\n .catch(error => {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType (hasFileExtension, headers) {\n let responseType;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) { // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) { // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility (identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n const tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData (responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/serveHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n logger.debug('parsing identifier:', identifier);\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex\n .exec(identifier)\n .map(match => match || null);\n logger.debug(`${proto}, ${value}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your url. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Invalid characters in channel name: ${nameBadChars.join(', ')}.`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId,\n claimId,\n };\n },\n parseClaim: function (claim) {\n logger.debug('parsing name:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Invalid characters in claim name: ${nameBadChars.join(', ')}.`);\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No file extension provided after separator ${modifierSeperator}.`);\n }\n if (modifierSeperator !== '.') {\n throw new Error(`The ${modifierSeperator} modifier is not supported in the claim name`);\n }\n }\n // return results\n return {\n claimName,\n };\n },\n parseModifier: function (claim) {\n logger.debug('parsing modifier:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n // Validate and process modifier\n let hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryUri.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore, applyMiddleware } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage';\nimport createSagaMiddleware from 'redux-saga';\nimport { call } from 'redux-saga/effects';\nimport { handleShowPageUri } from '../../client/sagas/show_uri';\nimport { onHandleShowPageUri } from '../../client/actions/show';\n\nimport Helmet from 'react-helmet';\n\nconst returnSagaWithParams = (saga, params) => {\n return function * () {\n yield call(saga, params);\n };\n};\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create and apply middleware\n const sagaMiddleware = createSagaMiddleware();\n const middleware = applyMiddleware(sagaMiddleware);\n\n // create a new Redux store instance\n const store = createStore(Reducer, middleware);\n\n // create saga\n const action = onHandleShowPageUri(req.params);\n const saga = returnSagaWithParams(handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware\n .run(saga)\n .done\n .then(() => {\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handleShowRender.jsx","module.exports = require(\"redux-saga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga\"\n// module id = 157\n// module chunks = 0","import { call, put, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { onRequestError, onNewChannelRequest, onNewAssetRequest } from 'actions/show';\nimport { newAssetRequest } from 'sagas/show_asset';\nimport { newChannelRequest } from 'sagas/show_channel';\nimport lbryUri from 'utils/lbryUri';\n\nfunction * parseAndUpdateIdentifierAndClaim (modifier, claim) {\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n let isChannel, channelName, channelClaimId, claimId, claimName, extension;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(modifier));\n ({ claimName, extension } = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n if (isChannel) {\n return yield call(newAssetRequest, onNewAssetRequest(claimName, null, channelName, channelClaimId, extension));\n };\n yield call(newAssetRequest, onNewAssetRequest(claimName, claimId, null, null, extension));\n}\nfunction * parseAndUpdateClaimOnly (claim) {\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n let isChannel, channelName, channelClaimId;\n try {\n ({ isChannel, channelName, channelClaimId } = lbryUri.parseIdentifier(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n // return early if this request is for a channel\n if (isChannel) {\n return yield call(newChannelRequest, onNewChannelRequest(channelName, channelClaimId));\n }\n // if not for a channel, parse the claim request\n let claimName, extension;\n try {\n ({claimName, extension} = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield call(newAssetRequest, onNewAssetRequest(claimName, null, null, null, extension));\n}\n\nexport function * handleShowPageUri (action) {\n const { identifier, claim } = action.data;\n if (identifier) {\n return yield call(parseAndUpdateIdentifierAndClaim, identifier, claim);\n }\n yield call(parseAndUpdateClaimOnly, claim);\n};\n\nexport function * watchHandleShowPageUri () {\n yield takeLatest(actions.HANDLE_SHOW_URI, handleShowPageUri);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_uri.js","import { call, put, select, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addRequestToRequestList, onRequestError, onRequestUpdate, addAssetToAssetList } from 'actions/show';\nimport { getLongClaimId, getShortId, getClaimData } from 'api/assetApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newAssetRequest (action) {\n const { requestType, requestId, name, modifier } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get long id && add request to request list\n let longId;\n try {\n ({data: longId} = yield call(getLongClaimId, host, name, modifier));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n const assetKey = `a#${name}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, assetKey));\n // is this an existing asset?\n // If this asset is in the asset list, it's already been fetched\n if (state.assetList[assetKey]) {\n return null;\n }\n // get short Id\n let shortId;\n try {\n ({data: shortId} = yield call(getShortId, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // get asset claim data\n let claimData;\n try {\n ({data: claimData} = yield call(getClaimData, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // add asset to asset list\n yield put(addAssetToAssetList(assetKey, null, name, longId, shortId, claimData));\n // clear any errors in request error\n yield put(onRequestError(null));\n};\n\nexport function * watchNewAssetRequest () {\n yield takeLatest(actions.ASSET_REQUEST_NEW, newAssetRequest);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_asset.js","import Request from 'utils/request';\n\nexport function getLongClaimId (host, name, modifier) {\n let body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n const params = {\n method : 'POST',\n headers: { 'Content-Type': 'application/json' },\n body : JSON.stringify(body),\n };\n // create url\n const url = `${host}/api/claim/long-id`;\n // return the request promise\n return Request(url, params);\n};\n\nexport function getShortId (host, name, claimId) {\n const url = `${host}/api/claim/short-id/${claimId}/${name}`;\n return Request(url);\n};\n\nexport function getClaimData (host, name, claimId) {\n const url = `${host}/api/claim/data/${name}/${claimId}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/assetApi.js","import {call, put, select, takeLatest} from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addNewChannelToChannelList, addRequestToRequestList, onRequestError, onRequestUpdate, updateChannelClaims } from 'actions/show';\nimport { getChannelClaims, getChannelData } from 'api/channelApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newChannelRequest (action) {\n const { requestType, requestId, channelName, channelId } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get channel long id\n let longId, shortId;\n try {\n ({ data: {longChannelClaimId: longId, shortChannelClaimId: shortId} } = yield call(getChannelData, host, channelName, channelId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the request in the channel requests list\n const channelKey = `c#${channelName}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, channelKey));\n // is this an existing channel?\n // If this channel is in the channel list, it's already been fetched\n if (state.channelList[channelKey]) {\n return null;\n }\n // get channel claims data\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, channelName, 1));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the channel data in the channel list\n yield put(addNewChannelToChannelList(channelKey, channelName, shortId, longId, claimsData));\n // clear any request errors\n yield put(onRequestError(null));\n}\n\nexport function * watchNewChannelRequest () {\n yield takeLatest(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n};\n\nfunction * getNewClaimsAndUpdateChannel (action) {\n const { channelKey, name, longId, page } = action.data;\n const host = yield select(selectSiteHost);\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, name, page));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield put(updateChannelClaims(channelKey, claimsData));\n}\n\nexport function * watchUpdateChannelClaims () {\n yield takeLatest(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_channel.js","import Request from 'utils/request';\n\nexport function getChannelData (host, id, name) {\n if (!id) id = 'none';\n const url = `${host}/api/channel/data/${name}/${id}`;\n return Request(url);\n};\n\nexport function getChannelClaims (host, longId, name, page) {\n if (!page) page = 1;\n const url = `${host}/api/channel/claims/${name}/${longId}/${page}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/channelApi.js","const handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = app => {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', (req, res) => {\n // send response\n handlePageRender(req, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/fallback-routes.js","const { logLevel } = require('../../config/loggerConfig');\n\nmodule.exports = (winston) => {\n // configure\n winston.configure({\n transports: [\n new (winston.transports.Console)({\n level : logLevel,\n timestamp : false,\n colorize : true,\n prettyPrint : true,\n handleExceptions : true,\n humanReadableUnhandledException: true,\n }),\n ],\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureLogger.js","const loggerConfig = {\n logLevel: 'debug', // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/loggerConfig.js","const winstonSlackWebHook = require('winston-slack-webhook').SlackWebHook;\nconst slackConfig = require('../../config/slackConfig.js');\n\nmodule.exports = (winston) => {\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = slackConfig;\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-errors-transport',\n level : 'warn',\n webhookUrl: slackWebHook,\n channel : slackErrorChannel,\n username : 'spee.ch',\n iconEmoji : ':face_with_head_bandage:',\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-info-transport',\n level : 'info',\n webhookUrl: slackWebHook,\n channel : slackInfoChannel,\n username : 'spee.ch',\n iconEmoji : ':nerd_face:',\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureSlack.js","module.exports = require(\"winston-slack-webhook\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston-slack-webhook\"\n// module id = 167\n// module chunks = 0","var map = {\n\t\"./\": 50,\n\t\"./ActiveStatusBar\": 24,\n\t\"./ActiveStatusBar/\": 24,\n\t\"./ActiveStatusBar/index\": 24,\n\t\"./ActiveStatusBar/index.jsx\": 24,\n\t\"./AssetPreview\": 34,\n\t\"./AssetPreview/\": 34,\n\t\"./AssetPreview/index\": 34,\n\t\"./AssetPreview/index.js\": 34,\n\t\"./AssetPreview/view\": 78,\n\t\"./AssetPreview/view.jsx\": 78,\n\t\"./ExpandingTextArea\": 36,\n\t\"./ExpandingTextArea/\": 36,\n\t\"./ExpandingTextArea/index\": 36,\n\t\"./ExpandingTextArea/index.jsx\": 36,\n\t\"./GAListener\": 13,\n\t\"./GAListener/\": 13,\n\t\"./GAListener/index\": 13,\n\t\"./GAListener/index.jsx\": 13,\n\t\"./InactiveStatusBar\": 25,\n\t\"./InactiveStatusBar/\": 25,\n\t\"./InactiveStatusBar/index\": 25,\n\t\"./InactiveStatusBar/index.jsx\": 25,\n\t\"./Logo\": 21,\n\t\"./Logo/\": 21,\n\t\"./Logo/index\": 21,\n\t\"./Logo/index.jsx\": 21,\n\t\"./NavBarChannelOptionsDropdown\": 22,\n\t\"./NavBarChannelOptionsDropdown/\": 22,\n\t\"./NavBarChannelOptionsDropdown/index\": 22,\n\t\"./NavBarChannelOptionsDropdown/index.jsx\": 22,\n\t\"./ProgressBar\": 10,\n\t\"./ProgressBar/\": 10,\n\t\"./ProgressBar/index\": 10,\n\t\"./ProgressBar/index.jsx\": 10,\n\t\"./PublishPreview\": 37,\n\t\"./PublishPreview/\": 37,\n\t\"./PublishPreview/index\": 37,\n\t\"./PublishPreview/index.jsx\": 37,\n\t\"./PublishUrlMiddleDisplay\": 38,\n\t\"./PublishUrlMiddleDisplay/\": 38,\n\t\"./PublishUrlMiddleDisplay/index\": 38,\n\t\"./PublishUrlMiddleDisplay/index.jsx\": 38,\n\t\"./SEO\": 7,\n\t\"./SEO/\": 7,\n\t\"./SEO/index\": 7,\n\t\"./SEO/index.js\": 7,\n\t\"./SEO/view\": 66,\n\t\"./SEO/view.jsx\": 66,\n\t\"./index\": 50,\n\t\"./index.js\": 50\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 168;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/components ^\\.\\/.*$\n// module id = 168\n// module chunks = 0","var map = {\n\t\"./\": 52,\n\t\"./AssetDisplay\": 17,\n\t\"./AssetDisplay/\": 17,\n\t\"./AssetDisplay/index\": 17,\n\t\"./AssetDisplay/index.js\": 17,\n\t\"./AssetDisplay/view\": 72,\n\t\"./AssetDisplay/view.jsx\": 72,\n\t\"./AssetInfo\": 31,\n\t\"./AssetInfo/\": 31,\n\t\"./AssetInfo/index\": 31,\n\t\"./AssetInfo/index.js\": 31,\n\t\"./AssetInfo/view\": 75,\n\t\"./AssetInfo/view.jsx\": 75,\n\t\"./AssetTitle\": 30,\n\t\"./AssetTitle/\": 30,\n\t\"./AssetTitle/index\": 30,\n\t\"./AssetTitle/index.js\": 30,\n\t\"./AssetTitle/view\": 74,\n\t\"./AssetTitle/view.jsx\": 74,\n\t\"./ChannelClaimsDisplay\": 33,\n\t\"./ChannelClaimsDisplay/\": 33,\n\t\"./ChannelClaimsDisplay/index\": 33,\n\t\"./ChannelClaimsDisplay/index.js\": 33,\n\t\"./ChannelClaimsDisplay/view\": 77,\n\t\"./ChannelClaimsDisplay/view.jsx\": 77,\n\t\"./ChannelCreateForm\": 16,\n\t\"./ChannelCreateForm/\": 16,\n\t\"./ChannelCreateForm/index\": 16,\n\t\"./ChannelCreateForm/index.js\": 16,\n\t\"./ChannelCreateForm/view\": 69,\n\t\"./ChannelCreateForm/view.jsx\": 69,\n\t\"./ChannelLoginForm\": 15,\n\t\"./ChannelLoginForm/\": 15,\n\t\"./ChannelLoginForm/index\": 15,\n\t\"./ChannelLoginForm/index.js\": 15,\n\t\"./ChannelLoginForm/view\": 68,\n\t\"./ChannelLoginForm/view.jsx\": 68,\n\t\"./ChannelSelect\": 39,\n\t\"./ChannelSelect/\": 39,\n\t\"./ChannelSelect/index\": 39,\n\t\"./ChannelSelect/index.js\": 39,\n\t\"./ChannelSelect/view\": 81,\n\t\"./ChannelSelect/view.jsx\": 81,\n\t\"./Dropzone\": 18,\n\t\"./Dropzone/\": 18,\n\t\"./Dropzone/index\": 18,\n\t\"./Dropzone/index.js\": 18,\n\t\"./Dropzone/view\": 82,\n\t\"./Dropzone/view.jsx\": 82,\n\t\"./FourOhFourPage\": 35,\n\t\"./FourOhFourPage/\": 35,\n\t\"./FourOhFourPage/index\": 35,\n\t\"./FourOhFourPage/index.jsx\": 35,\n\t\"./FourOhFourPage/view\": 79,\n\t\"./FourOhFourPage/view.jsx\": 79,\n\t\"./NavBar\": 5,\n\t\"./NavBar/\": 5,\n\t\"./NavBar/index\": 5,\n\t\"./NavBar/index.js\": 5,\n\t\"./NavBar/view\": 65,\n\t\"./NavBar/view.jsx\": 65,\n\t\"./PublishDetails\": 40,\n\t\"./PublishDetails/\": 40,\n\t\"./PublishDetails/index\": 40,\n\t\"./PublishDetails/index.js\": 40,\n\t\"./PublishDetails/view\": 83,\n\t\"./PublishDetails/view.jsx\": 83,\n\t\"./PublishDisabledMessage\": 45,\n\t\"./PublishDisabledMessage/\": 45,\n\t\"./PublishDisabledMessage/index\": 45,\n\t\"./PublishDisabledMessage/index.js\": 45,\n\t\"./PublishDisabledMessage/view\": 88,\n\t\"./PublishDisabledMessage/view.jsx\": 88,\n\t\"./PublishMetadataInputs\": 44,\n\t\"./PublishMetadataInputs/\": 44,\n\t\"./PublishMetadataInputs/index\": 44,\n\t\"./PublishMetadataInputs/index.js\": 44,\n\t\"./PublishMetadataInputs/view\": 87,\n\t\"./PublishMetadataInputs/view.jsx\": 87,\n\t\"./PublishStatus\": 46,\n\t\"./PublishStatus/\": 46,\n\t\"./PublishStatus/index\": 46,\n\t\"./PublishStatus/index.js\": 46,\n\t\"./PublishStatus/view\": 89,\n\t\"./PublishStatus/view.jsx\": 89,\n\t\"./PublishThumbnailInput\": 43,\n\t\"./PublishThumbnailInput/\": 43,\n\t\"./PublishThumbnailInput/index\": 43,\n\t\"./PublishThumbnailInput/index.js\": 43,\n\t\"./PublishThumbnailInput/view\": 86,\n\t\"./PublishThumbnailInput/view.jsx\": 86,\n\t\"./PublishTitleInput\": 41,\n\t\"./PublishTitleInput/\": 41,\n\t\"./PublishTitleInput/index\": 41,\n\t\"./PublishTitleInput/index.js\": 41,\n\t\"./PublishTitleInput/view\": 84,\n\t\"./PublishTitleInput/view.jsx\": 84,\n\t\"./PublishTool\": 47,\n\t\"./PublishTool/\": 47,\n\t\"./PublishTool/index\": 47,\n\t\"./PublishTool/index.js\": 47,\n\t\"./PublishTool/view\": 90,\n\t\"./PublishTool/view.jsx\": 90,\n\t\"./PublishUrlInput\": 42,\n\t\"./PublishUrlInput/\": 42,\n\t\"./PublishUrlInput/index\": 42,\n\t\"./PublishUrlInput/index.js\": 42,\n\t\"./PublishUrlInput/view\": 85,\n\t\"./PublishUrlInput/view.jsx\": 85,\n\t\"./ShowAssetDetails\": 29,\n\t\"./ShowAssetDetails/\": 29,\n\t\"./ShowAssetDetails/index\": 29,\n\t\"./ShowAssetDetails/index.js\": 29,\n\t\"./ShowAssetDetails/view\": 73,\n\t\"./ShowAssetDetails/view.jsx\": 73,\n\t\"./ShowAssetLite\": 27,\n\t\"./ShowAssetLite/\": 27,\n\t\"./ShowAssetLite/index\": 27,\n\t\"./ShowAssetLite/index.js\": 27,\n\t\"./ShowAssetLite/view\": 71,\n\t\"./ShowAssetLite/view.jsx\": 71,\n\t\"./ShowChannel\": 32,\n\t\"./ShowChannel/\": 32,\n\t\"./ShowChannel/index\": 32,\n\t\"./ShowChannel/index.js\": 32,\n\t\"./ShowChannel/view\": 76,\n\t\"./ShowChannel/view.jsx\": 76,\n\t\"./index\": 52,\n\t\"./index.js\": 52\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 169;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/containers ^\\.\\/.*$\n// module id = 169\n// module chunks = 0","export const LOAD_START = 'LOAD_START';\nexport const LOADING = 'LOADING';\nexport const PUBLISHING = 'PUBLISHING';\nexport const SUCCESS = 'SUCCESS';\nexport const FAILED = 'FAILED';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_claim_states.js","var map = {\n\t\"./\": 53,\n\t\"./AboutPage\": 20,\n\t\"./AboutPage/\": 20,\n\t\"./AboutPage/index\": 20,\n\t\"./AboutPage/index.jsx\": 20,\n\t\"./ErrorPage\": 12,\n\t\"./ErrorPage/\": 12,\n\t\"./ErrorPage/index\": 12,\n\t\"./ErrorPage/index.jsx\": 12,\n\t\"./HomePage\": 54,\n\t\"./HomePage/\": 54,\n\t\"./HomePage/index\": 54,\n\t\"./HomePage/index.jsx\": 54,\n\t\"./LoginPage\": 23,\n\t\"./LoginPage/\": 23,\n\t\"./LoginPage/index\": 23,\n\t\"./LoginPage/index.js\": 23,\n\t\"./LoginPage/view\": 67,\n\t\"./LoginPage/view.jsx\": 67,\n\t\"./ShowPage\": 26,\n\t\"./ShowPage/\": 26,\n\t\"./ShowPage/index\": 26,\n\t\"./ShowPage/index.js\": 26,\n\t\"./ShowPage/view\": 70,\n\t\"./ShowPage/view.jsx\": 70,\n\t\"./index\": 53,\n\t\"./index.js\": 53\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 171;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/pages ^\\.\\/.*$\n// module id = 171\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/public/bundle/bundle.js b/public/bundle/bundle.js index a8d53e8c..0b52bf4d 100644 --- a/public/bundle/bundle.js +++ b/public/bundle/bundle.js @@ -1,17057 +1,9 @@ -/******/ (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 -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // 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 = "public/bundle/"; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 214); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(3); -var core = __webpack_require__(28); -var hide = __webpack_require__(17); -var redefine = __webpack_require__(18); -var ctx = __webpack_require__(25); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); - var key, own, out, exp; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - // export native or passed - out = (own ? target : source)[key]; - // bind timers to global for call from export context - exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // extend global - if (target) redefine(target, key, out, type & $export.U); - // export - if (exports[key] != out) hide(exports, key, exp); - if (IS_PROTO && expProto[key] != out) expProto[key] = out; - } -}; -global.core = core; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -if (process.env.NODE_ENV === 'production') { - module.exports = __webpack_require__(419); -} else { - module.exports = __webpack_require__(420); -} - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(5); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -var store = __webpack_require__(72)('wks'); -var uid = __webpack_require__(42); -var Symbol = __webpack_require__(3).Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - -$exports.store = store; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports) { - -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(4)(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__(2); -var IE8_DOM_DEFINE = __webpack_require__(143); -var toPrimitive = __webpack_require__(29); -var dP = Object.defineProperty; - -exports.f = __webpack_require__(8) ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.15 ToLength -var toInteger = __webpack_require__(31); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -if (process.env.NODE_ENV !== 'production') { - var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && - Symbol.for && - Symbol.for('react.element')) || - 0xeac7; - - var isValidElement = function(object) { - return typeof object === 'object' && - object !== null && - object.$$typeof === REACT_ELEMENT_TYPE; - }; - - // By explicitly using `prop-types` you are opting into new development behavior. - // http://fb.me/prop-types-in-prod - var throwOnDirectAccess = true; - module.exports = __webpack_require__(431)(isValidElement, throwOnDirectAccess); -} else { - // By explicitly using `prop-types` you are opting into new production behavior. - // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(432)(); -} - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.13 ToObject(argument) -var defined = __webpack_require__(30); -module.exports = function (it) { - return Object(defined(it)); -}; - - -/***/ }), -/* 13 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(430); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(184); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(434); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["b"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createProvider", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return __WEBPACK_IMPORTED_MODULE_2__connect_connect__["a"]; }); - - - - - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2014-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - - -/** - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - -var warning = function() {}; - -if (process.env.NODE_ENV !== 'production') { - warning = function(condition, format, args) { - var len = arguments.length; - args = new Array(len > 2 ? len - 2 : 0); - for (var key = 2; key < len; key++) { - args[key - 2] = arguments[key]; - } - if (format === undefined) { - throw new Error( - '`warning(condition, format, ...args)` requires a warning ' + - 'message argument' - ); - } - - if (format.length < 10 || (/^[s\W]*$/).test(format)) { - throw new Error( - 'The warning format should be able to uniquely identify this ' + - 'warning. Please, use a more descriptive format than: ' + format - ); - } - - if (!condition) { - var argIndex = 0; - var message = 'Warning: ' + - format.replace(/%s/g, function() { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch(x) {} - } - }; -} - -module.exports = warning; - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) - -/***/ }), -/* 15 */ -/***/ (function(module, exports) { - -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__(9); -var createDesc = __webpack_require__(41); -module.exports = __webpack_require__(8) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(3); -var hide = __webpack_require__(17); -var has = __webpack_require__(16); -var SRC = __webpack_require__(42)('src'); -var TO_STRING = 'toString'; -var $toString = Function[TO_STRING]; -var TPL = ('' + $toString).split(TO_STRING); - -__webpack_require__(28).inspectSource = function (it) { - return $toString.call(it); -}; - -(module.exports = function (O, key, val, safe) { - var isFunction = typeof val == 'function'; - if (isFunction) has(val, 'name') || hide(val, 'name', key); - if (O[key] === val) return; - if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); - if (O === global) { - O[key] = val; - } else if (!safe) { - delete O[key]; - hide(O, key, val); - } else if (O[key]) { - O[key] = val; - } else { - hide(O, key, val); - } -// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative -})(Function.prototype, TO_STRING, function toString() { - return typeof this == 'function' && this[SRC] || $toString.call(this); -}); - - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -var $export = __webpack_require__(0); -var fails = __webpack_require__(4); -var defined = __webpack_require__(30); -var quot = /"/g; -// B.2.3.2.1 CreateHTML(string, tag, attribute, value) -var createHTML = function (string, tag, attribute, value) { - var S = String(defined(string)); - var p1 = '<' + tag; - if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; - return p1 + '>' + S + ''; -}; -module.exports = function (NAME, exec) { - var O = {}; - O[NAME] = exec(createHTML); - $export($export.P + $export.F * fails(function () { - var test = ''[NAME]('"'); - return test !== test.toLowerCase() || test.split('"').length > 3; - }), 'String', O); -}; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(64); -var defined = __webpack_require__(30); -module.exports = function (it) { - return IObject(defined(it)); -}; - - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -var pIE = __webpack_require__(65); -var createDesc = __webpack_require__(41); -var toIObject = __webpack_require__(20); -var toPrimitive = __webpack_require__(29); -var has = __webpack_require__(16); -var IE8_DOM_DEFINE = __webpack_require__(143); -var gOPD = Object.getOwnPropertyDescriptor; - -exports.f = __webpack_require__(8) ? gOPD : function getOwnPropertyDescriptor(O, P) { - O = toIObject(O); - P = toPrimitive(P, true); - if (IE8_DOM_DEFINE) try { - return gOPD(O, P); - } catch (e) { /* empty */ } - if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); -}; - - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(16); -var toObject = __webpack_require__(12); -var IE_PROTO = __webpack_require__(95)('IE_PROTO'); -var ObjectProto = Object.prototype; - -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - - -/** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ - -var invariant = function(condition, format, a, b, c, d, e, f) { - if (process.env.NODE_ENV !== 'production') { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } - - if (!condition) { - var error; - if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' - ); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error( - format.replace(/%s/g, function() { return args[argIndex++]; }) - ); - error.name = 'Invariant Violation'; - } - - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -}; - -module.exports = invariant; - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7))) - -/***/ }), -/* 24 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return sym; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return TASK; }); -/* unused harmony export HELPER */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MATCH; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CANCEL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SAGA_ACTION; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return SELF_CANCELLATION; }); -/* unused harmony export konst */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return kTrue; }); -/* unused harmony export kFalse */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return noop; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return ident; }); -/* harmony export (immutable) */ __webpack_exports__["h"] = check; -/* unused harmony export hasOwn */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return is; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return object; }); -/* harmony export (immutable) */ __webpack_exports__["w"] = remove; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return array; }); -/* harmony export (immutable) */ __webpack_exports__["l"] = deferred; -/* harmony export (immutable) */ __webpack_exports__["g"] = arrayOfDeffered; -/* harmony export (immutable) */ __webpack_exports__["m"] = delay; -/* harmony export (immutable) */ __webpack_exports__["j"] = createMockTask; -/* unused harmony export autoInc */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return uid; }); -/* harmony export (immutable) */ __webpack_exports__["t"] = makeIterator; -/* harmony export (immutable) */ __webpack_exports__["s"] = log; -/* harmony export (immutable) */ __webpack_exports__["n"] = deprecate; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return updateIncentive; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return internalErr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return createSetContextWarning; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return wrapSagaDispatch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return cloneableGenerator; }); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var sym = function sym(id) { - return '@@redux-saga/' + id; -}; - -var TASK = /*#__PURE__*/sym('TASK'); -var HELPER = /*#__PURE__*/sym('HELPER'); -var MATCH = /*#__PURE__*/sym('MATCH'); -var CANCEL = /*#__PURE__*/sym('CANCEL_PROMISE'); -var SAGA_ACTION = /*#__PURE__*/sym('SAGA_ACTION'); -var SELF_CANCELLATION = /*#__PURE__*/sym('SELF_CANCELLATION'); -var konst = function konst(v) { - return function () { - return v; - }; -}; -var kTrue = /*#__PURE__*/konst(true); -var kFalse = /*#__PURE__*/konst(false); -var noop = function noop() {}; -var ident = function ident(v) { - return v; -}; - -function check(value, predicate, error) { - if (!predicate(value)) { - log('error', 'uncaught at check', error); - throw new Error(error); - } -} - -var hasOwnProperty = Object.prototype.hasOwnProperty; -function hasOwn(object, property) { - return is.notUndef(object) && hasOwnProperty.call(object, property); -} - -var is = { - undef: function undef(v) { - return v === null || v === undefined; - }, - notUndef: function notUndef(v) { - return v !== null && v !== undefined; - }, - func: function func(f) { - return typeof f === 'function'; - }, - number: function number(n) { - return typeof n === 'number'; - }, - string: function string(s) { - return typeof s === 'string'; - }, - array: Array.isArray, - object: function object(obj) { - return obj && !is.array(obj) && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object'; - }, - promise: function promise(p) { - return p && is.func(p.then); - }, - iterator: function iterator(it) { - return it && is.func(it.next) && is.func(it.throw); - }, - iterable: function iterable(it) { - return it && is.func(Symbol) ? is.func(it[Symbol.iterator]) : is.array(it); - }, - task: function task(t) { - return t && t[TASK]; - }, - observable: function observable(ob) { - return ob && is.func(ob.subscribe); - }, - buffer: function buffer(buf) { - return buf && is.func(buf.isEmpty) && is.func(buf.take) && is.func(buf.put); - }, - pattern: function pattern(pat) { - return pat && (is.string(pat) || (typeof pat === 'undefined' ? 'undefined' : _typeof(pat)) === 'symbol' || is.func(pat) || is.array(pat)); - }, - channel: function channel(ch) { - return ch && is.func(ch.take) && is.func(ch.close); - }, - helper: function helper(it) { - return it && it[HELPER]; - }, - stringableFunc: function stringableFunc(f) { - return is.func(f) && hasOwn(f, 'toString'); - } -}; - -var object = { - assign: function assign(target, source) { - for (var i in source) { - if (hasOwn(source, i)) { - target[i] = source[i]; - } - } - } -}; - -function remove(array, item) { - var index = array.indexOf(item); - if (index >= 0) { - array.splice(index, 1); - } -} - -var array = { - from: function from(obj) { - var arr = Array(obj.length); - for (var i in obj) { - if (hasOwn(obj, i)) { - arr[i] = obj[i]; - } - } - return arr; - } -}; - -function deferred() { - var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var def = _extends({}, props); - var promise = new Promise(function (resolve, reject) { - def.resolve = resolve; - def.reject = reject; - }); - def.promise = promise; - return def; -} - -function arrayOfDeffered(length) { - var arr = []; - for (var i = 0; i < length; i++) { - arr.push(deferred()); - } - return arr; -} - -function delay(ms) { - var val = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - - var timeoutId = void 0; - var promise = new Promise(function (resolve) { - timeoutId = setTimeout(function () { - return resolve(val); - }, ms); - }); - - promise[CANCEL] = function () { - return clearTimeout(timeoutId); - }; - - return promise; -} - -function createMockTask() { - var _ref; - - var running = true; - var _result = void 0, - _error = void 0; - - return _ref = {}, _ref[TASK] = true, _ref.isRunning = function isRunning() { - return running; - }, _ref.result = function result() { - return _result; - }, _ref.error = function error() { - return _error; - }, _ref.setRunning = function setRunning(b) { - return running = b; - }, _ref.setResult = function setResult(r) { - return _result = r; - }, _ref.setError = function setError(e) { - return _error = e; - }, _ref; -} - -function autoInc() { - var seed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - - return function () { - return ++seed; - }; -} - -var uid = /*#__PURE__*/autoInc(); - -var kThrow = function kThrow(err) { - throw err; -}; -var kReturn = function kReturn(value) { - return { value: value, done: true }; -}; -function makeIterator(next) { - var thro = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : kThrow; - var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; - var isHelper = arguments[3]; - - var iterator = { name: name, next: next, throw: thro, return: kReturn }; - - if (isHelper) { - iterator[HELPER] = true; - } - if (typeof Symbol !== 'undefined') { - iterator[Symbol.iterator] = function () { - return iterator; - }; - } - return iterator; -} - -/** - Print error in a useful way whether in a browser environment - (with expandable error stack traces), or in a node.js environment - (text-only log output) - **/ -function log(level, message) { - var error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; - - /*eslint-disable no-console*/ - if (typeof window === 'undefined') { - console.log('redux-saga ' + level + ': ' + message + '\n' + (error && error.stack || error)); - } else { - console[level](message, error); - } -} - -function deprecate(fn, deprecationWarning) { - return function () { - if (process.env.NODE_ENV === 'development') log('warn', deprecationWarning); - return fn.apply(undefined, arguments); - }; -} - -var updateIncentive = function updateIncentive(deprecated, preferred) { - return deprecated + ' has been deprecated in favor of ' + preferred + ', please update your code'; -}; - -var internalErr = function internalErr(err) { - return new Error('\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project\'s github repo.\n Error: ' + err + '\n'); -}; - -var createSetContextWarning = function createSetContextWarning(ctx, props) { - return (ctx ? ctx + '.' : '') + 'setContext(props): argument ' + props + ' is not a plain object'; -}; - -var wrapSagaDispatch = function wrapSagaDispatch(dispatch) { - return function (action) { - return dispatch(Object.defineProperty(action, SAGA_ACTION, { value: true })); - }; -}; - -var cloneableGenerator = function cloneableGenerator(generatorFunc) { - return function () { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var history = []; - var gen = generatorFunc.apply(undefined, args); - return { - next: function next(arg) { - history.push(arg); - return gen.next(arg); - }, - clone: function clone() { - var clonedGen = cloneableGenerator(generatorFunc).apply(undefined, args); - history.forEach(function (arg) { - return clonedGen.next(arg); - }); - return clonedGen; - }, - return: function _return(value) { - return gen.return(value); - }, - throw: function _throw(exception) { - return gen.throw(exception); - } - }; - }; -}; -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(7))) - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -// optional / simple context binding -var aFunction = __webpack_require__(15); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - - -/***/ }), -/* 26 */ -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - - -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var fails = __webpack_require__(4); - -module.exports = function (method, arg) { - return !!method && fails(function () { - // eslint-disable-next-line no-useless-call - arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); - }); -}; - - -/***/ }), -/* 28 */ -/***/ (function(module, exports) { - -var core = module.exports = { version: '2.5.3' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(5); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports) { - -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - - -/***/ }), -/* 31 */ -/***/ (function(module, exports) { - -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - -// most Object methods by ES6 should accept primitives -var $export = __webpack_require__(0); -var core = __webpack_require__(28); -var fails = __webpack_require__(4); -module.exports = function (KEY, exec) { - var fn = (core.Object || {})[KEY] || Object[KEY]; - var exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); -}; - - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - -// 0 -> Array#forEach -// 1 -> Array#map -// 2 -> Array#filter -// 3 -> Array#some -// 4 -> Array#every -// 5 -> Array#find -// 6 -> Array#findIndex -var ctx = __webpack_require__(25); -var IObject = __webpack_require__(64); -var toObject = __webpack_require__(12); -var toLength = __webpack_require__(10); -var asc = __webpack_require__(112); -module.exports = function (TYPE, $create) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - var create = $create || asc; - return function ($this, callbackfn, that) { - var O = toObject($this); - var self = IObject(O); - var f = ctx(callbackfn, that, 3); - var length = toLength(self.length); - var index = 0; - var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; - var val, res; - for (;length > index; index++) if (NO_HOLES || index in self) { - val = self[index]; - res = f(val, index, O); - if (TYPE) { - if (IS_MAP) result[index] = res; // map - else if (res) switch (TYPE) { - case 3: return true; // some - case 5: return val; // find - case 6: return index; // findIndex - case 2: result.push(val); // filter - } else if (IS_EVERY) return false; // every - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; - }; -}; - - -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -if (__webpack_require__(8)) { - var LIBRARY = __webpack_require__(43); - var global = __webpack_require__(3); - var fails = __webpack_require__(4); - var $export = __webpack_require__(0); - var $typed = __webpack_require__(82); - var $buffer = __webpack_require__(118); - var ctx = __webpack_require__(25); - var anInstance = __webpack_require__(49); - var propertyDesc = __webpack_require__(41); - var hide = __webpack_require__(17); - var redefineAll = __webpack_require__(51); - var toInteger = __webpack_require__(31); - var toLength = __webpack_require__(10); - var toIndex = __webpack_require__(169); - var toAbsoluteIndex = __webpack_require__(45); - var toPrimitive = __webpack_require__(29); - var has = __webpack_require__(16); - var classof = __webpack_require__(66); - var isObject = __webpack_require__(5); - var toObject = __webpack_require__(12); - var isArrayIter = __webpack_require__(109); - var create = __webpack_require__(46); - var getPrototypeOf = __webpack_require__(22); - var gOPN = __webpack_require__(47).f; - var getIterFn = __webpack_require__(111); - var uid = __webpack_require__(42); - var wks = __webpack_require__(6); - var createArrayMethod = __webpack_require__(33); - var createArrayIncludes = __webpack_require__(73); - var speciesConstructor = __webpack_require__(80); - var ArrayIterators = __webpack_require__(114); - var Iterators = __webpack_require__(57); - var $iterDetect = __webpack_require__(77); - var setSpecies = __webpack_require__(48); - var arrayFill = __webpack_require__(113); - var arrayCopyWithin = __webpack_require__(159); - var $DP = __webpack_require__(9); - var $GOPD = __webpack_require__(21); - var dP = $DP.f; - var gOPD = $GOPD.f; - var RangeError = global.RangeError; - var TypeError = global.TypeError; - var Uint8Array = global.Uint8Array; - var ARRAY_BUFFER = 'ArrayBuffer'; - var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; - var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; - var PROTOTYPE = 'prototype'; - var ArrayProto = Array[PROTOTYPE]; - var $ArrayBuffer = $buffer.ArrayBuffer; - var $DataView = $buffer.DataView; - var arrayForEach = createArrayMethod(0); - var arrayFilter = createArrayMethod(2); - var arraySome = createArrayMethod(3); - var arrayEvery = createArrayMethod(4); - var arrayFind = createArrayMethod(5); - var arrayFindIndex = createArrayMethod(6); - var arrayIncludes = createArrayIncludes(true); - var arrayIndexOf = createArrayIncludes(false); - var arrayValues = ArrayIterators.values; - var arrayKeys = ArrayIterators.keys; - var arrayEntries = ArrayIterators.entries; - var arrayLastIndexOf = ArrayProto.lastIndexOf; - var arrayReduce = ArrayProto.reduce; - var arrayReduceRight = ArrayProto.reduceRight; - var arrayJoin = ArrayProto.join; - var arraySort = ArrayProto.sort; - var arraySlice = ArrayProto.slice; - var arrayToString = ArrayProto.toString; - var arrayToLocaleString = ArrayProto.toLocaleString; - var ITERATOR = wks('iterator'); - var TAG = wks('toStringTag'); - var TYPED_CONSTRUCTOR = uid('typed_constructor'); - var DEF_CONSTRUCTOR = uid('def_constructor'); - var ALL_CONSTRUCTORS = $typed.CONSTR; - var TYPED_ARRAY = $typed.TYPED; - var VIEW = $typed.VIEW; - var WRONG_LENGTH = 'Wrong length!'; - - var $map = createArrayMethod(1, function (O, length) { - return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); - }); - - var LITTLE_ENDIAN = fails(function () { - // eslint-disable-next-line no-undef - return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; - }); - - var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { - new Uint8Array(1).set({}); - }); - - var toOffset = function (it, BYTES) { - var offset = toInteger(it); - if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); - return offset; - }; - - var validate = function (it) { - if (isObject(it) && TYPED_ARRAY in it) return it; - throw TypeError(it + ' is not a typed array!'); - }; - - var allocate = function (C, length) { - if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { - throw TypeError('It is not a typed array constructor!'); - } return new C(length); - }; - - var speciesFromList = function (O, list) { - return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); - }; - - var fromList = function (C, list) { - var index = 0; - var length = list.length; - var result = allocate(C, length); - while (length > index) result[index] = list[index++]; - return result; - }; - - var addGetter = function (it, key, internal) { - dP(it, key, { get: function () { return this._d[internal]; } }); - }; - - var $from = function from(source /* , mapfn, thisArg */) { - var O = toObject(source); - var aLen = arguments.length; - var mapfn = aLen > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var iterFn = getIterFn(O); - var i, length, values, result, step, iterator; - if (iterFn != undefined && !isArrayIter(iterFn)) { - for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { - values.push(step.value); - } O = values; - } - if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); - for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { - result[i] = mapping ? mapfn(O[i], i) : O[i]; - } - return result; - }; - - var $of = function of(/* ...items */) { - var index = 0; - var length = arguments.length; - var result = allocate(this, length); - while (length > index) result[index] = arguments[index++]; - return result; - }; - - // iOS Safari 6.x fails here - var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); - - var $toLocaleString = function toLocaleString() { - return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); - }; - - var proto = { - copyWithin: function copyWithin(target, start /* , end */) { - return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); - }, - every: function every(callbackfn /* , thisArg */) { - return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars - return arrayFill.apply(validate(this), arguments); - }, - filter: function filter(callbackfn /* , thisArg */) { - return speciesFromList(this, arrayFilter(validate(this), callbackfn, - arguments.length > 1 ? arguments[1] : undefined)); - }, - find: function find(predicate /* , thisArg */) { - return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); - }, - findIndex: function findIndex(predicate /* , thisArg */) { - return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); - }, - forEach: function forEach(callbackfn /* , thisArg */) { - arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - indexOf: function indexOf(searchElement /* , fromIndex */) { - return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); - }, - includes: function includes(searchElement /* , fromIndex */) { - return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); - }, - join: function join(separator) { // eslint-disable-line no-unused-vars - return arrayJoin.apply(validate(this), arguments); - }, - lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars - return arrayLastIndexOf.apply(validate(this), arguments); - }, - map: function map(mapfn /* , thisArg */) { - return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); - }, - reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars - return arrayReduce.apply(validate(this), arguments); - }, - reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars - return arrayReduceRight.apply(validate(this), arguments); - }, - reverse: function reverse() { - var that = this; - var length = validate(that).length; - var middle = Math.floor(length / 2); - var index = 0; - var value; - while (index < middle) { - value = that[index]; - that[index++] = that[--length]; - that[length] = value; - } return that; - }, - some: function some(callbackfn /* , thisArg */) { - return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - sort: function sort(comparefn) { - return arraySort.call(validate(this), comparefn); - }, - subarray: function subarray(begin, end) { - var O = validate(this); - var length = O.length; - var $begin = toAbsoluteIndex(begin, length); - return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( - O.buffer, - O.byteOffset + $begin * O.BYTES_PER_ELEMENT, - toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) - ); - } - }; - - var $slice = function slice(start, end) { - return speciesFromList(this, arraySlice.call(validate(this), start, end)); - }; - - var $set = function set(arrayLike /* , offset */) { - validate(this); - var offset = toOffset(arguments[1], 1); - var length = this.length; - var src = toObject(arrayLike); - var len = toLength(src.length); - var index = 0; - if (len + offset > length) throw RangeError(WRONG_LENGTH); - while (index < len) this[offset + index] = src[index++]; - }; - - var $iterators = { - entries: function entries() { - return arrayEntries.call(validate(this)); - }, - keys: function keys() { - return arrayKeys.call(validate(this)); - }, - values: function values() { - return arrayValues.call(validate(this)); - } - }; - - var isTAIndex = function (target, key) { - return isObject(target) - && target[TYPED_ARRAY] - && typeof key != 'symbol' - && key in target - && String(+key) == String(key); - }; - var $getDesc = function getOwnPropertyDescriptor(target, key) { - return isTAIndex(target, key = toPrimitive(key, true)) - ? propertyDesc(2, target[key]) - : gOPD(target, key); - }; - var $setDesc = function defineProperty(target, key, desc) { - if (isTAIndex(target, key = toPrimitive(key, true)) - && isObject(desc) - && has(desc, 'value') - && !has(desc, 'get') - && !has(desc, 'set') - // TODO: add validation descriptor w/o calling accessors - && !desc.configurable - && (!has(desc, 'writable') || desc.writable) - && (!has(desc, 'enumerable') || desc.enumerable) - ) { - target[key] = desc.value; - return target; - } return dP(target, key, desc); - }; - - if (!ALL_CONSTRUCTORS) { - $GOPD.f = $getDesc; - $DP.f = $setDesc; - } - - $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { - getOwnPropertyDescriptor: $getDesc, - defineProperty: $setDesc - }); - - if (fails(function () { arrayToString.call({}); })) { - arrayToString = arrayToLocaleString = function toString() { - return arrayJoin.call(this); - }; - } - - var $TypedArrayPrototype$ = redefineAll({}, proto); - redefineAll($TypedArrayPrototype$, $iterators); - hide($TypedArrayPrototype$, ITERATOR, $iterators.values); - redefineAll($TypedArrayPrototype$, { - slice: $slice, - set: $set, - constructor: function () { /* noop */ }, - toString: arrayToString, - toLocaleString: $toLocaleString - }); - addGetter($TypedArrayPrototype$, 'buffer', 'b'); - addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); - addGetter($TypedArrayPrototype$, 'byteLength', 'l'); - addGetter($TypedArrayPrototype$, 'length', 'e'); - dP($TypedArrayPrototype$, TAG, { - get: function () { return this[TYPED_ARRAY]; } - }); - - // eslint-disable-next-line max-statements - module.exports = function (KEY, BYTES, wrapper, CLAMPED) { - CLAMPED = !!CLAMPED; - var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; - var GETTER = 'get' + KEY; - var SETTER = 'set' + KEY; - var TypedArray = global[NAME]; - var Base = TypedArray || {}; - var TAC = TypedArray && getPrototypeOf(TypedArray); - var FORCED = !TypedArray || !$typed.ABV; - var O = {}; - var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; - var getter = function (that, index) { - var data = that._d; - return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); - }; - var setter = function (that, index, value) { - var data = that._d; - if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; - data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); - }; - var addElement = function (that, index) { - dP(that, index, { - get: function () { - return getter(this, index); - }, - set: function (value) { - return setter(this, index, value); - }, - enumerable: true - }); - }; - if (FORCED) { - TypedArray = wrapper(function (that, data, $offset, $length) { - anInstance(that, TypedArray, NAME, '_d'); - var index = 0; - var offset = 0; - var buffer, byteLength, length, klass; - if (!isObject(data)) { - length = toIndex(data); - byteLength = length * BYTES; - buffer = new $ArrayBuffer(byteLength); - } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { - buffer = data; - offset = toOffset($offset, BYTES); - var $len = data.byteLength; - if ($length === undefined) { - if ($len % BYTES) throw RangeError(WRONG_LENGTH); - byteLength = $len - offset; - if (byteLength < 0) throw RangeError(WRONG_LENGTH); - } else { - byteLength = toLength($length) * BYTES; - if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); - } - length = byteLength / BYTES; - } else if (TYPED_ARRAY in data) { - return fromList(TypedArray, data); - } else { - return $from.call(TypedArray, data); - } - hide(that, '_d', { - b: buffer, - o: offset, - l: byteLength, - e: length, - v: new $DataView(buffer) - }); - while (index < length) addElement(that, index++); - }); - TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); - hide(TypedArrayPrototype, 'constructor', TypedArray); - } else if (!fails(function () { - TypedArray(1); - }) || !fails(function () { - new TypedArray(-1); // eslint-disable-line no-new - }) || !$iterDetect(function (iter) { - new TypedArray(); // eslint-disable-line no-new - new TypedArray(null); // eslint-disable-line no-new - new TypedArray(1.5); // eslint-disable-line no-new - new TypedArray(iter); // eslint-disable-line no-new - }, true)) { - TypedArray = wrapper(function (that, data, $offset, $length) { - anInstance(that, TypedArray, NAME); - var klass; - // `ws` module bug, temporarily remove validation length for Uint8Array - // https://github.com/websockets/ws/pull/645 - if (!isObject(data)) return new Base(toIndex(data)); - if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { - return $length !== undefined - ? new Base(data, toOffset($offset, BYTES), $length) - : $offset !== undefined - ? new Base(data, toOffset($offset, BYTES)) - : new Base(data); - } - if (TYPED_ARRAY in data) return fromList(TypedArray, data); - return $from.call(TypedArray, data); - }); - arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { - if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); - }); - TypedArray[PROTOTYPE] = TypedArrayPrototype; - if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; - } - var $nativeIterator = TypedArrayPrototype[ITERATOR]; - var CORRECT_ITER_NAME = !!$nativeIterator - && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); - var $iterator = $iterators.values; - hide(TypedArray, TYPED_CONSTRUCTOR, true); - hide(TypedArrayPrototype, TYPED_ARRAY, NAME); - hide(TypedArrayPrototype, VIEW, true); - hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); - - if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { - dP(TypedArrayPrototype, TAG, { - get: function () { return NAME; } - }); - } - - O[NAME] = TypedArray; - - $export($export.G + $export.W + $export.F * (TypedArray != Base), O); - - $export($export.S, NAME, { - BYTES_PER_ELEMENT: BYTES - }); - - $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { - from: $from, - of: $of - }); - - if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); - - $export($export.P, NAME, proto); - - setSpecies(NAME); - - $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); - - $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); - - if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; - - $export($export.P + $export.F * fails(function () { - new TypedArray(1).slice(); - }), NAME, { slice: $slice }); - - $export($export.P + $export.F * (fails(function () { - return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); - }) || !fails(function () { - TypedArrayPrototype.toLocaleString.call([1, 2]); - })), NAME, { toLocaleString: $toLocaleString }); - - Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; - if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); - }; -} else module.exports = function () { /* empty */ }; - - -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { - -var Map = __webpack_require__(164); -var $export = __webpack_require__(0); -var shared = __webpack_require__(72)('metadata'); -var store = shared.store || (shared.store = new (__webpack_require__(167))()); - -var getOrCreateMetadataMap = function (target, targetKey, create) { - var targetMetadata = store.get(target); - if (!targetMetadata) { - if (!create) return undefined; - store.set(target, targetMetadata = new Map()); - } - var keyMetadata = targetMetadata.get(targetKey); - if (!keyMetadata) { - if (!create) return undefined; - targetMetadata.set(targetKey, keyMetadata = new Map()); - } return keyMetadata; -}; -var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { - var metadataMap = getOrCreateMetadataMap(O, P, false); - return metadataMap === undefined ? false : metadataMap.has(MetadataKey); -}; -var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { - var metadataMap = getOrCreateMetadataMap(O, P, false); - return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); -}; -var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { - getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); -}; -var ordinaryOwnMetadataKeys = function (target, targetKey) { - var metadataMap = getOrCreateMetadataMap(target, targetKey, false); - var keys = []; - if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); - return keys; -}; -var toMetaKey = function (it) { - return it === undefined || typeof it == 'symbol' ? it : String(it); -}; -var exp = function (O) { - $export($export.S, 'Reflect', O); -}; - -module.exports = { - store: store, - map: getOrCreateMetadataMap, - has: ordinaryHasOwnMetadata, - get: ordinaryGetOwnMetadata, - set: ordinaryDefineOwnMetadata, - keys: ordinaryOwnMetadataKeys, - key: toMetaKey, - exp: exp -}; - - -/***/ }), -/* 36 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(455); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserRouter", function() { return __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(457); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "HashRouter", function() { return __WEBPACK_IMPORTED_MODULE_1__HashRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(195); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_2__Link__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(459); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(462); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NavLink", function() { return __WEBPACK_IMPORTED_MODULE_4__NavLink__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(465); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Prompt", function() { return __WEBPACK_IMPORTED_MODULE_5__Prompt__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(467); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(196); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(127); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_8__Router__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(473); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "StaticRouter", function() { return __WEBPACK_IMPORTED_MODULE_9__StaticRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(475); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return __WEBPACK_IMPORTED_MODULE_10__Switch__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__matchPath__ = __webpack_require__(477); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "matchPath", function() { return __WEBPACK_IMPORTED_MODULE_11__matchPath__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__withRouter__ = __webpack_require__(478); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_12__withRouter__["a"]; }); - - - - - - - - - - - - - - - - - - - - - - - - - - - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - -var META = __webpack_require__(42)('meta'); -var isObject = __webpack_require__(5); -var has = __webpack_require__(16); -var setDesc = __webpack_require__(9).f; -var id = 0; -var isExtensible = Object.isExtensible || function () { - return true; -}; -var FREEZE = !__webpack_require__(4)(function () { - return isExtensible(Object.preventExtensions({})); -}); -var setMeta = function (it) { - setDesc(it, META, { value: { - i: 'O' + ++id, // object ID - w: {} // weak collections IDs - } }); -}; -var fastKey = function (it, create) { - // return primitive with prefix - if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return 'F'; - // not necessary to add metadata - if (!create) return 'E'; - // add missing metadata - setMeta(it); - // return object ID - } return it[META].i; -}; -var getWeak = function (it, create) { - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return true; - // not necessary to add metadata - if (!create) return false; - // add missing metadata - setMeta(it); - // return hash weak collections IDs - } return it[META].w; -}; -// add metadata on freeze-family methods calling -var onFreeze = function (it) { - if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); - return it; -}; -var meta = module.exports = { - KEY: META, - NEED: false, - fastKey: fastKey, - getWeak: getWeak, - onFreeze: onFreeze -}; - - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { - -// 22.1.3.31 Array.prototype[@@unscopables] -var UNSCOPABLES = __webpack_require__(6)('unscopables'); -var ArrayProto = Array.prototype; -if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(17)(ArrayProto, UNSCOPABLES, {}); -module.exports = function (key) { - ArrayProto[UNSCOPABLES][key] = true; -}; - - -/***/ }), -/* 39 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - */ - -function makeEmptyFunction(arg) { - return function () { - return arg; - }; -} - -/** - * This function accepts and discards inputs; it has no side effects. This is - * primarily useful idiomatically for overridable function endpoints which - * always need to be callable, since JS lacks a null-call idiom ala Cocoa. - */ -var emptyFunction = function emptyFunction() {}; - -emptyFunction.thatReturns = makeEmptyFunction; -emptyFunction.thatReturnsFalse = makeEmptyFunction(false); -emptyFunction.thatReturnsTrue = makeEmptyFunction(true); -emptyFunction.thatReturnsNull = makeEmptyFunction(null); -emptyFunction.thatReturnsThis = function () { - return this; -}; -emptyFunction.thatReturnsArgument = function (arg) { - return arg; -}; - -module.exports = emptyFunction; - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -exports.default = request; - -__webpack_require__(494); - -/** - * Parses the JSON returned by a network request - * - * @param {object} response A response from a network request - * - * @return {object} The parsed JSON from the request - */ -function parseJSON(response) { - if (response.status === 204 || response.status === 205) { - return null; - } - return response.json(); -} - -/** - * Parses the status returned by a network request - * - * @param {object} response A response from a network request - * @param {object} response The parsed JSON from the network request - * - * @return {object | undefined} Returns object with status and statusText, or undefined - */ -function checkStatus(response, jsonResponse) { - if (response.status >= 200 && response.status < 300) { - return jsonResponse; - } - var error = new Error(jsonResponse.message); - error.response = response; - throw error; -} - -/** - * Requests a URL, returning a promise - * - * @param {string} url The URL we want to request - * @param {object} [options] The options we want to pass to "fetch" - * - * @return {object} The response data - */ - -function request(url, options) { - return fetch(url, options).then(function (response) { - return Promise.all([response, parseJSON(response)]); - }).then(function (_ref) { - var _ref2 = _slicedToArray(_ref, 2), - response = _ref2[0], - jsonResponse = _ref2[1]; - - return checkStatus(response, jsonResponse); - }); -} - -/***/ }), -/* 41 */ -/***/ (function(module, exports) { - -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - - -/***/ }), -/* 42 */ -/***/ (function(module, exports) { - -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - - -/***/ }), -/* 43 */ -/***/ (function(module, exports) { - -module.exports = false; - - -/***/ }), -/* 44 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(145); -var enumBugKeys = __webpack_require__(96); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - - -/***/ }), -/* 45 */ -/***/ (function(module, exports, __webpack_require__) { - -var toInteger = __webpack_require__(31); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; - - -/***/ }), -/* 46 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(2); -var dPs = __webpack_require__(146); -var enumBugKeys = __webpack_require__(96); -var IE_PROTO = __webpack_require__(95)('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(93)('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - __webpack_require__(97).appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; - return createDict(); -}; - -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : dPs(result, Properties); -}; - - -/***/ }), -/* 47 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) -var $keys = __webpack_require__(145); -var hiddenKeys = __webpack_require__(96).concat('length', 'prototype'); - -exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return $keys(O, hiddenKeys); -}; - - -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var global = __webpack_require__(3); -var dP = __webpack_require__(9); -var DESCRIPTORS = __webpack_require__(8); -var SPECIES = __webpack_require__(6)('species'); - -module.exports = function (KEY) { - var C = global[KEY]; - if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { - configurable: true, - get: function () { return this; } - }); -}; - - -/***/ }), -/* 49 */ -/***/ (function(module, exports) { - -module.exports = function (it, Constructor, name, forbiddenField) { - if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { - throw TypeError(name + ': incorrect invocation!'); - } return it; -}; - - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -var ctx = __webpack_require__(25); -var call = __webpack_require__(157); -var isArrayIter = __webpack_require__(109); -var anObject = __webpack_require__(2); -var toLength = __webpack_require__(10); -var getIterFn = __webpack_require__(111); -var BREAK = {}; -var RETURN = {}; -var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); - var f = ctx(fn, that, entries ? 2 : 1); - var index = 0; - var length, step, iterator, result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); - // fast case for arrays with default iterator - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { - result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; - } -}; -exports.BREAK = BREAK; -exports.RETURN = RETURN; - - -/***/ }), -/* 51 */ -/***/ (function(module, exports, __webpack_require__) { - -var redefine = __webpack_require__(18); -module.exports = function (target, src, safe) { - for (var key in src) redefine(target, key, src[key], safe); - return target; -}; - - -/***/ }), -/* 52 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return detach; }); -/* harmony export (immutable) */ __webpack_exports__["s"] = take; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return takem; }); -/* harmony export (immutable) */ __webpack_exports__["n"] = put; -/* harmony export (immutable) */ __webpack_exports__["b"] = all; -/* harmony export (immutable) */ __webpack_exports__["o"] = race; -/* harmony export (immutable) */ __webpack_exports__["e"] = call; -/* harmony export (immutable) */ __webpack_exports__["c"] = apply; -/* harmony export (immutable) */ __webpack_exports__["h"] = cps; -/* harmony export (immutable) */ __webpack_exports__["k"] = fork; -/* harmony export (immutable) */ __webpack_exports__["r"] = spawn; -/* harmony export (immutable) */ __webpack_exports__["m"] = join; -/* harmony export (immutable) */ __webpack_exports__["f"] = cancel; -/* harmony export (immutable) */ __webpack_exports__["p"] = select; -/* harmony export (immutable) */ __webpack_exports__["a"] = actionChannel; -/* harmony export (immutable) */ __webpack_exports__["g"] = cancelled; -/* harmony export (immutable) */ __webpack_exports__["j"] = flush; -/* harmony export (immutable) */ __webpack_exports__["l"] = getContext; -/* harmony export (immutable) */ __webpack_exports__["q"] = setContext; -/* harmony export (immutable) */ __webpack_exports__["t"] = takeEvery; -/* harmony export (immutable) */ __webpack_exports__["u"] = takeLatest; -/* harmony export (immutable) */ __webpack_exports__["w"] = throttle; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return asEffect; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(24); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sagaHelpers__ = __webpack_require__(204); - - - -var IO = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_0__utils__["x" /* sym */])('IO'); -var TAKE = 'TAKE'; -var PUT = 'PUT'; -var ALL = 'ALL'; -var RACE = 'RACE'; -var CALL = 'CALL'; -var CPS = 'CPS'; -var FORK = 'FORK'; -var JOIN = 'JOIN'; -var CANCEL = 'CANCEL'; -var SELECT = 'SELECT'; -var ACTION_CHANNEL = 'ACTION_CHANNEL'; -var CANCELLED = 'CANCELLED'; -var FLUSH = 'FLUSH'; -var GET_CONTEXT = 'GET_CONTEXT'; -var SET_CONTEXT = 'SET_CONTEXT'; - -var TEST_HINT = '\n(HINT: if you are getting this errors in tests, consider using createMockTask from redux-saga/utils)'; - -var effect = function effect(type, payload) { - var _ref; - - return _ref = {}, _ref[IO] = true, _ref[type] = payload, _ref; -}; - -var detach = function detach(eff) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(asEffect.fork(eff), __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].object, 'detach(eff): argument must be a fork effect'); - eff[FORK].detached = true; - return eff; -}; - -function take() { - var patternOrChannel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '*'; - - if (arguments.length) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(arguments[0], __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'take(patternOrChannel): patternOrChannel is undefined'); - } - if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].pattern(patternOrChannel)) { - return effect(TAKE, { pattern: patternOrChannel }); - } - if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].channel(patternOrChannel)) { - return effect(TAKE, { channel: patternOrChannel }); - } - throw new Error('take(patternOrChannel): argument ' + String(patternOrChannel) + ' is not valid channel or a valid pattern'); -} - -take.maybe = function () { - var eff = take.apply(undefined, arguments); - eff[TAKE].maybe = true; - return eff; -}; - -var takem = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_0__utils__["n" /* deprecate */])(take.maybe, /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_0__utils__["z" /* updateIncentive */])('takem', 'take.maybe')); - -function put(channel, action) { - if (arguments.length > 1) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(channel, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'put(channel, action): argument channel is undefined'); - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(channel, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].channel, 'put(channel, action): argument ' + channel + ' is not a valid channel'); - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(action, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'put(channel, action): argument action is undefined'); - } else { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(channel, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'put(action): argument action is undefined'); - action = channel; - channel = null; - } - return effect(PUT, { channel: channel, action: action }); -} - -put.resolve = function () { - var eff = put.apply(undefined, arguments); - eff[PUT].resolve = true; - return eff; -}; - -put.sync = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_0__utils__["n" /* deprecate */])(put.resolve, /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_0__utils__["z" /* updateIncentive */])('put.sync', 'put.resolve')); - -function all(effects) { - return effect(ALL, effects); -} - -function race(effects) { - return effect(RACE, effects); -} - -function getFnCallDesc(meth, fn, args) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(fn, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, meth + ': argument fn is undefined'); - - var context = null; - if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].array(fn)) { - var _fn = fn; - context = _fn[0]; - fn = _fn[1]; - } else if (fn.fn) { - var _fn2 = fn; - context = _fn2.context; - fn = _fn2.fn; - } - if (context && __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].string(fn) && __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func(context[fn])) { - fn = context[fn]; - } - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(fn, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func, meth + ': argument ' + fn + ' is not a function'); - - return { context: context, fn: fn, args: args }; -} - -function call(fn) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - return effect(CALL, getFnCallDesc('call', fn, args)); -} - -function apply(context, fn) { - var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; - - return effect(CALL, getFnCallDesc('apply', { context: context, fn: fn }, args)); -} - -function cps(fn) { - for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - return effect(CPS, getFnCallDesc('cps', fn, args)); -} - -function fork(fn) { - for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { - args[_key3 - 1] = arguments[_key3]; - } - - return effect(FORK, getFnCallDesc('fork', fn, args)); -} - -function spawn(fn) { - for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { - args[_key4 - 1] = arguments[_key4]; - } - - return detach(fork.apply(undefined, [fn].concat(args))); -} - -function join() { - for (var _len5 = arguments.length, tasks = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { - tasks[_key5] = arguments[_key5]; - } - - if (tasks.length > 1) { - return all(tasks.map(function (t) { - return join(t); - })); - } - var task = tasks[0]; - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(task, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'join(task): argument task is undefined'); - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(task, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].task, 'join(task): argument ' + task + ' is not a valid Task object ' + TEST_HINT); - return effect(JOIN, task); -} - -function cancel() { - for (var _len6 = arguments.length, tasks = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { - tasks[_key6] = arguments[_key6]; - } - - if (tasks.length > 1) { - return all(tasks.map(function (t) { - return cancel(t); - })); - } - var task = tasks[0]; - if (tasks.length === 1) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(task, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'cancel(task): argument task is undefined'); - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(task, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].task, 'cancel(task): argument ' + task + ' is not a valid Task object ' + TEST_HINT); - } - return effect(CANCEL, task || __WEBPACK_IMPORTED_MODULE_0__utils__["d" /* SELF_CANCELLATION */]); -} - -function select(selector) { - for (var _len7 = arguments.length, args = Array(_len7 > 1 ? _len7 - 1 : 0), _key7 = 1; _key7 < _len7; _key7++) { - args[_key7 - 1] = arguments[_key7]; - } - - if (arguments.length === 0) { - selector = __WEBPACK_IMPORTED_MODULE_0__utils__["o" /* ident */]; - } else { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(selector, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'select(selector,[...]): argument selector is undefined'); - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(selector, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func, 'select(selector,[...]): argument ' + selector + ' is not a function'); - } - return effect(SELECT, { selector: selector, args: args }); -} - -/** - channel(pattern, [buffer]) => creates an event channel for store actions -**/ -function actionChannel(pattern, buffer) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(pattern, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'actionChannel(pattern,...): argument pattern is undefined'); - if (arguments.length > 1) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(buffer, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'actionChannel(pattern, buffer): argument buffer is undefined'); - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(buffer, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].buffer, 'actionChannel(pattern, buffer): argument ' + buffer + ' is not a valid buffer'); - } - return effect(ACTION_CHANNEL, { pattern: pattern, buffer: buffer }); -} - -function cancelled() { - return effect(CANCELLED, {}); -} - -function flush(channel) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(channel, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].channel, 'flush(channel): argument ' + channel + ' is not valid channel'); - return effect(FLUSH, channel); -} - -function getContext(prop) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(prop, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].string, 'getContext(prop): argument ' + prop + ' is not a string'); - return effect(GET_CONTEXT, prop); -} - -function setContext(props) { - Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(props, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].object, Object(__WEBPACK_IMPORTED_MODULE_0__utils__["k" /* createSetContextWarning */])(null, props)); - return effect(SET_CONTEXT, props); -} - -function takeEvery(patternOrChannel, worker) { - for (var _len8 = arguments.length, args = Array(_len8 > 2 ? _len8 - 2 : 0), _key8 = 2; _key8 < _len8; _key8++) { - args[_key8 - 2] = arguments[_key8]; - } - - return fork.apply(undefined, [__WEBPACK_IMPORTED_MODULE_1__sagaHelpers__["b" /* takeEveryHelper */], patternOrChannel, worker].concat(args)); -} - -function takeLatest(patternOrChannel, worker) { - for (var _len9 = arguments.length, args = Array(_len9 > 2 ? _len9 - 2 : 0), _key9 = 2; _key9 < _len9; _key9++) { - args[_key9 - 2] = arguments[_key9]; - } - - return fork.apply(undefined, [__WEBPACK_IMPORTED_MODULE_1__sagaHelpers__["d" /* takeLatestHelper */], patternOrChannel, worker].concat(args)); -} - -function throttle(ms, pattern, worker) { - for (var _len10 = arguments.length, args = Array(_len10 > 3 ? _len10 - 3 : 0), _key10 = 3; _key10 < _len10; _key10++) { - args[_key10 - 3] = arguments[_key10]; - } - - return fork.apply(undefined, [__WEBPACK_IMPORTED_MODULE_1__sagaHelpers__["f" /* throttleHelper */], ms, pattern, worker].concat(args)); -} - -var createAsEffectType = function createAsEffectType(type) { - return function (effect) { - return effect && effect[IO] && effect[type]; - }; -}; - -var asEffect = { - take: /*#__PURE__*/createAsEffectType(TAKE), - put: /*#__PURE__*/createAsEffectType(PUT), - all: /*#__PURE__*/createAsEffectType(ALL), - race: /*#__PURE__*/createAsEffectType(RACE), - call: /*#__PURE__*/createAsEffectType(CALL), - cps: /*#__PURE__*/createAsEffectType(CPS), - fork: /*#__PURE__*/createAsEffectType(FORK), - join: /*#__PURE__*/createAsEffectType(JOIN), - cancel: /*#__PURE__*/createAsEffectType(CANCEL), - select: /*#__PURE__*/createAsEffectType(SELECT), - actionChannel: /*#__PURE__*/createAsEffectType(ACTION_CHANNEL), - cancelled: /*#__PURE__*/createAsEffectType(CANCELLED), - flush: /*#__PURE__*/createAsEffectType(FLUSH), - getContext: /*#__PURE__*/createAsEffectType(GET_CONTEXT), - setContext: /*#__PURE__*/createAsEffectType(SET_CONTEXT) -}; - -/***/ }), -/* 53 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__internal_io__ = __webpack_require__(52); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["s"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takem", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["v"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "put", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["n"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "all", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["b"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["o"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "call", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["e"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["c"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "cps", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["h"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fork", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["k"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "spawn", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["r"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "join", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["m"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "cancel", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["f"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "select", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["p"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "actionChannel", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "cancelled", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["g"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "flush", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["j"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getContext", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["l"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "setContext", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["q"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeEvery", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["t"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeLatest", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["u"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["w"]; }); - - -/***/ }), -/* 54 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.onHandleShowPageUri = onHandleShowPageUri; -exports.onRequestError = onRequestError; -exports.onNewChannelRequest = onNewChannelRequest; -exports.onNewAssetRequest = onNewAssetRequest; -exports.onRequestUpdate = onRequestUpdate; -exports.addRequestToRequestList = addRequestToRequestList; -exports.addAssetToAssetList = addAssetToAssetList; -exports.addNewChannelToChannelList = addNewChannelToChannelList; -exports.onUpdateChannelClaims = onUpdateChannelClaims; -exports.updateChannelClaims = updateChannelClaims; -exports.fileRequested = fileRequested; -exports.updateFileAvailability = updateFileAvailability; -exports.updateDisplayAssetError = updateDisplayAssetError; - -var _show_action_types = __webpack_require__(60); - -var actions = _interopRequireWildcard(_show_action_types); - -var _show_request_types = __webpack_require__(205); - -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; } } - -// basic request parsing -function onHandleShowPageUri(params) { - return { - type: actions.HANDLE_SHOW_URI, - data: params - }; -}; - -function onRequestError(error) { - return { - type: actions.REQUEST_ERROR, - data: error - }; -}; - -function onNewChannelRequest(channelName, channelId) { - var requestType = _show_request_types.CHANNEL; - var requestId = 'cr#' + channelName + '#' + channelId; - return { - type: actions.CHANNEL_REQUEST_NEW, - data: { requestType: requestType, requestId: requestId, channelName: channelName, channelId: channelId } - }; -}; - -function onNewAssetRequest(name, id, channelName, channelId, extension) { - var requestType = extension ? _show_request_types.ASSET_LITE : _show_request_types.ASSET_DETAILS; - var requestId = 'ar#' + name + '#' + id + '#' + channelName + '#' + channelId; - return { - type: actions.ASSET_REQUEST_NEW, - data: { - requestType: requestType, - requestId: requestId, - name: name, - modifier: { - id: id, - channel: { - name: channelName, - id: channelId - } - } - } - }; -}; - -function onRequestUpdate(requestType, requestId) { - return { - type: actions.REQUEST_UPDATE, - data: { - requestType: requestType, - requestId: requestId - } - }; -}; - -function addRequestToRequestList(id, error, key) { - return { - type: actions.REQUEST_LIST_ADD, - data: { id: id, error: error, key: key } - }; -}; - -// asset actions - -function addAssetToAssetList(id, error, name, claimId, shortId, claimData) { - return { - type: actions.ASSET_ADD, - data: { id: id, error: error, name: name, claimId: claimId, shortId: shortId, claimData: claimData } - }; -} - -// channel actions - -function addNewChannelToChannelList(id, name, shortId, longId, claimsData) { - return { - type: actions.CHANNEL_ADD, - data: { id: id, name: name, shortId: shortId, longId: longId, claimsData: claimsData } - }; -}; - -function onUpdateChannelClaims(channelKey, name, longId, page) { - return { - type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC, - data: { channelKey: channelKey, name: name, longId: longId, page: page } - }; -}; - -function updateChannelClaims(channelListId, claimsData) { - return { - type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS, - data: { channelListId: channelListId, claimsData: claimsData } - }; -}; - -// display a file - -function fileRequested(name, claimId) { - return { - type: actions.FILE_REQUESTED, - data: { name: name, claimId: claimId } - }; -}; - -function updateFileAvailability(status) { - return { - type: actions.FILE_AVAILABILITY_UPDATE, - data: status - }; -}; - -function updateDisplayAssetError(error) { - return { - type: actions.DISPLAY_ASSET_ERROR, - data: error - }; -}; - -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - -var def = __webpack_require__(9).f; -var has = __webpack_require__(16); -var TAG = __webpack_require__(6)('toStringTag'); - -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); -}; - - -/***/ }), -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { - -var $export = __webpack_require__(0); -var defined = __webpack_require__(30); -var fails = __webpack_require__(4); -var spaces = __webpack_require__(99); -var space = '[' + spaces + ']'; -var non = '\u200b\u0085'; -var ltrim = RegExp('^' + space + space + '*'); -var rtrim = RegExp(space + space + '*$'); - -var exporter = function (KEY, exec, ALIAS) { - var exp = {}; - var FORCE = fails(function () { - return !!spaces[KEY]() || non[KEY]() != non; - }); - var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; - if (ALIAS) exp[ALIAS] = fn; - $export($export.P + $export.F * FORCE, 'String', exp); -}; - -// 1 -> String#trimLeft -// 2 -> String#trimRight -// 3 -> String#trim -var trim = exporter.trim = function (string, TYPE) { - string = String(defined(string)); - if (TYPE & 1) string = string.replace(ltrim, ''); - if (TYPE & 2) string = string.replace(rtrim, ''); - return string; -}; - -module.exports = exporter; - - -/***/ }), -/* 57 */ -/***/ (function(module, exports) { - -module.exports = {}; - - -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(5); -module.exports = function (it, TYPE) { - if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); - return it; -}; - - -/***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="public/bundle/",t(t.s=203)}([function(e,t,n){var r=n(3),o=n(27),a=n(16),i=n(17),u=n(24),c=function(e,t,n){var l,s,f,p,d=e&c.F,h=e&c.G,v=e&c.S,y=e&c.P,m=e&c.B,b=h?r:v?r[t]||(r[t]={}):(r[t]||{}).prototype,g=h?o:o[t]||(o[t]={}),w=g.prototype||(g.prototype={});h&&(n=t);for(l in n)s=!d&&b&&void 0!==b[l],f=(s?b:n)[l],p=m&&s?u(f,r):y&&"function"==typeof f?u(Function.call,f):f,b&&i(b,l,f,e&c.U),g[l]!=f&&a(g,l,p),y&&w[l]!=f&&(w[l]=f)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){"use strict";e.exports=n(408)},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(68)("wks"),o=n(40),a=n(3).Symbol,i="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=i&&a[e]||(i?a:o)("Symbol."+e))}).store=r},function(e,t,n){e.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(2),o=n(137),a=n(28),i=Object.defineProperty;t.f=n(7)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),o)try{return i(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(30),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){e.exports=n(420)()},function(e,t,n){var r=n(29);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(419),o=n(173),a=n(424);n.d(t,"Provider",function(){return r.b}),n.d(t,"createProvider",function(){return r.a}),n.d(t,"connectAdvanced",function(){return o.a}),n.d(t,"connect",function(){return a.a})},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(8),o=n(39);e.exports=n(7)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(3),o=n(16),a=n(15),i=n(40)("src"),u=Function.toString,c=(""+u).split("toString");n(27).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,u){var l="function"==typeof n;l&&(a(n,"name")||o(n,"name",t)),e[t]!==n&&(l&&(a(n,i)||o(n,i,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:u?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[i]||u.call(this)})},function(e,t,n){var r=n(0),o=n(4),a=n(29),i=/"/g,u=function(e,t,n,r){var o=String(a(e)),u="<"+t;return""!==n&&(u+=" "+n+'="'+String(r).replace(i,""")+'"'),u+">"+o+""};e.exports=function(e,t){var n={};n[e]=t(u),r(r.P+r.F*o(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){var r=n(61),o=n(29);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(62),o=n(39),a=n(19),i=n(28),u=n(15),c=n(137),l=Object.getOwnPropertyDescriptor;t.f=n(7)?l:function(e,t){if(e=a(e),t=i(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(15),o=n(11),a=n(90)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,i,u){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,u],s=0;c=new Error(t.replace(/%s/g,function(){return l[s++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};e.exports=r},function(e,t,n){"use strict";function r(e,t,n){if(!t(e))throw f("error","uncaught at check",n),new Error(n)}function o(e,t){return P.notUndef(e)&&x.call(e,t)}function a(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=d({},e),n=new Promise(function(e,n){t.resolve=e,t.reject=n});return t.promise=n,t}function u(e){for(var t=[],n=0;n1&&void 0!==arguments[1])||arguments[1],n=void 0,r=new Promise(function(r){n=setTimeout(function(){return r(t)},e)});return r[g]=function(){return clearTimeout(n)},r}function l(){var e,t=!0,n=void 0,r=void 0;return e={},e[y]=!0,e.isRunning=function(){return t},e.result=function(){return n},e.error=function(){return r},e.setRunning=function(e){return t=e},e.setResult=function(e){return n=e},e.setError=function(e){return r=e},e}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3],o={name:n,next:e,throw:t,return:N};return r&&(o[m]=!0),"undefined"!=typeof Symbol&&(o[Symbol.iterator]=function(){return o}),o}function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";"undefined"==typeof window?console.log("redux-saga "+e+": "+t+"\n"+(n&&n.stack||n)):console[e](t,n)}function p(e,t){return function(){return e.apply(void 0,arguments)}}n.d(t,"x",function(){return v}),n.d(t,"e",function(){return y}),n.d(t,"b",function(){return b}),n.d(t,"a",function(){return g}),n.d(t,"c",function(){return w}),n.d(t,"d",function(){return E}),n.d(t,"r",function(){return O}),n.d(t,"u",function(){return T}),n.d(t,"o",function(){return S}),t.h=r,n.d(t,"q",function(){return P}),n.d(t,"v",function(){return C}),t.w=a,n.d(t,"f",function(){return A}),t.l=i,t.g=u,t.m=c,t.j=l,n.d(t,"y",function(){return k}),t.t=s,t.s=f,t.n=p,n.d(t,"z",function(){return R}),n.d(t,"p",function(){return I}),n.d(t,"k",function(){return L}),n.d(t,"A",function(){return M}),n.d(t,"i",function(){return D});var d=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0;return function(){return++e}}(),j=function(e){throw e},N=function(e){return{value:e,done:!0}},R=function(e,t){return e+" has been deprecated in favor of "+t+", please update your code"},I=function(e){return new Error("\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project's github repo.\n Error: "+e+"\n")},L=function(e,t){return(e?e+".":"")+"setContext(props): argument "+t+" is not a plain object"},M=function(e){return function(t){return e(Object.defineProperty(t,w,{value:!0}))}},D=function e(t){return function(){for(var n=arguments.length,r=Array(n),o=0;o0?r:n)(e)}},function(e,t,n){var r=n(0),o=n(27),a=n(4);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],i={};i[e]=t(n),r(r.S+r.F*a(function(){n(1)}),"Object",i)}},function(e,t,n){var r=n(24),o=n(61),a=n(11),i=n(9),u=n(107);e.exports=function(e,t){var n=1==e,c=2==e,l=3==e,s=4==e,f=6==e,p=5==e||f,d=t||u;return function(t,u,h){for(var v,y,m=a(t),b=o(m),g=r(u,h,3),w=i(b.length),E=0,_=n?d(t,w):c?d(t,0):void 0;w>E;E++)if((p||E in b)&&(v=b[E],y=g(v,E,m),e))if(n)_[E]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return E;case 2:_.push(v)}else if(s)return!1;return f?-1:l||s?s:_}}},function(e,t,n){"use strict";if(n(7)){var r=n(41),o=n(3),a=n(4),i=n(0),u=n(78),c=n(113),l=n(24),s=n(47),f=n(39),p=n(16),d=n(49),h=n(30),v=n(9),y=n(163),m=n(43),b=n(28),g=n(15),w=n(63),E=n(5),_=n(11),O=n(104),T=n(44),S=n(21),x=n(45).f,P=n(106),C=n(40),A=n(6),k=n(32),j=n(69),N=n(76),R=n(109),I=n(55),L=n(73),M=n(46),D=n(108),U=n(153),F=n(8),H=n(20),q=F.f,B=H.f,G=o.RangeError,V=o.TypeError,W=o.Uint8Array,z=Array.prototype,K=c.ArrayBuffer,Y=c.DataView,Q=k(0),$=k(2),X=k(3),J=k(4),Z=k(5),ee=k(6),te=j(!0),ne=j(!1),re=R.values,oe=R.keys,ae=R.entries,ie=z.lastIndexOf,ue=z.reduce,ce=z.reduceRight,le=z.join,se=z.sort,fe=z.slice,pe=z.toString,de=z.toLocaleString,he=A("iterator"),ve=A("toStringTag"),ye=C("typed_constructor"),me=C("def_constructor"),be=u.CONSTR,ge=u.TYPED,we=u.VIEW,Ee=k(1,function(e,t){return xe(N(e,e[me]),t)}),_e=a(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),Oe=!!W&&!!W.prototype.set&&a(function(){new W(1).set({})}),Te=function(e,t){var n=h(e);if(n<0||n%t)throw G("Wrong offset!");return n},Se=function(e){if(E(e)&&ge in e)return e;throw V(e+" is not a typed array!")},xe=function(e,t){if(!(E(e)&&ye in e))throw V("It is not a typed array constructor!");return new e(t)},Pe=function(e,t){return Ce(N(e,e[me]),t)},Ce=function(e,t){for(var n=0,r=t.length,o=xe(e,r);r>n;)o[n]=t[n++];return o},Ae=function(e,t,n){q(e,t,{get:function(){return this._d[n]}})},ke=function(e){var t,n,r,o,a,i,u=_(e),c=arguments.length,s=c>1?arguments[1]:void 0,f=void 0!==s,p=P(u);if(void 0!=p&&!O(p)){for(i=p.call(u),r=[],t=0;!(a=i.next()).done;t++)r.push(a.value);u=r}for(f&&c>2&&(s=l(s,arguments[2],2)),t=0,n=v(u.length),o=xe(this,n);n>t;t++)o[t]=f?s(u[t],t):u[t];return o},je=function(){for(var e=0,t=arguments.length,n=xe(this,t);t>e;)n[e]=arguments[e++];return n},Ne=!!W&&a(function(){de.call(new W(1))}),Re=function(){return de.apply(Ne?fe.call(Se(this)):Se(this),arguments)},Ie={copyWithin:function(e,t){return U.call(Se(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return J(Se(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return D.apply(Se(this),arguments)},filter:function(e){return Pe(this,$(Se(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Z(Se(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Se(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Q(Se(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Se(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Se(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return le.apply(Se(this),arguments)},lastIndexOf:function(e){return ie.apply(Se(this),arguments)},map:function(e){return Ee(Se(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ue.apply(Se(this),arguments)},reduceRight:function(e){return ce.apply(Se(this),arguments)},reverse:function(){for(var e,t=this,n=Se(t).length,r=Math.floor(n/2),o=0;o1?arguments[1]:void 0)},sort:function(e){return se.call(Se(this),e)},subarray:function(e,t){var n=Se(this),r=n.length,o=m(e,r);return new(N(n,n[me]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,v((void 0===t?r:m(t,r))-o))}},Le=function(e,t){return Pe(this,fe.call(Se(this),e,t))},Me=function(e){Se(this);var t=Te(arguments[1],1),n=this.length,r=_(e),o=v(r.length),a=0;if(o+t>n)throw G("Wrong length!");for(;a255?255:255&r),o.v[d](n*t+o.o,r,_e)},A=function(e,t){q(e,t,{get:function(){return P(this,t)},set:function(e){return C(this,t,e)},enumerable:!0})};g?(h=n(function(e,n,r,o){s(e,h,l,"_d");var a,i,u,c,f=0,d=0;if(E(n)){if(!(n instanceof K||"ArrayBuffer"==(c=w(n))||"SharedArrayBuffer"==c))return ge in n?Ce(h,n):ke.call(h,n);a=n,d=Te(r,t);var m=n.byteLength;if(void 0===o){if(m%t)throw G("Wrong length!");if((i=m-d)<0)throw G("Wrong length!")}else if((i=v(o)*t)+d>m)throw G("Wrong length!");u=i/t}else u=y(n),i=u*t,a=new K(i);for(p(e,"_d",{b:a,o:d,l:i,e:u,v:new Y(a)});f=200&&e.status<300)return t;var n=new Error(t.message);throw n.response=e,n}function a(e,t){return fetch(e,t).then(function(e){return Promise.all([e,r(e)])}).then(function(e){var t=i(e,2);return o(t[0],t[1])})}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=a,n(484)},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(139),o=n(91);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(30),o=Math.max,a=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):a(e,t)}},function(e,t,n){var r=n(2),o=n(140),a=n(91),i=n(90)("IE_PROTO"),u=function(){},c=function(){var e,t=n(88)("iframe"),r=a.length;for(t.style.display="none",n(92).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("\\n \\n \\n \\n ';\n};\n\n/***/ }),\n/* 114 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar selectSiteState = exports.selectSiteState = function selectSiteState(state) {\n return state.site;\n};\n\nvar selectSiteHost = exports.selectSiteHost = function selectSiteHost(state) {\n return state.site.host;\n};\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(116);\n__webpack_require__(117);\nmodule.exports = __webpack_require__(118);\n\n\n/***/ }),\n/* 116 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"babel-polyfill\");\n\n/***/ }),\n/* 117 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"whatwg-fetch\");\n\n/***/ }),\n/* 118 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Server = __webpack_require__(119);\nvar Components = __webpack_require__(50);\nvar Containers = __webpack_require__(52);\nvar Pages = __webpack_require__(53);\n\nvar _exports = {\n Server: Server,\n Components: Components,\n Containers: Containers,\n Pages: Pages\n};\n\nmodule.exports = _exports;\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// app dependencies\nvar express = __webpack_require__(120);\nvar bodyParser = __webpack_require__(121);\nvar expressHandlebars = __webpack_require__(122);\nvar Handlebars = __webpack_require__(123);\nvar helmet = __webpack_require__(124);\nvar passport = __webpack_require__(91);\n\nvar _require = __webpack_require__(125),\n serializeSpeechUser = _require.serializeSpeechUser,\n deserializeSpeechUser = _require.deserializeSpeechUser;\n\nvar cookieSession = __webpack_require__(126);\nvar http = __webpack_require__(127);\n// logging dependencies\nvar logger = __webpack_require__(2);\n\nfunction Server() {\n var _this = this;\n\n this.configureMysql = function (mysqlConfig) {\n __webpack_require__(92).configure(mysqlConfig);\n };\n this.configureSite = function (siteConfig) {\n __webpack_require__(3).configure(siteConfig);\n _this.sessionKey = siteConfig.auth.sessionKey;\n _this.PORT = siteConfig.details.port;\n };\n this.configureSlack = function (slackConfig) {\n __webpack_require__(93).configure(slackConfig);\n };\n this.createApp = function () {\n // create an Express application\n var app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(__dirname + '/public')); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use(function (req, res, next) {\n // custom logging middleware to log all incoming http requests\n logger.verbose('Request on ' + req.originalUrl + ' from ' + req.ip);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n var localSignupStrategy = __webpack_require__(128);\n var localLoginStrategy = __webpack_require__(139);\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name: 'session',\n keys: [_this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000 // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n var hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars: Handlebars\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n __webpack_require__(140)(app);\n __webpack_require__(141)(app);\n __webpack_require__(146)(app);\n __webpack_require__(153)(app);\n __webpack_require__(163)(app);\n\n _this.app = app;\n };\n this.initialize = function () {\n __webpack_require__(164)(logger);\n __webpack_require__(166)(logger);\n _this.createApp();\n _this.server = http.Server(_this.app);\n };\n this.start = function () {\n var db = __webpack_require__(9);\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(function () {\n _this.server.listen(_this.PORT, function () {\n logger.info('Server is listening on PORT ' + _this.PORT);\n });\n }).catch(function (error) {\n logger.error('Startup Error:', error);\n });\n };\n};\n\nmodule.exports = Server;\n\n/***/ }),\n/* 120 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express\");\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"body-parser\");\n\n/***/ }),\n/* 122 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express-handlebars\");\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"handlebars\");\n\n/***/ }),\n/* 124 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"helmet\");\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n serializeSpeechUser: function serializeSpeechUser(user, done) {\n // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser: function deserializeSpeechUser(user, done) {\n // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n }\n};\n\n/***/ }),\n/* 126 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cookie-session\");\n\n/***/ }),\n/* 127 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"http\");\n\n/***/ }),\n/* 128 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar PassportLocalStrategy = __webpack_require__(94).Strategy;\nvar lbryApi = __webpack_require__(55);\nvar logger = __webpack_require__(2);\nvar db = __webpack_require__(9);\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n logger.verbose('new channel signup request. user: ' + username + ' pass: ' + password + ' .');\n var userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel('@' + username).then(function (tx) {\n // create user record\n var userData = {\n userName: username,\n password: password\n };\n logger.verbose('userData >', userData);\n // create user record\n var channelData = {\n channelName: '@' + username,\n channelClaimId: tx.claim_id\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n var certificateData = {\n claimId: tx.claim_id,\n name: '@' + username\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 3),\n newUser = _ref2[0],\n newChannel = _ref2[1],\n newCertificate = _ref2[2];\n\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n }).then(function () {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n }).catch(function (error) {\n logger.error('signup error', error);\n return done(error);\n });\n});\n\n/***/ }),\n/* 129 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"axios\");\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279'\n }\n};\n\nmodule.exports = lbryConfig;\n\n/***/ }),\n/* 131 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"universal-analytics\");\n\n/***/ }),\n/* 132 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(96),\n returnShortId = _require.returnShortId;\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Certificate = sequelize.define('Certificate', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateVersion: {\n type: STRING,\n default: null\n },\n keyType: {\n type: STRING,\n default: null\n },\n publicKey: {\n type: TEXT('long'),\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Certificate.associate = function (db) {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n var _this = this;\n\n logger.debug('getShortChannelIdFromLongChannelId ' + channelName + ':' + longChannelId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: channelName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n var _this2 = this;\n\n logger.debug('getLongChannelIdFromShortChannelId(' + channelName + ', ' + channelClaimId + ')');\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: {\n name: channelName,\n claimId: {\n $like: channelClaimId + '%'\n }\n },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n var _this3 = this;\n\n logger.debug('getLongChannelIdFromChannelName(' + channelName + ')');\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n var _this4 = this;\n\n logger.debug('validateLongChannelId(' + name + ', ' + claimId + ')');\n return new Promise(function (resolve, reject) {\n _this4.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug('getLongChannelId(' + channelName + ', ' + channelClaimId + ')');\n if (channelClaimId && channelClaimId.length === 40) {\n // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) {\n // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n/***/ }),\n/* 133 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var Channel = sequelize.define('Channel', {\n channelName: {\n type: STRING,\n allowNull: false\n },\n channelClaimId: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n Channel.associate = function (db) {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n/***/ }),\n/* 134 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(96),\n returnShortId = _require.returnShortId;\n\nvar _require2 = __webpack_require__(3),\n defaultThumbnail = _require2.assetDefaults.thumbnail,\n host = _require2.details.host;\n\nfunction determineFileExtensionFromContentType(contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail(storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData(claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Claim = sequelize.define('Claim', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateId: {\n type: STRING,\n default: null\n },\n author: {\n type: STRING,\n default: null\n },\n description: {\n type: TEXT('long'),\n default: null\n },\n language: {\n type: STRING,\n default: null\n },\n license: {\n type: STRING,\n default: null\n },\n licenseUrl: {\n type: STRING,\n default: null\n },\n nsfw: {\n type: BOOLEAN,\n default: null\n },\n preview: {\n type: STRING,\n default: null\n },\n thumbnail: {\n type: STRING,\n default: null\n },\n title: {\n type: STRING,\n default: null\n },\n metadataVersion: {\n type: STRING,\n default: null\n },\n contentType: {\n type: STRING,\n default: null\n },\n source: {\n type: STRING,\n default: null\n },\n sourceType: {\n type: STRING,\n default: null\n },\n sourceVersion: {\n type: STRING,\n default: null\n },\n streamVersion: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n channelName: {\n type: STRING,\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Claim.associate = function (db) {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n var _this = this;\n\n logger.debug('Claim.getShortClaimIdFromLongClaimId for ' + claimName + '#' + claimId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: claimName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n var _this2 = this;\n\n logger.debug('Claim.getAllChannelClaims for ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw: true // returns an array of only data, not an array of instances\n }).then(function (channelClaimsArray) {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(function (claim) {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n var _this3 = this;\n\n logger.debug('finding claim id for claim ' + claimName + ' from channel ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(result.length + ' records found for \"' + claimName + '\" in channel \"' + channelClaimId + '\"');\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n var _this4 = this;\n\n return new Promise(function (resolve, reject) {\n _this4.findAll({\n where: {\n name: name,\n claimId: {\n $like: shortId + '%'\n } },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n var _this5 = this;\n\n return new Promise(function (resolve, reject) {\n _this5.findAll({\n where: { name: name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] // note: maybe height and effective amount need to switch?\n }).then(function (result) {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n var _this6 = this;\n\n return new Promise(function (resolve, reject) {\n _this6.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug('getLongClaimId(' + claimName + ', ' + claimId + ')');\n if (claimId && claimId.length === 40) {\n // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n var _this7 = this;\n\n logger.debug('Claim.resolveClaim: ' + name + ' ' + claimId);\n return new Promise(function (resolve, reject) {\n _this7.findAll({\n where: { name: name, claimId: claimId }\n }).then(function (claimArray) {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error('more than one record matches ' + name + '#' + claimId + ' in db.Claim');\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n/***/ }),\n/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER;\n\n var File = sequelize.define('File', {\n name: {\n type: STRING,\n allowNull: false\n },\n claimId: {\n type: STRING,\n allowNull: false\n },\n address: {\n type: STRING,\n allowNull: false\n },\n outpoint: {\n type: STRING,\n allowNull: false\n },\n height: {\n type: INTEGER,\n allowNull: false,\n default: 0\n },\n fileName: {\n type: STRING,\n allowNull: false\n },\n filePath: {\n type: STRING,\n allowNull: false\n },\n fileType: {\n type: STRING\n },\n nsfw: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: false\n },\n trendingEligible: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: true\n }\n }, {\n freezeTableName: true\n });\n\n File.associate = function (db) {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25\n });\n };\n\n return File;\n};\n\n/***/ }),\n/* 136 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n TEXT = _ref.TEXT;\n\n var Request = sequelize.define('Request', {\n action: {\n type: STRING,\n allowNull: false\n },\n url: {\n type: STRING,\n allowNull: false\n },\n ipAddress: {\n type: STRING,\n allowNull: true\n },\n result: {\n type: TEXT('long'),\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Request.associate = function (db) {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n return Request;\n};\n\n/***/ }),\n/* 137 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar bcrypt = __webpack_require__(138);\nvar logger = __webpack_require__(2);\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var User = sequelize.define('User', {\n userName: {\n type: STRING,\n allowNull: false\n },\n password: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n User.associate = function (db) {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n _this.update({ password: hash }).then(function () {\n resolve();\n }).catch(function (error) {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', function (user, options) {\n logger.debug('User.beforeCreate hook...');\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n/***/ }),\n/* 138 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"bcrypt\");\n\n/***/ }),\n/* 139 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PassportLocalStrategy = __webpack_require__(94).Strategy;\nvar logger = __webpack_require__(2);\nvar db = __webpack_require__(9);\n\nvar returnUserAndChannelInfo = function returnUserAndChannelInfo(userInstance) {\n return new Promise(function (resolve, reject) {\n var userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance.getChannel().then(function (_ref) {\n var channelName = _ref.channelName,\n channelClaimId = _ref.channelClaimId;\n\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n }).catch(function (error) {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n return db.User.findOne({\n where: { userName: username }\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n return user.comparePassword(password).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user).then(function (userInfo) {\n return done(null, userInfo);\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return done(error);\n });\n});\n\n/***/ }),\n/* 140 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\nvar passport = __webpack_require__(91);\n\nmodule.exports = function (app) {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), function (req, res) {\n logger.verbose('successful signup for ' + req.user.channelName);\n res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n // route for log in\n app.post('/login', function (req, res, next) {\n passport.authenticate('local-login', function (err, user, info) {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message\n });\n }\n logger.debug('successful login');\n req.logIn(user, function (err) {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', function (req, res) {\n req.logout();\n res.status(200).json({ success: true, message: 'you successfully logged out' });\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', function (req, res) {\n if (req.user) {\n res.status(200).json({ success: true, data: req.user });\n } else {\n res.status(401).json({ success: false, message: 'user is not logged in' });\n }\n });\n};\n\n/***/ }),\n/* 141 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(2);\nvar multipart = __webpack_require__(142);\n\nvar _require = __webpack_require__(3),\n uploadDirectory = _require.publishing.uploadDirectory,\n host = _require.details.host;\n\nvar multipartMiddleware = multipart({ uploadDir: uploadDirectory });\nvar db = __webpack_require__(9);\n\nvar _require2 = __webpack_require__(143),\n claimNameIsAvailable = _require2.claimNameIsAvailable,\n checkChannelAvailability = _require2.checkChannelAvailability,\n publish = _require2.publish;\n\nvar _require3 = __webpack_require__(55),\n getClaimList = _require3.getClaimList,\n resolveUri = _require3.resolveUri,\n getClaim = _require3.getClaim;\n\nvar _require4 = __webpack_require__(97),\n addGetResultsToFileData = _require4.addGetResultsToFileData,\n createBasicPublishParams = _require4.createBasicPublishParams,\n createThumbnailPublishParams = _require4.createThumbnailPublishParams,\n parsePublishApiRequestBody = _require4.parsePublishApiRequestBody,\n parsePublishApiRequestFiles = _require4.parsePublishApiRequestFiles,\n createFileData = _require4.createFileData;\n\nvar errorHandlers = __webpack_require__(99);\n\nvar _require5 = __webpack_require__(56),\n sendGATimingEvent = _require5.sendGATimingEvent;\n\nvar _require6 = __webpack_require__(144),\n authenticateUser = _require6.authenticateUser;\n\nvar _require7 = __webpack_require__(100),\n getChannelData = _require7.getChannelData,\n getChannelClaims = _require7.getChannelClaims,\n getClaimId = _require7.getClaimId;\n\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = function (app) {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', function (_ref, res) {\n var ip = _ref.ip,\n originalUrl = _ref.originalUrl,\n name = _ref.params.name;\n\n var gaStartTime = Date.now();\n checkChannelAvailability(name).then(function (availableName) {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', function (_ref2, res) {\n var ip = _ref2.ip,\n originalUrl = _ref2.originalUrl,\n params = _ref2.params;\n\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name).then(function (shortId) {\n res.status(200).json(shortId);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', function (_ref3, res) {\n var ip = _ref3.ip,\n originalUrl = _ref3.originalUrl,\n body = _ref3.body,\n params = _ref3.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', function (_ref4, res) {\n var ip = _ref4.ip,\n originalUrl = _ref4.originalUrl,\n body = _ref4.body,\n params = _ref4.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n var page = params.page;\n getChannelClaims(channelName, channelClaimId, page).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', function (_ref5, res) {\n var ip = _ref5.ip,\n originalUrl = _ref5.originalUrl,\n params = _ref5.params;\n\n getClaimList(params.name).then(function (claimsList) {\n res.status(200).json(claimsList);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', function (_ref6, res) {\n var ip = _ref6.ip,\n originalUrl = _ref6.originalUrl,\n params = _ref6.params;\n\n var name = params.name;\n var claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId).then(function (resolveResult) {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n var fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(name + '#' + claimId)]);\n }).then(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n fileData = _ref8[0],\n getResult = _ref8[1];\n\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, { name: name, claimId: claimId }, 'File'), getResult]);\n }).then(function (_ref9) {\n var _ref10 = _slicedToArray(_ref9, 2),\n fileRecord = _ref10[0],\n _ref10$ = _ref10[1],\n message = _ref10$.message,\n completed = _ref10$.completed;\n\n res.status(200).json({ success: true, message: message, completed: completed });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', function (_ref11, res) {\n var ip = _ref11.ip,\n originalUrl = _ref11.originalUrl,\n name = _ref11.params.name;\n\n var gaStartTime = Date.now();\n claimNameIsAvailable(name).then(function (result) {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', function (_ref12, res) {\n var headers = _ref12.headers,\n ip = _ref12.ip,\n originalUrl = _ref12.originalUrl,\n params = _ref12.params;\n\n resolveUri(params.name + '#' + params.claimId).then(function (resolvedUri) {\n res.status(200).json(resolvedUri);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, function (_ref13, res) {\n var body = _ref13.body,\n files = _ref13.files,\n headers = _ref13.headers,\n ip = _ref13.ip,\n originalUrl = _ref13.originalUrl,\n user = _ref13.user;\n\n // define variables\n var channelName = void 0,\n channelId = void 0,\n channelPassword = void 0,\n description = void 0,\n fileName = void 0,\n filePath = void 0,\n fileType = void 0,\n gaStartTime = void 0,\n license = void 0,\n name = void 0,\n nsfw = void 0,\n thumbnail = void 0,\n thumbnailFileName = void 0,\n thumbnailFilePath = void 0,\n thumbnailFileType = void 0,\n title = void 0;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n var _parsePublishApiReque = parsePublishApiRequestBody(body);\n // validateApiPublishRequest(body, files);\n\n\n name = _parsePublishApiReque.name;\n nsfw = _parsePublishApiReque.nsfw;\n license = _parsePublishApiReque.license;\n title = _parsePublishApiReque.title;\n description = _parsePublishApiReque.description;\n thumbnail = _parsePublishApiReque.thumbnail;\n\n var _parsePublishApiReque2 = parsePublishApiRequestFiles(files);\n\n fileName = _parsePublishApiReque2.fileName;\n filePath = _parsePublishApiReque2.filePath;\n fileType = _parsePublishApiReque2.fileType;\n thumbnailFileName = _parsePublishApiReque2.thumbnailFileName;\n thumbnailFilePath = _parsePublishApiReque2.thumbnailFilePath;\n thumbnailFileType = _parsePublishApiReque2.thumbnailFileType;\n channelName = body.channelName;\n channelId = body.channelId;\n channelPassword = body.channelPassword;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // check channel authorization\n Promise.all([authenticateUser(channelName, channelId, channelPassword, user), claimNameIsAvailable(name), createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail), createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw)]).then(function (_ref14) {\n var _ref15 = _slicedToArray(_ref14, 4),\n _ref15$ = _ref15[0],\n channelName = _ref15$.channelName,\n channelClaimId = _ref15$.channelClaimId,\n validatedClaimName = _ref15[1],\n publishParams = _ref15[2],\n thumbnailPublishParams = _ref15[3];\n\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n }).then(function (result) {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data: {\n name: name,\n claimId: result.claim_id,\n url: host + '/' + result.claim_id + '/' + name,\n lbryTx: result\n }\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', function (_ref16, res) {\n var ip = _ref16.ip,\n originalUrl = _ref16.originalUrl,\n body = _ref16.body,\n params = _ref16.params;\n\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name).then(function (shortId) {\n res.status(200).json({ success: true, data: shortId });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', function (_ref17, res) {\n var ip = _ref17.ip,\n originalUrl = _ref17.originalUrl,\n body = _ref17.body,\n params = _ref17.params;\n\n logger.debug('body:', body);\n var channelName = body.channelName;\n var channelClaimId = body.channelClaimId;\n var claimName = body.claimName;\n var claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (result) {\n if (result === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel could be found' });\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'No matching claim id could be found' });\n }\n res.status(200).json({ success: true, data: result });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', function (_ref18, res) {\n var ip = _ref18.ip,\n originalUrl = _ref18.originalUrl,\n body = _ref18.body,\n params = _ref18.params;\n\n var claimName = params.claimName;\n var claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId).then(function (claimInfo) {\n if (!claimInfo) {\n return res.status(404).json({ success: false, message: 'No claim could be found' });\n }\n res.status(200).json({ success: true, data: claimInfo });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', function (_ref19, res) {\n var ip = _ref19.ip,\n originalUrl = _ref19.originalUrl,\n params = _ref19.params;\n\n var name = params.name;\n var claimId = params.claimId;\n db.File.findOne({ where: { name: name, claimId: claimId } }).then(function (result) {\n if (result) {\n return res.status(200).json({ success: true, data: true });\n }\n res.status(200).json({ success: true, data: false });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n/***/ }),\n/* 142 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"connect-multiparty\");\n\n/***/ }),\n/* 143 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _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; }\n\nvar logger = __webpack_require__(2);\nvar db = __webpack_require__(9);\nvar lbryApi = __webpack_require__(55);\nvar publishHelpers = __webpack_require__(97);\n\nvar _require = __webpack_require__(3),\n _require$publishing = _require.publishing,\n primaryClaimAddress = _require$publishing.primaryClaimAddress,\n additionalClaimAddresses = _require$publishing.additionalClaimAddresses;\n\nvar Sequelize = __webpack_require__(95);\nvar Op = Sequelize.Op;\n\nmodule.exports = {\n publish: function publish(publishParams, fileName, fileType) {\n return new Promise(function (resolve, reject) {\n var publishResults = void 0,\n certificateId = void 0,\n channelName = void 0;\n // publish the file\n return lbryApi.publishClaim(publishParams).then(function (tx) {\n logger.info('Successfully published ' + publishParams.name + ' ' + fileName, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug('this claim was published in channel: ' + publishParams.channel_name);\n return db.Channel.findOne({ where: { channelName: publishParams.channel_name } });\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n }).then(function (channel) {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug('certificateId: ' + certificateId);\n }).then(function () {\n // create the File record\n var fileRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n fileName: fileName,\n filePath: publishParams.file_path,\n fileType: fileType,\n nsfw: publishParams.metadata.nsfw\n };\n // create the Claim record\n var claimRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n thumbnail: publishParams.metadata.thumbnail,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n contentType: fileType,\n nsfw: publishParams.metadata.nsfw,\n amount: publishParams.bid,\n certificateId: certificateId,\n channelName: channelName\n };\n // upsert criteria\n var upsertCriteria = {\n name: publishParams.name,\n claimId: publishResults.claim_id\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n file = _ref2[0],\n claim = _ref2[1];\n\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n }).then(function () {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n }).catch(function (error) {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable: function claimNameIsAvailable(name) {\n var claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim.findAll({\n attributes: ['address'],\n where: {\n name: name,\n address: _defineProperty({}, Op.or, claimAddresses)\n }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n }).catch(function (error) {\n throw error;\n });\n },\n checkChannelAvailability: function checkChannelAvailability(name) {\n return db.Channel.findAll({\n where: { channelName: name }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n }).catch(function (error) {\n throw error;\n });\n }\n};\n\n/***/ }),\n/* 144 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar db = __webpack_require__(9);\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n authenticateUser: function authenticateUser(channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName: null,\n channelClaimId: null\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName: user.channelName,\n channelClaimId: user.channelClaimId\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials: function authenticateChannelCredentials(channelName, channelId, userPassword) {\n return new Promise(function (resolve, reject) {\n // hoisted variables\n var channelData = void 0;\n // build the params for finding the channel\n var channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel.findOne({\n where: channelFindParams\n }).then(function (channel) {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) }\n });\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n }).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 145 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims: function returnPaginatedChannelClaims(channelName, longChannelClaimId, claims, page) {\n var totalPages = module.exports.determineTotalPages(claims);\n var paginationPage = module.exports.getPageFromQuery(page);\n var viewData = {\n channelName: channelName,\n longChannelClaimId: longChannelClaimId,\n claims: module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage: module.exports.determinePreviousPage(paginationPage),\n currentPage: paginationPage,\n nextPage: module.exports.determineNextPage(totalPages, paginationPage),\n totalPages: totalPages,\n totalResults: module.exports.determineTotalClaims(claims)\n };\n return viewData;\n },\n getPageFromQuery: function getPageFromQuery(page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims: function extractPageFromClaims(claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n var claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n var claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n var pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages: function determineTotalPages(claims) {\n if (!claims) {\n return 0;\n } else {\n var totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n var fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n var remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage: function determinePreviousPage(currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage: function determineNextPage(totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims: function determineTotalClaims(claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n }\n};\n\n/***/ }),\n/* 146 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(3),\n host = _require.details;\n\nvar handlePageRender = __webpack_require__(101);\n\nmodule.exports = function (app) {\n // route for the home page\n app.get('/', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', function (req, res) {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', function (req, res) {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', function (req, res) {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', function (_ref, res) {\n var params = _ref.params;\n\n var claimId = params.claimId;\n var name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host: host, claimId: claimId, name: name });\n });\n};\n\n/***/ }),\n/* 147 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data\n });\n default:\n return state;\n }\n};\n\nvar _publish_action_types = __webpack_require__(104);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nvar _publish_channel_select_states = __webpack_require__(105);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar _require = __webpack_require__(3),\n publishing = _require.publishing;\n\nvar initialState = {\n disabled: publishing.disabled,\n disabledMessage: publishing.disabledMessage,\n publishInChannel: false,\n selectedChannel: _publish_channel_select_states.LOGIN,\n showMetadataInputs: false,\n status: {\n status: null,\n message: null\n },\n error: {\n file: null,\n url: null,\n channel: null,\n publishSubmit: null\n },\n file: null,\n claim: '',\n metadata: {\n title: '',\n description: '',\n license: '',\n nsfw: false\n },\n thumbnail: null\n};\n\n/***/ }),\n/* 148 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data\n });\n default:\n return state;\n }\n};\n\nvar _channel_action_types = __webpack_require__(106);\n\nvar actions = _interopRequireWildcard(_channel_action_types);\n\nfunction _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; } }\n\nvar initialState = {\n loggedInChannel: {\n name: null,\n shortId: null,\n longId: null\n }\n};\n\n/***/ }),\n/* 149 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data\n })\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id: action.data.requestId\n })\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n key: action.data.key\n }))\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n name: action.data.name,\n claimId: action.data.claimId,\n shortId: action.data.shortId,\n claimData: action.data.claimData\n }))\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.id, {\n name: action.data.name,\n longId: action.data.longId,\n shortId: action.data.shortId,\n claimsData: action.data.claimsData\n }))\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.channelListId, Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData\n })))\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data\n })\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error: action.data,\n status: _asset_display_states.ERROR\n })\n });\n default:\n return state;\n }\n};\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _asset_display_states = __webpack_require__(107);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar initialState = {\n request: {\n error: null,\n type: null,\n id: null\n },\n requestList: {},\n channelList: {},\n assetList: {},\n displayAsset: {\n error: null,\n status: _asset_display_states.LOCAL_CHECK\n }\n};\n\n/***/ }),\n/* 150 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n default:\n return state;\n }\n};\n\nvar siteConfig = __webpack_require__(3);\n\nvar googleAnalyticsId = siteConfig.analytics.googleId,\n _siteConfig$assetDefa = siteConfig.assetDefaults,\n defaultThumbnail = _siteConfig$assetDefa.thumbnail,\n defaultDescription = _siteConfig$assetDefa.description,\n _siteConfig$details = siteConfig.details,\n description = _siteConfig$details.description,\n host = _siteConfig$details.host,\n title = _siteConfig$details.title,\n twitter = _siteConfig$details.twitter;\n\n\nvar initialState = {\n description: description,\n googleAnalyticsId: googleAnalyticsId,\n host: host,\n title: title,\n twitter: twitter,\n defaultDescription: defaultDescription,\n defaultThumbnail: defaultThumbnail\n};\n\n/***/ }),\n/* 151 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-ga\");\n\n/***/ }),\n/* 152 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cross-fetch/polyfill\");\n\n/***/ }),\n/* 153 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _require = __webpack_require__(56),\n sendGAServeEvent = _require.sendGAServeEvent;\n\nvar _require2 = __webpack_require__(154),\n determineResponseType = _require2.determineResponseType,\n flipClaimNameAndIdForBackwardsCompatibility = _require2.flipClaimNameAndIdForBackwardsCompatibility,\n logRequestData = _require2.logRequestData,\n getClaimIdAndServeAsset = _require2.getClaimIdAndServeAsset;\n\nvar lbryUri = __webpack_require__(155);\nvar handleShowRender = __webpack_require__(156);\nvar SERVE = 'SERVE';\n\nmodule.exports = function (app) {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // parse the identifier\n var isChannel = void 0,\n channelName = void 0,\n channelClaimId = void 0,\n claimId = void 0;\n try {\n var _lbryUri$parseIdentif = lbryUri.parseIdentifier(params.identifier);\n\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n if (!isChannel) {\n var _flipClaimNameAndIdFo = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n\n var _flipClaimNameAndIdFo2 = _slicedToArray(_flipClaimNameAndIdFo, 2);\n\n claimId = _flipClaimNameAndIdFo2[0];\n claimName = _flipClaimNameAndIdFo2[1];\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie2 = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie2.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim2 = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim2.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n/***/ }),\n/* 154 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(100),\n getClaimId = _require.getClaimId,\n getLocalFileRecord = _require.getLocalFileRecord;\n\nvar _require2 = __webpack_require__(99),\n handleErrorResponse = _require2.handleErrorResponse;\n\nvar SERVE = 'SERVE';\nvar SHOW = 'SHOW';\nvar NO_FILE = 'NO_FILE';\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml(_ref) {\n var accept = _ref.accept;\n\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser(headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset(_ref2) {\n var accept = _ref2.accept,\n range = _ref2.range;\n\n var imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n var videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId(claimId) {\n return claimId.length === 40 && !/[^A-Za-z0-9]/g.test(claimId);\n};\n\nfunction isValidShortId(claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId(input) {\n return isValidClaimId(input) || isValidShortId(input);\n};\n\nfunction serveAssetToClient(claimId, name, res) {\n return getLocalFileRecord(claimId, name).then(function (fileRecord) {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect('/api/claim/get/' + name + '/' + claimId);\n }\n // serve the file\n var filePath = fileRecord.filePath,\n fileType = fileRecord.fileType;\n\n logger.verbose('serving file: ' + filePath);\n var sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type': fileType || 'image/jpeg'\n }\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n }).catch(function (error) {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset: function getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (fullClaimId) {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'no claim id could be found' });\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'no channel id could be found' });\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n }).catch(function (error) {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType: function determineResponseType(hasFileExtension, headers) {\n var responseType = void 0;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) {\n // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) {\n // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility: function flipClaimNameAndIdForBackwardsCompatibility(identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n var tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData: function logRequestData(responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n }\n};\n\n/***/ }),\n/* 155 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n logger.debug('parsing identifier:', identifier);\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex.exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n logger.debug(proto + ', ' + value + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!value) {\n throw new Error('Check your url. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Invalid characters in channel name: ' + nameBadChars.join(', ') + '.');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId,\n claimId: claimId\n };\n },\n parseClaim: function parseClaim(claim) {\n logger.debug('parsing name:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n modifierSeperator = _componentsRegex$exec4[2],\n modifier = _componentsRegex$exec4[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Invalid characters in claim name: ' + nameBadChars.join(', ') + '.');\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No file extension provided after separator ' + modifierSeperator + '.');\n }\n if (modifierSeperator !== '.') {\n throw new Error('The ' + modifierSeperator + ' modifier is not supported in the claim name');\n }\n }\n // return results\n return {\n claimName: claimName\n };\n },\n parseModifier: function parseModifier(claim) {\n logger.debug('parsing modifier:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec5 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec6 = _slicedToArray(_componentsRegex$exec5, 4),\n proto = _componentsRegex$exec6[0],\n claimName = _componentsRegex$exec6[1],\n modifierSeperator = _componentsRegex$exec6[2],\n modifier = _componentsRegex$exec6[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n // Validate and process modifier\n var hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension: hasFileExtension\n };\n }\n};\n\n/***/ }),\n/* 156 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(102);\n\nvar _redux = __webpack_require__(57);\n\nvar _index = __webpack_require__(103);\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _index3 = __webpack_require__(13);\n\nvar _index4 = _interopRequireDefault(_index3);\n\nvar _app = __webpack_require__(108);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(113);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reduxSaga = __webpack_require__(157);\n\nvar _reduxSaga2 = _interopRequireDefault(_reduxSaga);\n\nvar _effects = __webpack_require__(49);\n\nvar _show_uri = __webpack_require__(158);\n\nvar _show = __webpack_require__(11);\n\nvar _reactHelmet = __webpack_require__(48);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar returnSagaWithParams = function returnSagaWithParams(saga, params) {\n return (/*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return (0, _effects.call)(saga, params);\n\n case 2:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n })\n );\n};\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create and apply middleware\n var sagaMiddleware = (0, _reduxSaga2.default)();\n var middleware = (0, _redux.applyMiddleware)(sagaMiddleware);\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_index2.default, middleware);\n\n // create saga\n var action = (0, _show.onHandleShowPageUri)(req.params);\n var saga = returnSagaWithParams(_show_uri.handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware.run(saga).done.then(function () {\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _index4.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n var preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send((0, _renderFullPage2.default)(helmet, html, preloadedState));\n });\n};\n\n/***/ }),\n/* 157 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga\");\n\n/***/ }),\n/* 158 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleShowPageUri = handleShowPageUri;\nexports.watchHandleShowPageUri = watchHandleShowPageUri;\n\nvar _effects = __webpack_require__(49);\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(11);\n\nvar _show_asset = __webpack_require__(159);\n\nvar _show_channel = __webpack_require__(161);\n\nvar _lbryUri = __webpack_require__(61);\n\nvar _lbryUri2 = _interopRequireDefault(_lbryUri);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateIdentifierAndClaim),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateClaimOnly),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(handleShowPageUri),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchHandleShowPageUri);\n\nfunction parseAndUpdateIdentifierAndClaim(modifier, claim) {\n var isChannel, channelName, channelClaimId, claimId, claimName, extension, _lbryUri$parseIdentif, _lbryUri$parseClaim;\n\n return regeneratorRuntime.wrap(function parseAndUpdateIdentifierAndClaim$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n isChannel = void 0, channelName = void 0, channelClaimId = void 0, claimId = void 0, claimName = void 0, extension = void 0;\n _context.prev = 1;\n _lbryUri$parseIdentif = _lbryUri2.default.parseIdentifier(modifier);\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n _lbryUri$parseClaim = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim.claimName;\n extension = _lbryUri$parseClaim.extension;\n _context.next = 17;\n break;\n\n case 12:\n _context.prev = 12;\n _context.t0 = _context['catch'](1);\n _context.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 16:\n return _context.abrupt('return', _context.sent);\n\n case 17:\n if (!isChannel) {\n _context.next = 21;\n break;\n }\n\n _context.next = 20;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, channelName, channelClaimId, extension));\n\n case 20:\n return _context.abrupt('return', _context.sent);\n\n case 21:\n ;\n _context.next = 24;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, claimId, null, null, extension));\n\n case 24:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[1, 12]]);\n}\nfunction parseAndUpdateClaimOnly(claim) {\n var isChannel, channelName, channelClaimId, _lbryUri$parseIdentif2, claimName, extension, _lbryUri$parseClaim2;\n\n return regeneratorRuntime.wrap(function parseAndUpdateClaimOnly$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n isChannel = void 0, channelName = void 0, channelClaimId = void 0;\n _context2.prev = 1;\n _lbryUri$parseIdentif2 = _lbryUri2.default.parseIdentifier(claim);\n isChannel = _lbryUri$parseIdentif2.isChannel;\n channelName = _lbryUri$parseIdentif2.channelName;\n channelClaimId = _lbryUri$parseIdentif2.channelClaimId;\n _context2.next = 13;\n break;\n\n case 8:\n _context2.prev = 8;\n _context2.t0 = _context2['catch'](1);\n _context2.next = 12;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t0.message));\n\n case 12:\n return _context2.abrupt('return', _context2.sent);\n\n case 13:\n if (!isChannel) {\n _context2.next = 17;\n break;\n }\n\n _context2.next = 16;\n return (0, _effects.call)(_show_channel.newChannelRequest, (0, _show.onNewChannelRequest)(channelName, channelClaimId));\n\n case 16:\n return _context2.abrupt('return', _context2.sent);\n\n case 17:\n // if not for a channel, parse the claim request\n claimName = void 0, extension = void 0;\n _context2.prev = 18;\n _lbryUri$parseClaim2 = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim2.claimName;\n extension = _lbryUri$parseClaim2.extension;\n _context2.next = 29;\n break;\n\n case 24:\n _context2.prev = 24;\n _context2.t1 = _context2['catch'](18);\n _context2.next = 28;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t1.message));\n\n case 28:\n return _context2.abrupt('return', _context2.sent);\n\n case 29:\n _context2.next = 31;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, null, null, extension));\n\n case 31:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this, [[1, 8], [18, 24]]);\n}\n\nfunction handleShowPageUri(action) {\n var _action$data, identifier, claim;\n\n return regeneratorRuntime.wrap(function handleShowPageUri$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data = action.data, identifier = _action$data.identifier, claim = _action$data.claim;\n\n if (!identifier) {\n _context3.next = 5;\n break;\n }\n\n _context3.next = 4;\n return (0, _effects.call)(parseAndUpdateIdentifierAndClaim, identifier, claim);\n\n case 4:\n return _context3.abrupt('return', _context3.sent);\n\n case 5:\n _context3.next = 7;\n return (0, _effects.call)(parseAndUpdateClaimOnly, claim);\n\n case 7:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this);\n};\n\nfunction watchHandleShowPageUri() {\n return regeneratorRuntime.wrap(function watchHandleShowPageUri$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.HANDLE_SHOW_URI, handleShowPageUri);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n};\n\n/***/ }),\n/* 159 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newAssetRequest = newAssetRequest;\nexports.watchNewAssetRequest = watchNewAssetRequest;\n\nvar _effects = __webpack_require__(49);\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(11);\n\nvar _assetApi = __webpack_require__(160);\n\nvar _show2 = __webpack_require__(28);\n\nvar _site = __webpack_require__(114);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newAssetRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewAssetRequest);\n\nfunction newAssetRequest(action) {\n var _action$data, requestType, requestId, name, modifier, state, host, longId, _ref, assetKey, shortId, _ref2, claimData, _ref3;\n\n return regeneratorRuntime.wrap(function newAssetRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, name = _action$data.name, modifier = _action$data.modifier;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get long id && add request to request list\n longId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_assetApi.getLongClaimId, host, name, modifier);\n\n case 15:\n _ref = _context.sent;\n longId = _ref.data;\n _context.next = 24;\n break;\n\n case 19:\n _context.prev = 19;\n _context.t0 = _context['catch'](12);\n _context.next = 23;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 23:\n return _context.abrupt('return', _context.sent);\n\n case 24:\n assetKey = 'a#' + name + '#' + longId;\n _context.next = 27;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, assetKey));\n\n case 27:\n if (!state.assetList[assetKey]) {\n _context.next = 29;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 29:\n // get short Id\n shortId = void 0;\n _context.prev = 30;\n _context.next = 33;\n return (0, _effects.call)(_assetApi.getShortId, host, name, longId);\n\n case 33:\n _ref2 = _context.sent;\n shortId = _ref2.data;\n _context.next = 42;\n break;\n\n case 37:\n _context.prev = 37;\n _context.t1 = _context['catch'](30);\n _context.next = 41;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 41:\n return _context.abrupt('return', _context.sent);\n\n case 42:\n // get asset claim data\n claimData = void 0;\n _context.prev = 43;\n _context.next = 46;\n return (0, _effects.call)(_assetApi.getClaimData, host, name, longId);\n\n case 46:\n _ref3 = _context.sent;\n claimData = _ref3.data;\n _context.next = 55;\n break;\n\n case 50:\n _context.prev = 50;\n _context.t2 = _context['catch'](43);\n _context.next = 54;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t2.message));\n\n case 54:\n return _context.abrupt('return', _context.sent);\n\n case 55:\n _context.next = 57;\n return (0, _effects.put)((0, _show.addAssetToAssetList)(assetKey, null, name, longId, shortId, claimData));\n\n case 57:\n _context.next = 59;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 59:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 19], [30, 37], [43, 50]]);\n};\n\nfunction watchNewAssetRequest() {\n return regeneratorRuntime.wrap(function watchNewAssetRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.ASSET_REQUEST_NEW, newAssetRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\n/***/ }),\n/* 160 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getLongClaimId = getLongClaimId;\nexports.getShortId = getShortId;\nexports.getClaimData = getClaimData;\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getLongClaimId(host, name, modifier) {\n var body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n var params = {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body)\n };\n // create url\n var url = host + '/api/claim/long-id';\n // return the request promise\n return (0, _request2.default)(url, params);\n};\n\nfunction getShortId(host, name, claimId) {\n var url = host + '/api/claim/short-id/' + claimId + '/' + name;\n return (0, _request2.default)(url);\n};\n\nfunction getClaimData(host, name, claimId) {\n var url = host + '/api/claim/data/' + name + '/' + claimId;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 161 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newChannelRequest = newChannelRequest;\nexports.watchNewChannelRequest = watchNewChannelRequest;\nexports.watchUpdateChannelClaims = watchUpdateChannelClaims;\n\nvar _effects = __webpack_require__(49);\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(11);\n\nvar _channelApi = __webpack_require__(162);\n\nvar _show2 = __webpack_require__(28);\n\nvar _site = __webpack_require__(114);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newChannelRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewChannelRequest),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(getNewClaimsAndUpdateChannel),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchUpdateChannelClaims);\n\nfunction newChannelRequest(action) {\n var _action$data, requestType, requestId, channelName, channelId, state, host, longId, shortId, _ref, _ref$data, channelKey, claimsData, _ref2;\n\n return regeneratorRuntime.wrap(function newChannelRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, channelName = _action$data.channelName, channelId = _action$data.channelId;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get channel long id\n longId = void 0, shortId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_channelApi.getChannelData, host, channelName, channelId);\n\n case 15:\n _ref = _context.sent;\n _ref$data = _ref.data;\n longId = _ref$data.longChannelClaimId;\n shortId = _ref$data.shortChannelClaimId;\n _context.next = 26;\n break;\n\n case 21:\n _context.prev = 21;\n _context.t0 = _context['catch'](12);\n _context.next = 25;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 25:\n return _context.abrupt('return', _context.sent);\n\n case 26:\n // store the request in the channel requests list\n channelKey = 'c#' + channelName + '#' + longId;\n _context.next = 29;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, channelKey));\n\n case 29:\n if (!state.channelList[channelKey]) {\n _context.next = 31;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 31:\n // get channel claims data\n claimsData = void 0;\n _context.prev = 32;\n _context.next = 35;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, channelName, 1);\n\n case 35:\n _ref2 = _context.sent;\n claimsData = _ref2.data;\n _context.next = 44;\n break;\n\n case 39:\n _context.prev = 39;\n _context.t1 = _context['catch'](32);\n _context.next = 43;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 43:\n return _context.abrupt('return', _context.sent);\n\n case 44:\n _context.next = 46;\n return (0, _effects.put)((0, _show.addNewChannelToChannelList)(channelKey, channelName, shortId, longId, claimsData));\n\n case 46:\n _context.next = 48;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 48:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 21], [32, 39]]);\n}\n\nfunction watchNewChannelRequest() {\n return regeneratorRuntime.wrap(function watchNewChannelRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\nfunction getNewClaimsAndUpdateChannel(action) {\n var _action$data2, channelKey, name, longId, page, host, claimsData, _ref3;\n\n return regeneratorRuntime.wrap(function getNewClaimsAndUpdateChannel$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data2 = action.data, channelKey = _action$data2.channelKey, name = _action$data2.name, longId = _action$data2.longId, page = _action$data2.page;\n _context3.next = 3;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 3:\n host = _context3.sent;\n claimsData = void 0;\n _context3.prev = 5;\n _context3.next = 8;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, name, page);\n\n case 8:\n _ref3 = _context3.sent;\n claimsData = _ref3.data;\n _context3.next = 17;\n break;\n\n case 12:\n _context3.prev = 12;\n _context3.t0 = _context3['catch'](5);\n _context3.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context3.t0.message));\n\n case 16:\n return _context3.abrupt('return', _context3.sent);\n\n case 17:\n _context3.next = 19;\n return (0, _effects.put)((0, _show.updateChannelClaims)(channelKey, claimsData));\n\n case 19:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this, [[5, 12]]);\n}\n\nfunction watchUpdateChannelClaims() {\n return regeneratorRuntime.wrap(function watchUpdateChannelClaims$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n}\n\n/***/ }),\n/* 162 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getChannelData = getChannelData;\nexports.getChannelClaims = getChannelClaims;\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getChannelData(host, id, name) {\n if (!id) id = 'none';\n var url = host + '/api/channel/data/' + name + '/' + id;\n return (0, _request2.default)(url);\n};\n\nfunction getChannelClaims(host, longId, name, page) {\n if (!page) page = 1;\n var url = host + '/api/channel/claims/' + name + '/' + longId + '/' + page;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 163 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar handlePageRender = __webpack_require__(101);\n\nmodule.exports = function (app) {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', function (req, res) {\n // send response\n handlePageRender(req, res);\n });\n};\n\n/***/ }),\n/* 164 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(165),\n logLevel = _require.logLevel;\n\nmodule.exports = function (winston) {\n // configure\n winston.configure({\n transports: [new winston.transports.Console({\n level: logLevel,\n timestamp: false,\n colorize: true,\n prettyPrint: true,\n handleExceptions: true,\n humanReadableUnhandledException: true\n })]\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n/***/ }),\n/* 165 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar loggerConfig = {\n logLevel: 'debug' // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n/***/ }),\n/* 166 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar winstonSlackWebHook = __webpack_require__(167).SlackWebHook;\nvar slackConfig = __webpack_require__(93);\n\nmodule.exports = function (winston) {\n var slackWebHook = slackConfig.slackWebHook,\n slackErrorChannel = slackConfig.slackErrorChannel,\n slackInfoChannel = slackConfig.slackInfoChannel;\n\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-errors-transport',\n level: 'warn',\n webhookUrl: slackWebHook,\n channel: slackErrorChannel,\n username: 'spee.ch',\n iconEmoji: ':face_with_head_bandage:'\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-info-transport',\n level: 'info',\n webhookUrl: slackWebHook,\n channel: slackInfoChannel,\n username: 'spee.ch',\n iconEmoji: ':nerd_face:'\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n/***/ }),\n/* 167 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston-slack-webhook\");\n\n/***/ }),\n/* 168 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./\": 50,\n\t\"./ActiveStatusBar\": 24,\n\t\"./ActiveStatusBar/\": 24,\n\t\"./ActiveStatusBar/index\": 24,\n\t\"./ActiveStatusBar/index.jsx\": 24,\n\t\"./AssetPreview\": 34,\n\t\"./AssetPreview/\": 34,\n\t\"./AssetPreview/index\": 34,\n\t\"./AssetPreview/index.js\": 34,\n\t\"./AssetPreview/view\": 78,\n\t\"./AssetPreview/view.jsx\": 78,\n\t\"./ExpandingTextArea\": 36,\n\t\"./ExpandingTextArea/\": 36,\n\t\"./ExpandingTextArea/index\": 36,\n\t\"./ExpandingTextArea/index.jsx\": 36,\n\t\"./GAListener\": 13,\n\t\"./GAListener/\": 13,\n\t\"./GAListener/index\": 13,\n\t\"./GAListener/index.jsx\": 13,\n\t\"./InactiveStatusBar\": 25,\n\t\"./InactiveStatusBar/\": 25,\n\t\"./InactiveStatusBar/index\": 25,\n\t\"./InactiveStatusBar/index.jsx\": 25,\n\t\"./Logo\": 21,\n\t\"./Logo/\": 21,\n\t\"./Logo/index\": 21,\n\t\"./Logo/index.jsx\": 21,\n\t\"./NavBarChannelOptionsDropdown\": 22,\n\t\"./NavBarChannelOptionsDropdown/\": 22,\n\t\"./NavBarChannelOptionsDropdown/index\": 22,\n\t\"./NavBarChannelOptionsDropdown/index.jsx\": 22,\n\t\"./ProgressBar\": 10,\n\t\"./ProgressBar/\": 10,\n\t\"./ProgressBar/index\": 10,\n\t\"./ProgressBar/index.jsx\": 10,\n\t\"./PublishPreview\": 37,\n\t\"./PublishPreview/\": 37,\n\t\"./PublishPreview/index\": 37,\n\t\"./PublishPreview/index.jsx\": 37,\n\t\"./PublishUrlMiddleDisplay\": 38,\n\t\"./PublishUrlMiddleDisplay/\": 38,\n\t\"./PublishUrlMiddleDisplay/index\": 38,\n\t\"./PublishUrlMiddleDisplay/index.jsx\": 38,\n\t\"./SEO\": 7,\n\t\"./SEO/\": 7,\n\t\"./SEO/index\": 7,\n\t\"./SEO/index.js\": 7,\n\t\"./SEO/view\": 66,\n\t\"./SEO/view.jsx\": 66,\n\t\"./index\": 50,\n\t\"./index.js\": 50\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 168;\n\n/***/ }),\n/* 169 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./\": 52,\n\t\"./AssetDisplay\": 17,\n\t\"./AssetDisplay/\": 17,\n\t\"./AssetDisplay/index\": 17,\n\t\"./AssetDisplay/index.js\": 17,\n\t\"./AssetDisplay/view\": 72,\n\t\"./AssetDisplay/view.jsx\": 72,\n\t\"./AssetInfo\": 31,\n\t\"./AssetInfo/\": 31,\n\t\"./AssetInfo/index\": 31,\n\t\"./AssetInfo/index.js\": 31,\n\t\"./AssetInfo/view\": 75,\n\t\"./AssetInfo/view.jsx\": 75,\n\t\"./AssetTitle\": 30,\n\t\"./AssetTitle/\": 30,\n\t\"./AssetTitle/index\": 30,\n\t\"./AssetTitle/index.js\": 30,\n\t\"./AssetTitle/view\": 74,\n\t\"./AssetTitle/view.jsx\": 74,\n\t\"./ChannelClaimsDisplay\": 33,\n\t\"./ChannelClaimsDisplay/\": 33,\n\t\"./ChannelClaimsDisplay/index\": 33,\n\t\"./ChannelClaimsDisplay/index.js\": 33,\n\t\"./ChannelClaimsDisplay/view\": 77,\n\t\"./ChannelClaimsDisplay/view.jsx\": 77,\n\t\"./ChannelCreateForm\": 16,\n\t\"./ChannelCreateForm/\": 16,\n\t\"./ChannelCreateForm/index\": 16,\n\t\"./ChannelCreateForm/index.js\": 16,\n\t\"./ChannelCreateForm/view\": 69,\n\t\"./ChannelCreateForm/view.jsx\": 69,\n\t\"./ChannelLoginForm\": 15,\n\t\"./ChannelLoginForm/\": 15,\n\t\"./ChannelLoginForm/index\": 15,\n\t\"./ChannelLoginForm/index.js\": 15,\n\t\"./ChannelLoginForm/view\": 68,\n\t\"./ChannelLoginForm/view.jsx\": 68,\n\t\"./ChannelSelect\": 39,\n\t\"./ChannelSelect/\": 39,\n\t\"./ChannelSelect/index\": 39,\n\t\"./ChannelSelect/index.js\": 39,\n\t\"./ChannelSelect/view\": 81,\n\t\"./ChannelSelect/view.jsx\": 81,\n\t\"./Dropzone\": 18,\n\t\"./Dropzone/\": 18,\n\t\"./Dropzone/index\": 18,\n\t\"./Dropzone/index.js\": 18,\n\t\"./Dropzone/view\": 82,\n\t\"./Dropzone/view.jsx\": 82,\n\t\"./FourOhFourPage\": 35,\n\t\"./FourOhFourPage/\": 35,\n\t\"./FourOhFourPage/index\": 35,\n\t\"./FourOhFourPage/index.jsx\": 35,\n\t\"./FourOhFourPage/view\": 79,\n\t\"./FourOhFourPage/view.jsx\": 79,\n\t\"./NavBar\": 5,\n\t\"./NavBar/\": 5,\n\t\"./NavBar/index\": 5,\n\t\"./NavBar/index.js\": 5,\n\t\"./NavBar/view\": 65,\n\t\"./NavBar/view.jsx\": 65,\n\t\"./PublishDetails\": 40,\n\t\"./PublishDetails/\": 40,\n\t\"./PublishDetails/index\": 40,\n\t\"./PublishDetails/index.js\": 40,\n\t\"./PublishDetails/view\": 83,\n\t\"./PublishDetails/view.jsx\": 83,\n\t\"./PublishDisabledMessage\": 45,\n\t\"./PublishDisabledMessage/\": 45,\n\t\"./PublishDisabledMessage/index\": 45,\n\t\"./PublishDisabledMessage/index.js\": 45,\n\t\"./PublishDisabledMessage/view\": 88,\n\t\"./PublishDisabledMessage/view.jsx\": 88,\n\t\"./PublishMetadataInputs\": 44,\n\t\"./PublishMetadataInputs/\": 44,\n\t\"./PublishMetadataInputs/index\": 44,\n\t\"./PublishMetadataInputs/index.js\": 44,\n\t\"./PublishMetadataInputs/view\": 87,\n\t\"./PublishMetadataInputs/view.jsx\": 87,\n\t\"./PublishStatus\": 46,\n\t\"./PublishStatus/\": 46,\n\t\"./PublishStatus/index\": 46,\n\t\"./PublishStatus/index.js\": 46,\n\t\"./PublishStatus/view\": 89,\n\t\"./PublishStatus/view.jsx\": 89,\n\t\"./PublishThumbnailInput\": 43,\n\t\"./PublishThumbnailInput/\": 43,\n\t\"./PublishThumbnailInput/index\": 43,\n\t\"./PublishThumbnailInput/index.js\": 43,\n\t\"./PublishThumbnailInput/view\": 86,\n\t\"./PublishThumbnailInput/view.jsx\": 86,\n\t\"./PublishTitleInput\": 41,\n\t\"./PublishTitleInput/\": 41,\n\t\"./PublishTitleInput/index\": 41,\n\t\"./PublishTitleInput/index.js\": 41,\n\t\"./PublishTitleInput/view\": 84,\n\t\"./PublishTitleInput/view.jsx\": 84,\n\t\"./PublishTool\": 47,\n\t\"./PublishTool/\": 47,\n\t\"./PublishTool/index\": 47,\n\t\"./PublishTool/index.js\": 47,\n\t\"./PublishTool/view\": 90,\n\t\"./PublishTool/view.jsx\": 90,\n\t\"./PublishUrlInput\": 42,\n\t\"./PublishUrlInput/\": 42,\n\t\"./PublishUrlInput/index\": 42,\n\t\"./PublishUrlInput/index.js\": 42,\n\t\"./PublishUrlInput/view\": 85,\n\t\"./PublishUrlInput/view.jsx\": 85,\n\t\"./ShowAssetDetails\": 29,\n\t\"./ShowAssetDetails/\": 29,\n\t\"./ShowAssetDetails/index\": 29,\n\t\"./ShowAssetDetails/index.js\": 29,\n\t\"./ShowAssetDetails/view\": 73,\n\t\"./ShowAssetDetails/view.jsx\": 73,\n\t\"./ShowAssetLite\": 27,\n\t\"./ShowAssetLite/\": 27,\n\t\"./ShowAssetLite/index\": 27,\n\t\"./ShowAssetLite/index.js\": 27,\n\t\"./ShowAssetLite/view\": 71,\n\t\"./ShowAssetLite/view.jsx\": 71,\n\t\"./ShowChannel\": 32,\n\t\"./ShowChannel/\": 32,\n\t\"./ShowChannel/index\": 32,\n\t\"./ShowChannel/index.js\": 32,\n\t\"./ShowChannel/view\": 76,\n\t\"./ShowChannel/view.jsx\": 76,\n\t\"./index\": 52,\n\t\"./index.js\": 52\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 169;\n\n/***/ }),\n/* 170 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOAD_START = exports.LOAD_START = 'LOAD_START';\nvar LOADING = exports.LOADING = 'LOADING';\nvar PUBLISHING = exports.PUBLISHING = 'PUBLISHING';\nvar SUCCESS = exports.SUCCESS = 'SUCCESS';\nvar FAILED = exports.FAILED = 'FAILED';\n\n/***/ }),\n/* 171 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./\": 53,\n\t\"./AboutPage\": 20,\n\t\"./AboutPage/\": 20,\n\t\"./AboutPage/index\": 20,\n\t\"./AboutPage/index.jsx\": 20,\n\t\"./ErrorPage\": 12,\n\t\"./ErrorPage/\": 12,\n\t\"./ErrorPage/index\": 12,\n\t\"./ErrorPage/index.jsx\": 12,\n\t\"./HomePage\": 54,\n\t\"./HomePage/\": 54,\n\t\"./HomePage/index\": 54,\n\t\"./HomePage/index.jsx\": 54,\n\t\"./LoginPage\": 23,\n\t\"./LoginPage/\": 23,\n\t\"./LoginPage/index\": 23,\n\t\"./LoginPage/index.js\": 23,\n\t\"./LoginPage/view\": 67,\n\t\"./LoginPage/view.jsx\": 67,\n\t\"./ShowPage\": 26,\n\t\"./ShowPage/\": 26,\n\t\"./ShowPage/index\": 26,\n\t\"./ShowPage/index.js\": 26,\n\t\"./ShowPage/view\": 70,\n\t\"./ShowPage/view.jsx\": 70,\n\t\"./index\": 53,\n\t\"./index.js\": 53\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 171;\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// index.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 115);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 663af5f6934a69121924","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 0\n// module chunks = 0","module.exports = require(\"react-redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-redux\"\n// module id = 1\n// module chunks = 0","module.exports = require(\"winston\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston\"\n// module id = 2\n// module chunks = 0","function SiteConfig () {\n this.analytics = {\n googleId: 'default',\n };\n this.assetDefaults = {\n description: 'An asset published on Spee.ch',\n thumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',\n title : 'Spee.ch',\n };\n this.auth = {\n sessionKey: 'default',\n };\n this.componentsConfig = {\n components: {},\n containers: {},\n pages : {},\n };\n this.details = {\n description: 'Open-source, decentralized image and video sharing.',\n host : 'default',\n port : 3000,\n title : 'Spee.ch',\n twitter : '@spee_ch',\n };\n this.publishing = {\n additionalClaimAddresses: [],\n disabled : false,\n disabledMessage : 'Please check back soon.',\n primaryClaimAddress : 'default',\n thumbnailChannel : 'default',\n thumbnailChannelId : 'default',\n uploadDirectory : '/home/lbry/Uploads',\n };\n this.configure = (config) => {\n if (!config) {\n return console.log('No site config received.');\n }\n const { analytics, assetDefaults, auth, componentsConfig, details, publishing } = config;\n this.analytics = analytics;\n this.assetDefaults = assetDefaults;\n this.auth = auth;\n this.details = details;\n this.publishing = publishing;\n this.componentsConfig = componentsConfig;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/siteConfig.js","module.exports = require(\"react-router-dom\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-router-dom\"\n// module id = 4\n// module chunks = 0","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport {updateSelectedChannel} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, site }) => {\n return {\n channelName : channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId : channel.loggedInChannel.longId,\n siteDescription: site.description,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n onChannelLogout: () => {\n dispatch(updateLoggedInChannel(null, null, null));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/index.js","import * as actions from 'constants/publish_action_types';\n\n// export action creators\nexport function selectFile (file) {\n return {\n type: actions.FILE_SELECTED,\n data: file,\n };\n};\n\nexport function clearFile () {\n return {\n type: actions.FILE_CLEAR,\n };\n};\n\nexport function updateMetadata (name, value) {\n return {\n type: actions.METADATA_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateClaim (value) {\n return {\n type: actions.CLAIM_UPDATE,\n data: value,\n };\n};\n\nexport function setPublishInChannel (channel) {\n return {\n type: actions.SET_PUBLISH_IN_CHANNEL,\n channel,\n };\n};\n\nexport function updatePublishStatus (status, message) {\n return {\n type: actions.PUBLISH_STATUS_UPDATE,\n data: {\n status,\n message,\n },\n };\n};\n\nexport function updateError (name, value) {\n return {\n type: actions.ERROR_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateSelectedChannel (channelName) {\n return {\n type: actions.SELECTED_CHANNEL_UPDATE,\n data: channelName,\n };\n};\n\nexport function toggleMetadataInputs (showMetadataInputs) {\n return {\n type: actions.TOGGLE_METADATA_INPUTS,\n data: showMetadataInputs,\n };\n};\n\nexport function onNewThumbnail (file) {\n return {\n type: actions.THUMBNAIL_NEW,\n data: file,\n };\n};\n\nexport function startPublish (history) {\n return {\n type: actions.PUBLISH_START,\n data: { history },\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/publish.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site }) => {\n const { defaultDescription, defaultThumbnail, description: siteDescription, host: siteHost, title: siteTitle, twitter: siteTwitter } = site;\n return {\n defaultDescription,\n defaultThumbnail,\n siteDescription,\n siteHost,\n siteTitle,\n siteTwitter,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/index.js","import 'cross-fetch/polyfill';\n\n/**\n * Parses the JSON returned by a network request\n *\n * @param {object} response A response from a network request\n *\n * @return {object} The parsed JSON from the request\n */\nfunction parseJSON (response) {\n if (response.status === 204 || response.status === 205) {\n return null;\n }\n return response.json();\n}\n\n/**\n * Parses the status returned by a network request\n *\n * @param {object} response A response from a network request\n * @param {object} response The parsed JSON from the network request\n *\n * @return {object | undefined} Returns object with status and statusText, or undefined\n */\nfunction checkStatus (response, jsonResponse) {\n if (response.status >= 200 && response.status < 300) {\n return jsonResponse;\n }\n const error = new Error(jsonResponse.message);\n error.response = response;\n throw error;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @param {string} url The URL we want to request\n * @param {object} [options] The options we want to pass to \"fetch\"\n *\n * @return {object} The response data\n */\n\nexport default function request (url, options) {\n return fetch(url, options)\n .then(response => {\n return Promise.all([response, parseJSON(response)]);\n })\n .then(([response, jsonResponse]) => {\n return checkStatus(response, jsonResponse);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/request.js","const Sequelize = require('sequelize');\nconst logger = require('winston');\n\nconsole.log('exporting sequelize models');\nconst { database, username, password } = require('../../config/mysqlConfig');\nconst db = {};\n// set sequelize options\nconst sequelize = new Sequelize(database, username, password, {\n host : 'localhost',\n dialect : 'mysql',\n dialectOptions: {decimalNumbers: true}, // fix to ensure DECIMAL will not be stored as a string\n logging : false,\n pool : {\n max : 5,\n min : 0,\n idle : 10000,\n acquire: 10000,\n },\n});\n\n// establish mysql connection\nsequelize\n .authenticate()\n .then(() => {\n logger.info('Sequelize has established mysql connection successfully.');\n })\n .catch(err => {\n logger.error('Sequelize was unable to connect to the database:', err);\n });\n\n// manually add each model to the db object\nconst Certificate = require('./certificate.js');\nconst Channel = require('./channel.js');\nconst Claim = require('./claim.js');\nconst File = require('./file.js');\nconst Request = require('./request.js');\nconst User = require('./user.js');\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(modelName => {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = (Model, values, condition, tableName) => {\n return Model\n .findOne({\n where: condition,\n })\n .then(obj => {\n if (obj) { // update\n logger.debug(`updating record in db.${tableName}`);\n return obj.update(values);\n } else { // insert\n logger.debug(`creating record in db.${tableName}`);\n return Model.create(values);\n }\n })\n .catch(function (error) {\n logger.error(`${tableName}.upsert error`, error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/index.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ActiveStatusBar from 'components/ActiveStatusBar';\nimport InactiveStatusBar from 'components/InactiveStatusBar';\n\nclass ProgressBar extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n bars : [],\n index : 0,\n incrementer: 1,\n };\n this.createBars = this.createBars.bind(this);\n this.startProgressBar = this.startProgressBar.bind(this);\n this.updateProgressBar = this.updateProgressBar.bind(this);\n this.stopProgressBar = this.stopProgressBar.bind(this);\n }\n componentDidMount () {\n this.createBars();\n this.startProgressBar();\n }\n componentWillUnmount () {\n this.stopProgressBar();\n }\n createBars () {\n const bars = [];\n for (let i = 0; i <= this.props.size; i++) {\n bars.push({isActive: false});\n }\n this.setState({ bars });\n }\n startProgressBar () {\n this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);\n };\n updateProgressBar () {\n let index = this.state.index;\n let incrementer = this.state.incrementer;\n let bars = this.state.bars;\n // flip incrementer if necessary, to stay in bounds\n if ((index < 0) || (index > this.props.size)) {\n incrementer = incrementer * -1;\n index += incrementer;\n }\n // update the indexed bar\n if (incrementer > 0) {\n bars[index].isActive = true;\n } else {\n bars[index].isActive = false;\n };\n // increment index\n index += incrementer;\n // update state\n this.setState({\n bars,\n incrementer,\n index,\n });\n };\n stopProgressBar () {\n clearInterval(this.updateInterval);\n };\n render () {\n return (\n
\n {this.state.bars.map((bar, index) => bar.isActive ? : )}\n
\n );\n }\n};\n\nProgressBar.propTypes = {\n size: PropTypes.number.isRequired,\n};\n\nexport default ProgressBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ProgressBar/index.jsx","import * as actions from 'constants/show_action_types';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\n// basic request parsing\nexport function onHandleShowPageUri (params) {\n return {\n type: actions.HANDLE_SHOW_URI,\n data: params,\n };\n};\n\nexport function onRequestError (error) {\n return {\n type: actions.REQUEST_ERROR,\n data: error,\n };\n};\n\nexport function onNewChannelRequest (channelName, channelId) {\n const requestType = CHANNEL;\n const requestId = `cr#${channelName}#${channelId}`;\n return {\n type: actions.CHANNEL_REQUEST_NEW,\n data: { requestType, requestId, channelName, channelId },\n };\n};\n\nexport function onNewAssetRequest (name, id, channelName, channelId, extension) {\n const requestType = extension ? ASSET_LITE : ASSET_DETAILS;\n const requestId = `ar#${name}#${id}#${channelName}#${channelId}`;\n return {\n type: actions.ASSET_REQUEST_NEW,\n data: {\n requestType,\n requestId,\n name,\n modifier: {\n id,\n channel: {\n name: channelName,\n id : channelId,\n },\n },\n },\n };\n};\n\nexport function onRequestUpdate (requestType, requestId) {\n return {\n type: actions.REQUEST_UPDATE,\n data: {\n requestType,\n requestId,\n },\n };\n};\n\nexport function addRequestToRequestList (id, error, key) {\n return {\n type: actions.REQUEST_LIST_ADD,\n data: { id, error, key },\n };\n};\n\n// asset actions\n\nexport function addAssetToAssetList (id, error, name, claimId, shortId, claimData) {\n return {\n type: actions.ASSET_ADD,\n data: { id, error, name, claimId, shortId, claimData },\n };\n}\n\n// channel actions\n\nexport function addNewChannelToChannelList (id, name, shortId, longId, claimsData) {\n return {\n type: actions.CHANNEL_ADD,\n data: { id, name, shortId, longId, claimsData },\n };\n};\n\nexport function onUpdateChannelClaims (channelKey, name, longId, page) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,\n data: {channelKey, name, longId, page},\n };\n};\n\nexport function updateChannelClaims (channelListId, claimsData) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,\n data: {channelListId, claimsData},\n };\n};\n\n// display a file\n\nexport function fileRequested (name, claimId) {\n return {\n type: actions.FILE_REQUESTED,\n data: { name, claimId },\n };\n};\n\nexport function updateFileAvailability (status) {\n return {\n type: actions.FILE_AVAILABILITY_UPDATE,\n data: status,\n };\n};\n\nexport function updateDisplayAssetError (error) {\n return {\n type: actions.DISPLAY_ASSET_ERROR,\n data: error,\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/show.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport NavBar from 'containers/NavBar';\n\nclass ErrorPage extends React.Component {\n render () {\n const { error } = this.props;\n return (\n
\n \n
\n

{error}

\n
\n
\n );\n }\n};\n\nErrorPage.propTypes = {\n error: PropTypes.string.isRequired,\n};\n\nexport default ErrorPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ErrorPage/index.jsx","import React from 'react';\nimport GoogleAnalytics from 'react-ga';\nimport { withRouter } from 'react-router-dom';\nconst { analytics: { googleId } } = require('../../../config/siteConfig.js');\n\nGoogleAnalytics.initialize(googleId);\n\nclass GAListener extends React.Component {\n componentDidMount () {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n\n sendPageView (location) {\n GoogleAnalytics.set({ page: location.pathname });\n GoogleAnalytics.pageview(location.pathname);\n }\n\n render () {\n return this.props.children;\n }\n}\n\nexport default withRouter(GAListener);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/GAListener/index.jsx","module.exports = require(\"prop-types\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 14\n// module chunks = 0","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from '../../actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/index.js","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from 'actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/index.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { fileRequested } from 'actions/show';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select error and status\n const error = show.displayAsset.error;\n const status = show.displayAsset.status;\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n error,\n status,\n asset,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onFileRequest: (name, claimId) => {\n dispatch(fileRequested(name, claimId));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/index.js","import { connect } from 'react-redux';\nimport { selectFile, updateError, clearFile } from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n file : publish.file,\n thumbnail: publish.thumbnail,\n fileError: publish.error.file,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n selectFile: (file) => {\n dispatch(selectFile(file));\n },\n setFileError: (value) => {\n dispatch(clearFile());\n dispatch(updateError('file', value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/Dropzone/index.js","// request actions\nexport const HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nexport const REQUEST_ERROR = 'REQUEST_ERROR';\nexport const REQUEST_UPDATE = 'REQUEST_UPDATE';\nexport const ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nexport const CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nexport const REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nexport const ASSET_ADD = `ASSET_ADD`;\n\n// channel actions\nexport const CHANNEL_ADD = 'CHANNEL_ADD';\n\nexport const CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nexport const CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nexport const FILE_REQUESTED = 'FILE_REQUESTED';\nexport const FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nexport const DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_action_types.js","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport SEO from 'components/SEO';\n\nclass AboutPage extends React.Component {\n render () {\n return (\n
\n \n \n
\n
\n
\n

Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.

\n

TWITTER

\n

GITHUB

\n

DISCORD CHANNEL

\n

DOCUMENTATION

\n
\n
\n
\n

Spee.ch is a media-hosting site that reads from and publishes content to the LBRY blockchain.

\n

Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the LBRY network. This means that your images are stored in multiple locations without a single point of failure.

\n

Contribute

\n

If you have an idea for your own spee.ch-like site on top of LBRY, fork our github repo and go to town!

\n

If you want to improve spee.ch, join our discord channel or solve one of our github issues.

\n
\n
\n
\n
\n );\n }\n};\n\nexport default AboutPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/AboutPage/index.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nfunction Logo () {\n return (\n \n \n Logo\n Spee.ch logo\n \n \n \n Spee<h\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default Logo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/Logo/index.jsx","import React from 'react';\n\nfunction NavBarChannelDropdown ({ channelName, handleSelection, defaultSelection, VIEW, LOGOUT }) {\n return (\n \n );\n};\n\nexport default NavBarChannelDropdown;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/NavBarChannelOptionsDropdown/index.jsx","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/index.js","import React from 'react';\n\nconst ActiveStatusBar = () => {\n return | ;\n};\n\nexport default ActiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ActiveStatusBar/index.jsx","import React from 'react';\n\nconst InactiveStatusBar = () => {\n return | ;\n};\n\nexport default InactiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/InactiveStatusBar/index.jsx","import { connect } from 'react-redux';\nimport { onHandleShowPageUri } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n return {\n error : show.request.error,\n requestType: show.request.type,\n };\n};\n\nconst mapDispatchToProps = {\n onHandleShowPageUri,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/index.js","export const selectAsset = (show) => {\n const request = show.requestList[show.request.id];\n const assetKey = request.key;\n return show.assetList[assetKey];\n};\n\nexport const selectShowState = (state) => {\n return state.show;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/show.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/index.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n const { claimData: { title } } = selectAsset(show);\n return {\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/index.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select request\n const previousRequest = show.requestList[requestId] || null;\n // select channel\n let channel;\n if (previousRequest) {\n const channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/index.js","import { connect } from 'react-redux';\nimport { onUpdateChannelClaims } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select channel key\n const request = show.requestList[show.request.id];\n const channelKey = request.key;\n // select channel claims\n const channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey,\n channel,\n };\n};\n\nconst mapDispatchToProps = {\n onUpdateChannelClaims,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({site: {defaults: { defaultThumbnail }}}) => {\n return {\n defaultThumbnail,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site: { host, title } }) => {\n return {\n host,\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/index.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass ExpandingTextarea extends Component {\n constructor (props) {\n super(props);\n this._handleChange = this._handleChange.bind(this);\n }\n componentDidMount () {\n this.adjustTextarea({});\n }\n _handleChange (event) {\n const { onChange } = this.props;\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n adjustTextarea ({ target = this.el }) {\n target.style.height = 0;\n target.style.height = `${target.scrollHeight}px`;\n }\n render () {\n const { ...rest } = this.props;\n return (\n this.el = x}\n onChange={this._handleChange}\n />\n );\n }\n}\n\nExpandingTextarea.propTypes = {\n onChange: PropTypes.func,\n};\n\nexport default ExpandingTextarea;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ExpandingTextArea/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass PublishPreview extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n imgSource : '',\n defaultThumbnail: '/assets/img/video_thumb_default.png',\n };\n }\n componentDidMount () {\n this.setPreviewImageSource(this.props.file);\n }\n componentWillReceiveProps (newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n }\n setPreviewImageSourceFromFile (file) {\n const previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = () => {\n this.setState({imgSource: previewReader.result});\n };\n }\n setPreviewImageSource (file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n render () {\n return (\n \n );\n }\n};\n\nPublishPreview.propTypes = {\n dimPreview: PropTypes.bool.isRequired,\n file : PropTypes.object.isRequired,\n thumbnail : PropTypes.object,\n};\n\nexport default PublishPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishPreview/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction UrlMiddle ({publishInChannel, selectedChannel, loggedInChannelName, loggedInChannelShortId}) {\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return {loggedInChannelName}:{loggedInChannelShortId} /;\n }\n return @channelSelect a channel below /;\n }\n return (\n xyzThis will be a random id /\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel : PropTypes.bool.isRequired,\n loggedInChannelName : PropTypes.string,\n loggedInChannelShortId: PropTypes.string,\n};\n\nexport default UrlMiddle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishUrlMiddleDisplay/index.jsx","import {connect} from 'react-redux';\nimport {setPublishInChannel, updateSelectedChannel, updateError} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, publish }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n publishInChannel : publish.publishInChannel,\n selectedChannel : publish.selectedChannel,\n channelError : publish.error.channel,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onPublishInChannelChange: (value) => {\n dispatch(updateError('channel', null));\n dispatch(setPublishInChannel(value));\n },\n onChannelSelect: (value) => {\n dispatch(updateError('channel', null));\n dispatch(updateSelectedChannel(value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelSelect/index.js","import {connect} from 'react-redux';\nimport {clearFile, startPublish} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, publish }) => {\n return {\n file: publish.file,\n };\n};\n\nconst mapDispatchToProps = {\n clearFile,\n startPublish,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishDetails/index.js","import {connect} from 'react-redux';\nimport {updateMetadata} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n title: publish.metadata.title,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onMetadataChange: (name, value) => {\n dispatch(updateMetadata(name, value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishTitleInput/index.js","import {updateClaim, updateError} from 'actions/publish';\nimport {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, publish }) => {\n return {\n loggedInChannelName : channel.loggedInChannel.name,\n loggedInChannelShortId: channel.loggedInChannel.shortId,\n fileName : publish.file.name,\n publishInChannel : publish.publishInChannel,\n selectedChannel : publish.selectedChannel,\n claim : publish.claim,\n urlError : publish.error.url,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onClaimChange: (value) => {\n dispatch(updateClaim(value));\n dispatch(updateError('publishSubmit', null));\n },\n onUrlError: (value) => {\n dispatch(updateError('url', value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishUrlInput/index.js","import { connect } from 'react-redux';\nimport { onNewThumbnail } from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish: { file } }) => {\n return {\n file,\n };\n};\n\nconst mapDispatchToProps = {\n onNewThumbnail,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishThumbnailInput/index.js","import {connect} from 'react-redux';\nimport {updateMetadata, toggleMetadataInputs} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n showMetadataInputs: publish.showMetadataInputs,\n description : publish.metadata.description,\n license : publish.metadata.license,\n nsfw : publish.metadata.nsfw,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onMetadataChange: (name, value) => {\n dispatch(updateMetadata(name, value));\n },\n onToggleMetadataInputs: (value) => {\n dispatch(toggleMetadataInputs(value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishMetadataInputs/index.js","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n message: publish.disabledMessage,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishDisabledMessage/index.js","import {connect} from 'react-redux';\nimport {clearFile} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n status : publish.status.status,\n message: publish.status.message,\n };\n};\n\nconst mapDispatchToProps = {\n clearFile,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishStatus/index.js","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n disabled: publish.disabled,\n file : publish.file,\n status : publish.status.status,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishTool/index.js","module.exports = require(\"react-helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-helmet\"\n// module id = 48\n// module chunks = 0","module.exports = require(\"redux-saga/effects\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga/effects\"\n// module id = 49\n// module chunks = 0","const Path = require('path');\nconst { getSubDirectoryNames } = require('build/getFolderNames.js');\n\nconst thisFolder = Path.resolve(__dirname, 'client/components/');\nlet modules = {};\n\ngetSubDirectoryNames(thisFolder)\n .forEach((name) => {\n modules[name] = require(`./${name}`).default;\n });\n\nmodule.exports = modules;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/index.js","module.exports = require(\"path\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"path\"\n// module id = 51\n// module chunks = 0","const Path = require('path');\nconst { getSubDirectoryNames } = require('build/getFolderNames.js');\nconst thisFolder = Path.resolve(__dirname, 'client/containers/');\n\nlet modules = {};\n\ngetSubDirectoryNames(thisFolder)\n .forEach((name) => {\n modules[name] = require(`./${name}`).default;\n });\n\nmodule.exports = modules;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/index.js","const Path = require('path');\nconst { getSubDirectoryNames } = require('build/getFolderNames.js');\nconst thisFolder = Path.resolve(__dirname, 'client/pages/');\n\nlet modules = {};\n\ngetSubDirectoryNames(thisFolder)\n .forEach((name) => {\n modules[name] = require(`./${name}`).default;\n });\n\nmodule.exports = modules;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport PublishTool from 'containers/PublishTool';\n\nclass HomePage extends React.Component {\n render () {\n return (\n
\n \n \n
\n \n
\n
\n );\n }\n};\n\nexport default HomePage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/HomePage/index.jsx","const axios = require('axios');\nconst logger = require('winston');\nconst { api: { apiHost, apiPort } } = require('../../config/lbryConfig.js');\nconst lbryApiUri = 'http://' + apiHost + ':' + apiPort;\nconst { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('./googleAnalytics.js');\n\nconst handleLbrynetResponse = ({ data }, resolve, reject) => {\n logger.debug('lbry api data:', data);\n if (data.result) {\n // check for an error\n if (data.result.error) {\n logger.debug('Lbrynet api error:', data.result.error);\n reject(new Error(data.result.error));\n return;\n };\n resolve(data.result);\n return;\n }\n // fallback in case it just timed out\n reject(JSON.stringify(data));\n};\n\nmodule.exports = {\n publishClaim (publishParams) {\n logger.debug(`lbryApi >> Publishing claim to \"${publishParams.name}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'publish',\n params: publishParams,\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaim (uri) {\n logger.debug(`lbryApi >> Getting Claim for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'get',\n params: { uri, timeout: 20 },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimList (claimName) {\n logger.debug(`lbryApi >> Getting claim_list for \"${claimName}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'claim_list',\n params: { name: claimName },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n resolveUri (uri) {\n logger.debug(`lbryApi >> Resolving URI for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'resolve',\n params: { uri },\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now());\n if (data.result[uri].error) { // check for errors\n reject(data.result[uri].error);\n } else { // if no errors, resolve\n resolve(data.result[uri]);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getDownloadDirectory () {\n logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'settings_get',\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now());\n if (data.result) {\n resolve(data.result.download_directory);\n } else {\n return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.');\n }\n })\n .catch(error => {\n logger.error('Lbrynet Error:', error);\n resolve('/home/lbry/Downloads/');\n });\n });\n },\n createChannel (name) {\n logger.debug(`lbryApi >> Creating channel for ${name}...`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'channel_new',\n params: {\n channel_name: name,\n amount : 0.1,\n },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryApi.js","const logger = require('winston');\nconst ua = require('universal-analytics');\nconst { analytics : { googleId }, details: { title } } = require('../../config/siteConfig.js');\n\nfunction createServeEventParams (headers, ip, originalUrl) {\n return {\n eventCategory : 'client requests',\n eventAction : 'serve request',\n eventLabel : originalUrl,\n ipOverride : ip,\n userAgentOverride: headers['user-agent'],\n };\n};\n\nfunction createPublishTimingEventParams (category, variable, label, startTime, endTime) {\n const duration = endTime - startTime;\n return {\n userTimingCategory : category,\n userTimingVariableName: variable,\n userTimingTime : duration,\n userTimingLabel : label,\n };\n};\n\nfunction sendGoogleAnalyticsEvent (ip, params) {\n const visitorId = ip.replace(/\\./g, '-');\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.event(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n });\n};\n\nfunction sendGoogleAnalyticsTiming (visitorId, params) {\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.timing(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n logger.debug(`Timing event successfully sent to google analytics`);\n });\n};\n\nmodule.exports = {\n sendGAServeEvent (headers, ip, originalUrl) {\n const params = createServeEventParams(headers, ip, originalUrl);\n sendGoogleAnalyticsEvent(ip, params);\n },\n sendGATimingEvent (category, variable, label, startTime, endTime) {\n const params = createPublishTimingEventParams(category, variable, label, startTime, endTime);\n sendGoogleAnalyticsTiming(title, params);\n },\n chooseGaLbrynetPublishLabel ({ channel_name: channelName, channel_id: channelId }) {\n return (channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM');\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/googleAnalytics.js","module.exports = require(\"redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux\"\n// module id = 57\n// module chunks = 0","const { componentsConfig } = require('../../config/siteConfig.js');\n\nfunction getDeepestChildValue (parent, childrenKeys) {\n let childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array\n let child = parent[childKey];\n if (childrenKeys.length >= 1) {\n return getDeepestChildValue(child, childrenKeys);\n }\n return child;\n}\n\nexport const dynamicImport = (filePath) => {\n // validate inputs\n if (!filePath) {\n throw new Error('no file path provided to dynamicImport()');\n }\n if (typeof filePath !== 'string') {\n console.log('dynamicImport > filePath:', filePath);\n console.log('dynamicImport > filePath type:', typeof filePath);\n throw new Error('file path provided to dynamicImport() must be a string');\n }\n if (!componentsConfig) {\n console.log('no componentsConfig found in siteConfig.js');\n return require(`${filePath}`);\n }\n // split out the file folders // filter out any empty or white-space-only strings\n const folders = filePath.split('/').filter(folderName => folderName.replace(/\\s/g, '').length);\n // check for the component corresponding to file path in the site config object\n // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]]\n const customComponent = getDeepestChildValue(componentsConfig, folders);\n if (customComponent) {\n return customComponent; // return custom component\n } else {\n return require(`${filePath}`);\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/dynamicImport.js","const createBasicCanonicalLink = (page, siteHost) => {\n return `${siteHost}/${page}`;\n};\n\nconst createAssetCanonicalLink = (asset, siteHost) => {\n let channelName, certificateId, name, claimId;\n if (asset.claimData) {\n ({ channelName, certificateId, name, claimId } = asset.claimData);\n };\n if (channelName) {\n return `${siteHost}/${channelName}:${certificateId}/${name}`;\n };\n return `${siteHost}/${claimId}/${name}`;\n};\n\nconst createChannelCanonicalLink = (channel, siteHost) => {\n const { name, longId } = channel;\n return `${siteHost}/${name}:${longId}`;\n};\n\nexport const createCanonicalLink = (asset, channel, page, siteHost) => {\n if (asset) {\n return createAssetCanonicalLink(asset, siteHost);\n }\n if (channel) {\n return createChannelCanonicalLink(channel, siteHost);\n }\n return createBasicCanonicalLink(page, siteHost);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/canonicalLink.js","module.exports = {\n validateFile (file) {\n if (!file) {\n throw new Error('no file provided');\n }\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate size and type\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n throw new Error('Sorry, GIFs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/file.js","module.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(identifier)\n .map(match => match || null);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your URL. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('Check your URL. No channel name after \"@\".');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in channel name: \"${nameBadChars.join(', ')}\".`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`Check your URL. No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`Check your URL. The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId: channelClaimId || null,\n claimId : claimId || null,\n };\n },\n parseClaim: function (name) {\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first extension)\n '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end)\n );\n const [proto, claimName, extensionSeperator, extension] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(name)\n .map(match => match || null);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('Check your URL. No claim name provided before \".\"');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in claim name: \"${nameBadChars.join(', ')}\".`);\n }\n // Validate and process extension\n if (extensionSeperator) {\n if (!extension) {\n throw new Error(`Check your URL. No file extension provided after separator \"${extensionSeperator}\".`);\n }\n if (extensionSeperator !== '.') {\n throw new Error(`Check your URL. The \"${extensionSeperator}\" separator is not supported in the claim name.`);\n }\n }\n return {\n claimName,\n extension: extension || null,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/lbryUri.js","const determineOgThumbnailContentType = (thumbnail) => {\n if (thumbnail) {\n const fileExt = thumbnail.substring(thumbnail.lastIndexOf('.'));\n switch (fileExt) {\n case 'jpeg':\n case 'jpg':\n return 'image/jpeg';\n case 'png':\n return 'image/png';\n case 'gif':\n return 'image/gif';\n case 'mp4':\n return 'video/mp4';\n default:\n return 'image/jpeg';\n }\n }\n return '';\n};\n\nconst createBasicMetaTags = (siteHost, siteDescription, siteTitle, siteTwitter) => {\n return [\n {property: 'og:title', content: siteTitle},\n {property: 'og:url', content: siteHost},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: siteDescription},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createChannelMetaTags = (siteTitle, siteHost, siteTwitter, channel) => {\n const { name, longId } = channel;\n return [\n {property: 'og:title', content: `${name} on ${siteTitle}`},\n {property: 'og:url', content: `${siteHost}/${name}:${longId}`},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: `${name}, a channel on ${siteTitle}`},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createAssetMetaTags = (siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) => {\n const { claimData } = asset;\n const { contentType } = claimData;\n const embedUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const showUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const source = `${siteHost}/${claimData.claimId}/${claimData.name}.${claimData.fileExt}`;\n const ogTitle = claimData.title || claimData.name;\n const ogDescription = claimData.description || defaultDescription;\n const ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);\n const ogThumbnail = claimData.thumbnail || defaultThumbnail;\n const metaTags = [\n {property: 'og:title', content: ogTitle},\n {property: 'og:url', content: showUrl},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: ogDescription},\n {property: 'og:image:width', content: 600},\n {property: 'og:image:height', content: 315},\n {property: 'twitter:site', content: siteTwitter},\n ];\n if (contentType === 'video/mp4' || contentType === 'video/webm') {\n metaTags.push({property: 'og:video', content: source});\n metaTags.push({property: 'og:video:secure_url', content: source});\n metaTags.push({property: 'og:video:type', content: contentType});\n metaTags.push({property: 'og:image', content: ogThumbnail});\n metaTags.push({property: 'og:image:type', content: ogThumbnailContentType});\n metaTags.push({property: 'og:type', content: 'video'});\n metaTags.push({property: 'twitter:card', content: 'player'});\n metaTags.push({property: 'twitter:player', content: embedUrl});\n metaTags.push({property: 'twitter:player:width', content: 600});\n metaTags.push({property: 'twitter:text:player_width', content: 600});\n metaTags.push({property: 'twitter:player:height', content: 337});\n metaTags.push({property: 'twitter:player:stream', content: source});\n metaTags.push({property: 'twitter:player:stream:content_type', content: contentType});\n } else {\n metaTags.push({property: 'og:image', content: source});\n metaTags.push({property: 'og:image:type', content: contentType});\n metaTags.push({property: 'og:type', content: 'article'});\n metaTags.push({property: 'twitter:card', content: 'summary_large_image'});\n }\n return metaTags;\n};\n\nexport const createMetaTags = (siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) => {\n if (asset) {\n return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail);\n };\n if (channel) {\n return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel);\n };\n return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/metaTags.js","export const createPageTitle = (siteTitle, pageTitle) => {\n if (!pageTitle) {\n return `${siteTitle}`;\n }\n return `${siteTitle} - ${pageTitle}`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/pageTitle.js","import * as actions from 'constants/channel_action_types';\n\n// export action creators\n\nexport function updateLoggedInChannel (name, shortId, longId) {\n return {\n type: actions.CHANNEL_UPDATE,\n data: {\n name,\n shortId,\n longId,\n },\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/channel.js","import React from 'react';\nimport { NavLink, withRouter } from 'react-router-dom';\nimport Logo from 'components/Logo';\nimport NavBarChannelDropdown from 'components/NavBarChannelOptionsDropdown';\nimport request from 'utils/request';\n\nconst VIEW = 'VIEW';\nconst LOGOUT = 'LOGOUT';\n\nclass NavBar extends React.Component {\n constructor (props) {\n super(props);\n this.checkForLoggedInUser = this.checkForLoggedInUser.bind(this);\n this.logoutUser = this.logoutUser.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n componentDidMount () {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n checkForLoggedInUser () {\n const params = {credentials: 'include'};\n request('/user', params)\n .then(({ data }) => {\n this.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n })\n .catch(error => {\n console.log('/user error:', error.message);\n });\n }\n logoutUser () {\n const params = {credentials: 'include'};\n request('/logout', params)\n .then(() => {\n this.props.onChannelLogout();\n })\n .catch(error => {\n console.log('/logout error', error.message);\n });\n }\n handleSelection (event) {\n const value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push(`/${this.props.channelName}:${this.props.channelLongId}`);\n break;\n default:\n break;\n }\n }\n render () {\n const { siteDescription } = this.props;\n return (\n
\n
\n \n
\n {siteDescription}\n
\n
\n Publish\n About\n { this.props.channelName ? (\n \n ) : (\n Channel\n )}\n
\n
\n
\n );\n }\n}\n\nexport default withRouter(NavBar);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/view.jsx","import React from 'react';\nimport Helmet from 'react-helmet';\nimport PropTypes from 'prop-types';\n\nimport { createPageTitle } from 'utils/pageTitle';\nimport { createMetaTags } from 'utils/metaTags';\nimport { createCanonicalLink } from 'utils/canonicalLink';\n\nclass SEO extends React.Component {\n render () {\n // props from state\n const { defaultDescription, defaultThumbnail, siteDescription, siteHost, siteTitle, siteTwitter } = this.props;\n // props from parent\n const { asset, channel, pageUri } = this.props;\n let { pageTitle } = this.props;\n // create page title, tags, and canonical link\n pageTitle = createPageTitle(siteTitle, pageTitle);\n const metaTags = createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n const canonicalLink = createCanonicalLink(asset, channel, pageUri, siteHost);\n // render results\n return (\n \n );\n }\n};\n\nSEO.propTypes = {\n pageTitle: PropTypes.string,\n pageUri : PropTypes.string,\n channel : PropTypes.object,\n asset : PropTypes.object,\n};\n\nexport default SEO;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/view.jsx","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ChannelLoginForm from 'containers/ChannelLoginForm';\nimport ChannelCreateForm from 'containers/ChannelCreateForm';\n\nclass LoginPage extends React.Component {\n componentWillReceiveProps (newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push(`/`);\n }\n }\n render () {\n return (\n
\n \n \n
\n
\n
\n

Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you're documenting important events, or making a public repository for cat gifs (password: '1234'), try creating a channel for it!

\n
\n
\n
\n

Log in to an existing channel:

\n \n

Create a brand new channel:

\n \n
\n
\n
\n
\n );\n }\n};\n\nexport default withRouter(LoginPage);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/view.jsx","import React from 'react';\nimport request from 'utils/request';\n\nclass ChannelLoginForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n name : '',\n password: '',\n };\n this.handleInput = this.handleInput.bind(this);\n this.loginToChannel = this.loginToChannel.bind(this);\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n loginToChannel (event) {\n event.preventDefault();\n const params = {\n method : 'POST',\n body : JSON.stringify({username: this.state.name, password: this.state.password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n request('login', params)\n .then(({success, channelName, shortChannelId, channelClaimId, message}) => {\n if (success) {\n this.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n this.setState({'error': message});\n };\n })\n .catch(error => {\n if (error.message) {\n this.setState({'error': error.message});\n } else {\n this.setState({'error': error});\n }\n });\n }\n render () {\n return (\n
\n
\n
\n \n
\n
\n @\n \n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n { this.state.error ? (\n

{this.state.error}

\n ) : (\n

Enter the name and password for your channel

\n )}\n
\n \n
\n
\n );\n }\n}\n\nexport default ChannelLoginForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport request from 'utils/request';\n\nclass ChannelCreateForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n channel : '',\n password: '',\n status : null,\n };\n this.handleChannelInput = this.handleChannelInput.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.createChannel = this.createChannel.bind(this);\n }\n cleanseChannelInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n handleChannelInput (event) {\n let value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({channel: value});\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({error: 'Please enter a channel name'});\n }\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n updateIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n request(`/api/channel/availability/${channelWithAtSymbol}`)\n .then(() => {\n this.setState({'error': null});\n })\n .catch((error) => {\n this.setState({'error': error.message});\n });\n }\n checkIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n return request(`/api/channel/availability/${channelWithAtSymbol}`);\n }\n checkIsPasswordProvided (password) {\n return new Promise((resolve, reject) => {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n makePublishChannelRequest (username, password) {\n const params = {\n method : 'POST',\n body : JSON.stringify({username, password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n return new Promise((resolve, reject) => {\n request('/signup', params)\n .then(result => {\n return resolve(result);\n })\n .catch(error => {\n reject(new Error(`Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ${error.message}`));\n });\n });\n }\n createChannel (event) {\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password)\n .then(() => {\n return this.checkIsChannelAvailable(this.state.channel);\n })\n .then(() => {\n this.setState({status: 'We are publishing your new channel. Sit tight...'});\n return this.makePublishChannelRequest(this.state.channel, this.state.password);\n })\n .then(result => {\n this.setState({status: null});\n this.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n })\n .catch((error) => {\n if (error.message) {\n this.setState({'error': error.message, status: null});\n } else {\n this.setState({'error': error, status: null});\n };\n });\n }\n render () {\n return (\n
\n { !this.state.status ? (\n
\n
\n
\n \n
\n
\n @\n \n { (this.state.channel && !this.state.error) && {'\\u2713'} }\n { this.state.error && {'\\u2716'} }\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n {this.state.error ? (\n

{this.state.error}

\n ) : (\n

Choose a name and password for your channel

\n )}\n
\n \n
\n
\n ) : (\n
\n

{this.state.status}

\n \n
\n )}\n
\n );\n }\n}\n\nexport default ChannelCreateForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/view.jsx","import React from 'react';\nimport ErrorPage from 'pages/ErrorPage';\nimport ShowAssetLite from 'containers/ShowAssetLite';\nimport ShowAssetDetails from 'containers/ShowAssetDetails';\nimport ShowChannel from 'containers/ShowChannel';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\nclass ShowPage extends React.Component {\n componentDidMount () {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n componentWillReceiveProps (nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n render () {\n const { error, requestType } = this.props;\n if (error) {\n return (\n \n );\n }\n switch (requestType) {\n case CHANNEL:\n return ;\n case ASSET_LITE:\n return ;\n case ASSET_DETAILS:\n return ;\n default:\n return

loading...

;\n }\n }\n};\n\nexport default ShowPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/view.jsx","import React from 'react';\nimport SEO from 'components/SEO';\nimport { Link } from 'react-router-dom';\nimport AssetDisplay from 'containers/AssetDisplay';\n\nclass ShowLite extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { name, claimId } = asset.claimData;\n return (\n
\n \n \n hosted\n via Spee.ch\n
\n );\n }\n return (\n
\n

loading asset data...

\n
\n );\n }\n};\n\nexport default ShowLite;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport { LOCAL_CHECK, UNAVAILABLE, ERROR, AVAILABLE } from 'constants/asset_display_states';\n\nclass AssetDisplay extends React.Component {\n componentDidMount () {\n const { asset: { claimData: { name, claimId } } } = this.props;\n this.props.onFileRequest(name, claimId);\n }\n render () {\n const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props;\n return (\n
\n {(status === LOCAL_CHECK) &&\n
\n

Checking to see if Spee.ch has your asset locally...

\n
\n }\n {(status === UNAVAILABLE) &&\n
\n

Sit tight, we're searching the LBRY blockchain for your asset!

\n \n

Curious what magic is happening here? Learn more.

\n
\n }\n {(status === ERROR) &&\n
\n

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the LBRY discord.

\n

{error}

\n
\n }\n {(status === AVAILABLE) &&\n (() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return (\n \n );\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

Unsupported file type

\n );\n }\n })()\n }\n
\n );\n }\n};\n\nexport default AssetDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/view.jsx","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ErrorPage from 'pages/ErrorPage';\nimport AssetTitle from 'containers/AssetTitle';\nimport AssetDisplay from 'containers/AssetDisplay';\nimport AssetInfo from 'containers/AssetInfo';\n\nclass ShowAssetDetails extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { claimData: { name } } = asset;\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowAssetDetails;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/view.jsx","import React from 'react';\n\nconst AssetTitle = ({ title }) => {\n return (\n
\n {title}\n
\n );\n};\n\nexport default AssetTitle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/view.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nclass AssetInfo extends React.Component {\n constructor (props) {\n super(props);\n this.copyToClipboard = this.copyToClipboard.bind(this);\n }\n copyToClipboard (event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({error: 'Oops, unable to copy'});\n }\n }\n render () {\n const { asset: { shortId, claimData : { channelName, certificateId, description, name, claimId, fileExt, contentType, thumbnail, host } } } = this.props;\n return (\n
\n {channelName &&\n
\n
\n Channel:\n
\n
\n {channelName}\n
\n
\n }\n\n {description &&\n
\n {description}\n
\n }\n\n
\n
\n
\n Share:\n
\n
\n \n twitter\n facebook\n tumblr\n reddit\n
\n
\n
\n
\n\n
\n \n );\n }\n};\n\nexport default AssetInfo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/view.jsx","import React from 'react';\nimport SEO from 'components/SEO';\nimport ErrorPage from 'pages/ErrorPage';\nimport NavBar from 'containers/NavBar';\nimport ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay';\n\nclass ShowChannel extends React.Component {\n render () {\n const { channel } = this.props;\n if (channel) {\n const { name, longId, shortId } = channel;\n return (\n
\n \n \n
\n
\n

channel name: {name}

\n

full channel id: {longId}

\n

short channel id: {shortId}

\n
\n
\n \n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowChannel;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/view.jsx","import React from 'react';\nimport AssetPreview from 'components/AssetPreview';\n\nclass ChannelClaimsDisplay extends React.Component {\n constructor (props) {\n super(props);\n this.showNextResultsPage = this.showNextResultsPage.bind(this);\n this.showPreviousResultsPage = this.showPreviousResultsPage.bind(this);\n }\n showPreviousResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n showNextResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n showNewPage (page) {\n const { channelKey, channel: { name, longId } } = this.props;\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n render () {\n const { channel: { claimsData: { claims, currentPage, totalPages } } } = this.props;\n return (\n
\n {(claims.length > 0) ? (\n
\n {claims.map((claim, index) => )}\n
\n {(currentPage > 1) &&\n \n }\n {(currentPage < totalPages) &&\n \n }\n
\n
\n ) : (\n

There are no claims in this channel

\n )}\n
\n );\n }\n};\n\nexport default ChannelClaimsDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/view.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nconst AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail } }) => {\n const directSourceLink = `${claimId}/${name}.${fileExt}`;\n const showUrlLink = `/${claimId}/${name}`;\n return (\n
\n \n {(() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

unsupported file type

\n );\n }\n })()}\n \n
\n );\n};\n\nexport default AssetPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/view.jsx","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport Helmet from 'react-helmet';\n\nclass FourOhForPage extends React.Component {\n render () {\n const {title, host} = this.props;\n return (\n
\n \n {title} - 404\n \n \n \n
\n

404

\n

That page does not exist

\n
\n
\n );\n }\n};\n\nexport default FourOhForPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/view.jsx","const { lstatSync, readdirSync } = require('fs');\nconst { join } = require('path');\n\nexport const getSubDirectoryNames = (root) => {\n return readdirSync(root)\n .filter(name => {\n let fullPath = join(root, name);\n return lstatSync(fullPath).isDirectory();\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./build/getFolderNames.js","import React from 'react';\nimport ChannelLoginForm from 'containers/ChannelLoginForm';\nimport ChannelCreateForm from 'containers/ChannelCreateForm';\nimport * as states from 'constants/publish_channel_select_states';\n\nclass ChannelSelect extends React.Component {\n constructor (props) {\n super(props);\n this.toggleAnonymousPublish = this.toggleAnonymousPublish.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n toggleAnonymousPublish (event) {\n const value = event.target.value;\n if (value === 'anonymous') {\n this.props.onPublishInChannelChange(false);\n } else {\n this.props.onPublishInChannelChange(true);\n }\n }\n handleSelection (event) {\n const selectedOption = event.target.selectedOptions[0].value;\n this.props.onChannelSelect(selectedOption);\n }\n render () {\n return (\n
\n
\n
\n \n \n
\n
\n \n \n
\n { this.props.channelError ? (\n

{this.props.channelError}

\n ) : (\n

Publish anonymously or in a channel

\n )}\n
\n { this.props.publishInChannel && (\n
\n
\n \n
\n \n
\n { (this.props.selectedChannel === states.LOGIN) && }\n { (this.props.selectedChannel === states.CREATE) && }\n
\n )}\n
\n );\n }\n}\n\nexport default ChannelSelect;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelSelect/view.jsx","import React from 'react';\nimport { validateFile } from 'utils/file';\nimport PublishPreview from 'components/PublishPreview';\n\nclass Dropzone extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n dragOver : false,\n mouseOver : false,\n dimPreview: false,\n };\n this.handleDrop = this.handleDrop.bind(this);\n this.handleDragOver = this.handleDragOver.bind(this);\n this.handleDragEnd = this.handleDragEnd.bind(this);\n this.handleDragEnter = this.handleDragEnter.bind(this);\n this.handleDragLeave = this.handleDragLeave.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n this.handleClick = this.handleClick.bind(this);\n this.handleFileInput = this.handleFileInput.bind(this);\n this.chooseFile = this.chooseFile.bind(this);\n }\n handleDrop (event) {\n event.preventDefault();\n this.setState({dragOver: false});\n // if dropped items aren't files, reject them\n const dt = event.dataTransfer;\n if (dt.items) {\n if (dt.items[0].kind === 'file') {\n const droppedFile = dt.items[0].getAsFile();\n this.chooseFile(droppedFile);\n }\n }\n }\n handleDragOver (event) {\n event.preventDefault();\n }\n handleDragEnd (event) {\n var dt = event.dataTransfer;\n if (dt.items) {\n for (var i = 0; i < dt.items.length; i++) {\n dt.items.remove(i);\n }\n } else {\n event.dataTransfer.clearData();\n }\n }\n handleDragEnter () {\n this.setState({dragOver: true, dimPreview: true});\n }\n handleDragLeave () {\n this.setState({dragOver: false, dimPreview: false});\n }\n handleMouseEnter () {\n this.setState({mouseOver: true, dimPreview: true});\n }\n handleMouseLeave () {\n this.setState({mouseOver: false, dimPreview: false});\n }\n handleClick (event) {\n event.preventDefault();\n document.getElementById('file_input').click();\n }\n handleFileInput (event) {\n event.preventDefault();\n const fileList = event.target.files;\n this.chooseFile(fileList[0]);\n }\n chooseFile (file) {\n if (file) {\n try {\n validateFile(file); // validate the file's name, type, and size\n } catch (error) {\n return this.props.setFileError(error.message);\n }\n // stage it so it will be ready when the publish button is clicked\n this.props.selectFile(file);\n }\n }\n render () {\n return (\n
\n
\n \n
\n
\n {this.props.file ? (\n
\n \n
\n { this.state.dragOver ? (\n
\n

Drop it.

\n
\n ) : (\n null\n )}\n { this.state.mouseOver ? (\n
\n

{this.props.fileError}

\n

Drag & drop image or video here to publish

\n

OR

\n

CHOOSE FILE

\n
\n ) : (\n null\n )}\n
\n
\n ) : (\n
\n { this.state.dragOver ? (\n
\n

Drop it.

\n
\n ) : (\n
\n

{this.props.fileError}

\n

Drag & drop image or video here to publish

\n

OR

\n

CHOOSE FILE

\n
\n )}\n
\n )}\n
\n
\n );\n }\n};\n\nexport default Dropzone;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/Dropzone/view.jsx","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport Dropzone from 'containers/Dropzone';\nimport PublishTitleInput from 'containers/PublishTitleInput';\nimport PublishUrlInput from 'containers/PublishUrlInput';\nimport PublishThumbnailInput from 'containers/PublishThumbnailInput';\nimport PublishMetadataInputs from 'containers/PublishMetadataInputs';\nimport ChannelSelect from 'containers/ChannelSelect';\n\nclass PublishDetails extends React.Component {\n constructor (props) {\n super(props)\n this.onPublishSubmit = this.onPublishSubmit.bind(this);\n }\n onPublishSubmit () {\n this.props.startPublish(this.props.history);\n }\n render () {\n return (\n
\n
\n \n
\n {/* left column */}\n
\n
\n \n
\n
\n {/* right column */}\n
\n
\n
\n \n
\n
\n \n
\n { (this.props.file.type === 'video/mp4') && (\n
\n \n
\n )}\n
\n \n
\n
\n \n
\n
\n \n
\n
\n

By clicking 'Publish', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. Read more.

\n
\n
\n
\n
\n );\n }\n};\n\nexport default withRouter(PublishDetails);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishDetails/view.jsx","import React from 'react';\n\nclass PublishTitleInput extends React.Component {\n constructor (props) {\n super(props);\n this.handleInput = this.handleInput.bind(this);\n }\n handleInput (e) {\n const name = e.target.name;\n const value = e.target.value;\n this.props.onMetadataChange(name, value);\n }\n render () {\n return (\n \n );\n }\n}\n\nexport default PublishTitleInput;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishTitleInput/view.jsx","import React from 'react';\nimport request from 'utils/request';\nimport UrlMiddle from 'components/PublishUrlMiddleDisplay';\n\nclass PublishUrlInput extends React.Component {\n constructor (props) {\n super(props);\n this.handleInput = this.handleInput.bind(this);\n }\n componentDidMount () {\n const { claim, fileName } = this.props;\n if (!claim) {\n this.setClaimName(fileName);\n }\n }\n componentWillReceiveProps ({ claim, fileName }) {\n // if a new file was chosen, update the claim name\n if (fileName !== this.props.fileName) {\n return this.setClaimName(fileName);\n }\n // if the claim has updated, check its availability\n if (claim !== this.props.claim) {\n this.validateClaim(claim);\n }\n }\n handleInput (event) {\n let value = event.target.value;\n value = this.cleanseInput(value);\n // update the state\n this.props.onClaimChange(value);\n }\n cleanseInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n setClaimName (fileName) {\n const fileNameWithoutEnding = fileName.substring(0, fileName.lastIndexOf('.'));\n const cleanClaimName = this.cleanseInput(fileNameWithoutEnding);\n this.props.onClaimChange(cleanClaimName);\n }\n validateClaim (claim) {\n if (!claim) {\n return this.props.onUrlError('Enter a url above');\n }\n request(`/api/claim/availability/${claim}`)\n .then(() => {\n this.props.onUrlError(null);\n })\n .catch((error) => {\n this.props.onUrlError(error.message);\n });\n }\n render () {\n const { claim, loggedInChannelName, loggedInChannelShortId, publishInChannel, selectedChannel, urlError } = this.props;\n return (\n
\n
\n spee.ch / \n \n \n { (claim && !urlError) && {'\\u2713'} }\n { urlError && {'\\u2716'} }\n
\n
\n { urlError ? (\n

{urlError}

\n ) : (\n

Choose a custom url

\n )}\n
\n
\n );\n }\n}\n\nexport default PublishUrlInput;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishUrlInput/view.jsx","import React from 'react';\n\nfunction dataURItoBlob(dataURI) {\n // convert base64/URLEncoded data component to raw binary data held in a string\n let byteString = atob(dataURI.split(',')[1]);\n // separate out the mime component\n let mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n // write the bytes of the string to a typed array\n let ia = new Uint8Array(byteString.length);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n return new Blob([ia], {type: mimeString});\n}\n\nclass PublishThumbnailInput extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n videoSource : null,\n error : null,\n sliderMinRange: 1,\n sliderMaxRange: null,\n sliderValue : null,\n };\n this.handleVideoLoadedData = this.handleVideoLoadedData.bind(this);\n this.handleSliderChange = this.handleSliderChange.bind(this);\n this.createThumbnail = this.createThumbnail.bind(this);\n }\n componentDidMount () {\n const { file } = this.props;\n this.setVideoSource(file);\n }\n componentWillReceiveProps (nextProps) {\n // if file changes\n if (nextProps.file && nextProps.file !== this.props.file) {\n const { file } = nextProps;\n this.setVideoSource(file);\n };\n }\n setVideoSource (file) {\n const previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = () => {\n const dataUri = previewReader.result;\n const blob = dataURItoBlob(dataUri);\n const videoSource = URL.createObjectURL(blob);\n this.setState({ videoSource });\n };\n }\n handleVideoLoadedData (event) {\n const duration = event.target.duration;\n const totalMinutes = Math.floor(duration / 60);\n const totalSeconds = Math.floor(duration % 60);\n // set the slider\n this.setState({\n sliderMaxRange: duration * 100,\n sliderValue : duration * 100 / 2,\n totalMinutes,\n totalSeconds,\n });\n // update the current time of the video\n let video = document.getElementById('video-thumb-player');\n video.currentTime = duration / 2;\n }\n handleSliderChange (event) {\n const value = parseInt(event.target.value);\n // update the slider value\n this.setState({\n sliderValue: value,\n });\n // update the current time of the video\n let video = document.getElementById('video-thumb-player');\n video.currentTime = value / 100;\n }\n createThumbnail () {\n // take a snapshot\n let video = document.getElementById('video-thumb-player');\n let canvas = document.createElement('canvas');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);\n const dataUrl = canvas.toDataURL();\n const blob = dataURItoBlob(dataUrl);\n const snapshot = new File([blob], `thumbnail.png`, {\n type: 'image/png',\n });\n // set the thumbnail in redux store\n if (snapshot) {\n this.props.onNewThumbnail(snapshot);\n }\n }\n render () {\n const { error, videoSource, sliderMinRange, sliderMaxRange, sliderValue, totalMinutes, totalSeconds } = this.state;\n return (\n
\n \n \n {\n sliderValue ? (\n
\n
\n 0'00\"\n {totalMinutes}'{totalSeconds}\"\n
\n
\n \n
\n
\n ) : (\n

loading...

\n )\n }\n { error ? (\n

{error}

\n ) : (\n

Use slider to set thumbnail

\n )}\n
\n );\n }\n}\n\nexport default PublishThumbnailInput;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishThumbnailInput/view.jsx","import React from 'react';\nimport ExpandingTextArea from 'components/ExpandingTextArea';\n\nclass PublishMetadataInputs extends React.Component {\n constructor (props) {\n super(props);\n this.toggleShowInputs = this.toggleShowInputs.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.handleSelect = this.handleSelect.bind(this);\n }\n toggleShowInputs () {\n this.props.onToggleMetadataInputs(!this.props.showMetadataInputs);\n }\n handleInput (event) {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.props.onMetadataChange(name, value);\n }\n handleSelect (event) {\n const name = event.target.name;\n const selectedOption = event.target.selectedOptions[0].value;\n this.props.onMetadataChange(name, selectedOption);\n }\n render () {\n return (\n
\n {this.props.showMetadataInputs && (\n
\n
\n
\n \n
\n \n
\n
\n\n
\n
\n \n
\n \n
\n
\n\n
\n
\n \n
\n \n
\n
\n
\n )}\n \n
\n );\n }\n}\n\nexport default PublishMetadataInputs;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishMetadataInputs/view.jsx","import React from 'react';\n\nclass PublishDisabledMessage extends React.Component {\n render () {\n const message = this.props.message;\n console.log('this.props.message:', message);\n return (\n
\n

Publishing is currently disabled.

\n

{message}

\n
\n );\n }\n}\n\nexport default PublishDisabledMessage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishDisabledMessage/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport * as publishStates from 'constants/publish_claim_states';\n\nclass PublishStatus extends React.Component {\n render () {\n const { status, message, clearFile } = this.props;\n return (\n
\n {status === publishStates.LOAD_START &&\n
\n

File is loading to server

\n

0%

\n
\n }\n {status === publishStates.LOADING &&\n
\n
\n

File is loading to server

\n

{message}

\n
\n
\n }\n {status === publishStates.PUBLISHING &&\n
\n

Upload complete. Your file is now being published on the blockchain...

\n \n

Curious what magic is happening here? Learn more.

\n
\n }\n {status === publishStates.SUCCESS &&\n
\n

Your publish is complete! You are being redirected to it now.

\n

If you are not automatically redirected, click here.

\n
\n }\n {status === publishStates.FAILED &&\n
\n

Something went wrong...

\n

{message}

\n

For help, post the above error text in the #speech channel on the lbry discord

\n \n
\n }\n
\n );\n }\n};\n\nexport default PublishStatus;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishStatus/view.jsx","import React from 'react';\nimport Dropzone from 'containers/Dropzone';\nimport PublishDetails from 'containers/PublishDetails';\nimport PublishStatus from 'containers/PublishStatus';\nimport PublishDisabledMessage from 'containers/PublishDisabledMessage';\n\nclass PublishTool extends React.Component {\n render () {\n if (this.props.disabled) {\n console.log('publish is disabled');\n return (\n \n );\n } else {\n console.log('publish is not disabled');\n if (this.props.file) {\n if (this.props.status) {\n return (\n \n );\n } else {\n return ;\n }\n }\n return ;\n }\n }\n};\n\nexport default PublishTool;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishTool/view.jsx","module.exports = require(\"passport\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport\"\n// module id = 91\n// module chunks = 0","function MysqlConfig () {\n this.database = 'default';\n this.username = 'default';\n this.password = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No MySQL config received.');\n }\n const {database, username, password} = config;\n this.database = database;\n this.username = username;\n this.password = password;\n };\n};\n\nmodule.exports = new MysqlConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/mysqlConfig.js","function SlackConfig () {\n this.slackWebHook = 'default';\n this.slackErrorChannel = 'default';\n this.slackInfoChannel = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No slack config received.');\n }\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = config;\n this.slackWebHook = slackWebHook;\n this.slackErrorChannel = slackErrorChannel;\n this.slackInfoChannel = slackInfoChannel;\n };\n};\n\nmodule.exports = new SlackConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/slackConfig.js","module.exports = require(\"passport-local\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport-local\"\n// module id = 94\n// module chunks = 0","module.exports = require(\"sequelize\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"sequelize\"\n// module id = 95\n// module chunks = 0","module.exports = {\n returnShortId: function (claimsArray, longId) {\n let claimIndex;\n let shortId = longId.substring(0, 1); // default short id is the first letter\n let shortIdLength = 0;\n // find the index of this claim id\n claimIndex = claimsArray.findIndex(element => {\n return element.claimId === longId;\n });\n if (claimIndex < 0) {\n throw new Error('claim id not found in claims list');\n }\n // get an array of all claims with lower height\n let possibleMatches = claimsArray.slice(0, claimIndex);\n // remove certificates with the same prefixes until none are left.\n while (possibleMatches.length > 0) {\n shortIdLength += 1;\n shortId = longId.substring(0, shortIdLength);\n possibleMatches = possibleMatches.filter(element => {\n return (element.claimId && (element.claimId.substring(0, shortIdLength) === shortId));\n });\n }\n return shortId;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/sequelizeHelpers.js","const logger = require('winston');\nconst fs = require('fs');\n\nconst { details, publishing } = require('../../config/siteConfig.js');\n\nmodule.exports = {\n parsePublishApiRequestBody ({name, nsfw, license, title, description, thumbnail}) {\n // validate name\n if (!name) {\n throw new Error('no name field found in request');\n }\n const invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name);\n if (invalidNameCharacters) {\n throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and \"-\"');\n }\n // optional parameters\n nsfw = (nsfw === 'true');\n license = license || null;\n title = title || null;\n description = description || null;\n thumbnail = thumbnail || null;\n // return results\n return {\n name,\n nsfw,\n license,\n title,\n description,\n thumbnail,\n };\n },\n parsePublishApiRequestFiles ({file, thumbnail}) {\n // make sure a file was provided\n if (!file) {\n throw new Error('no file with key of [file] found in request');\n }\n if (!file.path) {\n throw new Error('no file path found');\n }\n if (!file.type) {\n throw new Error('no file type found');\n }\n if (!file.size) {\n throw new Error('no file type found');\n }\n // validate the file name\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate the file\n module.exports.validateFileTypeAndSize(file);\n // return results\n return {\n fileName : file.name,\n filePath : file.path,\n fileType : file.type,\n thumbnailFileName: (thumbnail ? thumbnail.name : null),\n thumbnailFilePath: (thumbnail ? thumbnail.path : null),\n thumbnailFileType: (thumbnail ? thumbnail.type : null),\n };\n },\n validateFileTypeAndSize (file) {\n // check file type and size\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n logger.debug('publish > file validation > .jpeg/.jpg/.png was too big');\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .gif was too big');\n throw new Error('Sorry, .gifs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .mp4 was too big');\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n logger.debug('publish > file validation > unrecognized file type');\n throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n return file;\n },\n createBasicPublishParams (filePath, name, title, description, license, nsfw, thumbnail) {\n logger.debug(`Creating Publish Parameters`);\n // provide defaults for title\n if (title === null || title.trim() === '') {\n title = name;\n }\n // provide default for description\n if (description === null || description.trim() === '') {\n description = '';\n }\n // provide default for license\n if (license === null || license.trim() === '') {\n license = ' '; // default to empty string\n }\n // create the publish params\n const publishParams = {\n name,\n file_path: filePath,\n bid : 0.01,\n metadata : {\n description,\n title,\n author : details.title,\n language: 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n };\n // add thumbnail to channel if video\n if (thumbnail) {\n publishParams['metadata']['thumbnail'] = thumbnail;\n }\n return publishParams;\n },\n createThumbnailPublishParams (thumbnailFilePath, claimName, license, nsfw) {\n if (!thumbnailFilePath) {\n return;\n }\n logger.debug(`Creating Thumbnail Publish Parameters`);\n // create the publish params\n return {\n name : `${claimName}-thumb`,\n file_path: thumbnailFilePath,\n bid : 0.01,\n metadata : {\n title : `${claimName} thumbnail`,\n description: `a thumbnail for ${claimName}`,\n author : details.title,\n language : 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n channel_name : publishing.thumbnailChannel,\n channel_id : publishing.thumbnailChannelId,\n };\n },\n deleteTemporaryFile (filePath) {\n fs.unlink(filePath, err => {\n if (err) {\n logger.error(`error deleting temporary file ${filePath}`);\n throw err;\n }\n logger.debug(`successfully deleted ${filePath}`);\n });\n },\n addGetResultsToFileData (fileInfo, getResult) {\n fileInfo.fileName = getResult.file_name;\n fileInfo.filePath = getResult.download_path;\n return fileInfo;\n },\n createFileData ({ name, claimId, outpoint, height, address, nsfw, contentType }) {\n return {\n name,\n claimId,\n outpoint,\n height,\n address,\n fileName: '',\n filePath: '',\n fileType: contentType,\n nsfw,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/publishHelpers.js","module.exports = require(\"fs\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"fs\"\n// module id = 98\n// module chunks = 0","const logger = require('winston');\n\nmodule.exports = {\n handleErrorResponse: function (originalUrl, ip, error, res) {\n logger.error(`Error on ${originalUrl}`, module.exports.useObjectPropertiesIfNoKeys(error));\n const [status, message] = module.exports.returnErrorMessageAndStatus(error);\n res\n .status(status)\n .json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function (error) {\n let status, message;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function (err) {\n if (Object.keys(err).length === 0) {\n let newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach((key) => {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload (status, message) {\n return {\n status,\n success: false,\n message,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/errorHandlers.js","const db = require('../models/index');\nconst logger = require('winston');\nconst { returnPaginatedChannelClaims } = require('../helpers/channelPagination.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\nconst NO_FILE = 'NO_FILE';\n\nmodule.exports = {\n getClaimId (channelName, channelClaimId, name, claimId) {\n if (channelName) {\n return module.exports.getClaimIdByChannel(channelName, channelClaimId, name);\n } else {\n return module.exports.getClaimIdByClaim(name, claimId);\n }\n },\n getClaimIdByClaim (claimName, claimId) {\n logger.debug(`getClaimIdByClaim(${claimName}, ${claimId})`);\n return new Promise((resolve, reject) => {\n db.Claim.getLongClaimId(claimName, claimId)\n .then(longClaimId => {\n if (!longClaimId) {\n resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimIdByChannel (channelName, channelClaimId, claimName) {\n logger.debug(`getClaimIdByChannel(${channelName}, ${channelClaimId}, ${claimName})`);\n return new Promise((resolve, reject) => {\n db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id\n .then(longChannelId => {\n if (!longChannelId) {\n return [null, null];\n }\n return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id\n })\n .then(([longChannelId, longClaimId]) => {\n if (!longChannelId) {\n return resolve(NO_CHANNEL);\n }\n if (!longClaimId) {\n return resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelData (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]);\n })\n .then(([longChannelClaimId, shortChannelClaimId]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. return all the channel information\n resolve({\n channelName,\n longChannelClaimId,\n shortChannelClaimId,\n });\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelClaims (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]);\n })\n .then(([longChannelClaimId, channelClaimsArray]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. format the data for the view, including pagination\n let paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);\n // 4. return all the channel information and contents\n resolve(paginatedChannelViewData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getLocalFileRecord (claimId, name) {\n return db.File.findOne({where: {claimId, name}})\n .then(file => {\n if (!file) {\n return NO_FILE;\n }\n return file.dataValues;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/serveController.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore } from 'redux';\nimport Reducer from 'client/reducers';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from 'client/components/GAListener/';\nimport App from 'client/app';\nimport renderFullPage from './renderFullPage.js';\nimport Helmet from 'react-helmet';\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create a new Redux store instance\n const store = createStore(Reducer);\n\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `` was rendered\n return res.redirect(301, context.url);\n } else {\n // we're good, send the response\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handlePageRender.jsx","module.exports = require(\"react-dom/server\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-dom/server\"\n// module id = 102\n// module chunks = 0","import { combineReducers } from 'redux';\nimport PublishReducer from 'reducers/publish';\nimport ChannelReducer from 'reducers/channel';\nimport ShowReducer from 'reducers/show';\nimport SiteReducer from 'reducers/site';\n\nexport default combineReducers({\n channel: ChannelReducer,\n publish: PublishReducer,\n show : ShowReducer,\n site : SiteReducer,\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/index.js","export const FILE_SELECTED = 'FILE_SELECTED';\nexport const FILE_CLEAR = 'FILE_CLEAR';\nexport const METADATA_UPDATE = 'METADATA_UPDATE';\nexport const CLAIM_UPDATE = 'CLAIM_UPDATE';\nexport const SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';\nexport const PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';\nexport const ERROR_UPDATE = 'ERROR_UPDATE';\nexport const SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';\nexport const TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';\nexport const THUMBNAIL_NEW = 'THUMBNAIL_NEW';\nexport const PUBLISH_START = 'PUBLISH_START';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_action_types.js","export const LOGIN = 'Existing';\nexport const CREATE = 'New';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_channel_select_states.js","export const CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/channel_action_types.js","export const LOCAL_CHECK = 'LOCAL_CHECK';\nexport const UNAVAILABLE = 'UNAVAILABLE';\nexport const ERROR = 'ERROR';\nexport const AVAILABLE = 'AVAILABLE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/asset_display_states.js","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport { dynamicImport } from 'utils/dynamicImport';\nimport AboutPage from 'pages/AboutPage';\nimport LoginPage from 'pages/LoginPage';\nimport ShowPage from 'pages/ShowPage';\nimport FourOhFourPage from 'containers/FourOhFourPage';\nconst HomePage = dynamicImport('pages/HomePage'); // or use the provided local homepage\n\nconst App = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default App;\n\n\n\n// WEBPACK FOOTER //\n// ./client/app.js","var map = {\n\t\"./canonicalLink\": 59,\n\t\"./canonicalLink.js\": 59,\n\t\"./dynamicImport\": 58,\n\t\"./dynamicImport.js\": 58,\n\t\"./file\": 60,\n\t\"./file.js\": 60,\n\t\"./lbryUri\": 61,\n\t\"./lbryUri.js\": 61,\n\t\"./metaTags\": 62,\n\t\"./metaTags.js\": 62,\n\t\"./pageTitle\": 63,\n\t\"./pageTitle.js\": 63,\n\t\"./publish\": 110,\n\t\"./publish.js\": 110,\n\t\"./request\": 8,\n\t\"./request.js\": 8,\n\t\"./validate\": 111,\n\t\"./validate.js\": 111\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 109;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/utils ^.*$\n// module id = 109\n// module chunks = 0","export const createPublishMetadata = (claim, { type }, { title, description, license, nsfw }, publishInChannel, selectedChannel) => {\n let metadata = {\n name: claim,\n title,\n description,\n license,\n nsfw,\n type,\n };\n if (publishInChannel) {\n metadata['channelName'] = selectedChannel;\n }\n return metadata;\n};\n\nexport const createPublishFormData = (file, thumbnail, metadata) => {\n let fd = new FormData();\n // append file\n fd.append('file', file);\n // append thumbnail\n if (thumbnail) {\n fd.append('thumbnail', thumbnail);\n }\n // append metadata\n for (let key in metadata) {\n if (metadata.hasOwnProperty(key)) {\n fd.append(key, metadata[key]);\n }\n }\n return fd;\n};\n\nexport const createThumbnailUrl = (channel, channelId, claim, host) => {\n return `${host}/${channel}:${channelId}/${claim}-thumb.png`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/publish.js","export const validateChannelSelection = (publishInChannel, selectedChannel, loggedInChannel) => {\n if (publishInChannel && (selectedChannel !== loggedInChannel.name)) {\n throw new Error('Log in to a channel or select Anonymous');\n }\n};\n\nexport const validatePublishParams = (file, claim, urlError) => {\n if (!file) {\n throw new Error('Please choose a file');\n }\n if (!claim) {\n throw new Error('Please enter a URL');\n }\n if (urlError) {\n throw new Error('Fix the url');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/validate.js","export const CHANNEL = 'CHANNEL';\nexport const ASSET_LITE = 'ASSET_LITE';\nexport const ASSET_DETAILS = 'ASSET_DETAILS';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_request_types.js","module.exports = (helmet, html, preloadedState) => {\n // take the html and preloadedState and return the full page\n return `\n \n \n \n \n \n \n \n ${helmet.title.toString()}\n ${helmet.meta.toString()}\n ${helmet.link.toString()}\n \n \n \n \n \n \n \n \n
\n
${html}
\n
\n \n \n \n \n `;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/renderFullPage.js","export const selectSiteState = (state) => {\n return state.site;\n};\n\nexport const selectSiteHost = (state) => {\n return state.site.host;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/site.js","module.exports = require(\"babel-polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-polyfill\"\n// module id = 116\n// module chunks = 0","module.exports = require(\"whatwg-fetch\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"whatwg-fetch\"\n// module id = 117\n// module chunks = 0","const Server = require('./server/server.js');\r\nconst Components = require('./client/components');\r\nconst Containers = require('./client/containers');\r\nconst Pages = require('./client/pages');\r\n\r\nconst exports = {\r\n Server,\r\n Components,\r\n Containers,\r\n Pages,\r\n};\r\n\r\nmodule.exports = exports;\r\n\n\n\n// WEBPACK FOOTER //\n// ./speech.js","// app dependencies\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst expressHandlebars = require('express-handlebars');\nconst Handlebars = require('handlebars');\nconst helmet = require('helmet');\nconst passport = require('passport');\nconst { serializeSpeechUser, deserializeSpeechUser } = require('./helpers/authHelpers.js');\nconst cookieSession = require('cookie-session');\nconst http = require('http');\n// logging dependencies\nconst logger = require('winston');\n\nfunction Server () {\n this.configureMysql = (mysqlConfig) => {\n require('../config/mysqlConfig.js').configure(mysqlConfig);\n };\n this.configureSite = (siteConfig) => {\n require('../config/siteConfig.js').configure(siteConfig);\n this.sessionKey = siteConfig.auth.sessionKey;\n this.PORT = siteConfig.details.port;\n };\n this.configureSlack = (slackConfig) => {\n require('../config/slackConfig.js').configure(slackConfig);\n };\n this.createApp = () => {\n // create an Express application\n const app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(`${__dirname}/public`)); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use((req, res, next) => { // custom logging middleware to log all incoming http requests\n logger.verbose(`Request on ${req.originalUrl} from ${req.ip}`);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n const localSignupStrategy = require('./passport/local-signup.js');\n const localLoginStrategy = require('./passport/local-login.js');\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name : 'session',\n keys : [this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000, // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n const hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars : Handlebars,\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n require('./routes/auth-routes.js')(app);\n require('./routes/api-routes.js')(app);\n require('./routes/page-routes.js')(app);\n require('./routes/asset-routes.js')(app);\n require('./routes/fallback-routes.js')(app);\n\n this.app = app;\n };\n this.initialize = () => {\n require('./helpers/configureLogger.js')(logger);\n require('./helpers/configureSlack.js')(logger);\n this.createApp();\n this.server = http.Server(this.app);\n };\n this.start = () => {\n const db = require('./models/index');\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(() => {\n this.server.listen(this.PORT, () => {\n logger.info(`Server is listening on PORT ${this.PORT}`);\n });\n })\n .catch((error) => {\n logger.error(`Startup Error:`, error);\n });\n };\n};\n\nmodule.exports = Server;\n\n\n\n// WEBPACK FOOTER //\n// ./server/server.js","module.exports = require(\"express\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express\"\n// module id = 120\n// module chunks = 0","module.exports = require(\"body-parser\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"body-parser\"\n// module id = 121\n// module chunks = 0","module.exports = require(\"express-handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express-handlebars\"\n// module id = 122\n// module chunks = 0","module.exports = require(\"handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"handlebars\"\n// module id = 123\n// module chunks = 0","module.exports = require(\"helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"helmet\"\n// module id = 124\n// module chunks = 0","const logger = require('winston');\n\nmodule.exports = {\n serializeSpeechUser (user, done) { // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser (user, done) { // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/authHelpers.js","module.exports = require(\"cookie-session\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cookie-session\"\n// module id = 126\n// module chunks = 0","module.exports = require(\"http\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"http\"\n// module id = 127\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst lbryApi = require('../helpers/lbryApi.js');\nconst logger = require('winston');\nconst db = require('../models');\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`);\n let userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel(`@${username}`)\n .then(tx => {\n // create user record\n const userData = {\n userName: username,\n password: password,\n };\n logger.verbose('userData >', userData);\n // create user record\n const channelData = {\n channelName : `@${username}`,\n channelClaimId: tx.claim_id,\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n const certificateData = {\n claimId: tx.claim_id,\n name : `@${username}`,\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n })\n .then(([newUser, newChannel, newCertificate]) => {\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n })\n .then(() => {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n })\n .catch(error => {\n logger.error('signup error', error);\n return done(error);\n });\n }\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-signup.js","module.exports = require(\"axios\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"axios\"\n// module id = 129\n// module chunks = 0","const lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279',\n },\n};\n\nmodule.exports = lbryConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/lbryConfig.js","module.exports = require(\"universal-analytics\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"universal-analytics\"\n// module id = 131\n// module chunks = 0","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Certificate = sequelize.define(\n 'Certificate',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateVersion: {\n type : STRING,\n default: null,\n },\n keyType: {\n type : STRING,\n default: null,\n },\n publicKey: {\n type : TEXT('long'),\n default: null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Certificate.associate = db => {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n logger.debug(`getShortChannelIdFromLongChannelId ${channelName}:${longChannelId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {name: channelName},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelIdFromShortChannelId(${channelName}, ${channelClaimId})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name : channelName,\n claimId: {\n $like: `${channelClaimId}%`,\n },\n },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n logger.debug(`getLongChannelIdFromChannelName(${channelName})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n logger.debug(`validateLongChannelId(${name}, ${claimId})`);\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelId(${channelName}, ${channelClaimId})`);\n if (channelClaimId && (channelClaimId.length === 40)) { // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) { // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/certificate.js","module.exports = (sequelize, { STRING }) => {\n const Channel = sequelize.define(\n 'Channel',\n {\n channelName: {\n type : STRING,\n allowNull: false,\n },\n channelClaimId: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Channel.associate = db => {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/channel.js","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\nconst { assetDefaults: { thumbnail: defaultThumbnail }, details: { host } } = require('../../config/siteConfig.js');\n\nfunction determineFileExtensionFromContentType (contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail (storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData (claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Claim = sequelize.define(\n 'Claim',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateId: {\n type : STRING,\n default: null,\n },\n author: {\n type : STRING,\n default: null,\n },\n description: {\n type : TEXT('long'),\n default: null,\n },\n language: {\n type : STRING,\n default: null,\n },\n license: {\n type : STRING,\n default: null,\n },\n licenseUrl: {\n type : STRING,\n default: null,\n },\n nsfw: {\n type : BOOLEAN,\n default: null,\n },\n preview: {\n type : STRING,\n default: null,\n },\n thumbnail: {\n type : STRING,\n default: null,\n },\n title: {\n type : STRING,\n default: null,\n },\n metadataVersion: {\n type : STRING,\n default: null,\n },\n contentType: {\n type : STRING,\n default: null,\n },\n source: {\n type : STRING,\n default: null,\n },\n sourceType: {\n type : STRING,\n default: null,\n },\n sourceVersion: {\n type : STRING,\n default: null,\n },\n streamVersion: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n channelName: {\n type : STRING,\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Claim.associate = db => {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n logger.debug(`Claim.getShortClaimIdFromLongClaimId for ${claimName}#${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n logger.debug(`Claim.getAllChannelClaims for ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw : true, // returns an array of only data, not an array of instances\n })\n .then(channelClaimsArray => {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(claim => {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n logger.debug(`finding claim id for claim ${claimName} from channel ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(`${result.length} records found for \"${claimName}\" in channel \"${channelClaimId}\"`);\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name,\n claimId: {\n $like: `${shortId}%`,\n }},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']], // note: maybe height and effective amount need to switch?\n })\n .then(result => {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug(`getLongClaimId(${claimName}, ${claimId})`);\n if (claimId && (claimId.length === 40)) { // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n logger.debug(`Claim.resolveClaim: ${name} ${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name, claimId },\n })\n .then(claimArray => {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error(`more than one record matches ${name}#${claimId} in db.Claim`);\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/claim.js","module.exports = (sequelize, { STRING, BOOLEAN, INTEGER }) => {\n const File = sequelize.define(\n 'File',\n {\n name: {\n type : STRING,\n allowNull: false,\n },\n claimId: {\n type : STRING,\n allowNull: false,\n },\n address: {\n type : STRING,\n allowNull: false,\n },\n outpoint: {\n type : STRING,\n allowNull: false,\n },\n height: {\n type : INTEGER,\n allowNull: false,\n default : 0,\n },\n fileName: {\n type : STRING,\n allowNull: false,\n },\n filePath: {\n type : STRING,\n allowNull: false,\n },\n fileType: {\n type: STRING,\n },\n nsfw: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: false,\n },\n trendingEligible: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: true,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n File.associate = db => {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25,\n });\n };\n\n return File;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/file.js","module.exports = (sequelize, { STRING, BOOLEAN, TEXT }) => {\n const Request = sequelize.define(\n 'Request',\n {\n action: {\n type : STRING,\n allowNull: false,\n },\n url: {\n type : STRING,\n allowNull: false,\n },\n ipAddress: {\n type : STRING,\n allowNull: true,\n },\n result: {\n type : TEXT('long'),\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Request.associate = db => {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n return Request;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/request.js","'use strict';\nconst bcrypt = require('bcrypt');\nconst logger = require('winston');\n\nmodule.exports = (sequelize, { STRING }) => {\n const User = sequelize.define(\n 'User',\n {\n userName: {\n type : STRING,\n allowNull: false,\n },\n password: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n User.associate = db => {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n this\n .update({password: hash})\n .then(() => {\n resolve();\n })\n .catch(error => {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', (user, options) => {\n logger.debug('User.beforeCreate hook...');\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/user.js","module.exports = require(\"bcrypt\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"bcrypt\"\n// module id = 138\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst logger = require('winston');\nconst db = require('../models/index');\n\nconst returnUserAndChannelInfo = (userInstance) => {\n return new Promise((resolve, reject) => {\n let userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance\n .getChannel()\n .then(({channelName, channelClaimId}) => {\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n })\n .catch(error => {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n return db.User\n .findOne({\n where: {userName: username},\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n return user.comparePassword(password)\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user)\n .then(userInfo => {\n return done(null, userInfo);\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return done(error);\n });\n },\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-login.js","const logger = require('winston');\nconst passport = require('passport');\n\nmodule.exports = (app) => {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), (req, res) => {\n logger.verbose(`successful signup for ${req.user.channelName}`);\n res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n // route for log in\n app.post('/login', (req, res, next) => {\n passport.authenticate('local-login', (err, user, info) => {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message,\n });\n }\n logger.debug('successful login');\n req.logIn(user, (err) => {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', (req, res) => {\n req.logout();\n res.status(200).json({success: true, message: 'you successfully logged out'});\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', (req, res) => {\n if (req.user) {\n res.status(200).json({success: true, data: req.user});\n } else {\n res.status(401).json({success: false, message: 'user is not logged in'});\n }\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/auth-routes.js","const logger = require('winston');\nconst multipart = require('connect-multiparty');\nconst { publishing: { uploadDirectory }, details: { host } } = require('../../config/siteConfig.js');\nconst multipartMiddleware = multipart({uploadDir: uploadDirectory});\nconst db = require('../models/index');\nconst { claimNameIsAvailable, checkChannelAvailability, publish } = require('../controllers/publishController.js');\nconst { getClaimList, resolveUri, getClaim } = require('../helpers/lbryApi.js');\nconst { addGetResultsToFileData, createBasicPublishParams, createThumbnailPublishParams, parsePublishApiRequestBody, parsePublishApiRequestFiles, createFileData } = require('../helpers/publishHelpers.js');\nconst errorHandlers = require('../helpers/errorHandlers.js');\nconst { sendGATimingEvent } = require('../helpers/googleAnalytics.js');\nconst { authenticateUser } = require('../auth/authentication.js');\nconst { getChannelData, getChannelClaims, getClaimId } = require('../controllers/serveController.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = (app) => {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n checkChannelAvailability(name)\n .then(availableName => {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', ({ ip, originalUrl, params }, res) => {\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json(shortId);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n const page = params.page;\n getChannelClaims(channelName, channelClaimId, page)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', ({ ip, originalUrl, params }, res) => {\n getClaimList(params.name)\n .then(claimsList => {\n res.status(200).json(claimsList);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId)\n .then(resolveResult => {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n let fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(`${name}#${claimId}`)]);\n })\n .then(([ fileData, getResult ]) => {\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, {name, claimId}, 'File'), getResult]);\n })\n .then(([ fileRecord, {message, completed} ]) => {\n res.status(200).json({ success: true, message, completed });\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n claimNameIsAvailable(name)\n .then(result => {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', ({ headers, ip, originalUrl, params }, res) => {\n resolveUri(`${params.name}#${params.claimId}`)\n .then(resolvedUri => {\n res.status(200).json(resolvedUri);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, ({ body, files, headers, ip, originalUrl, user }, res) => {\n // define variables\n let channelName, channelId, channelPassword, description, fileName, filePath, fileType, gaStartTime, license, name, nsfw, thumbnail, thumbnailFileName, thumbnailFilePath, thumbnailFileType, title;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n // validateApiPublishRequest(body, files);\n ({name, nsfw, license, title, description, thumbnail} = parsePublishApiRequestBody(body));\n ({fileName, filePath, fileType, thumbnailFileName, thumbnailFilePath, thumbnailFileType} = parsePublishApiRequestFiles(files));\n ({channelName, channelId, channelPassword} = body);\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // check channel authorization\n Promise.all([\n authenticateUser(channelName, channelId, channelPassword, user),\n claimNameIsAvailable(name),\n createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail),\n createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw),\n ])\n .then(([{channelName, channelClaimId}, validatedClaimName, publishParams, thumbnailPublishParams]) => {\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n })\n .then(result => {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data : {\n name,\n claimId: result.claim_id,\n url : `${host}/${result.claim_id}/${name}`,\n lbryTx : result,\n },\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', ({ ip, originalUrl, body, params }, res) => {\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json({success: true, data: shortId});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', ({ ip, originalUrl, body, params }, res) => {\n logger.debug('body:', body);\n const channelName = body.channelName;\n const channelClaimId = body.channelClaimId;\n const claimName = body.claimName;\n const claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(result => {\n if (result === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel could be found'});\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'No matching claim id could be found'});\n }\n res.status(200).json({success: true, data: result});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', ({ ip, originalUrl, body, params }, res) => {\n const claimName = params.claimName;\n let claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId)\n .then(claimInfo => {\n if (!claimInfo) {\n return res.status(404).json({success: false, message: 'No claim could be found'});\n }\n res.status(200).json({success: true, data: claimInfo});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n db.File.findOne({where: {name, claimId}})\n .then(result => {\n if (result) {\n return res.status(200).json({success: true, data: true});\n }\n res.status(200).json({success: true, data: false});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/api-routes.js","module.exports = require(\"connect-multiparty\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"connect-multiparty\"\n// module id = 142\n// module chunks = 0","const logger = require('winston');\nconst db = require('../models/index');\nconst lbryApi = require('../helpers/lbryApi.js');\nconst publishHelpers = require('../helpers/publishHelpers.js');\nconst { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('../../config/siteConfig.js');\nconst Sequelize = require('sequelize');\nconst Op = Sequelize.Op;\n\nmodule.exports = {\n publish (publishParams, fileName, fileType) {\n return new Promise((resolve, reject) => {\n let publishResults, certificateId, channelName;\n // publish the file\n return lbryApi.publishClaim(publishParams)\n .then(tx => {\n logger.info(`Successfully published ${publishParams.name} ${fileName}`, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug(`this claim was published in channel: ${publishParams.channel_name}`);\n return db.Channel.findOne({where: {channelName: publishParams.channel_name}});\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n })\n .then(channel => {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug(`certificateId: ${certificateId}`);\n })\n .then(() => {\n // create the File record\n const fileRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n fileName,\n filePath : publishParams.file_path,\n fileType,\n nsfw : publishParams.metadata.nsfw,\n };\n // create the Claim record\n const claimRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n thumbnail : publishParams.metadata.thumbnail,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n contentType: fileType,\n nsfw : publishParams.metadata.nsfw,\n amount : publishParams.bid,\n certificateId,\n channelName,\n };\n // upsert criteria\n const upsertCriteria = {\n name : publishParams.name,\n claimId: publishResults.claim_id,\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n })\n .then(([file, claim]) => {\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n })\n .then(() => {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n })\n .catch(error => {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable (name) {\n const claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim\n .findAll({\n attributes: ['address'],\n where : {\n name,\n address: {\n [Op.or]: claimAddresses,\n },\n },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n checkChannelAvailability (name) {\n return db.Channel\n .findAll({\n where: { channelName: name },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/publishController.js","const db = require('../models');\nconst logger = require('winston');\n\nmodule.exports = {\n authenticateUser (channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName : null,\n channelClaimId: null,\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName : user.channelName,\n channelClaimId: user.channelClaimId,\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials (channelName, channelId, userPassword) {\n return new Promise((resolve, reject) => {\n // hoisted variables\n let channelData;\n // build the params for finding the channel\n let channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel\n .findOne({\n where: channelFindParams,\n })\n .then(channel => {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) },\n });\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n })\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/auth/authentication.js","const CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims (channelName, longChannelClaimId, claims, page) {\n const totalPages = module.exports.determineTotalPages(claims);\n const paginationPage = module.exports.getPageFromQuery(page);\n const viewData = {\n channelName : channelName,\n longChannelClaimId: longChannelClaimId,\n claims : module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage : module.exports.determinePreviousPage(paginationPage),\n currentPage : paginationPage,\n nextPage : module.exports.determineNextPage(totalPages, paginationPage),\n totalPages : totalPages,\n totalResults : module.exports.determineTotalClaims(claims),\n };\n return viewData;\n },\n getPageFromQuery (page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims (claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n const claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n const claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n const pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages (claims) {\n if (!claims) {\n return 0;\n } else {\n const totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n const fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n const remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage (currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage (totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims (claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/channelPagination.js","const { details: host } = require('../../config/siteConfig.js');\nconst handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = (app) => {\n // route for the home page\n app.get('/', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', (req, res) => {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', (req, res) => {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', (req, res) => {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', ({ params }, res) => {\n const claimId = params.claimId;\n const name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host, claimId, name });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/page-routes.js","import * as actions from 'constants/publish_action_types';\nimport { LOGIN } from 'constants/publish_channel_select_states';\nconst { publishing } = require('../../config/siteConfig.js');\n\nconst initialState = {\n disabled : publishing.disabled,\n disabledMessage : publishing.disabledMessage,\n publishInChannel : false,\n selectedChannel : LOGIN,\n showMetadataInputs: false,\n status : {\n status : null,\n message: null,\n },\n error: {\n file : null,\n url : null,\n channel : null,\n publishSubmit: null,\n },\n file : null,\n claim : '',\n metadata: {\n title : '',\n description: '',\n license : '',\n nsfw : false,\n },\n thumbnail: null,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data,\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data,\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel,\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data,\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data,\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data,\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/publish.js","import * as actions from 'constants/channel_action_types';\n\nconst initialState = {\n loggedInChannel: {\n name : null,\n shortId: null,\n longId : null,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/channel.js","import * as actions from 'constants/show_action_types';\nimport { LOCAL_CHECK, ERROR } from 'constants/asset_display_states';\n\nconst initialState = {\n request: {\n error: null,\n type : null,\n id : null,\n },\n requestList : {},\n channelList : {},\n assetList : {},\n displayAsset: {\n error : null,\n status: LOCAL_CHECK,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data,\n }),\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id : action.data.requestId,\n }),\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, {\n [action.data.id]: {\n error: action.data.error,\n key : action.data.key,\n },\n }),\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, {\n [action.data.id]: {\n error : action.data.error,\n name : action.data.name,\n claimId : action.data.claimId,\n shortId : action.data.shortId,\n claimData: action.data.claimData,\n },\n }),\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.id]: {\n name : action.data.name,\n longId : action.data.longId,\n shortId : action.data.shortId,\n claimsData: action.data.claimsData,\n },\n }),\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.channelListId]: Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData,\n }),\n }),\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data,\n }),\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error : action.data,\n status: ERROR,\n }),\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/show.js","const siteConfig = require('../../config/siteConfig.js');\n\nconst {\n analytics: {\n googleId: googleAnalyticsId,\n },\n assetDefaults: {\n thumbnail: defaultThumbnail,\n description: defaultDescription,\n },\n details: {\n description,\n host,\n title,\n twitter,\n },\n} = siteConfig;\n\nconst initialState = {\n description,\n googleAnalyticsId,\n host,\n title,\n twitter,\n defaultDescription,\n defaultThumbnail,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/site.js","module.exports = require(\"react-ga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-ga\"\n// module id = 151\n// module chunks = 0","module.exports = require(\"cross-fetch/polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cross-fetch/polyfill\"\n// module id = 152\n// module chunks = 0","const { sendGAServeEvent } = require('../helpers/googleAnalytics');\nconst { determineResponseType, flipClaimNameAndIdForBackwardsCompatibility, logRequestData, getClaimIdAndServeAsset } = require('../helpers/serveHelpers.js');\nconst lbryUri = require('../helpers/lbryUri.js');\nconst handleShowRender = require('../helpers/handleShowRender.jsx');\nconst SERVE = 'SERVE';\n\nmodule.exports = (app) => {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({ claimName } = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // parse the identifier\n let isChannel, channelName, channelClaimId, claimId;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(params.identifier));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n if (!isChannel) {\n [claimId, claimName] = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({claimName} = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/asset-routes.js","const logger = require('winston');\nconst { getClaimId, getLocalFileRecord } = require('../controllers/serveController.js');\nconst { handleErrorResponse } = require('./errorHandlers.js');\n\nconst SERVE = 'SERVE';\nconst SHOW = 'SHOW';\nconst NO_FILE = 'NO_FILE';\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml ({accept}) {\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser (headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset ({accept, range}) {\n const imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n const videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId (claimId) {\n return ((claimId.length === 40) && !/[^A-Za-z0-9]/g.test(claimId));\n};\n\nfunction isValidShortId (claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId (input) {\n return (isValidClaimId(input) || isValidShortId(input));\n};\n\nfunction serveAssetToClient (claimId, name, res) {\n return getLocalFileRecord(claimId, name)\n .then(fileRecord => {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect(`/api/claim/get/${name}/${claimId}`);\n }\n // serve the file\n const {filePath, fileType} = fileRecord;\n logger.verbose(`serving file: ${filePath}`);\n const sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type' : fileType || 'image/jpeg',\n },\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n })\n .catch(error => {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset (channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(fullClaimId => {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'no claim id could be found'});\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'no channel id could be found'});\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n })\n .catch(error => {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType (hasFileExtension, headers) {\n let responseType;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) { // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) { // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility (identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n const tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData (responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/serveHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n logger.debug('parsing identifier:', identifier);\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex\n .exec(identifier)\n .map(match => match || null);\n logger.debug(`${proto}, ${value}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your url. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Invalid characters in channel name: ${nameBadChars.join(', ')}.`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId,\n claimId,\n };\n },\n parseClaim: function (claim) {\n logger.debug('parsing name:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Invalid characters in claim name: ${nameBadChars.join(', ')}.`);\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No file extension provided after separator ${modifierSeperator}.`);\n }\n if (modifierSeperator !== '.') {\n throw new Error(`The ${modifierSeperator} modifier is not supported in the claim name`);\n }\n }\n // return results\n return {\n claimName,\n };\n },\n parseModifier: function (claim) {\n logger.debug('parsing modifier:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n // Validate and process modifier\n let hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryUri.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore, applyMiddleware } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage';\nimport createSagaMiddleware from 'redux-saga';\nimport { call } from 'redux-saga/effects';\nimport { handleShowPageUri } from '../../client/sagas/show_uri';\nimport { onHandleShowPageUri } from '../../client/actions/show';\n\nimport Helmet from 'react-helmet';\n\nconst returnSagaWithParams = (saga, params) => {\n return function * () {\n yield call(saga, params);\n };\n};\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create and apply middleware\n const sagaMiddleware = createSagaMiddleware();\n const middleware = applyMiddleware(sagaMiddleware);\n\n // create a new Redux store instance\n const store = createStore(Reducer, middleware);\n\n // create saga\n const action = onHandleShowPageUri(req.params);\n const saga = returnSagaWithParams(handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware\n .run(saga)\n .done\n .then(() => {\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handleShowRender.jsx","module.exports = require(\"redux-saga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga\"\n// module id = 157\n// module chunks = 0","import { call, put, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { onRequestError, onNewChannelRequest, onNewAssetRequest } from 'actions/show';\nimport { newAssetRequest } from 'sagas/show_asset';\nimport { newChannelRequest } from 'sagas/show_channel';\nimport lbryUri from 'utils/lbryUri';\n\nfunction * parseAndUpdateIdentifierAndClaim (modifier, claim) {\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n let isChannel, channelName, channelClaimId, claimId, claimName, extension;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(modifier));\n ({ claimName, extension } = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n if (isChannel) {\n return yield call(newAssetRequest, onNewAssetRequest(claimName, null, channelName, channelClaimId, extension));\n };\n yield call(newAssetRequest, onNewAssetRequest(claimName, claimId, null, null, extension));\n}\nfunction * parseAndUpdateClaimOnly (claim) {\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n let isChannel, channelName, channelClaimId;\n try {\n ({ isChannel, channelName, channelClaimId } = lbryUri.parseIdentifier(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n // return early if this request is for a channel\n if (isChannel) {\n return yield call(newChannelRequest, onNewChannelRequest(channelName, channelClaimId));\n }\n // if not for a channel, parse the claim request\n let claimName, extension;\n try {\n ({claimName, extension} = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield call(newAssetRequest, onNewAssetRequest(claimName, null, null, null, extension));\n}\n\nexport function * handleShowPageUri (action) {\n const { identifier, claim } = action.data;\n if (identifier) {\n return yield call(parseAndUpdateIdentifierAndClaim, identifier, claim);\n }\n yield call(parseAndUpdateClaimOnly, claim);\n};\n\nexport function * watchHandleShowPageUri () {\n yield takeLatest(actions.HANDLE_SHOW_URI, handleShowPageUri);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_uri.js","import { call, put, select, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addRequestToRequestList, onRequestError, onRequestUpdate, addAssetToAssetList } from 'actions/show';\nimport { getLongClaimId, getShortId, getClaimData } from 'api/assetApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newAssetRequest (action) {\n const { requestType, requestId, name, modifier } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get long id && add request to request list\n let longId;\n try {\n ({data: longId} = yield call(getLongClaimId, host, name, modifier));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n const assetKey = `a#${name}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, assetKey));\n // is this an existing asset?\n // If this asset is in the asset list, it's already been fetched\n if (state.assetList[assetKey]) {\n return null;\n }\n // get short Id\n let shortId;\n try {\n ({data: shortId} = yield call(getShortId, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // get asset claim data\n let claimData;\n try {\n ({data: claimData} = yield call(getClaimData, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // add asset to asset list\n yield put(addAssetToAssetList(assetKey, null, name, longId, shortId, claimData));\n // clear any errors in request error\n yield put(onRequestError(null));\n};\n\nexport function * watchNewAssetRequest () {\n yield takeLatest(actions.ASSET_REQUEST_NEW, newAssetRequest);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_asset.js","import Request from 'utils/request';\n\nexport function getLongClaimId (host, name, modifier) {\n let body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n const params = {\n method : 'POST',\n headers: { 'Content-Type': 'application/json' },\n body : JSON.stringify(body),\n };\n // create url\n const url = `${host}/api/claim/long-id`;\n // return the request promise\n return Request(url, params);\n};\n\nexport function getShortId (host, name, claimId) {\n const url = `${host}/api/claim/short-id/${claimId}/${name}`;\n return Request(url);\n};\n\nexport function getClaimData (host, name, claimId) {\n const url = `${host}/api/claim/data/${name}/${claimId}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/assetApi.js","import {call, put, select, takeLatest} from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addNewChannelToChannelList, addRequestToRequestList, onRequestError, onRequestUpdate, updateChannelClaims } from 'actions/show';\nimport { getChannelClaims, getChannelData } from 'api/channelApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newChannelRequest (action) {\n const { requestType, requestId, channelName, channelId } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get channel long id\n let longId, shortId;\n try {\n ({ data: {longChannelClaimId: longId, shortChannelClaimId: shortId} } = yield call(getChannelData, host, channelName, channelId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the request in the channel requests list\n const channelKey = `c#${channelName}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, channelKey));\n // is this an existing channel?\n // If this channel is in the channel list, it's already been fetched\n if (state.channelList[channelKey]) {\n return null;\n }\n // get channel claims data\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, channelName, 1));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the channel data in the channel list\n yield put(addNewChannelToChannelList(channelKey, channelName, shortId, longId, claimsData));\n // clear any request errors\n yield put(onRequestError(null));\n}\n\nexport function * watchNewChannelRequest () {\n yield takeLatest(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n};\n\nfunction * getNewClaimsAndUpdateChannel (action) {\n const { channelKey, name, longId, page } = action.data;\n const host = yield select(selectSiteHost);\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, name, page));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield put(updateChannelClaims(channelKey, claimsData));\n}\n\nexport function * watchUpdateChannelClaims () {\n yield takeLatest(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_channel.js","import Request from 'utils/request';\n\nexport function getChannelData (host, id, name) {\n if (!id) id = 'none';\n const url = `${host}/api/channel/data/${name}/${id}`;\n return Request(url);\n};\n\nexport function getChannelClaims (host, longId, name, page) {\n if (!page) page = 1;\n const url = `${host}/api/channel/claims/${name}/${longId}/${page}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/channelApi.js","const handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = app => {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', (req, res) => {\n // send response\n handlePageRender(req, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/fallback-routes.js","const { logLevel } = require('../../config/loggerConfig');\n\nmodule.exports = (winston) => {\n // configure\n winston.configure({\n transports: [\n new (winston.transports.Console)({\n level : logLevel,\n timestamp : false,\n colorize : true,\n prettyPrint : true,\n handleExceptions : true,\n humanReadableUnhandledException: true,\n }),\n ],\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureLogger.js","const loggerConfig = {\n logLevel: 'debug', // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/loggerConfig.js","const winstonSlackWebHook = require('winston-slack-webhook').SlackWebHook;\nconst slackConfig = require('../../config/slackConfig.js');\n\nmodule.exports = (winston) => {\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = slackConfig;\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-errors-transport',\n level : 'warn',\n webhookUrl: slackWebHook,\n channel : slackErrorChannel,\n username : 'spee.ch',\n iconEmoji : ':face_with_head_bandage:',\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-info-transport',\n level : 'info',\n webhookUrl: slackWebHook,\n channel : slackInfoChannel,\n username : 'spee.ch',\n iconEmoji : ':nerd_face:',\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureSlack.js","module.exports = require(\"winston-slack-webhook\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston-slack-webhook\"\n// module id = 167\n// module chunks = 0","var map = {\n\t\"./\": 50,\n\t\"./ActiveStatusBar\": 24,\n\t\"./ActiveStatusBar/\": 24,\n\t\"./ActiveStatusBar/index\": 24,\n\t\"./ActiveStatusBar/index.jsx\": 24,\n\t\"./AssetPreview\": 34,\n\t\"./AssetPreview/\": 34,\n\t\"./AssetPreview/index\": 34,\n\t\"./AssetPreview/index.js\": 34,\n\t\"./AssetPreview/view\": 78,\n\t\"./AssetPreview/view.jsx\": 78,\n\t\"./ExpandingTextArea\": 36,\n\t\"./ExpandingTextArea/\": 36,\n\t\"./ExpandingTextArea/index\": 36,\n\t\"./ExpandingTextArea/index.jsx\": 36,\n\t\"./GAListener\": 13,\n\t\"./GAListener/\": 13,\n\t\"./GAListener/index\": 13,\n\t\"./GAListener/index.jsx\": 13,\n\t\"./InactiveStatusBar\": 25,\n\t\"./InactiveStatusBar/\": 25,\n\t\"./InactiveStatusBar/index\": 25,\n\t\"./InactiveStatusBar/index.jsx\": 25,\n\t\"./Logo\": 21,\n\t\"./Logo/\": 21,\n\t\"./Logo/index\": 21,\n\t\"./Logo/index.jsx\": 21,\n\t\"./NavBarChannelOptionsDropdown\": 22,\n\t\"./NavBarChannelOptionsDropdown/\": 22,\n\t\"./NavBarChannelOptionsDropdown/index\": 22,\n\t\"./NavBarChannelOptionsDropdown/index.jsx\": 22,\n\t\"./ProgressBar\": 10,\n\t\"./ProgressBar/\": 10,\n\t\"./ProgressBar/index\": 10,\n\t\"./ProgressBar/index.jsx\": 10,\n\t\"./PublishPreview\": 37,\n\t\"./PublishPreview/\": 37,\n\t\"./PublishPreview/index\": 37,\n\t\"./PublishPreview/index.jsx\": 37,\n\t\"./PublishUrlMiddleDisplay\": 38,\n\t\"./PublishUrlMiddleDisplay/\": 38,\n\t\"./PublishUrlMiddleDisplay/index\": 38,\n\t\"./PublishUrlMiddleDisplay/index.jsx\": 38,\n\t\"./SEO\": 7,\n\t\"./SEO/\": 7,\n\t\"./SEO/index\": 7,\n\t\"./SEO/index.js\": 7,\n\t\"./SEO/view\": 66,\n\t\"./SEO/view.jsx\": 66,\n\t\"./index\": 50,\n\t\"./index.js\": 50\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 168;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/components ^\\.\\/.*$\n// module id = 168\n// module chunks = 0","var map = {\n\t\"./\": 52,\n\t\"./AssetDisplay\": 17,\n\t\"./AssetDisplay/\": 17,\n\t\"./AssetDisplay/index\": 17,\n\t\"./AssetDisplay/index.js\": 17,\n\t\"./AssetDisplay/view\": 72,\n\t\"./AssetDisplay/view.jsx\": 72,\n\t\"./AssetInfo\": 31,\n\t\"./AssetInfo/\": 31,\n\t\"./AssetInfo/index\": 31,\n\t\"./AssetInfo/index.js\": 31,\n\t\"./AssetInfo/view\": 75,\n\t\"./AssetInfo/view.jsx\": 75,\n\t\"./AssetTitle\": 30,\n\t\"./AssetTitle/\": 30,\n\t\"./AssetTitle/index\": 30,\n\t\"./AssetTitle/index.js\": 30,\n\t\"./AssetTitle/view\": 74,\n\t\"./AssetTitle/view.jsx\": 74,\n\t\"./ChannelClaimsDisplay\": 33,\n\t\"./ChannelClaimsDisplay/\": 33,\n\t\"./ChannelClaimsDisplay/index\": 33,\n\t\"./ChannelClaimsDisplay/index.js\": 33,\n\t\"./ChannelClaimsDisplay/view\": 77,\n\t\"./ChannelClaimsDisplay/view.jsx\": 77,\n\t\"./ChannelCreateForm\": 16,\n\t\"./ChannelCreateForm/\": 16,\n\t\"./ChannelCreateForm/index\": 16,\n\t\"./ChannelCreateForm/index.js\": 16,\n\t\"./ChannelCreateForm/view\": 69,\n\t\"./ChannelCreateForm/view.jsx\": 69,\n\t\"./ChannelLoginForm\": 15,\n\t\"./ChannelLoginForm/\": 15,\n\t\"./ChannelLoginForm/index\": 15,\n\t\"./ChannelLoginForm/index.js\": 15,\n\t\"./ChannelLoginForm/view\": 68,\n\t\"./ChannelLoginForm/view.jsx\": 68,\n\t\"./ChannelSelect\": 39,\n\t\"./ChannelSelect/\": 39,\n\t\"./ChannelSelect/index\": 39,\n\t\"./ChannelSelect/index.js\": 39,\n\t\"./ChannelSelect/view\": 81,\n\t\"./ChannelSelect/view.jsx\": 81,\n\t\"./Dropzone\": 18,\n\t\"./Dropzone/\": 18,\n\t\"./Dropzone/index\": 18,\n\t\"./Dropzone/index.js\": 18,\n\t\"./Dropzone/view\": 82,\n\t\"./Dropzone/view.jsx\": 82,\n\t\"./FourOhFourPage\": 35,\n\t\"./FourOhFourPage/\": 35,\n\t\"./FourOhFourPage/index\": 35,\n\t\"./FourOhFourPage/index.jsx\": 35,\n\t\"./FourOhFourPage/view\": 79,\n\t\"./FourOhFourPage/view.jsx\": 79,\n\t\"./NavBar\": 5,\n\t\"./NavBar/\": 5,\n\t\"./NavBar/index\": 5,\n\t\"./NavBar/index.js\": 5,\n\t\"./NavBar/view\": 65,\n\t\"./NavBar/view.jsx\": 65,\n\t\"./PublishDetails\": 40,\n\t\"./PublishDetails/\": 40,\n\t\"./PublishDetails/index\": 40,\n\t\"./PublishDetails/index.js\": 40,\n\t\"./PublishDetails/view\": 83,\n\t\"./PublishDetails/view.jsx\": 83,\n\t\"./PublishDisabledMessage\": 45,\n\t\"./PublishDisabledMessage/\": 45,\n\t\"./PublishDisabledMessage/index\": 45,\n\t\"./PublishDisabledMessage/index.js\": 45,\n\t\"./PublishDisabledMessage/view\": 88,\n\t\"./PublishDisabledMessage/view.jsx\": 88,\n\t\"./PublishMetadataInputs\": 44,\n\t\"./PublishMetadataInputs/\": 44,\n\t\"./PublishMetadataInputs/index\": 44,\n\t\"./PublishMetadataInputs/index.js\": 44,\n\t\"./PublishMetadataInputs/view\": 87,\n\t\"./PublishMetadataInputs/view.jsx\": 87,\n\t\"./PublishStatus\": 46,\n\t\"./PublishStatus/\": 46,\n\t\"./PublishStatus/index\": 46,\n\t\"./PublishStatus/index.js\": 46,\n\t\"./PublishStatus/view\": 89,\n\t\"./PublishStatus/view.jsx\": 89,\n\t\"./PublishThumbnailInput\": 43,\n\t\"./PublishThumbnailInput/\": 43,\n\t\"./PublishThumbnailInput/index\": 43,\n\t\"./PublishThumbnailInput/index.js\": 43,\n\t\"./PublishThumbnailInput/view\": 86,\n\t\"./PublishThumbnailInput/view.jsx\": 86,\n\t\"./PublishTitleInput\": 41,\n\t\"./PublishTitleInput/\": 41,\n\t\"./PublishTitleInput/index\": 41,\n\t\"./PublishTitleInput/index.js\": 41,\n\t\"./PublishTitleInput/view\": 84,\n\t\"./PublishTitleInput/view.jsx\": 84,\n\t\"./PublishTool\": 47,\n\t\"./PublishTool/\": 47,\n\t\"./PublishTool/index\": 47,\n\t\"./PublishTool/index.js\": 47,\n\t\"./PublishTool/view\": 90,\n\t\"./PublishTool/view.jsx\": 90,\n\t\"./PublishUrlInput\": 42,\n\t\"./PublishUrlInput/\": 42,\n\t\"./PublishUrlInput/index\": 42,\n\t\"./PublishUrlInput/index.js\": 42,\n\t\"./PublishUrlInput/view\": 85,\n\t\"./PublishUrlInput/view.jsx\": 85,\n\t\"./ShowAssetDetails\": 29,\n\t\"./ShowAssetDetails/\": 29,\n\t\"./ShowAssetDetails/index\": 29,\n\t\"./ShowAssetDetails/index.js\": 29,\n\t\"./ShowAssetDetails/view\": 73,\n\t\"./ShowAssetDetails/view.jsx\": 73,\n\t\"./ShowAssetLite\": 27,\n\t\"./ShowAssetLite/\": 27,\n\t\"./ShowAssetLite/index\": 27,\n\t\"./ShowAssetLite/index.js\": 27,\n\t\"./ShowAssetLite/view\": 71,\n\t\"./ShowAssetLite/view.jsx\": 71,\n\t\"./ShowChannel\": 32,\n\t\"./ShowChannel/\": 32,\n\t\"./ShowChannel/index\": 32,\n\t\"./ShowChannel/index.js\": 32,\n\t\"./ShowChannel/view\": 76,\n\t\"./ShowChannel/view.jsx\": 76,\n\t\"./index\": 52,\n\t\"./index.js\": 52\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 169;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/containers ^\\.\\/.*$\n// module id = 169\n// module chunks = 0","export const LOAD_START = 'LOAD_START';\nexport const LOADING = 'LOADING';\nexport const PUBLISHING = 'PUBLISHING';\nexport const SUCCESS = 'SUCCESS';\nexport const FAILED = 'FAILED';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_claim_states.js","var map = {\n\t\"./\": 53,\n\t\"./AboutPage\": 20,\n\t\"./AboutPage/\": 20,\n\t\"./AboutPage/index\": 20,\n\t\"./AboutPage/index.jsx\": 20,\n\t\"./ErrorPage\": 12,\n\t\"./ErrorPage/\": 12,\n\t\"./ErrorPage/index\": 12,\n\t\"./ErrorPage/index.jsx\": 12,\n\t\"./HomePage\": 54,\n\t\"./HomePage/\": 54,\n\t\"./HomePage/index\": 54,\n\t\"./HomePage/index.jsx\": 54,\n\t\"./LoginPage\": 23,\n\t\"./LoginPage/\": 23,\n\t\"./LoginPage/index\": 23,\n\t\"./LoginPage/index.js\": 23,\n\t\"./LoginPage/view\": 67,\n\t\"./LoginPage/view.jsx\": 67,\n\t\"./ShowPage\": 26,\n\t\"./ShowPage/\": 26,\n\t\"./ShowPage/index\": 26,\n\t\"./ShowPage/index.js\": 26,\n\t\"./ShowPage/view\": 70,\n\t\"./ShowPage/view.jsx\": 70,\n\t\"./index\": 53,\n\t\"./index.js\": 53\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 171;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/pages ^\\.\\/.*$\n// module id = 171\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///index.js","webpack:///webpack/bootstrap 663af5f6934a69121924","webpack:///external \"react\"","webpack:///external \"react-redux\"","webpack:///external \"winston\"","webpack:///./config/siteConfig.js","webpack:///external \"react-router-dom\"","webpack:///./client/containers/NavBar/index.js","webpack:///./client/actions/publish.js","webpack:///./client/components/SEO/index.js","webpack:///./client/utils/request.js","webpack:///./server/models/index.js","webpack:///./client/components/ProgressBar/index.jsx","webpack:///./client/actions/show.js","webpack:///./client/pages/ErrorPage/index.jsx","webpack:///./client/components/GAListener/index.jsx","webpack:///external \"prop-types\"","webpack:///./client/containers/ChannelLoginForm/index.js","webpack:///./client/containers/ChannelCreateForm/index.js","webpack:///./client/containers/AssetDisplay/index.js","webpack:///./client/containers/Dropzone/index.js","webpack:///./client/constants/show_action_types.js","webpack:///./client/pages/AboutPage/index.jsx","webpack:///./client/components/Logo/index.jsx","webpack:///./client/components/NavBarChannelOptionsDropdown/index.jsx","webpack:///./client/pages/LoginPage/index.js","webpack:///./client/components/ActiveStatusBar/index.jsx","webpack:///./client/components/InactiveStatusBar/index.jsx","webpack:///./client/pages/ShowPage/index.js","webpack:///./client/containers/ShowAssetLite/index.js","webpack:///./client/selectors/show.js","webpack:///./client/containers/ShowAssetDetails/index.js","webpack:///./client/containers/AssetTitle/index.js","webpack:///./client/containers/AssetInfo/index.js","webpack:///./client/containers/ShowChannel/index.js","webpack:///./client/containers/ChannelClaimsDisplay/index.js","webpack:///./client/components/AssetPreview/index.js","webpack:///./client/containers/FourOhFourPage/index.jsx","webpack:///./client/components/ExpandingTextArea/index.jsx","webpack:///./client/components/PublishPreview/index.jsx","webpack:///./client/components/PublishUrlMiddleDisplay/index.jsx","webpack:///./client/containers/ChannelSelect/index.js","webpack:///./client/containers/PublishDetails/index.js","webpack:///./client/containers/PublishTitleInput/index.js","webpack:///./client/containers/PublishUrlInput/index.js","webpack:///./client/containers/PublishThumbnailInput/index.js","webpack:///./client/containers/PublishMetadataInputs/index.js","webpack:///./client/containers/PublishDisabledMessage/index.js","webpack:///./client/containers/PublishStatus/index.js","webpack:///./client/containers/PublishTool/index.js","webpack:///external \"react-helmet\"","webpack:///external \"redux-saga/effects\"","webpack:///./client/components/index.js","webpack:///external \"path\"","webpack:///./client/containers/index.js","webpack:///./client/pages/index.js","webpack:///./client/pages/HomePage/index.jsx","webpack:///./server/helpers/lbryApi.js","webpack:///./server/helpers/googleAnalytics.js","webpack:///external \"redux\"","webpack:///./client/utils/dynamicImport.js","webpack:///./client/utils/canonicalLink.js","webpack:///./client/utils/file.js","webpack:///./client/utils/lbryUri.js","webpack:///./client/utils/metaTags.js","webpack:///./client/utils/pageTitle.js","webpack:///./client/actions/channel.js","webpack:///./client/containers/NavBar/view.jsx","webpack:///./client/components/SEO/view.jsx","webpack:///./client/pages/LoginPage/view.jsx","webpack:///./client/containers/ChannelLoginForm/view.jsx","webpack:///./client/containers/ChannelCreateForm/view.jsx","webpack:///./client/pages/ShowPage/view.jsx","webpack:///./client/containers/ShowAssetLite/view.jsx","webpack:///./client/containers/AssetDisplay/view.jsx","webpack:///./client/containers/ShowAssetDetails/view.jsx","webpack:///./client/containers/AssetTitle/view.jsx","webpack:///./client/containers/AssetInfo/view.jsx","webpack:///./client/containers/ShowChannel/view.jsx","webpack:///./client/containers/ChannelClaimsDisplay/view.jsx","webpack:///./client/components/AssetPreview/view.jsx","webpack:///./client/containers/FourOhFourPage/view.jsx","webpack:///./build/getFolderNames.js","webpack:///./client/containers/ChannelSelect/view.jsx","webpack:///./client/containers/Dropzone/view.jsx","webpack:///./client/containers/PublishDetails/view.jsx","webpack:///./client/containers/PublishTitleInput/view.jsx","webpack:///./client/containers/PublishUrlInput/view.jsx","webpack:///./client/containers/PublishThumbnailInput/view.jsx","webpack:///./client/containers/PublishMetadataInputs/view.jsx","webpack:///./client/containers/PublishDisabledMessage/view.jsx","webpack:///./client/containers/PublishStatus/view.jsx","webpack:///./client/containers/PublishTool/view.jsx","webpack:///external \"passport\"","webpack:///./config/mysqlConfig.js","webpack:///./config/slackConfig.js","webpack:///external \"passport-local\"","webpack:///external \"sequelize\"","webpack:///./server/helpers/sequelizeHelpers.js","webpack:///./server/helpers/publishHelpers.js","webpack:///external \"fs\"","webpack:///./server/helpers/errorHandlers.js","webpack:///./server/controllers/serveController.js","webpack:///./server/helpers/handlePageRender.jsx","webpack:///external \"react-dom/server\"","webpack:///./client/reducers/index.js","webpack:///./client/constants/publish_action_types.js","webpack:///./client/constants/publish_channel_select_states.js","webpack:///./client/constants/channel_action_types.js","webpack:///./client/constants/asset_display_states.js","webpack:///./client/app.js","webpack:///./client/utils ^.*$","webpack:///./client/utils/publish.js","webpack:///./client/utils/validate.js","webpack:///./client/constants/show_request_types.js","webpack:///./server/helpers/renderFullPage.js","webpack:///./client/selectors/site.js","webpack:///external \"babel-polyfill\"","webpack:///external \"whatwg-fetch\"","webpack:///./speech.js","webpack:///./server/server.js","webpack:///external \"express\"","webpack:///external \"body-parser\"","webpack:///external \"express-handlebars\"","webpack:///external \"handlebars\"","webpack:///external \"helmet\"","webpack:///./server/helpers/authHelpers.js","webpack:///external \"cookie-session\"","webpack:///external \"http\"","webpack:///./server/passport/local-signup.js","webpack:///external \"axios\"","webpack:///./config/lbryConfig.js","webpack:///external \"universal-analytics\"","webpack:///./server/models/certificate.js","webpack:///./server/models/channel.js","webpack:///./server/models/claim.js","webpack:///./server/models/file.js","webpack:///./server/models/request.js","webpack:///./server/models/user.js","webpack:///external \"bcrypt\"","webpack:///./server/passport/local-login.js","webpack:///./server/routes/auth-routes.js","webpack:///./server/routes/api-routes.js","webpack:///external \"connect-multiparty\"","webpack:///./server/controllers/publishController.js","webpack:///./server/auth/authentication.js","webpack:///./server/helpers/channelPagination.js","webpack:///./server/routes/page-routes.js","webpack:///./client/reducers/publish.js","webpack:///./client/reducers/channel.js","webpack:///./client/reducers/show.js","webpack:///./client/reducers/site.js","webpack:///external \"react-ga\"","webpack:///external \"cross-fetch/polyfill\"","webpack:///./server/routes/asset-routes.js","webpack:///./server/helpers/serveHelpers.js","webpack:///./server/helpers/lbryUri.js","webpack:///./server/helpers/handleShowRender.jsx","webpack:///external \"redux-saga\"","webpack:///./client/sagas/show_uri.js","webpack:///./client/sagas/show_asset.js","webpack:///./client/api/assetApi.js","webpack:///./client/sagas/show_channel.js","webpack:///./client/api/channelApi.js","webpack:///./server/routes/fallback-routes.js","webpack:///./server/helpers/configureLogger.js","webpack:///./config/loggerConfig.js","webpack:///./server/helpers/configureSlack.js","webpack:///external \"winston-slack-webhook\"","webpack:///./client/components ^\\.\\/.*$","webpack:///./client/containers ^\\.\\/.*$","webpack:///./client/constants/publish_claim_states.js","webpack:///./client/pages ^\\.\\/.*$"],"names":["module","exports","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","require","SiteConfig","_this","this","analytics","googleId","assetDefaults","description","thumbnail","title","auth","sessionKey","componentsConfig","components","containers","pages","details","host","port","twitter","publishing","additionalClaimAddresses","disabled","disabledMessage","primaryClaimAddress","thumbnailChannel","thumbnailChannelId","uploadDirectory","configure","config","console","log","value","_reactRedux","_channel","_publish","_view","_view2","obj","default","mapStateToProps","_ref","channel","site","channelName","loggedInChannel","channelShortId","shortId","channelLongId","longId","siteDescription","mapDispatchToProps","dispatch","onChannelLogin","updateLoggedInChannel","updateSelectedChannel","onChannelLogout","connect","selectFile","file","type","actions","FILE_SELECTED","data","clearFile","FILE_CLEAR","updateMetadata","METADATA_UPDATE","updateClaim","CLAIM_UPDATE","setPublishInChannel","SET_PUBLISH_IN_CHANNEL","updatePublishStatus","status","message","PUBLISH_STATUS_UPDATE","updateError","ERROR_UPDATE","SELECTED_CHANNEL_UPDATE","toggleMetadataInputs","showMetadataInputs","TOGGLE_METADATA_INPUTS","onNewThumbnail","THUMBNAIL_NEW","startPublish","history","PUBLISH_START","_publish_action_types","newObj","key","defaultDescription","defaultThumbnail","siteHost","siteTitle","siteTwitter","parseJSON","response","json","checkStatus","jsonResponse","error","Error","request","url","options","fetch","then","Promise","all","_ref2","_slicedToArray","sliceIterator","arr","_arr","_n","_d","_e","undefined","_s","_i","Symbol","iterator","next","done","push","length","err","Array","isArray","TypeError","Sequelize","logger","_require","database","username","password","db","sequelize","dialect","dialectOptions","decimalNumbers","logging","pool","max","min","idle","acquire","authenticate","info","catch","Certificate","Channel","Claim","File","Request","User","import","keys","forEach","modelName","associate","upsert","Model","values","condition","tableName","findOne","where","debug","update","create","_interopRequireDefault","_classCallCheck","instance","Constructor","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","constructor","writable","setPrototypeOf","__proto__","_createClass","defineProperties","target","props","descriptor","protoProps","staticProps","_react","_react2","_propTypes","_propTypes2","_ActiveStatusBar","_ActiveStatusBar2","_InactiveStatusBar","_InactiveStatusBar2","ProgressBar","_React$Component","getPrototypeOf","state","bars","index","incrementer","createBars","bind","startProgressBar","updateProgressBar","stopProgressBar","size","isActive","setState","updateInterval","setInterval","clearInterval","createElement","map","bar","Component","propTypes","number","isRequired","onHandleShowPageUri","params","HANDLE_SHOW_URI","onRequestError","REQUEST_ERROR","onNewChannelRequest","channelId","requestType","requestId","CHANNEL_REQUEST_NEW","onNewAssetRequest","id","extension","ASSET_REQUEST_NEW","modifier","onRequestUpdate","REQUEST_UPDATE","addRequestToRequestList","REQUEST_LIST_ADD","addAssetToAssetList","claimId","claimData","ASSET_ADD","addNewChannelToChannelList","claimsData","CHANNEL_ADD","onUpdateChannelClaims","channelKey","page","CHANNEL_CLAIMS_UPDATE_ASYNC","updateChannelClaims","channelListId","CHANNEL_CLAIMS_UPDATE_SUCCESS","fileRequested","FILE_REQUESTED","updateFileAvailability","FILE_AVAILABILITY_UPDATE","updateDisplayAssetError","DISPLAY_ASSET_ERROR","_show_action_types","_show_request_types","_NavBar","_NavBar2","ErrorPage","apply","arguments","className","string","_reactGa","_reactGa2","_reactRouterDom","initialize","GAListener","sendPageView","location","listen","set","pathname","pageview","children","withRouter","_show","_show2","show","displayAsset","asset","selectAsset","onFileRequest","publish","fileError","setFileError","_SEO","_SEO2","AboutPage","pageTitle","pageUri","href","Logo","version","x","y","height","viewBox","enableBackground","Link","to","transform","fontSize","fontFamily","fill","stroke","strokeWidth","strokeLinecap","NavBarChannelDropdown","handleSelection","defaultSelection","VIEW","LOGOUT","onChange","loggedInChannelName","ActiveStatusBar","InactiveStatusBar","requestList","assetList","assetKey","selectShowState","previousRequest","channelList","defaults","_ref$site","_objectWithoutProperties","indexOf","_extends","assign","source","ExpandingTextarea","_Component","_handleChange","adjustTextarea","event","_ref$target","el","style","scrollHeight","_this2","rest","ref","func","PublishPreview","imgSource","setPreviewImageSource","newProps","setPreviewImageSourceFromFile","previewReader","FileReader","readAsDataURL","onloadend","result","src","dimPreview","alt","bool","UrlMiddle","publishInChannel","selectedChannel","loggedInChannelShortId","channelError","onPublishInChannelChange","onChannelSelect","metadata","onMetadataChange","fileName","claim","urlError","onClaimChange","onUrlError","license","nsfw","onToggleMetadataInputs","Path","getSubDirectoryNames","thisFolder","resolve","__dirname","_PublishTool","_PublishTool2","HomePage","axios","_require$api","api","apiHost","apiPort","lbryApiUri","_require2","chooseGaLbrynetPublishLabel","sendGATimingEvent","handleLbrynetResponse","reject","JSON","stringify","publishClaim","publishParams","gaStartTime","Date","now","post","method","getClaim","uri","timeout","getClaimList","claimName","resolveUri","getDownloadDirectory","_ref3","download_directory","createChannel","channel_name","amount","createServeEventParams","headers","ip","originalUrl","eventCategory","eventAction","eventLabel","ipOverride","userAgentOverride","createPublishTimingEventParams","category","variable","label","startTime","endTime","userTimingCategory","userTimingVariableName","userTimingTime","userTimingLabel","sendGoogleAnalyticsEvent","visitorId","replace","ua","strictCidFormat","https","sendGoogleAnalyticsTiming","timing","sendGAServeEvent","channel_id","getDeepestChildValue","parent","childrenKeys","childKey","shift","child","_typeof","dynamicImport","filePath","folders","split","filter","folderName","customComponent","createBasicCanonicalLink","createAssetCanonicalLink","certificateId","_asset$claimData","createChannelCanonicalLink","createCanonicalLink","validateFile","test","REGEXP_INVALID_CLAIM","REGEXP_INVALID_CHANNEL","REGEXP_ADDRESS","CHANNEL_CHAR","parseIdentifier","identifier","componentsRegex","RegExp","_componentsRegex$exec","exec","match","_componentsRegex$exec2","modifierSeperator","isChannel","startsWith","nameBadChars","join","channelClaimId","parseClaim","_componentsRegex$exec3","_componentsRegex$exec4","extensionSeperator","determineOgThumbnailContentType","substring","lastIndexOf","createBasicMetaTags","content","createChannelMetaTags","createAssetMetaTags","contentType","embedUrl","showUrl","fileExt","ogTitle","ogDescription","ogThumbnailContentType","ogThumbnail","metaTags","createMetaTags","createPageTitle","CHANNEL_UPDATE","_channel_action_types","_Logo","_Logo2","_NavBarChannelOptionsDropdown","_NavBarChannelOptionsDropdown2","_request","_request2","NavBar","checkForLoggedInUser","logoutUser","credentials","shortChannelId","_this3","selectedOptions","NavLink","activeClassName","exact","_reactHelmet","_reactHelmet2","_pageTitle","_metaTags","_canonicalLink","SEO","_props","_props2","canonicalLink","meta","link","rel","_ChannelLoginForm","_ChannelLoginForm2","_ChannelCreateForm","_ChannelCreateForm2","LoginPage","_defineProperty","ChannelLoginForm","handleInput","loginToChannel","preventDefault","body","Headers","Content-Type","success","htmlFor","placeholder","channelPassword","onClick","_ProgressBar","_ProgressBar2","ChannelCreateForm","handleChannelInput","input","cleanseChannelInput","updateIsChannelAvailable","channelWithAtSymbol","checkIsPasswordProvided","checkIsChannelAvailable","makePublishChannelRequest","_ErrorPage","_ErrorPage2","_ShowAssetLite","_ShowAssetLite2","_ShowAssetDetails","_ShowAssetDetails2","_ShowChannel","_ShowChannel2","ShowPage","nextProps","CHANNEL","ASSET_LITE","ASSET_DETAILS","_AssetDisplay","_AssetDisplay2","ShowLite","_asset_display_states","AssetDisplay","_props$asset$claimDat","_props$asset$claimDat2","controls","poster","_AssetTitle","_AssetTitle2","_AssetInfo","_AssetInfo2","ShowAssetDetails","AssetTitle","AssetInfo","copyToClipboard","elementToCopy","dataset","elementtocopy","document","getElementById","select","execCommand","_props$asset","hidden","readOnly","spellCheck","data-elementtocopy","download","_ChannelClaimsDisplay","_ChannelClaimsDisplay2","ShowChannel","_AssetPreview","_AssetPreview2","ChannelClaimsDisplay","showNextResultsPage","showPreviousResultsPage","currentPage","previousPage","parseInt","showNewPage","nextPage","_props$channel","_props$channel$claims","claims","totalPages","AssetPreview","_ref$claimData","directSourceLink","showUrlLink","FourOhForPage","lstatSync","readdirSync","root","fullPath","isDirectory","_publish_channel_select_states","states","ChannelSelect","toggleAnonymousPublish","selectedOption","checked","LOGIN","CREATE","_file","_PublishPreview","_PublishPreview2","Dropzone","dragOver","mouseOver","handleDrop","handleDragOver","handleDragEnd","handleDragEnter","handleDragLeave","handleMouseEnter","handleMouseLeave","handleClick","handleFileInput","chooseFile","dt","dataTransfer","items","kind","droppedFile","getAsFile","remove","clearData","click","fileList","files","accept","encType","onDrop","onDragOver","onDragEnd","onDragEnter","onDragLeave","onMouseEnter","onMouseLeave","_Dropzone","_Dropzone2","_PublishTitleInput","_PublishTitleInput2","_PublishUrlInput","_PublishUrlInput2","_PublishThumbnailInput","_PublishThumbnailInput2","_PublishMetadataInputs","_PublishMetadataInputs2","_ChannelSelect","_ChannelSelect2","PublishDetails","onPublishSubmit","PublishTitleInput","e","_PublishUrlMiddleDisplay","_PublishUrlMiddleDisplay2","PublishUrlInput","setClaimName","validateClaim","cleanseInput","fileNameWithoutEnding","cleanClaimName","dataURItoBlob","dataURI","byteString","atob","mimeString","ia","Uint8Array","charCodeAt","Blob","PublishThumbnailInput","videoSource","sliderMinRange","sliderMaxRange","sliderValue","handleVideoLoadedData","handleSliderChange","createThumbnail","setVideoSource","dataUri","blob","URL","createObjectURL","duration","totalMinutes","Math","floor","totalSeconds","currentTime","video","canvas","width","videoWidth","videoHeight","getContext","drawImage","dataUrl","toDataURL","snapshot","_state","preload","muted","display","playsInline","onLoadedData","onSeeked","_ExpandingTextArea","_ExpandingTextArea2","PublishMetadataInputs","toggleShowInputs","handleSelect","rows","maxLength","maxHeight","PublishDisabledMessage","_publish_claim_states","publishStates","PublishStatus","LOAD_START","LOADING","PUBLISHING","SUCCESS","FAILED","_PublishDetails","_PublishDetails2","_PublishStatus","_PublishStatus2","_PublishDisabledMessage","_PublishDisabledMessage2","PublishTool","MysqlConfig","SlackConfig","slackWebHook","slackErrorChannel","slackInfoChannel","returnShortId","claimsArray","claimIndex","shortIdLength","findIndex","element","possibleMatches","slice","fs","parsePublishApiRequestBody","parsePublishApiRequestFiles","path","validateFileTypeAndSize","fileType","thumbnailFileName","thumbnailFilePath","thumbnailFileType","createBasicPublishParams","trim","file_path","bid","author","language","claim_address","createThumbnailPublishParams","deleteTemporaryFile","unlink","addGetResultsToFileData","fileInfo","getResult","file_name","download_path","createFileData","outpoint","address","handleErrorResponse","res","useObjectPropertiesIfNoKeys","_module$exports$retur","returnErrorMessageAndStatus","_module$exports$retur2","createErrorResponsePayload","code","newErrorObject","getOwnPropertyNames","returnPaginatedChannelClaims","getClaimId","getClaimIdByChannel","getClaimIdByClaim","getLongClaimId","longClaimId","getLongChannelId","longChannelId","getClaimIdByLongChannelId","getChannelData","longChannelClaimId","getShortChannelIdFromLongChannelId","_ref4","shortChannelClaimId","getChannelClaims","getAllChannelClaims","_ref5","_ref6","channelClaimsArray","paginatedChannelViewData","getLocalFileRecord","dataValues","_server","_redux","_reducers","_reducers2","_GAListener","_GAListener2","_app","_app2","_renderFullPage","_renderFullPage2","req","context","store","createStore","html","renderToString","Provider","StaticRouter","helmet","renderStatic","redirect","preloadedState","getState","send","_publish2","_channel2","_site","_site2","combineReducers","LOCAL_CHECK","UNAVAILABLE","ERROR","AVAILABLE","_dynamicImport","_AboutPage","_AboutPage2","_LoginPage","_LoginPage2","_ShowPage","_ShowPage2","_FourOhFourPage","_FourOhFourPage2","App","Switch","Route","component","webpackContext","webpackContextResolve","./canonicalLink","./canonicalLink.js","./dynamicImport","./dynamicImport.js","./file","./file.js","./lbryUri","./lbryUri.js","./metaTags","./metaTags.js","./pageTitle","./pageTitle.js","./publish","./publish.js","./request","./request.js","./validate","./validate.js","createPublishMetadata","createPublishFormData","fd","FormData","append","createThumbnailUrl","validateChannelSelection","validatePublishParams","toString","selectSiteState","selectSiteHost","Server","Components","Containers","Pages","configureMysql","mysqlConfig","configureSite","siteConfig","PORT","configureSlack","slackConfig","createApp","app","express","enable","use","static","bodyParser","urlencoded","extended","verbose","passport","serializeUser","serializeSpeechUser","deserializeUser","deserializeSpeechUser","localSignupStrategy","localLoginStrategy","cookieSession","maxAge","session","hbs","expressHandlebars","defaultLayout","handlebars","Handlebars","engine","server","http","start","sync","user","PassportLocalStrategy","Strategy","lbryApi","usernameField","passwordField","userInfo","tx","userData","userName","channelData","claim_id","certificateData","newUser","newChannel","newCertificate","setChannel","setUser","lbryConfig","STRING","BOOLEAN","INTEGER","TEXT","DECIMAL","define","claimSequence","decodedClaim","depth","effectiveAmount","hasSignature","hex","nout","txid","validAtHeight","valueVersion","claimType","certificateVersion","keyType","publicKey","freezeTableName","belongsTo","foreignKey","allowNull","findAll","order","getLongChannelIdFromShortChannelId","$like","getLongChannelIdFromChannelName","validateLongChannelId","_this4","hasOne","determineFileExtensionFromContentType","determineThumbnail","storedThumbnail","prepareClaimData","licenseUrl","preview","metadataVersion","sourceType","sourceVersion","streamVersion","getShortClaimIdFromLongClaimId","raw","getLongClaimIdFromShortClaimId","getTopFreeClaimIdByClaimName","_this5","validateLongClaimId","_this6","resolveClaim","_this7","claimArray","defaultValue","trendingEligible","hasMany","getRecentClaims","limit","action","ipAddress","bcrypt","comparePassword","compare","changePassword","newPassword","genSalt","saltError","salt","hash","hashError","hook","returnUserAndChannelInfo","userInstance","getChannel","isMatch","logIn","logout","multipart","multipartMiddleware","uploadDir","claimNameIsAvailable","checkChannelAvailability","_require3","_require4","errorHandlers","_require5","_require6","authenticateUser","_require7","availableName","claimsList","resolveResult","fileData","_ref7","_ref8","_ref9","_ref10","_ref10$","completed","_ref11","_ref12","resolvedUri","_ref13","_parsePublishApiReque","_parsePublishApiReque2","_ref14","_ref15","_ref15$","thumbnailPublishParams","lbryTx","_ref16","_ref17","_ref18","claimInfo","_ref19","publishHelpers","_require$publishing","Op","publishResults","fileRecord","claimRecord","upsertCriteria","setClaim","setFile","claimAddresses","attributes","or","authenticateChannelCredentials","userPassword","channelFindParams","determineTotalPages","paginationPage","getPageFromQuery","extractPageFromClaims","determinePreviousPage","determineNextPage","totalResults","determineTotalClaims","pageNumber","claimStartIndex","claimEndIndex","totalClaims","fullPages","handlePageRender","render","layout","initialState","publishSubmit","googleAnalyticsId","_siteConfig$assetDefa","_siteConfig$details","determineResponseType","flipClaimNameAndIdForBackwardsCompatibility","logRequestData","getClaimIdAndServeAsset","lbryUri","handleShowRender","hasFileExtension","parseModifier","responseType","_lbryUri$parseIdentif","_flipClaimNameAndIdFo","_flipClaimNameAndIdFo2","clientAcceptsHtml","requestIsFromBrowser","clientWantsAsset","range","imageIsWanted","videoIsWanted","isValidClaimId","isValidShortId","isValidShortIdOrClaimId","serveAssetToClient","NO_FILE","sendFileOptions","X-Content-Type-Options","sendFile","fullClaimId","tempName","proto","_componentsRegex$exec5","_componentsRegex$exec6","_index","_index2","_index3","_index4","_reduxSaga","_reduxSaga2","_effects","_show_uri","returnSagaWithParams","saga","regeneratorRuntime","mark","_callee","wrap","_context","prev","stop","sagaMiddleware","middleware","applyMiddleware","run","parseAndUpdateIdentifierAndClaim","_lbryUri$parseClaim","_lbryUri2","t0","put","abrupt","sent","_show_asset","newAssetRequest","_marked","parseAndUpdateClaimOnly","_lbryUri$parseIdentif2","_lbryUri$parseClaim2","_context2","_show_channel","newChannelRequest","t1","_marked2","handleShowPageUri","_action$data","_context3","_marked3","watchHandleShowPageUri","_context4","takeLatest","_marked4","_lbryUri","_assetApi","getShortId","getClaimData","t2","watchNewAssetRequest","_ref$data","_channelApi","watchNewChannelRequest","getNewClaimsAndUpdateChannel","_action$data2","watchUpdateChannelClaims","logLevel","winston","transports","Console","level","timestamp","colorize","prettyPrint","handleExceptions","humanReadableUnhandledException","warn","silly","loggerConfig","winstonSlackWebHook","SlackWebHook","add","webhookUrl","iconEmoji","./","./ActiveStatusBar","./ActiveStatusBar/","./ActiveStatusBar/index","./ActiveStatusBar/index.jsx","./AssetPreview","./AssetPreview/","./AssetPreview/index","./AssetPreview/index.js","./AssetPreview/view","./AssetPreview/view.jsx","./ExpandingTextArea","./ExpandingTextArea/","./ExpandingTextArea/index","./ExpandingTextArea/index.jsx","./GAListener","./GAListener/","./GAListener/index","./GAListener/index.jsx","./InactiveStatusBar","./InactiveStatusBar/","./InactiveStatusBar/index","./InactiveStatusBar/index.jsx","./Logo","./Logo/","./Logo/index","./Logo/index.jsx","./NavBarChannelOptionsDropdown","./NavBarChannelOptionsDropdown/","./NavBarChannelOptionsDropdown/index","./NavBarChannelOptionsDropdown/index.jsx","./ProgressBar","./ProgressBar/","./ProgressBar/index","./ProgressBar/index.jsx","./PublishPreview","./PublishPreview/","./PublishPreview/index","./PublishPreview/index.jsx","./PublishUrlMiddleDisplay","./PublishUrlMiddleDisplay/","./PublishUrlMiddleDisplay/index","./PublishUrlMiddleDisplay/index.jsx","./SEO","./SEO/","./SEO/index","./SEO/index.js","./SEO/view","./SEO/view.jsx","./index","./index.js","./AssetDisplay","./AssetDisplay/","./AssetDisplay/index","./AssetDisplay/index.js","./AssetDisplay/view","./AssetDisplay/view.jsx","./AssetInfo","./AssetInfo/","./AssetInfo/index","./AssetInfo/index.js","./AssetInfo/view","./AssetInfo/view.jsx","./AssetTitle","./AssetTitle/","./AssetTitle/index","./AssetTitle/index.js","./AssetTitle/view","./AssetTitle/view.jsx","./ChannelClaimsDisplay","./ChannelClaimsDisplay/","./ChannelClaimsDisplay/index","./ChannelClaimsDisplay/index.js","./ChannelClaimsDisplay/view","./ChannelClaimsDisplay/view.jsx","./ChannelCreateForm","./ChannelCreateForm/","./ChannelCreateForm/index","./ChannelCreateForm/index.js","./ChannelCreateForm/view","./ChannelCreateForm/view.jsx","./ChannelLoginForm","./ChannelLoginForm/","./ChannelLoginForm/index","./ChannelLoginForm/index.js","./ChannelLoginForm/view","./ChannelLoginForm/view.jsx","./ChannelSelect","./ChannelSelect/","./ChannelSelect/index","./ChannelSelect/index.js","./ChannelSelect/view","./ChannelSelect/view.jsx","./Dropzone","./Dropzone/","./Dropzone/index","./Dropzone/index.js","./Dropzone/view","./Dropzone/view.jsx","./FourOhFourPage","./FourOhFourPage/","./FourOhFourPage/index","./FourOhFourPage/index.jsx","./FourOhFourPage/view","./FourOhFourPage/view.jsx","./NavBar","./NavBar/","./NavBar/index","./NavBar/index.js","./NavBar/view","./NavBar/view.jsx","./PublishDetails","./PublishDetails/","./PublishDetails/index","./PublishDetails/index.js","./PublishDetails/view","./PublishDetails/view.jsx","./PublishDisabledMessage","./PublishDisabledMessage/","./PublishDisabledMessage/index","./PublishDisabledMessage/index.js","./PublishDisabledMessage/view","./PublishDisabledMessage/view.jsx","./PublishMetadataInputs","./PublishMetadataInputs/","./PublishMetadataInputs/index","./PublishMetadataInputs/index.js","./PublishMetadataInputs/view","./PublishMetadataInputs/view.jsx","./PublishStatus","./PublishStatus/","./PublishStatus/index","./PublishStatus/index.js","./PublishStatus/view","./PublishStatus/view.jsx","./PublishThumbnailInput","./PublishThumbnailInput/","./PublishThumbnailInput/index","./PublishThumbnailInput/index.js","./PublishThumbnailInput/view","./PublishThumbnailInput/view.jsx","./PublishTitleInput","./PublishTitleInput/","./PublishTitleInput/index","./PublishTitleInput/index.js","./PublishTitleInput/view","./PublishTitleInput/view.jsx","./PublishTool","./PublishTool/","./PublishTool/index","./PublishTool/index.js","./PublishTool/view","./PublishTool/view.jsx","./PublishUrlInput","./PublishUrlInput/","./PublishUrlInput/index","./PublishUrlInput/index.js","./PublishUrlInput/view","./PublishUrlInput/view.jsx","./ShowAssetDetails","./ShowAssetDetails/","./ShowAssetDetails/index","./ShowAssetDetails/index.js","./ShowAssetDetails/view","./ShowAssetDetails/view.jsx","./ShowAssetLite","./ShowAssetLite/","./ShowAssetLite/index","./ShowAssetLite/index.js","./ShowAssetLite/view","./ShowAssetLite/view.jsx","./ShowChannel","./ShowChannel/","./ShowChannel/index","./ShowChannel/index.js","./ShowChannel/view","./ShowChannel/view.jsx","./AboutPage","./AboutPage/","./AboutPage/index","./AboutPage/index.jsx","./ErrorPage","./ErrorPage/","./ErrorPage/index","./ErrorPage/index.jsx","./HomePage","./HomePage/","./HomePage/index","./HomePage/index.jsx","./LoginPage","./LoginPage/","./LoginPage/index","./LoginPage/index.js","./LoginPage/view","./LoginPage/view.jsx","./ShowPage","./ShowPage/","./ShowPage/index","./ShowPage/index.js","./ShowPage/view","./ShowPage/view.jsx"],"mappings":"AAAAA,OAAOC,QACE,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAH,OAGA,IAAAD,GAAAK,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAN,WAUA,OANAC,GAAAE,GAAAI,KAAAR,EAAAC,QAAAD,IAAAC,QAAAE,GAGAH,EAAAO,GAAA,EAGAP,EAAAC,QAvBA,GAAAI,KA4DA,OAhCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,SAAAV,EAAAW,EAAAC,GACAV,EAAAW,EAAAb,EAAAW,IACAG,OAAAC,eAAAf,EAAAW,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAApB,GACA,GAAAa,GAAAb,KAAAqB,WACA,WAA2B,MAAArB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAG,GAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDpB,EAAAuB,EAAA,IAGAvB,IAAAwB,EA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C,qBAAA,GACAC,yBAAA,GACA/H,UAAA,GACAC,aAAA,GAWA/Y,GAAAtuB,KAAA,WACA,MAAA1K,QAAA0K,KAAA8D,IAEAwqB,EAAAhgB,QAAAigB,EACAh6B,EAAAC,QAAA85B,EACAA,EAAAvpB,GAAA,K1KikWM,SAAUxQ,EAAQC,EAASE,GAEjC,YAGAY,QAAOC,eAAef,EAAS,cAC7B2D,OAAO,G2KxtWIiuB,cAAa,aACbC,UAAU,UACVC,aAAa,aACbC,UAAU,UACVC,SAAS,U3K8tWhB,SAAUjyB,EAAQC,EAASE,G4KrsWjC,QAAA45B,GAAApC,GACA,MAAAx3B,GAAA65B,EAAArC,IAEA,QAAAqC,GAAArC,GACA,GAAAnnB,GAAAjB,EAAAooB,EACA,MAAAnnB,EAAA,GACA,SAAAvI,OAAA,uBAAA0vB,EAAA,KACA,OAAAnnB,GApCA,GAAAjB,IACAqgC,KAAA,GACAiL,cAAA,GACAC,eAAA,GACAC,oBAAA,GACAC,wBAAA,GACAC,cAAA,GACAC,eAAA,GACAC,oBAAA,GACAC,wBAAA,GACAC,aAAA,GACAC,cAAA,GACAC,mBAAA,GACAC,uBAAA,GACAC,cAAA,GACAC,eAAA,GACAC,oBAAA,GACAC,uBAAA,GACAC,mBAAA,GACAC,uBAAA,GACAC,aAAA,GACAC,cAAA,GACAC,mBAAA,GACAC,sBAAA,GACAC,kBAAA,GACAC,sBAAA,GACAvJ,UAAA,GACAC,aAAA,GAWA/Y,GAAAtuB,KAAA,WACA,MAAA1K,QAAA0K,KAAA8D,IAEAwqB,EAAAhgB,QAAAigB,EACAh6B,EAAAC,QAAA85B,EACAA,EAAAvpB,GAAA","file":"index.js","sourcesContent":["module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 115);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react\");\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-redux\");\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston\");\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction SiteConfig() {\n var _this = this;\n\n this.analytics = {\n googleId: 'default'\n };\n this.assetDefaults = {\n description: 'An asset published on Spee.ch',\n thumbnail: 'https://spee.ch/assets/img/video_thumb_default.png',\n title: 'Spee.ch'\n };\n this.auth = {\n sessionKey: 'default'\n };\n this.componentsConfig = {\n components: {},\n containers: {},\n pages: {}\n };\n this.details = {\n description: 'Open-source, decentralized image and video sharing.',\n host: 'default',\n port: 3000,\n title: 'Spee.ch',\n twitter: '@spee_ch'\n };\n this.publishing = {\n additionalClaimAddresses: [],\n disabled: false,\n disabledMessage: 'Please check back soon.',\n primaryClaimAddress: 'default',\n thumbnailChannel: 'default',\n thumbnailChannelId: 'default',\n uploadDirectory: '/home/lbry/Uploads'\n };\n this.configure = function (config) {\n if (!config) {\n return console.log('No site config received.');\n }\n var analytics = config.analytics,\n assetDefaults = config.assetDefaults,\n auth = config.auth,\n componentsConfig = config.componentsConfig,\n details = config.details,\n publishing = config.publishing;\n\n _this.analytics = analytics;\n _this.assetDefaults = assetDefaults;\n _this.auth = auth;\n _this.details = details;\n _this.publishing = publishing;\n _this.componentsConfig = componentsConfig;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-router-dom\");\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _channel = __webpack_require__(64);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(65);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel,\n site = _ref.site;\n\n return {\n channelName: channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId: channel.loggedInChannel.longId,\n siteDescription: site.description\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n },\n onChannelLogout: function onChannelLogout() {\n dispatch((0, _channel.updateLoggedInChannel)(null, null, null));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.selectFile = selectFile;\nexports.clearFile = clearFile;\nexports.updateMetadata = updateMetadata;\nexports.updateClaim = updateClaim;\nexports.setPublishInChannel = setPublishInChannel;\nexports.updatePublishStatus = updatePublishStatus;\nexports.updateError = updateError;\nexports.updateSelectedChannel = updateSelectedChannel;\nexports.toggleMetadataInputs = toggleMetadataInputs;\nexports.onNewThumbnail = onNewThumbnail;\nexports.startPublish = startPublish;\n\nvar _publish_action_types = __webpack_require__(104);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nfunction _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; } }\n\n// export action creators\nfunction selectFile(file) {\n return {\n type: actions.FILE_SELECTED,\n data: file\n };\n};\n\nfunction clearFile() {\n return {\n type: actions.FILE_CLEAR\n };\n};\n\nfunction updateMetadata(name, value) {\n return {\n type: actions.METADATA_UPDATE,\n data: {\n name: name,\n value: value\n }\n };\n};\n\nfunction updateClaim(value) {\n return {\n type: actions.CLAIM_UPDATE,\n data: value\n };\n};\n\nfunction setPublishInChannel(channel) {\n return {\n type: actions.SET_PUBLISH_IN_CHANNEL,\n channel: channel\n };\n};\n\nfunction updatePublishStatus(status, message) {\n return {\n type: actions.PUBLISH_STATUS_UPDATE,\n data: {\n status: status,\n message: message\n }\n };\n};\n\nfunction updateError(name, value) {\n return {\n type: actions.ERROR_UPDATE,\n data: {\n name: name,\n value: value\n }\n };\n};\n\nfunction updateSelectedChannel(channelName) {\n return {\n type: actions.SELECTED_CHANNEL_UPDATE,\n data: channelName\n };\n};\n\nfunction toggleMetadataInputs(showMetadataInputs) {\n return {\n type: actions.TOGGLE_METADATA_INPUTS,\n data: showMetadataInputs\n };\n};\n\nfunction onNewThumbnail(file) {\n return {\n type: actions.THUMBNAIL_NEW,\n data: file\n };\n};\n\nfunction startPublish(history) {\n return {\n type: actions.PUBLISH_START,\n data: { history: history }\n };\n}\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(66);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var site = _ref.site;\n var defaultDescription = site.defaultDescription,\n defaultThumbnail = site.defaultThumbnail,\n siteDescription = site.description,\n siteHost = site.host,\n siteTitle = site.title,\n siteTwitter = site.twitter;\n\n return {\n defaultDescription: defaultDescription,\n defaultThumbnail: defaultThumbnail,\n siteDescription: siteDescription,\n siteHost: siteHost,\n siteTitle: siteTitle,\n siteTwitter: siteTwitter\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.default = request;\n\n__webpack_require__(152);\n\n/**\n * Parses the JSON returned by a network request\n *\n * @param {object} response A response from a network request\n *\n * @return {object} The parsed JSON from the request\n */\nfunction parseJSON(response) {\n if (response.status === 204 || response.status === 205) {\n return null;\n }\n return response.json();\n}\n\n/**\n * Parses the status returned by a network request\n *\n * @param {object} response A response from a network request\n * @param {object} response The parsed JSON from the network request\n *\n * @return {object | undefined} Returns object with status and statusText, or undefined\n */\nfunction checkStatus(response, jsonResponse) {\n if (response.status >= 200 && response.status < 300) {\n return jsonResponse;\n }\n var error = new Error(jsonResponse.message);\n error.response = response;\n throw error;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @param {string} url The URL we want to request\n * @param {object} [options] The options we want to pass to \"fetch\"\n *\n * @return {object} The response data\n */\n\nfunction request(url, options) {\n return fetch(url, options).then(function (response) {\n return Promise.all([response, parseJSON(response)]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n response = _ref2[0],\n jsonResponse = _ref2[1];\n\n return checkStatus(response, jsonResponse);\n });\n}\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Sequelize = __webpack_require__(95);\nvar logger = __webpack_require__(2);\n\nconsole.log('exporting sequelize models');\n\nvar _require = __webpack_require__(92),\n database = _require.database,\n username = _require.username,\n password = _require.password;\n\nvar db = {};\n// set sequelize options\nvar sequelize = new Sequelize(database, username, password, {\n host: 'localhost',\n dialect: 'mysql',\n dialectOptions: { decimalNumbers: true }, // fix to ensure DECIMAL will not be stored as a string\n logging: false,\n pool: {\n max: 5,\n min: 0,\n idle: 10000,\n acquire: 10000\n }\n});\n\n// establish mysql connection\nsequelize.authenticate().then(function () {\n logger.info('Sequelize has established mysql connection successfully.');\n}).catch(function (err) {\n logger.error('Sequelize was unable to connect to the database:', err);\n});\n\n// manually add each model to the db object\nvar Certificate = __webpack_require__(132);\nvar Channel = __webpack_require__(133);\nvar Claim = __webpack_require__(134);\nvar File = __webpack_require__(135);\nvar Request = __webpack_require__(136);\nvar User = __webpack_require__(137);\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(function (modelName) {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = function (Model, values, condition, tableName) {\n return Model.findOne({\n where: condition\n }).then(function (obj) {\n if (obj) {\n // update\n logger.debug('updating record in db.' + tableName);\n return obj.update(values);\n } else {\n // insert\n logger.debug('creating record in db.' + tableName);\n return Model.create(values);\n }\n }).catch(function (error) {\n logger.error(tableName + '.upsert error', error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(14);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _ActiveStatusBar = __webpack_require__(24);\n\nvar _ActiveStatusBar2 = _interopRequireDefault(_ActiveStatusBar);\n\nvar _InactiveStatusBar = __webpack_require__(25);\n\nvar _InactiveStatusBar2 = _interopRequireDefault(_InactiveStatusBar);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ProgressBar = function (_React$Component) {\n _inherits(ProgressBar, _React$Component);\n\n function ProgressBar(props) {\n _classCallCheck(this, ProgressBar);\n\n var _this = _possibleConstructorReturn(this, (ProgressBar.__proto__ || Object.getPrototypeOf(ProgressBar)).call(this, props));\n\n _this.state = {\n bars: [],\n index: 0,\n incrementer: 1\n };\n _this.createBars = _this.createBars.bind(_this);\n _this.startProgressBar = _this.startProgressBar.bind(_this);\n _this.updateProgressBar = _this.updateProgressBar.bind(_this);\n _this.stopProgressBar = _this.stopProgressBar.bind(_this);\n return _this;\n }\n\n _createClass(ProgressBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.createBars();\n this.startProgressBar();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.stopProgressBar();\n }\n }, {\n key: 'createBars',\n value: function createBars() {\n var bars = [];\n for (var i = 0; i <= this.props.size; i++) {\n bars.push({ isActive: false });\n }\n this.setState({ bars: bars });\n }\n }, {\n key: 'startProgressBar',\n value: function startProgressBar() {\n this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);\n }\n }, {\n key: 'updateProgressBar',\n value: function updateProgressBar() {\n var index = this.state.index;\n var incrementer = this.state.incrementer;\n var bars = this.state.bars;\n // flip incrementer if necessary, to stay in bounds\n if (index < 0 || index > this.props.size) {\n incrementer = incrementer * -1;\n index += incrementer;\n }\n // update the indexed bar\n if (incrementer > 0) {\n bars[index].isActive = true;\n } else {\n bars[index].isActive = false;\n };\n // increment index\n index += incrementer;\n // update state\n this.setState({\n bars: bars,\n incrementer: incrementer,\n index: index\n });\n }\n }, {\n key: 'stopProgressBar',\n value: function stopProgressBar() {\n clearInterval(this.updateInterval);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n this.state.bars.map(function (bar, index) {\n return bar.isActive ? _react2.default.createElement(_ActiveStatusBar2.default, { key: index }) : _react2.default.createElement(_InactiveStatusBar2.default, { key: index });\n })\n );\n }\n }]);\n\n return ProgressBar;\n}(_react2.default.Component);\n\n;\n\nProgressBar.propTypes = {\n size: _propTypes2.default.number.isRequired\n};\n\nexports.default = ProgressBar;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.onHandleShowPageUri = onHandleShowPageUri;\nexports.onRequestError = onRequestError;\nexports.onNewChannelRequest = onNewChannelRequest;\nexports.onNewAssetRequest = onNewAssetRequest;\nexports.onRequestUpdate = onRequestUpdate;\nexports.addRequestToRequestList = addRequestToRequestList;\nexports.addAssetToAssetList = addAssetToAssetList;\nexports.addNewChannelToChannelList = addNewChannelToChannelList;\nexports.onUpdateChannelClaims = onUpdateChannelClaims;\nexports.updateChannelClaims = updateChannelClaims;\nexports.fileRequested = fileRequested;\nexports.updateFileAvailability = updateFileAvailability;\nexports.updateDisplayAssetError = updateDisplayAssetError;\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show_request_types = __webpack_require__(112);\n\nfunction _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; } }\n\n// basic request parsing\nfunction onHandleShowPageUri(params) {\n return {\n type: actions.HANDLE_SHOW_URI,\n data: params\n };\n};\n\nfunction onRequestError(error) {\n return {\n type: actions.REQUEST_ERROR,\n data: error\n };\n};\n\nfunction onNewChannelRequest(channelName, channelId) {\n var requestType = _show_request_types.CHANNEL;\n var requestId = 'cr#' + channelName + '#' + channelId;\n return {\n type: actions.CHANNEL_REQUEST_NEW,\n data: { requestType: requestType, requestId: requestId, channelName: channelName, channelId: channelId }\n };\n};\n\nfunction onNewAssetRequest(name, id, channelName, channelId, extension) {\n var requestType = extension ? _show_request_types.ASSET_LITE : _show_request_types.ASSET_DETAILS;\n var requestId = 'ar#' + name + '#' + id + '#' + channelName + '#' + channelId;\n return {\n type: actions.ASSET_REQUEST_NEW,\n data: {\n requestType: requestType,\n requestId: requestId,\n name: name,\n modifier: {\n id: id,\n channel: {\n name: channelName,\n id: channelId\n }\n }\n }\n };\n};\n\nfunction onRequestUpdate(requestType, requestId) {\n return {\n type: actions.REQUEST_UPDATE,\n data: {\n requestType: requestType,\n requestId: requestId\n }\n };\n};\n\nfunction addRequestToRequestList(id, error, key) {\n return {\n type: actions.REQUEST_LIST_ADD,\n data: { id: id, error: error, key: key }\n };\n};\n\n// asset actions\n\nfunction addAssetToAssetList(id, error, name, claimId, shortId, claimData) {\n return {\n type: actions.ASSET_ADD,\n data: { id: id, error: error, name: name, claimId: claimId, shortId: shortId, claimData: claimData }\n };\n}\n\n// channel actions\n\nfunction addNewChannelToChannelList(id, name, shortId, longId, claimsData) {\n return {\n type: actions.CHANNEL_ADD,\n data: { id: id, name: name, shortId: shortId, longId: longId, claimsData: claimsData }\n };\n};\n\nfunction onUpdateChannelClaims(channelKey, name, longId, page) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,\n data: { channelKey: channelKey, name: name, longId: longId, page: page }\n };\n};\n\nfunction updateChannelClaims(channelListId, claimsData) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,\n data: { channelListId: channelListId, claimsData: claimsData }\n };\n};\n\n// display a file\n\nfunction fileRequested(name, claimId) {\n return {\n type: actions.FILE_REQUESTED,\n data: { name: name, claimId: claimId }\n };\n};\n\nfunction updateFileAvailability(status) {\n return {\n type: actions.FILE_AVAILABILITY_UPDATE,\n data: status\n };\n};\n\nfunction updateDisplayAssetError(error) {\n return {\n type: actions.DISPLAY_ASSET_ERROR,\n data: error\n };\n};\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(14);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ErrorPage = function (_React$Component) {\n _inherits(ErrorPage, _React$Component);\n\n function ErrorPage() {\n _classCallCheck(this, ErrorPage);\n\n return _possibleConstructorReturn(this, (ErrorPage.__proto__ || Object.getPrototypeOf(ErrorPage)).apply(this, arguments));\n }\n\n _createClass(ErrorPage, [{\n key: 'render',\n value: function render() {\n var error = this.props.error;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'p',\n null,\n error\n )\n )\n );\n }\n }]);\n\n return ErrorPage;\n}(_react2.default.Component);\n\n;\n\nErrorPage.propTypes = {\n error: _propTypes2.default.string.isRequired\n};\n\nexports.default = ErrorPage;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactGa = __webpack_require__(151);\n\nvar _reactGa2 = _interopRequireDefault(_reactGa);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _require = __webpack_require__(3),\n googleId = _require.analytics.googleId;\n\n_reactGa2.default.initialize(googleId);\n\nvar GAListener = function (_React$Component) {\n _inherits(GAListener, _React$Component);\n\n function GAListener() {\n _classCallCheck(this, GAListener);\n\n return _possibleConstructorReturn(this, (GAListener.__proto__ || Object.getPrototypeOf(GAListener)).apply(this, arguments));\n }\n\n _createClass(GAListener, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n }, {\n key: 'sendPageView',\n value: function sendPageView(location) {\n _reactGa2.default.set({ page: location.pathname });\n _reactGa2.default.pageview(location.pathname);\n }\n }, {\n key: 'render',\n value: function render() {\n return this.props.children;\n }\n }]);\n\n return GAListener;\n}(_react2.default.Component);\n\nexports.default = (0, _reactRouterDom.withRouter)(GAListener);\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"prop-types\");\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _channel = __webpack_require__(64);\n\nvar _view = __webpack_require__(68);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(6);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _channel = __webpack_require__(64);\n\nvar _view = __webpack_require__(69);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(6);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onChannelLogin: function onChannelLogin(name, shortId, longId) {\n dispatch((0, _channel.updateLoggedInChannel)(name, shortId, longId));\n dispatch((0, _publish.updateSelectedChannel)(name));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(72);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(11);\n\nvar _show2 = __webpack_require__(28);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var show = _ref.show;\n\n // select error and status\n var error = show.displayAsset.error;\n var status = show.displayAsset.status;\n // select asset\n var asset = (0, _show2.selectAsset)(show);\n // return props\n return {\n error: error,\n status: status,\n asset: asset\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onFileRequest: function onFileRequest(name, claimId) {\n dispatch((0, _show.fileRequested)(name, claimId));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(82);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n file: publish.file,\n thumbnail: publish.thumbnail,\n fileError: publish.error.file\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n selectFile: function selectFile(file) {\n dispatch((0, _publish.selectFile)(file));\n },\n setFileError: function setFileError(value) {\n dispatch((0, _publish.clearFile)());\n dispatch((0, _publish.updateError)('file', value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n// request actions\nvar HANDLE_SHOW_URI = exports.HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nvar REQUEST_ERROR = exports.REQUEST_ERROR = 'REQUEST_ERROR';\nvar REQUEST_UPDATE = exports.REQUEST_UPDATE = 'REQUEST_UPDATE';\nvar ASSET_REQUEST_NEW = exports.ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nvar CHANNEL_REQUEST_NEW = exports.CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nvar REQUEST_LIST_ADD = exports.REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nvar ASSET_ADD = exports.ASSET_ADD = 'ASSET_ADD';\n\n// channel actions\nvar CHANNEL_ADD = exports.CHANNEL_ADD = 'CHANNEL_ADD';\n\nvar CHANNEL_CLAIMS_UPDATE_ASYNC = exports.CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nvar CHANNEL_CLAIMS_UPDATE_SUCCESS = exports.CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nvar FILE_REQUESTED = exports.FILE_REQUESTED = 'FILE_REQUESTED';\nvar FILE_AVAILABILITY_UPDATE = exports.FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nvar DISPLAY_ASSET_ERROR = exports.DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _SEO = __webpack_require__(7);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AboutPage = function (_React$Component) {\n _inherits(AboutPage, _React$Component);\n\n function AboutPage() {\n _classCallCheck(this, AboutPage);\n\n return _possibleConstructorReturn(this, (AboutPage.__proto__ || Object.getPrototypeOf(AboutPage)).apply(this, arguments));\n }\n\n _createClass(AboutPage, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'About', pageUri: 'about' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n { className: 'pull-quote' },\n 'Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/spee_ch' },\n 'TWITTER'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch' },\n 'GITHUB'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://discord.gg/YjYbwhS' },\n 'DISCORD CHANNEL'\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://github.com/lbryio/spee.ch/blob/master/README.md' },\n 'DOCUMENTATION'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a media-hosting site that reads from and publishes content to the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io' },\n 'LBRY'\n ),\n ' blockchain.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://lbry.io/get' },\n 'LBRY'\n ),\n ' network. This means that your images are stored in multiple locations without a single point of failure.'\n ),\n _react2.default.createElement(\n 'h3',\n null,\n 'Contribute'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you have an idea for your own spee.ch-like site on top of LBRY, fork our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch' },\n 'github repo'\n ),\n ' and go to town!'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you want to improve spee.ch, join our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS' },\n 'discord channel'\n ),\n ' or solve one of our ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://github.com/lbryio/spee.ch/issues' },\n 'github issues'\n ),\n '.'\n )\n )\n )\n )\n );\n }\n }]);\n\n return AboutPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = AboutPage;\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction Logo() {\n return _react2.default.createElement(\n 'svg',\n { version: '1.1', id: 'Layer_1', x: '0px', y: '0px', height: '24px', viewBox: '0 0 80 31', enableBackground: 'new 0 0 80 31', className: 'nav-bar-logo' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: '/' },\n _react2.default.createElement(\n 'title',\n null,\n 'Logo'\n ),\n _react2.default.createElement(\n 'desc',\n null,\n 'Spee.ch logo'\n ),\n _react2.default.createElement(\n 'g',\n { id: 'About' },\n _react2.default.createElement(\n 'g',\n { id: 'Publish-Form-V2-_x28_filled_x29_', transform: 'translate(-42.000000, -23.000000)' },\n _react2.default.createElement(\n 'g',\n { id: 'Group-17', transform: 'translate(42.000000, 22.000000)' },\n _react2.default.createElement(\n 'text',\n { transform: 'matrix(1 0 0 1 0 20)', fontSize: '25', fontFamily: 'Roboto' },\n 'Spee= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ExpandingTextarea = function (_Component) {\n _inherits(ExpandingTextarea, _Component);\n\n function ExpandingTextarea(props) {\n _classCallCheck(this, ExpandingTextarea);\n\n var _this = _possibleConstructorReturn(this, (ExpandingTextarea.__proto__ || Object.getPrototypeOf(ExpandingTextarea)).call(this, props));\n\n _this._handleChange = _this._handleChange.bind(_this);\n return _this;\n }\n\n _createClass(ExpandingTextarea, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.adjustTextarea({});\n }\n }, {\n key: '_handleChange',\n value: function _handleChange(event) {\n var onChange = this.props.onChange;\n\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n }, {\n key: 'adjustTextarea',\n value: function adjustTextarea(_ref) {\n var _ref$target = _ref.target,\n target = _ref$target === undefined ? this.el : _ref$target;\n\n target.style.height = 0;\n target.style.height = target.scrollHeight + 'px';\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var rest = _objectWithoutProperties(this.props, []);\n\n return _react2.default.createElement('textarea', _extends({}, rest, {\n ref: function ref(x) {\n return _this2.el = x;\n },\n onChange: this._handleChange\n }));\n }\n }]);\n\n return ExpandingTextarea;\n}(_react.Component);\n\nExpandingTextarea.propTypes = {\n onChange: _propTypes2.default.func\n};\n\nexports.default = ExpandingTextarea;\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(14);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishPreview = function (_React$Component) {\n _inherits(PublishPreview, _React$Component);\n\n function PublishPreview(props) {\n _classCallCheck(this, PublishPreview);\n\n var _this = _possibleConstructorReturn(this, (PublishPreview.__proto__ || Object.getPrototypeOf(PublishPreview)).call(this, props));\n\n _this.state = {\n imgSource: '',\n defaultThumbnail: '/assets/img/video_thumb_default.png'\n };\n return _this;\n }\n\n _createClass(PublishPreview, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.setPreviewImageSource(this.props.file);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({ imgSource: this.state.defaultThumbnail });\n }\n }\n }\n }, {\n key: 'setPreviewImageSourceFromFile',\n value: function setPreviewImageSourceFromFile(file) {\n var _this2 = this;\n\n var previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = function () {\n _this2.setState({ imgSource: previewReader.result });\n };\n }\n }, {\n key: 'setPreviewImageSource',\n value: function setPreviewImageSource(file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({ imgSource: this.state.defaultThumbnail });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement('img', {\n id: 'dropzone-preview',\n src: this.state.imgSource,\n className: this.props.dimPreview ? 'dim' : '',\n alt: 'publish preview'\n });\n }\n }]);\n\n return PublishPreview;\n}(_react2.default.Component);\n\n;\n\nPublishPreview.propTypes = {\n dimPreview: _propTypes2.default.bool.isRequired,\n file: _propTypes2.default.object.isRequired,\n thumbnail: _propTypes2.default.object\n};\n\nexports.default = PublishPreview;\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(14);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction UrlMiddle(_ref) {\n var publishInChannel = _ref.publishInChannel,\n selectedChannel = _ref.selectedChannel,\n loggedInChannelName = _ref.loggedInChannelName,\n loggedInChannelShortId = _ref.loggedInChannelShortId;\n\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return _react2.default.createElement(\n 'span',\n { id: 'url-channel', className: 'url-text--secondary' },\n loggedInChannelName,\n ':',\n loggedInChannelShortId,\n ' /'\n );\n }\n return _react2.default.createElement(\n 'span',\n { id: 'url-channel-placeholder', className: 'url-text--secondary tooltip' },\n '@channel',\n _react2.default.createElement(\n 'span',\n {\n className: 'tooltip-text' },\n 'Select a channel below'\n ),\n ' /'\n );\n }\n return _react2.default.createElement(\n 'span',\n { id: 'url-no-channel-placeholder', className: 'url-text--secondary tooltip' },\n 'xyz',\n _react2.default.createElement(\n 'span',\n { className: 'tooltip-text' },\n 'This will be a random id'\n ),\n ' /'\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel: _propTypes2.default.bool.isRequired,\n loggedInChannelName: _propTypes2.default.string,\n loggedInChannelShortId: _propTypes2.default.string\n};\n\nexports.default = UrlMiddle;\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(81);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel,\n publish = _ref.publish;\n\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n publishInChannel: publish.publishInChannel,\n selectedChannel: publish.selectedChannel,\n channelError: publish.error.channel\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onPublishInChannelChange: function onPublishInChannelChange(value) {\n dispatch((0, _publish.updateError)('channel', null));\n dispatch((0, _publish.setPublishInChannel)(value));\n },\n onChannelSelect: function onChannelSelect(value) {\n dispatch((0, _publish.updateError)('channel', null));\n dispatch((0, _publish.updateSelectedChannel)(value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(83);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel,\n publish = _ref.publish;\n\n return {\n file: publish.file\n };\n};\n\nvar mapDispatchToProps = {\n clearFile: _publish.clearFile,\n startPublish: _publish.startPublish\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(84);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n title: publish.metadata.title\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onMetadataChange: function onMetadataChange(name, value) {\n dispatch((0, _publish.updateMetadata)(name, value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _publish = __webpack_require__(6);\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(85);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel,\n publish = _ref.publish;\n\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n loggedInChannelShortId: channel.loggedInChannel.shortId,\n fileName: publish.file.name,\n publishInChannel: publish.publishInChannel,\n selectedChannel: publish.selectedChannel,\n claim: publish.claim,\n urlError: publish.error.url\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onClaimChange: function onClaimChange(value) {\n dispatch((0, _publish.updateClaim)(value));\n dispatch((0, _publish.updateError)('publishSubmit', null));\n },\n onUrlError: function onUrlError(value) {\n dispatch((0, _publish.updateError)('url', value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(86);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var file = _ref.publish.file;\n\n return {\n file: file\n };\n};\n\nvar mapDispatchToProps = {\n onNewThumbnail: _publish.onNewThumbnail\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(87);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n showMetadataInputs: publish.showMetadataInputs,\n description: publish.metadata.description,\n license: publish.metadata.license,\n nsfw: publish.metadata.nsfw\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onMetadataChange: function onMetadataChange(name, value) {\n dispatch((0, _publish.updateMetadata)(name, value));\n },\n onToggleMetadataInputs: function onToggleMetadataInputs(value) {\n dispatch((0, _publish.toggleMetadataInputs)(value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(88);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n message: publish.disabledMessage\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(6);\n\nvar _view = __webpack_require__(89);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n status: publish.status.status,\n message: publish.status.message\n };\n};\n\nvar mapDispatchToProps = {\n clearFile: _publish.clearFile\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(90);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n disabled: publish.disabled,\n file: publish.file,\n status: publish.status.status\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-helmet\");\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga/effects\");\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Path = __webpack_require__(51);\n\nvar _require = __webpack_require__(80),\n getSubDirectoryNames = _require.getSubDirectoryNames;\n\nvar thisFolder = Path.resolve(__dirname, 'client/components/');\nvar modules = {};\n\ngetSubDirectoryNames(thisFolder).forEach(function (name) {\n modules[name] = __webpack_require__(168)(\"./\" + name).default;\n});\n\nmodule.exports = modules;\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"path\");\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Path = __webpack_require__(51);\n\nvar _require = __webpack_require__(80),\n getSubDirectoryNames = _require.getSubDirectoryNames;\n\nvar thisFolder = Path.resolve(__dirname, 'client/containers/');\n\nvar modules = {};\n\ngetSubDirectoryNames(thisFolder).forEach(function (name) {\n modules[name] = __webpack_require__(169)(\"./\" + name).default;\n});\n\nmodule.exports = modules;\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Path = __webpack_require__(51);\n\nvar _require = __webpack_require__(80),\n getSubDirectoryNames = _require.getSubDirectoryNames;\n\nvar thisFolder = Path.resolve(__dirname, 'client/pages/');\n\nvar modules = {};\n\ngetSubDirectoryNames(thisFolder).forEach(function (name) {\n modules[name] = __webpack_require__(171)(\"./\" + name).default;\n});\n\nmodule.exports = modules;\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(7);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _PublishTool = __webpack_require__(47);\n\nvar _PublishTool2 = _interopRequireDefault(_PublishTool);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar HomePage = function (_React$Component) {\n _inherits(HomePage, _React$Component);\n\n function HomePage() {\n _classCallCheck(this, HomePage);\n\n return _possibleConstructorReturn(this, (HomePage.__proto__ || Object.getPrototypeOf(HomePage)).apply(this, arguments));\n }\n\n _createClass(HomePage, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column' },\n _react2.default.createElement(_SEO2.default, null),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded flex-container--column' },\n _react2.default.createElement(_PublishTool2.default, null)\n )\n );\n }\n }]);\n\n return HomePage;\n}(_react2.default.Component);\n\n;\n\nexports.default = HomePage;\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar axios = __webpack_require__(129);\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(130),\n _require$api = _require.api,\n apiHost = _require$api.apiHost,\n apiPort = _require$api.apiPort;\n\nvar lbryApiUri = 'http://' + apiHost + ':' + apiPort;\n\nvar _require2 = __webpack_require__(56),\n chooseGaLbrynetPublishLabel = _require2.chooseGaLbrynetPublishLabel,\n sendGATimingEvent = _require2.sendGATimingEvent;\n\nvar handleLbrynetResponse = function handleLbrynetResponse(_ref, resolve, reject) {\n var data = _ref.data;\n\n logger.debug('lbry api data:', data);\n if (data.result) {\n // check for an error\n if (data.result.error) {\n logger.debug('Lbrynet api error:', data.result.error);\n reject(new Error(data.result.error));\n return;\n };\n resolve(data.result);\n return;\n }\n // fallback in case it just timed out\n reject(JSON.stringify(data));\n};\n\nmodule.exports = {\n publishClaim: function publishClaim(publishParams) {\n logger.debug('lbryApi >> Publishing claim to \"' + publishParams.name + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'publish',\n params: publishParams\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getClaim: function getClaim(uri) {\n logger.debug('lbryApi >> Getting Claim for \"' + uri + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'get',\n params: { uri: uri, timeout: 20 }\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getClaimList: function getClaimList(claimName) {\n logger.debug('lbryApi >> Getting claim_list for \"' + claimName + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'claim_list',\n params: { name: claimName }\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n resolveUri: function resolveUri(uri) {\n logger.debug('lbryApi >> Resolving URI for \"' + uri + '\"');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'resolve',\n params: { uri: uri }\n }).then(function (_ref2) {\n var data = _ref2.data;\n\n sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now());\n if (data.result[uri].error) {\n // check for errors\n reject(data.result[uri].error);\n } else {\n // if no errors, resolve\n resolve(data.result[uri]);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getDownloadDirectory: function getDownloadDirectory() {\n logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'settings_get'\n }).then(function (_ref3) {\n var data = _ref3.data;\n\n sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now());\n if (data.result) {\n resolve(data.result.download_directory);\n } else {\n return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.');\n }\n }).catch(function (error) {\n logger.error('Lbrynet Error:', error);\n resolve('/home/lbry/Downloads/');\n });\n });\n },\n createChannel: function createChannel(name) {\n logger.debug('lbryApi >> Creating channel for ' + name + '...');\n var gaStartTime = Date.now();\n return new Promise(function (resolve, reject) {\n axios.post(lbryApiUri, {\n method: 'channel_new',\n params: {\n channel_name: name,\n amount: 0.1\n }\n }).then(function (response) {\n sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\nvar ua = __webpack_require__(131);\n\nvar _require = __webpack_require__(3),\n googleId = _require.analytics.googleId,\n title = _require.details.title;\n\nfunction createServeEventParams(headers, ip, originalUrl) {\n return {\n eventCategory: 'client requests',\n eventAction: 'serve request',\n eventLabel: originalUrl,\n ipOverride: ip,\n userAgentOverride: headers['user-agent']\n };\n};\n\nfunction createPublishTimingEventParams(category, variable, label, startTime, endTime) {\n var duration = endTime - startTime;\n return {\n userTimingCategory: category,\n userTimingVariableName: variable,\n userTimingTime: duration,\n userTimingLabel: label\n };\n};\n\nfunction sendGoogleAnalyticsEvent(ip, params) {\n var visitorId = ip.replace(/\\./g, '-');\n var visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.event(params, function (err) {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n });\n};\n\nfunction sendGoogleAnalyticsTiming(visitorId, params) {\n var visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.timing(params, function (err) {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n logger.debug('Timing event successfully sent to google analytics');\n });\n};\n\nmodule.exports = {\n sendGAServeEvent: function sendGAServeEvent(headers, ip, originalUrl) {\n var params = createServeEventParams(headers, ip, originalUrl);\n sendGoogleAnalyticsEvent(ip, params);\n },\n sendGATimingEvent: function sendGATimingEvent(category, variable, label, startTime, endTime) {\n var params = createPublishTimingEventParams(category, variable, label, startTime, endTime);\n sendGoogleAnalyticsTiming(title, params);\n },\n chooseGaLbrynetPublishLabel: function chooseGaLbrynetPublishLabel(_ref) {\n var channelName = _ref.channel_name,\n channelId = _ref.channel_id;\n\n return channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM';\n }\n};\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux\");\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _require = __webpack_require__(3),\n componentsConfig = _require.componentsConfig;\n\nfunction getDeepestChildValue(parent, childrenKeys) {\n var childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array\n var child = parent[childKey];\n if (childrenKeys.length >= 1) {\n return getDeepestChildValue(child, childrenKeys);\n }\n return child;\n}\n\nvar dynamicImport = exports.dynamicImport = function dynamicImport(filePath) {\n // validate inputs\n if (!filePath) {\n throw new Error('no file path provided to dynamicImport()');\n }\n if (typeof filePath !== 'string') {\n console.log('dynamicImport > filePath:', filePath);\n console.log('dynamicImport > filePath type:', typeof filePath === 'undefined' ? 'undefined' : _typeof(filePath));\n throw new Error('file path provided to dynamicImport() must be a string');\n }\n if (!componentsConfig) {\n console.log('no componentsConfig found in siteConfig.js');\n return __webpack_require__(109)(\"\" + filePath);\n }\n // split out the file folders // filter out any empty or white-space-only strings\n var folders = filePath.split('/').filter(function (folderName) {\n return folderName.replace(/\\s/g, '').length;\n });\n // check for the component corresponding to file path in the site config object\n // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]]\n var customComponent = getDeepestChildValue(componentsConfig, folders);\n if (customComponent) {\n return customComponent; // return custom component\n } else {\n return __webpack_require__(109)(\"\" + filePath);\n }\n};\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createBasicCanonicalLink = function createBasicCanonicalLink(page, siteHost) {\n return siteHost + \"/\" + page;\n};\n\nvar createAssetCanonicalLink = function createAssetCanonicalLink(asset, siteHost) {\n var channelName = void 0,\n certificateId = void 0,\n name = void 0,\n claimId = void 0;\n if (asset.claimData) {\n var _asset$claimData = asset.claimData;\n channelName = _asset$claimData.channelName;\n certificateId = _asset$claimData.certificateId;\n name = _asset$claimData.name;\n claimId = _asset$claimData.claimId;\n };\n if (channelName) {\n return siteHost + \"/\" + channelName + \":\" + certificateId + \"/\" + name;\n };\n return siteHost + \"/\" + claimId + \"/\" + name;\n};\n\nvar createChannelCanonicalLink = function createChannelCanonicalLink(channel, siteHost) {\n var name = channel.name,\n longId = channel.longId;\n\n return siteHost + \"/\" + name + \":\" + longId;\n};\n\nvar createCanonicalLink = exports.createCanonicalLink = function createCanonicalLink(asset, channel, page, siteHost) {\n if (asset) {\n return createAssetCanonicalLink(asset, siteHost);\n }\n if (channel) {\n return createChannelCanonicalLink(channel, siteHost);\n }\n return createBasicCanonicalLink(page, siteHost);\n};\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n validateFile: function validateFile(file) {\n if (!file) {\n throw new Error('no file provided');\n }\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate size and type\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n throw new Error('Sorry, GIFs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n }\n};\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex // eslint-disable-line no-unused-vars\n .exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n // Validate and process name\n\n\n if (!value) {\n throw new Error('Check your URL. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('Check your URL. No channel name after \"@\".');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Check your URL. Invalid characters in channel name: \"' + nameBadChars.join(', ') + '\".');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('Check your URL. No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('Check your URL. The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId || null,\n claimId: claimId || null\n };\n },\n parseClaim: function parseClaim(name) {\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first extension)\n '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex // eslint-disable-line no-unused-vars\n .exec(name).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n extensionSeperator = _componentsRegex$exec4[2],\n extension = _componentsRegex$exec4[3];\n\n // Validate and process name\n\n\n if (!claimName) {\n throw new Error('Check your URL. No claim name provided before \".\"');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Check your URL. Invalid characters in claim name: \"' + nameBadChars.join(', ') + '\".');\n }\n // Validate and process extension\n if (extensionSeperator) {\n if (!extension) {\n throw new Error('Check your URL. No file extension provided after separator \"' + extensionSeperator + '\".');\n }\n if (extensionSeperator !== '.') {\n throw new Error('Check your URL. The \"' + extensionSeperator + '\" separator is not supported in the claim name.');\n }\n }\n return {\n claimName: claimName,\n extension: extension || null\n };\n }\n};\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar determineOgThumbnailContentType = function determineOgThumbnailContentType(thumbnail) {\n if (thumbnail) {\n var fileExt = thumbnail.substring(thumbnail.lastIndexOf('.'));\n switch (fileExt) {\n case 'jpeg':\n case 'jpg':\n return 'image/jpeg';\n case 'png':\n return 'image/png';\n case 'gif':\n return 'image/gif';\n case 'mp4':\n return 'video/mp4';\n default:\n return 'image/jpeg';\n }\n }\n return '';\n};\n\nvar createBasicMetaTags = function createBasicMetaTags(siteHost, siteDescription, siteTitle, siteTwitter) {\n return [{ property: 'og:title', content: siteTitle }, { property: 'og:url', content: siteHost }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: siteDescription }, { property: 'twitter:site', content: siteTwitter }, { property: 'twitter:card', content: 'summary' }];\n};\n\nvar createChannelMetaTags = function createChannelMetaTags(siteTitle, siteHost, siteTwitter, channel) {\n var name = channel.name,\n longId = channel.longId;\n\n return [{ property: 'og:title', content: name + ' on ' + siteTitle }, { property: 'og:url', content: siteHost + '/' + name + ':' + longId }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: name + ', a channel on ' + siteTitle }, { property: 'twitter:site', content: siteTwitter }, { property: 'twitter:card', content: 'summary' }];\n};\n\nvar createAssetMetaTags = function createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) {\n var claimData = asset.claimData;\n var contentType = claimData.contentType;\n\n var embedUrl = siteHost + '/' + claimData.claimId + '/' + claimData.name;\n var showUrl = siteHost + '/' + claimData.claimId + '/' + claimData.name;\n var source = siteHost + '/' + claimData.claimId + '/' + claimData.name + '.' + claimData.fileExt;\n var ogTitle = claimData.title || claimData.name;\n var ogDescription = claimData.description || defaultDescription;\n var ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);\n var ogThumbnail = claimData.thumbnail || defaultThumbnail;\n var metaTags = [{ property: 'og:title', content: ogTitle }, { property: 'og:url', content: showUrl }, { property: 'og:site_name', content: siteTitle }, { property: 'og:description', content: ogDescription }, { property: 'og:image:width', content: 600 }, { property: 'og:image:height', content: 315 }, { property: 'twitter:site', content: siteTwitter }];\n if (contentType === 'video/mp4' || contentType === 'video/webm') {\n metaTags.push({ property: 'og:video', content: source });\n metaTags.push({ property: 'og:video:secure_url', content: source });\n metaTags.push({ property: 'og:video:type', content: contentType });\n metaTags.push({ property: 'og:image', content: ogThumbnail });\n metaTags.push({ property: 'og:image:type', content: ogThumbnailContentType });\n metaTags.push({ property: 'og:type', content: 'video' });\n metaTags.push({ property: 'twitter:card', content: 'player' });\n metaTags.push({ property: 'twitter:player', content: embedUrl });\n metaTags.push({ property: 'twitter:player:width', content: 600 });\n metaTags.push({ property: 'twitter:text:player_width', content: 600 });\n metaTags.push({ property: 'twitter:player:height', content: 337 });\n metaTags.push({ property: 'twitter:player:stream', content: source });\n metaTags.push({ property: 'twitter:player:stream:content_type', content: contentType });\n } else {\n metaTags.push({ property: 'og:image', content: source });\n metaTags.push({ property: 'og:image:type', content: contentType });\n metaTags.push({ property: 'og:type', content: 'article' });\n metaTags.push({ property: 'twitter:card', content: 'summary_large_image' });\n }\n return metaTags;\n};\n\nvar createMetaTags = exports.createMetaTags = function createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) {\n if (asset) {\n return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail);\n };\n if (channel) {\n return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel);\n };\n return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter);\n};\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createPageTitle = exports.createPageTitle = function createPageTitle(siteTitle, pageTitle) {\n if (!pageTitle) {\n return \"\" + siteTitle;\n }\n return siteTitle + \" - \" + pageTitle;\n};\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.updateLoggedInChannel = updateLoggedInChannel;\n\nvar _channel_action_types = __webpack_require__(106);\n\nvar actions = _interopRequireWildcard(_channel_action_types);\n\nfunction _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; } }\n\n// export action creators\n\nfunction updateLoggedInChannel(name, shortId, longId) {\n return {\n type: actions.CHANNEL_UPDATE,\n data: {\n name: name,\n shortId: shortId,\n longId: longId\n }\n };\n};\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _Logo = __webpack_require__(21);\n\nvar _Logo2 = _interopRequireDefault(_Logo);\n\nvar _NavBarChannelOptionsDropdown = __webpack_require__(22);\n\nvar _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown);\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar VIEW = 'VIEW';\nvar LOGOUT = 'LOGOUT';\n\nvar NavBar = function (_React$Component) {\n _inherits(NavBar, _React$Component);\n\n function NavBar(props) {\n _classCallCheck(this, NavBar);\n\n var _this = _possibleConstructorReturn(this, (NavBar.__proto__ || Object.getPrototypeOf(NavBar)).call(this, props));\n\n _this.checkForLoggedInUser = _this.checkForLoggedInUser.bind(_this);\n _this.logoutUser = _this.logoutUser.bind(_this);\n _this.handleSelection = _this.handleSelection.bind(_this);\n return _this;\n }\n\n _createClass(NavBar, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n }, {\n key: 'checkForLoggedInUser',\n value: function checkForLoggedInUser() {\n var _this2 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/user', params).then(function (_ref) {\n var data = _ref.data;\n\n _this2.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n }).catch(function (error) {\n console.log('/user error:', error.message);\n });\n }\n }, {\n key: 'logoutUser',\n value: function logoutUser() {\n var _this3 = this;\n\n var params = { credentials: 'include' };\n (0, _request2.default)('/logout', params).then(function () {\n _this3.props.onChannelLogout();\n }).catch(function (error) {\n console.log('/logout error', error.message);\n });\n }\n }, {\n key: 'handleSelection',\n value: function handleSelection(event) {\n var value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push('/' + this.props.channelName + ':' + this.props.channelLongId);\n break;\n default:\n break;\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var siteDescription = this.props.siteDescription;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--wide nav-bar' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--short flex-container--row flex-container--space-between-center' },\n _react2.default.createElement(_Logo2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--center' },\n _react2.default.createElement(\n 'span',\n { className: 'nav-bar-tagline' },\n siteDescription\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'nav-bar--right' },\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/', exact: true },\n 'Publish'\n ),\n _react2.default.createElement(\n _reactRouterDom.NavLink,\n { className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/about' },\n 'About'\n ),\n this.props.channelName ? _react2.default.createElement(_NavBarChannelOptionsDropdown2.default, {\n channelName: this.props.channelName,\n handleSelection: this.handleSelection,\n defaultSelection: this.props.channelName,\n VIEW: VIEW,\n LOGOUT: LOGOUT\n }) : _react2.default.createElement(\n _reactRouterDom.NavLink,\n { id: 'nav-bar-login-link', className: 'nav-bar-link link--nav', activeClassName: 'link--nav-active', to: '/login' },\n 'Channel'\n )\n )\n )\n );\n }\n }]);\n\n return NavBar;\n}(_react2.default.Component);\n\nexports.default = (0, _reactRouterDom.withRouter)(NavBar);\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactHelmet = __webpack_require__(48);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nvar _propTypes = __webpack_require__(14);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _pageTitle = __webpack_require__(63);\n\nvar _metaTags = __webpack_require__(62);\n\nvar _canonicalLink = __webpack_require__(59);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SEO = function (_React$Component) {\n _inherits(SEO, _React$Component);\n\n function SEO() {\n _classCallCheck(this, SEO);\n\n return _possibleConstructorReturn(this, (SEO.__proto__ || Object.getPrototypeOf(SEO)).apply(this, arguments));\n }\n\n _createClass(SEO, [{\n key: 'render',\n value: function render() {\n // props from state\n var _props = this.props,\n defaultDescription = _props.defaultDescription,\n defaultThumbnail = _props.defaultThumbnail,\n siteDescription = _props.siteDescription,\n siteHost = _props.siteHost,\n siteTitle = _props.siteTitle,\n siteTwitter = _props.siteTwitter;\n // props from parent\n\n var _props2 = this.props,\n asset = _props2.asset,\n channel = _props2.channel,\n pageUri = _props2.pageUri;\n var pageTitle = this.props.pageTitle;\n // create page title, tags, and canonical link\n\n pageTitle = (0, _pageTitle.createPageTitle)(siteTitle, pageTitle);\n var metaTags = (0, _metaTags.createMetaTags)(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n var canonicalLink = (0, _canonicalLink.createCanonicalLink)(asset, channel, pageUri, siteHost);\n // render results\n return _react2.default.createElement(_reactHelmet2.default, {\n title: pageTitle,\n meta: metaTags,\n link: [{ rel: 'canonical', href: canonicalLink }]\n });\n }\n }]);\n\n return SEO;\n}(_react2.default.Component);\n\n;\n\nSEO.propTypes = {\n pageTitle: _propTypes2.default.string,\n pageUri: _propTypes2.default.string,\n channel: _propTypes2.default.object,\n asset: _propTypes2.default.object\n};\n\nexports.default = SEO;\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _SEO = __webpack_require__(7);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelLoginForm = __webpack_require__(15);\n\nvar _ChannelLoginForm2 = _interopRequireDefault(_ChannelLoginForm);\n\nvar _ChannelCreateForm = __webpack_require__(16);\n\nvar _ChannelCreateForm2 = _interopRequireDefault(_ChannelCreateForm);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar LoginPage = function (_React$Component) {\n _inherits(LoginPage, _React$Component);\n\n function LoginPage() {\n _classCallCheck(this, LoginPage);\n\n return _possibleConstructorReturn(this, (LoginPage.__proto__ || Object.getPrototypeOf(LoginPage)).apply(this, arguments));\n }\n\n _createClass(LoginPage, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push('/');\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: 'Login', pageUri: 'login' }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'p',\n null,\n 'Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you\\'re ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: '/@catalonia2017:43dcf47163caa21d8404d9fe9b30f78ef3e146a8' },\n 'documenting important events'\n ),\n ', or making a public repository for ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: '/@catGifs' },\n 'cat gifs'\n ),\n ' (password: \\'1234\\'), try creating a channel for it!'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'h3',\n { className: 'h3--no-bottom' },\n 'Log in to an existing channel:'\n ),\n _react2.default.createElement(_ChannelLoginForm2.default, null),\n _react2.default.createElement(\n 'h3',\n { className: 'h3--no-bottom' },\n 'Create a brand new channel:'\n ),\n _react2.default.createElement(_ChannelCreateForm2.default, null)\n )\n )\n )\n );\n }\n }]);\n\n return LoginPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = (0, _reactRouterDom.withRouter)(LoginPage);\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelLoginForm = function (_React$Component) {\n _inherits(ChannelLoginForm, _React$Component);\n\n function ChannelLoginForm(props) {\n _classCallCheck(this, ChannelLoginForm);\n\n var _this = _possibleConstructorReturn(this, (ChannelLoginForm.__proto__ || Object.getPrototypeOf(ChannelLoginForm)).call(this, props));\n\n _this.state = {\n error: null,\n name: '',\n password: ''\n };\n _this.handleInput = _this.handleInput.bind(_this);\n _this.loginToChannel = _this.loginToChannel.bind(_this);\n return _this;\n }\n\n _createClass(ChannelLoginForm, [{\n key: 'handleInput',\n value: function handleInput(event) {\n var name = event.target.name;\n var value = event.target.value;\n this.setState(_defineProperty({}, name, value));\n }\n }, {\n key: 'loginToChannel',\n value: function loginToChannel(event) {\n var _this2 = this;\n\n event.preventDefault();\n var params = {\n method: 'POST',\n body: JSON.stringify({ username: this.state.name, password: this.state.password }),\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n credentials: 'include'\n };\n (0, _request2.default)('login', params).then(function (_ref) {\n var success = _ref.success,\n channelName = _ref.channelName,\n shortChannelId = _ref.shortChannelId,\n channelClaimId = _ref.channelClaimId,\n message = _ref.message;\n\n if (success) {\n _this2.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n _this2.setState({ 'error': message });\n };\n }).catch(function (error) {\n if (error.message) {\n _this2.setState({ 'error': error.message });\n } else {\n _this2.setState({ 'error': error });\n }\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'form',\n { id: 'channel-login-form' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-login-name-input' },\n 'Name:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary flex-container--row flex-container--left-bottom' },\n _react2.default.createElement(\n 'span',\n null,\n '@'\n ),\n _react2.default.createElement('input', { type: 'text', id: 'channel-login-name-input', className: 'input-text', name: 'name', placeholder: 'Your Channel Name', value: this.state.channelName, onChange: this.handleInput })\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-login-password-input' },\n 'Password:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary' },\n _react2.default.createElement('input', { type: 'password', id: 'channel-login-password-input', name: 'password', className: 'input-text', placeholder: '', value: this.state.channelPassword, onChange: this.handleInput })\n )\n )\n ),\n this.state.error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.state.error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Enter the name and password for your channel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary', onClick: this.loginToChannel },\n 'Authenticate'\n )\n )\n );\n }\n }]);\n\n return ChannelLoginForm;\n}(_react2.default.Component);\n\nexports.default = ChannelLoginForm;\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(10);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelCreateForm = function (_React$Component) {\n _inherits(ChannelCreateForm, _React$Component);\n\n function ChannelCreateForm(props) {\n _classCallCheck(this, ChannelCreateForm);\n\n var _this = _possibleConstructorReturn(this, (ChannelCreateForm.__proto__ || Object.getPrototypeOf(ChannelCreateForm)).call(this, props));\n\n _this.state = {\n error: null,\n channel: '',\n password: '',\n status: null\n };\n _this.handleChannelInput = _this.handleChannelInput.bind(_this);\n _this.handleInput = _this.handleInput.bind(_this);\n _this.createChannel = _this.createChannel.bind(_this);\n return _this;\n }\n\n _createClass(ChannelCreateForm, [{\n key: 'cleanseChannelInput',\n value: function cleanseChannelInput(input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n }, {\n key: 'handleChannelInput',\n value: function handleChannelInput(event) {\n var value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({ channel: value });\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({ error: 'Please enter a channel name' });\n }\n }\n }, {\n key: 'handleInput',\n value: function handleInput(event) {\n var name = event.target.name;\n var value = event.target.value;\n this.setState(_defineProperty({}, name, value));\n }\n }, {\n key: 'updateIsChannelAvailable',\n value: function updateIsChannelAvailable(channel) {\n var _this2 = this;\n\n var channelWithAtSymbol = '@' + channel;\n (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol).then(function () {\n _this2.setState({ 'error': null });\n }).catch(function (error) {\n _this2.setState({ 'error': error.message });\n });\n }\n }, {\n key: 'checkIsChannelAvailable',\n value: function checkIsChannelAvailable(channel) {\n var channelWithAtSymbol = '@' + channel;\n return (0, _request2.default)('/api/channel/availability/' + channelWithAtSymbol);\n }\n }, {\n key: 'checkIsPasswordProvided',\n value: function checkIsPasswordProvided(password) {\n return new Promise(function (resolve, reject) {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n }, {\n key: 'makePublishChannelRequest',\n value: function makePublishChannelRequest(username, password) {\n var params = {\n method: 'POST',\n body: JSON.stringify({ username: username, password: password }),\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n credentials: 'include'\n };\n return new Promise(function (resolve, reject) {\n (0, _request2.default)('/signup', params).then(function (result) {\n return resolve(result);\n }).catch(function (error) {\n reject(new Error('Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ' + error.message));\n });\n });\n }\n }, {\n key: 'createChannel',\n value: function createChannel(event) {\n var _this3 = this;\n\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password).then(function () {\n return _this3.checkIsChannelAvailable(_this3.state.channel);\n }).then(function () {\n _this3.setState({ status: 'We are publishing your new channel. Sit tight...' });\n return _this3.makePublishChannelRequest(_this3.state.channel, _this3.state.password);\n }).then(function (result) {\n _this3.setState({ status: null });\n _this3.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n }).catch(function (error) {\n if (error.message) {\n _this3.setState({ 'error': error.message, status: null });\n } else {\n _this3.setState({ 'error': error, status: null });\n };\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n !this.state.status ? _react2.default.createElement(\n 'form',\n { id: 'publish-channel-form' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'new-channel-name' },\n 'Name:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary flex-container--row flex-container--left-bottom span--relative' },\n _react2.default.createElement(\n 'span',\n null,\n '@'\n ),\n _react2.default.createElement('input', { type: 'text', name: 'channel', id: 'new-channel-name', className: 'input-text', placeholder: 'exampleChannelName', value: this.state.channel, onChange: this.handleChannelInput }),\n this.state.channel && !this.state.error && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--success span--absolute' },\n '\\u2713'\n ),\n this.state.error && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--failure span--absolute' },\n '\\u2716'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide row--short' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--sml-10' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'new-channel-password' },\n 'Password:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--6 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary' },\n _react2.default.createElement('input', { type: 'password', name: 'password', id: 'new-channel-password', className: 'input-text', placeholder: '', value: this.state.password, onChange: this.handleInput })\n )\n )\n ),\n this.state.error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.state.error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Choose a name and password for your channel'\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary', onClick: this.createChannel },\n 'Create Channel'\n )\n )\n ) : _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n this.state.status\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 })\n )\n );\n }\n }]);\n\n return ChannelCreateForm;\n}(_react2.default.Component);\n\nexports.default = ChannelCreateForm;\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ErrorPage = __webpack_require__(12);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _ShowAssetLite = __webpack_require__(27);\n\nvar _ShowAssetLite2 = _interopRequireDefault(_ShowAssetLite);\n\nvar _ShowAssetDetails = __webpack_require__(29);\n\nvar _ShowAssetDetails2 = _interopRequireDefault(_ShowAssetDetails);\n\nvar _ShowChannel = __webpack_require__(32);\n\nvar _ShowChannel2 = _interopRequireDefault(_ShowChannel);\n\nvar _show_request_types = __webpack_require__(112);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowPage = function (_React$Component) {\n _inherits(ShowPage, _React$Component);\n\n function ShowPage() {\n _classCallCheck(this, ShowPage);\n\n return _possibleConstructorReturn(this, (ShowPage.__proto__ || Object.getPrototypeOf(ShowPage)).apply(this, arguments));\n }\n\n _createClass(ShowPage, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n error = _props.error,\n requestType = _props.requestType;\n\n if (error) {\n return _react2.default.createElement(_ErrorPage2.default, { error: error });\n }\n switch (requestType) {\n case _show_request_types.CHANNEL:\n return _react2.default.createElement(_ShowChannel2.default, null);\n case _show_request_types.ASSET_LITE:\n return _react2.default.createElement(_ShowAssetLite2.default, null);\n case _show_request_types.ASSET_DETAILS:\n return _react2.default.createElement(_ShowAssetDetails2.default, null);\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'loading...'\n );\n }\n }\n }]);\n\n return ShowPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowPage;\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(7);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _AssetDisplay = __webpack_require__(17);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowLite = function (_React$Component) {\n _inherits(ShowLite, _React$Component);\n\n function ShowLite() {\n _classCallCheck(this, ShowLite);\n\n return _possibleConstructorReturn(this, (ShowLite.__proto__ || Object.getPrototypeOf(ShowLite)).apply(this, arguments));\n }\n\n _createClass(ShowLite, [{\n key: 'render',\n value: function render() {\n var asset = this.props.asset;\n\n if (asset) {\n var _asset$claimData = asset.claimData,\n name = _asset$claimData.name,\n claimId = _asset$claimData.claimId;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column flex-container--center-center show-lite-container' },\n _react2.default.createElement(_SEO2.default, { pageTitle: name, asset: asset }),\n _react2.default.createElement(_AssetDisplay2.default, null),\n _react2.default.createElement(\n _reactRouterDom.Link,\n { id: 'asset-boilerpate', className: 'link--primary fine-print', to: '/' + claimId + '/' + name },\n 'hosted via Spee.ch'\n )\n );\n }\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded flex-container--column flex-container--center-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'loading asset data...'\n )\n );\n }\n }]);\n\n return ShowLite;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowLite;\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(10);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _asset_display_states = __webpack_require__(107);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AssetDisplay = function (_React$Component) {\n _inherits(AssetDisplay, _React$Component);\n\n function AssetDisplay() {\n _classCallCheck(this, AssetDisplay);\n\n return _possibleConstructorReturn(this, (AssetDisplay.__proto__ || Object.getPrototypeOf(AssetDisplay)).apply(this, arguments));\n }\n\n _createClass(AssetDisplay, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props$asset$claimDat = this.props.asset.claimData,\n name = _props$asset$claimDat.name,\n claimId = _props$asset$claimDat.claimId;\n\n this.props.onFileRequest(name, claimId);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n status = _props.status,\n error = _props.error,\n _props$asset$claimDat2 = _props.asset.claimData,\n name = _props$asset$claimDat2.name,\n claimId = _props$asset$claimDat2.claimId,\n contentType = _props$asset$claimDat2.contentType,\n fileExt = _props$asset$claimDat2.fileExt,\n thumbnail = _props$asset$claimDat2.thumbnail;\n\n return _react2.default.createElement(\n 'div',\n { id: 'asset-display-component' },\n status === _asset_display_states.LOCAL_CHECK && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Checking to see if Spee.ch has your asset locally...'\n )\n ),\n status === _asset_display_states.UNAVAILABLE && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Sit tight, we\\'re searching the LBRY blockchain for your asset!'\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 }),\n _react2.default.createElement(\n 'p',\n null,\n 'Curious what magic is happening here? ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: 'blank', href: 'https://lbry.io/faq/what-is-lbry' },\n 'Learn more.'\n )\n )\n ),\n status === _asset_display_states.ERROR && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'p',\n null,\n 'Unfortunately, we couldn\\'t download your asset from LBRY. You can help us out by sharing the below error message in the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS', target: '_blank' },\n 'LBRY discord'\n ),\n '.'\n ),\n _react2.default.createElement(\n 'i',\n null,\n _react2.default.createElement(\n 'p',\n { id: 'error-message' },\n error\n )\n )\n ),\n status === _asset_display_states.AVAILABLE && function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return _react2.default.createElement('img', {\n className: 'asset',\n src: '/' + claimId + '/' + name + '.' + fileExt,\n alt: name });\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset',\n src: '/' + claimId + '/' + name + '.' + fileExt,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement(\n 'video',\n { className: 'asset video', controls: true, poster: thumbnail },\n _react2.default.createElement('source', {\n src: '/' + claimId + '/' + name + '.' + fileExt\n }),\n _react2.default.createElement(\n 'p',\n null,\n 'Your browser does not support the ',\n _react2.default.createElement(\n 'code',\n null,\n 'video'\n ),\n ' element.'\n )\n );\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'Unsupported file type'\n );\n }\n }()\n );\n }\n }]);\n\n return AssetDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetDisplay;\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(7);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ErrorPage = __webpack_require__(12);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _AssetTitle = __webpack_require__(30);\n\nvar _AssetTitle2 = _interopRequireDefault(_AssetTitle);\n\nvar _AssetDisplay = __webpack_require__(17);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nvar _AssetInfo = __webpack_require__(31);\n\nvar _AssetInfo2 = _interopRequireDefault(_AssetInfo);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowAssetDetails = function (_React$Component) {\n _inherits(ShowAssetDetails, _React$Component);\n\n function ShowAssetDetails() {\n _classCallCheck(this, ShowAssetDetails);\n\n return _possibleConstructorReturn(this, (ShowAssetDetails.__proto__ || Object.getPrototypeOf(ShowAssetDetails)).apply(this, arguments));\n }\n\n _createClass(ShowAssetDetails, [{\n key: 'render',\n value: function render() {\n var asset = this.props.asset;\n\n if (asset) {\n var name = asset.claimData.name;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name + ' - details', asset: asset }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_AssetTitle2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded show-details-container' },\n _react2.default.createElement(_AssetDisplay2.default, null)\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(_AssetInfo2.default, null)\n )\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading asset data...' });\n }\n }]);\n\n return ShowAssetDetails;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowAssetDetails;\n\n/***/ }),\n/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetTitle = function AssetTitle(_ref) {\n var title = _ref.title;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'span',\n { className: 'text--large' },\n title\n )\n );\n};\n\nexports.default = AssetTitle;\n\n/***/ }),\n/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar AssetInfo = function (_React$Component) {\n _inherits(AssetInfo, _React$Component);\n\n function AssetInfo(props) {\n _classCallCheck(this, AssetInfo);\n\n var _this = _possibleConstructorReturn(this, (AssetInfo.__proto__ || Object.getPrototypeOf(AssetInfo)).call(this, props));\n\n _this.copyToClipboard = _this.copyToClipboard.bind(_this);\n return _this;\n }\n\n _createClass(AssetInfo, [{\n key: 'copyToClipboard',\n value: function copyToClipboard(event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({ error: 'Oops, unable to copy' });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$asset = this.props.asset,\n shortId = _props$asset.shortId,\n _props$asset$claimDat = _props$asset.claimData,\n channelName = _props$asset$claimDat.channelName,\n certificateId = _props$asset$claimDat.certificateId,\n description = _props$asset$claimDat.description,\n name = _props$asset$claimDat.name,\n claimId = _props$asset$claimDat.claimId,\n fileExt = _props$asset$claimDat.fileExt,\n contentType = _props$asset$claimDat.contentType,\n thumbnail = _props$asset$claimDat.thumbnail,\n host = _props$asset$claimDat.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n channelName && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Channel:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: '/' + channelName + ':' + certificateId },\n channelName\n )\n )\n )\n ),\n description && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n description\n )\n ),\n _react2.default.createElement(\n 'div',\n { id: 'show-share-buttons' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Share:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n {\n className: 'row row--short row--wide flex-container--row flex-container--space-between-bottom flex-container--wrap' },\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://twitter.com/intent/tweet?text=' + host + '/' + shortId + '/' + name },\n 'twitter'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://www.facebook.com/sharer/sharer.php?u=' + host + '/' + shortId + '/' + name },\n 'facebook'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'http://tumblr.com/widgets/share/tool?canonicalUrl=' + host + '/' + shortId + '/' + name },\n 'tumblr'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://www.reddit.com/submit?url=' + host + '/' + shortId + '/' + name + '&title=' + name },\n 'reddit'\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--wide row--no-top' },\n _react2.default.createElement(\n 'div',\n { id: 'show-short-link' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Link:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--short row--wide' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'div',\n { className: 'input-error', id: 'input-error-copy-short-link', hidden: 'true' },\n 'error here'\n ),\n _react2.default.createElement('input', { type: 'text', id: 'short-link', className: 'input-disabled input-text--full-width', readOnly: true,\n spellCheck: 'false',\n value: host + '/' + shortId + '/' + name + '.' + fileExt,\n onClick: this.select })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'short-link',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { id: 'show-embed-code' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--2 column--med-10' },\n _react2.default.createElement(\n 'span',\n { className: 'text' },\n 'Embed:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--8 column--med-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--short row--wide' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'div',\n { className: 'input-error', id: 'input-error-copy-embed-text', hidden: 'true' },\n 'error here'\n ),\n contentType === 'video/mp4' ? _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: '' }) : _react2.default.createElement('input', { type: 'text', id: 'embed-text', className: 'input-disabled input-text--full-width', readOnly: true,\n onClick: this.select, spellCheck: 'false',\n value: ''\n })\n ),\n _react2.default.createElement('div', { className: 'column column--1' }),\n _react2.default.createElement(\n 'div',\n { className: 'column column--2' },\n _react2.default.createElement(\n 'button',\n { className: 'button--primary button--wide', 'data-elementtocopy': 'embed-text',\n onClick: this.copyToClipboard },\n 'copy'\n )\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex-container--row flex-container--space-between-bottom' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { className: 'link--primary', to: '/' + shortId + '/' + name + '.' + fileExt },\n _react2.default.createElement(\n 'span',\n {\n className: 'text' },\n 'Direct Link'\n )\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: host + '/' + claimId + '/' + name + '.' + fileExt, download: name },\n 'Download'\n ),\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://lbry.io/dmca' },\n 'Report'\n )\n )\n );\n }\n }]);\n\n return AssetInfo;\n}(_react2.default.Component);\n\n;\n\nexports.default = AssetInfo;\n\n/***/ }),\n/* 76 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(7);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _ErrorPage = __webpack_require__(12);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelClaimsDisplay = __webpack_require__(33);\n\nvar _ChannelClaimsDisplay2 = _interopRequireDefault(_ChannelClaimsDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ShowChannel = function (_React$Component) {\n _inherits(ShowChannel, _React$Component);\n\n function ShowChannel() {\n _classCallCheck(this, ShowChannel);\n\n return _possibleConstructorReturn(this, (ShowChannel.__proto__ || Object.getPrototypeOf(ShowChannel)).apply(this, arguments));\n }\n\n _createClass(ShowChannel, [{\n key: 'render',\n value: function render() {\n var channel = this.props.channel;\n\n if (channel) {\n var name = channel.name,\n longId = channel.longId,\n shortId = channel.shortId;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_SEO2.default, { pageTitle: name, channel: channel }),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(\n 'h2',\n null,\n 'channel name: ',\n name\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'full channel id: ',\n longId\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'short channel id: ',\n shortId\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_ChannelClaimsDisplay2.default, null)\n )\n )\n );\n };\n return _react2.default.createElement(_ErrorPage2.default, { error: 'loading channel data...' });\n }\n }]);\n\n return ShowChannel;\n}(_react2.default.Component);\n\n;\n\nexports.default = ShowChannel;\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _AssetPreview = __webpack_require__(34);\n\nvar _AssetPreview2 = _interopRequireDefault(_AssetPreview);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelClaimsDisplay = function (_React$Component) {\n _inherits(ChannelClaimsDisplay, _React$Component);\n\n function ChannelClaimsDisplay(props) {\n _classCallCheck(this, ChannelClaimsDisplay);\n\n var _this = _possibleConstructorReturn(this, (ChannelClaimsDisplay.__proto__ || Object.getPrototypeOf(ChannelClaimsDisplay)).call(this, props));\n\n _this.showNextResultsPage = _this.showNextResultsPage.bind(_this);\n _this.showPreviousResultsPage = _this.showPreviousResultsPage.bind(_this);\n return _this;\n }\n\n _createClass(ChannelClaimsDisplay, [{\n key: 'showPreviousResultsPage',\n value: function showPreviousResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n }, {\n key: 'showNextResultsPage',\n value: function showNextResultsPage() {\n var currentPage = this.props.channel.claimsData.currentPage;\n\n var nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n }, {\n key: 'showNewPage',\n value: function showNewPage(page) {\n var _props = this.props,\n channelKey = _props.channelKey,\n _props$channel = _props.channel,\n name = _props$channel.name,\n longId = _props$channel.longId;\n\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props$channel$claims = this.props.channel.claimsData,\n claims = _props$channel$claims.claims,\n currentPage = _props$channel$claims.currentPage,\n totalPages = _props$channel$claims.totalPages;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall' },\n claims.length > 0 ? _react2.default.createElement(\n 'div',\n null,\n claims.map(function (claim, index) {\n return _react2.default.createElement(_AssetPreview2.default, {\n claimData: claim,\n key: claim.name + '-' + index\n });\n }),\n _react2.default.createElement(\n 'div',\n null,\n currentPage > 1 && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showPreviousResultsPage },\n 'Previous Page'\n ),\n currentPage < totalPages && _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.showNextResultsPage },\n 'Next Page'\n )\n )\n ) : _react2.default.createElement(\n 'p',\n null,\n 'There are no claims in this channel'\n )\n );\n }\n }]);\n\n return ChannelClaimsDisplay;\n}(_react2.default.Component);\n\n;\n\nexports.default = ChannelClaimsDisplay;\n\n/***/ }),\n/* 78 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AssetPreview = function AssetPreview(_ref) {\n var defaultThumbnail = _ref.defaultThumbnail,\n _ref$claimData = _ref.claimData,\n name = _ref$claimData.name,\n claimId = _ref$claimData.claimId,\n fileExt = _ref$claimData.fileExt,\n contentType = _ref$claimData.contentType,\n thumbnail = _ref$claimData.thumbnail;\n\n var directSourceLink = claimId + '/' + name + '.' + fileExt;\n var showUrlLink = '/' + claimId + '/' + name;\n return _react2.default.createElement(\n 'div',\n { className: 'asset-holder' },\n _react2.default.createElement(\n _reactRouterDom.Link,\n { to: showUrlLink },\n function () {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return _react2.default.createElement('img', {\n className: 'asset-preview',\n src: directSourceLink,\n alt: name\n });\n case 'video/mp4':\n return _react2.default.createElement('img', {\n className: 'asset-preview video',\n src: thumbnail || defaultThumbnail,\n alt: name\n });\n default:\n return _react2.default.createElement(\n 'p',\n null,\n 'unsupported file type'\n );\n }\n }()\n )\n );\n};\n\nexports.default = AssetPreview;\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _NavBar = __webpack_require__(5);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _reactHelmet = __webpack_require__(48);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar FourOhForPage = function (_React$Component) {\n _inherits(FourOhForPage, _React$Component);\n\n function FourOhForPage() {\n _classCallCheck(this, FourOhForPage);\n\n return _possibleConstructorReturn(this, (FourOhForPage.__proto__ || Object.getPrototypeOf(FourOhForPage)).apply(this, arguments));\n }\n\n _createClass(FourOhForPage, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n title = _props.title,\n host = _props.host;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n _reactHelmet2.default,\n null,\n _react2.default.createElement(\n 'title',\n null,\n title,\n ' - 404'\n ),\n _react2.default.createElement('link', { rel: 'canonical', href: host + '/404' })\n ),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(\n 'h2',\n null,\n '404'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'That page does not exist'\n )\n )\n );\n }\n }]);\n\n return FourOhForPage;\n}(_react2.default.Component);\n\n;\n\nexports.default = FourOhForPage;\n\n/***/ }),\n/* 80 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _require = __webpack_require__(98),\n lstatSync = _require.lstatSync,\n readdirSync = _require.readdirSync;\n\nvar _require2 = __webpack_require__(51),\n join = _require2.join;\n\nvar getSubDirectoryNames = exports.getSubDirectoryNames = function getSubDirectoryNames(root) {\n return readdirSync(root).filter(function (name) {\n var fullPath = join(root, name);\n return lstatSync(fullPath).isDirectory();\n });\n};\n\n/***/ }),\n/* 81 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ChannelLoginForm = __webpack_require__(15);\n\nvar _ChannelLoginForm2 = _interopRequireDefault(_ChannelLoginForm);\n\nvar _ChannelCreateForm = __webpack_require__(16);\n\nvar _ChannelCreateForm2 = _interopRequireDefault(_ChannelCreateForm);\n\nvar _publish_channel_select_states = __webpack_require__(105);\n\nvar states = _interopRequireWildcard(_publish_channel_select_states);\n\nfunction _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; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelSelect = function (_React$Component) {\n _inherits(ChannelSelect, _React$Component);\n\n function ChannelSelect(props) {\n _classCallCheck(this, ChannelSelect);\n\n var _this = _possibleConstructorReturn(this, (ChannelSelect.__proto__ || Object.getPrototypeOf(ChannelSelect)).call(this, props));\n\n _this.toggleAnonymousPublish = _this.toggleAnonymousPublish.bind(_this);\n _this.handleSelection = _this.handleSelection.bind(_this);\n return _this;\n }\n\n _createClass(ChannelSelect, [{\n key: 'toggleAnonymousPublish',\n value: function toggleAnonymousPublish(event) {\n var value = event.target.value;\n if (value === 'anonymous') {\n this.props.onPublishInChannelChange(false);\n } else {\n this.props.onPublishInChannelChange(true);\n }\n }\n }, {\n key: 'handleSelection',\n value: function handleSelection(event) {\n var selectedOption = event.target.selectedOptions[0].value;\n this.props.onChannelSelect(selectedOption);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'form',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--med-10' },\n _react2.default.createElement('input', { type: 'radio', name: 'anonymous-or-channel', id: 'anonymous-radio', className: 'input-radio', value: 'anonymous', checked: !this.props.publishInChannel, onChange: this.toggleAnonymousPublish }),\n _react2.default.createElement(\n 'label',\n { className: 'label label--pointer', htmlFor: 'anonymous-radio' },\n 'Anonymous'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7 column--med-10' },\n _react2.default.createElement('input', { type: 'radio', name: 'anonymous-or-channel', id: 'channel-radio', className: 'input-radio', value: 'in a channel', checked: this.props.publishInChannel, onChange: this.toggleAnonymousPublish }),\n _react2.default.createElement(\n 'label',\n { className: 'label label--pointer', htmlFor: 'channel-radio' },\n 'In a channel'\n )\n ),\n this.props.channelError ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.props.channelError\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Publish anonymously or in a channel'\n )\n ),\n this.props.publishInChannel && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'column column--3' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-name-select' },\n 'Channel:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'select',\n { type: 'text', id: 'channel-name-select', className: 'select select--arrow', value: this.props.selectedChannel, onChange: this.handleSelection },\n this.props.loggedInChannelName && _react2.default.createElement(\n 'option',\n { value: this.props.loggedInChannelName, id: 'publish-channel-select-channel-option' },\n this.props.loggedInChannelName\n ),\n _react2.default.createElement(\n 'option',\n { value: states.LOGIN },\n 'Existing'\n ),\n _react2.default.createElement(\n 'option',\n { value: states.CREATE },\n 'New'\n )\n )\n ),\n this.props.selectedChannel === states.LOGIN && _react2.default.createElement(_ChannelLoginForm2.default, null),\n this.props.selectedChannel === states.CREATE && _react2.default.createElement(_ChannelCreateForm2.default, null)\n )\n );\n }\n }]);\n\n return ChannelSelect;\n}(_react2.default.Component);\n\nexports.default = ChannelSelect;\n\n/***/ }),\n/* 82 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _file = __webpack_require__(60);\n\nvar _PublishPreview = __webpack_require__(37);\n\nvar _PublishPreview2 = _interopRequireDefault(_PublishPreview);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Dropzone = function (_React$Component) {\n _inherits(Dropzone, _React$Component);\n\n function Dropzone(props) {\n _classCallCheck(this, Dropzone);\n\n var _this = _possibleConstructorReturn(this, (Dropzone.__proto__ || Object.getPrototypeOf(Dropzone)).call(this, props));\n\n _this.state = {\n dragOver: false,\n mouseOver: false,\n dimPreview: false\n };\n _this.handleDrop = _this.handleDrop.bind(_this);\n _this.handleDragOver = _this.handleDragOver.bind(_this);\n _this.handleDragEnd = _this.handleDragEnd.bind(_this);\n _this.handleDragEnter = _this.handleDragEnter.bind(_this);\n _this.handleDragLeave = _this.handleDragLeave.bind(_this);\n _this.handleMouseEnter = _this.handleMouseEnter.bind(_this);\n _this.handleMouseLeave = _this.handleMouseLeave.bind(_this);\n _this.handleClick = _this.handleClick.bind(_this);\n _this.handleFileInput = _this.handleFileInput.bind(_this);\n _this.chooseFile = _this.chooseFile.bind(_this);\n return _this;\n }\n\n _createClass(Dropzone, [{\n key: 'handleDrop',\n value: function handleDrop(event) {\n event.preventDefault();\n this.setState({ dragOver: false });\n // if dropped items aren't files, reject them\n var dt = event.dataTransfer;\n if (dt.items) {\n if (dt.items[0].kind === 'file') {\n var droppedFile = dt.items[0].getAsFile();\n this.chooseFile(droppedFile);\n }\n }\n }\n }, {\n key: 'handleDragOver',\n value: function handleDragOver(event) {\n event.preventDefault();\n }\n }, {\n key: 'handleDragEnd',\n value: function handleDragEnd(event) {\n var dt = event.dataTransfer;\n if (dt.items) {\n for (var i = 0; i < dt.items.length; i++) {\n dt.items.remove(i);\n }\n } else {\n event.dataTransfer.clearData();\n }\n }\n }, {\n key: 'handleDragEnter',\n value: function handleDragEnter() {\n this.setState({ dragOver: true, dimPreview: true });\n }\n }, {\n key: 'handleDragLeave',\n value: function handleDragLeave() {\n this.setState({ dragOver: false, dimPreview: false });\n }\n }, {\n key: 'handleMouseEnter',\n value: function handleMouseEnter() {\n this.setState({ mouseOver: true, dimPreview: true });\n }\n }, {\n key: 'handleMouseLeave',\n value: function handleMouseLeave() {\n this.setState({ mouseOver: false, dimPreview: false });\n }\n }, {\n key: 'handleClick',\n value: function handleClick(event) {\n event.preventDefault();\n document.getElementById('file_input').click();\n }\n }, {\n key: 'handleFileInput',\n value: function handleFileInput(event) {\n event.preventDefault();\n var fileList = event.target.files;\n this.chooseFile(fileList[0]);\n }\n }, {\n key: 'chooseFile',\n value: function chooseFile(file) {\n if (file) {\n try {\n (0, _file.validateFile)(file); // validate the file's name, type, and size\n } catch (error) {\n return this.props.setFileError(error.message);\n }\n // stage it so it will be ready when the publish button is clicked\n this.props.selectFile(file);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column' },\n _react2.default.createElement(\n 'form',\n null,\n _react2.default.createElement('input', { className: 'input-file', type: 'file', id: 'file_input', name: 'file_input', accept: 'video/*,image/*', onChange: this.handleFileInput, encType: 'multipart/form-data' })\n ),\n _react2.default.createElement(\n 'div',\n { id: 'preview-dropzone', className: 'row row--padded row--tall dropzone' + (this.state.dragOver ? ' dropzone--drag-over' : ''), onDrop: this.handleDrop, onDragOver: this.handleDragOver, onDragEnd: this.handleDragEnd, onDragEnter: this.handleDragEnter, onDragLeave: this.handleDragLeave, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onClick: this.handleClick },\n this.props.file ? _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_PublishPreview2.default, {\n dimPreview: this.state.dimPreview,\n file: this.props.file,\n thumbnail: this.props.thumbnail\n }),\n _react2.default.createElement(\n 'div',\n { id: 'dropzone-text-holder', className: 'flex-container--column flex-container--center-center' },\n this.state.dragOver ? _react2.default.createElement(\n 'div',\n { id: 'dropzone-dragover' },\n _react2.default.createElement(\n 'p',\n { className: 'blue' },\n 'Drop it.'\n )\n ) : null,\n this.state.mouseOver ? _react2.default.createElement(\n 'div',\n { id: 'dropzone-instructions' },\n _react2.default.createElement(\n 'p',\n { className: 'info-message-placeholder info-message--failure', id: 'input-error-file-selection' },\n this.props.fileError\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Drag & drop image or video here to publish'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'OR'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'blue--underlined' },\n 'CHOOSE FILE'\n )\n ) : null\n )\n ) : _react2.default.createElement(\n 'div',\n { id: 'dropzone-text-holder', className: 'flex-container--column flex-container--center-center' },\n this.state.dragOver ? _react2.default.createElement(\n 'div',\n { id: 'dropzone-dragover' },\n _react2.default.createElement(\n 'p',\n { className: 'blue' },\n 'Drop it.'\n )\n ) : _react2.default.createElement(\n 'div',\n { id: 'dropzone-instructions' },\n _react2.default.createElement(\n 'p',\n { className: 'info-message-placeholder info-message--failure', id: 'input-error-file-selection' },\n this.props.fileError\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Drag & drop image or video here to publish'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'OR'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'blue--underlined' },\n 'CHOOSE FILE'\n )\n )\n )\n )\n );\n }\n }]);\n\n return Dropzone;\n}(_react2.default.Component);\n\n;\n\nexports.default = Dropzone;\n\n/***/ }),\n/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _Dropzone = __webpack_require__(18);\n\nvar _Dropzone2 = _interopRequireDefault(_Dropzone);\n\nvar _PublishTitleInput = __webpack_require__(41);\n\nvar _PublishTitleInput2 = _interopRequireDefault(_PublishTitleInput);\n\nvar _PublishUrlInput = __webpack_require__(42);\n\nvar _PublishUrlInput2 = _interopRequireDefault(_PublishUrlInput);\n\nvar _PublishThumbnailInput = __webpack_require__(43);\n\nvar _PublishThumbnailInput2 = _interopRequireDefault(_PublishThumbnailInput);\n\nvar _PublishMetadataInputs = __webpack_require__(44);\n\nvar _PublishMetadataInputs2 = _interopRequireDefault(_PublishMetadataInputs);\n\nvar _ChannelSelect = __webpack_require__(39);\n\nvar _ChannelSelect2 = _interopRequireDefault(_ChannelSelect);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishDetails = function (_React$Component) {\n _inherits(PublishDetails, _React$Component);\n\n function PublishDetails(props) {\n _classCallCheck(this, PublishDetails);\n\n var _this = _possibleConstructorReturn(this, (PublishDetails.__proto__ || Object.getPrototypeOf(PublishDetails)).call(this, props));\n\n _this.onPublishSubmit = _this.onPublishSubmit.bind(_this);\n return _this;\n }\n\n _createClass(PublishDetails, [{\n key: 'onPublishSubmit',\n value: function onPublishSubmit() {\n this.props.startPublish(this.props.history);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'row row--no-bottom' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_PublishTitleInput2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(_Dropzone2.default, null)\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { id: 'publish-active-area', className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-top row--wide' },\n _react2.default.createElement(_PublishUrlInput2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-top row--wide' },\n _react2.default.createElement(_ChannelSelect2.default, null)\n ),\n this.props.file.type === 'video/mp4' && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-top row--wide ' },\n _react2.default.createElement(_PublishThumbnailInput2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-top row--no-bottom row--wide' },\n _react2.default.createElement(_PublishMetadataInputs2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide align-content-center' },\n _react2.default.createElement(\n 'button',\n { id: 'publish-submit', className: 'button--primary button--large', onClick: this.onPublishSubmit },\n 'Publish'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-bottom align-content-center' },\n _react2.default.createElement(\n 'button',\n { className: 'button--cancel', onClick: this.props.clearFile },\n 'Cancel'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--short align-content-center' },\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'By clicking \\'Publish\\', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://lbry.io/learn' },\n 'Read more.'\n )\n )\n )\n )\n )\n );\n }\n }]);\n\n return PublishDetails;\n}(_react2.default.Component);\n\n;\n\nexports.default = (0, _reactRouterDom.withRouter)(PublishDetails);\n\n/***/ }),\n/* 84 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishTitleInput = function (_React$Component) {\n _inherits(PublishTitleInput, _React$Component);\n\n function PublishTitleInput(props) {\n _classCallCheck(this, PublishTitleInput);\n\n var _this = _possibleConstructorReturn(this, (PublishTitleInput.__proto__ || Object.getPrototypeOf(PublishTitleInput)).call(this, props));\n\n _this.handleInput = _this.handleInput.bind(_this);\n return _this;\n }\n\n _createClass(PublishTitleInput, [{\n key: 'handleInput',\n value: function handleInput(e) {\n var name = e.target.name;\n var value = e.target.value;\n this.props.onMetadataChange(name, value);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement('input', { type: 'text', id: 'publish-title', className: 'input-text text--large input-text--full-width', name: 'title', placeholder: 'Give your post a title...', onChange: this.handleInput, value: this.props.title });\n }\n }]);\n\n return PublishTitleInput;\n}(_react2.default.Component);\n\nexports.default = PublishTitleInput;\n\n/***/ }),\n/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nvar _PublishUrlMiddleDisplay = __webpack_require__(38);\n\nvar _PublishUrlMiddleDisplay2 = _interopRequireDefault(_PublishUrlMiddleDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishUrlInput = function (_React$Component) {\n _inherits(PublishUrlInput, _React$Component);\n\n function PublishUrlInput(props) {\n _classCallCheck(this, PublishUrlInput);\n\n var _this = _possibleConstructorReturn(this, (PublishUrlInput.__proto__ || Object.getPrototypeOf(PublishUrlInput)).call(this, props));\n\n _this.handleInput = _this.handleInput.bind(_this);\n return _this;\n }\n\n _createClass(PublishUrlInput, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props = this.props,\n claim = _props.claim,\n fileName = _props.fileName;\n\n if (!claim) {\n this.setClaimName(fileName);\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(_ref) {\n var claim = _ref.claim,\n fileName = _ref.fileName;\n\n // if a new file was chosen, update the claim name\n if (fileName !== this.props.fileName) {\n return this.setClaimName(fileName);\n }\n // if the claim has updated, check its availability\n if (claim !== this.props.claim) {\n this.validateClaim(claim);\n }\n }\n }, {\n key: 'handleInput',\n value: function handleInput(event) {\n var value = event.target.value;\n value = this.cleanseInput(value);\n // update the state\n this.props.onClaimChange(value);\n }\n }, {\n key: 'cleanseInput',\n value: function cleanseInput(input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n }, {\n key: 'setClaimName',\n value: function setClaimName(fileName) {\n var fileNameWithoutEnding = fileName.substring(0, fileName.lastIndexOf('.'));\n var cleanClaimName = this.cleanseInput(fileNameWithoutEnding);\n this.props.onClaimChange(cleanClaimName);\n }\n }, {\n key: 'validateClaim',\n value: function validateClaim(claim) {\n var _this2 = this;\n\n if (!claim) {\n return this.props.onUrlError('Enter a url above');\n }\n (0, _request2.default)('/api/claim/availability/' + claim).then(function () {\n _this2.props.onUrlError(null);\n }).catch(function (error) {\n _this2.props.onUrlError(error.message);\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _props2 = this.props,\n claim = _props2.claim,\n loggedInChannelName = _props2.loggedInChannelName,\n loggedInChannelShortId = _props2.loggedInChannelShortId,\n publishInChannel = _props2.publishInChannel,\n selectedChannel = _props2.selectedChannel,\n urlError = _props2.urlError;\n\n return _react2.default.createElement(\n 'div',\n { className: 'column column--10 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary span--relative' },\n _react2.default.createElement(\n 'span',\n { className: 'url-text--secondary' },\n 'spee.ch / '\n ),\n _react2.default.createElement(_PublishUrlMiddleDisplay2.default, {\n publishInChannel: publishInChannel,\n selectedChannel: selectedChannel,\n loggedInChannelName: loggedInChannelName,\n loggedInChannelShortId: loggedInChannelShortId\n }),\n _react2.default.createElement('input', { type: 'text', id: 'claim-name-input', className: 'input-text', name: 'claim', placeholder: 'your-url-here', onChange: this.handleInput, value: claim }),\n claim && !urlError && _react2.default.createElement(\n 'span',\n { id: 'input-success-claim-name', className: 'info-message--success span--absolute' },\n '\\u2713'\n ),\n urlError && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--failure span--absolute' },\n '\\u2716'\n )\n ),\n _react2.default.createElement(\n 'div',\n null,\n urlError ? _react2.default.createElement(\n 'p',\n { id: 'input-error-claim-name', className: 'info-message--failure' },\n urlError\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Choose a custom url'\n )\n )\n );\n }\n }]);\n\n return PublishUrlInput;\n}(_react2.default.Component);\n\nexports.default = PublishUrlInput;\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction dataURItoBlob(dataURI) {\n // convert base64/URLEncoded data component to raw binary data held in a string\n var byteString = atob(dataURI.split(',')[1]);\n // separate out the mime component\n var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n // write the bytes of the string to a typed array\n var ia = new Uint8Array(byteString.length);\n for (var i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n return new Blob([ia], { type: mimeString });\n}\n\nvar PublishThumbnailInput = function (_React$Component) {\n _inherits(PublishThumbnailInput, _React$Component);\n\n function PublishThumbnailInput(props) {\n _classCallCheck(this, PublishThumbnailInput);\n\n var _this = _possibleConstructorReturn(this, (PublishThumbnailInput.__proto__ || Object.getPrototypeOf(PublishThumbnailInput)).call(this, props));\n\n _this.state = {\n videoSource: null,\n error: null,\n sliderMinRange: 1,\n sliderMaxRange: null,\n sliderValue: null\n };\n _this.handleVideoLoadedData = _this.handleVideoLoadedData.bind(_this);\n _this.handleSliderChange = _this.handleSliderChange.bind(_this);\n _this.createThumbnail = _this.createThumbnail.bind(_this);\n return _this;\n }\n\n _createClass(PublishThumbnailInput, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var file = this.props.file;\n\n this.setVideoSource(file);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n // if file changes\n if (nextProps.file && nextProps.file !== this.props.file) {\n var file = nextProps.file;\n\n this.setVideoSource(file);\n };\n }\n }, {\n key: 'setVideoSource',\n value: function setVideoSource(file) {\n var _this2 = this;\n\n var previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = function () {\n var dataUri = previewReader.result;\n var blob = dataURItoBlob(dataUri);\n var videoSource = URL.createObjectURL(blob);\n _this2.setState({ videoSource: videoSource });\n };\n }\n }, {\n key: 'handleVideoLoadedData',\n value: function handleVideoLoadedData(event) {\n var duration = event.target.duration;\n var totalMinutes = Math.floor(duration / 60);\n var totalSeconds = Math.floor(duration % 60);\n // set the slider\n this.setState({\n sliderMaxRange: duration * 100,\n sliderValue: duration * 100 / 2,\n totalMinutes: totalMinutes,\n totalSeconds: totalSeconds\n });\n // update the current time of the video\n var video = document.getElementById('video-thumb-player');\n video.currentTime = duration / 2;\n }\n }, {\n key: 'handleSliderChange',\n value: function handleSliderChange(event) {\n var value = parseInt(event.target.value);\n // update the slider value\n this.setState({\n sliderValue: value\n });\n // update the current time of the video\n var video = document.getElementById('video-thumb-player');\n video.currentTime = value / 100;\n }\n }, {\n key: 'createThumbnail',\n value: function createThumbnail() {\n // take a snapshot\n var video = document.getElementById('video-thumb-player');\n var canvas = document.createElement('canvas');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);\n var dataUrl = canvas.toDataURL();\n var blob = dataURItoBlob(dataUrl);\n var snapshot = new File([blob], 'thumbnail.png', {\n type: 'image/png'\n });\n // set the thumbnail in redux store\n if (snapshot) {\n this.props.onNewThumbnail(snapshot);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _state = this.state,\n error = _state.error,\n videoSource = _state.videoSource,\n sliderMinRange = _state.sliderMinRange,\n sliderMaxRange = _state.sliderMaxRange,\n sliderValue = _state.sliderValue,\n totalMinutes = _state.totalMinutes,\n totalSeconds = _state.totalSeconds;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'label',\n { className: 'label' },\n 'Thumbnail:'\n ),\n _react2.default.createElement('video', {\n id: 'video-thumb-player',\n preload: 'metadata',\n muted: true,\n style: { display: 'none' },\n playsInline: true,\n onLoadedData: this.handleVideoLoadedData,\n src: videoSource,\n onSeeked: this.createThumbnail\n }),\n sliderValue ? _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'flex-container--row flex-container--space-between-center', style: { width: '100%' } },\n _react2.default.createElement(\n 'span',\n { className: 'info-message' },\n '0\\'00\"'\n ),\n _react2.default.createElement(\n 'span',\n { className: 'info-message' },\n totalMinutes,\n '\\'',\n totalSeconds,\n '\"'\n )\n ),\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('input', {\n type: 'range',\n min: sliderMinRange,\n max: sliderMaxRange,\n value: sliderValue,\n className: 'slider',\n onChange: this.handleSliderChange\n })\n )\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'loading... '\n ),\n error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Use slider to set thumbnail'\n )\n );\n }\n }]);\n\n return PublishThumbnailInput;\n}(_react2.default.Component);\n\nexports.default = PublishThumbnailInput;\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ExpandingTextArea = __webpack_require__(36);\n\nvar _ExpandingTextArea2 = _interopRequireDefault(_ExpandingTextArea);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishMetadataInputs = function (_React$Component) {\n _inherits(PublishMetadataInputs, _React$Component);\n\n function PublishMetadataInputs(props) {\n _classCallCheck(this, PublishMetadataInputs);\n\n var _this = _possibleConstructorReturn(this, (PublishMetadataInputs.__proto__ || Object.getPrototypeOf(PublishMetadataInputs)).call(this, props));\n\n _this.toggleShowInputs = _this.toggleShowInputs.bind(_this);\n _this.handleInput = _this.handleInput.bind(_this);\n _this.handleSelect = _this.handleSelect.bind(_this);\n return _this;\n }\n\n _createClass(PublishMetadataInputs, [{\n key: 'toggleShowInputs',\n value: function toggleShowInputs() {\n this.props.onToggleMetadataInputs(!this.props.showMetadataInputs);\n }\n }, {\n key: 'handleInput',\n value: function handleInput(event) {\n var target = event.target;\n var value = target.type === 'checkbox' ? target.checked : target.value;\n var name = target.name;\n this.props.onMetadataChange(name, value);\n }\n }, {\n key: 'handleSelect',\n value: function handleSelect(event) {\n var name = event.target.name;\n var selectedOption = event.target.selectedOptions[0].value;\n this.props.onMetadataChange(name, selectedOption);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { id: 'publish-details', className: 'row row--padded row--no-top row--wide' },\n this.props.showMetadataInputs && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'row row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'label',\n { htmlFor: 'publish-license', className: 'label' },\n 'Description:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7 column--sml-10' },\n _react2.default.createElement(_ExpandingTextArea2.default, {\n id: 'publish-description',\n className: 'textarea textarea--primary textarea--full-width',\n rows: 1,\n maxLength: 2000,\n style: { maxHeight: 200 },\n name: 'description',\n placeholder: 'Optional description',\n value: this.props.description,\n onChange: this.handleInput })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--med-10' },\n _react2.default.createElement(\n 'label',\n { htmlFor: 'publish-license', className: 'label' },\n 'License:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7 column--sml-10' },\n _react2.default.createElement(\n 'select',\n { type: 'text', name: 'license', id: 'publish-license', className: 'select select--primary', onChange: this.handleSelect },\n _react2.default.createElement(\n 'option',\n { value: ' ' },\n 'Unspecified'\n ),\n _react2.default.createElement(\n 'option',\n { value: 'Public Domain' },\n 'Public Domain'\n ),\n _react2.default.createElement(\n 'option',\n { value: 'Creative Commons' },\n 'Creative Commons'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3' },\n _react2.default.createElement(\n 'label',\n { htmlFor: 'publish-nsfw', className: 'label' },\n 'Mature:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement('input', { className: 'input-checkbox', type: 'checkbox', id: 'publish-nsfw', name: 'nsfw', value: this.props.nsfw, onChange: this.handleInput })\n )\n )\n ),\n _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.toggleShowInputs },\n this.props.showMetadataInputs ? 'less' : 'more'\n )\n );\n }\n }]);\n\n return PublishMetadataInputs;\n}(_react2.default.Component);\n\nexports.default = PublishMetadataInputs;\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishDisabledMessage = function (_React$Component) {\n _inherits(PublishDisabledMessage, _React$Component);\n\n function PublishDisabledMessage() {\n _classCallCheck(this, PublishDisabledMessage);\n\n return _possibleConstructorReturn(this, (PublishDisabledMessage.__proto__ || Object.getPrototypeOf(PublishDisabledMessage)).apply(this, arguments));\n }\n\n _createClass(PublishDisabledMessage, [{\n key: 'render',\n value: function render() {\n var message = this.props.message;\n console.log('this.props.message:', message);\n return _react2.default.createElement(\n 'div',\n { className: 'row dropzone--disabled row--tall flex-container--column flex-container--center-center' },\n _react2.default.createElement(\n 'p',\n { className: 'text--disabled' },\n 'Publishing is currently disabled.'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'text--disabled' },\n message\n )\n );\n }\n }]);\n\n return PublishDisabledMessage;\n}(_react2.default.Component);\n\nexports.default = PublishDisabledMessage;\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ProgressBar = __webpack_require__(10);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _publish_claim_states = __webpack_require__(170);\n\nvar publishStates = _interopRequireWildcard(_publish_claim_states);\n\nfunction _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; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishStatus = function (_React$Component) {\n _inherits(PublishStatus, _React$Component);\n\n function PublishStatus() {\n _classCallCheck(this, PublishStatus);\n\n return _possibleConstructorReturn(this, (PublishStatus.__proto__ || Object.getPrototypeOf(PublishStatus)).apply(this, arguments));\n }\n\n _createClass(PublishStatus, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n status = _props.status,\n message = _props.message,\n clearFile = _props.clearFile;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column flex-container--center-center' },\n status === publishStates.LOAD_START && _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'File is loading to server'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'blue' },\n '0%'\n )\n ),\n status === publishStates.LOADING && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'File is loading to server'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'blue' },\n message\n )\n )\n ),\n status === publishStates.PUBLISHING && _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'Upload complete. Your file is now being published on the blockchain...'\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 }),\n _react2.default.createElement(\n 'p',\n null,\n 'Curious what magic is happening here? ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: 'blank', href: 'https://lbry.io/faq/what-is-lbry' },\n 'Learn more.'\n )\n )\n ),\n status === publishStates.SUCCESS && _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'Your publish is complete! You are being redirected to it now.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you are not automatically redirected, ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: message },\n 'click here.'\n )\n )\n ),\n status === publishStates.FAILED && _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'Something went wrong...'\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'strong',\n null,\n message\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'For help, post the above error text in the #speech channel on the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS', target: '_blank' },\n 'lbry discord'\n )\n ),\n _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: clearFile },\n 'Reset'\n )\n )\n );\n }\n }]);\n\n return PublishStatus;\n}(_react2.default.Component);\n\n;\n\nexports.default = PublishStatus;\n\n/***/ }),\n/* 90 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _Dropzone = __webpack_require__(18);\n\nvar _Dropzone2 = _interopRequireDefault(_Dropzone);\n\nvar _PublishDetails = __webpack_require__(40);\n\nvar _PublishDetails2 = _interopRequireDefault(_PublishDetails);\n\nvar _PublishStatus = __webpack_require__(46);\n\nvar _PublishStatus2 = _interopRequireDefault(_PublishStatus);\n\nvar _PublishDisabledMessage = __webpack_require__(45);\n\nvar _PublishDisabledMessage2 = _interopRequireDefault(_PublishDisabledMessage);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishTool = function (_React$Component) {\n _inherits(PublishTool, _React$Component);\n\n function PublishTool() {\n _classCallCheck(this, PublishTool);\n\n return _possibleConstructorReturn(this, (PublishTool.__proto__ || Object.getPrototypeOf(PublishTool)).apply(this, arguments));\n }\n\n _createClass(PublishTool, [{\n key: 'render',\n value: function render() {\n if (this.props.disabled) {\n console.log('publish is disabled');\n return _react2.default.createElement(_PublishDisabledMessage2.default, null);\n } else {\n console.log('publish is not disabled');\n if (this.props.file) {\n if (this.props.status) {\n return _react2.default.createElement(_PublishStatus2.default, null);\n } else {\n return _react2.default.createElement(_PublishDetails2.default, null);\n }\n }\n return _react2.default.createElement(_Dropzone2.default, null);\n }\n }\n }]);\n\n return PublishTool;\n}(_react2.default.Component);\n\n;\n\nexports.default = PublishTool;\n\n/***/ }),\n/* 91 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"passport\");\n\n/***/ }),\n/* 92 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction MysqlConfig() {\n var _this = this;\n\n this.database = 'default';\n this.username = 'default';\n this.password = 'default';\n this.configure = function (config) {\n if (!config) {\n return console.log('No MySQL config received.');\n }\n var database = config.database,\n username = config.username,\n password = config.password;\n\n _this.database = database;\n _this.username = username;\n _this.password = password;\n };\n};\n\nmodule.exports = new MysqlConfig();\n\n/***/ }),\n/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction SlackConfig() {\n var _this = this;\n\n this.slackWebHook = 'default';\n this.slackErrorChannel = 'default';\n this.slackInfoChannel = 'default';\n this.configure = function (config) {\n if (!config) {\n return console.log('No slack config received.');\n }\n var slackWebHook = config.slackWebHook,\n slackErrorChannel = config.slackErrorChannel,\n slackInfoChannel = config.slackInfoChannel;\n\n _this.slackWebHook = slackWebHook;\n _this.slackErrorChannel = slackErrorChannel;\n _this.slackInfoChannel = slackInfoChannel;\n };\n};\n\nmodule.exports = new SlackConfig();\n\n/***/ }),\n/* 94 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"passport-local\");\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"sequelize\");\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n returnShortId: function returnShortId(claimsArray, longId) {\n var claimIndex = void 0;\n var shortId = longId.substring(0, 1); // default short id is the first letter\n var shortIdLength = 0;\n // find the index of this claim id\n claimIndex = claimsArray.findIndex(function (element) {\n return element.claimId === longId;\n });\n if (claimIndex < 0) {\n throw new Error('claim id not found in claims list');\n }\n // get an array of all claims with lower height\n var possibleMatches = claimsArray.slice(0, claimIndex);\n // remove certificates with the same prefixes until none are left.\n while (possibleMatches.length > 0) {\n shortIdLength += 1;\n shortId = longId.substring(0, shortIdLength);\n possibleMatches = possibleMatches.filter(function (element) {\n return element.claimId && element.claimId.substring(0, shortIdLength) === shortId;\n });\n }\n return shortId;\n }\n};\n\n/***/ }),\n/* 97 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\nvar fs = __webpack_require__(98);\n\nvar _require = __webpack_require__(3),\n details = _require.details,\n publishing = _require.publishing;\n\nmodule.exports = {\n parsePublishApiRequestBody: function parsePublishApiRequestBody(_ref) {\n var name = _ref.name,\n nsfw = _ref.nsfw,\n license = _ref.license,\n title = _ref.title,\n description = _ref.description,\n thumbnail = _ref.thumbnail;\n\n // validate name\n if (!name) {\n throw new Error('no name field found in request');\n }\n var invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name);\n if (invalidNameCharacters) {\n throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and \"-\"');\n }\n // optional parameters\n nsfw = nsfw === 'true';\n license = license || null;\n title = title || null;\n description = description || null;\n thumbnail = thumbnail || null;\n // return results\n return {\n name: name,\n nsfw: nsfw,\n license: license,\n title: title,\n description: description,\n thumbnail: thumbnail\n };\n },\n parsePublishApiRequestFiles: function parsePublishApiRequestFiles(_ref2) {\n var file = _ref2.file,\n thumbnail = _ref2.thumbnail;\n\n // make sure a file was provided\n if (!file) {\n throw new Error('no file with key of [file] found in request');\n }\n if (!file.path) {\n throw new Error('no file path found');\n }\n if (!file.type) {\n throw new Error('no file type found');\n }\n if (!file.size) {\n throw new Error('no file type found');\n }\n // validate the file name\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate the file\n module.exports.validateFileTypeAndSize(file);\n // return results\n return {\n fileName: file.name,\n filePath: file.path,\n fileType: file.type,\n thumbnailFileName: thumbnail ? thumbnail.name : null,\n thumbnailFilePath: thumbnail ? thumbnail.path : null,\n thumbnailFileType: thumbnail ? thumbnail.type : null\n };\n },\n validateFileTypeAndSize: function validateFileTypeAndSize(file) {\n // check file type and size\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n logger.debug('publish > file validation > .jpeg/.jpg/.png was too big');\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .gif was too big');\n throw new Error('Sorry, .gifs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .mp4 was too big');\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n logger.debug('publish > file validation > unrecognized file type');\n throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n return file;\n },\n createBasicPublishParams: function createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail) {\n logger.debug('Creating Publish Parameters');\n // provide defaults for title\n if (title === null || title.trim() === '') {\n title = name;\n }\n // provide default for description\n if (description === null || description.trim() === '') {\n description = '';\n }\n // provide default for license\n if (license === null || license.trim() === '') {\n license = ' '; // default to empty string\n }\n // create the publish params\n var publishParams = {\n name: name,\n file_path: filePath,\n bid: 0.01,\n metadata: {\n description: description,\n title: title,\n author: details.title,\n language: 'en',\n license: license,\n nsfw: nsfw\n },\n claim_address: publishing.primaryClaimAddress\n };\n // add thumbnail to channel if video\n if (thumbnail) {\n publishParams['metadata']['thumbnail'] = thumbnail;\n }\n return publishParams;\n },\n createThumbnailPublishParams: function createThumbnailPublishParams(thumbnailFilePath, claimName, license, nsfw) {\n if (!thumbnailFilePath) {\n return;\n }\n logger.debug('Creating Thumbnail Publish Parameters');\n // create the publish params\n return {\n name: claimName + '-thumb',\n file_path: thumbnailFilePath,\n bid: 0.01,\n metadata: {\n title: claimName + ' thumbnail',\n description: 'a thumbnail for ' + claimName,\n author: details.title,\n language: 'en',\n license: license,\n nsfw: nsfw\n },\n claim_address: publishing.primaryClaimAddress,\n channel_name: publishing.thumbnailChannel,\n channel_id: publishing.thumbnailChannelId\n };\n },\n deleteTemporaryFile: function deleteTemporaryFile(filePath) {\n fs.unlink(filePath, function (err) {\n if (err) {\n logger.error('error deleting temporary file ' + filePath);\n throw err;\n }\n logger.debug('successfully deleted ' + filePath);\n });\n },\n addGetResultsToFileData: function addGetResultsToFileData(fileInfo, getResult) {\n fileInfo.fileName = getResult.file_name;\n fileInfo.filePath = getResult.download_path;\n return fileInfo;\n },\n createFileData: function createFileData(_ref3) {\n var name = _ref3.name,\n claimId = _ref3.claimId,\n outpoint = _ref3.outpoint,\n height = _ref3.height,\n address = _ref3.address,\n nsfw = _ref3.nsfw,\n contentType = _ref3.contentType;\n\n return {\n name: name,\n claimId: claimId,\n outpoint: outpoint,\n height: height,\n address: address,\n fileName: '',\n filePath: '',\n fileType: contentType,\n nsfw: nsfw\n };\n }\n};\n\n/***/ }),\n/* 98 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"fs\");\n\n/***/ }),\n/* 99 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n handleErrorResponse: function handleErrorResponse(originalUrl, ip, error, res) {\n logger.error('Error on ' + originalUrl, module.exports.useObjectPropertiesIfNoKeys(error));\n\n var _module$exports$retur = module.exports.returnErrorMessageAndStatus(error),\n _module$exports$retur2 = _slicedToArray(_module$exports$retur, 2),\n status = _module$exports$retur2[0],\n message = _module$exports$retur2[1];\n\n res.status(status).json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function returnErrorMessageAndStatus(error) {\n var status = void 0,\n message = void 0;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function useObjectPropertiesIfNoKeys(err) {\n if (Object.keys(err).length === 0) {\n var newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach(function (key) {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload: function createErrorResponsePayload(status, message) {\n return {\n status: status,\n success: false,\n message: message\n };\n }\n};\n\n/***/ }),\n/* 100 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar db = __webpack_require__(9);\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(145),\n returnPaginatedChannelClaims = _require.returnPaginatedChannelClaims;\n\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\nvar NO_FILE = 'NO_FILE';\n\nmodule.exports = {\n getClaimId: function getClaimId(channelName, channelClaimId, name, claimId) {\n if (channelName) {\n return module.exports.getClaimIdByChannel(channelName, channelClaimId, name);\n } else {\n return module.exports.getClaimIdByClaim(name, claimId);\n }\n },\n getClaimIdByClaim: function getClaimIdByClaim(claimName, claimId) {\n logger.debug('getClaimIdByClaim(' + claimName + ', ' + claimId + ')');\n return new Promise(function (resolve, reject) {\n db.Claim.getLongClaimId(claimName, claimId).then(function (longClaimId) {\n if (!longClaimId) {\n resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getClaimIdByChannel: function getClaimIdByChannel(channelName, channelClaimId, claimName) {\n logger.debug('getClaimIdByChannel(' + channelName + ', ' + channelClaimId + ', ' + claimName + ')');\n return new Promise(function (resolve, reject) {\n db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id\n .then(function (longChannelId) {\n if (!longChannelId) {\n return [null, null];\n }\n return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n longChannelId = _ref2[0],\n longClaimId = _ref2[1];\n\n if (!longChannelId) {\n return resolve(NO_CHANNEL);\n }\n if (!longClaimId) {\n return resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getChannelData: function getChannelData(channelName, channelClaimId, page) {\n return new Promise(function (resolve, reject) {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId).then(function (longChannelClaimId) {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]);\n }).then(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n longChannelClaimId = _ref4[0],\n shortChannelClaimId = _ref4[1];\n\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. return all the channel information\n resolve({\n channelName: channelName,\n longChannelClaimId: longChannelClaimId,\n shortChannelClaimId: shortChannelClaimId\n });\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getChannelClaims: function getChannelClaims(channelName, channelClaimId, page) {\n return new Promise(function (resolve, reject) {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId).then(function (longChannelClaimId) {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]);\n }).then(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n longChannelClaimId = _ref6[0],\n channelClaimsArray = _ref6[1];\n\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. format the data for the view, including pagination\n var paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);\n // 4. return all the channel information and contents\n resolve(paginatedChannelViewData);\n }).catch(function (error) {\n reject(error);\n });\n });\n },\n getLocalFileRecord: function getLocalFileRecord(claimId, name) {\n return db.File.findOne({ where: { claimId: claimId, name: name } }).then(function (file) {\n if (!file) {\n return NO_FILE;\n }\n return file.dataValues;\n });\n }\n};\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(102);\n\nvar _redux = __webpack_require__(57);\n\nvar _reducers = __webpack_require__(103);\n\nvar _reducers2 = _interopRequireDefault(_reducers);\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _GAListener = __webpack_require__(13);\n\nvar _GAListener2 = _interopRequireDefault(_GAListener);\n\nvar _app = __webpack_require__(108);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(113);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reactHelmet = __webpack_require__(48);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_reducers2.default);\n\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _GAListener2.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `` was rendered\n return res.redirect(301, context.url);\n } else {}\n // we're good, send the response\n\n\n // get the initial state from our Redux store\n var preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send((0, _renderFullPage2.default)(helmet, html, preloadedState));\n};\n\n/***/ }),\n/* 102 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-dom/server\");\n\n/***/ }),\n/* 103 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _redux = __webpack_require__(57);\n\nvar _publish = __webpack_require__(147);\n\nvar _publish2 = _interopRequireDefault(_publish);\n\nvar _channel = __webpack_require__(148);\n\nvar _channel2 = _interopRequireDefault(_channel);\n\nvar _show = __webpack_require__(149);\n\nvar _show2 = _interopRequireDefault(_show);\n\nvar _site = __webpack_require__(150);\n\nvar _site2 = _interopRequireDefault(_site);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = (0, _redux.combineReducers)({\n channel: _channel2.default,\n publish: _publish2.default,\n show: _show2.default,\n site: _site2.default\n});\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar FILE_SELECTED = exports.FILE_SELECTED = 'FILE_SELECTED';\nvar FILE_CLEAR = exports.FILE_CLEAR = 'FILE_CLEAR';\nvar METADATA_UPDATE = exports.METADATA_UPDATE = 'METADATA_UPDATE';\nvar CLAIM_UPDATE = exports.CLAIM_UPDATE = 'CLAIM_UPDATE';\nvar SET_PUBLISH_IN_CHANNEL = exports.SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';\nvar PUBLISH_STATUS_UPDATE = exports.PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';\nvar ERROR_UPDATE = exports.ERROR_UPDATE = 'ERROR_UPDATE';\nvar SELECTED_CHANNEL_UPDATE = exports.SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';\nvar TOGGLE_METADATA_INPUTS = exports.TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';\nvar THUMBNAIL_NEW = exports.THUMBNAIL_NEW = 'THUMBNAIL_NEW';\nvar PUBLISH_START = exports.PUBLISH_START = 'PUBLISH_START';\n\n/***/ }),\n/* 105 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOGIN = exports.LOGIN = 'Existing';\nvar CREATE = exports.CREATE = 'New';\n\n/***/ }),\n/* 106 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar CHANNEL_UPDATE = exports.CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n/***/ }),\n/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOCAL_CHECK = exports.LOCAL_CHECK = 'LOCAL_CHECK';\nvar UNAVAILABLE = exports.UNAVAILABLE = 'UNAVAILABLE';\nvar ERROR = exports.ERROR = 'ERROR';\nvar AVAILABLE = exports.AVAILABLE = 'AVAILABLE';\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _dynamicImport = __webpack_require__(58);\n\nvar _AboutPage = __webpack_require__(20);\n\nvar _AboutPage2 = _interopRequireDefault(_AboutPage);\n\nvar _LoginPage = __webpack_require__(23);\n\nvar _LoginPage2 = _interopRequireDefault(_LoginPage);\n\nvar _ShowPage = __webpack_require__(26);\n\nvar _ShowPage2 = _interopRequireDefault(_ShowPage);\n\nvar _FourOhFourPage = __webpack_require__(35);\n\nvar _FourOhFourPage2 = _interopRequireDefault(_FourOhFourPage);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HomePage = (0, _dynamicImport.dynamicImport)('pages/HomePage'); // or use the provided local homepage\n\nvar App = function App() {\n return _react2.default.createElement(\n _reactRouterDom.Switch,\n null,\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/', component: HomePage }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/about', component: _AboutPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/login', component: _LoginPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/:identifier/:claim', component: _ShowPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { exact: true, path: '/:claim', component: _ShowPage2.default }),\n _react2.default.createElement(_reactRouterDom.Route, { component: _FourOhFourPage2.default })\n );\n};\n\nexports.default = App;\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./canonicalLink\": 59,\n\t\"./canonicalLink.js\": 59,\n\t\"./dynamicImport\": 58,\n\t\"./dynamicImport.js\": 58,\n\t\"./file\": 60,\n\t\"./file.js\": 60,\n\t\"./lbryUri\": 61,\n\t\"./lbryUri.js\": 61,\n\t\"./metaTags\": 62,\n\t\"./metaTags.js\": 62,\n\t\"./pageTitle\": 63,\n\t\"./pageTitle.js\": 63,\n\t\"./publish\": 110,\n\t\"./publish.js\": 110,\n\t\"./request\": 8,\n\t\"./request.js\": 8,\n\t\"./validate\": 111,\n\t\"./validate.js\": 111\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 109;\n\n/***/ }),\n/* 110 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createPublishMetadata = exports.createPublishMetadata = function createPublishMetadata(claim, _ref, _ref2, publishInChannel, selectedChannel) {\n var type = _ref.type;\n var title = _ref2.title,\n description = _ref2.description,\n license = _ref2.license,\n nsfw = _ref2.nsfw;\n\n var metadata = {\n name: claim,\n title: title,\n description: description,\n license: license,\n nsfw: nsfw,\n type: type\n };\n if (publishInChannel) {\n metadata['channelName'] = selectedChannel;\n }\n return metadata;\n};\n\nvar createPublishFormData = exports.createPublishFormData = function createPublishFormData(file, thumbnail, metadata) {\n var fd = new FormData();\n // append file\n fd.append('file', file);\n // append thumbnail\n if (thumbnail) {\n fd.append('thumbnail', thumbnail);\n }\n // append metadata\n for (var key in metadata) {\n if (metadata.hasOwnProperty(key)) {\n fd.append(key, metadata[key]);\n }\n }\n return fd;\n};\n\nvar createThumbnailUrl = exports.createThumbnailUrl = function createThumbnailUrl(channel, channelId, claim, host) {\n return host + '/' + channel + ':' + channelId + '/' + claim + '-thumb.png';\n};\n\n/***/ }),\n/* 111 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar validateChannelSelection = exports.validateChannelSelection = function validateChannelSelection(publishInChannel, selectedChannel, loggedInChannel) {\n if (publishInChannel && selectedChannel !== loggedInChannel.name) {\n throw new Error('Log in to a channel or select Anonymous');\n }\n};\n\nvar validatePublishParams = exports.validatePublishParams = function validatePublishParams(file, claim, urlError) {\n if (!file) {\n throw new Error('Please choose a file');\n }\n if (!claim) {\n throw new Error('Please enter a URL');\n }\n if (urlError) {\n throw new Error('Fix the url');\n }\n};\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar CHANNEL = exports.CHANNEL = 'CHANNEL';\nvar ASSET_LITE = exports.ASSET_LITE = 'ASSET_LITE';\nvar ASSET_DETAILS = exports.ASSET_DETAILS = 'ASSET_DETAILS';\n\n/***/ }),\n/* 113 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (helmet, html, preloadedState) {\n // take the html and preloadedState and return the full page\n return '\\n \\n \\n \\n \\n \\n \\n \\n ' + helmet.title.toString() + '\\n ' + helmet.meta.toString() + '\\n ' + helmet.link.toString() + '\\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n
' + html + '
\\n
\\n \\n \\n \\n \\n ';\n};\n\n/***/ }),\n/* 114 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar selectSiteState = exports.selectSiteState = function selectSiteState(state) {\n return state.site;\n};\n\nvar selectSiteHost = exports.selectSiteHost = function selectSiteHost(state) {\n return state.site.host;\n};\n\n/***/ }),\n/* 115 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(116);\n__webpack_require__(117);\nmodule.exports = __webpack_require__(118);\n\n\n/***/ }),\n/* 116 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"babel-polyfill\");\n\n/***/ }),\n/* 117 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"whatwg-fetch\");\n\n/***/ }),\n/* 118 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Server = __webpack_require__(119);\nvar Components = __webpack_require__(50);\nvar Containers = __webpack_require__(52);\nvar Pages = __webpack_require__(53);\n\nvar _exports = {\n Server: Server,\n Components: Components,\n Containers: Containers,\n Pages: Pages\n};\n\nmodule.exports = _exports;\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// app dependencies\nvar express = __webpack_require__(120);\nvar bodyParser = __webpack_require__(121);\nvar expressHandlebars = __webpack_require__(122);\nvar Handlebars = __webpack_require__(123);\nvar helmet = __webpack_require__(124);\nvar passport = __webpack_require__(91);\n\nvar _require = __webpack_require__(125),\n serializeSpeechUser = _require.serializeSpeechUser,\n deserializeSpeechUser = _require.deserializeSpeechUser;\n\nvar cookieSession = __webpack_require__(126);\nvar http = __webpack_require__(127);\n// logging dependencies\nvar logger = __webpack_require__(2);\n\nfunction Server() {\n var _this = this;\n\n this.configureMysql = function (mysqlConfig) {\n __webpack_require__(92).configure(mysqlConfig);\n };\n this.configureSite = function (siteConfig) {\n __webpack_require__(3).configure(siteConfig);\n _this.sessionKey = siteConfig.auth.sessionKey;\n _this.PORT = siteConfig.details.port;\n };\n this.configureSlack = function (slackConfig) {\n __webpack_require__(93).configure(slackConfig);\n };\n this.createApp = function () {\n // create an Express application\n var app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(__dirname + '/public')); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use(function (req, res, next) {\n // custom logging middleware to log all incoming http requests\n logger.verbose('Request on ' + req.originalUrl + ' from ' + req.ip);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n var localSignupStrategy = __webpack_require__(128);\n var localLoginStrategy = __webpack_require__(139);\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name: 'session',\n keys: [_this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000 // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n var hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars: Handlebars\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n __webpack_require__(140)(app);\n __webpack_require__(141)(app);\n __webpack_require__(146)(app);\n __webpack_require__(153)(app);\n __webpack_require__(163)(app);\n\n _this.app = app;\n };\n this.initialize = function () {\n __webpack_require__(164)(logger);\n __webpack_require__(166)(logger);\n _this.createApp();\n _this.server = http.Server(_this.app);\n };\n this.start = function () {\n var db = __webpack_require__(9);\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(function () {\n _this.server.listen(_this.PORT, function () {\n logger.info('Server is listening on PORT ' + _this.PORT);\n });\n }).catch(function (error) {\n logger.error('Startup Error:', error);\n });\n };\n};\n\nmodule.exports = Server;\n\n/***/ }),\n/* 120 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express\");\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"body-parser\");\n\n/***/ }),\n/* 122 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express-handlebars\");\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"handlebars\");\n\n/***/ }),\n/* 124 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"helmet\");\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n serializeSpeechUser: function serializeSpeechUser(user, done) {\n // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser: function deserializeSpeechUser(user, done) {\n // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n }\n};\n\n/***/ }),\n/* 126 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cookie-session\");\n\n/***/ }),\n/* 127 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"http\");\n\n/***/ }),\n/* 128 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar PassportLocalStrategy = __webpack_require__(94).Strategy;\nvar lbryApi = __webpack_require__(55);\nvar logger = __webpack_require__(2);\nvar db = __webpack_require__(9);\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n logger.verbose('new channel signup request. user: ' + username + ' pass: ' + password + ' .');\n var userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel('@' + username).then(function (tx) {\n // create user record\n var userData = {\n userName: username,\n password: password\n };\n logger.verbose('userData >', userData);\n // create user record\n var channelData = {\n channelName: '@' + username,\n channelClaimId: tx.claim_id\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n var certificateData = {\n claimId: tx.claim_id,\n name: '@' + username\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 3),\n newUser = _ref2[0],\n newChannel = _ref2[1],\n newCertificate = _ref2[2];\n\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n }).then(function () {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n }).catch(function (error) {\n logger.error('signup error', error);\n return done(error);\n });\n});\n\n/***/ }),\n/* 129 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"axios\");\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279'\n }\n};\n\nmodule.exports = lbryConfig;\n\n/***/ }),\n/* 131 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"universal-analytics\");\n\n/***/ }),\n/* 132 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(96),\n returnShortId = _require.returnShortId;\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Certificate = sequelize.define('Certificate', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateVersion: {\n type: STRING,\n default: null\n },\n keyType: {\n type: STRING,\n default: null\n },\n publicKey: {\n type: TEXT('long'),\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Certificate.associate = function (db) {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n var _this = this;\n\n logger.debug('getShortChannelIdFromLongChannelId ' + channelName + ':' + longChannelId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: channelName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n var _this2 = this;\n\n logger.debug('getLongChannelIdFromShortChannelId(' + channelName + ', ' + channelClaimId + ')');\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: {\n name: channelName,\n claimId: {\n $like: channelClaimId + '%'\n }\n },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n var _this3 = this;\n\n logger.debug('getLongChannelIdFromChannelName(' + channelName + ')');\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n var _this4 = this;\n\n logger.debug('validateLongChannelId(' + name + ', ' + claimId + ')');\n return new Promise(function (resolve, reject) {\n _this4.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug('getLongChannelId(' + channelName + ', ' + channelClaimId + ')');\n if (channelClaimId && channelClaimId.length === 40) {\n // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) {\n // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n/***/ }),\n/* 133 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var Channel = sequelize.define('Channel', {\n channelName: {\n type: STRING,\n allowNull: false\n },\n channelClaimId: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n Channel.associate = function (db) {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n/***/ }),\n/* 134 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(96),\n returnShortId = _require.returnShortId;\n\nvar _require2 = __webpack_require__(3),\n defaultThumbnail = _require2.assetDefaults.thumbnail,\n host = _require2.details.host;\n\nfunction determineFileExtensionFromContentType(contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail(storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData(claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER,\n TEXT = _ref.TEXT,\n DECIMAL = _ref.DECIMAL;\n\n var Claim = sequelize.define('Claim', {\n address: {\n type: STRING,\n default: null\n },\n amount: {\n type: DECIMAL(19, 8),\n default: null\n },\n claimId: {\n type: STRING,\n default: null\n },\n claimSequence: {\n type: INTEGER,\n default: null\n },\n decodedClaim: {\n type: BOOLEAN,\n default: null\n },\n depth: {\n type: INTEGER,\n default: null\n },\n effectiveAmount: {\n type: DECIMAL(19, 8),\n default: null\n },\n hasSignature: {\n type: BOOLEAN,\n default: null\n },\n height: {\n type: INTEGER,\n default: null\n },\n hex: {\n type: TEXT('long'),\n default: null\n },\n name: {\n type: STRING,\n default: null\n },\n nout: {\n type: INTEGER,\n default: null\n },\n txid: {\n type: STRING,\n default: null\n },\n validAtHeight: {\n type: INTEGER,\n default: null\n },\n outpoint: {\n type: STRING,\n default: null\n },\n claimType: {\n type: STRING,\n default: null\n },\n certificateId: {\n type: STRING,\n default: null\n },\n author: {\n type: STRING,\n default: null\n },\n description: {\n type: TEXT('long'),\n default: null\n },\n language: {\n type: STRING,\n default: null\n },\n license: {\n type: STRING,\n default: null\n },\n licenseUrl: {\n type: STRING,\n default: null\n },\n nsfw: {\n type: BOOLEAN,\n default: null\n },\n preview: {\n type: STRING,\n default: null\n },\n thumbnail: {\n type: STRING,\n default: null\n },\n title: {\n type: STRING,\n default: null\n },\n metadataVersion: {\n type: STRING,\n default: null\n },\n contentType: {\n type: STRING,\n default: null\n },\n source: {\n type: STRING,\n default: null\n },\n sourceType: {\n type: STRING,\n default: null\n },\n sourceVersion: {\n type: STRING,\n default: null\n },\n streamVersion: {\n type: STRING,\n default: null\n },\n valueVersion: {\n type: STRING,\n default: null\n },\n channelName: {\n type: STRING,\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Claim.associate = function (db) {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n var _this = this;\n\n logger.debug('Claim.getShortClaimIdFromLongClaimId for ' + claimName + '#' + claimId);\n return new Promise(function (resolve, reject) {\n _this.findAll({\n where: { name: claimName },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n var _this2 = this;\n\n logger.debug('Claim.getAllChannelClaims for ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this2.findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw: true // returns an array of only data, not an array of instances\n }).then(function (channelClaimsArray) {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(function (claim) {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n var _this3 = this;\n\n logger.debug('finding claim id for claim ' + claimName + ' from channel ' + channelClaimId);\n return new Promise(function (resolve, reject) {\n _this3.findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(result.length + ' records found for \"' + claimName + '\" in channel \"' + channelClaimId + '\"');\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n var _this4 = this;\n\n return new Promise(function (resolve, reject) {\n _this4.findAll({\n where: {\n name: name,\n claimId: {\n $like: shortId + '%'\n } },\n order: [['height', 'ASC']]\n }).then(function (result) {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n // note results must be sorted\n return resolve(result[0].claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n var _this5 = this;\n\n return new Promise(function (resolve, reject) {\n _this5.findAll({\n where: { name: name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']] // note: maybe height and effective amount need to switch?\n }).then(function (result) {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n var _this6 = this;\n\n return new Promise(function (resolve, reject) {\n _this6.findOne({\n where: { name: name, claimId: claimId }\n }).then(function (result) {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug('getLongClaimId(' + claimName + ', ' + claimId + ')');\n if (claimId && claimId.length === 40) {\n // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n var _this7 = this;\n\n logger.debug('Claim.resolveClaim: ' + name + ' ' + claimId);\n return new Promise(function (resolve, reject) {\n _this7.findAll({\n where: { name: name, claimId: claimId }\n }).then(function (claimArray) {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error('more than one record matches ' + name + '#' + claimId + ' in db.Claim');\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n/***/ }),\n/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n INTEGER = _ref.INTEGER;\n\n var File = sequelize.define('File', {\n name: {\n type: STRING,\n allowNull: false\n },\n claimId: {\n type: STRING,\n allowNull: false\n },\n address: {\n type: STRING,\n allowNull: false\n },\n outpoint: {\n type: STRING,\n allowNull: false\n },\n height: {\n type: INTEGER,\n allowNull: false,\n default: 0\n },\n fileName: {\n type: STRING,\n allowNull: false\n },\n filePath: {\n type: STRING,\n allowNull: false\n },\n fileType: {\n type: STRING\n },\n nsfw: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: false\n },\n trendingEligible: {\n type: BOOLEAN,\n allowNull: false,\n defaultValue: true\n }\n }, {\n freezeTableName: true\n });\n\n File.associate = function (db) {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25\n });\n };\n\n return File;\n};\n\n/***/ }),\n/* 136 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n TEXT = _ref.TEXT;\n\n var Request = sequelize.define('Request', {\n action: {\n type: STRING,\n allowNull: false\n },\n url: {\n type: STRING,\n allowNull: false\n },\n ipAddress: {\n type: STRING,\n allowNull: true\n },\n result: {\n type: TEXT('long'),\n allowNull: true,\n default: null\n }\n }, {\n freezeTableName: true\n });\n\n Request.associate = function (db) {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true\n }\n });\n };\n\n return Request;\n};\n\n/***/ }),\n/* 137 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar bcrypt = __webpack_require__(138);\nvar logger = __webpack_require__(2);\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var User = sequelize.define('User', {\n userName: {\n type: STRING,\n allowNull: false\n },\n password: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n User.associate = function (db) {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n _this.update({ password: hash }).then(function () {\n resolve();\n }).catch(function (error) {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', function (user, options) {\n logger.debug('User.beforeCreate hook...');\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n/***/ }),\n/* 138 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"bcrypt\");\n\n/***/ }),\n/* 139 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PassportLocalStrategy = __webpack_require__(94).Strategy;\nvar logger = __webpack_require__(2);\nvar db = __webpack_require__(9);\n\nvar returnUserAndChannelInfo = function returnUserAndChannelInfo(userInstance) {\n return new Promise(function (resolve, reject) {\n var userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance.getChannel().then(function (_ref) {\n var channelName = _ref.channelName,\n channelClaimId = _ref.channelClaimId;\n\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n }).then(function (shortChannelId) {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n }).catch(function (error) {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy({\n usernameField: 'username',\n passwordField: 'password'\n}, function (username, password, done) {\n return db.User.findOne({\n where: { userName: username }\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n return user.comparePassword(password).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, { message: 'Incorrect username or password' });\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user).then(function (userInfo) {\n return done(null, userInfo);\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return error;\n });\n }).catch(function (error) {\n return done(error);\n });\n});\n\n/***/ }),\n/* 140 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\nvar passport = __webpack_require__(91);\n\nmodule.exports = function (app) {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), function (req, res) {\n logger.verbose('successful signup for ' + req.user.channelName);\n res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n // route for log in\n app.post('/login', function (req, res, next) {\n passport.authenticate('local-login', function (err, user, info) {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message\n });\n }\n logger.debug('successful login');\n req.logIn(user, function (err) {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success: true,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', function (req, res) {\n req.logout();\n res.status(200).json({ success: true, message: 'you successfully logged out' });\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', function (req, res) {\n if (req.user) {\n res.status(200).json({ success: true, data: req.user });\n } else {\n res.status(401).json({ success: false, message: 'user is not logged in' });\n }\n });\n};\n\n/***/ }),\n/* 141 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(2);\nvar multipart = __webpack_require__(142);\n\nvar _require = __webpack_require__(3),\n uploadDirectory = _require.publishing.uploadDirectory,\n host = _require.details.host;\n\nvar multipartMiddleware = multipart({ uploadDir: uploadDirectory });\nvar db = __webpack_require__(9);\n\nvar _require2 = __webpack_require__(143),\n claimNameIsAvailable = _require2.claimNameIsAvailable,\n checkChannelAvailability = _require2.checkChannelAvailability,\n publish = _require2.publish;\n\nvar _require3 = __webpack_require__(55),\n getClaimList = _require3.getClaimList,\n resolveUri = _require3.resolveUri,\n getClaim = _require3.getClaim;\n\nvar _require4 = __webpack_require__(97),\n addGetResultsToFileData = _require4.addGetResultsToFileData,\n createBasicPublishParams = _require4.createBasicPublishParams,\n createThumbnailPublishParams = _require4.createThumbnailPublishParams,\n parsePublishApiRequestBody = _require4.parsePublishApiRequestBody,\n parsePublishApiRequestFiles = _require4.parsePublishApiRequestFiles,\n createFileData = _require4.createFileData;\n\nvar errorHandlers = __webpack_require__(99);\n\nvar _require5 = __webpack_require__(56),\n sendGATimingEvent = _require5.sendGATimingEvent;\n\nvar _require6 = __webpack_require__(144),\n authenticateUser = _require6.authenticateUser;\n\nvar _require7 = __webpack_require__(100),\n getChannelData = _require7.getChannelData,\n getChannelClaims = _require7.getChannelClaims,\n getClaimId = _require7.getClaimId;\n\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = function (app) {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', function (_ref, res) {\n var ip = _ref.ip,\n originalUrl = _ref.originalUrl,\n name = _ref.params.name;\n\n var gaStartTime = Date.now();\n checkChannelAvailability(name).then(function (availableName) {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', function (_ref2, res) {\n var ip = _ref2.ip,\n originalUrl = _ref2.originalUrl,\n params = _ref2.params;\n\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name).then(function (shortId) {\n res.status(200).json(shortId);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', function (_ref3, res) {\n var ip = _ref3.ip,\n originalUrl = _ref3.originalUrl,\n body = _ref3.body,\n params = _ref3.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', function (_ref4, res) {\n var ip = _ref4.ip,\n originalUrl = _ref4.originalUrl,\n body = _ref4.body,\n params = _ref4.params;\n\n var channelName = params.channelName;\n var channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n var page = params.page;\n getChannelClaims(channelName, channelClaimId, page).then(function (data) {\n if (data === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel was found' });\n }\n res.status(200).json({ success: true, data: data });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', function (_ref5, res) {\n var ip = _ref5.ip,\n originalUrl = _ref5.originalUrl,\n params = _ref5.params;\n\n getClaimList(params.name).then(function (claimsList) {\n res.status(200).json(claimsList);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', function (_ref6, res) {\n var ip = _ref6.ip,\n originalUrl = _ref6.originalUrl,\n params = _ref6.params;\n\n var name = params.name;\n var claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId).then(function (resolveResult) {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n var fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(name + '#' + claimId)]);\n }).then(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n fileData = _ref8[0],\n getResult = _ref8[1];\n\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, { name: name, claimId: claimId }, 'File'), getResult]);\n }).then(function (_ref9) {\n var _ref10 = _slicedToArray(_ref9, 2),\n fileRecord = _ref10[0],\n _ref10$ = _ref10[1],\n message = _ref10$.message,\n completed = _ref10$.completed;\n\n res.status(200).json({ success: true, message: message, completed: completed });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', function (_ref11, res) {\n var ip = _ref11.ip,\n originalUrl = _ref11.originalUrl,\n name = _ref11.params.name;\n\n var gaStartTime = Date.now();\n claimNameIsAvailable(name).then(function (result) {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', function (_ref12, res) {\n var headers = _ref12.headers,\n ip = _ref12.ip,\n originalUrl = _ref12.originalUrl,\n params = _ref12.params;\n\n resolveUri(params.name + '#' + params.claimId).then(function (resolvedUri) {\n res.status(200).json(resolvedUri);\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, function (_ref13, res) {\n var body = _ref13.body,\n files = _ref13.files,\n headers = _ref13.headers,\n ip = _ref13.ip,\n originalUrl = _ref13.originalUrl,\n user = _ref13.user;\n\n // define variables\n var channelName = void 0,\n channelId = void 0,\n channelPassword = void 0,\n description = void 0,\n fileName = void 0,\n filePath = void 0,\n fileType = void 0,\n gaStartTime = void 0,\n license = void 0,\n name = void 0,\n nsfw = void 0,\n thumbnail = void 0,\n thumbnailFileName = void 0,\n thumbnailFilePath = void 0,\n thumbnailFileType = void 0,\n title = void 0;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n var _parsePublishApiReque = parsePublishApiRequestBody(body);\n // validateApiPublishRequest(body, files);\n\n\n name = _parsePublishApiReque.name;\n nsfw = _parsePublishApiReque.nsfw;\n license = _parsePublishApiReque.license;\n title = _parsePublishApiReque.title;\n description = _parsePublishApiReque.description;\n thumbnail = _parsePublishApiReque.thumbnail;\n\n var _parsePublishApiReque2 = parsePublishApiRequestFiles(files);\n\n fileName = _parsePublishApiReque2.fileName;\n filePath = _parsePublishApiReque2.filePath;\n fileType = _parsePublishApiReque2.fileType;\n thumbnailFileName = _parsePublishApiReque2.thumbnailFileName;\n thumbnailFilePath = _parsePublishApiReque2.thumbnailFilePath;\n thumbnailFileType = _parsePublishApiReque2.thumbnailFileType;\n channelName = body.channelName;\n channelId = body.channelId;\n channelPassword = body.channelPassword;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // check channel authorization\n Promise.all([authenticateUser(channelName, channelId, channelPassword, user), claimNameIsAvailable(name), createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail), createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw)]).then(function (_ref14) {\n var _ref15 = _slicedToArray(_ref14, 4),\n _ref15$ = _ref15[0],\n channelName = _ref15$.channelName,\n channelClaimId = _ref15$.channelClaimId,\n validatedClaimName = _ref15[1],\n publishParams = _ref15[2],\n thumbnailPublishParams = _ref15[3];\n\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n }).then(function (result) {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data: {\n name: name,\n claimId: result.claim_id,\n url: host + '/' + result.claim_id + '/' + name,\n lbryTx: result\n }\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', function (_ref16, res) {\n var ip = _ref16.ip,\n originalUrl = _ref16.originalUrl,\n body = _ref16.body,\n params = _ref16.params;\n\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name).then(function (shortId) {\n res.status(200).json({ success: true, data: shortId });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', function (_ref17, res) {\n var ip = _ref17.ip,\n originalUrl = _ref17.originalUrl,\n body = _ref17.body,\n params = _ref17.params;\n\n logger.debug('body:', body);\n var channelName = body.channelName;\n var channelClaimId = body.channelClaimId;\n var claimName = body.claimName;\n var claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (result) {\n if (result === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'No matching channel could be found' });\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'No matching claim id could be found' });\n }\n res.status(200).json({ success: true, data: result });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', function (_ref18, res) {\n var ip = _ref18.ip,\n originalUrl = _ref18.originalUrl,\n body = _ref18.body,\n params = _ref18.params;\n\n var claimName = params.claimName;\n var claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId).then(function (claimInfo) {\n if (!claimInfo) {\n return res.status(404).json({ success: false, message: 'No claim could be found' });\n }\n res.status(200).json({ success: true, data: claimInfo });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', function (_ref19, res) {\n var ip = _ref19.ip,\n originalUrl = _ref19.originalUrl,\n params = _ref19.params;\n\n var name = params.name;\n var claimId = params.claimId;\n db.File.findOne({ where: { name: name, claimId: claimId } }).then(function (result) {\n if (result) {\n return res.status(200).json({ success: true, data: true });\n }\n res.status(200).json({ success: true, data: false });\n }).catch(function (error) {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n/***/ }),\n/* 142 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"connect-multiparty\");\n\n/***/ }),\n/* 143 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _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; }\n\nvar logger = __webpack_require__(2);\nvar db = __webpack_require__(9);\nvar lbryApi = __webpack_require__(55);\nvar publishHelpers = __webpack_require__(97);\n\nvar _require = __webpack_require__(3),\n _require$publishing = _require.publishing,\n primaryClaimAddress = _require$publishing.primaryClaimAddress,\n additionalClaimAddresses = _require$publishing.additionalClaimAddresses;\n\nvar Sequelize = __webpack_require__(95);\nvar Op = Sequelize.Op;\n\nmodule.exports = {\n publish: function publish(publishParams, fileName, fileType) {\n return new Promise(function (resolve, reject) {\n var publishResults = void 0,\n certificateId = void 0,\n channelName = void 0;\n // publish the file\n return lbryApi.publishClaim(publishParams).then(function (tx) {\n logger.info('Successfully published ' + publishParams.name + ' ' + fileName, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug('this claim was published in channel: ' + publishParams.channel_name);\n return db.Channel.findOne({ where: { channelName: publishParams.channel_name } });\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n }).then(function (channel) {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug('certificateId: ' + certificateId);\n }).then(function () {\n // create the File record\n var fileRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n fileName: fileName,\n filePath: publishParams.file_path,\n fileType: fileType,\n nsfw: publishParams.metadata.nsfw\n };\n // create the Claim record\n var claimRecord = {\n name: publishParams.name,\n claimId: publishResults.claim_id,\n title: publishParams.metadata.title,\n description: publishParams.metadata.description,\n address: publishParams.claim_address,\n thumbnail: publishParams.metadata.thumbnail,\n outpoint: publishResults.txid + ':' + publishResults.nout,\n height: 0,\n contentType: fileType,\n nsfw: publishParams.metadata.nsfw,\n amount: publishParams.bid,\n certificateId: certificateId,\n channelName: channelName\n };\n // upsert criteria\n var upsertCriteria = {\n name: publishParams.name,\n claimId: publishResults.claim_id\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n }).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n file = _ref2[0],\n claim = _ref2[1];\n\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n }).then(function () {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n }).catch(function (error) {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable: function claimNameIsAvailable(name) {\n var claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim.findAll({\n attributes: ['address'],\n where: {\n name: name,\n address: _defineProperty({}, Op.or, claimAddresses)\n }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n }).catch(function (error) {\n throw error;\n });\n },\n checkChannelAvailability: function checkChannelAvailability(name) {\n return db.Channel.findAll({\n where: { channelName: name }\n }).then(function (result) {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n }).catch(function (error) {\n throw error;\n });\n }\n};\n\n/***/ }),\n/* 144 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar db = __webpack_require__(9);\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n authenticateUser: function authenticateUser(channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName: null,\n channelClaimId: null\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName: user.channelName,\n channelClaimId: user.channelClaimId\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials: function authenticateChannelCredentials(channelName, channelId, userPassword) {\n return new Promise(function (resolve, reject) {\n // hoisted variables\n var channelData = void 0;\n // build the params for finding the channel\n var channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel.findOne({\n where: channelFindParams\n }).then(function (channel) {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) }\n });\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n }).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 145 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims: function returnPaginatedChannelClaims(channelName, longChannelClaimId, claims, page) {\n var totalPages = module.exports.determineTotalPages(claims);\n var paginationPage = module.exports.getPageFromQuery(page);\n var viewData = {\n channelName: channelName,\n longChannelClaimId: longChannelClaimId,\n claims: module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage: module.exports.determinePreviousPage(paginationPage),\n currentPage: paginationPage,\n nextPage: module.exports.determineNextPage(totalPages, paginationPage),\n totalPages: totalPages,\n totalResults: module.exports.determineTotalClaims(claims)\n };\n return viewData;\n },\n getPageFromQuery: function getPageFromQuery(page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims: function extractPageFromClaims(claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n var claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n var claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n var pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages: function determineTotalPages(claims) {\n if (!claims) {\n return 0;\n } else {\n var totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n var fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n var remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage: function determinePreviousPage(currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage: function determineNextPage(totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims: function determineTotalClaims(claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n }\n};\n\n/***/ }),\n/* 146 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(3),\n host = _require.details;\n\nvar handlePageRender = __webpack_require__(101);\n\nmodule.exports = function (app) {\n // route for the home page\n app.get('/', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', function (req, res) {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', function (req, res) {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', function (req, res) {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', function (req, res) {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', function (_ref, res) {\n var params = _ref.params;\n\n var claimId = params.claimId;\n var name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host: host, claimId: claimId, name: name });\n });\n};\n\n/***/ }),\n/* 147 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, _defineProperty({}, action.data.name, action.data.value))\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data\n });\n default:\n return state;\n }\n};\n\nvar _publish_action_types = __webpack_require__(104);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nvar _publish_channel_select_states = __webpack_require__(105);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar _require = __webpack_require__(3),\n publishing = _require.publishing;\n\nvar initialState = {\n disabled: publishing.disabled,\n disabledMessage: publishing.disabledMessage,\n publishInChannel: false,\n selectedChannel: _publish_channel_select_states.LOGIN,\n showMetadataInputs: false,\n status: {\n status: null,\n message: null\n },\n error: {\n file: null,\n url: null,\n channel: null,\n publishSubmit: null\n },\n file: null,\n claim: '',\n metadata: {\n title: '',\n description: '',\n license: '',\n nsfw: false\n },\n thumbnail: null\n};\n\n/***/ }),\n/* 148 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data\n });\n default:\n return state;\n }\n};\n\nvar _channel_action_types = __webpack_require__(106);\n\nvar actions = _interopRequireWildcard(_channel_action_types);\n\nfunction _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; } }\n\nvar initialState = {\n loggedInChannel: {\n name: null,\n shortId: null,\n longId: null\n }\n};\n\n/***/ }),\n/* 149 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data\n })\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id: action.data.requestId\n })\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n key: action.data.key\n }))\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, _defineProperty({}, action.data.id, {\n error: action.data.error,\n name: action.data.name,\n claimId: action.data.claimId,\n shortId: action.data.shortId,\n claimData: action.data.claimData\n }))\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.id, {\n name: action.data.name,\n longId: action.data.longId,\n shortId: action.data.shortId,\n claimsData: action.data.claimsData\n }))\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, _defineProperty({}, action.data.channelListId, Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData\n })))\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data\n })\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error: action.data,\n status: _asset_display_states.ERROR\n })\n });\n default:\n return state;\n }\n};\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _asset_display_states = __webpack_require__(107);\n\nfunction _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; } }\n\nfunction _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; }\n\nvar initialState = {\n request: {\n error: null,\n type: null,\n id: null\n },\n requestList: {},\n channelList: {},\n assetList: {},\n displayAsset: {\n error: null,\n status: _asset_display_states.LOCAL_CHECK\n }\n};\n\n/***/ }),\n/* 150 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n default:\n return state;\n }\n};\n\nvar siteConfig = __webpack_require__(3);\n\nvar googleAnalyticsId = siteConfig.analytics.googleId,\n _siteConfig$assetDefa = siteConfig.assetDefaults,\n defaultThumbnail = _siteConfig$assetDefa.thumbnail,\n defaultDescription = _siteConfig$assetDefa.description,\n _siteConfig$details = siteConfig.details,\n description = _siteConfig$details.description,\n host = _siteConfig$details.host,\n title = _siteConfig$details.title,\n twitter = _siteConfig$details.twitter;\n\n\nvar initialState = {\n description: description,\n googleAnalyticsId: googleAnalyticsId,\n host: host,\n title: title,\n twitter: twitter,\n defaultDescription: defaultDescription,\n defaultThumbnail: defaultThumbnail\n};\n\n/***/ }),\n/* 151 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-ga\");\n\n/***/ }),\n/* 152 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cross-fetch/polyfill\");\n\n/***/ }),\n/* 153 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _require = __webpack_require__(56),\n sendGAServeEvent = _require.sendGAServeEvent;\n\nvar _require2 = __webpack_require__(154),\n determineResponseType = _require2.determineResponseType,\n flipClaimNameAndIdForBackwardsCompatibility = _require2.flipClaimNameAndIdForBackwardsCompatibility,\n logRequestData = _require2.logRequestData,\n getClaimIdAndServeAsset = _require2.getClaimIdAndServeAsset;\n\nvar lbryUri = __webpack_require__(155);\nvar handleShowRender = __webpack_require__(156);\nvar SERVE = 'SERVE';\n\nmodule.exports = function (app) {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // parse the identifier\n var isChannel = void 0,\n channelName = void 0,\n channelClaimId = void 0,\n claimId = void 0;\n try {\n var _lbryUri$parseIdentif = lbryUri.parseIdentifier(params.identifier);\n\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n if (!isChannel) {\n var _flipClaimNameAndIdFo = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n\n var _flipClaimNameAndIdFo2 = _slicedToArray(_flipClaimNameAndIdFo, 2);\n\n claimId = _flipClaimNameAndIdFo2[0];\n claimName = _flipClaimNameAndIdFo2[1];\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', function (req, res) {\n var headers = req.headers,\n ip = req.ip,\n originalUrl = req.originalUrl,\n params = req.params;\n // decide if this is a show request\n\n var hasFileExtension = void 0;\n try {\n var _lbryUri$parseModifie2 = lbryUri.parseModifier(params.claim);\n\n hasFileExtension = _lbryUri$parseModifie2.hasFileExtension;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n var responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n var claimName = void 0;\n try {\n var _lbryUri$parseClaim2 = lbryUri.parseClaim(params.claim);\n\n claimName = _lbryUri$parseClaim2.claimName;\n } catch (error) {\n return res.status(400).json({ success: false, message: error.message });\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n/***/ }),\n/* 154 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(100),\n getClaimId = _require.getClaimId,\n getLocalFileRecord = _require.getLocalFileRecord;\n\nvar _require2 = __webpack_require__(99),\n handleErrorResponse = _require2.handleErrorResponse;\n\nvar SERVE = 'SERVE';\nvar SHOW = 'SHOW';\nvar NO_FILE = 'NO_FILE';\nvar NO_CHANNEL = 'NO_CHANNEL';\nvar NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml(_ref) {\n var accept = _ref.accept;\n\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser(headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset(_ref2) {\n var accept = _ref2.accept,\n range = _ref2.range;\n\n var imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n var videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId(claimId) {\n return claimId.length === 40 && !/[^A-Za-z0-9]/g.test(claimId);\n};\n\nfunction isValidShortId(claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId(input) {\n return isValidClaimId(input) || isValidShortId(input);\n};\n\nfunction serveAssetToClient(claimId, name, res) {\n return getLocalFileRecord(claimId, name).then(function (fileRecord) {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect('/api/claim/get/' + name + '/' + claimId);\n }\n // serve the file\n var filePath = fileRecord.filePath,\n fileType = fileRecord.fileType;\n\n logger.verbose('serving file: ' + filePath);\n var sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type': fileType || 'image/jpeg'\n }\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n }).catch(function (error) {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset: function getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId).then(function (fullClaimId) {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({ success: false, message: 'no claim id could be found' });\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({ success: false, message: 'no channel id could be found' });\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n }).catch(function (error) {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType: function determineResponseType(hasFileExtension, headers) {\n var responseType = void 0;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) {\n // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) {\n // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility: function flipClaimNameAndIdForBackwardsCompatibility(identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n var tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData: function logRequestData(responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n }\n};\n\n/***/ }),\n/* 155 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n logger.debug('parsing identifier:', identifier);\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex.exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n logger.debug(proto + ', ' + value + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!value) {\n throw new Error('Check your url. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Invalid characters in channel name: ' + nameBadChars.join(', ') + '.');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId,\n claimId: claimId\n };\n },\n parseClaim: function parseClaim(claim) {\n logger.debug('parsing name:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n modifierSeperator = _componentsRegex$exec4[2],\n modifier = _componentsRegex$exec4[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Invalid characters in claim name: ' + nameBadChars.join(', ') + '.');\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No file extension provided after separator ' + modifierSeperator + '.');\n }\n if (modifierSeperator !== '.') {\n throw new Error('The ' + modifierSeperator + ' modifier is not supported in the claim name');\n }\n }\n // return results\n return {\n claimName: claimName\n };\n },\n parseModifier: function parseModifier(claim) {\n logger.debug('parsing modifier:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec5 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec6 = _slicedToArray(_componentsRegex$exec5, 4),\n proto = _componentsRegex$exec6[0],\n claimName = _componentsRegex$exec6[1],\n modifierSeperator = _componentsRegex$exec6[2],\n modifier = _componentsRegex$exec6[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n // Validate and process modifier\n var hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension: hasFileExtension\n };\n }\n};\n\n/***/ }),\n/* 156 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = __webpack_require__(102);\n\nvar _redux = __webpack_require__(57);\n\nvar _index = __webpack_require__(103);\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _index3 = __webpack_require__(13);\n\nvar _index4 = _interopRequireDefault(_index3);\n\nvar _app = __webpack_require__(108);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(113);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reduxSaga = __webpack_require__(157);\n\nvar _reduxSaga2 = _interopRequireDefault(_reduxSaga);\n\nvar _effects = __webpack_require__(49);\n\nvar _show_uri = __webpack_require__(158);\n\nvar _show = __webpack_require__(11);\n\nvar _reactHelmet = __webpack_require__(48);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar returnSagaWithParams = function returnSagaWithParams(saga, params) {\n return (/*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return (0, _effects.call)(saga, params);\n\n case 2:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n })\n );\n};\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create and apply middleware\n var sagaMiddleware = (0, _reduxSaga2.default)();\n var middleware = (0, _redux.applyMiddleware)(sagaMiddleware);\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_index2.default, middleware);\n\n // create saga\n var action = (0, _show.onHandleShowPageUri)(req.params);\n var saga = returnSagaWithParams(_show_uri.handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware.run(saga).done.then(function () {\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _index4.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n var preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send((0, _renderFullPage2.default)(helmet, html, preloadedState));\n });\n};\n\n/***/ }),\n/* 157 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga\");\n\n/***/ }),\n/* 158 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleShowPageUri = handleShowPageUri;\nexports.watchHandleShowPageUri = watchHandleShowPageUri;\n\nvar _effects = __webpack_require__(49);\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(11);\n\nvar _show_asset = __webpack_require__(159);\n\nvar _show_channel = __webpack_require__(161);\n\nvar _lbryUri = __webpack_require__(61);\n\nvar _lbryUri2 = _interopRequireDefault(_lbryUri);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateIdentifierAndClaim),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(parseAndUpdateClaimOnly),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(handleShowPageUri),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchHandleShowPageUri);\n\nfunction parseAndUpdateIdentifierAndClaim(modifier, claim) {\n var isChannel, channelName, channelClaimId, claimId, claimName, extension, _lbryUri$parseIdentif, _lbryUri$parseClaim;\n\n return regeneratorRuntime.wrap(function parseAndUpdateIdentifierAndClaim$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n isChannel = void 0, channelName = void 0, channelClaimId = void 0, claimId = void 0, claimName = void 0, extension = void 0;\n _context.prev = 1;\n _lbryUri$parseIdentif = _lbryUri2.default.parseIdentifier(modifier);\n isChannel = _lbryUri$parseIdentif.isChannel;\n channelName = _lbryUri$parseIdentif.channelName;\n channelClaimId = _lbryUri$parseIdentif.channelClaimId;\n claimId = _lbryUri$parseIdentif.claimId;\n _lbryUri$parseClaim = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim.claimName;\n extension = _lbryUri$parseClaim.extension;\n _context.next = 17;\n break;\n\n case 12:\n _context.prev = 12;\n _context.t0 = _context['catch'](1);\n _context.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 16:\n return _context.abrupt('return', _context.sent);\n\n case 17:\n if (!isChannel) {\n _context.next = 21;\n break;\n }\n\n _context.next = 20;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, channelName, channelClaimId, extension));\n\n case 20:\n return _context.abrupt('return', _context.sent);\n\n case 21:\n ;\n _context.next = 24;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, claimId, null, null, extension));\n\n case 24:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[1, 12]]);\n}\nfunction parseAndUpdateClaimOnly(claim) {\n var isChannel, channelName, channelClaimId, _lbryUri$parseIdentif2, claimName, extension, _lbryUri$parseClaim2;\n\n return regeneratorRuntime.wrap(function parseAndUpdateClaimOnly$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n isChannel = void 0, channelName = void 0, channelClaimId = void 0;\n _context2.prev = 1;\n _lbryUri$parseIdentif2 = _lbryUri2.default.parseIdentifier(claim);\n isChannel = _lbryUri$parseIdentif2.isChannel;\n channelName = _lbryUri$parseIdentif2.channelName;\n channelClaimId = _lbryUri$parseIdentif2.channelClaimId;\n _context2.next = 13;\n break;\n\n case 8:\n _context2.prev = 8;\n _context2.t0 = _context2['catch'](1);\n _context2.next = 12;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t0.message));\n\n case 12:\n return _context2.abrupt('return', _context2.sent);\n\n case 13:\n if (!isChannel) {\n _context2.next = 17;\n break;\n }\n\n _context2.next = 16;\n return (0, _effects.call)(_show_channel.newChannelRequest, (0, _show.onNewChannelRequest)(channelName, channelClaimId));\n\n case 16:\n return _context2.abrupt('return', _context2.sent);\n\n case 17:\n // if not for a channel, parse the claim request\n claimName = void 0, extension = void 0;\n _context2.prev = 18;\n _lbryUri$parseClaim2 = _lbryUri2.default.parseClaim(claim);\n claimName = _lbryUri$parseClaim2.claimName;\n extension = _lbryUri$parseClaim2.extension;\n _context2.next = 29;\n break;\n\n case 24:\n _context2.prev = 24;\n _context2.t1 = _context2['catch'](18);\n _context2.next = 28;\n return (0, _effects.put)((0, _show.onRequestError)(_context2.t1.message));\n\n case 28:\n return _context2.abrupt('return', _context2.sent);\n\n case 29:\n _context2.next = 31;\n return (0, _effects.call)(_show_asset.newAssetRequest, (0, _show.onNewAssetRequest)(claimName, null, null, null, extension));\n\n case 31:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this, [[1, 8], [18, 24]]);\n}\n\nfunction handleShowPageUri(action) {\n var _action$data, identifier, claim;\n\n return regeneratorRuntime.wrap(function handleShowPageUri$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data = action.data, identifier = _action$data.identifier, claim = _action$data.claim;\n\n if (!identifier) {\n _context3.next = 5;\n break;\n }\n\n _context3.next = 4;\n return (0, _effects.call)(parseAndUpdateIdentifierAndClaim, identifier, claim);\n\n case 4:\n return _context3.abrupt('return', _context3.sent);\n\n case 5:\n _context3.next = 7;\n return (0, _effects.call)(parseAndUpdateClaimOnly, claim);\n\n case 7:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this);\n};\n\nfunction watchHandleShowPageUri() {\n return regeneratorRuntime.wrap(function watchHandleShowPageUri$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.HANDLE_SHOW_URI, handleShowPageUri);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n};\n\n/***/ }),\n/* 159 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newAssetRequest = newAssetRequest;\nexports.watchNewAssetRequest = watchNewAssetRequest;\n\nvar _effects = __webpack_require__(49);\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(11);\n\nvar _assetApi = __webpack_require__(160);\n\nvar _show2 = __webpack_require__(28);\n\nvar _site = __webpack_require__(114);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newAssetRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewAssetRequest);\n\nfunction newAssetRequest(action) {\n var _action$data, requestType, requestId, name, modifier, state, host, longId, _ref, assetKey, shortId, _ref2, claimData, _ref3;\n\n return regeneratorRuntime.wrap(function newAssetRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, name = _action$data.name, modifier = _action$data.modifier;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get long id && add request to request list\n longId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_assetApi.getLongClaimId, host, name, modifier);\n\n case 15:\n _ref = _context.sent;\n longId = _ref.data;\n _context.next = 24;\n break;\n\n case 19:\n _context.prev = 19;\n _context.t0 = _context['catch'](12);\n _context.next = 23;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 23:\n return _context.abrupt('return', _context.sent);\n\n case 24:\n assetKey = 'a#' + name + '#' + longId;\n _context.next = 27;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, assetKey));\n\n case 27:\n if (!state.assetList[assetKey]) {\n _context.next = 29;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 29:\n // get short Id\n shortId = void 0;\n _context.prev = 30;\n _context.next = 33;\n return (0, _effects.call)(_assetApi.getShortId, host, name, longId);\n\n case 33:\n _ref2 = _context.sent;\n shortId = _ref2.data;\n _context.next = 42;\n break;\n\n case 37:\n _context.prev = 37;\n _context.t1 = _context['catch'](30);\n _context.next = 41;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 41:\n return _context.abrupt('return', _context.sent);\n\n case 42:\n // get asset claim data\n claimData = void 0;\n _context.prev = 43;\n _context.next = 46;\n return (0, _effects.call)(_assetApi.getClaimData, host, name, longId);\n\n case 46:\n _ref3 = _context.sent;\n claimData = _ref3.data;\n _context.next = 55;\n break;\n\n case 50:\n _context.prev = 50;\n _context.t2 = _context['catch'](43);\n _context.next = 54;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t2.message));\n\n case 54:\n return _context.abrupt('return', _context.sent);\n\n case 55:\n _context.next = 57;\n return (0, _effects.put)((0, _show.addAssetToAssetList)(assetKey, null, name, longId, shortId, claimData));\n\n case 57:\n _context.next = 59;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 59:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 19], [30, 37], [43, 50]]);\n};\n\nfunction watchNewAssetRequest() {\n return regeneratorRuntime.wrap(function watchNewAssetRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.ASSET_REQUEST_NEW, newAssetRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\n/***/ }),\n/* 160 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getLongClaimId = getLongClaimId;\nexports.getShortId = getShortId;\nexports.getClaimData = getClaimData;\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getLongClaimId(host, name, modifier) {\n var body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n var params = {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body)\n };\n // create url\n var url = host + '/api/claim/long-id';\n // return the request promise\n return (0, _request2.default)(url, params);\n};\n\nfunction getShortId(host, name, claimId) {\n var url = host + '/api/claim/short-id/' + claimId + '/' + name;\n return (0, _request2.default)(url);\n};\n\nfunction getClaimData(host, name, claimId) {\n var url = host + '/api/claim/data/' + name + '/' + claimId;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 161 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newChannelRequest = newChannelRequest;\nexports.watchNewChannelRequest = watchNewChannelRequest;\nexports.watchUpdateChannelClaims = watchUpdateChannelClaims;\n\nvar _effects = __webpack_require__(49);\n\nvar _show_action_types = __webpack_require__(19);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(11);\n\nvar _channelApi = __webpack_require__(162);\n\nvar _show2 = __webpack_require__(28);\n\nvar _site = __webpack_require__(114);\n\nfunction _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; } }\n\nvar _marked = /*#__PURE__*/regeneratorRuntime.mark(newChannelRequest),\n _marked2 = /*#__PURE__*/regeneratorRuntime.mark(watchNewChannelRequest),\n _marked3 = /*#__PURE__*/regeneratorRuntime.mark(getNewClaimsAndUpdateChannel),\n _marked4 = /*#__PURE__*/regeneratorRuntime.mark(watchUpdateChannelClaims);\n\nfunction newChannelRequest(action) {\n var _action$data, requestType, requestId, channelName, channelId, state, host, longId, shortId, _ref, _ref$data, channelKey, claimsData, _ref2;\n\n return regeneratorRuntime.wrap(function newChannelRequest$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _action$data = action.data, requestType = _action$data.requestType, requestId = _action$data.requestId, channelName = _action$data.channelName, channelId = _action$data.channelId;\n // put an action to update the request in redux\n\n _context.next = 3;\n return (0, _effects.put)((0, _show.onRequestUpdate)(requestType, requestId));\n\n case 3:\n _context.next = 5;\n return (0, _effects.select)(_show2.selectShowState);\n\n case 5:\n state = _context.sent;\n _context.next = 8;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 8:\n host = _context.sent;\n\n if (!state.requestList[requestId]) {\n _context.next = 11;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 11:\n // get channel long id\n longId = void 0, shortId = void 0;\n _context.prev = 12;\n _context.next = 15;\n return (0, _effects.call)(_channelApi.getChannelData, host, channelName, channelId);\n\n case 15:\n _ref = _context.sent;\n _ref$data = _ref.data;\n longId = _ref$data.longChannelClaimId;\n shortId = _ref$data.shortChannelClaimId;\n _context.next = 26;\n break;\n\n case 21:\n _context.prev = 21;\n _context.t0 = _context['catch'](12);\n _context.next = 25;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 25:\n return _context.abrupt('return', _context.sent);\n\n case 26:\n // store the request in the channel requests list\n channelKey = 'c#' + channelName + '#' + longId;\n _context.next = 29;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, channelKey));\n\n case 29:\n if (!state.channelList[channelKey]) {\n _context.next = 31;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 31:\n // get channel claims data\n claimsData = void 0;\n _context.prev = 32;\n _context.next = 35;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, channelName, 1);\n\n case 35:\n _ref2 = _context.sent;\n claimsData = _ref2.data;\n _context.next = 44;\n break;\n\n case 39:\n _context.prev = 39;\n _context.t1 = _context['catch'](32);\n _context.next = 43;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 43:\n return _context.abrupt('return', _context.sent);\n\n case 44:\n _context.next = 46;\n return (0, _effects.put)((0, _show.addNewChannelToChannelList)(channelKey, channelName, shortId, longId, claimsData));\n\n case 46:\n _context.next = 48;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 48:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[12, 21], [32, 39]]);\n}\n\nfunction watchNewChannelRequest() {\n return regeneratorRuntime.wrap(function watchNewChannelRequest$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n\n case 2:\n case 'end':\n return _context2.stop();\n }\n }\n }, _marked2, this);\n};\n\nfunction getNewClaimsAndUpdateChannel(action) {\n var _action$data2, channelKey, name, longId, page, host, claimsData, _ref3;\n\n return regeneratorRuntime.wrap(function getNewClaimsAndUpdateChannel$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _action$data2 = action.data, channelKey = _action$data2.channelKey, name = _action$data2.name, longId = _action$data2.longId, page = _action$data2.page;\n _context3.next = 3;\n return (0, _effects.select)(_site.selectSiteHost);\n\n case 3:\n host = _context3.sent;\n claimsData = void 0;\n _context3.prev = 5;\n _context3.next = 8;\n return (0, _effects.call)(_channelApi.getChannelClaims, host, longId, name, page);\n\n case 8:\n _ref3 = _context3.sent;\n claimsData = _ref3.data;\n _context3.next = 17;\n break;\n\n case 12:\n _context3.prev = 12;\n _context3.t0 = _context3['catch'](5);\n _context3.next = 16;\n return (0, _effects.put)((0, _show.onRequestError)(_context3.t0.message));\n\n case 16:\n return _context3.abrupt('return', _context3.sent);\n\n case 17:\n _context3.next = 19;\n return (0, _effects.put)((0, _show.updateChannelClaims)(channelKey, claimsData));\n\n case 19:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this, [[5, 12]]);\n}\n\nfunction watchUpdateChannelClaims() {\n return regeneratorRuntime.wrap(function watchUpdateChannelClaims$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _effects.takeLatest)(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n\n case 2:\n case 'end':\n return _context4.stop();\n }\n }\n }, _marked4, this);\n}\n\n/***/ }),\n/* 162 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getChannelData = getChannelData;\nexports.getChannelClaims = getChannelClaims;\n\nvar _request = __webpack_require__(8);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getChannelData(host, id, name) {\n if (!id) id = 'none';\n var url = host + '/api/channel/data/' + name + '/' + id;\n return (0, _request2.default)(url);\n};\n\nfunction getChannelClaims(host, longId, name, page) {\n if (!page) page = 1;\n var url = host + '/api/channel/claims/' + name + '/' + longId + '/' + page;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 163 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar handlePageRender = __webpack_require__(101);\n\nmodule.exports = function (app) {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', function (req, res) {\n // send response\n handlePageRender(req, res);\n });\n};\n\n/***/ }),\n/* 164 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(165),\n logLevel = _require.logLevel;\n\nmodule.exports = function (winston) {\n // configure\n winston.configure({\n transports: [new winston.transports.Console({\n level: logLevel,\n timestamp: false,\n colorize: true,\n prettyPrint: true,\n handleExceptions: true,\n humanReadableUnhandledException: true\n })]\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n/***/ }),\n/* 165 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar loggerConfig = {\n logLevel: 'debug' // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n/***/ }),\n/* 166 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar winstonSlackWebHook = __webpack_require__(167).SlackWebHook;\nvar slackConfig = __webpack_require__(93);\n\nmodule.exports = function (winston) {\n var slackWebHook = slackConfig.slackWebHook,\n slackErrorChannel = slackConfig.slackErrorChannel,\n slackInfoChannel = slackConfig.slackInfoChannel;\n\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-errors-transport',\n level: 'warn',\n webhookUrl: slackWebHook,\n channel: slackErrorChannel,\n username: 'spee.ch',\n iconEmoji: ':face_with_head_bandage:'\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name: 'slack-info-transport',\n level: 'info',\n webhookUrl: slackWebHook,\n channel: slackInfoChannel,\n username: 'spee.ch',\n iconEmoji: ':nerd_face:'\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n/***/ }),\n/* 167 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston-slack-webhook\");\n\n/***/ }),\n/* 168 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./\": 50,\n\t\"./ActiveStatusBar\": 24,\n\t\"./ActiveStatusBar/\": 24,\n\t\"./ActiveStatusBar/index\": 24,\n\t\"./ActiveStatusBar/index.jsx\": 24,\n\t\"./AssetPreview\": 34,\n\t\"./AssetPreview/\": 34,\n\t\"./AssetPreview/index\": 34,\n\t\"./AssetPreview/index.js\": 34,\n\t\"./AssetPreview/view\": 78,\n\t\"./AssetPreview/view.jsx\": 78,\n\t\"./ExpandingTextArea\": 36,\n\t\"./ExpandingTextArea/\": 36,\n\t\"./ExpandingTextArea/index\": 36,\n\t\"./ExpandingTextArea/index.jsx\": 36,\n\t\"./GAListener\": 13,\n\t\"./GAListener/\": 13,\n\t\"./GAListener/index\": 13,\n\t\"./GAListener/index.jsx\": 13,\n\t\"./InactiveStatusBar\": 25,\n\t\"./InactiveStatusBar/\": 25,\n\t\"./InactiveStatusBar/index\": 25,\n\t\"./InactiveStatusBar/index.jsx\": 25,\n\t\"./Logo\": 21,\n\t\"./Logo/\": 21,\n\t\"./Logo/index\": 21,\n\t\"./Logo/index.jsx\": 21,\n\t\"./NavBarChannelOptionsDropdown\": 22,\n\t\"./NavBarChannelOptionsDropdown/\": 22,\n\t\"./NavBarChannelOptionsDropdown/index\": 22,\n\t\"./NavBarChannelOptionsDropdown/index.jsx\": 22,\n\t\"./ProgressBar\": 10,\n\t\"./ProgressBar/\": 10,\n\t\"./ProgressBar/index\": 10,\n\t\"./ProgressBar/index.jsx\": 10,\n\t\"./PublishPreview\": 37,\n\t\"./PublishPreview/\": 37,\n\t\"./PublishPreview/index\": 37,\n\t\"./PublishPreview/index.jsx\": 37,\n\t\"./PublishUrlMiddleDisplay\": 38,\n\t\"./PublishUrlMiddleDisplay/\": 38,\n\t\"./PublishUrlMiddleDisplay/index\": 38,\n\t\"./PublishUrlMiddleDisplay/index.jsx\": 38,\n\t\"./SEO\": 7,\n\t\"./SEO/\": 7,\n\t\"./SEO/index\": 7,\n\t\"./SEO/index.js\": 7,\n\t\"./SEO/view\": 66,\n\t\"./SEO/view.jsx\": 66,\n\t\"./index\": 50,\n\t\"./index.js\": 50\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 168;\n\n/***/ }),\n/* 169 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./\": 52,\n\t\"./AssetDisplay\": 17,\n\t\"./AssetDisplay/\": 17,\n\t\"./AssetDisplay/index\": 17,\n\t\"./AssetDisplay/index.js\": 17,\n\t\"./AssetDisplay/view\": 72,\n\t\"./AssetDisplay/view.jsx\": 72,\n\t\"./AssetInfo\": 31,\n\t\"./AssetInfo/\": 31,\n\t\"./AssetInfo/index\": 31,\n\t\"./AssetInfo/index.js\": 31,\n\t\"./AssetInfo/view\": 75,\n\t\"./AssetInfo/view.jsx\": 75,\n\t\"./AssetTitle\": 30,\n\t\"./AssetTitle/\": 30,\n\t\"./AssetTitle/index\": 30,\n\t\"./AssetTitle/index.js\": 30,\n\t\"./AssetTitle/view\": 74,\n\t\"./AssetTitle/view.jsx\": 74,\n\t\"./ChannelClaimsDisplay\": 33,\n\t\"./ChannelClaimsDisplay/\": 33,\n\t\"./ChannelClaimsDisplay/index\": 33,\n\t\"./ChannelClaimsDisplay/index.js\": 33,\n\t\"./ChannelClaimsDisplay/view\": 77,\n\t\"./ChannelClaimsDisplay/view.jsx\": 77,\n\t\"./ChannelCreateForm\": 16,\n\t\"./ChannelCreateForm/\": 16,\n\t\"./ChannelCreateForm/index\": 16,\n\t\"./ChannelCreateForm/index.js\": 16,\n\t\"./ChannelCreateForm/view\": 69,\n\t\"./ChannelCreateForm/view.jsx\": 69,\n\t\"./ChannelLoginForm\": 15,\n\t\"./ChannelLoginForm/\": 15,\n\t\"./ChannelLoginForm/index\": 15,\n\t\"./ChannelLoginForm/index.js\": 15,\n\t\"./ChannelLoginForm/view\": 68,\n\t\"./ChannelLoginForm/view.jsx\": 68,\n\t\"./ChannelSelect\": 39,\n\t\"./ChannelSelect/\": 39,\n\t\"./ChannelSelect/index\": 39,\n\t\"./ChannelSelect/index.js\": 39,\n\t\"./ChannelSelect/view\": 81,\n\t\"./ChannelSelect/view.jsx\": 81,\n\t\"./Dropzone\": 18,\n\t\"./Dropzone/\": 18,\n\t\"./Dropzone/index\": 18,\n\t\"./Dropzone/index.js\": 18,\n\t\"./Dropzone/view\": 82,\n\t\"./Dropzone/view.jsx\": 82,\n\t\"./FourOhFourPage\": 35,\n\t\"./FourOhFourPage/\": 35,\n\t\"./FourOhFourPage/index\": 35,\n\t\"./FourOhFourPage/index.jsx\": 35,\n\t\"./FourOhFourPage/view\": 79,\n\t\"./FourOhFourPage/view.jsx\": 79,\n\t\"./NavBar\": 5,\n\t\"./NavBar/\": 5,\n\t\"./NavBar/index\": 5,\n\t\"./NavBar/index.js\": 5,\n\t\"./NavBar/view\": 65,\n\t\"./NavBar/view.jsx\": 65,\n\t\"./PublishDetails\": 40,\n\t\"./PublishDetails/\": 40,\n\t\"./PublishDetails/index\": 40,\n\t\"./PublishDetails/index.js\": 40,\n\t\"./PublishDetails/view\": 83,\n\t\"./PublishDetails/view.jsx\": 83,\n\t\"./PublishDisabledMessage\": 45,\n\t\"./PublishDisabledMessage/\": 45,\n\t\"./PublishDisabledMessage/index\": 45,\n\t\"./PublishDisabledMessage/index.js\": 45,\n\t\"./PublishDisabledMessage/view\": 88,\n\t\"./PublishDisabledMessage/view.jsx\": 88,\n\t\"./PublishMetadataInputs\": 44,\n\t\"./PublishMetadataInputs/\": 44,\n\t\"./PublishMetadataInputs/index\": 44,\n\t\"./PublishMetadataInputs/index.js\": 44,\n\t\"./PublishMetadataInputs/view\": 87,\n\t\"./PublishMetadataInputs/view.jsx\": 87,\n\t\"./PublishStatus\": 46,\n\t\"./PublishStatus/\": 46,\n\t\"./PublishStatus/index\": 46,\n\t\"./PublishStatus/index.js\": 46,\n\t\"./PublishStatus/view\": 89,\n\t\"./PublishStatus/view.jsx\": 89,\n\t\"./PublishThumbnailInput\": 43,\n\t\"./PublishThumbnailInput/\": 43,\n\t\"./PublishThumbnailInput/index\": 43,\n\t\"./PublishThumbnailInput/index.js\": 43,\n\t\"./PublishThumbnailInput/view\": 86,\n\t\"./PublishThumbnailInput/view.jsx\": 86,\n\t\"./PublishTitleInput\": 41,\n\t\"./PublishTitleInput/\": 41,\n\t\"./PublishTitleInput/index\": 41,\n\t\"./PublishTitleInput/index.js\": 41,\n\t\"./PublishTitleInput/view\": 84,\n\t\"./PublishTitleInput/view.jsx\": 84,\n\t\"./PublishTool\": 47,\n\t\"./PublishTool/\": 47,\n\t\"./PublishTool/index\": 47,\n\t\"./PublishTool/index.js\": 47,\n\t\"./PublishTool/view\": 90,\n\t\"./PublishTool/view.jsx\": 90,\n\t\"./PublishUrlInput\": 42,\n\t\"./PublishUrlInput/\": 42,\n\t\"./PublishUrlInput/index\": 42,\n\t\"./PublishUrlInput/index.js\": 42,\n\t\"./PublishUrlInput/view\": 85,\n\t\"./PublishUrlInput/view.jsx\": 85,\n\t\"./ShowAssetDetails\": 29,\n\t\"./ShowAssetDetails/\": 29,\n\t\"./ShowAssetDetails/index\": 29,\n\t\"./ShowAssetDetails/index.js\": 29,\n\t\"./ShowAssetDetails/view\": 73,\n\t\"./ShowAssetDetails/view.jsx\": 73,\n\t\"./ShowAssetLite\": 27,\n\t\"./ShowAssetLite/\": 27,\n\t\"./ShowAssetLite/index\": 27,\n\t\"./ShowAssetLite/index.js\": 27,\n\t\"./ShowAssetLite/view\": 71,\n\t\"./ShowAssetLite/view.jsx\": 71,\n\t\"./ShowChannel\": 32,\n\t\"./ShowChannel/\": 32,\n\t\"./ShowChannel/index\": 32,\n\t\"./ShowChannel/index.js\": 32,\n\t\"./ShowChannel/view\": 76,\n\t\"./ShowChannel/view.jsx\": 76,\n\t\"./index\": 52,\n\t\"./index.js\": 52\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 169;\n\n/***/ }),\n/* 170 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOAD_START = exports.LOAD_START = 'LOAD_START';\nvar LOADING = exports.LOADING = 'LOADING';\nvar PUBLISHING = exports.PUBLISHING = 'PUBLISHING';\nvar SUCCESS = exports.SUCCESS = 'SUCCESS';\nvar FAILED = exports.FAILED = 'FAILED';\n\n/***/ }),\n/* 171 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar map = {\n\t\"./\": 53,\n\t\"./AboutPage\": 20,\n\t\"./AboutPage/\": 20,\n\t\"./AboutPage/index\": 20,\n\t\"./AboutPage/index.jsx\": 20,\n\t\"./ErrorPage\": 12,\n\t\"./ErrorPage/\": 12,\n\t\"./ErrorPage/index\": 12,\n\t\"./ErrorPage/index.jsx\": 12,\n\t\"./HomePage\": 54,\n\t\"./HomePage/\": 54,\n\t\"./HomePage/index\": 54,\n\t\"./HomePage/index.jsx\": 54,\n\t\"./LoginPage\": 23,\n\t\"./LoginPage/\": 23,\n\t\"./LoginPage/index\": 23,\n\t\"./LoginPage/index.js\": 23,\n\t\"./LoginPage/view\": 67,\n\t\"./LoginPage/view.jsx\": 67,\n\t\"./ShowPage\": 26,\n\t\"./ShowPage/\": 26,\n\t\"./ShowPage/index\": 26,\n\t\"./ShowPage/index.js\": 26,\n\t\"./ShowPage/view\": 70,\n\t\"./ShowPage/view.jsx\": 70,\n\t\"./index\": 53,\n\t\"./index.js\": 53\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 171;\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// index.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 115);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 663af5f6934a69121924","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 0\n// module chunks = 0","module.exports = require(\"react-redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-redux\"\n// module id = 1\n// module chunks = 0","module.exports = require(\"winston\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston\"\n// module id = 2\n// module chunks = 0","function SiteConfig () {\n this.analytics = {\n googleId: 'default',\n };\n this.assetDefaults = {\n description: 'An asset published on Spee.ch',\n thumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',\n title : 'Spee.ch',\n };\n this.auth = {\n sessionKey: 'default',\n };\n this.componentsConfig = {\n components: {},\n containers: {},\n pages : {},\n };\n this.details = {\n description: 'Open-source, decentralized image and video sharing.',\n host : 'default',\n port : 3000,\n title : 'Spee.ch',\n twitter : '@spee_ch',\n };\n this.publishing = {\n additionalClaimAddresses: [],\n disabled : false,\n disabledMessage : 'Please check back soon.',\n primaryClaimAddress : 'default',\n thumbnailChannel : 'default',\n thumbnailChannelId : 'default',\n uploadDirectory : '/home/lbry/Uploads',\n };\n this.configure = (config) => {\n if (!config) {\n return console.log('No site config received.');\n }\n const { analytics, assetDefaults, auth, componentsConfig, details, publishing } = config;\n this.analytics = analytics;\n this.assetDefaults = assetDefaults;\n this.auth = auth;\n this.details = details;\n this.publishing = publishing;\n this.componentsConfig = componentsConfig;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/siteConfig.js","module.exports = require(\"react-router-dom\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-router-dom\"\n// module id = 4\n// module chunks = 0","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport {updateSelectedChannel} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, site }) => {\n return {\n channelName : channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId : channel.loggedInChannel.longId,\n siteDescription: site.description,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n onChannelLogout: () => {\n dispatch(updateLoggedInChannel(null, null, null));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/index.js","import * as actions from 'constants/publish_action_types';\n\n// export action creators\nexport function selectFile (file) {\n return {\n type: actions.FILE_SELECTED,\n data: file,\n };\n};\n\nexport function clearFile () {\n return {\n type: actions.FILE_CLEAR,\n };\n};\n\nexport function updateMetadata (name, value) {\n return {\n type: actions.METADATA_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateClaim (value) {\n return {\n type: actions.CLAIM_UPDATE,\n data: value,\n };\n};\n\nexport function setPublishInChannel (channel) {\n return {\n type: actions.SET_PUBLISH_IN_CHANNEL,\n channel,\n };\n};\n\nexport function updatePublishStatus (status, message) {\n return {\n type: actions.PUBLISH_STATUS_UPDATE,\n data: {\n status,\n message,\n },\n };\n};\n\nexport function updateError (name, value) {\n return {\n type: actions.ERROR_UPDATE,\n data: {\n name,\n value,\n },\n };\n};\n\nexport function updateSelectedChannel (channelName) {\n return {\n type: actions.SELECTED_CHANNEL_UPDATE,\n data: channelName,\n };\n};\n\nexport function toggleMetadataInputs (showMetadataInputs) {\n return {\n type: actions.TOGGLE_METADATA_INPUTS,\n data: showMetadataInputs,\n };\n};\n\nexport function onNewThumbnail (file) {\n return {\n type: actions.THUMBNAIL_NEW,\n data: file,\n };\n};\n\nexport function startPublish (history) {\n return {\n type: actions.PUBLISH_START,\n data: { history },\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/publish.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site }) => {\n const { defaultDescription, defaultThumbnail, description: siteDescription, host: siteHost, title: siteTitle, twitter: siteTwitter } = site;\n return {\n defaultDescription,\n defaultThumbnail,\n siteDescription,\n siteHost,\n siteTitle,\n siteTwitter,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/index.js","import 'cross-fetch/polyfill';\n\n/**\n * Parses the JSON returned by a network request\n *\n * @param {object} response A response from a network request\n *\n * @return {object} The parsed JSON from the request\n */\nfunction parseJSON (response) {\n if (response.status === 204 || response.status === 205) {\n return null;\n }\n return response.json();\n}\n\n/**\n * Parses the status returned by a network request\n *\n * @param {object} response A response from a network request\n * @param {object} response The parsed JSON from the network request\n *\n * @return {object | undefined} Returns object with status and statusText, or undefined\n */\nfunction checkStatus (response, jsonResponse) {\n if (response.status >= 200 && response.status < 300) {\n return jsonResponse;\n }\n const error = new Error(jsonResponse.message);\n error.response = response;\n throw error;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @param {string} url The URL we want to request\n * @param {object} [options] The options we want to pass to \"fetch\"\n *\n * @return {object} The response data\n */\n\nexport default function request (url, options) {\n return fetch(url, options)\n .then(response => {\n return Promise.all([response, parseJSON(response)]);\n })\n .then(([response, jsonResponse]) => {\n return checkStatus(response, jsonResponse);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/request.js","const Sequelize = require('sequelize');\nconst logger = require('winston');\n\nconsole.log('exporting sequelize models');\nconst { database, username, password } = require('../../config/mysqlConfig');\nconst db = {};\n// set sequelize options\nconst sequelize = new Sequelize(database, username, password, {\n host : 'localhost',\n dialect : 'mysql',\n dialectOptions: {decimalNumbers: true}, // fix to ensure DECIMAL will not be stored as a string\n logging : false,\n pool : {\n max : 5,\n min : 0,\n idle : 10000,\n acquire: 10000,\n },\n});\n\n// establish mysql connection\nsequelize\n .authenticate()\n .then(() => {\n logger.info('Sequelize has established mysql connection successfully.');\n })\n .catch(err => {\n logger.error('Sequelize was unable to connect to the database:', err);\n });\n\n// manually add each model to the db object\nconst Certificate = require('./certificate.js');\nconst Channel = require('./channel.js');\nconst Claim = require('./claim.js');\nconst File = require('./file.js');\nconst Request = require('./request.js');\nconst User = require('./user.js');\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(modelName => {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = (Model, values, condition, tableName) => {\n return Model\n .findOne({\n where: condition,\n })\n .then(obj => {\n if (obj) { // update\n logger.debug(`updating record in db.${tableName}`);\n return obj.update(values);\n } else { // insert\n logger.debug(`creating record in db.${tableName}`);\n return Model.create(values);\n }\n })\n .catch(function (error) {\n logger.error(`${tableName}.upsert error`, error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/index.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ActiveStatusBar from 'components/ActiveStatusBar';\nimport InactiveStatusBar from 'components/InactiveStatusBar';\n\nclass ProgressBar extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n bars : [],\n index : 0,\n incrementer: 1,\n };\n this.createBars = this.createBars.bind(this);\n this.startProgressBar = this.startProgressBar.bind(this);\n this.updateProgressBar = this.updateProgressBar.bind(this);\n this.stopProgressBar = this.stopProgressBar.bind(this);\n }\n componentDidMount () {\n this.createBars();\n this.startProgressBar();\n }\n componentWillUnmount () {\n this.stopProgressBar();\n }\n createBars () {\n const bars = [];\n for (let i = 0; i <= this.props.size; i++) {\n bars.push({isActive: false});\n }\n this.setState({ bars });\n }\n startProgressBar () {\n this.updateInterval = setInterval(this.updateProgressBar.bind(this), 300);\n };\n updateProgressBar () {\n let index = this.state.index;\n let incrementer = this.state.incrementer;\n let bars = this.state.bars;\n // flip incrementer if necessary, to stay in bounds\n if ((index < 0) || (index > this.props.size)) {\n incrementer = incrementer * -1;\n index += incrementer;\n }\n // update the indexed bar\n if (incrementer > 0) {\n bars[index].isActive = true;\n } else {\n bars[index].isActive = false;\n };\n // increment index\n index += incrementer;\n // update state\n this.setState({\n bars,\n incrementer,\n index,\n });\n };\n stopProgressBar () {\n clearInterval(this.updateInterval);\n };\n render () {\n return (\n
\n {this.state.bars.map((bar, index) => bar.isActive ? : )}\n
\n );\n }\n};\n\nProgressBar.propTypes = {\n size: PropTypes.number.isRequired,\n};\n\nexport default ProgressBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ProgressBar/index.jsx","import * as actions from 'constants/show_action_types';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\n// basic request parsing\nexport function onHandleShowPageUri (params) {\n return {\n type: actions.HANDLE_SHOW_URI,\n data: params,\n };\n};\n\nexport function onRequestError (error) {\n return {\n type: actions.REQUEST_ERROR,\n data: error,\n };\n};\n\nexport function onNewChannelRequest (channelName, channelId) {\n const requestType = CHANNEL;\n const requestId = `cr#${channelName}#${channelId}`;\n return {\n type: actions.CHANNEL_REQUEST_NEW,\n data: { requestType, requestId, channelName, channelId },\n };\n};\n\nexport function onNewAssetRequest (name, id, channelName, channelId, extension) {\n const requestType = extension ? ASSET_LITE : ASSET_DETAILS;\n const requestId = `ar#${name}#${id}#${channelName}#${channelId}`;\n return {\n type: actions.ASSET_REQUEST_NEW,\n data: {\n requestType,\n requestId,\n name,\n modifier: {\n id,\n channel: {\n name: channelName,\n id : channelId,\n },\n },\n },\n };\n};\n\nexport function onRequestUpdate (requestType, requestId) {\n return {\n type: actions.REQUEST_UPDATE,\n data: {\n requestType,\n requestId,\n },\n };\n};\n\nexport function addRequestToRequestList (id, error, key) {\n return {\n type: actions.REQUEST_LIST_ADD,\n data: { id, error, key },\n };\n};\n\n// asset actions\n\nexport function addAssetToAssetList (id, error, name, claimId, shortId, claimData) {\n return {\n type: actions.ASSET_ADD,\n data: { id, error, name, claimId, shortId, claimData },\n };\n}\n\n// channel actions\n\nexport function addNewChannelToChannelList (id, name, shortId, longId, claimsData) {\n return {\n type: actions.CHANNEL_ADD,\n data: { id, name, shortId, longId, claimsData },\n };\n};\n\nexport function onUpdateChannelClaims (channelKey, name, longId, page) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_ASYNC,\n data: {channelKey, name, longId, page},\n };\n};\n\nexport function updateChannelClaims (channelListId, claimsData) {\n return {\n type: actions.CHANNEL_CLAIMS_UPDATE_SUCCESS,\n data: {channelListId, claimsData},\n };\n};\n\n// display a file\n\nexport function fileRequested (name, claimId) {\n return {\n type: actions.FILE_REQUESTED,\n data: { name, claimId },\n };\n};\n\nexport function updateFileAvailability (status) {\n return {\n type: actions.FILE_AVAILABILITY_UPDATE,\n data: status,\n };\n};\n\nexport function updateDisplayAssetError (error) {\n return {\n type: actions.DISPLAY_ASSET_ERROR,\n data: error,\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/show.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport NavBar from 'containers/NavBar';\n\nclass ErrorPage extends React.Component {\n render () {\n const { error } = this.props;\n return (\n
\n \n
\n

{error}

\n
\n
\n );\n }\n};\n\nErrorPage.propTypes = {\n error: PropTypes.string.isRequired,\n};\n\nexport default ErrorPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ErrorPage/index.jsx","import React from 'react';\nimport GoogleAnalytics from 'react-ga';\nimport { withRouter } from 'react-router-dom';\nconst { analytics: { googleId } } = require('../../../config/siteConfig.js');\n\nGoogleAnalytics.initialize(googleId);\n\nclass GAListener extends React.Component {\n componentDidMount () {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n\n sendPageView (location) {\n GoogleAnalytics.set({ page: location.pathname });\n GoogleAnalytics.pageview(location.pathname);\n }\n\n render () {\n return this.props.children;\n }\n}\n\nexport default withRouter(GAListener);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/GAListener/index.jsx","module.exports = require(\"prop-types\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 14\n// module chunks = 0","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from '../../actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/index.js","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from 'actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/index.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { fileRequested } from 'actions/show';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select error and status\n const error = show.displayAsset.error;\n const status = show.displayAsset.status;\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n error,\n status,\n asset,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onFileRequest: (name, claimId) => {\n dispatch(fileRequested(name, claimId));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/index.js","import { connect } from 'react-redux';\nimport { selectFile, updateError, clearFile } from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n file : publish.file,\n thumbnail: publish.thumbnail,\n fileError: publish.error.file,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n selectFile: (file) => {\n dispatch(selectFile(file));\n },\n setFileError: (value) => {\n dispatch(clearFile());\n dispatch(updateError('file', value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/Dropzone/index.js","// request actions\nexport const HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nexport const REQUEST_ERROR = 'REQUEST_ERROR';\nexport const REQUEST_UPDATE = 'REQUEST_UPDATE';\nexport const ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nexport const CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nexport const REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nexport const ASSET_ADD = `ASSET_ADD`;\n\n// channel actions\nexport const CHANNEL_ADD = 'CHANNEL_ADD';\n\nexport const CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nexport const CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nexport const FILE_REQUESTED = 'FILE_REQUESTED';\nexport const FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nexport const DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_action_types.js","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport SEO from 'components/SEO';\n\nclass AboutPage extends React.Component {\n render () {\n return (\n
\n \n \n
\n
\n
\n

Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.

\n

TWITTER

\n

GITHUB

\n

DISCORD CHANNEL

\n

DOCUMENTATION

\n
\n
\n
\n

Spee.ch is a media-hosting site that reads from and publishes content to the LBRY blockchain.

\n

Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the LBRY network. This means that your images are stored in multiple locations without a single point of failure.

\n

Contribute

\n

If you have an idea for your own spee.ch-like site on top of LBRY, fork our github repo and go to town!

\n

If you want to improve spee.ch, join our discord channel or solve one of our github issues.

\n
\n
\n
\n
\n );\n }\n};\n\nexport default AboutPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/AboutPage/index.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nfunction Logo () {\n return (\n \n \n Logo\n Spee.ch logo\n \n \n \n Spee<h\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default Logo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/Logo/index.jsx","import React from 'react';\n\nfunction NavBarChannelDropdown ({ channelName, handleSelection, defaultSelection, VIEW, LOGOUT }) {\n return (\n \n );\n};\n\nexport default NavBarChannelDropdown;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/NavBarChannelOptionsDropdown/index.jsx","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/index.js","import React from 'react';\n\nconst ActiveStatusBar = () => {\n return | ;\n};\n\nexport default ActiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ActiveStatusBar/index.jsx","import React from 'react';\n\nconst InactiveStatusBar = () => {\n return | ;\n};\n\nexport default InactiveStatusBar;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/InactiveStatusBar/index.jsx","import { connect } from 'react-redux';\nimport { onHandleShowPageUri } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n return {\n error : show.request.error,\n requestType: show.request.type,\n };\n};\n\nconst mapDispatchToProps = {\n onHandleShowPageUri,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/index.js","export const selectAsset = (show) => {\n const request = show.requestList[show.request.id];\n const assetKey = request.key;\n return show.assetList[assetKey];\n};\n\nexport const selectShowState = (state) => {\n return state.show;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/show.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select asset info\n let asset;\n const request = show.requestList[requestId] || null;\n const assetList = show.assetList;\n if (request && assetList) {\n const assetKey = request.key; // note: just store this in the request\n asset = assetList[assetKey] || null;\n };\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/index.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n const { claimData: { title } } = selectAsset(show);\n return {\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/index.js","import { connect } from 'react-redux';\nimport View from './view';\nimport { selectAsset } from 'selectors/show';\n\nconst mapStateToProps = ({ show }) => {\n // select asset\n const asset = selectAsset(show);\n // return props\n return {\n asset,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select request info\n const requestId = show.request.id;\n // select request\n const previousRequest = show.requestList[requestId] || null;\n // select channel\n let channel;\n if (previousRequest) {\n const channelKey = previousRequest.key;\n channel = show.channelList[channelKey] || null;\n }\n return {\n channel,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/index.js","import { connect } from 'react-redux';\nimport { onUpdateChannelClaims } from 'actions/show';\nimport View from './view';\n\nconst mapStateToProps = ({ show }) => {\n // select channel key\n const request = show.requestList[show.request.id];\n const channelKey = request.key;\n // select channel claims\n const channel = show.channelList[channelKey] || null;\n // return props\n return {\n channelKey,\n channel,\n };\n};\n\nconst mapDispatchToProps = {\n onUpdateChannelClaims,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({site: {defaults: { defaultThumbnail }}}) => {\n return {\n defaultThumbnail,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/index.js","import { connect } from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ site: { host, title } }) => {\n return {\n host,\n title,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/index.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass ExpandingTextarea extends Component {\n constructor (props) {\n super(props);\n this._handleChange = this._handleChange.bind(this);\n }\n componentDidMount () {\n this.adjustTextarea({});\n }\n _handleChange (event) {\n const { onChange } = this.props;\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n adjustTextarea ({ target = this.el }) {\n target.style.height = 0;\n target.style.height = `${target.scrollHeight}px`;\n }\n render () {\n const { ...rest } = this.props;\n return (\n this.el = x}\n onChange={this._handleChange}\n />\n );\n }\n}\n\nExpandingTextarea.propTypes = {\n onChange: PropTypes.func,\n};\n\nexport default ExpandingTextarea;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/ExpandingTextArea/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass PublishPreview extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n imgSource : '',\n defaultThumbnail: '/assets/img/video_thumb_default.png',\n };\n }\n componentDidMount () {\n this.setPreviewImageSource(this.props.file);\n }\n componentWillReceiveProps (newProps) {\n if (newProps.file !== this.props.file) {\n this.setPreviewImageSource(newProps.file);\n }\n if (newProps.thumbnail !== this.props.thumbnail) {\n if (newProps.thumbnail) {\n this.setPreviewImageSourceFromFile(newProps.thumbnail);\n } else {\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n }\n setPreviewImageSourceFromFile (file) {\n const previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = () => {\n this.setState({imgSource: previewReader.result});\n };\n }\n setPreviewImageSource (file) {\n if (file.type !== 'video/mp4') {\n this.setPreviewImageSourceFromFile(file);\n } else {\n if (this.props.thumbnail) {\n this.setPreviewImageSourceFromFile(this.props.thumbnail);\n }\n this.setState({imgSource: this.state.defaultThumbnail});\n }\n }\n render () {\n return (\n \n );\n }\n};\n\nPublishPreview.propTypes = {\n dimPreview: PropTypes.bool.isRequired,\n file : PropTypes.object.isRequired,\n thumbnail : PropTypes.object,\n};\n\nexport default PublishPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishPreview/index.jsx","import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction UrlMiddle ({publishInChannel, selectedChannel, loggedInChannelName, loggedInChannelShortId}) {\n if (publishInChannel) {\n if (selectedChannel === loggedInChannelName) {\n return {loggedInChannelName}:{loggedInChannelShortId} /;\n }\n return @channelSelect a channel below /;\n }\n return (\n xyzThis will be a random id /\n );\n}\n\nUrlMiddle.propTypes = {\n publishInChannel : PropTypes.bool.isRequired,\n loggedInChannelName : PropTypes.string,\n loggedInChannelShortId: PropTypes.string,\n};\n\nexport default UrlMiddle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/PublishUrlMiddleDisplay/index.jsx","import {connect} from 'react-redux';\nimport {setPublishInChannel, updateSelectedChannel, updateError} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, publish }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n publishInChannel : publish.publishInChannel,\n selectedChannel : publish.selectedChannel,\n channelError : publish.error.channel,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onPublishInChannelChange: (value) => {\n dispatch(updateError('channel', null));\n dispatch(setPublishInChannel(value));\n },\n onChannelSelect: (value) => {\n dispatch(updateError('channel', null));\n dispatch(updateSelectedChannel(value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelSelect/index.js","import {connect} from 'react-redux';\nimport {clearFile, startPublish} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, publish }) => {\n return {\n file: publish.file,\n };\n};\n\nconst mapDispatchToProps = {\n clearFile,\n startPublish,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishDetails/index.js","import {connect} from 'react-redux';\nimport {updateMetadata} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n title: publish.metadata.title,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onMetadataChange: (name, value) => {\n dispatch(updateMetadata(name, value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishTitleInput/index.js","import {updateClaim, updateError} from 'actions/publish';\nimport {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, publish }) => {\n return {\n loggedInChannelName : channel.loggedInChannel.name,\n loggedInChannelShortId: channel.loggedInChannel.shortId,\n fileName : publish.file.name,\n publishInChannel : publish.publishInChannel,\n selectedChannel : publish.selectedChannel,\n claim : publish.claim,\n urlError : publish.error.url,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onClaimChange: (value) => {\n dispatch(updateClaim(value));\n dispatch(updateError('publishSubmit', null));\n },\n onUrlError: (value) => {\n dispatch(updateError('url', value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishUrlInput/index.js","import { connect } from 'react-redux';\nimport { onNewThumbnail } from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish: { file } }) => {\n return {\n file,\n };\n};\n\nconst mapDispatchToProps = {\n onNewThumbnail,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishThumbnailInput/index.js","import {connect} from 'react-redux';\nimport {updateMetadata, toggleMetadataInputs} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n showMetadataInputs: publish.showMetadataInputs,\n description : publish.metadata.description,\n license : publish.metadata.license,\n nsfw : publish.metadata.nsfw,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onMetadataChange: (name, value) => {\n dispatch(updateMetadata(name, value));\n },\n onToggleMetadataInputs: (value) => {\n dispatch(toggleMetadataInputs(value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishMetadataInputs/index.js","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n message: publish.disabledMessage,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishDisabledMessage/index.js","import {connect} from 'react-redux';\nimport {clearFile} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n status : publish.status.status,\n message: publish.status.message,\n };\n};\n\nconst mapDispatchToProps = {\n clearFile,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishStatus/index.js","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n disabled: publish.disabled,\n file : publish.file,\n status : publish.status.status,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishTool/index.js","module.exports = require(\"react-helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-helmet\"\n// module id = 48\n// module chunks = 0","module.exports = require(\"redux-saga/effects\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga/effects\"\n// module id = 49\n// module chunks = 0","const Path = require('path');\nconst { getSubDirectoryNames } = require('build/getFolderNames.js');\n\nconst thisFolder = Path.resolve(__dirname, 'client/components/');\nlet modules = {};\n\ngetSubDirectoryNames(thisFolder)\n .forEach((name) => {\n modules[name] = require(`./${name}`).default;\n });\n\nmodule.exports = modules;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/index.js","module.exports = require(\"path\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"path\"\n// module id = 51\n// module chunks = 0","const Path = require('path');\nconst { getSubDirectoryNames } = require('build/getFolderNames.js');\nconst thisFolder = Path.resolve(__dirname, 'client/containers/');\n\nlet modules = {};\n\ngetSubDirectoryNames(thisFolder)\n .forEach((name) => {\n modules[name] = require(`./${name}`).default;\n });\n\nmodule.exports = modules;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/index.js","const Path = require('path');\nconst { getSubDirectoryNames } = require('build/getFolderNames.js');\nconst thisFolder = Path.resolve(__dirname, 'client/pages/');\n\nlet modules = {};\n\ngetSubDirectoryNames(thisFolder)\n .forEach((name) => {\n modules[name] = require(`./${name}`).default;\n });\n\nmodule.exports = modules;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport PublishTool from 'containers/PublishTool';\n\nclass HomePage extends React.Component {\n render () {\n return (\n
\n \n \n
\n \n
\n
\n );\n }\n};\n\nexport default HomePage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/HomePage/index.jsx","const axios = require('axios');\nconst logger = require('winston');\nconst { api: { apiHost, apiPort } } = require('../../config/lbryConfig.js');\nconst lbryApiUri = 'http://' + apiHost + ':' + apiPort;\nconst { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('./googleAnalytics.js');\n\nconst handleLbrynetResponse = ({ data }, resolve, reject) => {\n logger.debug('lbry api data:', data);\n if (data.result) {\n // check for an error\n if (data.result.error) {\n logger.debug('Lbrynet api error:', data.result.error);\n reject(new Error(data.result.error));\n return;\n };\n resolve(data.result);\n return;\n }\n // fallback in case it just timed out\n reject(JSON.stringify(data));\n};\n\nmodule.exports = {\n publishClaim (publishParams) {\n logger.debug(`lbryApi >> Publishing claim to \"${publishParams.name}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'publish',\n params: publishParams,\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaim (uri) {\n logger.debug(`lbryApi >> Getting Claim for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'get',\n params: { uri, timeout: 20 },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaim', 'GET', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimList (claimName) {\n logger.debug(`lbryApi >> Getting claim_list for \"${claimName}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'claim_list',\n params: { name: claimName },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'getClaimList', 'CLAIM_LIST', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n resolveUri (uri) {\n logger.debug(`lbryApi >> Resolving URI for \"${uri}\"`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'resolve',\n params: { uri },\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'resolveUri', 'RESOLVE', gaStartTime, Date.now());\n if (data.result[uri].error) { // check for errors\n reject(data.result[uri].error);\n } else { // if no errors, resolve\n resolve(data.result[uri]);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getDownloadDirectory () {\n logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'settings_get',\n })\n .then(({ data }) => {\n sendGATimingEvent('lbrynet', 'getDownloadDirectory', 'SETTINGS_GET', gaStartTime, Date.now());\n if (data.result) {\n resolve(data.result.download_directory);\n } else {\n return new Error('Successfully connected to lbry daemon, but unable to retrieve the download directory.');\n }\n })\n .catch(error => {\n logger.error('Lbrynet Error:', error);\n resolve('/home/lbry/Downloads/');\n });\n });\n },\n createChannel (name) {\n logger.debug(`lbryApi >> Creating channel for ${name}...`);\n const gaStartTime = Date.now();\n return new Promise((resolve, reject) => {\n axios\n .post(lbryApiUri, {\n method: 'channel_new',\n params: {\n channel_name: name,\n amount : 0.1,\n },\n })\n .then(response => {\n sendGATimingEvent('lbrynet', 'createChannel', 'CHANNEL_NEW', gaStartTime, Date.now());\n handleLbrynetResponse(response, resolve, reject);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryApi.js","const logger = require('winston');\nconst ua = require('universal-analytics');\nconst { analytics : { googleId }, details: { title } } = require('../../config/siteConfig.js');\n\nfunction createServeEventParams (headers, ip, originalUrl) {\n return {\n eventCategory : 'client requests',\n eventAction : 'serve request',\n eventLabel : originalUrl,\n ipOverride : ip,\n userAgentOverride: headers['user-agent'],\n };\n};\n\nfunction createPublishTimingEventParams (category, variable, label, startTime, endTime) {\n const duration = endTime - startTime;\n return {\n userTimingCategory : category,\n userTimingVariableName: variable,\n userTimingTime : duration,\n userTimingLabel : label,\n };\n};\n\nfunction sendGoogleAnalyticsEvent (ip, params) {\n const visitorId = ip.replace(/\\./g, '-');\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.event(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n });\n};\n\nfunction sendGoogleAnalyticsTiming (visitorId, params) {\n const visitor = ua(googleId, visitorId, { strictCidFormat: false, https: true });\n visitor.timing(params, (err) => {\n if (err) {\n logger.error('Google Analytics Event Error >>', err);\n }\n logger.debug(`Timing event successfully sent to google analytics`);\n });\n};\n\nmodule.exports = {\n sendGAServeEvent (headers, ip, originalUrl) {\n const params = createServeEventParams(headers, ip, originalUrl);\n sendGoogleAnalyticsEvent(ip, params);\n },\n sendGATimingEvent (category, variable, label, startTime, endTime) {\n const params = createPublishTimingEventParams(category, variable, label, startTime, endTime);\n sendGoogleAnalyticsTiming(title, params);\n },\n chooseGaLbrynetPublishLabel ({ channel_name: channelName, channel_id: channelId }) {\n return (channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM');\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/googleAnalytics.js","module.exports = require(\"redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux\"\n// module id = 57\n// module chunks = 0","const { componentsConfig } = require('../../config/siteConfig.js');\n\nfunction getDeepestChildValue (parent, childrenKeys) {\n let childKey = childrenKeys.shift(); // .shift() retrieves the first element of array and removes it from array\n let child = parent[childKey];\n if (childrenKeys.length >= 1) {\n return getDeepestChildValue(child, childrenKeys);\n }\n return child;\n}\n\nexport const dynamicImport = (filePath) => {\n // validate inputs\n if (!filePath) {\n throw new Error('no file path provided to dynamicImport()');\n }\n if (typeof filePath !== 'string') {\n console.log('dynamicImport > filePath:', filePath);\n console.log('dynamicImport > filePath type:', typeof filePath);\n throw new Error('file path provided to dynamicImport() must be a string');\n }\n if (!componentsConfig) {\n console.log('no componentsConfig found in siteConfig.js');\n return require(`${filePath}`);\n }\n // split out the file folders // filter out any empty or white-space-only strings\n const folders = filePath.split('/').filter(folderName => folderName.replace(/\\s/g, '').length);\n // check for the component corresponding to file path in the site config object\n // i.e. componentsConfig[folders[0]][folders[2][...][folders[n]]\n const customComponent = getDeepestChildValue(componentsConfig, folders);\n if (customComponent) {\n return customComponent; // return custom component\n } else {\n return require(`${filePath}`);\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/dynamicImport.js","const createBasicCanonicalLink = (page, siteHost) => {\n return `${siteHost}/${page}`;\n};\n\nconst createAssetCanonicalLink = (asset, siteHost) => {\n let channelName, certificateId, name, claimId;\n if (asset.claimData) {\n ({ channelName, certificateId, name, claimId } = asset.claimData);\n };\n if (channelName) {\n return `${siteHost}/${channelName}:${certificateId}/${name}`;\n };\n return `${siteHost}/${claimId}/${name}`;\n};\n\nconst createChannelCanonicalLink = (channel, siteHost) => {\n const { name, longId } = channel;\n return `${siteHost}/${name}:${longId}`;\n};\n\nexport const createCanonicalLink = (asset, channel, page, siteHost) => {\n if (asset) {\n return createAssetCanonicalLink(asset, siteHost);\n }\n if (channel) {\n return createChannelCanonicalLink(channel, siteHost);\n }\n return createBasicCanonicalLink(page, siteHost);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/canonicalLink.js","module.exports = {\n validateFile (file) {\n if (!file) {\n throw new Error('no file provided');\n }\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate size and type\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n throw new Error('Sorry, GIFs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n throw new Error(file.type + ' is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/file.js","module.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(identifier)\n .map(match => match || null);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your URL. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('Check your URL. No channel name after \"@\".');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in channel name: \"${nameBadChars.join(', ')}\".`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`Check your URL. No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`Check your URL. The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId: channelClaimId || null,\n claimId : claimId || null,\n };\n },\n parseClaim: function (name) {\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first extension)\n '([:$#.]?)([^/]*)' // extension separator, extension (stops at the first path separator or end)\n );\n const [proto, claimName, extensionSeperator, extension] = componentsRegex // eslint-disable-line no-unused-vars\n .exec(name)\n .map(match => match || null);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('Check your URL. No claim name provided before \".\"');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Check your URL. Invalid characters in claim name: \"${nameBadChars.join(', ')}\".`);\n }\n // Validate and process extension\n if (extensionSeperator) {\n if (!extension) {\n throw new Error(`Check your URL. No file extension provided after separator \"${extensionSeperator}\".`);\n }\n if (extensionSeperator !== '.') {\n throw new Error(`Check your URL. The \"${extensionSeperator}\" separator is not supported in the claim name.`);\n }\n }\n return {\n claimName,\n extension: extension || null,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/lbryUri.js","const determineOgThumbnailContentType = (thumbnail) => {\n if (thumbnail) {\n const fileExt = thumbnail.substring(thumbnail.lastIndexOf('.'));\n switch (fileExt) {\n case 'jpeg':\n case 'jpg':\n return 'image/jpeg';\n case 'png':\n return 'image/png';\n case 'gif':\n return 'image/gif';\n case 'mp4':\n return 'video/mp4';\n default:\n return 'image/jpeg';\n }\n }\n return '';\n};\n\nconst createBasicMetaTags = (siteHost, siteDescription, siteTitle, siteTwitter) => {\n return [\n {property: 'og:title', content: siteTitle},\n {property: 'og:url', content: siteHost},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: siteDescription},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createChannelMetaTags = (siteTitle, siteHost, siteTwitter, channel) => {\n const { name, longId } = channel;\n return [\n {property: 'og:title', content: `${name} on ${siteTitle}`},\n {property: 'og:url', content: `${siteHost}/${name}:${longId}`},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: `${name}, a channel on ${siteTitle}`},\n {property: 'twitter:site', content: siteTwitter},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createAssetMetaTags = (siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail) => {\n const { claimData } = asset;\n const { contentType } = claimData;\n const embedUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const showUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;\n const source = `${siteHost}/${claimData.claimId}/${claimData.name}.${claimData.fileExt}`;\n const ogTitle = claimData.title || claimData.name;\n const ogDescription = claimData.description || defaultDescription;\n const ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);\n const ogThumbnail = claimData.thumbnail || defaultThumbnail;\n const metaTags = [\n {property: 'og:title', content: ogTitle},\n {property: 'og:url', content: showUrl},\n {property: 'og:site_name', content: siteTitle},\n {property: 'og:description', content: ogDescription},\n {property: 'og:image:width', content: 600},\n {property: 'og:image:height', content: 315},\n {property: 'twitter:site', content: siteTwitter},\n ];\n if (contentType === 'video/mp4' || contentType === 'video/webm') {\n metaTags.push({property: 'og:video', content: source});\n metaTags.push({property: 'og:video:secure_url', content: source});\n metaTags.push({property: 'og:video:type', content: contentType});\n metaTags.push({property: 'og:image', content: ogThumbnail});\n metaTags.push({property: 'og:image:type', content: ogThumbnailContentType});\n metaTags.push({property: 'og:type', content: 'video'});\n metaTags.push({property: 'twitter:card', content: 'player'});\n metaTags.push({property: 'twitter:player', content: embedUrl});\n metaTags.push({property: 'twitter:player:width', content: 600});\n metaTags.push({property: 'twitter:text:player_width', content: 600});\n metaTags.push({property: 'twitter:player:height', content: 337});\n metaTags.push({property: 'twitter:player:stream', content: source});\n metaTags.push({property: 'twitter:player:stream:content_type', content: contentType});\n } else {\n metaTags.push({property: 'og:image', content: source});\n metaTags.push({property: 'og:image:type', content: contentType});\n metaTags.push({property: 'og:type', content: 'article'});\n metaTags.push({property: 'twitter:card', content: 'summary_large_image'});\n }\n return metaTags;\n};\n\nexport const createMetaTags = (siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail) => {\n if (asset) {\n return createAssetMetaTags(siteHost, siteTitle, siteTwitter, asset, defaultDescription, defaultThumbnail);\n };\n if (channel) {\n return createChannelMetaTags(siteHost, siteTitle, siteTwitter, channel);\n };\n return createBasicMetaTags(siteDescription, siteHost, siteTitle, siteTwitter);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/metaTags.js","export const createPageTitle = (siteTitle, pageTitle) => {\n if (!pageTitle) {\n return `${siteTitle}`;\n }\n return `${siteTitle} - ${pageTitle}`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/pageTitle.js","import * as actions from 'constants/channel_action_types';\n\n// export action creators\n\nexport function updateLoggedInChannel (name, shortId, longId) {\n return {\n type: actions.CHANNEL_UPDATE,\n data: {\n name,\n shortId,\n longId,\n },\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/actions/channel.js","import React from 'react';\nimport { NavLink, withRouter } from 'react-router-dom';\nimport Logo from 'components/Logo';\nimport NavBarChannelDropdown from 'components/NavBarChannelOptionsDropdown';\nimport request from 'utils/request';\n\nconst VIEW = 'VIEW';\nconst LOGOUT = 'LOGOUT';\n\nclass NavBar extends React.Component {\n constructor (props) {\n super(props);\n this.checkForLoggedInUser = this.checkForLoggedInUser.bind(this);\n this.logoutUser = this.logoutUser.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n componentDidMount () {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n checkForLoggedInUser () {\n const params = {credentials: 'include'};\n request('/user', params)\n .then(({ data }) => {\n this.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n })\n .catch(error => {\n console.log('/user error:', error.message);\n });\n }\n logoutUser () {\n const params = {credentials: 'include'};\n request('/logout', params)\n .then(() => {\n this.props.onChannelLogout();\n })\n .catch(error => {\n console.log('/logout error', error.message);\n });\n }\n handleSelection (event) {\n const value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push(`/${this.props.channelName}:${this.props.channelLongId}`);\n break;\n default:\n break;\n }\n }\n render () {\n const { siteDescription } = this.props;\n return (\n
\n
\n \n
\n {siteDescription}\n
\n
\n Publish\n About\n { this.props.channelName ? (\n \n ) : (\n Channel\n )}\n
\n
\n
\n );\n }\n}\n\nexport default withRouter(NavBar);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/NavBar/view.jsx","import React from 'react';\nimport Helmet from 'react-helmet';\nimport PropTypes from 'prop-types';\n\nimport { createPageTitle } from 'utils/pageTitle';\nimport { createMetaTags } from 'utils/metaTags';\nimport { createCanonicalLink } from 'utils/canonicalLink';\n\nclass SEO extends React.Component {\n render () {\n // props from state\n const { defaultDescription, defaultThumbnail, siteDescription, siteHost, siteTitle, siteTwitter } = this.props;\n // props from parent\n const { asset, channel, pageUri } = this.props;\n let { pageTitle } = this.props;\n // create page title, tags, and canonical link\n pageTitle = createPageTitle(siteTitle, pageTitle);\n const metaTags = createMetaTags(siteDescription, siteHost, siteTitle, siteTwitter, asset, channel, defaultDescription, defaultThumbnail);\n const canonicalLink = createCanonicalLink(asset, channel, pageUri, siteHost);\n // render results\n return (\n \n );\n }\n};\n\nSEO.propTypes = {\n pageTitle: PropTypes.string,\n pageUri : PropTypes.string,\n channel : PropTypes.object,\n asset : PropTypes.object,\n};\n\nexport default SEO;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/SEO/view.jsx","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ChannelLoginForm from 'containers/ChannelLoginForm';\nimport ChannelCreateForm from 'containers/ChannelCreateForm';\n\nclass LoginPage extends React.Component {\n componentWillReceiveProps (newProps) {\n // re-route the user to the homepage if the user is logged in\n if (newProps.loggedInChannelName !== this.props.loggedInChannelName) {\n this.props.history.push(`/`);\n }\n }\n render () {\n return (\n
\n \n \n
\n
\n
\n

Channels allow you to publish and group content under an identity. You can create a channel for yourself, or share one with like-minded friends. You can create 1 channel, or 100, so whether you're documenting important events, or making a public repository for cat gifs (password: '1234'), try creating a channel for it!

\n
\n
\n
\n

Log in to an existing channel:

\n \n

Create a brand new channel:

\n \n
\n
\n
\n
\n );\n }\n};\n\nexport default withRouter(LoginPage);\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/LoginPage/view.jsx","import React from 'react';\nimport request from 'utils/request';\n\nclass ChannelLoginForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n name : '',\n password: '',\n };\n this.handleInput = this.handleInput.bind(this);\n this.loginToChannel = this.loginToChannel.bind(this);\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n loginToChannel (event) {\n event.preventDefault();\n const params = {\n method : 'POST',\n body : JSON.stringify({username: this.state.name, password: this.state.password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n request('login', params)\n .then(({success, channelName, shortChannelId, channelClaimId, message}) => {\n if (success) {\n this.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n this.setState({'error': message});\n };\n })\n .catch(error => {\n if (error.message) {\n this.setState({'error': error.message});\n } else {\n this.setState({'error': error});\n }\n });\n }\n render () {\n return (\n
\n
\n
\n \n
\n
\n @\n \n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n { this.state.error ? (\n

{this.state.error}

\n ) : (\n

Enter the name and password for your channel

\n )}\n
\n \n
\n
\n );\n }\n}\n\nexport default ChannelLoginForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelLoginForm/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport request from 'utils/request';\n\nclass ChannelCreateForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n channel : '',\n password: '',\n status : null,\n };\n this.handleChannelInput = this.handleChannelInput.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.createChannel = this.createChannel.bind(this);\n }\n cleanseChannelInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n handleChannelInput (event) {\n let value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({channel: value});\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({error: 'Please enter a channel name'});\n }\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n updateIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n request(`/api/channel/availability/${channelWithAtSymbol}`)\n .then(() => {\n this.setState({'error': null});\n })\n .catch((error) => {\n this.setState({'error': error.message});\n });\n }\n checkIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n return request(`/api/channel/availability/${channelWithAtSymbol}`);\n }\n checkIsPasswordProvided (password) {\n return new Promise((resolve, reject) => {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n makePublishChannelRequest (username, password) {\n const params = {\n method : 'POST',\n body : JSON.stringify({username, password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n return new Promise((resolve, reject) => {\n request('/signup', params)\n .then(result => {\n return resolve(result);\n })\n .catch(error => {\n reject(new Error(`Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ${error.message}`));\n });\n });\n }\n createChannel (event) {\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password)\n .then(() => {\n return this.checkIsChannelAvailable(this.state.channel);\n })\n .then(() => {\n this.setState({status: 'We are publishing your new channel. Sit tight...'});\n return this.makePublishChannelRequest(this.state.channel, this.state.password);\n })\n .then(result => {\n this.setState({status: null});\n this.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n })\n .catch((error) => {\n if (error.message) {\n this.setState({'error': error.message, status: null});\n } else {\n this.setState({'error': error, status: null});\n };\n });\n }\n render () {\n return (\n
\n { !this.state.status ? (\n
\n
\n
\n \n
\n
\n @\n \n { (this.state.channel && !this.state.error) && {'\\u2713'} }\n { this.state.error && {'\\u2716'} }\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n {this.state.error ? (\n

{this.state.error}

\n ) : (\n

Choose a name and password for your channel

\n )}\n
\n \n
\n
\n ) : (\n
\n

{this.state.status}

\n \n
\n )}\n
\n );\n }\n}\n\nexport default ChannelCreateForm;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelCreateForm/view.jsx","import React from 'react';\nimport ErrorPage from 'pages/ErrorPage';\nimport ShowAssetLite from 'containers/ShowAssetLite';\nimport ShowAssetDetails from 'containers/ShowAssetDetails';\nimport ShowChannel from 'containers/ShowChannel';\n\nimport { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';\n\nclass ShowPage extends React.Component {\n componentDidMount () {\n this.props.onHandleShowPageUri(this.props.match.params);\n }\n componentWillReceiveProps (nextProps) {\n if (nextProps.match.params !== this.props.match.params) {\n this.props.onHandleShowPageUri(nextProps.match.params);\n }\n }\n render () {\n const { error, requestType } = this.props;\n if (error) {\n return (\n \n );\n }\n switch (requestType) {\n case CHANNEL:\n return ;\n case ASSET_LITE:\n return ;\n case ASSET_DETAILS:\n return ;\n default:\n return

loading...

;\n }\n }\n};\n\nexport default ShowPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/pages/ShowPage/view.jsx","import React from 'react';\nimport SEO from 'components/SEO';\nimport { Link } from 'react-router-dom';\nimport AssetDisplay from 'containers/AssetDisplay';\n\nclass ShowLite extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { name, claimId } = asset.claimData;\n return (\n
\n \n \n hosted\n via Spee.ch\n
\n );\n }\n return (\n
\n

loading asset data...

\n
\n );\n }\n};\n\nexport default ShowLite;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetLite/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport { LOCAL_CHECK, UNAVAILABLE, ERROR, AVAILABLE } from 'constants/asset_display_states';\n\nclass AssetDisplay extends React.Component {\n componentDidMount () {\n const { asset: { claimData: { name, claimId } } } = this.props;\n this.props.onFileRequest(name, claimId);\n }\n render () {\n const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props;\n return (\n
\n {(status === LOCAL_CHECK) &&\n
\n

Checking to see if Spee.ch has your asset locally...

\n
\n }\n {(status === UNAVAILABLE) &&\n
\n

Sit tight, we're searching the LBRY blockchain for your asset!

\n \n

Curious what magic is happening here? Learn more.

\n
\n }\n {(status === ERROR) &&\n
\n

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the LBRY discord.

\n

{error}

\n
\n }\n {(status === AVAILABLE) &&\n (() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return (\n \n );\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

Unsupported file type

\n );\n }\n })()\n }\n
\n );\n }\n};\n\nexport default AssetDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetDisplay/view.jsx","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ErrorPage from 'pages/ErrorPage';\nimport AssetTitle from 'containers/AssetTitle';\nimport AssetDisplay from 'containers/AssetDisplay';\nimport AssetInfo from 'containers/AssetInfo';\n\nclass ShowAssetDetails extends React.Component {\n render () {\n const { asset } = this.props;\n if (asset) {\n const { claimData: { name } } = asset;\n return (\n
\n \n \n
\n
\n \n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowAssetDetails;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowAssetDetails/view.jsx","import React from 'react';\n\nconst AssetTitle = ({ title }) => {\n return (\n
\n {title}\n
\n );\n};\n\nexport default AssetTitle;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetTitle/view.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nclass AssetInfo extends React.Component {\n constructor (props) {\n super(props);\n this.copyToClipboard = this.copyToClipboard.bind(this);\n }\n copyToClipboard (event) {\n var elementToCopy = event.target.dataset.elementtocopy;\n var element = document.getElementById(elementToCopy);\n element.select();\n try {\n document.execCommand('copy');\n } catch (err) {\n this.setState({error: 'Oops, unable to copy'});\n }\n }\n render () {\n const { asset: { shortId, claimData : { channelName, certificateId, description, name, claimId, fileExt, contentType, thumbnail, host } } } = this.props;\n return (\n
\n {channelName &&\n
\n
\n Channel:\n
\n
\n {channelName}\n
\n
\n }\n\n {description &&\n
\n {description}\n
\n }\n\n
\n
\n
\n Share:\n
\n
\n \n twitter\n facebook\n tumblr\n reddit\n
\n
\n
\n
\n\n
\n \n );\n }\n};\n\nexport default AssetInfo;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/AssetInfo/view.jsx","import React from 'react';\nimport SEO from 'components/SEO';\nimport ErrorPage from 'pages/ErrorPage';\nimport NavBar from 'containers/NavBar';\nimport ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay';\n\nclass ShowChannel extends React.Component {\n render () {\n const { channel } = this.props;\n if (channel) {\n const { name, longId, shortId } = channel;\n return (\n
\n \n \n
\n
\n

channel name: {name}

\n

full channel id: {longId}

\n

short channel id: {shortId}

\n
\n
\n \n
\n
\n
\n );\n };\n return (\n \n );\n }\n};\n\nexport default ShowChannel;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ShowChannel/view.jsx","import React from 'react';\nimport AssetPreview from 'components/AssetPreview';\n\nclass ChannelClaimsDisplay extends React.Component {\n constructor (props) {\n super(props);\n this.showNextResultsPage = this.showNextResultsPage.bind(this);\n this.showPreviousResultsPage = this.showPreviousResultsPage.bind(this);\n }\n showPreviousResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const previousPage = parseInt(currentPage) - 1;\n this.showNewPage(previousPage);\n }\n showNextResultsPage () {\n const { channel: { claimsData: { currentPage } } } = this.props;\n const nextPage = parseInt(currentPage) + 1;\n this.showNewPage(nextPage);\n }\n showNewPage (page) {\n const { channelKey, channel: { name, longId } } = this.props;\n this.props.onUpdateChannelClaims(channelKey, name, longId, page);\n }\n render () {\n const { channel: { claimsData: { claims, currentPage, totalPages } } } = this.props;\n return (\n
\n {(claims.length > 0) ? (\n
\n {claims.map((claim, index) => )}\n
\n {(currentPage > 1) &&\n \n }\n {(currentPage < totalPages) &&\n \n }\n
\n
\n ) : (\n

There are no claims in this channel

\n )}\n
\n );\n }\n};\n\nexport default ChannelClaimsDisplay;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelClaimsDisplay/view.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\n\nconst AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail } }) => {\n const directSourceLink = `${claimId}/${name}.${fileExt}`;\n const showUrlLink = `/${claimId}/${name}`;\n return (\n
\n \n {(() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return (\n \n );\n case 'video/mp4':\n return (\n \n );\n default:\n return (\n

unsupported file type

\n );\n }\n })()}\n \n
\n );\n};\n\nexport default AssetPreview;\n\n\n\n// WEBPACK FOOTER //\n// ./client/components/AssetPreview/view.jsx","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport Helmet from 'react-helmet';\n\nclass FourOhForPage extends React.Component {\n render () {\n const {title, host} = this.props;\n return (\n
\n \n {title} - 404\n \n \n \n
\n

404

\n

That page does not exist

\n
\n
\n );\n }\n};\n\nexport default FourOhForPage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/FourOhFourPage/view.jsx","const { lstatSync, readdirSync } = require('fs');\nconst { join } = require('path');\n\nexport const getSubDirectoryNames = (root) => {\n return readdirSync(root)\n .filter(name => {\n const fullPath = join(root, name);\n return lstatSync(fullPath).isDirectory();\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./build/getFolderNames.js","import React from 'react';\nimport ChannelLoginForm from 'containers/ChannelLoginForm';\nimport ChannelCreateForm from 'containers/ChannelCreateForm';\nimport * as states from 'constants/publish_channel_select_states';\n\nclass ChannelSelect extends React.Component {\n constructor (props) {\n super(props);\n this.toggleAnonymousPublish = this.toggleAnonymousPublish.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n toggleAnonymousPublish (event) {\n const value = event.target.value;\n if (value === 'anonymous') {\n this.props.onPublishInChannelChange(false);\n } else {\n this.props.onPublishInChannelChange(true);\n }\n }\n handleSelection (event) {\n const selectedOption = event.target.selectedOptions[0].value;\n this.props.onChannelSelect(selectedOption);\n }\n render () {\n return (\n
\n
\n
\n \n \n
\n
\n \n \n
\n { this.props.channelError ? (\n

{this.props.channelError}

\n ) : (\n

Publish anonymously or in a channel

\n )}\n
\n { this.props.publishInChannel && (\n
\n
\n \n
\n \n
\n { (this.props.selectedChannel === states.LOGIN) && }\n { (this.props.selectedChannel === states.CREATE) && }\n
\n )}\n
\n );\n }\n}\n\nexport default ChannelSelect;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/ChannelSelect/view.jsx","import React from 'react';\nimport { validateFile } from 'utils/file';\nimport PublishPreview from 'components/PublishPreview';\n\nclass Dropzone extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n dragOver : false,\n mouseOver : false,\n dimPreview: false,\n };\n this.handleDrop = this.handleDrop.bind(this);\n this.handleDragOver = this.handleDragOver.bind(this);\n this.handleDragEnd = this.handleDragEnd.bind(this);\n this.handleDragEnter = this.handleDragEnter.bind(this);\n this.handleDragLeave = this.handleDragLeave.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n this.handleClick = this.handleClick.bind(this);\n this.handleFileInput = this.handleFileInput.bind(this);\n this.chooseFile = this.chooseFile.bind(this);\n }\n handleDrop (event) {\n event.preventDefault();\n this.setState({dragOver: false});\n // if dropped items aren't files, reject them\n const dt = event.dataTransfer;\n if (dt.items) {\n if (dt.items[0].kind === 'file') {\n const droppedFile = dt.items[0].getAsFile();\n this.chooseFile(droppedFile);\n }\n }\n }\n handleDragOver (event) {\n event.preventDefault();\n }\n handleDragEnd (event) {\n var dt = event.dataTransfer;\n if (dt.items) {\n for (var i = 0; i < dt.items.length; i++) {\n dt.items.remove(i);\n }\n } else {\n event.dataTransfer.clearData();\n }\n }\n handleDragEnter () {\n this.setState({dragOver: true, dimPreview: true});\n }\n handleDragLeave () {\n this.setState({dragOver: false, dimPreview: false});\n }\n handleMouseEnter () {\n this.setState({mouseOver: true, dimPreview: true});\n }\n handleMouseLeave () {\n this.setState({mouseOver: false, dimPreview: false});\n }\n handleClick (event) {\n event.preventDefault();\n document.getElementById('file_input').click();\n }\n handleFileInput (event) {\n event.preventDefault();\n const fileList = event.target.files;\n this.chooseFile(fileList[0]);\n }\n chooseFile (file) {\n if (file) {\n try {\n validateFile(file); // validate the file's name, type, and size\n } catch (error) {\n return this.props.setFileError(error.message);\n }\n // stage it so it will be ready when the publish button is clicked\n this.props.selectFile(file);\n }\n }\n render () {\n return (\n
\n
\n \n
\n
\n {this.props.file ? (\n
\n \n
\n { this.state.dragOver ? (\n
\n

Drop it.

\n
\n ) : (\n null\n )}\n { this.state.mouseOver ? (\n
\n

{this.props.fileError}

\n

Drag & drop image or video here to publish

\n

OR

\n

CHOOSE FILE

\n
\n ) : (\n null\n )}\n
\n
\n ) : (\n
\n { this.state.dragOver ? (\n
\n

Drop it.

\n
\n ) : (\n
\n

{this.props.fileError}

\n

Drag & drop image or video here to publish

\n

OR

\n

CHOOSE FILE

\n
\n )}\n
\n )}\n
\n
\n );\n }\n};\n\nexport default Dropzone;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/Dropzone/view.jsx","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport Dropzone from 'containers/Dropzone';\nimport PublishTitleInput from 'containers/PublishTitleInput';\nimport PublishUrlInput from 'containers/PublishUrlInput';\nimport PublishThumbnailInput from 'containers/PublishThumbnailInput';\nimport PublishMetadataInputs from 'containers/PublishMetadataInputs';\nimport ChannelSelect from 'containers/ChannelSelect';\n\nclass PublishDetails extends React.Component {\n constructor (props) {\n super(props)\n this.onPublishSubmit = this.onPublishSubmit.bind(this);\n }\n onPublishSubmit () {\n this.props.startPublish(this.props.history);\n }\n render () {\n return (\n
\n
\n \n
\n {/* left column */}\n
\n
\n \n
\n
\n {/* right column */}\n
\n
\n
\n \n
\n
\n \n
\n { (this.props.file.type === 'video/mp4') && (\n
\n \n
\n )}\n
\n \n
\n
\n \n
\n
\n \n
\n
\n

By clicking 'Publish', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. Read more.

\n
\n
\n
\n
\n );\n }\n};\n\nexport default withRouter(PublishDetails);\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishDetails/view.jsx","import React from 'react';\n\nclass PublishTitleInput extends React.Component {\n constructor (props) {\n super(props);\n this.handleInput = this.handleInput.bind(this);\n }\n handleInput (e) {\n const name = e.target.name;\n const value = e.target.value;\n this.props.onMetadataChange(name, value);\n }\n render () {\n return (\n \n );\n }\n}\n\nexport default PublishTitleInput;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishTitleInput/view.jsx","import React from 'react';\nimport request from 'utils/request';\nimport UrlMiddle from 'components/PublishUrlMiddleDisplay';\n\nclass PublishUrlInput extends React.Component {\n constructor (props) {\n super(props);\n this.handleInput = this.handleInput.bind(this);\n }\n componentDidMount () {\n const { claim, fileName } = this.props;\n if (!claim) {\n this.setClaimName(fileName);\n }\n }\n componentWillReceiveProps ({ claim, fileName }) {\n // if a new file was chosen, update the claim name\n if (fileName !== this.props.fileName) {\n return this.setClaimName(fileName);\n }\n // if the claim has updated, check its availability\n if (claim !== this.props.claim) {\n this.validateClaim(claim);\n }\n }\n handleInput (event) {\n let value = event.target.value;\n value = this.cleanseInput(value);\n // update the state\n this.props.onClaimChange(value);\n }\n cleanseInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n setClaimName (fileName) {\n const fileNameWithoutEnding = fileName.substring(0, fileName.lastIndexOf('.'));\n const cleanClaimName = this.cleanseInput(fileNameWithoutEnding);\n this.props.onClaimChange(cleanClaimName);\n }\n validateClaim (claim) {\n if (!claim) {\n return this.props.onUrlError('Enter a url above');\n }\n request(`/api/claim/availability/${claim}`)\n .then(() => {\n this.props.onUrlError(null);\n })\n .catch((error) => {\n this.props.onUrlError(error.message);\n });\n }\n render () {\n const { claim, loggedInChannelName, loggedInChannelShortId, publishInChannel, selectedChannel, urlError } = this.props;\n return (\n
\n
\n spee.ch / \n \n \n { (claim && !urlError) && {'\\u2713'} }\n { urlError && {'\\u2716'} }\n
\n
\n { urlError ? (\n

{urlError}

\n ) : (\n

Choose a custom url

\n )}\n
\n
\n );\n }\n}\n\nexport default PublishUrlInput;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishUrlInput/view.jsx","import React from 'react';\n\nfunction dataURItoBlob(dataURI) {\n // convert base64/URLEncoded data component to raw binary data held in a string\n let byteString = atob(dataURI.split(',')[1]);\n // separate out the mime component\n let mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n // write the bytes of the string to a typed array\n let ia = new Uint8Array(byteString.length);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n return new Blob([ia], {type: mimeString});\n}\n\nclass PublishThumbnailInput extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n videoSource : null,\n error : null,\n sliderMinRange: 1,\n sliderMaxRange: null,\n sliderValue : null,\n };\n this.handleVideoLoadedData = this.handleVideoLoadedData.bind(this);\n this.handleSliderChange = this.handleSliderChange.bind(this);\n this.createThumbnail = this.createThumbnail.bind(this);\n }\n componentDidMount () {\n const { file } = this.props;\n this.setVideoSource(file);\n }\n componentWillReceiveProps (nextProps) {\n // if file changes\n if (nextProps.file && nextProps.file !== this.props.file) {\n const { file } = nextProps;\n this.setVideoSource(file);\n };\n }\n setVideoSource (file) {\n const previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = () => {\n const dataUri = previewReader.result;\n const blob = dataURItoBlob(dataUri);\n const videoSource = URL.createObjectURL(blob);\n this.setState({ videoSource });\n };\n }\n handleVideoLoadedData (event) {\n const duration = event.target.duration;\n const totalMinutes = Math.floor(duration / 60);\n const totalSeconds = Math.floor(duration % 60);\n // set the slider\n this.setState({\n sliderMaxRange: duration * 100,\n sliderValue : duration * 100 / 2,\n totalMinutes,\n totalSeconds,\n });\n // update the current time of the video\n let video = document.getElementById('video-thumb-player');\n video.currentTime = duration / 2;\n }\n handleSliderChange (event) {\n const value = parseInt(event.target.value);\n // update the slider value\n this.setState({\n sliderValue: value,\n });\n // update the current time of the video\n let video = document.getElementById('video-thumb-player');\n video.currentTime = value / 100;\n }\n createThumbnail () {\n // take a snapshot\n let video = document.getElementById('video-thumb-player');\n let canvas = document.createElement('canvas');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);\n const dataUrl = canvas.toDataURL();\n const blob = dataURItoBlob(dataUrl);\n const snapshot = new File([blob], `thumbnail.png`, {\n type: 'image/png',\n });\n // set the thumbnail in redux store\n if (snapshot) {\n this.props.onNewThumbnail(snapshot);\n }\n }\n render () {\n const { error, videoSource, sliderMinRange, sliderMaxRange, sliderValue, totalMinutes, totalSeconds } = this.state;\n return (\n
\n \n \n {\n sliderValue ? (\n
\n
\n 0'00\"\n {totalMinutes}'{totalSeconds}\"\n
\n
\n \n
\n
\n ) : (\n

loading...

\n )\n }\n { error ? (\n

{error}

\n ) : (\n

Use slider to set thumbnail

\n )}\n
\n );\n }\n}\n\nexport default PublishThumbnailInput;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishThumbnailInput/view.jsx","import React from 'react';\nimport ExpandingTextArea from 'components/ExpandingTextArea';\n\nclass PublishMetadataInputs extends React.Component {\n constructor (props) {\n super(props);\n this.toggleShowInputs = this.toggleShowInputs.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.handleSelect = this.handleSelect.bind(this);\n }\n toggleShowInputs () {\n this.props.onToggleMetadataInputs(!this.props.showMetadataInputs);\n }\n handleInput (event) {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.props.onMetadataChange(name, value);\n }\n handleSelect (event) {\n const name = event.target.name;\n const selectedOption = event.target.selectedOptions[0].value;\n this.props.onMetadataChange(name, selectedOption);\n }\n render () {\n return (\n
\n {this.props.showMetadataInputs && (\n
\n
\n
\n \n
\n \n
\n
\n\n
\n
\n \n
\n \n
\n
\n\n
\n
\n \n
\n \n
\n
\n
\n )}\n \n
\n );\n }\n}\n\nexport default PublishMetadataInputs;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishMetadataInputs/view.jsx","import React from 'react';\n\nclass PublishDisabledMessage extends React.Component {\n render () {\n const message = this.props.message;\n console.log('this.props.message:', message);\n return (\n
\n

Publishing is currently disabled.

\n

{message}

\n
\n );\n }\n}\n\nexport default PublishDisabledMessage;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishDisabledMessage/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport * as publishStates from 'constants/publish_claim_states';\n\nclass PublishStatus extends React.Component {\n render () {\n const { status, message, clearFile } = this.props;\n return (\n
\n {status === publishStates.LOAD_START &&\n
\n

File is loading to server

\n

0%

\n
\n }\n {status === publishStates.LOADING &&\n
\n
\n

File is loading to server

\n

{message}

\n
\n
\n }\n {status === publishStates.PUBLISHING &&\n
\n

Upload complete. Your file is now being published on the blockchain...

\n \n

Curious what magic is happening here? Learn more.

\n
\n }\n {status === publishStates.SUCCESS &&\n
\n

Your publish is complete! You are being redirected to it now.

\n

If you are not automatically redirected, click here.

\n
\n }\n {status === publishStates.FAILED &&\n
\n

Something went wrong...

\n

{message}

\n

For help, post the above error text in the #speech channel on the lbry discord

\n \n
\n }\n
\n );\n }\n};\n\nexport default PublishStatus;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishStatus/view.jsx","import React from 'react';\nimport Dropzone from 'containers/Dropzone';\nimport PublishDetails from 'containers/PublishDetails';\nimport PublishStatus from 'containers/PublishStatus';\nimport PublishDisabledMessage from 'containers/PublishDisabledMessage';\n\nclass PublishTool extends React.Component {\n render () {\n if (this.props.disabled) {\n console.log('publish is disabled');\n return (\n \n );\n } else {\n console.log('publish is not disabled');\n if (this.props.file) {\n if (this.props.status) {\n return (\n \n );\n } else {\n return ;\n }\n }\n return ;\n }\n }\n};\n\nexport default PublishTool;\n\n\n\n// WEBPACK FOOTER //\n// ./client/containers/PublishTool/view.jsx","module.exports = require(\"passport\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport\"\n// module id = 91\n// module chunks = 0","function MysqlConfig () {\n this.database = 'default';\n this.username = 'default';\n this.password = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No MySQL config received.');\n }\n const {database, username, password} = config;\n this.database = database;\n this.username = username;\n this.password = password;\n };\n};\n\nmodule.exports = new MysqlConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/mysqlConfig.js","function SlackConfig () {\n this.slackWebHook = 'default';\n this.slackErrorChannel = 'default';\n this.slackInfoChannel = 'default';\n this.configure = (config) => {\n if (!config) {\n return console.log('No slack config received.');\n }\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = config;\n this.slackWebHook = slackWebHook;\n this.slackErrorChannel = slackErrorChannel;\n this.slackInfoChannel = slackInfoChannel;\n };\n};\n\nmodule.exports = new SlackConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/slackConfig.js","module.exports = require(\"passport-local\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport-local\"\n// module id = 94\n// module chunks = 0","module.exports = require(\"sequelize\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"sequelize\"\n// module id = 95\n// module chunks = 0","module.exports = {\n returnShortId: function (claimsArray, longId) {\n let claimIndex;\n let shortId = longId.substring(0, 1); // default short id is the first letter\n let shortIdLength = 0;\n // find the index of this claim id\n claimIndex = claimsArray.findIndex(element => {\n return element.claimId === longId;\n });\n if (claimIndex < 0) {\n throw new Error('claim id not found in claims list');\n }\n // get an array of all claims with lower height\n let possibleMatches = claimsArray.slice(0, claimIndex);\n // remove certificates with the same prefixes until none are left.\n while (possibleMatches.length > 0) {\n shortIdLength += 1;\n shortId = longId.substring(0, shortIdLength);\n possibleMatches = possibleMatches.filter(element => {\n return (element.claimId && (element.claimId.substring(0, shortIdLength) === shortId));\n });\n }\n return shortId;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/sequelizeHelpers.js","const logger = require('winston');\nconst fs = require('fs');\n\nconst { details, publishing } = require('../../config/siteConfig.js');\n\nmodule.exports = {\n parsePublishApiRequestBody ({name, nsfw, license, title, description, thumbnail}) {\n // validate name\n if (!name) {\n throw new Error('no name field found in request');\n }\n const invalidNameCharacters = /[^A-Za-z0-9,-]/.exec(name);\n if (invalidNameCharacters) {\n throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and \"-\"');\n }\n // optional parameters\n nsfw = (nsfw === 'true');\n license = license || null;\n title = title || null;\n description = description || null;\n thumbnail = thumbnail || null;\n // return results\n return {\n name,\n nsfw,\n license,\n title,\n description,\n thumbnail,\n };\n },\n parsePublishApiRequestFiles ({file, thumbnail}) {\n // make sure a file was provided\n if (!file) {\n throw new Error('no file with key of [file] found in request');\n }\n if (!file.path) {\n throw new Error('no file path found');\n }\n if (!file.type) {\n throw new Error('no file type found');\n }\n if (!file.size) {\n throw new Error('no file type found');\n }\n // validate the file name\n if (/'/.test(file.name)) {\n throw new Error('apostrophes are not allowed in the file name');\n }\n // validate the file\n module.exports.validateFileTypeAndSize(file);\n // return results\n return {\n fileName : file.name,\n filePath : file.path,\n fileType : file.type,\n thumbnailFileName: (thumbnail ? thumbnail.name : null),\n thumbnailFilePath: (thumbnail ? thumbnail.path : null),\n thumbnailFileType: (thumbnail ? thumbnail.type : null),\n };\n },\n validateFileTypeAndSize (file) {\n // check file type and size\n switch (file.type) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n if (file.size > 10000000) {\n logger.debug('publish > file validation > .jpeg/.jpg/.png was too big');\n throw new Error('Sorry, images are limited to 10 megabytes.');\n }\n break;\n case 'image/gif':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .gif was too big');\n throw new Error('Sorry, .gifs are limited to 50 megabytes.');\n }\n break;\n case 'video/mp4':\n if (file.size > 50000000) {\n logger.debug('publish > file validation > .mp4 was too big');\n throw new Error('Sorry, videos are limited to 50 megabytes.');\n }\n break;\n default:\n logger.debug('publish > file validation > unrecognized file type');\n throw new Error('The ' + file.type + ' content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.');\n }\n return file;\n },\n createBasicPublishParams (filePath, name, title, description, license, nsfw, thumbnail) {\n logger.debug(`Creating Publish Parameters`);\n // provide defaults for title\n if (title === null || title.trim() === '') {\n title = name;\n }\n // provide default for description\n if (description === null || description.trim() === '') {\n description = '';\n }\n // provide default for license\n if (license === null || license.trim() === '') {\n license = ' '; // default to empty string\n }\n // create the publish params\n const publishParams = {\n name,\n file_path: filePath,\n bid : 0.01,\n metadata : {\n description,\n title,\n author : details.title,\n language: 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n };\n // add thumbnail to channel if video\n if (thumbnail) {\n publishParams['metadata']['thumbnail'] = thumbnail;\n }\n return publishParams;\n },\n createThumbnailPublishParams (thumbnailFilePath, claimName, license, nsfw) {\n if (!thumbnailFilePath) {\n return;\n }\n logger.debug(`Creating Thumbnail Publish Parameters`);\n // create the publish params\n return {\n name : `${claimName}-thumb`,\n file_path: thumbnailFilePath,\n bid : 0.01,\n metadata : {\n title : `${claimName} thumbnail`,\n description: `a thumbnail for ${claimName}`,\n author : details.title,\n language : 'en',\n license,\n nsfw,\n },\n claim_address: publishing.primaryClaimAddress,\n channel_name : publishing.thumbnailChannel,\n channel_id : publishing.thumbnailChannelId,\n };\n },\n deleteTemporaryFile (filePath) {\n fs.unlink(filePath, err => {\n if (err) {\n logger.error(`error deleting temporary file ${filePath}`);\n throw err;\n }\n logger.debug(`successfully deleted ${filePath}`);\n });\n },\n addGetResultsToFileData (fileInfo, getResult) {\n fileInfo.fileName = getResult.file_name;\n fileInfo.filePath = getResult.download_path;\n return fileInfo;\n },\n createFileData ({ name, claimId, outpoint, height, address, nsfw, contentType }) {\n return {\n name,\n claimId,\n outpoint,\n height,\n address,\n fileName: '',\n filePath: '',\n fileType: contentType,\n nsfw,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/publishHelpers.js","module.exports = require(\"fs\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"fs\"\n// module id = 98\n// module chunks = 0","const logger = require('winston');\n\nmodule.exports = {\n handleErrorResponse: function (originalUrl, ip, error, res) {\n logger.error(`Error on ${originalUrl}`, module.exports.useObjectPropertiesIfNoKeys(error));\n const [status, message] = module.exports.returnErrorMessageAndStatus(error);\n res\n .status(status)\n .json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function (error) {\n let status, message;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function (err) {\n if (Object.keys(err).length === 0) {\n let newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach((key) => {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload (status, message) {\n return {\n status,\n success: false,\n message,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/errorHandlers.js","const db = require('../models/index');\nconst logger = require('winston');\nconst { returnPaginatedChannelClaims } = require('../helpers/channelPagination.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\nconst NO_FILE = 'NO_FILE';\n\nmodule.exports = {\n getClaimId (channelName, channelClaimId, name, claimId) {\n if (channelName) {\n return module.exports.getClaimIdByChannel(channelName, channelClaimId, name);\n } else {\n return module.exports.getClaimIdByClaim(name, claimId);\n }\n },\n getClaimIdByClaim (claimName, claimId) {\n logger.debug(`getClaimIdByClaim(${claimName}, ${claimId})`);\n return new Promise((resolve, reject) => {\n db.Claim.getLongClaimId(claimName, claimId)\n .then(longClaimId => {\n if (!longClaimId) {\n resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getClaimIdByChannel (channelName, channelClaimId, claimName) {\n logger.debug(`getClaimIdByChannel(${channelName}, ${channelClaimId}, ${claimName})`);\n return new Promise((resolve, reject) => {\n db.Certificate.getLongChannelId(channelName, channelClaimId) // 1. get the long channel id\n .then(longChannelId => {\n if (!longChannelId) {\n return [null, null];\n }\n return Promise.all([longChannelId, db.Claim.getClaimIdByLongChannelId(longChannelId, claimName)]); // 2. get the long claim id\n })\n .then(([longChannelId, longClaimId]) => {\n if (!longChannelId) {\n return resolve(NO_CHANNEL);\n }\n if (!longClaimId) {\n return resolve(NO_CLAIM);\n }\n resolve(longClaimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelData (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Certificate.getShortChannelIdFromLongChannelId(longChannelClaimId, channelName)]);\n })\n .then(([longChannelClaimId, shortChannelClaimId]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. return all the channel information\n resolve({\n channelName,\n longChannelClaimId,\n shortChannelClaimId,\n });\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getChannelClaims (channelName, channelClaimId, page) {\n return new Promise((resolve, reject) => {\n // 1. get the long channel Id (make sure channel exists)\n db.Certificate.getLongChannelId(channelName, channelClaimId)\n .then(longChannelClaimId => {\n if (!longChannelClaimId) {\n return [null, null, null];\n }\n // 2. get the short ID and all claims for that channel\n return Promise.all([longChannelClaimId, db.Claim.getAllChannelClaims(longChannelClaimId)]);\n })\n .then(([longChannelClaimId, channelClaimsArray]) => {\n if (!longChannelClaimId) {\n return resolve(NO_CHANNEL);\n }\n // 3. format the data for the view, including pagination\n let paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);\n // 4. return all the channel information and contents\n resolve(paginatedChannelViewData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n getLocalFileRecord (claimId, name) {\n return db.File.findOne({where: {claimId, name}})\n .then(file => {\n if (!file) {\n return NO_FILE;\n }\n return file.dataValues;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/serveController.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore } from 'redux';\nimport Reducer from 'client/reducers';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from 'client/components/GAListener/';\nimport App from 'client/app';\nimport renderFullPage from './renderFullPage.js';\nimport Helmet from 'react-helmet';\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create a new Redux store instance\n const store = createStore(Reducer);\n\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `` was rendered\n return res.redirect(301, context.url);\n } else {\n // we're good, send the response\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handlePageRender.jsx","module.exports = require(\"react-dom/server\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-dom/server\"\n// module id = 102\n// module chunks = 0","import { combineReducers } from 'redux';\nimport PublishReducer from 'reducers/publish';\nimport ChannelReducer from 'reducers/channel';\nimport ShowReducer from 'reducers/show';\nimport SiteReducer from 'reducers/site';\n\nexport default combineReducers({\n channel: ChannelReducer,\n publish: PublishReducer,\n show : ShowReducer,\n site : SiteReducer,\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/index.js","export const FILE_SELECTED = 'FILE_SELECTED';\nexport const FILE_CLEAR = 'FILE_CLEAR';\nexport const METADATA_UPDATE = 'METADATA_UPDATE';\nexport const CLAIM_UPDATE = 'CLAIM_UPDATE';\nexport const SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';\nexport const PUBLISH_STATUS_UPDATE = 'PUBLISH_STATUS_UPDATE';\nexport const ERROR_UPDATE = 'ERROR_UPDATE';\nexport const SELECTED_CHANNEL_UPDATE = 'SELECTED_CHANNEL_UPDATE';\nexport const TOGGLE_METADATA_INPUTS = 'TOGGLE_METADATA_INPUTS';\nexport const THUMBNAIL_NEW = 'THUMBNAIL_NEW';\nexport const PUBLISH_START = 'PUBLISH_START';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_action_types.js","export const LOGIN = 'Existing';\nexport const CREATE = 'New';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_channel_select_states.js","export const CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/channel_action_types.js","export const LOCAL_CHECK = 'LOCAL_CHECK';\nexport const UNAVAILABLE = 'UNAVAILABLE';\nexport const ERROR = 'ERROR';\nexport const AVAILABLE = 'AVAILABLE';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/asset_display_states.js","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport { dynamicImport } from 'utils/dynamicImport';\nimport AboutPage from 'pages/AboutPage';\nimport LoginPage from 'pages/LoginPage';\nimport ShowPage from 'pages/ShowPage';\nimport FourOhFourPage from 'containers/FourOhFourPage';\nconst HomePage = dynamicImport('pages/HomePage'); // or use the provided local homepage\n\nconst App = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default App;\n\n\n\n// WEBPACK FOOTER //\n// ./client/app.js","var map = {\n\t\"./canonicalLink\": 59,\n\t\"./canonicalLink.js\": 59,\n\t\"./dynamicImport\": 58,\n\t\"./dynamicImport.js\": 58,\n\t\"./file\": 60,\n\t\"./file.js\": 60,\n\t\"./lbryUri\": 61,\n\t\"./lbryUri.js\": 61,\n\t\"./metaTags\": 62,\n\t\"./metaTags.js\": 62,\n\t\"./pageTitle\": 63,\n\t\"./pageTitle.js\": 63,\n\t\"./publish\": 110,\n\t\"./publish.js\": 110,\n\t\"./request\": 8,\n\t\"./request.js\": 8,\n\t\"./validate\": 111,\n\t\"./validate.js\": 111\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 109;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/utils ^.*$\n// module id = 109\n// module chunks = 0","export const createPublishMetadata = (claim, { type }, { title, description, license, nsfw }, publishInChannel, selectedChannel) => {\n let metadata = {\n name: claim,\n title,\n description,\n license,\n nsfw,\n type,\n };\n if (publishInChannel) {\n metadata['channelName'] = selectedChannel;\n }\n return metadata;\n};\n\nexport const createPublishFormData = (file, thumbnail, metadata) => {\n let fd = new FormData();\n // append file\n fd.append('file', file);\n // append thumbnail\n if (thumbnail) {\n fd.append('thumbnail', thumbnail);\n }\n // append metadata\n for (let key in metadata) {\n if (metadata.hasOwnProperty(key)) {\n fd.append(key, metadata[key]);\n }\n }\n return fd;\n};\n\nexport const createThumbnailUrl = (channel, channelId, claim, host) => {\n return `${host}/${channel}:${channelId}/${claim}-thumb.png`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/publish.js","export const validateChannelSelection = (publishInChannel, selectedChannel, loggedInChannel) => {\n if (publishInChannel && (selectedChannel !== loggedInChannel.name)) {\n throw new Error('Log in to a channel or select Anonymous');\n }\n};\n\nexport const validatePublishParams = (file, claim, urlError) => {\n if (!file) {\n throw new Error('Please choose a file');\n }\n if (!claim) {\n throw new Error('Please enter a URL');\n }\n if (urlError) {\n throw new Error('Fix the url');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/utils/validate.js","export const CHANNEL = 'CHANNEL';\nexport const ASSET_LITE = 'ASSET_LITE';\nexport const ASSET_DETAILS = 'ASSET_DETAILS';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/show_request_types.js","module.exports = (helmet, html, preloadedState) => {\n // take the html and preloadedState and return the full page\n return `\n \n \n \n \n \n \n \n ${helmet.title.toString()}\n ${helmet.meta.toString()}\n ${helmet.link.toString()}\n \n \n \n \n \n \n \n \n
\n
${html}
\n
\n \n \n \n \n `;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/renderFullPage.js","export const selectSiteState = (state) => {\n return state.site;\n};\n\nexport const selectSiteHost = (state) => {\n return state.site.host;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/selectors/site.js","module.exports = require(\"babel-polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-polyfill\"\n// module id = 116\n// module chunks = 0","module.exports = require(\"whatwg-fetch\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"whatwg-fetch\"\n// module id = 117\n// module chunks = 0","const Server = require('./server/server.js');\r\nconst Components = require('./client/components');\r\nconst Containers = require('./client/containers');\r\nconst Pages = require('./client/pages');\r\n\r\nconst exports = {\r\n Server,\r\n Components,\r\n Containers,\r\n Pages,\r\n};\r\n\r\nmodule.exports = exports;\r\n\n\n\n// WEBPACK FOOTER //\n// ./speech.js","// app dependencies\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst expressHandlebars = require('express-handlebars');\nconst Handlebars = require('handlebars');\nconst helmet = require('helmet');\nconst passport = require('passport');\nconst { serializeSpeechUser, deserializeSpeechUser } = require('./helpers/authHelpers.js');\nconst cookieSession = require('cookie-session');\nconst http = require('http');\n// logging dependencies\nconst logger = require('winston');\n\nfunction Server () {\n this.configureMysql = (mysqlConfig) => {\n require('../config/mysqlConfig.js').configure(mysqlConfig);\n };\n this.configureSite = (siteConfig) => {\n require('../config/siteConfig.js').configure(siteConfig);\n this.sessionKey = siteConfig.auth.sessionKey;\n this.PORT = siteConfig.details.port;\n };\n this.configureSlack = (slackConfig) => {\n require('../config/slackConfig.js').configure(slackConfig);\n };\n this.createApp = () => {\n // create an Express application\n const app = express();\n\n // trust the proxy to get ip address for us\n app.enable('trust proxy');\n\n // add middleware\n app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties\n app.use(express.static(`${__dirname}/public`)); // 'express.static' to serve static files from public directory\n app.use(bodyParser.json()); // 'body parser' for parsing application/json\n app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded\n app.use((req, res, next) => { // custom logging middleware to log all incoming http requests\n logger.verbose(`Request on ${req.originalUrl} from ${req.ip}`);\n next();\n });\n\n // configure passport\n passport.serializeUser(serializeSpeechUser);\n passport.deserializeUser(deserializeSpeechUser);\n const localSignupStrategy = require('./passport/local-signup.js');\n const localLoginStrategy = require('./passport/local-login.js');\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name : 'session',\n keys : [this.sessionKey],\n maxAge: 24 * 60 * 60 * 1000, // i.e. 24 hours\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n // configure handlebars & register it with express app\n const hbs = expressHandlebars.create({\n defaultLayout: 'embed',\n handlebars : Handlebars,\n });\n app.engine('handlebars', hbs.engine);\n app.set('view engine', 'handlebars');\n\n // set the routes on the app\n require('./routes/auth-routes.js')(app);\n require('./routes/api-routes.js')(app);\n require('./routes/page-routes.js')(app);\n require('./routes/asset-routes.js')(app);\n require('./routes/fallback-routes.js')(app);\n\n this.app = app;\n };\n this.initialize = () => {\n require('./helpers/configureLogger.js')(logger);\n require('./helpers/configureSlack.js')(logger);\n this.createApp();\n this.server = http.Server(this.app);\n };\n this.start = () => {\n const db = require('./models/index');\n // sync sequelize\n db.sequelize.sync()\n // start the server\n .then(() => {\n this.server.listen(this.PORT, () => {\n logger.info(`Server is listening on PORT ${this.PORT}`);\n });\n })\n .catch((error) => {\n logger.error(`Startup Error:`, error);\n });\n };\n};\n\nmodule.exports = Server;\n\n\n\n// WEBPACK FOOTER //\n// ./server/server.js","module.exports = require(\"express\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express\"\n// module id = 120\n// module chunks = 0","module.exports = require(\"body-parser\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"body-parser\"\n// module id = 121\n// module chunks = 0","module.exports = require(\"express-handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express-handlebars\"\n// module id = 122\n// module chunks = 0","module.exports = require(\"handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"handlebars\"\n// module id = 123\n// module chunks = 0","module.exports = require(\"helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"helmet\"\n// module id = 124\n// module chunks = 0","const logger = require('winston');\n\nmodule.exports = {\n serializeSpeechUser (user, done) { // returns user data to be serialized into session\n logger.debug('serializing user');\n done(null, user);\n },\n deserializeSpeechUser (user, done) { // deserializes session and populates additional info to req.user\n logger.debug('deserializing user');\n done(null, user);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/authHelpers.js","module.exports = require(\"cookie-session\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cookie-session\"\n// module id = 126\n// module chunks = 0","module.exports = require(\"http\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"http\"\n// module id = 127\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst lbryApi = require('../helpers/lbryApi.js');\nconst logger = require('winston');\nconst db = require('../models');\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`);\n let userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel(`@${username}`)\n .then(tx => {\n // create user record\n const userData = {\n userName: username,\n password: password,\n };\n logger.verbose('userData >', userData);\n // create user record\n const channelData = {\n channelName : `@${username}`,\n channelClaimId: tx.claim_id,\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n const certificateData = {\n claimId: tx.claim_id,\n name : `@${username}`,\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n })\n .then(([newUser, newChannel, newCertificate]) => {\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n })\n .then(() => {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n })\n .catch(error => {\n logger.error('signup error', error);\n return done(error);\n });\n }\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-signup.js","module.exports = require(\"axios\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"axios\"\n// module id = 129\n// module chunks = 0","const lbryConfig = {\n api: {\n apiHost: 'localhost',\n apiPort: '5279',\n },\n};\n\nmodule.exports = lbryConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/lbryConfig.js","module.exports = require(\"universal-analytics\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"universal-analytics\"\n// module id = 131\n// module chunks = 0","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Certificate = sequelize.define(\n 'Certificate',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateVersion: {\n type : STRING,\n default: null,\n },\n keyType: {\n type : STRING,\n default: null,\n },\n publicKey: {\n type : TEXT('long'),\n default: null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Certificate.associate = db => {\n Certificate.belongsTo(db.Channel, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Certificate.getShortChannelIdFromLongChannelId = function (longChannelId, channelName) {\n logger.debug(`getShortChannelIdFromLongChannelId ${channelName}:${longChannelId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {name: channelName},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No channel(s) found with that channel name');\n default:\n return resolve(returnShortId(result, longChannelId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromShortChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelIdFromShortChannelId(${channelName}, ${channelClaimId})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name : channelName,\n claimId: {\n $like: `${channelClaimId}%`,\n },\n },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelIdFromChannelName = function (channelName) {\n logger.debug(`getLongChannelIdFromChannelName(${channelName})`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: channelName },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.validateLongChannelId = function (name, claimId) {\n logger.debug(`validateLongChannelId(${name}, ${claimId})`);\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Certificate.getLongChannelId = function (channelName, channelClaimId) {\n logger.debug(`getLongChannelId(${channelName}, ${channelClaimId})`);\n if (channelClaimId && (channelClaimId.length === 40)) { // if a full channel id is provided\n return this.validateLongChannelId(channelName, channelClaimId);\n } else if (channelClaimId && channelClaimId.length < 40) { // if a short channel id is provided\n return this.getLongChannelIdFromShortChannelId(channelName, channelClaimId);\n } else {\n return this.getLongChannelIdFromChannelName(channelName); // if no channel id provided\n }\n };\n\n return Certificate;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/certificate.js","module.exports = (sequelize, { STRING }) => {\n const Channel = sequelize.define(\n 'Channel',\n {\n channelName: {\n type : STRING,\n allowNull: false,\n },\n channelClaimId: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Channel.associate = db => {\n Channel.belongsTo(db.User);\n Channel.hasOne(db.Certificate);\n };\n\n return Channel;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/channel.js","const logger = require('winston');\nconst { returnShortId } = require('../helpers/sequelizeHelpers.js');\nconst { assetDefaults: { thumbnail: defaultThumbnail }, details: { host } } = require('../../config/siteConfig.js');\n\nfunction determineFileExtensionFromContentType (contentType) {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n return 'jpeg';\n case 'image/png':\n return 'png';\n case 'image/gif':\n return 'gif';\n case 'video/mp4':\n return 'mp4';\n default:\n logger.debug('setting unknown file type as file extension jpeg');\n return 'jpeg';\n }\n};\n\nfunction determineThumbnail (storedThumbnail, defaultThumbnail) {\n if (storedThumbnail === '') {\n return defaultThumbnail;\n }\n return storedThumbnail;\n};\n\nfunction prepareClaimData (claim) {\n // logger.debug('preparing claim data based on resolved data:', claim);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['host'] = host;\n return claim;\n};\n\nmodule.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {\n const Claim = sequelize.define(\n 'Claim',\n {\n address: {\n type : STRING,\n default: null,\n },\n amount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n claimId: {\n type : STRING,\n default: null,\n },\n claimSequence: {\n type : INTEGER,\n default: null,\n },\n decodedClaim: {\n type : BOOLEAN,\n default: null,\n },\n depth: {\n type : INTEGER,\n default: null,\n },\n effectiveAmount: {\n type : DECIMAL(19, 8),\n default: null,\n },\n hasSignature: {\n type : BOOLEAN,\n default: null,\n },\n height: {\n type : INTEGER,\n default: null,\n },\n hex: {\n type : TEXT('long'),\n default: null,\n },\n name: {\n type : STRING,\n default: null,\n },\n nout: {\n type : INTEGER,\n default: null,\n },\n txid: {\n type : STRING,\n default: null,\n },\n validAtHeight: {\n type : INTEGER,\n default: null,\n },\n outpoint: {\n type : STRING,\n default: null,\n },\n claimType: {\n type : STRING,\n default: null,\n },\n certificateId: {\n type : STRING,\n default: null,\n },\n author: {\n type : STRING,\n default: null,\n },\n description: {\n type : TEXT('long'),\n default: null,\n },\n language: {\n type : STRING,\n default: null,\n },\n license: {\n type : STRING,\n default: null,\n },\n licenseUrl: {\n type : STRING,\n default: null,\n },\n nsfw: {\n type : BOOLEAN,\n default: null,\n },\n preview: {\n type : STRING,\n default: null,\n },\n thumbnail: {\n type : STRING,\n default: null,\n },\n title: {\n type : STRING,\n default: null,\n },\n metadataVersion: {\n type : STRING,\n default: null,\n },\n contentType: {\n type : STRING,\n default: null,\n },\n source: {\n type : STRING,\n default: null,\n },\n sourceType: {\n type : STRING,\n default: null,\n },\n sourceVersion: {\n type : STRING,\n default: null,\n },\n streamVersion: {\n type : STRING,\n default: null,\n },\n valueVersion: {\n type : STRING,\n default: null,\n },\n channelName: {\n type : STRING,\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Claim.associate = db => {\n Claim.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n Claim.getShortClaimIdFromLongClaimId = function (claimId, claimName) {\n logger.debug(`Claim.getShortClaimIdFromLongClaimId for ${claimName}#${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName },\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n throw new Error('No claim(s) found with that claim name');\n default:\n resolve(returnShortId(result, claimId));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getAllChannelClaims = function (channelClaimId) {\n logger.debug(`Claim.getAllChannelClaims for ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { certificateId: channelClaimId },\n order: [['height', 'ASC']],\n raw : true, // returns an array of only data, not an array of instances\n })\n .then(channelClaimsArray => {\n // logger.debug('channelclaimsarray length:', channelClaimsArray.length);\n switch (channelClaimsArray.length) {\n case 0:\n return resolve(null);\n default:\n channelClaimsArray.forEach(claim => {\n claim['fileExt'] = determineFileExtensionFromContentType(claim.contentType);\n claim['thumbnail'] = determineThumbnail(claim.thumbnail, defaultThumbnail);\n return claim;\n });\n return resolve(channelClaimsArray);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getClaimIdByLongChannelId = function (channelClaimId, claimName) {\n logger.debug(`finding claim id for claim ${claimName} from channel ${channelClaimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name: claimName, certificateId: channelClaimId },\n order: [['id', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(result[0].claimId);\n default:\n logger.error(`${result.length} records found for \"${claimName}\" in channel \"${channelClaimId}\"`);\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimIdFromShortClaimId = function (name, shortId) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: {\n name,\n claimId: {\n $like: `${shortId}%`,\n }},\n order: [['height', 'ASC']],\n })\n .then(result => {\n switch (result.length) {\n case 0:\n return resolve(null);\n default: // note results must be sorted\n return resolve(result[0].claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getTopFreeClaimIdByClaimName = function (name) {\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name },\n order: [['effectiveAmount', 'DESC'], ['height', 'ASC']], // note: maybe height and effective amount need to switch?\n })\n .then(result => {\n logger.debug('length of result', result.length);\n switch (result.length) {\n case 0:\n return resolve(null);\n default:\n return resolve(result[0].dataValues.claimId);\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.validateLongClaimId = function (name, claimId) {\n return new Promise((resolve, reject) => {\n this.findOne({\n where: {name, claimId},\n })\n .then(result => {\n if (!result) {\n return resolve(null);\n };\n resolve(claimId);\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n Claim.getLongClaimId = function (claimName, claimId) {\n logger.debug(`getLongClaimId(${claimName}, ${claimId})`);\n if (claimId && (claimId.length === 40)) { // if a full claim id is provided\n return this.validateLongClaimId(claimName, claimId);\n } else if (claimId && claimId.length < 40) {\n return this.getLongClaimIdFromShortClaimId(claimName, claimId); // if a short claim id is provided\n } else {\n return this.getTopFreeClaimIdByClaimName(claimName); // if no claim id is provided\n }\n };\n\n Claim.resolveClaim = function (name, claimId) {\n logger.debug(`Claim.resolveClaim: ${name} ${claimId}`);\n return new Promise((resolve, reject) => {\n this\n .findAll({\n where: { name, claimId },\n })\n .then(claimArray => {\n switch (claimArray.length) {\n case 0:\n return resolve(null);\n case 1:\n return resolve(prepareClaimData(claimArray[0].dataValues));\n default:\n logger.error(`more than one record matches ${name}#${claimId} in db.Claim`);\n return resolve(prepareClaimData(claimArray[0].dataValues));\n }\n })\n .catch(error => {\n reject(error);\n });\n });\n };\n\n return Claim;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/claim.js","module.exports = (sequelize, { STRING, BOOLEAN, INTEGER }) => {\n const File = sequelize.define(\n 'File',\n {\n name: {\n type : STRING,\n allowNull: false,\n },\n claimId: {\n type : STRING,\n allowNull: false,\n },\n address: {\n type : STRING,\n allowNull: false,\n },\n outpoint: {\n type : STRING,\n allowNull: false,\n },\n height: {\n type : INTEGER,\n allowNull: false,\n default : 0,\n },\n fileName: {\n type : STRING,\n allowNull: false,\n },\n filePath: {\n type : STRING,\n allowNull: false,\n },\n fileType: {\n type: STRING,\n },\n nsfw: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: false,\n },\n trendingEligible: {\n type : BOOLEAN,\n allowNull : false,\n defaultValue: true,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n File.associate = db => {\n File.hasMany(db.Request);\n File.hasOne(db.Claim);\n };\n\n File.getRecentClaims = function () {\n return this.findAll({\n where: { nsfw: false, trendingEligible: true },\n order: [['createdAt', 'DESC']],\n limit: 25,\n });\n };\n\n return File;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/file.js","module.exports = (sequelize, { STRING, BOOLEAN, TEXT }) => {\n const Request = sequelize.define(\n 'Request',\n {\n action: {\n type : STRING,\n allowNull: false,\n },\n url: {\n type : STRING,\n allowNull: false,\n },\n ipAddress: {\n type : STRING,\n allowNull: true,\n },\n result: {\n type : TEXT('long'),\n allowNull: true,\n default : null,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n Request.associate = db => {\n Request.belongsTo(db.File, {\n foreignKey: {\n allowNull: true,\n },\n });\n };\n\n return Request;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/request.js","'use strict';\nconst bcrypt = require('bcrypt');\nconst logger = require('winston');\n\nmodule.exports = (sequelize, { STRING }) => {\n const User = sequelize.define(\n 'User',\n {\n userName: {\n type : STRING,\n allowNull: false,\n },\n password: {\n type : STRING,\n allowNull: false,\n },\n },\n {\n freezeTableName: true,\n }\n );\n\n User.associate = db => {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n this\n .update({password: hash})\n .then(() => {\n resolve();\n })\n .catch(error => {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', (user, options) => {\n logger.debug('User.beforeCreate hook...');\n return new Promise((resolve, reject) => {\n // generate a salt string to use for hashing\n bcrypt.genSalt((saltError, salt) => {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, (hashError, hash) => {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/models/user.js","module.exports = require(\"bcrypt\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"bcrypt\"\n// module id = 138\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst logger = require('winston');\nconst db = require('../models/index');\n\nconst returnUserAndChannelInfo = (userInstance) => {\n return new Promise((resolve, reject) => {\n let userInfo = {};\n userInfo['id'] = userInstance.id;\n userInfo['userName'] = userInstance.userName;\n userInstance\n .getChannel()\n .then(({channelName, channelClaimId}) => {\n userInfo['channelName'] = channelName;\n userInfo['channelClaimId'] = channelClaimId;\n return db.Certificate.getShortChannelIdFromLongChannelId(channelClaimId, channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n resolve(userInfo);\n })\n .catch(error => {\n reject(error);\n });\n });\n};\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n return db.User\n .findOne({\n where: {userName: username},\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n return user.comparePassword(password)\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n return done(null, false, {message: 'Incorrect username or password'});\n }\n logger.debug('Password was a match, returning User');\n return returnUserAndChannelInfo(user)\n .then(userInfo => {\n return done(null, userInfo);\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return error;\n });\n })\n .catch(error => {\n return done(error);\n });\n },\n);\n\n\n\n// WEBPACK FOOTER //\n// ./server/passport/local-login.js","const logger = require('winston');\nconst passport = require('passport');\n\nmodule.exports = (app) => {\n // route for sign up\n app.post('/signup', passport.authenticate('local-signup'), (req, res) => {\n logger.verbose(`successful signup for ${req.user.channelName}`);\n res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n // route for log in\n app.post('/login', (req, res, next) => {\n passport.authenticate('local-login', (err, user, info) => {\n if (err) {\n return next(err);\n }\n if (!user) {\n return res.status(400).json({\n success: false,\n message: info.message,\n });\n }\n logger.debug('successful login');\n req.logIn(user, (err) => {\n if (err) {\n return next(err);\n }\n return res.status(200).json({\n success : true,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n });\n });\n })(req, res, next);\n });\n // route to log out\n app.get('/logout', (req, res) => {\n req.logout();\n res.status(200).json({success: true, message: 'you successfully logged out'});\n });\n // see if user is authenticated, and return credentials if so\n app.get('/user', (req, res) => {\n if (req.user) {\n res.status(200).json({success: true, data: req.user});\n } else {\n res.status(401).json({success: false, message: 'user is not logged in'});\n }\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/auth-routes.js","const logger = require('winston');\nconst multipart = require('connect-multiparty');\nconst { publishing: { uploadDirectory }, details: { host } } = require('../../config/siteConfig.js');\nconst multipartMiddleware = multipart({uploadDir: uploadDirectory});\nconst db = require('../models/index');\nconst { claimNameIsAvailable, checkChannelAvailability, publish } = require('../controllers/publishController.js');\nconst { getClaimList, resolveUri, getClaim } = require('../helpers/lbryApi.js');\nconst { addGetResultsToFileData, createBasicPublishParams, createThumbnailPublishParams, parsePublishApiRequestBody, parsePublishApiRequestFiles, createFileData } = require('../helpers/publishHelpers.js');\nconst errorHandlers = require('../helpers/errorHandlers.js');\nconst { sendGATimingEvent } = require('../helpers/googleAnalytics.js');\nconst { authenticateUser } = require('../auth/authentication.js');\nconst { getChannelData, getChannelClaims, getClaimId } = require('../controllers/serveController.js');\n\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nmodule.exports = (app) => {\n // route to check whether site has published to a channel\n app.get('/api/channel/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n checkChannelAvailability(name)\n .then(availableName => {\n res.status(200).json(availableName);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short channel id from long channel Id\n app.get('/api/channel/short-id/:longId/:name', ({ ip, originalUrl, params }, res) => {\n db.Certificate.getShortChannelIdFromLongChannelId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json(shortId);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/data/:channelName/:channelClaimId', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n getChannelData(channelName, channelClaimId, 0)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/channel/claims/:channelName/:channelClaimId/:page', ({ ip, originalUrl, body, params }, res) => {\n const channelName = params.channelName;\n let channelClaimId = params.channelClaimId;\n if (channelClaimId === 'none') channelClaimId = null;\n const page = params.page;\n getChannelClaims(channelName, channelClaimId, page)\n .then(data => {\n if (data === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel was found'});\n }\n res.status(200).json({success: true, data});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a claim_list request on the daemon\n app.get('/api/claim/list/:name', ({ ip, originalUrl, params }, res) => {\n getClaimList(params.name)\n .then(claimsList => {\n res.status(200).json(claimsList);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get an asset\n app.get('/api/claim/get/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n // resolve the claim\n db.Claim.resolveClaim(name, claimId)\n .then(resolveResult => {\n // make sure a claim actually exists at that uri\n if (!resolveResult) {\n throw new Error('No matching uri found in Claim table');\n }\n let fileData = createFileData(resolveResult);\n // get the claim\n return Promise.all([fileData, getClaim(`${name}#${claimId}`)]);\n })\n .then(([ fileData, getResult ]) => {\n fileData = addGetResultsToFileData(fileData, getResult);\n return Promise.all([db.upsert(db.File, fileData, {name, claimId}, 'File'), getResult]);\n })\n .then(([ fileRecord, {message, completed} ]) => {\n res.status(200).json({ success: true, message, completed });\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to check whether this site published to a claim\n app.get('/api/claim/availability/:name', ({ ip, originalUrl, params: { name } }, res) => {\n const gaStartTime = Date.now();\n claimNameIsAvailable(name)\n .then(result => {\n res.status(200).json(result);\n sendGATimingEvent('end-to-end', 'claim name availability', name, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a resolve request on the daemon\n app.get('/api/claim/resolve/:name/:claimId', ({ headers, ip, originalUrl, params }, res) => {\n resolveUri(`${params.name}#${params.claimId}`)\n .then(resolvedUri => {\n res.status(200).json(resolvedUri);\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to run a publish request on the daemon\n app.post('/api/claim/publish', multipartMiddleware, ({ body, files, headers, ip, originalUrl, user }, res) => {\n // define variables\n let channelName, channelId, channelPassword, description, fileName, filePath, fileType, gaStartTime, license, name, nsfw, thumbnail, thumbnailFileName, thumbnailFilePath, thumbnailFileType, title;\n // record the start time of the request\n gaStartTime = Date.now();\n // validate the body and files of the request\n try {\n // validateApiPublishRequest(body, files);\n ({name, nsfw, license, title, description, thumbnail} = parsePublishApiRequestBody(body));\n ({fileName, filePath, fileType, thumbnailFileName, thumbnailFilePath, thumbnailFileType} = parsePublishApiRequestFiles(files));\n ({channelName, channelId, channelPassword} = body);\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // check channel authorization\n Promise.all([\n authenticateUser(channelName, channelId, channelPassword, user),\n claimNameIsAvailable(name),\n createBasicPublishParams(filePath, name, title, description, license, nsfw, thumbnail),\n createThumbnailPublishParams(thumbnailFilePath, name, license, nsfw),\n ])\n .then(([{channelName, channelClaimId}, validatedClaimName, publishParams, thumbnailPublishParams]) => {\n // add channel details to the publish params\n if (channelName && channelClaimId) {\n publishParams['channel_name'] = channelName;\n publishParams['channel_id'] = channelClaimId;\n }\n // publish the thumbnail\n if (thumbnailPublishParams) {\n publish(thumbnailPublishParams, thumbnailFileName, thumbnailFileType);\n }\n // publish the asset\n return publish(publishParams, fileName, fileType);\n })\n .then(result => {\n res.status(200).json({\n success: true,\n message: 'publish completed successfully',\n data : {\n name,\n claimId: result.claim_id,\n url : `${host}/${result.claim_id}/${name}`,\n lbryTx : result,\n },\n });\n // record the publish end time and send to google analytics\n sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to get a short claim id from long claim Id\n app.get('/api/claim/short-id/:longId/:name', ({ ip, originalUrl, body, params }, res) => {\n db.Claim.getShortClaimIdFromLongClaimId(params.longId, params.name)\n .then(shortId => {\n res.status(200).json({success: true, data: shortId});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.post('/api/claim/long-id', ({ ip, originalUrl, body, params }, res) => {\n logger.debug('body:', body);\n const channelName = body.channelName;\n const channelClaimId = body.channelClaimId;\n const claimName = body.claimName;\n const claimId = body.claimId;\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(result => {\n if (result === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'No matching channel could be found'});\n }\n if (result === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'No matching claim id could be found'});\n }\n res.status(200).json({success: true, data: result});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n app.get('/api/claim/data/:claimName/:claimId', ({ ip, originalUrl, body, params }, res) => {\n const claimName = params.claimName;\n let claimId = params.claimId;\n if (claimId === 'none') claimId = null;\n db.Claim.resolveClaim(claimName, claimId)\n .then(claimInfo => {\n if (!claimInfo) {\n return res.status(404).json({success: false, message: 'No claim could be found'});\n }\n res.status(200).json({success: true, data: claimInfo});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n // route to see if asset is available locally\n app.get('/api/file/availability/:name/:claimId', ({ ip, originalUrl, params }, res) => {\n const name = params.name;\n const claimId = params.claimId;\n db.File.findOne({where: {name, claimId}})\n .then(result => {\n if (result) {\n return res.status(200).json({success: true, data: true});\n }\n res.status(200).json({success: true, data: false});\n })\n .catch(error => {\n errorHandlers.handleErrorResponse(originalUrl, ip, error, res);\n });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/api-routes.js","module.exports = require(\"connect-multiparty\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"connect-multiparty\"\n// module id = 142\n// module chunks = 0","const logger = require('winston');\nconst db = require('../models/index');\nconst lbryApi = require('../helpers/lbryApi.js');\nconst publishHelpers = require('../helpers/publishHelpers.js');\nconst { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('../../config/siteConfig.js');\nconst Sequelize = require('sequelize');\nconst Op = Sequelize.Op;\n\nmodule.exports = {\n publish (publishParams, fileName, fileType) {\n return new Promise((resolve, reject) => {\n let publishResults, certificateId, channelName;\n // publish the file\n return lbryApi.publishClaim(publishParams)\n .then(tx => {\n logger.info(`Successfully published ${publishParams.name} ${fileName}`, tx);\n publishResults = tx;\n // get the channel information\n if (publishParams.channel_name) {\n logger.debug(`this claim was published in channel: ${publishParams.channel_name}`);\n return db.Channel.findOne({where: {channelName: publishParams.channel_name}});\n } else {\n logger.debug('this claim was not published in a channel');\n return null;\n }\n })\n .then(channel => {\n // set channel information\n certificateId = null;\n channelName = null;\n if (channel) {\n certificateId = channel.channelClaimId;\n channelName = channel.channelName;\n }\n logger.debug(`certificateId: ${certificateId}`);\n })\n .then(() => {\n // create the File record\n const fileRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n fileName,\n filePath : publishParams.file_path,\n fileType,\n nsfw : publishParams.metadata.nsfw,\n };\n // create the Claim record\n const claimRecord = {\n name : publishParams.name,\n claimId : publishResults.claim_id,\n title : publishParams.metadata.title,\n description: publishParams.metadata.description,\n address : publishParams.claim_address,\n thumbnail : publishParams.metadata.thumbnail,\n outpoint : `${publishResults.txid}:${publishResults.nout}`,\n height : 0,\n contentType: fileType,\n nsfw : publishParams.metadata.nsfw,\n amount : publishParams.bid,\n certificateId,\n channelName,\n };\n // upsert criteria\n const upsertCriteria = {\n name : publishParams.name,\n claimId: publishResults.claim_id,\n };\n // upsert the records\n return Promise.all([db.upsert(db.File, fileRecord, upsertCriteria, 'File'), db.upsert(db.Claim, claimRecord, upsertCriteria, 'Claim')]);\n })\n .then(([file, claim]) => {\n logger.debug('File and Claim records successfully created');\n return Promise.all([file.setClaim(claim), claim.setFile(file)]);\n })\n .then(() => {\n logger.debug('File and Claim records successfully associated');\n resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;\n })\n .catch(error => {\n logger.error('PUBLISH ERROR', error);\n publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file\n reject(error);\n });\n });\n },\n claimNameIsAvailable (name) {\n const claimAddresses = additionalClaimAddresses || [];\n claimAddresses.push(primaryClaimAddress);\n // find any records where the name is used\n return db.Claim\n .findAll({\n attributes: ['address'],\n where : {\n name,\n address: {\n [Op.or]: claimAddresses,\n },\n },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That claim is already in use');\n };\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n checkChannelAvailability (name) {\n return db.Channel\n .findAll({\n where: { channelName: name },\n })\n .then(result => {\n if (result.length >= 1) {\n throw new Error('That channel has already been claimed');\n }\n return name;\n })\n .catch(error => {\n throw error;\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/controllers/publishController.js","const db = require('../models');\nconst logger = require('winston');\n\nmodule.exports = {\n authenticateUser (channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName : null,\n channelClaimId: null,\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName : user.channelName,\n channelClaimId: user.channelClaimId,\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials (channelName, channelId, userPassword) {\n return new Promise((resolve, reject) => {\n // hoisted variables\n let channelData;\n // build the params for finding the channel\n let channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel\n .findOne({\n where: channelFindParams,\n })\n .then(channel => {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) },\n });\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n })\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/auth/authentication.js","const CLAIMS_PER_PAGE = 12;\n\nmodule.exports = {\n returnPaginatedChannelClaims (channelName, longChannelClaimId, claims, page) {\n const totalPages = module.exports.determineTotalPages(claims);\n const paginationPage = module.exports.getPageFromQuery(page);\n const viewData = {\n channelName : channelName,\n longChannelClaimId: longChannelClaimId,\n claims : module.exports.extractPageFromClaims(claims, paginationPage),\n previousPage : module.exports.determinePreviousPage(paginationPage),\n currentPage : paginationPage,\n nextPage : module.exports.determineNextPage(totalPages, paginationPage),\n totalPages : totalPages,\n totalResults : module.exports.determineTotalClaims(claims),\n };\n return viewData;\n },\n getPageFromQuery (page) {\n if (page) {\n return parseInt(page);\n }\n return 1;\n },\n extractPageFromClaims (claims, pageNumber) {\n if (!claims) {\n return []; // if no claims, return this default\n }\n // logger.debug('claims is array?', Array.isArray(claims));\n // logger.debug(`pageNumber ${pageNumber} is number?`, Number.isInteger(pageNumber));\n const claimStartIndex = (pageNumber - 1) * CLAIMS_PER_PAGE;\n const claimEndIndex = claimStartIndex + CLAIMS_PER_PAGE;\n const pageOfClaims = claims.slice(claimStartIndex, claimEndIndex);\n return pageOfClaims;\n },\n determineTotalPages (claims) {\n if (!claims) {\n return 0;\n } else {\n const totalClaims = claims.length;\n if (totalClaims < CLAIMS_PER_PAGE) {\n return 1;\n }\n const fullPages = Math.floor(totalClaims / CLAIMS_PER_PAGE);\n const remainder = totalClaims % CLAIMS_PER_PAGE;\n if (remainder === 0) {\n return fullPages;\n }\n return fullPages + 1;\n }\n },\n determinePreviousPage (currentPage) {\n if (currentPage === 1) {\n return null;\n }\n return currentPage - 1;\n },\n determineNextPage (totalPages, currentPage) {\n if (currentPage === totalPages) {\n return null;\n }\n return currentPage + 1;\n },\n determineTotalClaims (claims) {\n if (!claims) {\n return 0;\n }\n return claims.length;\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/channelPagination.js","const { details: host } = require('../../config/siteConfig.js');\nconst handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = (app) => {\n // route for the home page\n app.get('/', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display login page\n app.get('/login', (req, res) => {\n handlePageRender(req, res);\n });\n // route to show 'about' page\n app.get('/about', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/trending', (req, res) => {\n res.status(301).redirect('/popular');\n });\n app.get('/popular', (req, res) => {\n handlePageRender(req, res);\n });\n // route to display a list of the trending images\n app.get('/new', (req, res) => {\n handlePageRender(req, res);\n });\n // route to send embedable video player (for twitter)\n app.get('/embed/:claimId/:name', ({ params }, res) => {\n const claimId = params.claimId;\n const name = params.name;\n // get and render the content\n res.status(200).render('embed', { layout: 'embed', host, claimId, name });\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/page-routes.js","import * as actions from 'constants/publish_action_types';\nimport { LOGIN } from 'constants/publish_channel_select_states';\nconst { publishing } = require('../../config/siteConfig.js');\n\nconst initialState = {\n disabled : publishing.disabled,\n disabledMessage : publishing.disabledMessage,\n publishInChannel : false,\n selectedChannel : LOGIN,\n showMetadataInputs: false,\n status : {\n status : null,\n message: null,\n },\n error: {\n file : null,\n url : null,\n channel : null,\n publishSubmit: null,\n },\n file : null,\n claim : '',\n metadata: {\n title : '',\n description: '',\n license : '',\n nsfw : false,\n },\n thumbnail: null,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.FILE_SELECTED:\n return Object.assign({}, initialState, { // note: clears to initial state\n file: action.data,\n });\n case actions.FILE_CLEAR:\n return initialState;\n case actions.METADATA_UPDATE:\n return Object.assign({}, state, {\n metadata: Object.assign({}, state.metadata, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.CLAIM_UPDATE:\n return Object.assign({}, state, {\n claim: action.data,\n });\n case actions.SET_PUBLISH_IN_CHANNEL:\n return Object.assign({}, state, {\n publishInChannel: action.channel,\n });\n case actions.PUBLISH_STATUS_UPDATE:\n return Object.assign({}, state, {\n status: action.data,\n });\n case actions.ERROR_UPDATE:\n return Object.assign({}, state, {\n error: Object.assign({}, state.error, {\n [action.data.name]: action.data.value,\n }),\n });\n case actions.SELECTED_CHANNEL_UPDATE:\n return Object.assign({}, state, {\n selectedChannel: action.data,\n });\n case actions.TOGGLE_METADATA_INPUTS:\n return Object.assign({}, state, {\n showMetadataInputs: action.data,\n });\n case actions.THUMBNAIL_NEW:\n return Object.assign({}, state, {\n thumbnail: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/publish.js","import * as actions from 'constants/channel_action_types';\n\nconst initialState = {\n loggedInChannel: {\n name : null,\n shortId: null,\n longId : null,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/channel.js","import * as actions from 'constants/show_action_types';\nimport { LOCAL_CHECK, ERROR } from 'constants/asset_display_states';\n\nconst initialState = {\n request: {\n error: null,\n type : null,\n id : null,\n },\n requestList : {},\n channelList : {},\n assetList : {},\n displayAsset: {\n error : null,\n status: LOCAL_CHECK,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n // handle request\n case actions.REQUEST_ERROR:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n error: action.data,\n }),\n });\n case actions.REQUEST_UPDATE:\n return Object.assign({}, state, {\n request: Object.assign({}, state.request, {\n type: action.data.requestType,\n id : action.data.requestId,\n }),\n });\n // store requests\n case actions.REQUEST_LIST_ADD:\n return Object.assign({}, state, {\n requestList: Object.assign({}, state.requestList, {\n [action.data.id]: {\n error: action.data.error,\n key : action.data.key,\n },\n }),\n });\n // asset data\n case actions.ASSET_ADD:\n return Object.assign({}, state, {\n assetList: Object.assign({}, state.assetList, {\n [action.data.id]: {\n error : action.data.error,\n name : action.data.name,\n claimId : action.data.claimId,\n shortId : action.data.shortId,\n claimData: action.data.claimData,\n },\n }),\n });\n // channel data\n case actions.CHANNEL_ADD:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.id]: {\n name : action.data.name,\n longId : action.data.longId,\n shortId : action.data.shortId,\n claimsData: action.data.claimsData,\n },\n }),\n });\n case actions.CHANNEL_CLAIMS_UPDATE_SUCCESS:\n return Object.assign({}, state, {\n channelList: Object.assign({}, state.channelList, {\n [action.data.channelListId]: Object.assign({}, state.channelList[action.data.channelListId], {\n claimsData: action.data.claimsData,\n }),\n }),\n });\n // display an asset\n case actions.FILE_AVAILABILITY_UPDATE:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n status: action.data,\n }),\n });\n case actions.DISPLAY_ASSET_ERROR:\n return Object.assign({}, state, {\n displayAsset: Object.assign({}, state.displayAsset, {\n error : action.data,\n status: ERROR,\n }),\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/show.js","const siteConfig = require('../../config/siteConfig.js');\n\nconst {\n analytics: {\n googleId: googleAnalyticsId,\n },\n assetDefaults: {\n thumbnail: defaultThumbnail,\n description: defaultDescription,\n },\n details: {\n description,\n host,\n title,\n twitter,\n },\n} = siteConfig;\n\nconst initialState = {\n description,\n googleAnalyticsId,\n host,\n title,\n twitter,\n defaultDescription,\n defaultThumbnail,\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/reducers/site.js","module.exports = require(\"react-ga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-ga\"\n// module id = 151\n// module chunks = 0","module.exports = require(\"cross-fetch/polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cross-fetch/polyfill\"\n// module id = 152\n// module chunks = 0","const { sendGAServeEvent } = require('../helpers/googleAnalytics');\nconst { determineResponseType, flipClaimNameAndIdForBackwardsCompatibility, logRequestData, getClaimIdAndServeAsset } = require('../helpers/serveHelpers.js');\nconst lbryUri = require('../helpers/lbryUri.js');\nconst handleShowRender = require('../helpers/handleShowRender.jsx');\nconst SERVE = 'SERVE';\n\nmodule.exports = (app) => {\n // route to serve a specific asset using the channel or claim id\n app.get('/:identifier/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({ claimName } = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // parse the identifier\n let isChannel, channelName, channelClaimId, claimId;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(params.identifier));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n if (!isChannel) {\n [claimId, claimName] = flipClaimNameAndIdForBackwardsCompatibility(claimId, claimName);\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, channelName, claimId);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);\n });\n // route to serve the winning asset at a claim or a channel page\n app.get('/:claim', (req, res) => {\n const { headers, ip, originalUrl, params } = req;\n // decide if this is a show request\n let hasFileExtension;\n try {\n ({ hasFileExtension } = lbryUri.parseModifier(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n let responseType = determineResponseType(hasFileExtension, headers);\n if (responseType !== SERVE) {\n return handleShowRender(req, res);\n }\n // handle serve request\n // send google analytics\n sendGAServeEvent(headers, ip, originalUrl);\n // parse the claim\n let claimName;\n try {\n ({claimName} = lbryUri.parseClaim(params.claim));\n } catch (error) {\n return res.status(400).json({success: false, message: error.message});\n }\n // log the request data for debugging\n logRequestData(responseType, claimName, null, null);\n // get the claim Id and then serve the asset\n getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/asset-routes.js","const logger = require('winston');\nconst { getClaimId, getLocalFileRecord } = require('../controllers/serveController.js');\nconst { handleErrorResponse } = require('./errorHandlers.js');\n\nconst SERVE = 'SERVE';\nconst SHOW = 'SHOW';\nconst NO_FILE = 'NO_FILE';\nconst NO_CHANNEL = 'NO_CHANNEL';\nconst NO_CLAIM = 'NO_CLAIM';\n\nfunction clientAcceptsHtml ({accept}) {\n return accept && accept.match(/text\\/html/);\n};\n\nfunction requestIsFromBrowser (headers) {\n return headers['user-agent'] && headers['user-agent'].match(/Mozilla/);\n};\n\nfunction clientWantsAsset ({accept, range}) {\n const imageIsWanted = accept && accept.match(/image\\/.*/) && !accept.match(/text\\/html/) && !accept.match(/text\\/\\*/);\n const videoIsWanted = accept && range;\n return imageIsWanted || videoIsWanted;\n};\n\nfunction isValidClaimId (claimId) {\n return ((claimId.length === 40) && !/[^A-Za-z0-9]/g.test(claimId));\n};\n\nfunction isValidShortId (claimId) {\n return claimId.length === 1; // it should really evaluate the short url itself\n};\n\nfunction isValidShortIdOrClaimId (input) {\n return (isValidClaimId(input) || isValidShortId(input));\n};\n\nfunction serveAssetToClient (claimId, name, res) {\n return getLocalFileRecord(claimId, name)\n .then(fileRecord => {\n // check that a local record was found\n if (fileRecord === NO_FILE) {\n return res.status(307).redirect(`/api/claim/get/${name}/${claimId}`);\n }\n // serve the file\n const {filePath, fileType} = fileRecord;\n logger.verbose(`serving file: ${filePath}`);\n const sendFileOptions = {\n headers: {\n 'X-Content-Type-Options': 'nosniff',\n 'Content-Type' : fileType || 'image/jpeg',\n },\n };\n res.status(200).sendFile(filePath, sendFileOptions);\n })\n .catch(error => {\n throw error;\n });\n};\n\nmodule.exports = {\n getClaimIdAndServeAsset (channelName, channelClaimId, claimName, claimId, originalUrl, ip, res) {\n // get the claim Id and then serve the asset\n getClaimId(channelName, channelClaimId, claimName, claimId)\n .then(fullClaimId => {\n if (fullClaimId === NO_CLAIM) {\n return res.status(404).json({success: false, message: 'no claim id could be found'});\n } else if (fullClaimId === NO_CHANNEL) {\n return res.status(404).json({success: false, message: 'no channel id could be found'});\n }\n serveAssetToClient(fullClaimId, claimName, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'success');\n })\n .catch(error => {\n handleErrorResponse(originalUrl, ip, error, res);\n // postToStats(responseType, originalUrl, ip, claimName, fullClaimId, 'fail');\n });\n },\n determineResponseType (hasFileExtension, headers) {\n let responseType;\n if (hasFileExtension) {\n responseType = SERVE; // assume a serve request if file extension is present\n if (clientAcceptsHtml(headers)) { // if the request comes from a browser, change it to a show request\n responseType = SHOW;\n }\n } else {\n responseType = SHOW;\n if (clientWantsAsset(headers) && requestIsFromBrowser(headers)) { // this is in case someone embeds a show url\n logger.debug('Show request came from browser but wants an image/video. Changing response to serve...');\n responseType = SERVE;\n }\n }\n return responseType;\n },\n flipClaimNameAndIdForBackwardsCompatibility (identifier, name) {\n // this is a patch for backwards compatability with '/name/claim_id' url format\n if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {\n const tempName = name;\n name = identifier;\n identifier = tempName;\n }\n return [identifier, name];\n },\n logRequestData (responseType, claimName, channelName, claimId) {\n logger.debug('responseType ===', responseType);\n logger.debug('claim name === ', claimName);\n logger.debug('channel name ===', channelName);\n logger.debug('claim id ===', claimId);\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/serveHelpers.js","const logger = require('winston');\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM : /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS : /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR : '@',\n parseIdentifier : function (identifier) {\n logger.debug('parsing identifier:', identifier);\n const componentsRegex = new RegExp(\n '([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, value, modifierSeperator, modifier] = componentsRegex\n .exec(identifier)\n .map(match => match || null);\n logger.debug(`${proto}, ${value}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!value) {\n throw new Error(`Check your url. No channel name provided before \"${modifierSeperator}\"`);\n }\n const isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n const channelName = isChannel ? value : null;\n let claimId;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n const nameBadChars = (channelName).match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error(`Invalid characters in channel name: ${nameBadChars.join(', ')}.`);\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n let channelClaimId;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No modifier provided after separator \"${modifierSeperator}\"`);\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error(`The \"${modifierSeperator}\" modifier is not currently supported`);\n }\n }\n return {\n isChannel,\n channelName,\n channelClaimId,\n claimId,\n };\n },\n parseClaim: function (claim) {\n logger.debug('parsing name:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n const nameBadChars = (claimName).match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error(`Invalid characters in claim name: ${nameBadChars.join(', ')}.`);\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error(`No file extension provided after separator ${modifierSeperator}.`);\n }\n if (modifierSeperator !== '.') {\n throw new Error(`The ${modifierSeperator} modifier is not supported in the claim name`);\n }\n }\n // return results\n return {\n claimName,\n };\n },\n parseModifier: function (claim) {\n logger.debug('parsing modifier:', claim);\n const componentsRegex = new RegExp(\n '([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n const [proto, claimName, modifierSeperator, modifier] = componentsRegex\n .exec(claim)\n .map(match => match || null);\n logger.debug(`${proto}, ${claimName}, ${modifierSeperator}, ${modifier}`);\n // Validate and process modifier\n let hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension,\n };\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/lbryUri.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore, applyMiddleware } from 'redux';\nimport Reducer from '../../client/reducers/index';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../../client/components/GAListener/index';\nimport App from '../../client/app';\nimport renderFullPage from './renderFullPage';\nimport createSagaMiddleware from 'redux-saga';\nimport { call } from 'redux-saga/effects';\nimport { handleShowPageUri } from '../../client/sagas/show_uri';\nimport { onHandleShowPageUri } from '../../client/actions/show';\n\nimport Helmet from 'react-helmet';\n\nconst returnSagaWithParams = (saga, params) => {\n return function * () {\n yield call(saga, params);\n };\n};\n\nmodule.exports = (req, res) => {\n let context = {};\n\n // create and apply middleware\n const sagaMiddleware = createSagaMiddleware();\n const middleware = applyMiddleware(sagaMiddleware);\n\n // create a new Redux store instance\n const store = createStore(Reducer, middleware);\n\n // create saga\n const action = onHandleShowPageUri(req.params);\n const saga = returnSagaWithParams(handleShowPageUri, action);\n\n // run the saga middleware\n sagaMiddleware\n .run(saga)\n .done\n .then(() => {\n // render component to a string\n const html = renderToString(\n \n \n \n \n \n \n \n );\n\n // get head tags from helmet\n const helmet = Helmet.renderStatic();\n\n // check for a redirect\n if (context.url) {\n return res.redirect(301, context.url);\n }\n\n // get the initial state from our Redux store\n const preloadedState = store.getState();\n\n // send the rendered page back to the client\n res.send(renderFullPage(helmet, html, preloadedState));\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/handleShowRender.jsx","module.exports = require(\"redux-saga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga\"\n// module id = 157\n// module chunks = 0","import { call, put, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { onRequestError, onNewChannelRequest, onNewAssetRequest } from 'actions/show';\nimport { newAssetRequest } from 'sagas/show_asset';\nimport { newChannelRequest } from 'sagas/show_channel';\nimport lbryUri from 'utils/lbryUri';\n\nfunction * parseAndUpdateIdentifierAndClaim (modifier, claim) {\n // this is a request for an asset\n // claim will be an asset claim\n // the identifier could be a channel or a claim id\n let isChannel, channelName, channelClaimId, claimId, claimName, extension;\n try {\n ({ isChannel, channelName, channelClaimId, claimId } = lbryUri.parseIdentifier(modifier));\n ({ claimName, extension } = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n if (isChannel) {\n return yield call(newAssetRequest, onNewAssetRequest(claimName, null, channelName, channelClaimId, extension));\n };\n yield call(newAssetRequest, onNewAssetRequest(claimName, claimId, null, null, extension));\n}\nfunction * parseAndUpdateClaimOnly (claim) {\n // this could be a request for an asset or a channel page\n // claim could be an asset claim or a channel claim\n let isChannel, channelName, channelClaimId;\n try {\n ({ isChannel, channelName, channelClaimId } = lbryUri.parseIdentifier(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // trigger an new action to update the store\n // return early if this request is for a channel\n if (isChannel) {\n return yield call(newChannelRequest, onNewChannelRequest(channelName, channelClaimId));\n }\n // if not for a channel, parse the claim request\n let claimName, extension;\n try {\n ({claimName, extension} = lbryUri.parseClaim(claim));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield call(newAssetRequest, onNewAssetRequest(claimName, null, null, null, extension));\n}\n\nexport function * handleShowPageUri (action) {\n const { identifier, claim } = action.data;\n if (identifier) {\n return yield call(parseAndUpdateIdentifierAndClaim, identifier, claim);\n }\n yield call(parseAndUpdateClaimOnly, claim);\n};\n\nexport function * watchHandleShowPageUri () {\n yield takeLatest(actions.HANDLE_SHOW_URI, handleShowPageUri);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_uri.js","import { call, put, select, takeLatest } from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addRequestToRequestList, onRequestError, onRequestUpdate, addAssetToAssetList } from 'actions/show';\nimport { getLongClaimId, getShortId, getClaimData } from 'api/assetApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newAssetRequest (action) {\n const { requestType, requestId, name, modifier } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get long id && add request to request list\n let longId;\n try {\n ({data: longId} = yield call(getLongClaimId, host, name, modifier));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n const assetKey = `a#${name}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, assetKey));\n // is this an existing asset?\n // If this asset is in the asset list, it's already been fetched\n if (state.assetList[assetKey]) {\n return null;\n }\n // get short Id\n let shortId;\n try {\n ({data: shortId} = yield call(getShortId, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // get asset claim data\n let claimData;\n try {\n ({data: claimData} = yield call(getClaimData, host, name, longId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // add asset to asset list\n yield put(addAssetToAssetList(assetKey, null, name, longId, shortId, claimData));\n // clear any errors in request error\n yield put(onRequestError(null));\n};\n\nexport function * watchNewAssetRequest () {\n yield takeLatest(actions.ASSET_REQUEST_NEW, newAssetRequest);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_asset.js","import Request from 'utils/request';\n\nexport function getLongClaimId (host, name, modifier) {\n let body = {};\n // create request params\n if (modifier) {\n if (modifier.id) {\n body['claimId'] = modifier.id;\n } else {\n body['channelName'] = modifier.channel.name;\n body['channelClaimId'] = modifier.channel.id;\n }\n }\n body['claimName'] = name;\n const params = {\n method : 'POST',\n headers: { 'Content-Type': 'application/json' },\n body : JSON.stringify(body),\n };\n // create url\n const url = `${host}/api/claim/long-id`;\n // return the request promise\n return Request(url, params);\n};\n\nexport function getShortId (host, name, claimId) {\n const url = `${host}/api/claim/short-id/${claimId}/${name}`;\n return Request(url);\n};\n\nexport function getClaimData (host, name, claimId) {\n const url = `${host}/api/claim/data/${name}/${claimId}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/assetApi.js","import {call, put, select, takeLatest} from 'redux-saga/effects';\nimport * as actions from 'constants/show_action_types';\nimport { addNewChannelToChannelList, addRequestToRequestList, onRequestError, onRequestUpdate, updateChannelClaims } from 'actions/show';\nimport { getChannelClaims, getChannelData } from 'api/channelApi';\nimport { selectShowState } from 'selectors/show';\nimport { selectSiteHost } from 'selectors/site';\n\nexport function * newChannelRequest (action) {\n const { requestType, requestId, channelName, channelId } = action.data;\n // put an action to update the request in redux\n yield put(onRequestUpdate(requestType, requestId));\n // is this an existing request?\n // If this uri is in the request list, it's already been fetched\n const state = yield select(selectShowState);\n const host = yield select(selectSiteHost);\n if (state.requestList[requestId]) {\n return null;\n }\n // get channel long id\n let longId, shortId;\n try {\n ({ data: {longChannelClaimId: longId, shortChannelClaimId: shortId} } = yield call(getChannelData, host, channelName, channelId));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the request in the channel requests list\n const channelKey = `c#${channelName}#${longId}`;\n yield put(addRequestToRequestList(requestId, null, channelKey));\n // is this an existing channel?\n // If this channel is in the channel list, it's already been fetched\n if (state.channelList[channelKey]) {\n return null;\n }\n // get channel claims data\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, channelName, 1));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n // store the channel data in the channel list\n yield put(addNewChannelToChannelList(channelKey, channelName, shortId, longId, claimsData));\n // clear any request errors\n yield put(onRequestError(null));\n}\n\nexport function * watchNewChannelRequest () {\n yield takeLatest(actions.CHANNEL_REQUEST_NEW, newChannelRequest);\n};\n\nfunction * getNewClaimsAndUpdateChannel (action) {\n const { channelKey, name, longId, page } = action.data;\n const host = yield select(selectSiteHost);\n let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, host, longId, name, page));\n } catch (error) {\n return yield put(onRequestError(error.message));\n }\n yield put(updateChannelClaims(channelKey, claimsData));\n}\n\nexport function * watchUpdateChannelClaims () {\n yield takeLatest(actions.CHANNEL_CLAIMS_UPDATE_ASYNC, getNewClaimsAndUpdateChannel);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./client/sagas/show_channel.js","import Request from 'utils/request';\n\nexport function getChannelData (host, id, name) {\n if (!id) id = 'none';\n const url = `${host}/api/channel/data/${name}/${id}`;\n return Request(url);\n};\n\nexport function getChannelClaims (host, longId, name, page) {\n if (!page) page = 1;\n const url = `${host}/api/channel/claims/${name}/${longId}/${page}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/api/channelApi.js","const handlePageRender = require('../helpers/handlePageRender.jsx');\n\nmodule.exports = app => {\n // a catch-all route if someone visits a page that does not exist\n app.use('*', (req, res) => {\n // send response\n handlePageRender(req, res);\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/routes/fallback-routes.js","const { logLevel } = require('../../config/loggerConfig');\n\nmodule.exports = (winston) => {\n // configure\n winston.configure({\n transports: [\n new (winston.transports.Console)({\n level : logLevel,\n timestamp : false,\n colorize : true,\n prettyPrint : true,\n handleExceptions : true,\n humanReadableUnhandledException: true,\n }),\n ],\n });\n // test all the log levels\n winston.error('Level 0');\n winston.warn('Level 1');\n winston.info('Level 2');\n winston.verbose('Level 3');\n winston.debug('Level 4');\n winston.silly('Level 5');\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureLogger.js","const loggerConfig = {\n logLevel: 'debug', // options: silly, debug, verbose, info\n};\n\nmodule.exports = loggerConfig;\n\n\n\n// WEBPACK FOOTER //\n// ./config/loggerConfig.js","const winstonSlackWebHook = require('winston-slack-webhook').SlackWebHook;\nconst slackConfig = require('../../config/slackConfig.js');\n\nmodule.exports = (winston) => {\n const {slackWebHook, slackErrorChannel, slackInfoChannel} = slackConfig;\n if (slackWebHook) {\n // add a transport for errors to slack\n if (slackErrorChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-errors-transport',\n level : 'warn',\n webhookUrl: slackWebHook,\n channel : slackErrorChannel,\n username : 'spee.ch',\n iconEmoji : ':face_with_head_bandage:',\n });\n };\n if (slackInfoChannel) {\n winston.add(winstonSlackWebHook, {\n name : 'slack-info-transport',\n level : 'info',\n webhookUrl: slackWebHook,\n channel : slackInfoChannel,\n username : 'spee.ch',\n iconEmoji : ':nerd_face:',\n });\n };\n // send test message\n winston.error('Slack \"error\" logging is online.');\n winston.info('Slack \"info\" logging is online.');\n } else {\n winston.warn('Slack logging is not enabled because no slackWebHook config var provided.');\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./server/helpers/configureSlack.js","module.exports = require(\"winston-slack-webhook\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston-slack-webhook\"\n// module id = 167\n// module chunks = 0","var map = {\n\t\"./\": 50,\n\t\"./ActiveStatusBar\": 24,\n\t\"./ActiveStatusBar/\": 24,\n\t\"./ActiveStatusBar/index\": 24,\n\t\"./ActiveStatusBar/index.jsx\": 24,\n\t\"./AssetPreview\": 34,\n\t\"./AssetPreview/\": 34,\n\t\"./AssetPreview/index\": 34,\n\t\"./AssetPreview/index.js\": 34,\n\t\"./AssetPreview/view\": 78,\n\t\"./AssetPreview/view.jsx\": 78,\n\t\"./ExpandingTextArea\": 36,\n\t\"./ExpandingTextArea/\": 36,\n\t\"./ExpandingTextArea/index\": 36,\n\t\"./ExpandingTextArea/index.jsx\": 36,\n\t\"./GAListener\": 13,\n\t\"./GAListener/\": 13,\n\t\"./GAListener/index\": 13,\n\t\"./GAListener/index.jsx\": 13,\n\t\"./InactiveStatusBar\": 25,\n\t\"./InactiveStatusBar/\": 25,\n\t\"./InactiveStatusBar/index\": 25,\n\t\"./InactiveStatusBar/index.jsx\": 25,\n\t\"./Logo\": 21,\n\t\"./Logo/\": 21,\n\t\"./Logo/index\": 21,\n\t\"./Logo/index.jsx\": 21,\n\t\"./NavBarChannelOptionsDropdown\": 22,\n\t\"./NavBarChannelOptionsDropdown/\": 22,\n\t\"./NavBarChannelOptionsDropdown/index\": 22,\n\t\"./NavBarChannelOptionsDropdown/index.jsx\": 22,\n\t\"./ProgressBar\": 10,\n\t\"./ProgressBar/\": 10,\n\t\"./ProgressBar/index\": 10,\n\t\"./ProgressBar/index.jsx\": 10,\n\t\"./PublishPreview\": 37,\n\t\"./PublishPreview/\": 37,\n\t\"./PublishPreview/index\": 37,\n\t\"./PublishPreview/index.jsx\": 37,\n\t\"./PublishUrlMiddleDisplay\": 38,\n\t\"./PublishUrlMiddleDisplay/\": 38,\n\t\"./PublishUrlMiddleDisplay/index\": 38,\n\t\"./PublishUrlMiddleDisplay/index.jsx\": 38,\n\t\"./SEO\": 7,\n\t\"./SEO/\": 7,\n\t\"./SEO/index\": 7,\n\t\"./SEO/index.js\": 7,\n\t\"./SEO/view\": 66,\n\t\"./SEO/view.jsx\": 66,\n\t\"./index\": 50,\n\t\"./index.js\": 50\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 168;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/components ^\\.\\/.*$\n// module id = 168\n// module chunks = 0","var map = {\n\t\"./\": 52,\n\t\"./AssetDisplay\": 17,\n\t\"./AssetDisplay/\": 17,\n\t\"./AssetDisplay/index\": 17,\n\t\"./AssetDisplay/index.js\": 17,\n\t\"./AssetDisplay/view\": 72,\n\t\"./AssetDisplay/view.jsx\": 72,\n\t\"./AssetInfo\": 31,\n\t\"./AssetInfo/\": 31,\n\t\"./AssetInfo/index\": 31,\n\t\"./AssetInfo/index.js\": 31,\n\t\"./AssetInfo/view\": 75,\n\t\"./AssetInfo/view.jsx\": 75,\n\t\"./AssetTitle\": 30,\n\t\"./AssetTitle/\": 30,\n\t\"./AssetTitle/index\": 30,\n\t\"./AssetTitle/index.js\": 30,\n\t\"./AssetTitle/view\": 74,\n\t\"./AssetTitle/view.jsx\": 74,\n\t\"./ChannelClaimsDisplay\": 33,\n\t\"./ChannelClaimsDisplay/\": 33,\n\t\"./ChannelClaimsDisplay/index\": 33,\n\t\"./ChannelClaimsDisplay/index.js\": 33,\n\t\"./ChannelClaimsDisplay/view\": 77,\n\t\"./ChannelClaimsDisplay/view.jsx\": 77,\n\t\"./ChannelCreateForm\": 16,\n\t\"./ChannelCreateForm/\": 16,\n\t\"./ChannelCreateForm/index\": 16,\n\t\"./ChannelCreateForm/index.js\": 16,\n\t\"./ChannelCreateForm/view\": 69,\n\t\"./ChannelCreateForm/view.jsx\": 69,\n\t\"./ChannelLoginForm\": 15,\n\t\"./ChannelLoginForm/\": 15,\n\t\"./ChannelLoginForm/index\": 15,\n\t\"./ChannelLoginForm/index.js\": 15,\n\t\"./ChannelLoginForm/view\": 68,\n\t\"./ChannelLoginForm/view.jsx\": 68,\n\t\"./ChannelSelect\": 39,\n\t\"./ChannelSelect/\": 39,\n\t\"./ChannelSelect/index\": 39,\n\t\"./ChannelSelect/index.js\": 39,\n\t\"./ChannelSelect/view\": 81,\n\t\"./ChannelSelect/view.jsx\": 81,\n\t\"./Dropzone\": 18,\n\t\"./Dropzone/\": 18,\n\t\"./Dropzone/index\": 18,\n\t\"./Dropzone/index.js\": 18,\n\t\"./Dropzone/view\": 82,\n\t\"./Dropzone/view.jsx\": 82,\n\t\"./FourOhFourPage\": 35,\n\t\"./FourOhFourPage/\": 35,\n\t\"./FourOhFourPage/index\": 35,\n\t\"./FourOhFourPage/index.jsx\": 35,\n\t\"./FourOhFourPage/view\": 79,\n\t\"./FourOhFourPage/view.jsx\": 79,\n\t\"./NavBar\": 5,\n\t\"./NavBar/\": 5,\n\t\"./NavBar/index\": 5,\n\t\"./NavBar/index.js\": 5,\n\t\"./NavBar/view\": 65,\n\t\"./NavBar/view.jsx\": 65,\n\t\"./PublishDetails\": 40,\n\t\"./PublishDetails/\": 40,\n\t\"./PublishDetails/index\": 40,\n\t\"./PublishDetails/index.js\": 40,\n\t\"./PublishDetails/view\": 83,\n\t\"./PublishDetails/view.jsx\": 83,\n\t\"./PublishDisabledMessage\": 45,\n\t\"./PublishDisabledMessage/\": 45,\n\t\"./PublishDisabledMessage/index\": 45,\n\t\"./PublishDisabledMessage/index.js\": 45,\n\t\"./PublishDisabledMessage/view\": 88,\n\t\"./PublishDisabledMessage/view.jsx\": 88,\n\t\"./PublishMetadataInputs\": 44,\n\t\"./PublishMetadataInputs/\": 44,\n\t\"./PublishMetadataInputs/index\": 44,\n\t\"./PublishMetadataInputs/index.js\": 44,\n\t\"./PublishMetadataInputs/view\": 87,\n\t\"./PublishMetadataInputs/view.jsx\": 87,\n\t\"./PublishStatus\": 46,\n\t\"./PublishStatus/\": 46,\n\t\"./PublishStatus/index\": 46,\n\t\"./PublishStatus/index.js\": 46,\n\t\"./PublishStatus/view\": 89,\n\t\"./PublishStatus/view.jsx\": 89,\n\t\"./PublishThumbnailInput\": 43,\n\t\"./PublishThumbnailInput/\": 43,\n\t\"./PublishThumbnailInput/index\": 43,\n\t\"./PublishThumbnailInput/index.js\": 43,\n\t\"./PublishThumbnailInput/view\": 86,\n\t\"./PublishThumbnailInput/view.jsx\": 86,\n\t\"./PublishTitleInput\": 41,\n\t\"./PublishTitleInput/\": 41,\n\t\"./PublishTitleInput/index\": 41,\n\t\"./PublishTitleInput/index.js\": 41,\n\t\"./PublishTitleInput/view\": 84,\n\t\"./PublishTitleInput/view.jsx\": 84,\n\t\"./PublishTool\": 47,\n\t\"./PublishTool/\": 47,\n\t\"./PublishTool/index\": 47,\n\t\"./PublishTool/index.js\": 47,\n\t\"./PublishTool/view\": 90,\n\t\"./PublishTool/view.jsx\": 90,\n\t\"./PublishUrlInput\": 42,\n\t\"./PublishUrlInput/\": 42,\n\t\"./PublishUrlInput/index\": 42,\n\t\"./PublishUrlInput/index.js\": 42,\n\t\"./PublishUrlInput/view\": 85,\n\t\"./PublishUrlInput/view.jsx\": 85,\n\t\"./ShowAssetDetails\": 29,\n\t\"./ShowAssetDetails/\": 29,\n\t\"./ShowAssetDetails/index\": 29,\n\t\"./ShowAssetDetails/index.js\": 29,\n\t\"./ShowAssetDetails/view\": 73,\n\t\"./ShowAssetDetails/view.jsx\": 73,\n\t\"./ShowAssetLite\": 27,\n\t\"./ShowAssetLite/\": 27,\n\t\"./ShowAssetLite/index\": 27,\n\t\"./ShowAssetLite/index.js\": 27,\n\t\"./ShowAssetLite/view\": 71,\n\t\"./ShowAssetLite/view.jsx\": 71,\n\t\"./ShowChannel\": 32,\n\t\"./ShowChannel/\": 32,\n\t\"./ShowChannel/index\": 32,\n\t\"./ShowChannel/index.js\": 32,\n\t\"./ShowChannel/view\": 76,\n\t\"./ShowChannel/view.jsx\": 76,\n\t\"./index\": 52,\n\t\"./index.js\": 52\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 169;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/containers ^\\.\\/.*$\n// module id = 169\n// module chunks = 0","export const LOAD_START = 'LOAD_START';\nexport const LOADING = 'LOADING';\nexport const PUBLISHING = 'PUBLISHING';\nexport const SUCCESS = 'SUCCESS';\nexport const FAILED = 'FAILED';\n\n\n\n// WEBPACK FOOTER //\n// ./client/constants/publish_claim_states.js","var map = {\n\t\"./\": 53,\n\t\"./AboutPage\": 20,\n\t\"./AboutPage/\": 20,\n\t\"./AboutPage/index\": 20,\n\t\"./AboutPage/index.jsx\": 20,\n\t\"./ErrorPage\": 12,\n\t\"./ErrorPage/\": 12,\n\t\"./ErrorPage/index\": 12,\n\t\"./ErrorPage/index.jsx\": 12,\n\t\"./HomePage\": 54,\n\t\"./HomePage/\": 54,\n\t\"./HomePage/index\": 54,\n\t\"./HomePage/index.jsx\": 54,\n\t\"./LoginPage\": 23,\n\t\"./LoginPage/\": 23,\n\t\"./LoginPage/index\": 23,\n\t\"./LoginPage/index.js\": 23,\n\t\"./LoginPage/view\": 67,\n\t\"./LoginPage/view.jsx\": 67,\n\t\"./ShowPage\": 26,\n\t\"./ShowPage/\": 26,\n\t\"./ShowPage/index\": 26,\n\t\"./ShowPage/index.js\": 26,\n\t\"./ShowPage/view\": 70,\n\t\"./ShowPage/view.jsx\": 70,\n\t\"./index\": 53,\n\t\"./index.js\": 53\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 171;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./client/pages ^\\.\\/.*$\n// module id = 171\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file -- 2.45.2