1 line
No EOL
666 KiB
Text
1 line
No EOL
666 KiB
Text
{"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,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,WAA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q9I+7RxBrB,EAAQ4I,Q8I57ROq8B,G9Ig8RT,SAAUllC,EAAQC,EAASE,GAEjC,YAeA,SAAS2R,GAAuBzL,GAAO,MAAOA,IAAOA,EAAIhF,WAAagF,GAAQwC,QAASxC,G+I3gSvF,QAASsgC,GAATp/B,GAAsG,GAAjFqe,GAAiFre,EAAjFqe,iBAAkBC,EAA+Dte,EAA/Dse,gBAAiB4S,EAA8ClxB,EAA9CkxB,oBAAqBmO,EAAyBr/B,EAAzBq/B,sBAC3E,OAAIhhB,GACEC,IAAoB4S,EACfrlB,EAAAvK,QAAA0S,cAAA,QAAM1R,GAAG,cAAckS,UAAU,uBAAuB0c,EAAxD,IAA8EmO,EAA9E,MAEFxzB,EAAAvK,QAAA0S,cAAA,QAAM1R,GAAG,0BAA0BkS,UAAU,+BAA7C,WAAmF3I,EAAAvK,QAAA0S,cAAA,QACxFQ,UAAU,gBAD8E,0BAAnF,MAIP3I,EAAAvK,QAAA0S,cAAA,QAAM1R,GAAG,6BAA6BkS,UAAU,+BAAhD,MAAiF3I,EAAAvK,QAAA0S,cAAA,QAAMQ,UAAU,gBAAhB,4BAAjF,M/Is/RJhb,OAAOC,eAAef,EAAS,cAC7ByH,OAAO,G+IngST,IAAAyL,GAAAhT,EAAA,G/IwgSIiT,EAAUtB,EAAuBqB,G+IvgSrC+G,EAAA/Z,EAAA,I/I2gSIga,EAAcrI,EAAuBoI,E+I5/RzCysB,GAAUlrB,WACRmK,iBAAwBzL,EAAAtR,QAAU69B,KAAK/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 `<Redirect>` 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<h'\n ),\n _react2.default.createElement(\n 'g',\n { id: 'Group-16', transform: 'translate(0.000000, 30.000000)' },\n _react2.default.createElement('path', { id: 'Line-8', fill: 'none', stroke: '#09F911', strokeWidth: '1', strokeLinecap: 'square', d: 'M0.5,1.5h15' }),\n _react2.default.createElement('path', { id: 'Line-8-Copy', fill: 'none', stroke: '#029D74', strokeWidth: '1', strokeLinecap: 'square', d: 'M16.5,1.5h15' }),\n _react2.default.createElement('path', { id: 'Line-8-Copy-2', fill: 'none', stroke: '#E35BD8', strokeWidth: '1', strokeLinecap: 'square', d: 'M32.5,1.5h15' }),\n _react2.default.createElement('path', { id: 'Line-8-Copy-3', fill: 'none', stroke: '#4156C5', strokeWidth: '1', strokeLinecap: 'square', d: 'M48.5,1.5h15' }),\n _react2.default.createElement('path', { id: 'Line-8-Copy-4', fill: 'none', stroke: '#635688', strokeWidth: '1', strokeLinecap: 'square', d: 'M64.5,1.5h15' })\n )\n )\n )\n )\n )\n );\n};\n\nexports.default = Logo;\n\n/***/ }),\n/* 49 */\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\nfunction NavBarChannelDropdown(_ref) {\n var channelName = _ref.channelName,\n handleSelection = _ref.handleSelection,\n defaultSelection = _ref.defaultSelection,\n VIEW = _ref.VIEW,\n LOGOUT = _ref.LOGOUT;\n\n return _react2.default.createElement(\n 'select',\n { type: 'text', id: 'nav-bar-channel-select', className: 'select select--arrow link--nav', onChange: handleSelection, value: defaultSelection },\n _react2.default.createElement(\n 'option',\n { id: 'nav-bar-channel-select-channel-option' },\n channelName\n ),\n _react2.default.createElement(\n 'option',\n { value: VIEW },\n 'View'\n ),\n _react2.default.createElement(\n 'option',\n { value: LOGOUT },\n 'Logout'\n )\n );\n};\n\nexports.default = NavBarChannelDropdown;\n\n/***/ }),\n/* 50 */\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 ActiveStatusBar = function ActiveStatusBar() {\n return _react2.default.createElement(\n 'span',\n { className: 'progress-bar progress-bar--active' },\n '| '\n );\n};\n\nexports.default = ActiveStatusBar;\n\n/***/ }),\n/* 51 */\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 InactiveStatusBar = function InactiveStatusBar() {\n return _react2.default.createElement(\n 'span',\n { className: 'progress-bar progress-bar--inactive' },\n '| '\n );\n};\n\nexports.default = InactiveStatusBar;\n\n/***/ }),\n/* 52 */\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/* 53 */\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__(110);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(7);\n\nvar _show2 = __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 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/* 54 */\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__(121);\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/* 55 */\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 <!DOCTYPE html>\\n <html lang=\"en\" prefix=\"og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#\">\\n <head>\\n <meta charset=\"UTF-8\">\\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no\">\\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\\n <!--helmet-->\\n ' + helmet.title.toString() + '\\n ' + helmet.meta.toString() + '\\n ' + helmet.link.toString() + '\\n <!--style sheets-->\\n <link rel=\"stylesheet\" href=\"/assets/css/reset.css\" type=\"text/css\">\\n <link rel=\"stylesheet\" href=\"/assets/css/general.css\" type=\"text/css\">\\n <link rel=\"stylesheet\" href=\"/assets/css/mediaQueries.css\" type=\"text/css\">\\n <!--google font-->\\n <link href=\"https://fonts.googleapis.com/css?family=Roboto:300\" rel=\"stylesheet\">\\n </head>\\n <body id=\"main-body\">\\n <div class=\"row row--tall flex-container--column\">\\n <div id=\"react-app\" class=\"row row--tall flex-container--column\">' + html + '</div>\\n </div>\\n <script>\\n window.__PRELOADED_STATE__ = ' + JSON.stringify(preloadedState).replace(/</g, '\\\\<') + '\\n </script>\\n <script src=\"/bundle/bundle.js\"></script>\\n </body>\\n </html>\\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: '<video width=\"100%\" controls poster=\"' + thumbnail + '\" src=\"' + host + '/' + claimId + '/' + name + '.' + fileExt + '\"/></video>' }) : _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: '<img src=\"' + host + '/' + claimId + '/' + name + '.' + fileExt + '\"/>'\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 <div>\n {this.state.bars.map((bar, index) => bar.isActive ? <ActiveStatusBar key={index} /> : <InactiveStatusBar key={index}/>)}\n </div>\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 <div>\n <NavBar />\n <div className='row row--padded'>\n <p>{error}</p>\n </div>\n </div>\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 <Provider store={store}>\n <StaticRouter location={req.url} context={context}>\n <GAListener>\n <App />\n </GAListener>\n </StaticRouter>\n </Provider>\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 `<Redirect>` 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 <Switch>\n <Route exact path='/' component={HomePage} />\n <Route exact path='/about' component={AboutPage} />\n <Route exact path='/login' component={LoginPage} />\n <Route exact path='/:identifier/:claim' component={ShowPage} />\n <Route exact path='/:claim' component={ShowPage} />\n <Route component={FourOhFourPage} />\n </Switch>\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 <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'>\n <Link to='/'>\n <title>Logo</title>\n <desc>Spee.ch logo</desc>\n <g id='About'>\n <g id='Publish-Form-V2-_x28_filled_x29_' transform='translate(-42.000000, -23.000000)'>\n <g id='Group-17' transform='translate(42.000000, 22.000000)'>\n <text transform='matrix(1 0 0 1 0 20)' fontSize='25' fontFamily='Roboto'>Spee<h</text>\n <g id='Group-16' transform='translate(0.000000, 30.000000)'>\n <path id='Line-8' fill='none' stroke='#09F911' strokeWidth='1' strokeLinecap='square' d='M0.5,1.5h15' />\n <path id='Line-8-Copy' fill='none' stroke='#029D74' strokeWidth='1' strokeLinecap='square' d='M16.5,1.5h15' />\n <path id='Line-8-Copy-2' fill='none' stroke='#E35BD8' strokeWidth='1' strokeLinecap='square' d='M32.5,1.5h15' />\n <path id='Line-8-Copy-3' fill='none' stroke='#4156C5' strokeWidth='1' strokeLinecap='square' d='M48.5,1.5h15' />\n <path id='Line-8-Copy-4' fill='none' stroke='#635688' strokeWidth='1' strokeLinecap='square' d='M64.5,1.5h15' />\n </g>\n </g>\n </g>\n </g>\n </Link>\n </svg>\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 <select type='text' id='nav-bar-channel-select' className='select select--arrow link--nav' onChange={handleSelection} value={defaultSelection}>\n <option id='nav-bar-channel-select-channel-option'>{channelName}</option>\n <option value={VIEW}>View</option>\n <option value={LOGOUT}>Logout</option>\n </select>\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 <span className='progress-bar progress-bar--active'>| </span>;\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 <span className='progress-bar progress-bar--inactive'>| </span>;\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 <!DOCTYPE html>\n <html lang=\"en\" prefix=\"og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#\">\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n <!--helmet-->\n ${helmet.title.toString()}\n ${helmet.meta.toString()}\n ${helmet.link.toString()}\n <!--style sheets-->\n <link rel=\"stylesheet\" href=\"/assets/css/reset.css\" type=\"text/css\">\n <link rel=\"stylesheet\" href=\"/assets/css/general.css\" type=\"text/css\">\n <link rel=\"stylesheet\" href=\"/assets/css/mediaQueries.css\" type=\"text/css\">\n <!--google font-->\n <link href=\"https://fonts.googleapis.com/css?family=Roboto:300\" rel=\"stylesheet\">\n </head>\n <body id=\"main-body\">\n <div class=\"row row--tall flex-container--column\">\n <div id=\"react-app\" class=\"row row--tall flex-container--column\">${html}</div>\n </div>\n <script>\n window.__PRELOADED_STATE__ = ${JSON.stringify(preloadedState).replace(/</g, '\\\\\\u003c')}\n </script>\n <script src=\"/bundle/bundle.js\"></script>\n </body>\n </html>\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 <div>\n <SEO pageTitle={'About'} pageUri={'about'} />\n <NavBar />\n <div className='row row--padded'>\n <div className='column column--5 column--med-10 align-content-top'>\n <div className='column column--8 column--med-10'>\n <p className='pull-quote'>Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.</p>\n <p><a className='link--primary' target='_blank' href='https://twitter.com/spee_ch'>TWITTER</a></p>\n <p><a className='link--primary' target='_blank' href='https://github.com/lbryio/spee.ch'>GITHUB</a></p>\n <p><a className='link--primary' target='_blank' href='https://discord.gg/YjYbwhS'>DISCORD CHANNEL</a></p>\n <p><a className='link--primary' target='_blank' href='https://github.com/lbryio/spee.ch/blob/master/README.md'>DOCUMENTATION</a></p>\n </div>\n </div><div className='column column--5 column--med-10 align-content-top'>\n <div className='column column--8 column--med-10'>\n <p>Spee.ch is a media-hosting site that reads from and publishes content to the <a className='link--primary' href='https://lbry.io'>LBRY</a> blockchain.</p>\n <p>Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the <a className='link--primary' href='https://lbry.io/get'>LBRY</a> network. This means that your images are stored in multiple locations without a single point of failure.</p>\n <h3>Contribute</h3>\n <p>If you have an idea for your own spee.ch-like site on top of LBRY, fork our <a className='link--primary' href='https://github.com/lbryio/spee.ch'>github repo</a> and go to town!</p>\n <p>If you want to improve spee.ch, join our <a className='link--primary' href='https://discord.gg/YjYbwhS'>discord channel</a> or solve one of our <a className='link--primary' href='https://github.com/lbryio/spee.ch/issues'>github issues</a>.</p>\n </div>\n </div>\n </div>\n </div>\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 <div className='row row--wide nav-bar'>\n <div className='row row--padded row--short flex-container--row flex-container--space-between-center'>\n <Logo />\n <div className='nav-bar--center'>\n <span className='nav-bar-tagline'>{siteDescription}</span>\n </div>\n <div className='nav-bar--right'>\n <NavLink className='nav-bar-link link--nav' activeClassName='link--nav-active' to='/' exact>Publish</NavLink>\n <NavLink className='nav-bar-link link--nav' activeClassName='link--nav-active' to='/about'>About</NavLink>\n { this.props.channelName ? (\n <NavBarChannelDropdown\n channelName={this.props.channelName}\n handleSelection={this.handleSelection}\n defaultSelection={this.props.channelName}\n VIEW={VIEW}\n LOGOUT={LOGOUT}\n />\n ) : (\n <NavLink id='nav-bar-login-link' className='nav-bar-link link--nav' activeClassName='link--nav-active' to='/login'>Channel</NavLink>\n )}\n </div>\n </div>\n </div>\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 <Helmet\n title={pageTitle}\n meta={metaTags}\n link={[{rel: 'canonical', href: canonicalLink}]}\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 <div>\n <SEO pageTitle={'Login'} pageUri={'login'} />\n <NavBar />\n <div className='row row--padded'>\n <div className='column column--5 column--med-10 align-content-top'>\n <div className='column column--8 column--med-10'>\n <p>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 <a className='link--primary' target='_blank' href='/@catalonia2017:43dcf47163caa21d8404d9fe9b30f78ef3e146a8'>documenting important events</a>, or making a public repository for <a className='link--primary' target='_blank' href='/@catGifs'>cat gifs</a> (password: '1234'), try creating a channel for it!</p>\n </div>\n </div><div className='column column--5 column--med-10 align-content-top'>\n <div className='column column--8 column--med-10'>\n <h3 className='h3--no-bottom'>Log in to an existing channel:</h3>\n <ChannelLoginForm />\n <h3 className='h3--no-bottom'>Create a brand new channel:</h3>\n <ChannelCreateForm />\n </div>\n </div>\n </div>\n </div>\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 <form id='channel-login-form'>\n <div className='row row--wide row--short'>\n <div className='column column--3 column--sml-10'>\n <label className='label' htmlFor='channel-login-name-input'>Name:</label>\n </div><div className='column column--6 column--sml-10'>\n <div className='input-text--primary flex-container--row flex-container--left-bottom'>\n <span>@</span>\n <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 </div>\n </div>\n </div>\n <div className='row row--wide row--short'>\n <div className='column column--3 column--sml-10'>\n <label className='label' htmlFor='channel-login-password-input' >Password:</label>\n </div><div className='column column--6 column--sml-10'>\n <div className='input-text--primary'>\n <input type='password' id='channel-login-password-input' name='password' className='input-text' placeholder='' value={this.state.channelPassword} onChange={this.handleInput} />\n </div>\n </div>\n </div>\n { this.state.error ? (\n <p className='info-message--failure'>{this.state.error}</p>\n ) : (\n <p className='info-message'>Enter the name and password for your channel</p>\n )}\n <div className='row row--wide'>\n <button className='button--primary' onClick={this.loginToChannel}>Authenticate</button>\n </div>\n </form>\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 <div>\n { !this.state.status ? (\n <form id='publish-channel-form'>\n <div className='row row--wide row--short'>\n <div className='column column--3 column--sml-10'>\n <label className='label' htmlFor='new-channel-name'>Name:</label>\n </div><div className='column column--6 column--sml-10'>\n <div className='input-text--primary flex-container--row flex-container--left-bottom span--relative'>\n <span>@</span>\n <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) && <span id='input-success-channel-name' className='info-message--success span--absolute'>{'\\u2713'}</span> }\n { this.state.error && <span id='input-success-channel-name' className='info-message--failure span--absolute'>{'\\u2716'}</span> }\n </div>\n </div>\n </div>\n <div className='row row--wide row--short'>\n <div className='column column--3 column--sml-10'>\n <label className='label' htmlFor='new-channel-password'>Password:</label>\n </div><div className='column column--6 column--sml-10'>\n <div className='input-text--primary'>\n <input type='password' name='password' id='new-channel-password' className='input-text' placeholder='' value={this.state.password} onChange={this.handleInput} />\n </div>\n </div>\n </div>\n {this.state.error ? (\n <p className='info-message--failure'>{this.state.error}</p>\n ) : (\n <p className='info-message'>Choose a name and password for your channel</p>\n )}\n <div className='row row--wide'>\n <button className='button--primary' onClick={this.createChannel}>Create Channel</button>\n </div>\n </form>\n ) : (\n <div>\n <p className='fine-print'>{this.state.status}</p>\n <ProgressBar size={12} />\n </div>\n )}\n </div>\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 <ErrorPage error={error} />\n );\n }\n switch (requestType) {\n case CHANNEL:\n return <ShowChannel />;\n case ASSET_LITE:\n return <ShowAssetLite />;\n case ASSET_DETAILS:\n return <ShowAssetDetails />;\n default:\n return <p>loading...</p>;\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 <div className='row row--tall flex-container--column flex-container--center-center show-lite-container'>\n <SEO pageTitle={name} asset={asset} />\n <AssetDisplay />\n <Link id='asset-boilerpate' className='link--primary fine-print' to={`/${claimId}/${name}`}>hosted\n via Spee.ch</Link>\n </div>\n );\n }\n return (\n <div className='row row--tall row--padded flex-container--column flex-container--center-center'>\n <p>loading asset data...</p>\n </div>\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 <div id='asset-display-component'>\n {(status === LOCAL_CHECK) &&\n <div>\n <p>Checking to see if Spee.ch has your asset locally...</p>\n </div>\n }\n {(status === UNAVAILABLE) &&\n <div>\n <p>Sit tight, we're searching the LBRY blockchain for your asset!</p>\n <ProgressBar size={12} />\n <p>Curious what magic is happening here? <a className='link--primary' target='blank' href='https://lbry.io/faq/what-is-lbry'>Learn more.</a></p>\n </div>\n }\n {(status === ERROR) &&\n <div>\n <p>Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the <a className='link--primary' href='https://discord.gg/YjYbwhS' target='_blank'>LBRY discord</a>.</p>\n <i><p id='error-message'>{error}</p></i>\n </div>\n }\n {(status === AVAILABLE) &&\n (() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n return (\n <img\n className='asset'\n src={`/${claimId}/${name}.${fileExt}`}\n alt={name} />\n );\n case 'image/gif':\n return (\n <img\n className='asset'\n src={`/${claimId}/${name}.${fileExt}`}\n alt={name}\n />\n );\n case 'video/mp4':\n return (\n <video className='asset video' controls poster={thumbnail}>\n <source\n src={`/${claimId}/${name}.${fileExt}`}\n />\n <p>Your browser does not support the <code>video</code> element.</p>\n </video>\n );\n default:\n return (\n <p>Unsupported file type</p>\n );\n }\n })()\n }\n </div>\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 <div>\n <SEO pageTitle={`${name} - details`} asset={asset} />\n <NavBar />\n <div className='row row--tall row--padded'>\n <div className='column column--10'>\n <AssetTitle />\n </div>\n <div className='column column--5 column--sml-10 align-content-top'>\n <div className='row row--padded show-details-container'>\n <AssetDisplay />\n </div>\n </div><div className='column column--5 column--sml-10 align-content-top'>\n <div className='row row--padded'>\n <AssetInfo />\n </div>\n </div>\n </div>\n </div>\n );\n };\n return (\n <ErrorPage error={'loading asset data...'} />\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 <div>\n <span className='text--large'>{title}</span>\n </div>\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 <div>\n {channelName &&\n <div className='row row--padded row--wide row--no-top'>\n <div className='column column--2 column--med-10'>\n <span className='text'>Channel:</span>\n </div>\n <div className='column column--8 column--med-10'>\n <span className='text'><Link to={`/${channelName}:${certificateId}`}>{channelName}</Link></span>\n </div>\n </div>\n }\n\n {description &&\n <div className='row row--padded row--wide row--no-top'>\n <span className='text'>{description}</span>\n </div>\n }\n\n <div id='show-share-buttons'>\n <div className='row row--padded row--wide row--no-top'>\n <div className='column column--2 column--med-10'>\n <span className='text'>Share:</span>\n </div>\n <div className='column column--8 column--med-10'>\n <div\n className='row row--short row--wide flex-container--row flex-container--space-between-bottom flex-container--wrap'>\n <a className='link--primary' target='_blank' href={`https://twitter.com/intent/tweet?text=${host}/${shortId}/${name}`}>twitter</a>\n <a className='link--primary' target='_blank' href={`https://www.facebook.com/sharer/sharer.php?u=${host}/${shortId}/${name}`}>facebook</a>\n <a className='link--primary' target='_blank' href={`http://tumblr.com/widgets/share/tool?canonicalUrl=${host}/${shortId}/${name}`}>tumblr</a>\n <a className='link--primary' target='_blank' href={`https://www.reddit.com/submit?url=${host}/${shortId}/${name}&title=${name}`}>reddit</a>\n </div>\n </div>\n </div>\n </div>\n\n <div className='row row--padded row--wide row--no-top'>\n <div id='show-short-link'>\n <div className='column column--2 column--med-10'>\n <span className='text'>Link:</span>\n </div>\n <div className='column column--8 column--med-10'>\n <div className='row row--short row--wide'>\n <div className='column column--7'>\n <div className='input-error' id='input-error-copy-short-link' hidden='true'>error here</div>\n <input type='text' id='short-link' className='input-disabled input-text--full-width' readOnly\n spellCheck='false'\n value={`${host}/${shortId}/${name}.${fileExt}`}\n onClick={this.select} />\n </div>\n <div className='column column--1' />\n <div className='column column--2'>\n <button className='button--primary button--wide' data-elementtocopy='short-link'\n onClick={this.copyToClipboard}>copy\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <div id='show-embed-code'>\n <div className='column column--2 column--med-10'>\n <span className='text'>Embed:</span>\n </div>\n <div className='column column--8 column--med-10'>\n <div className='row row--short row--wide'>\n <div className='column column--7'>\n <div className='input-error' id='input-error-copy-embed-text' hidden='true'>error here</div>\n {(contentType === 'video/mp4') ? (\n <input type='text' id='embed-text' className='input-disabled input-text--full-width' readOnly\n onClick={this.select} spellCheck='false'\n value={`<video width=\"100%\" controls poster=\"${thumbnail}\" src=\"${host}/${claimId}/${name}.${fileExt}\"/></video>`} />\n ) : (\n <input type='text' id='embed-text' className='input-disabled input-text--full-width' readOnly\n onClick={this.select} spellCheck='false'\n value={`<img src=\"${host}/${claimId}/${name}.${fileExt}\"/>`}\n />\n )}\n </div>\n <div className='column column--1' />\n <div className='column column--2'>\n <button className='button--primary button--wide' data-elementtocopy='embed-text'\n onClick={this.copyToClipboard}>copy\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div className='flex-container--row flex-container--space-between-bottom'>\n <Link className='link--primary' to={`/${shortId}/${name}.${fileExt}`}><span\n className='text'>Direct Link</span></Link>\n <a className='link--primary' href={`${host}/${claimId}/${name}.${fileExt}`} download={name}>Download</a>\n <a className='link--primary' target='_blank' href='https://lbry.io/dmca'>Report</a>\n </div>\n\n </div>\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 <div>\n <SEO pageTitle={name} channel={channel} />\n <NavBar />\n <div className='row row--tall row--padded'>\n <div className='column column--10'>\n <h2>channel name: {name}</h2>\n <p className={'fine-print'}>full channel id: {longId}</p>\n <p className={'fine-print'}>short channel id: {shortId}</p>\n </div>\n <div className='column column--10'>\n <ChannelClaimsDisplay />\n </div>\n </div>\n </div>\n );\n };\n return (\n <ErrorPage error={'loading channel data...'} />\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 <div className='row row--tall'>\n {(claims.length > 0) ? (\n <div>\n {claims.map((claim, index) => <AssetPreview\n claimData={claim}\n key={`${claim.name}-${index}`}\n />)}\n <div>\n {(currentPage > 1) &&\n <button className={'button--secondary'} onClick={this.showPreviousResultsPage}>Previous Page</button>\n }\n {(currentPage < totalPages) &&\n <button className={'button--secondary'} onClick={this.showNextResultsPage}>Next Page</button>\n }\n </div>\n </div>\n ) : (\n <p>There are no claims in this channel</p>\n )}\n </div>\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 <div className='asset-holder'>\n <Link to={showUrlLink} >\n {(() => {\n switch (contentType) {\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/png':\n case 'image/gif':\n return (\n <img\n className={'asset-preview'}\n src={directSourceLink}\n alt={name}\n />\n );\n case 'video/mp4':\n return (\n <img\n className={'asset-preview video'}\n src={thumbnail || defaultThumbnail}\n alt={name}\n />\n );\n default:\n return (\n <p>unsupported file type</p>\n );\n }\n })()}\n </Link>\n </div>\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 <div>\n <Helmet>\n <title>{title} - 404</title>\n <link rel='canonical' href={`${host}/404`} />\n </Helmet>\n <NavBar />\n <div className='row row--padded'>\n <h2>404</h2>\n <p>That page does not exist</p>\n </div>\n </div>\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 <Provider store={store}>\n <StaticRouter location={req.url} context={context}>\n <GAListener>\n <App />\n </GAListener>\n </StaticRouter>\n </Provider>\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 <textarea\n {...rest}\n ref={x => 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 <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\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 <span id='url-channel' className='url-text--secondary'>{loggedInChannelName}:{loggedInChannelShortId} /</span>;\n }\n return <span id='url-channel-placeholder' className='url-text--secondary tooltip'>@channel<span\n className='tooltip-text'>Select a channel below</span> /</span>;\n }\n return (\n <span id='url-no-channel-placeholder' className='url-text--secondary tooltip'>xyz<span className='tooltip-text'>This will be a random id</span> /</span>\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":""} |