spee.ch/index.js.map
2018-03-13 15:37:42 -07:00

1 line
No EOL
784 KiB
Text

{"version":3,"sources":["webpack:///index.js","webpack:///webpack/bootstrap ad5c54313d78fb451a0c","webpack:///external \"react\"","webpack:///external \"react-redux\"","webpack:///external \"winston\"","webpack:///./config/siteConfig.js","webpack:///external \"react-router-dom\"","webpack:///./react/actions/publish.js","webpack:///./models/index.js","webpack:///./react/containers/NavBar/index.js","webpack:///./react/actions/show.js","webpack:///./react/components/SEO/index.jsx","webpack:///external \"prop-types\"","webpack:///./react/utils/request.js","webpack:///./react/constants/show_action_types.js","webpack:///./react/selectors/show.js","webpack:///external \"react-helmet\"","webpack:///external \"redux-saga/effects\"","webpack:///./helpers/lbryApi.js","webpack:///./helpers/googleAnalytics.js","webpack:///external \"redux\"","webpack:///./react/actions/channel.js","webpack:///./react/components/ProgressBar/index.jsx","webpack:///./react/components/ErrorPage/index.jsx","webpack:///external \"passport\"","webpack:///./config/mysqlConfig.js","webpack:///./config/slackConfig.js","webpack:///external \"passport-local\"","webpack:///external \"sequelize\"","webpack:///./helpers/sequelizeHelpers.js","webpack:///./helpers/publishHelpers.js","webpack:///./helpers/errorHandlers.js","webpack:///./controllers/serveController.js","webpack:///./helpers/handlePageRender.jsx","webpack:///external \"react-dom/server\"","webpack:///./react/reducers/index.js","webpack:///./react/constants/publish_action_types.js","webpack:///./react/constants/publish_channel_select_states.js","webpack:///./react/constants/channel_action_types.js","webpack:///./react/constants/asset_display_states.js","webpack:///./react/components/GAListener/index.jsx","webpack:///./react/app.js","webpack:///./react/containers/Dropzone/index.js","webpack:///./react/containers/ChannelLoginForm/index.js","webpack:///./react/containers/ChannelCreateForm/index.js","webpack:///./react/constants/show_request_types.js","webpack:///./react/containers/AssetDisplay/index.js","webpack:///./helpers/renderFullPage.js","webpack:///external \"babel-polyfill\"","webpack:///external \"whatwg-fetch\"","webpack:///./server.js","webpack:///external \"express\"","webpack:///external \"body-parser\"","webpack:///external \"express-handlebars\"","webpack:///external \"handlebars\"","webpack:///external \"helmet\"","webpack:///./helpers/authHelpers.js","webpack:///external \"cookie-session\"","webpack:///external \"http\"","webpack:///./helpers/configureLogger.js","webpack:///./config/loggerConfig.js","webpack:///./helpers/configureSlack.js","webpack:///external \"winston-slack-webhook\"","webpack:///./passport/local-signup.js","webpack:///external \"axios\"","webpack:///./config/lbryConfig.js","webpack:///external \"universal-analytics\"","webpack:///./models/certificate.js","webpack:///./models/channel.js","webpack:///./models/claim.js","webpack:///./models/file.js","webpack:///./models/request.js","webpack:///./models/user.js","webpack:///external \"bcrypt\"","webpack:///./passport/local-login.js","webpack:///./routes/auth-routes.js","webpack:///./routes/api-routes.js","webpack:///external \"connect-multiparty\"","webpack:///./controllers/publishController.js","webpack:///external \"fs\"","webpack:///./auth/authentication.js","webpack:///./helpers/channelPagination.js","webpack:///./routes/page-routes.js","webpack:///./react/reducers/publish.js","webpack:///./react/reducers/channel.js","webpack:///./react/reducers/show.js","webpack:///./react/reducers/site.js","webpack:///external \"react-ga\"","webpack:///./react/components/HomePage/index.jsx","webpack:///./react/utils/pageTitle.js","webpack:///./react/utils/metaTags.js","webpack:///./react/utils/canonicalLink.js","webpack:///./react/containers/NavBar/view.jsx","webpack:///./react/components/Logo/index.jsx","webpack:///./react/components/NavBarChannelOptionsDropdown/index.jsx","webpack:///external \"cross-fetch/polyfill\"","webpack:///./react/containers/PublishTool/index.js","webpack:///./react/containers/PublishTool/view.jsx","webpack:///./react/containers/Dropzone/view.jsx","webpack:///./react/utils/file.js","webpack:///./react/components/Preview/index.jsx","webpack:///./react/containers/PublishDetails/index.js","webpack:///./react/containers/PublishDetails/view.jsx","webpack:///./react/containers/PublishTitleInput/index.js","webpack:///./react/containers/PublishTitleInput/view.jsx","webpack:///./react/containers/PublishUrlInput/index.js","webpack:///./react/containers/PublishUrlInput/view.jsx","webpack:///./react/components/PublishUrlMiddleDisplay/index.jsx","webpack:///./react/containers/PublishThumbnailInput/index.js","webpack:///./react/containers/PublishThumbnailInput/view.jsx","webpack:///./react/containers/PublishMetadataInputs/index.js","webpack:///./react/containers/PublishMetadataInputs/view.jsx","webpack:///./react/components/ExpandingTextArea/index.jsx","webpack:///./react/containers/ChannelSelect/index.js","webpack:///./react/containers/ChannelSelect/view.jsx","webpack:///./react/containers/ChannelLoginForm/view.jsx","webpack:///./react/containers/ChannelCreateForm/view.jsx","webpack:///./react/components/ActiveStatusBar/index.jsx","webpack:///./react/components/InactiveStatusBar/index.jsx","webpack:///./react/containers/PublishStatus/index.js","webpack:///./react/containers/PublishStatus/view.jsx","webpack:///./react/constants/publish_claim_states.js","webpack:///./react/containers/PublishDisabledMessage/index.js","webpack:///./react/containers/PublishDisabledMessage/view.jsx","webpack:///./react/components/AboutPage/index.jsx","webpack:///./react/containers/LoginPage/index.js","webpack:///./react/containers/LoginPage/view.jsx","webpack:///./react/containers/ShowPage/index.js","webpack:///./react/containers/ShowPage/view.jsx","webpack:///./react/containers/ShowAssetLite/index.js","webpack:///./react/containers/ShowAssetLite/view.jsx","webpack:///./react/containers/AssetDisplay/view.jsx","webpack:///./react/containers/ShowAssetDetails/index.js","webpack:///./react/containers/ShowAssetDetails/view.jsx","webpack:///./react/containers/AssetTitle/index.js","webpack:///./react/containers/AssetTitle/view.jsx","webpack:///./react/containers/AssetInfo/index.js","webpack:///./react/containers/AssetInfo/view.jsx","webpack:///./react/containers/ShowChannel/index.js","webpack:///./react/containers/ShowChannel/view.jsx","webpack:///./react/containers/ChannelClaimsDisplay/index.js","webpack:///./react/containers/ChannelClaimsDisplay/view.jsx","webpack:///./react/components/AssetPreview/index.jsx","webpack:///./react/components/FourOhFourPage/index.jsx","webpack:///./routes/serve-routes.js","webpack:///./helpers/serveHelpers.js","webpack:///./helpers/lbryUri.js","webpack:///./helpers/handleShowRender.jsx","webpack:///external \"redux-saga\"","webpack:///./react/sagas/show_uri.js","webpack:///./react/sagas/show_asset.js","webpack:///./react/api/assetApi.js","webpack:///./react/sagas/show_channel.js","webpack:///./react/api/channelApi.js","webpack:///./react/utils/lbryUri.js","webpack:///./routes/fallback-routes.js"],"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","title","thumbnail","description","auth","sessionKey","details","port","host","publishing","additionalClaimAddresses","disabled","disabledMessage","primaryClaimAddress","thumbnailChannel","thumbnailChannelId","uploadDirectory","configure","config","console","log","selectFile","file","type","actions","FILE_SELECTED","data","clearFile","FILE_CLEAR","updateMetadata","value","METADATA_UPDATE","updateClaim","CLAIM_UPDATE","setPublishInChannel","channel","SET_PUBLISH_IN_CHANNEL","updatePublishStatus","status","message","PUBLISH_STATUS_UPDATE","updateError","ERROR_UPDATE","updateSelectedChannel","channelName","SELECTED_CHANNEL_UPDATE","toggleMetadataInputs","showMetadataInputs","TOGGLE_METADATA_INPUTS","onNewThumbnail","THUMBNAIL_NEW","startPublish","history","PUBLISH_START","_publish_action_types","obj","newObj","key","default","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","debug","update","create","_reactRedux","_channel","_view","_view2","_publish","mapStateToProps","_ref","loggedInChannel","channelShortId","shortId","channelLongId","longId","mapDispatchToProps","dispatch","onChannelLogin","updateLoggedInChannel","onChannelLogout","connect","onHandleShowPageUri","params","HANDLE_SHOW_URI","onRequestError","REQUEST_ERROR","onNewChannelRequest","channelId","requestType","requestId","CHANNEL_REQUEST_NEW","onNewAssetRequest","id","extension","ASSET_REQUEST_NEW","modifier","onRequestUpdate","REQUEST_UPDATE","addRequestToRequestList","REQUEST_LIST_ADD","addAssetToAssetList","claimId","claimData","ASSET_ADD","addNewChannelToChannelList","claimsData","CHANNEL_ADD","onUpdateChannelClaims","channelKey","page","CHANNEL_CLAIMS_UPDATE_ASYNC","updateChannelClaims","channelListId","CHANNEL_CLAIMS_UPDATE_SUCCESS","fileRequested","FILE_REQUESTED","updateFileAvailability","FILE_AVAILABILITY_UPDATE","updateDisplayAssetError","DISPLAY_ASSET_ERROR","_show_action_types","_show_request_types","_interopRequireDefault","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","constructor","writable","setPrototypeOf","__proto__","_createClass","defineProperties","target","props","length","descriptor","protoProps","staticProps","_react","_react2","_reactHelmet","_reactHelmet2","_propTypes","_propTypes2","_pageTitle","_metaTags","_canonicalLink","SEO","_React$Component","getPrototypeOf","apply","arguments","_props","pageTitle","asset","pageUri","createPageTitle","metaTags","createMetaTags","canonicalLink","createCanonicalLink","createElement","meta","link","rel","href","Component","propTypes","string","parseJSON","response","json","checkStatus","jsonResponse","Error","request","url","options","fetch","Promise","all","_ref2","_slicedToArray","sliceIterator","arr","_arr","_n","_d","_e","undefined","_s","_i","Symbol","iterator","next","done","push","Array","isArray","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","CHANNEL_UPDATE","_channel_action_types","_ActiveStatusBar","_ActiveStatusBar2","_InactiveStatusBar","_InactiveStatusBar2","ProgressBar","bars","index","incrementer","createBars","bind","startProgressBar","updateProgressBar","stopProgressBar","size","isActive","setState","updateInterval","setInterval","clearInterval","map","bar","number","isRequired","_NavBar","_NavBar2","ErrorPage","className","MysqlConfig","SlackConfig","slackWebHook","slackErrorChannel","slackInfoChannel","returnShortId","claimsArray","claimIndex","substring","shortIdLength","findIndex","element","possibleMatches","slice","filter","fs","parsePublishApiRequestBody","nsfw","license","exec","parsePublishApiRequestFiles","path","test","validateFileTypeAndSize","fileName","filePath","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","contentType","handleErrorResponse","res","useObjectPropertiesIfNoKeys","_module$exports$retur","returnErrorMessageAndStatus","_module$exports$retur2","createErrorResponsePayload","code","newErrorObject","getOwnPropertyNames","success","returnPaginatedChannelClaims","getClaimId","channelClaimId","getClaimIdByChannel","getClaimIdByClaim","getLongClaimId","longClaimId","getLongChannelId","longChannelId","getClaimIdByLongChannelId","getChannelData","longChannelClaimId","getShortChannelIdFromLongChannelId","_ref4","shortChannelClaimId","getChannelClaims","getAllChannelClaims","_ref5","_ref6","channelClaimsArray","paginatedChannelViewData","getLocalFileRecord","dataValues","_server","_redux","_reducers","_reducers2","_reactRouterDom","_GAListener","_GAListener2","_app","_app2","_renderFullPage","_renderFullPage2","req","context","store","createStore","html","renderToString","Provider","StaticRouter","location","helmet","renderStatic","redirect","preloadedState","getState","send","_publish2","_channel2","_show","_show2","_site","_site2","combineReducers","publish","site","LOGIN","CREATE","LOCAL_CHECK","UNAVAILABLE","ERROR","AVAILABLE","_reactGa","_reactGa2","initialize","GAListener","sendPageView","listen","set","pathname","pageview","children","withRouter","_HomePage","_HomePage2","_AboutPage","_AboutPage2","_LoginPage","_LoginPage2","_ShowPage","_ShowPage2","_FourOhFourPage","_FourOhFourPage2","App","Switch","Route","exact","component","fileError","setFileError","CHANNEL","ASSET_LITE","ASSET_DETAILS","displayAsset","onFileRequest","toString","SpeechServer","mysqlConfig","siteConfig","slackConfig","start","configureConfigFiles","configureLogging","configureApp","configureServer","startServer","siteAppConfig","PORT","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","populateLocalsDotUser","server","http","Server","sync","user","locals","userName","shortChannelId","logLevel","winston","transports","Console","level","timestamp","colorize","prettyPrint","handleExceptions","humanReadableUnhandledException","warn","silly","loggerConfig","winstonSlackWebHook","SlackWebHook","add","webhookUrl","iconEmoji","PassportLocalStrategy","Strategy","lbryApi","usernameField","passwordField","userInfo","tx","userData","channelData","claim_id","certificateData","newUser","newChannel","newCertificate","setChannel","setUser","lbryConfig","STRING","BOOLEAN","INTEGER","TEXT","DECIMAL","define","claimSequence","decodedClaim","depth","effectiveAmount","hasSignature","hex","nout","txid","validAtHeight","valueVersion","claimType","certificateVersion","keyType","publicKey","freezeTableName","belongsTo","foreignKey","allowNull","findAll","order","getLongChannelIdFromShortChannelId","_this2","$like","getLongChannelIdFromChannelName","_this3","validateLongChannelId","_this4","hasOne","determineFileExtensionFromContentType","determineThumbnail","storedThumbnail","defaultThumbnail","prepareClaimData","claim","certificateId","licenseUrl","preview","metadataVersion","source","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","publishInChannel","selectedChannel","_publish_channel_select_states","publishSubmit","channelList","_asset_display_states","_SEO","_SEO2","_PublishTool","_PublishTool2","HomePage","_require$details","_require$assetDefault","defaultDescription","determineOgThumbnailContentType","lastIndexOf","createBasicMetaTags","content","createChannelMetaTags","createAssetMetaTags","embedUrl","showUrl","fileExt","ogTitle","ogDescription","ogThumbnailContentType","ogThumbnail","createBasicCanonicalLink","createAssetCanonicalLink","_asset$claimData","createChannelCanonicalLink","_Logo","_Logo2","_NavBarChannelOptionsDropdown","_NavBarChannelOptionsDropdown2","_request","_request2","NavBar","checkForLoggedInUser","logoutUser","handleSelection","credentials","selectedOptions","NavLink","activeClassName","to","defaultSelection","VIEW","LOGOUT","Logo","version","x","y","viewBox","enableBackground","Link","transform","fontSize","fontFamily","fill","stroke","strokeWidth","strokeLinecap","NavBarChannelDropdown","onChange","_Dropzone","_Dropzone2","_PublishDetails","_PublishDetails2","_PublishStatus","_PublishStatus2","_PublishDisabledMessage","_PublishDisabledMessage2","PublishTool","_file","_Preview","_Preview2","Dropzone","dragOver","mouseOver","dimPreview","handleDrop","handleDragOver","handleDragEnd","handleDragEnter","handleDragLeave","handleMouseEnter","handleMouseLeave","handleClick","handleFileInput","chooseFile","preventDefault","dt","dataTransfer","items","kind","droppedFile","getAsFile","remove","clearData","document","getElementById","click","fileList","validateFile","accept","encType","onDrop","onDragOver","onDragEnd","onDragEnter","onDragLeave","onMouseEnter","onMouseLeave","onClick","Preview","imgSource","setPreviewImageSource","newProps","setPreviewImageSourceFromFile","previewReader","FileReader","readAsDataURL","onloadend","src","alt","bool","_PublishTitleInput","_PublishTitleInput2","_PublishUrlInput","_PublishUrlInput2","_PublishThumbnailInput","_PublishThumbnailInput2","_PublishMetadataInputs","_PublishMetadataInputs2","_ChannelSelect","_ChannelSelect2","PublishDetails","onPublishSubmit","onMetadataChange","PublishTitleInput","handleInput","e","placeholder","loggedInChannelName","loggedInChannelShortId","urlError","onClaimChange","onUrlError","_PublishUrlMiddleDisplay","_PublishUrlMiddleDisplay2","PublishUrlInput","setClaimName","validateClaim","cleanseInput","input","fileNameWithoutEnding","cleanClaimName","_props2","UrlMiddle","dataURItoBlob","dataURI","byteString","atob","split","mimeString","ia","Uint8Array","charCodeAt","Blob","PublishThumbnailInput","videoSource","sliderMinRange","sliderMaxRange","sliderValue","handleVideoLoadedData","handleSliderChange","createThumbnail","setVideoSource","nextProps","dataUri","blob","URL","createObjectURL","duration","totalMinutes","totalSeconds","currentTime","video","canvas","width","videoWidth","videoHeight","getContext","drawImage","dataUrl","toDataURL","snapshot","_state","preload","muted","style","display","playsInline","onLoadedData","onSeeked","onToggleMetadataInputs","_ExpandingTextArea","_ExpandingTextArea2","PublishMetadataInputs","toggleShowInputs","handleSelect","checked","selectedOption","htmlFor","rows","maxLength","maxHeight","_objectWithoutProperties","indexOf","_extends","ExpandingTextarea","_Component","_handleChange","adjustTextarea","_ref$target","el","scrollHeight","rest","ref","func","channelError","onPublishInChannelChange","onChannelSelect","_ChannelLoginForm","_ChannelLoginForm2","_ChannelCreateForm","_ChannelCreateForm2","states","ChannelSelect","toggleAnonymousPublish","ChannelLoginForm","loginToChannel","Headers","Content-Type","_ProgressBar","_ProgressBar2","ChannelCreateForm","handleChannelInput","cleanseChannelInput","updateIsChannelAvailable","channelWithAtSymbol","checkIsPasswordProvided","checkIsChannelAvailable","makePublishChannelRequest","ActiveStatusBar","InactiveStatusBar","_publish_claim_states","publishStates","PublishStatus","LOAD_START","LOADING","PUBLISHING","SUCCESS","FAILED","PublishDisabledMessage","AboutPage","LoginPage","_ErrorPage","_ErrorPage2","_ShowAssetLite","_ShowAssetLite2","_ShowAssetDetails","_ShowAssetDetails2","_ShowChannel","_ShowChannel2","ShowPage","match","_AssetDisplay","_AssetDisplay2","ShowLite","AssetDisplay","_props$asset$claimDat","_props$asset$claimDat2","controls","poster","_AssetTitle","_AssetTitle2","_AssetInfo","_AssetInfo2","ShowAssetDetails","AssetTitle","AssetInfo","copyToClipboard","elementToCopy","dataset","elementtocopy","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","FourOhForPage","determineResponseType","flipClaimNameAndIdForBackwardsCompatibility","logRequestData","getClaimIdAndServeAsset","lbryUri","handleShowRender","hasFileExtension","parseModifier","responseType","parseClaim","isChannel","_lbryUri$parseIdentif","parseIdentifier","identifier","_flipClaimNameAndIdFo","_flipClaimNameAndIdFo2","clientAcceptsHtml","requestIsFromBrowser","clientWantsAsset","range","imageIsWanted","videoIsWanted","isValidClaimId","isValidShortId","isValidShortIdOrClaimId","serveAssetToClient","NO_FILE","sendFileOptions","X-Content-Type-Options","sendFile","fullClaimId","tempName","REGEXP_INVALID_CLAIM","REGEXP_INVALID_CHANNEL","REGEXP_ADDRESS","CHANNEL_CHAR","componentsRegex","RegExp","_componentsRegex$exec","_componentsRegex$exec2","proto","modifierSeperator","startsWith","nameBadChars","join","_componentsRegex$exec3","_componentsRegex$exec4","_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","extensionSeperator"],"mappings":"AAAAA,OAAOC,QACE,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAH,OAGA,IAAAD,GAAAK,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAN,WAUA,OANAC,GAAAE,GAAAI,KAAAR,EAAAC,QAAAD,IAAAC,QAAAE,GAGAH,EAAAO,GAAA,EAGAP,EAAAC,QAvBA,GAAAI,KA4DA,OAhCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,SAAAV,EAAAW,EAAAC,GACAV,EAAAW,EAAAb,EAAAW,IACAG,OAAAC,eAAAf,EAAAW,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAApB,GACA,GAAAa,GAAAb,KAAAqB,WACA,WAA2B,MAAArB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAG,GAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDpB,EAAAuB,EAAA,IAGAv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O,QACEvQ,KAASyjB,EAAQ,GAAI,GACrBthB,QAAS,MAEXmF,SACEtH,KAASqjB,EACTlhB,QAAS,MAEXwhB,eACE3jB,KAASujB,EACTphB,QAAS,MAEXyhB,cACE5jB,KAASsjB,EACTnhB,QAAS,MAEX0hB,OACE7jB,KAASujB,EACTphB,QAAS,MAEX2hB,iBACE9jB,KAASyjB,EAAQ,GAAI,GACrBthB,QAAS,MAEX4hB,cACE/jB,KAASsjB,EACTnhB,QAAS,MAEXgV,QACEnX,KAASujB,EACTphB,QAAS,MAEX6hB,KACEhkB,KAASwjB,EAAK,QACdrhB,QAAS,MAEXhF,MACE6C,KAASqjB,EACTlhB,QAAS,MAEX8hB,MACEjkB,KAASujB,EACTphB,QAAS,MAEX+hB,MACElkB,KAASqjB,EACTlhB,QAAS,MAEXgiB,eACEnkB,KAASujB,EACTphB,QAAS,MAEX+U,UACElX,KAASqjB,EACTlhB,QAAS,MAEXkiB,WACErkB,KAASqjB,EACTlhB,QAAS,MAEX0jB,eACE7lB,KAASqjB,EACTlhB,QAAS,MAEXmU,QACEtW,KAASqjB,EACTlhB,QAAS,MAEXvD,aACEoB,KAASwjB,EAAK,QACdrhB,QAAS,MAEXoU,UACEvW,KAASqjB,EACTlhB,QAAS,MAEXkT,SACErV,KAASqjB,EACTlhB,QAAS,MAEX2jB,YACE9lB,KAASqjB,EACTlhB,QAAS,MAEXiT,MACEpV,KAASsjB,EACTnhB,QAAS,MAEX4jB,SACE/lB,KAASqjB,EACTlhB,QAAS,MAEXxD,WACEqB,KAASqjB,EACTlhB,QAAS,MAEXzD,OACEsB,KAASqjB,EACTlhB,QAAS,MAEX6jB,iBACEhmB,KAASqjB,EACTlhB,QAAS,MAEXkV,aACErX,KAASqjB,EACTlhB,QAAS,MAEX8jB,QACEjmB,KAASqjB,EACTlhB,QAAS,MAEX+jB,YACElmB,KAASqjB,EACTlhB,QAAS,MAEXgkB,eACEnmB,KAASqjB,EACTlhB,QAAS,MAEXikB,eACEpmB,KA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,GALY00B,EAAA,GAAAA,EAAA,IAKD0D,EALC1D,EAAA,GAKmB59B,EALnB49B,EAAA,EAU1B,KAAK10B,EACH,KAAM,IAAI1D,OAAM,qDAElB,IAAMi4B,GAAgBv0B,EAAW+uB,MAAMxiC,EAAOC,QAAQonC,qBACtD,IAAIW,EACF,KAAM,IAAIj4B,OAAJ,uDAAiEi4B,EAAaC,KAAK,MAAnF,KAGR,IAAI4D,EAAoB,CACtB,IAAKthC,EACH,KAAM,IAAIwF,OAAJ,gEAA0E87B,EAA1E,KAER,IAA2B,MAAvBA,EACF,KAAM,IAAI97B,OAAJ,yBAAmC87B,EAAnC,mDAGV,OACEp4B,YACAlJ,UAAWA,GAAa,S1JwgVxB,SAAUvK,EAAQC,EAASE,GAEjC,Y2J3lVA,IAAM2wB,GAAmB3wB,EAAQ,GAEjCH,GAAOC,QAAU,SAAAuiB,GAEfA,EAAIG,IAAI,IAAK,SAAC/E,EAAK5C,GAEjB8V,EAAiBlT,EAAK5C","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 = 46);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react\");\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-redux\");\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston\");\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction SiteConfig() {\n var _this = this;\n\n this.analytics = {\n googleId: 'default'\n };\n this.assetDefaults = {\n title: 'Spee.ch',\n thumbnail: 'https://spee.ch/assets/img/video_thumb_default.png',\n description: 'Open-source, decentralized image and video sharing.'\n };\n this.auth = {\n sessionKey: 'default'\n };\n this.details = {\n port: 3000,\n title: 'Spee.ch',\n host: 'default',\n description: 'Open-source, decentralized image and video sharing.'\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 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 };\n};\n\nmodule.exports = new SiteConfig();\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-router-dom\");\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\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__(34);\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/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Sequelize = __webpack_require__(26);\nvar logger = __webpack_require__(2);\n\nconsole.log('exporting sequelize models');\n\nvar _require = __webpack_require__(23),\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__(66);\nvar Channel = __webpack_require__(67);\nvar Claim = __webpack_require__(68);\nvar File = __webpack_require__(69);\nvar Request = __webpack_require__(70);\nvar User = __webpack_require__(71);\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/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _channel = __webpack_require__(19);\n\nvar _view = __webpack_require__(91);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(5);\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 channelName: channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId: channel.loggedInChannel.longId\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/* 8 */\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__(12);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show_request_types = __webpack_require__(43);\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/* 9 */\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__(14);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _pageTitle = __webpack_require__(88);\n\nvar _metaTags = __webpack_require__(89);\n\nvar _canonicalLink = __webpack_require__(90);\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 var _props = this.props,\n pageTitle = _props.pageTitle,\n asset = _props.asset,\n channel = _props.channel,\n pageUri = _props.pageUri;\n\n pageTitle = (0, _pageTitle.createPageTitle)(pageTitle);\n var metaTags = (0, _metaTags.createMetaTags)(asset, channel);\n var canonicalLink = (0, _canonicalLink.createCanonicalLink)(asset, channel, pageUri);\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/* 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\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__(94);\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/* 12 */\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/* 13 */\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/* 14 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-helmet\");\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga/effects\");\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar axios = __webpack_require__(63);\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(64),\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__(17),\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/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\nvar ua = __webpack_require__(65);\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/* 18 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux\");\n\n/***/ }),\n/* 19 */\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__(36);\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/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = __webpack_require__(10);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _ActiveStatusBar = __webpack_require__(116);\n\nvar _ActiveStatusBar2 = _interopRequireDefault(_ActiveStatusBar);\n\nvar _InactiveStatusBar = __webpack_require__(117);\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/* 21 */\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__(7);\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/* 22 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"passport\");\n\n/***/ }),\n/* 23 */\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/* 24 */\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/* 25 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"passport-local\");\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"sequelize\");\n\n/***/ }),\n/* 27 */\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/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\nvar fs = __webpack_require__(78);\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/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n handleErrorResponse: function handleErrorResponse(originalUrl, ip, error, res) {\n logger.error('Error on ' + originalUrl, module.exports.useObjectPropertiesIfNoKeys(error));\n\n var _module$exports$retur = module.exports.returnErrorMessageAndStatus(error),\n _module$exports$retur2 = _slicedToArray(_module$exports$retur, 2),\n status = _module$exports$retur2[0],\n message = _module$exports$retur2[1];\n\n res.status(status).json(module.exports.createErrorResponsePayload(status, message));\n },\n returnErrorMessageAndStatus: function returnErrorMessageAndStatus(error) {\n var status = void 0,\n message = void 0;\n // check for daemon being turned off\n if (error.code === 'ECONNREFUSED') {\n status = 503;\n message = 'Connection refused. The daemon may not be running.';\n // fallback for everything else\n } else {\n status = 400;\n if (error.message) {\n message = error.message;\n } else {\n message = error;\n };\n };\n return [status, message];\n },\n useObjectPropertiesIfNoKeys: function useObjectPropertiesIfNoKeys(err) {\n if (Object.keys(err).length === 0) {\n var newErrorObject = {};\n Object.getOwnPropertyNames(err).forEach(function (key) {\n newErrorObject[key] = err[key];\n });\n return newErrorObject;\n }\n return err;\n },\n createErrorResponsePayload: function createErrorResponsePayload(status, message) {\n return {\n status: status,\n success: false,\n message: message\n };\n }\n};\n\n/***/ }),\n/* 30 */\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__(6);\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(80),\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/* 31 */\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__(32);\n\nvar _redux = __webpack_require__(18);\n\nvar _reducers = __webpack_require__(33);\n\nvar _reducers2 = _interopRequireDefault(_reducers);\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _GAListener = __webpack_require__(38);\n\nvar _GAListener2 = _interopRequireDefault(_GAListener);\n\nvar _app = __webpack_require__(39);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(45);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reactHelmet = __webpack_require__(14);\n\nvar _reactHelmet2 = _interopRequireDefault(_reactHelmet);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = function (req, res) {\n var context = {};\n\n // create a new Redux store instance\n var store = (0, _redux.createStore)(_reducers2.default);\n\n // render component to a string\n var html = (0, _server.renderToString)(_react2.default.createElement(\n _reactRedux.Provider,\n { store: store },\n _react2.default.createElement(\n _reactRouterDom.StaticRouter,\n { location: req.url, context: context },\n _react2.default.createElement(\n _GAListener2.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n // Somewhere a `<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/* 32 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-dom/server\");\n\n/***/ }),\n/* 33 */\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__(18);\n\nvar _publish = __webpack_require__(82);\n\nvar _publish2 = _interopRequireDefault(_publish);\n\nvar _channel = __webpack_require__(83);\n\nvar _channel2 = _interopRequireDefault(_channel);\n\nvar _show = __webpack_require__(84);\n\nvar _show2 = _interopRequireDefault(_show);\n\nvar _site = __webpack_require__(85);\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/* 34 */\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/* 35 */\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/* 36 */\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/* 37 */\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/* 38 */\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__(86);\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;\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/* 39 */\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 _HomePage = __webpack_require__(87);\n\nvar _HomePage2 = _interopRequireDefault(_HomePage);\n\nvar _AboutPage = __webpack_require__(123);\n\nvar _AboutPage2 = _interopRequireDefault(_AboutPage);\n\nvar _LoginPage = __webpack_require__(124);\n\nvar _LoginPage2 = _interopRequireDefault(_LoginPage);\n\nvar _ShowPage = __webpack_require__(126);\n\nvar _ShowPage2 = _interopRequireDefault(_ShowPage);\n\nvar _FourOhFourPage = __webpack_require__(142);\n\nvar _FourOhFourPage2 = _interopRequireDefault(_FourOhFourPage);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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: _HomePage2.default }),\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/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(5);\n\nvar _view = __webpack_require__(97);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n file: publish.file,\n thumbnail: publish.thumbnail,\n fileError: publish.error.file\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n selectFile: function selectFile(file) {\n dispatch((0, _publish.selectFile)(file));\n },\n setFileError: function setFileError(value) {\n dispatch((0, _publish.clearFile)());\n dispatch((0, _publish.updateError)('file', value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _channel = __webpack_require__(19);\n\nvar _view = __webpack_require__(114);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(5);\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/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _channel = __webpack_require__(19);\n\nvar _view = __webpack_require__(115);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _publish = __webpack_require__(5);\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/* 43 */\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/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(130);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(8);\n\nvar _show2 = __webpack_require__(13);\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/* 45 */\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/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(47);\n__webpack_require__(48);\nmodule.exports = __webpack_require__(49);\n\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"babel-polyfill\");\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"whatwg-fetch\");\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// app dependencies\nvar express = __webpack_require__(50);\nvar bodyParser = __webpack_require__(51);\nvar expressHandlebars = __webpack_require__(52);\nvar Handlebars = __webpack_require__(53);\nvar helmet = __webpack_require__(54);\nvar passport = __webpack_require__(22);\n\nvar _require = __webpack_require__(55),\n populateLocalsDotUser = _require.populateLocalsDotUser,\n serializeSpeechUser = _require.serializeSpeechUser,\n deserializeSpeechUser = _require.deserializeSpeechUser;\n\nvar cookieSession = __webpack_require__(56);\nvar http = __webpack_require__(57);\n// logging dependencies\nvar logger = __webpack_require__(2);\n\nfunction SpeechServer(_ref) {\n var _this = this;\n\n var mysqlConfig = _ref.mysqlConfig,\n siteConfig = _ref.siteConfig,\n slackConfig = _ref.slackConfig;\n\n this.start = function () {\n _this.configureConfigFiles();\n _this.configureLogging();\n _this.configureApp();\n _this.configureServer();\n _this.startServer();\n };\n this.configureConfigFiles = function () {\n var mysqlAppConfig = __webpack_require__(23);\n mysqlAppConfig.configure(mysqlConfig);\n var siteAppConfig = __webpack_require__(3);\n siteAppConfig.configure(siteConfig);\n _this.PORT = siteAppConfig.details.port;\n var slackAppConfig = __webpack_require__(24);\n slackAppConfig.configure(slackConfig);\n };\n this.configureLogging = function () {\n __webpack_require__(58)(logger);\n __webpack_require__(60)(logger);\n };\n this.configureApp = function () {\n var app = express(); // create an Express application\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__(62);\n var localLoginStrategy = __webpack_require__(73);\n passport.use('local-signup', localSignupStrategy);\n passport.use('local-login', localLoginStrategy);\n // initialize passport\n app.use(cookieSession({\n name: 'session',\n keys: [siteConfig.auth.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 // middleware to pass user info back to client (for handlebars access), if user is logged in\n app.use(populateLocalsDotUser); // note: I don't think I need this any more?\n\n // set the routes on the app\n __webpack_require__(74)(app);\n __webpack_require__(75)(app);\n __webpack_require__(81)(app);\n __webpack_require__(143)(app);\n __webpack_require__(154)(app);\n\n _this.app = app;\n };\n this.configureServer = function () {\n _this.server = http.Server(_this.app);\n };\n this.startServer = function () {\n var db = __webpack_require__(6);\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/* 50 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express\");\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"body-parser\");\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"express-handlebars\");\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"handlebars\");\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"helmet\");\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n populateLocalsDotUser: function populateLocalsDotUser(req, res, next) {\n if (req.user) {\n logger.debug('populating res.locals.user');\n res.locals.user = {\n id: req.user.id,\n userName: req.user.userName,\n channelName: req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId\n };\n }\n next();\n },\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/* 56 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cookie-session\");\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"http\");\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _require = __webpack_require__(59),\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/* 59 */\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/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar winstonSlackWebHook = __webpack_require__(61).SlackWebHook;\nvar slackConfig = __webpack_require__(24);\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/* 61 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"winston-slack-webhook\");\n\n/***/ }),\n/* 62 */\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__(25).Strategy;\nvar lbryApi = __webpack_require__(16);\nvar logger = __webpack_require__(2);\nvar db = __webpack_require__(6);\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/* 63 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"axios\");\n\n/***/ }),\n/* 64 */\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/* 65 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"universal-analytics\");\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(27),\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/* 67 */\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/* 68 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(27),\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/* 69 */\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/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING,\n BOOLEAN = _ref.BOOLEAN,\n 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/* 71 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar bcrypt = __webpack_require__(72);\nvar logger = __webpack_require__(2);\n\nmodule.exports = function (sequelize, _ref) {\n var STRING = _ref.STRING;\n\n var User = sequelize.define('User', {\n userName: {\n type: STRING,\n allowNull: false\n },\n password: {\n type: STRING,\n allowNull: false\n }\n }, {\n freezeTableName: true\n });\n\n User.associate = function (db) {\n User.hasOne(db.Channel);\n };\n\n User.prototype.comparePassword = function (password) {\n return bcrypt.compare(password, this.password);\n };\n\n User.prototype.changePassword = function (newPassword) {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(newPassword, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the current password with the new hash\n _this.update({ password: hash }).then(function () {\n resolve();\n }).catch(function (error) {\n reject(error);\n });\n });\n });\n });\n };\n\n // pre-save hook method to hash the user's password before the user's info is saved to the db.\n User.hook('beforeCreate', function (user, options) {\n logger.debug('User.beforeCreate hook...');\n return new Promise(function (resolve, reject) {\n // generate a salt string to use for hashing\n bcrypt.genSalt(function (saltError, salt) {\n if (saltError) {\n logger.error('salt error', saltError);\n reject(saltError);\n return;\n }\n // generate a hashed version of the user's password\n bcrypt.hash(user.password, salt, function (hashError, hash) {\n // if there is an error with the hash generation return the error\n if (hashError) {\n logger.error('hash error', hashError);\n reject(hashError);\n return;\n }\n // replace the password string with the hash password value\n user.password = hash;\n resolve();\n });\n });\n });\n });\n\n return User;\n};\n\n/***/ }),\n/* 72 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"bcrypt\");\n\n/***/ }),\n/* 73 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PassportLocalStrategy = __webpack_require__(25).Strategy;\nvar logger = __webpack_require__(2);\nvar db = __webpack_require__(6);\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/* 74 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\nvar passport = __webpack_require__(22);\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 logger.debug('info:', 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/* 75 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(2);\nvar multipart = __webpack_require__(76);\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__(6);\n\nvar _require2 = __webpack_require__(77),\n claimNameIsAvailable = _require2.claimNameIsAvailable,\n checkChannelAvailability = _require2.checkChannelAvailability,\n publish = _require2.publish;\n\nvar _require3 = __webpack_require__(16),\n getClaimList = _require3.getClaimList,\n resolveUri = _require3.resolveUri,\n getClaim = _require3.getClaim;\n\nvar _require4 = __webpack_require__(28),\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__(29);\n\nvar _require5 = __webpack_require__(17),\n sendGATimingEvent = _require5.sendGATimingEvent;\n\nvar _require6 = __webpack_require__(79),\n authenticateUser = _require6.authenticateUser;\n\nvar _require7 = __webpack_require__(30),\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/* 76 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"connect-multiparty\");\n\n/***/ }),\n/* 77 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar logger = __webpack_require__(2);\nvar db = __webpack_require__(6);\nvar lbryApi = __webpack_require__(16);\nvar publishHelpers = __webpack_require__(28);\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__(26);\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/* 78 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"fs\");\n\n/***/ }),\n/* 79 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar db = __webpack_require__(6);\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n authenticateUser: function authenticateUser(channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName: null,\n channelClaimId: null\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName: user.channelName,\n channelClaimId: user.channelClaimId\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials: function authenticateChannelCredentials(channelName, channelId, userPassword) {\n return new Promise(function (resolve, reject) {\n // hoisted variables\n var channelData = void 0;\n // build the params for finding the channel\n var channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel.findOne({\n where: channelFindParams\n }).then(function (channel) {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) }\n });\n }).then(function (user) {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n }).then(function (isMatch) {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n};\n\n/***/ }),\n/* 80 */\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/* 81 */\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__(31);\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/* 82 */\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__(34);\n\nvar actions = _interopRequireWildcard(_publish_action_types);\n\nvar _publish_channel_select_states = __webpack_require__(35);\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/* 83 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n case actions.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__(36);\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/* 84 */\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__(12);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _asset_display_states = __webpack_require__(37);\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/* 85 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function () {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;\n var action = arguments[1];\n\n switch (action.type) {\n default:\n return state;\n }\n};\n\nvar _require = __webpack_require__(3),\n host = _require.details.host;\n\nvar initialState = {\n host: host\n};\n\n/***/ }),\n/* 86 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"react-ga\");\n\n/***/ }),\n/* 87 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _SEO = __webpack_require__(9);\n\nvar _SEO2 = _interopRequireDefault(_SEO);\n\nvar _NavBar = __webpack_require__(7);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _PublishTool = __webpack_require__(95);\n\nvar _PublishTool2 = _interopRequireDefault(_PublishTool);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar HomePage = function (_React$Component) {\n _inherits(HomePage, _React$Component);\n\n function HomePage() {\n _classCallCheck(this, HomePage);\n\n return _possibleConstructorReturn(this, (HomePage.__proto__ || Object.getPrototypeOf(HomePage)).apply(this, arguments));\n }\n\n _createClass(HomePage, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column' },\n _react2.default.createElement(_SEO2.default, null),\n _react2.default.createElement(_NavBar2.default, null),\n _react2.default.createElement(\n 'div',\n { className: 'row row--tall row--padded flex-container--column' },\n _react2.default.createElement(_PublishTool2.default, null)\n )\n );\n }\n }]);\n\n return HomePage;\n}(_react2.default.Component);\n\n;\n\nexports.default = HomePage;\n\n/***/ }),\n/* 88 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _require = __webpack_require__(3),\n title = _require.details.title;\n\nvar createPageTitle = exports.createPageTitle = function createPageTitle(pageTitle) {\n if (!pageTitle) {\n return '' + title;\n }\n return title + ' - ' + pageTitle;\n};\n\n/***/ }),\n/* 89 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _require = __webpack_require__(3),\n _require$details = _require.details,\n title = _require$details.title,\n host = _require$details.host,\n description = _require$details.description,\n _require$assetDefault = _require.assetDefaults,\n defaultThumbnail = _require$assetDefault.thumbnail,\n defaultDescription = _require$assetDefault.description;\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() {\n return [{ property: 'og:title', content: title }, { property: 'og:url', content: host }, { property: 'og:site_name', content: title }, { property: 'og:description', content: description }, { property: 'twitter:site', content: '@spee_ch' }, { property: 'twitter:card', content: 'summary' }];\n};\n\nvar createChannelMetaTags = function createChannelMetaTags(channel) {\n var name = channel.name,\n longId = channel.longId;\n\n return [{ property: 'og:title', content: name + ' on ' + title }, { property: 'og:url', content: host + '/' + name + ':' + longId }, { property: 'og:site_name', content: title }, { property: 'og:description', content: name + ', a channel on ' + title }, { property: 'twitter:site', content: '@spee_ch' }, { property: 'twitter:card', content: 'summary' }];\n};\n\nvar createAssetMetaTags = function createAssetMetaTags(asset) {\n var claimData = asset.claimData;\n var contentType = claimData.contentType;\n\n var embedUrl = host + '/' + claimData.claimId + '/' + claimData.name;\n var showUrl = host + '/' + claimData.claimId + '/' + claimData.name;\n var source = host + '/' + 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: title }, { property: 'og:description', content: ogDescription }, { property: 'og:image:width', content: 600 }, { property: 'og:image:height', content: 315 }, { property: 'twitter:site', content: '@spee_ch' }];\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(asset, channel) {\n if (asset) {\n return createAssetMetaTags(asset);\n };\n if (channel) {\n return createChannelMetaTags(channel);\n };\n return createBasicMetaTags();\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\nvar _require = __webpack_require__(3),\n host = _require.details.host;\n\nvar createBasicCanonicalLink = function createBasicCanonicalLink(page) {\n if (!page) {\n return '' + host;\n };\n return host + '/' + page;\n};\n\nvar createAssetCanonicalLink = function createAssetCanonicalLink(asset) {\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 host + '/' + channelName + ':' + certificateId + '/' + name;\n };\n return host + '/' + claimId + '/' + name;\n};\n\nvar createChannelCanonicalLink = function createChannelCanonicalLink(channel) {\n var name = channel.name,\n longId = channel.longId;\n\n return host + '/' + name + ':' + longId;\n};\n\nvar createCanonicalLink = exports.createCanonicalLink = function createCanonicalLink(asset, channel, page) {\n if (asset) {\n return createAssetCanonicalLink(asset);\n }\n if (channel) {\n return createChannelCanonicalLink(channel);\n }\n if (page) {\n return createBasicCanonicalLink(page);\n }\n return createBasicCanonicalLink();\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});\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__(92);\n\nvar _Logo2 = _interopRequireDefault(_Logo);\n\nvar _NavBarChannelOptionsDropdown = __webpack_require__(93);\n\nvar _NavBarChannelOptionsDropdown2 = _interopRequireDefault(_NavBarChannelOptionsDropdown);\n\nvar _request = __webpack_require__(11);\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 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 'Open-source, decentralized image and video sharing.'\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/* 92 */\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/* 93 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\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/* 94 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"cross-fetch/polyfill\");\n\n/***/ }),\n/* 95 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(96);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n disabled: publish.disabled,\n file: publish.file,\n status: publish.status.status\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 96 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _Dropzone = __webpack_require__(40);\n\nvar _Dropzone2 = _interopRequireDefault(_Dropzone);\n\nvar _PublishDetails = __webpack_require__(100);\n\nvar _PublishDetails2 = _interopRequireDefault(_PublishDetails);\n\nvar _PublishStatus = __webpack_require__(118);\n\nvar _PublishStatus2 = _interopRequireDefault(_PublishStatus);\n\nvar _PublishDisabledMessage = __webpack_require__(121);\n\nvar _PublishDisabledMessage2 = _interopRequireDefault(_PublishDisabledMessage);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishTool = function (_React$Component) {\n _inherits(PublishTool, _React$Component);\n\n function PublishTool() {\n _classCallCheck(this, PublishTool);\n\n return _possibleConstructorReturn(this, (PublishTool.__proto__ || Object.getPrototypeOf(PublishTool)).apply(this, arguments));\n }\n\n _createClass(PublishTool, [{\n key: 'render',\n value: function render() {\n if (this.props.disabled) {\n console.log('publish is disabled');\n return _react2.default.createElement(_PublishDisabledMessage2.default, null);\n } else {\n console.log('publish is not disabled');\n if (this.props.file) {\n if (this.props.status) {\n return _react2.default.createElement(_PublishStatus2.default, null);\n } else {\n return _react2.default.createElement(_PublishDetails2.default, null);\n }\n }\n return _react2.default.createElement(_Dropzone2.default, null);\n }\n }\n }]);\n\n return PublishTool;\n}(_react2.default.Component);\n\n;\n\nexports.default = PublishTool;\n\n/***/ }),\n/* 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 _file = __webpack_require__(98);\n\nvar _Preview = __webpack_require__(99);\n\nvar _Preview2 = _interopRequireDefault(_Preview);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Dropzone = function (_React$Component) {\n _inherits(Dropzone, _React$Component);\n\n function Dropzone(props) {\n _classCallCheck(this, Dropzone);\n\n var _this = _possibleConstructorReturn(this, (Dropzone.__proto__ || Object.getPrototypeOf(Dropzone)).call(this, props));\n\n _this.state = {\n dragOver: false,\n mouseOver: false,\n dimPreview: false\n };\n _this.handleDrop = _this.handleDrop.bind(_this);\n _this.handleDragOver = _this.handleDragOver.bind(_this);\n _this.handleDragEnd = _this.handleDragEnd.bind(_this);\n _this.handleDragEnter = _this.handleDragEnter.bind(_this);\n _this.handleDragLeave = _this.handleDragLeave.bind(_this);\n _this.handleMouseEnter = _this.handleMouseEnter.bind(_this);\n _this.handleMouseLeave = _this.handleMouseLeave.bind(_this);\n _this.handleClick = _this.handleClick.bind(_this);\n _this.handleFileInput = _this.handleFileInput.bind(_this);\n _this.chooseFile = _this.chooseFile.bind(_this);\n return _this;\n }\n\n _createClass(Dropzone, [{\n key: 'handleDrop',\n value: function handleDrop(event) {\n event.preventDefault();\n this.setState({ dragOver: false });\n // if dropped items aren't files, reject them\n var dt = event.dataTransfer;\n if (dt.items) {\n if (dt.items[0].kind === 'file') {\n var droppedFile = dt.items[0].getAsFile();\n this.chooseFile(droppedFile);\n }\n }\n }\n }, {\n key: 'handleDragOver',\n value: function handleDragOver(event) {\n event.preventDefault();\n }\n }, {\n key: 'handleDragEnd',\n value: function handleDragEnd(event) {\n var dt = event.dataTransfer;\n if (dt.items) {\n for (var i = 0; i < dt.items.length; i++) {\n dt.items.remove(i);\n }\n } else {\n event.dataTransfer.clearData();\n }\n }\n }, {\n key: 'handleDragEnter',\n value: function handleDragEnter() {\n this.setState({ dragOver: true, dimPreview: true });\n }\n }, {\n key: 'handleDragLeave',\n value: function handleDragLeave() {\n this.setState({ dragOver: false, dimPreview: false });\n }\n }, {\n key: 'handleMouseEnter',\n value: function handleMouseEnter() {\n this.setState({ mouseOver: true, dimPreview: true });\n }\n }, {\n key: 'handleMouseLeave',\n value: function handleMouseLeave() {\n this.setState({ mouseOver: false, dimPreview: false });\n }\n }, {\n key: 'handleClick',\n value: function handleClick(event) {\n event.preventDefault();\n document.getElementById('file_input').click();\n }\n }, {\n key: 'handleFileInput',\n value: function handleFileInput(event) {\n event.preventDefault();\n var fileList = event.target.files;\n this.chooseFile(fileList[0]);\n }\n }, {\n key: 'chooseFile',\n value: function chooseFile(file) {\n if (file) {\n try {\n (0, _file.validateFile)(file); // validate the file's name, type, and size\n } catch (error) {\n return this.props.setFileError(error.message);\n }\n // stage it so it will be ready when the publish button is clicked\n this.props.selectFile(file);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column' },\n _react2.default.createElement(\n 'form',\n null,\n _react2.default.createElement('input', { className: 'input-file', type: 'file', id: 'file_input', name: 'file_input', accept: 'video/*,image/*', onChange: this.handleFileInput, encType: 'multipart/form-data' })\n ),\n _react2.default.createElement(\n 'div',\n { id: 'preview-dropzone', className: 'row row--padded row--tall dropzone' + (this.state.dragOver ? ' dropzone--drag-over' : ''), onDrop: this.handleDrop, onDragOver: this.handleDragOver, onDragEnd: this.handleDragEnd, onDragEnter: this.handleDragEnter, onDragLeave: this.handleDragLeave, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onClick: this.handleClick },\n this.props.file ? _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(_Preview2.default, {\n dimPreview: this.state.dimPreview,\n file: this.props.file,\n thumbnail: this.props.thumbnail\n }),\n _react2.default.createElement(\n 'div',\n { id: 'dropzone-text-holder', className: 'flex-container--column flex-container--center-center' },\n this.state.dragOver ? _react2.default.createElement(\n 'div',\n { id: 'dropzone-dragover' },\n _react2.default.createElement(\n 'p',\n { className: 'blue' },\n 'Drop it.'\n )\n ) : null,\n this.state.mouseOver ? _react2.default.createElement(\n 'div',\n { id: 'dropzone-instructions' },\n _react2.default.createElement(\n 'p',\n { className: 'info-message-placeholder info-message--failure', id: 'input-error-file-selection' },\n this.props.fileError\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Drag & drop image or video here to publish'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'OR'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'blue--underlined' },\n 'CHOOSE FILE'\n )\n ) : null\n )\n ) : _react2.default.createElement(\n 'div',\n { id: 'dropzone-text-holder', className: 'flex-container--column flex-container--center-center' },\n this.state.dragOver ? _react2.default.createElement(\n 'div',\n { id: 'dropzone-dragover' },\n _react2.default.createElement(\n 'p',\n { className: 'blue' },\n 'Drop it.'\n )\n ) : _react2.default.createElement(\n 'div',\n { id: 'dropzone-instructions' },\n _react2.default.createElement(\n 'p',\n { className: 'info-message-placeholder info-message--failure', id: 'input-error-file-selection' },\n this.props.fileError\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'Drag & drop image or video here to publish'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'OR'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'blue--underlined' },\n 'CHOOSE FILE'\n )\n )\n )\n )\n );\n }\n }]);\n\n return Dropzone;\n}(_react2.default.Component);\n\n;\n\nexports.default = Dropzone;\n\n/***/ }),\n/* 98 */\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/* 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 _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 Preview = function (_React$Component) {\n _inherits(Preview, _React$Component);\n\n function Preview(props) {\n _classCallCheck(this, Preview);\n\n var _this = _possibleConstructorReturn(this, (Preview.__proto__ || Object.getPrototypeOf(Preview)).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(Preview, [{\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 Preview;\n}(_react2.default.Component);\n\n;\n\nPreview.propTypes = {\n dimPreview: _propTypes2.default.bool.isRequired,\n file: _propTypes2.default.object.isRequired,\n thumbnail: _propTypes2.default.object\n};\n\nexports.default = Preview;\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__(1);\n\nvar _publish = __webpack_require__(5);\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 publish = _ref.publish;\n\n return {\n file: publish.file\n };\n};\n\nvar mapDispatchToProps = {\n clearFile: _publish.clearFile,\n startPublish: _publish.startPublish\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 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 _Dropzone = __webpack_require__(40);\n\nvar _Dropzone2 = _interopRequireDefault(_Dropzone);\n\nvar _PublishTitleInput = __webpack_require__(102);\n\nvar _PublishTitleInput2 = _interopRequireDefault(_PublishTitleInput);\n\nvar _PublishUrlInput = __webpack_require__(104);\n\nvar _PublishUrlInput2 = _interopRequireDefault(_PublishUrlInput);\n\nvar _PublishThumbnailInput = __webpack_require__(107);\n\nvar _PublishThumbnailInput2 = _interopRequireDefault(_PublishThumbnailInput);\n\nvar _PublishMetadataInputs = __webpack_require__(109);\n\nvar _PublishMetadataInputs2 = _interopRequireDefault(_PublishMetadataInputs);\n\nvar _ChannelSelect = __webpack_require__(112);\n\nvar _ChannelSelect2 = _interopRequireDefault(_ChannelSelect);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishDetails = function (_React$Component) {\n _inherits(PublishDetails, _React$Component);\n\n function PublishDetails(props) {\n _classCallCheck(this, PublishDetails);\n\n var _this = _possibleConstructorReturn(this, (PublishDetails.__proto__ || Object.getPrototypeOf(PublishDetails)).call(this, props));\n\n _this.onPublishSubmit = _this.onPublishSubmit.bind(_this);\n return _this;\n }\n\n _createClass(PublishDetails, [{\n key: 'onPublishSubmit',\n value: function onPublishSubmit() {\n this.props.startPublish(this.props.history);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'row row--no-bottom' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--10' },\n _react2.default.createElement(_PublishTitleInput2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded' },\n _react2.default.createElement(_Dropzone2.default, null)\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--5 column--sml-10 align-content-top' },\n _react2.default.createElement(\n 'div',\n { id: 'publish-active-area', className: 'row row--padded' },\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-top row--wide' },\n _react2.default.createElement(_PublishUrlInput2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-top row--wide' },\n _react2.default.createElement(_ChannelSelect2.default, null)\n ),\n this.props.file.type === 'video/mp4' && _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-top row--wide ' },\n _react2.default.createElement(_PublishThumbnailInput2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-top row--no-bottom row--wide' },\n _react2.default.createElement(_PublishMetadataInputs2.default, null)\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--wide align-content-center' },\n _react2.default.createElement(\n 'button',\n { id: 'publish-submit', className: 'button--primary button--large', onClick: this.onPublishSubmit },\n 'Publish'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--padded row--no-bottom align-content-center' },\n _react2.default.createElement(\n 'button',\n { className: 'button--cancel', onClick: this.props.clearFile },\n 'Cancel'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--short align-content-center' },\n _react2.default.createElement(\n 'p',\n { className: 'fine-print' },\n 'By clicking \\'Publish\\', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: 'https://lbry.io/learn' },\n 'Read more.'\n )\n )\n )\n )\n )\n );\n }\n }]);\n\n return PublishDetails;\n}(_react2.default.Component);\n\n;\n\nexports.default = (0, _reactRouterDom.withRouter)(PublishDetails);\n\n/***/ }),\n/* 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__(1);\n\nvar _publish = __webpack_require__(5);\n\nvar _view = __webpack_require__(103);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n title: publish.metadata.title\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onMetadataChange: function onMetadataChange(name, value) {\n dispatch((0, _publish.updateMetadata)(name, value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 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\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishTitleInput = function (_React$Component) {\n _inherits(PublishTitleInput, _React$Component);\n\n function PublishTitleInput(props) {\n _classCallCheck(this, PublishTitleInput);\n\n var _this = _possibleConstructorReturn(this, (PublishTitleInput.__proto__ || Object.getPrototypeOf(PublishTitleInput)).call(this, props));\n\n _this.handleInput = _this.handleInput.bind(_this);\n return _this;\n }\n\n _createClass(PublishTitleInput, [{\n key: 'handleInput',\n value: function handleInput(e) {\n var name = e.target.name;\n var value = e.target.value;\n this.props.onMetadataChange(name, value);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement('input', { type: 'text', id: 'publish-title', className: 'input-text text--large input-text--full-width', name: 'title', placeholder: 'Give your post a title...', onChange: this.handleInput, value: this.props.title });\n }\n }]);\n\n return PublishTitleInput;\n}(_react2.default.Component);\n\nexports.default = PublishTitleInput;\n\n/***/ }),\n/* 104 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _publish = __webpack_require__(5);\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(105);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel,\n publish = _ref.publish;\n\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n loggedInChannelShortId: channel.loggedInChannel.shortId,\n fileName: publish.file.name,\n publishInChannel: publish.publishInChannel,\n selectedChannel: publish.selectedChannel,\n claim: publish.claim,\n urlError: publish.error.url\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onClaimChange: function onClaimChange(value) {\n dispatch((0, _publish.updateClaim)(value));\n dispatch((0, _publish.updateError)('publishSubmit', null));\n },\n onUrlError: function onUrlError(value) {\n dispatch((0, _publish.updateError)('url', value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 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 _request = __webpack_require__(11);\n\nvar _request2 = _interopRequireDefault(_request);\n\nvar _PublishUrlMiddleDisplay = __webpack_require__(106);\n\nvar _PublishUrlMiddleDisplay2 = _interopRequireDefault(_PublishUrlMiddleDisplay);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishUrlInput = function (_React$Component) {\n _inherits(PublishUrlInput, _React$Component);\n\n function PublishUrlInput(props) {\n _classCallCheck(this, PublishUrlInput);\n\n var _this = _possibleConstructorReturn(this, (PublishUrlInput.__proto__ || Object.getPrototypeOf(PublishUrlInput)).call(this, props));\n\n _this.handleInput = _this.handleInput.bind(_this);\n return _this;\n }\n\n _createClass(PublishUrlInput, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _props = this.props,\n claim = _props.claim,\n fileName = _props.fileName;\n\n if (!claim) {\n this.setClaimName(fileName);\n }\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(_ref) {\n var claim = _ref.claim,\n fileName = _ref.fileName;\n\n // if a new file was chosen, update the claim name\n if (fileName !== this.props.fileName) {\n return this.setClaimName(fileName);\n }\n // if the claim has updated, check its availability\n if (claim !== this.props.claim) {\n this.validateClaim(claim);\n }\n }\n }, {\n key: 'handleInput',\n value: function handleInput(event) {\n var value = event.target.value;\n value = this.cleanseInput(value);\n // update the state\n this.props.onClaimChange(value);\n }\n }, {\n key: 'cleanseInput',\n value: function cleanseInput(input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n }, {\n key: 'setClaimName',\n value: function setClaimName(fileName) {\n var fileNameWithoutEnding = fileName.substring(0, fileName.lastIndexOf('.'));\n var cleanClaimName = this.cleanseInput(fileNameWithoutEnding);\n this.props.onClaimChange(cleanClaimName);\n }\n }, {\n key: 'validateClaim',\n value: function validateClaim(claim) {\n var _this2 = this;\n\n if (!claim) {\n return this.props.onUrlError('Enter a url above');\n }\n (0, _request2.default)('/api/claim/availability/' + claim).then(function () {\n _this2.props.onUrlError(null);\n }).catch(function (error) {\n _this2.props.onUrlError(error.message);\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _props2 = this.props,\n claim = _props2.claim,\n loggedInChannelName = _props2.loggedInChannelName,\n loggedInChannelShortId = _props2.loggedInChannelShortId,\n publishInChannel = _props2.publishInChannel,\n selectedChannel = _props2.selectedChannel,\n urlError = _props2.urlError;\n\n return _react2.default.createElement(\n 'div',\n { className: 'column column--10 column--sml-10' },\n _react2.default.createElement(\n 'div',\n { className: 'input-text--primary span--relative' },\n _react2.default.createElement(\n 'span',\n { className: 'url-text--secondary' },\n 'spee.ch / '\n ),\n _react2.default.createElement(_PublishUrlMiddleDisplay2.default, {\n publishInChannel: publishInChannel,\n selectedChannel: selectedChannel,\n loggedInChannelName: loggedInChannelName,\n loggedInChannelShortId: loggedInChannelShortId\n }),\n _react2.default.createElement('input', { type: 'text', id: 'claim-name-input', className: 'input-text', name: 'claim', placeholder: 'your-url-here', onChange: this.handleInput, value: claim }),\n claim && !urlError && _react2.default.createElement(\n 'span',\n { id: 'input-success-claim-name', className: 'info-message--success span--absolute' },\n '\\u2713'\n ),\n urlError && _react2.default.createElement(\n 'span',\n { id: 'input-success-channel-name', className: 'info-message--failure span--absolute' },\n '\\u2716'\n )\n ),\n _react2.default.createElement(\n 'div',\n null,\n urlError ? _react2.default.createElement(\n 'p',\n { id: 'input-error-claim-name', className: 'info-message--failure' },\n urlError\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Choose a custom url'\n )\n )\n );\n }\n }]);\n\n return PublishUrlInput;\n}(_react2.default.Component);\n\nexports.default = PublishUrlInput;\n\n/***/ }),\n/* 106 */\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/* 107 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(5);\n\nvar _view = __webpack_require__(108);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var file = _ref.publish.file;\n\n return {\n file: file\n };\n};\n\nvar mapDispatchToProps = {\n onNewThumbnail: _publish.onNewThumbnail\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 108 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction dataURItoBlob(dataURI) {\n // convert base64/URLEncoded data component to raw binary data held in a string\n var byteString = atob(dataURI.split(',')[1]);\n // separate out the mime component\n var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n // write the bytes of the string to a typed array\n var ia = new Uint8Array(byteString.length);\n for (var i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n return new Blob([ia], { type: mimeString });\n}\n\nvar PublishThumbnailInput = function (_React$Component) {\n _inherits(PublishThumbnailInput, _React$Component);\n\n function PublishThumbnailInput(props) {\n _classCallCheck(this, PublishThumbnailInput);\n\n var _this = _possibleConstructorReturn(this, (PublishThumbnailInput.__proto__ || Object.getPrototypeOf(PublishThumbnailInput)).call(this, props));\n\n _this.state = {\n videoSource: null,\n error: null,\n sliderMinRange: 1,\n sliderMaxRange: null,\n sliderValue: null\n };\n _this.handleVideoLoadedData = _this.handleVideoLoadedData.bind(_this);\n _this.handleSliderChange = _this.handleSliderChange.bind(_this);\n _this.createThumbnail = _this.createThumbnail.bind(_this);\n return _this;\n }\n\n _createClass(PublishThumbnailInput, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var file = this.props.file;\n\n this.setVideoSource(file);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n // if file changes\n if (nextProps.file && nextProps.file !== this.props.file) {\n var file = nextProps.file;\n\n this.setVideoSource(file);\n };\n }\n }, {\n key: 'setVideoSource',\n value: function setVideoSource(file) {\n var _this2 = this;\n\n var previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = function () {\n var dataUri = previewReader.result;\n var blob = dataURItoBlob(dataUri);\n var videoSource = URL.createObjectURL(blob);\n _this2.setState({ videoSource: videoSource });\n };\n }\n }, {\n key: 'handleVideoLoadedData',\n value: function handleVideoLoadedData(event) {\n var duration = event.target.duration;\n var totalMinutes = Math.floor(duration / 60);\n var totalSeconds = Math.floor(duration % 60);\n // set the slider\n this.setState({\n sliderMaxRange: duration * 100,\n sliderValue: duration * 100 / 2,\n totalMinutes: totalMinutes,\n totalSeconds: totalSeconds\n });\n // update the current time of the video\n var video = document.getElementById('video-thumb-player');\n video.currentTime = duration / 2;\n }\n }, {\n key: 'handleSliderChange',\n value: function handleSliderChange(event) {\n var value = parseInt(event.target.value);\n // update the slider value\n this.setState({\n sliderValue: value\n });\n // update the current time of the video\n var video = document.getElementById('video-thumb-player');\n video.currentTime = value / 100;\n }\n }, {\n key: 'createThumbnail',\n value: function createThumbnail() {\n // take a snapshot\n var video = document.getElementById('video-thumb-player');\n var canvas = document.createElement('canvas');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);\n var dataUrl = canvas.toDataURL();\n var blob = dataURItoBlob(dataUrl);\n var snapshot = new File([blob], 'thumbnail.png', {\n type: 'image/png'\n });\n // set the thumbnail in redux store\n if (snapshot) {\n this.props.onNewThumbnail(snapshot);\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _state = this.state,\n error = _state.error,\n videoSource = _state.videoSource,\n sliderMinRange = _state.sliderMinRange,\n sliderMaxRange = _state.sliderMaxRange,\n sliderValue = _state.sliderValue,\n totalMinutes = _state.totalMinutes,\n totalSeconds = _state.totalSeconds;\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'label',\n { className: 'label' },\n 'Thumbnail:'\n ),\n _react2.default.createElement('video', {\n id: 'video-thumb-player',\n preload: 'metadata',\n muted: true,\n style: { display: 'none' },\n playsInline: true,\n onLoadedData: this.handleVideoLoadedData,\n src: videoSource,\n onSeeked: this.createThumbnail\n }),\n sliderValue ? _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'flex-container--row flex-container--space-between-center', style: { width: '100%' } },\n _react2.default.createElement(\n 'span',\n { className: 'info-message' },\n '0\\'00\"'\n ),\n _react2.default.createElement(\n 'span',\n { className: 'info-message' },\n totalMinutes,\n '\\'',\n totalSeconds,\n '\"'\n )\n ),\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('input', {\n type: 'range',\n min: sliderMinRange,\n max: sliderMaxRange,\n value: sliderValue,\n className: 'slider',\n onChange: this.handleSliderChange\n })\n )\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'loading... '\n ),\n error ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n error\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Use slider to set thumbnail'\n )\n );\n }\n }]);\n\n return PublishThumbnailInput;\n}(_react2.default.Component);\n\nexports.default = PublishThumbnailInput;\n\n/***/ }),\n/* 109 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(5);\n\nvar _view = __webpack_require__(110);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n showMetadataInputs: publish.showMetadataInputs,\n description: publish.metadata.description,\n license: publish.metadata.license,\n nsfw: publish.metadata.nsfw\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onMetadataChange: function onMetadataChange(name, value) {\n dispatch((0, _publish.updateMetadata)(name, value));\n },\n onToggleMetadataInputs: function onToggleMetadataInputs(value) {\n dispatch((0, _publish.toggleMetadataInputs)(value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 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 _ExpandingTextArea = __webpack_require__(111);\n\nvar _ExpandingTextArea2 = _interopRequireDefault(_ExpandingTextArea);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishMetadataInputs = function (_React$Component) {\n _inherits(PublishMetadataInputs, _React$Component);\n\n function PublishMetadataInputs(props) {\n _classCallCheck(this, PublishMetadataInputs);\n\n var _this = _possibleConstructorReturn(this, (PublishMetadataInputs.__proto__ || Object.getPrototypeOf(PublishMetadataInputs)).call(this, props));\n\n _this.toggleShowInputs = _this.toggleShowInputs.bind(_this);\n _this.handleInput = _this.handleInput.bind(_this);\n _this.handleSelect = _this.handleSelect.bind(_this);\n return _this;\n }\n\n _createClass(PublishMetadataInputs, [{\n key: 'toggleShowInputs',\n value: function toggleShowInputs() {\n this.props.onToggleMetadataInputs(!this.props.showMetadataInputs);\n }\n }, {\n key: 'handleInput',\n value: function handleInput(event) {\n var target = event.target;\n var value = target.type === 'checkbox' ? target.checked : target.value;\n var name = target.name;\n this.props.onMetadataChange(name, value);\n }\n }, {\n key: 'handleSelect',\n value: function handleSelect(event) {\n var name = event.target.name;\n var selectedOption = event.target.selectedOptions[0].value;\n this.props.onMetadataChange(name, selectedOption);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { id: 'publish-details', className: 'row row--padded row--no-top row--wide' },\n this.props.showMetadataInputs && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'row row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--med-10 align-content-top' },\n _react2.default.createElement(\n 'label',\n { htmlFor: 'publish-license', className: 'label' },\n 'Description:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7 column--sml-10' },\n _react2.default.createElement(_ExpandingTextArea2.default, {\n id: 'publish-description',\n className: 'textarea textarea--primary textarea--full-width',\n rows: 1,\n maxLength: 2000,\n style: { maxHeight: 200 },\n name: 'description',\n placeholder: 'Optional description',\n value: this.props.description,\n onChange: this.handleInput })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--med-10' },\n _react2.default.createElement(\n 'label',\n { htmlFor: 'publish-license', className: 'label' },\n 'License:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7 column--sml-10' },\n _react2.default.createElement(\n 'select',\n { type: 'text', name: 'license', id: 'publish-license', className: 'select select--primary', onChange: this.handleSelect },\n _react2.default.createElement(\n 'option',\n { value: ' ' },\n 'Unspecified'\n ),\n _react2.default.createElement(\n 'option',\n { value: 'Public Domain' },\n 'Public Domain'\n ),\n _react2.default.createElement(\n 'option',\n { value: 'Creative Commons' },\n 'Creative Commons'\n )\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'row row--no-top' },\n _react2.default.createElement(\n 'div',\n { className: 'column column--3' },\n _react2.default.createElement(\n 'label',\n { htmlFor: 'publish-nsfw', className: 'label' },\n 'Mature:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement('input', { className: 'input-checkbox', type: 'checkbox', id: 'publish-nsfw', name: 'nsfw', value: this.props.nsfw, onChange: this.handleInput })\n )\n )\n ),\n _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: this.toggleShowInputs },\n this.props.showMetadataInputs ? 'less' : 'more'\n )\n );\n }\n }]);\n\n return PublishMetadataInputs;\n}(_react2.default.Component);\n\nexports.default = PublishMetadataInputs;\n\n/***/ }),\n/* 111 */\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/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(5);\n\nvar _view = __webpack_require__(113);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var channel = _ref.channel,\n publish = _ref.publish;\n\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n publishInChannel: publish.publishInChannel,\n selectedChannel: publish.selectedChannel,\n channelError: publish.error.channel\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onPublishInChannelChange: function onPublishInChannelChange(value) {\n dispatch((0, _publish.updateError)('channel', null));\n dispatch((0, _publish.setPublishInChannel)(value));\n },\n onChannelSelect: function onChannelSelect(value) {\n dispatch((0, _publish.updateError)('channel', null));\n dispatch((0, _publish.updateSelectedChannel)(value));\n }\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 113 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _ChannelLoginForm = __webpack_require__(41);\n\nvar _ChannelLoginForm2 = _interopRequireDefault(_ChannelLoginForm);\n\nvar _ChannelCreateForm = __webpack_require__(42);\n\nvar _ChannelCreateForm2 = _interopRequireDefault(_ChannelCreateForm);\n\nvar _publish_channel_select_states = __webpack_require__(35);\n\nvar states = _interopRequireWildcard(_publish_channel_select_states);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ChannelSelect = function (_React$Component) {\n _inherits(ChannelSelect, _React$Component);\n\n function ChannelSelect(props) {\n _classCallCheck(this, ChannelSelect);\n\n var _this = _possibleConstructorReturn(this, (ChannelSelect.__proto__ || Object.getPrototypeOf(ChannelSelect)).call(this, props));\n\n _this.toggleAnonymousPublish = _this.toggleAnonymousPublish.bind(_this);\n _this.handleSelection = _this.handleSelection.bind(_this);\n return _this;\n }\n\n _createClass(ChannelSelect, [{\n key: 'toggleAnonymousPublish',\n value: function toggleAnonymousPublish(event) {\n var value = event.target.value;\n if (value === 'anonymous') {\n this.props.onPublishInChannelChange(false);\n } else {\n this.props.onPublishInChannelChange(true);\n }\n }\n }, {\n key: 'handleSelection',\n value: function handleSelection(event) {\n var selectedOption = event.target.selectedOptions[0].value;\n this.props.onChannelSelect(selectedOption);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'form',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'column column--3 column--med-10' },\n _react2.default.createElement('input', { type: 'radio', name: 'anonymous-or-channel', id: 'anonymous-radio', className: 'input-radio', value: 'anonymous', checked: !this.props.publishInChannel, onChange: this.toggleAnonymousPublish }),\n _react2.default.createElement(\n 'label',\n { className: 'label label--pointer', htmlFor: 'anonymous-radio' },\n 'Anonymous'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7 column--med-10' },\n _react2.default.createElement('input', { type: 'radio', name: 'anonymous-or-channel', id: 'channel-radio', className: 'input-radio', value: 'in a channel', checked: this.props.publishInChannel, onChange: this.toggleAnonymousPublish }),\n _react2.default.createElement(\n 'label',\n { className: 'label label--pointer', htmlFor: 'channel-radio' },\n 'In a channel'\n )\n ),\n this.props.channelError ? _react2.default.createElement(\n 'p',\n { className: 'info-message--failure' },\n this.props.channelError\n ) : _react2.default.createElement(\n 'p',\n { className: 'info-message' },\n 'Publish anonymously or in a channel'\n )\n ),\n this.props.publishInChannel && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'column column--3' },\n _react2.default.createElement(\n 'label',\n { className: 'label', htmlFor: 'channel-name-select' },\n 'Channel:'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'column column--7' },\n _react2.default.createElement(\n 'select',\n { type: 'text', id: 'channel-name-select', className: 'select select--arrow', value: this.props.selectedChannel, onChange: this.handleSelection },\n this.props.loggedInChannelName && _react2.default.createElement(\n 'option',\n { value: this.props.loggedInChannelName, id: 'publish-channel-select-channel-option' },\n this.props.loggedInChannelName\n ),\n _react2.default.createElement(\n 'option',\n { value: states.LOGIN },\n 'Existing'\n ),\n _react2.default.createElement(\n 'option',\n { value: states.CREATE },\n 'New'\n )\n )\n ),\n this.props.selectedChannel === states.LOGIN && _react2.default.createElement(_ChannelLoginForm2.default, null),\n this.props.selectedChannel === states.CREATE && _react2.default.createElement(_ChannelCreateForm2.default, null)\n )\n );\n }\n }]);\n\n return ChannelSelect;\n}(_react2.default.Component);\n\nexports.default = ChannelSelect;\n\n/***/ }),\n/* 114 */\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__(11);\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/* 115 */\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__(20);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _request = __webpack_require__(11);\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/* 116 */\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/* 117 */\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/* 118 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _publish = __webpack_require__(5);\n\nvar _view = __webpack_require__(119);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n status: publish.status.status,\n message: publish.status.message\n };\n};\n\nvar mapDispatchToProps = {\n clearFile: _publish.clearFile\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view2.default);\n\n/***/ }),\n/* 119 */\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__(20);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _publish_claim_states = __webpack_require__(120);\n\nvar publishStates = _interopRequireWildcard(_publish_claim_states);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishStatus = function (_React$Component) {\n _inherits(PublishStatus, _React$Component);\n\n function PublishStatus() {\n _classCallCheck(this, PublishStatus);\n\n return _possibleConstructorReturn(this, (PublishStatus.__proto__ || Object.getPrototypeOf(PublishStatus)).apply(this, arguments));\n }\n\n _createClass(PublishStatus, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n status = _props.status,\n message = _props.message,\n clearFile = _props.clearFile;\n\n return _react2.default.createElement(\n 'div',\n { className: 'row row--tall flex-container--column flex-container--center-center' },\n status === publishStates.LOAD_START && _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'File is loading to server'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'blue' },\n '0%'\n )\n ),\n status === publishStates.LOADING && _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'File is loading to server'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'blue' },\n message\n )\n )\n ),\n status === publishStates.PUBLISHING && _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'Upload complete. Your file is now being published on the blockchain...'\n ),\n _react2.default.createElement(_ProgressBar2.default, { size: 12 }),\n _react2.default.createElement(\n 'p',\n null,\n 'Curious what magic is happening here? ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: 'blank', href: 'https://lbry.io/faq/what-is-lbry' },\n 'Learn more.'\n )\n )\n ),\n status === publishStates.SUCCESS && _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'Your publish is complete! You are being redirected to it now.'\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'If you are not automatically redirected, ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', target: '_blank', href: message },\n 'click here.'\n )\n )\n ),\n status === publishStates.FAILED && _react2.default.createElement(\n 'div',\n { className: 'row align-content-center' },\n _react2.default.createElement(\n 'p',\n null,\n 'Something went wrong...'\n ),\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'strong',\n null,\n message\n )\n ),\n _react2.default.createElement(\n 'p',\n null,\n 'For help, post the above error text in the #speech channel on the ',\n _react2.default.createElement(\n 'a',\n { className: 'link--primary', href: 'https://discord.gg/YjYbwhS', target: '_blank' },\n 'lbry discord'\n )\n ),\n _react2.default.createElement(\n 'button',\n { className: 'button--secondary', onClick: clearFile },\n 'Reset'\n )\n )\n );\n }\n }]);\n\n return PublishStatus;\n}(_react2.default.Component);\n\n;\n\nexports.default = PublishStatus;\n\n/***/ }),\n/* 120 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LOAD_START = exports.LOAD_START = 'LOAD_START';\nvar LOADING = exports.LOADING = 'LOADING';\nvar PUBLISHING = exports.PUBLISHING = 'PUBLISHING';\nvar SUCCESS = exports.SUCCESS = 'SUCCESS';\nvar FAILED = exports.FAILED = 'FAILED';\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(122);\n\nvar _view2 = _interopRequireDefault(_view);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mapStateToProps = function mapStateToProps(_ref) {\n var publish = _ref.publish;\n\n return {\n message: publish.disabledMessage\n };\n};\n\nexports.default = (0, _reactRedux.connect)(mapStateToProps, null)(_view2.default);\n\n/***/ }),\n/* 122 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PublishDisabledMessage = function (_React$Component) {\n _inherits(PublishDisabledMessage, _React$Component);\n\n function PublishDisabledMessage() {\n _classCallCheck(this, PublishDisabledMessage);\n\n return _possibleConstructorReturn(this, (PublishDisabledMessage.__proto__ || Object.getPrototypeOf(PublishDisabledMessage)).apply(this, arguments));\n }\n\n _createClass(PublishDisabledMessage, [{\n key: 'render',\n value: function render() {\n var message = this.props.message;\n console.log('this.props.message:', message);\n return _react2.default.createElement(\n 'div',\n { className: 'row dropzone--disabled row--tall flex-container--column flex-container--center-center' },\n _react2.default.createElement(\n 'p',\n { className: 'text--disabled' },\n 'Publishing is currently disabled.'\n ),\n _react2.default.createElement(\n 'p',\n { className: 'text--disabled' },\n message\n )\n );\n }\n }]);\n\n return PublishDisabledMessage;\n}(_react2.default.Component);\n\nexports.default = PublishDisabledMessage;\n\n/***/ }),\n/* 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__(7);\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/* 124 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(125);\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/* 125 */\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__(7);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelLoginForm = __webpack_require__(41);\n\nvar _ChannelLoginForm2 = _interopRequireDefault(_ChannelLoginForm);\n\nvar _ChannelCreateForm = __webpack_require__(42);\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/* 126 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _show = __webpack_require__(8);\n\nvar _view = __webpack_require__(127);\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/* 127 */\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__(21);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _ShowAssetLite = __webpack_require__(128);\n\nvar _ShowAssetLite2 = _interopRequireDefault(_ShowAssetLite);\n\nvar _ShowAssetDetails = __webpack_require__(131);\n\nvar _ShowAssetDetails2 = _interopRequireDefault(_ShowAssetDetails);\n\nvar _ShowChannel = __webpack_require__(137);\n\nvar _ShowChannel2 = _interopRequireDefault(_ShowChannel);\n\nvar _show_request_types = __webpack_require__(43);\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/* 128 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(129);\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/* 129 */\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__(44);\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/* 130 */\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__(20);\n\nvar _ProgressBar2 = _interopRequireDefault(_ProgressBar);\n\nvar _asset_display_states = __webpack_require__(37);\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/* 131 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(132);\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/* 132 */\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__(7);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ErrorPage = __webpack_require__(21);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _AssetTitle = __webpack_require__(133);\n\nvar _AssetTitle2 = _interopRequireDefault(_AssetTitle);\n\nvar _AssetDisplay = __webpack_require__(44);\n\nvar _AssetDisplay2 = _interopRequireDefault(_AssetDisplay);\n\nvar _AssetInfo = __webpack_require__(135);\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/* 133 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(134);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(13);\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/* 134 */\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/* 135 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(136);\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _show = __webpack_require__(13);\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/* 136 */\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/* 137 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _view = __webpack_require__(138);\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/* 138 */\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__(21);\n\nvar _ErrorPage2 = _interopRequireDefault(_ErrorPage);\n\nvar _NavBar = __webpack_require__(7);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _ChannelClaimsDisplay = __webpack_require__(139);\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/* 139 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _show = __webpack_require__(8);\n\nvar _view = __webpack_require__(140);\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/* 140 */\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__(141);\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/* 141 */\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 _require = __webpack_require__(3),\n defaultThumbnail = _require.assetDefaults.thumbnail;\n\nvar AssetPreview = function AssetPreview(_ref) {\n var _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/* 142 */\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__(7);\n\nvar _NavBar2 = _interopRequireDefault(_NavBar);\n\nvar _reactHelmet = __webpack_require__(14);\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 _require = __webpack_require__(3),\n _require$details = _require.details,\n title = _require$details.title,\n host = _require$details.host;\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 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/* 143 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _require = __webpack_require__(17),\n sendGAServeEvent = _require.sendGAServeEvent;\n\nvar _require2 = __webpack_require__(144),\n determineResponseType = _require2.determineResponseType,\n flipClaimNameAndIdForBackwardsCompatibility = _require2.flipClaimNameAndIdForBackwardsCompatibility,\n logRequestData = _require2.logRequestData,\n getClaimIdAndServeAsset = _require2.getClaimIdAndServeAsset;\n\nvar lbryUri = __webpack_require__(145);\nvar handleShowRender = __webpack_require__(146);\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/* 144 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar logger = __webpack_require__(2);\n\nvar _require = __webpack_require__(30),\n getClaimId = _require.getClaimId,\n getLocalFileRecord = _require.getLocalFileRecord;\n\nvar _require2 = __webpack_require__(29),\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/* 145 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar logger = __webpack_require__(2);\n\nmodule.exports = {\n REGEXP_INVALID_CLAIM: /[^A-Za-z0-9-]/g,\n REGEXP_INVALID_CHANNEL: /[^A-Za-z0-9-@]/g,\n REGEXP_ADDRESS: /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,\n CHANNEL_CHAR: '@',\n parseIdentifier: function parseIdentifier(identifier) {\n logger.debug('parsing identifier:', identifier);\n var componentsRegex = new RegExp('([^:$#/]*)' + // value (stops at the first separator or end)\n '([:$#]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec = componentsRegex.exec(identifier).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec2 = _slicedToArray(_componentsRegex$exec, 4),\n proto = _componentsRegex$exec2[0],\n value = _componentsRegex$exec2[1],\n modifierSeperator = _componentsRegex$exec2[2],\n modifier = _componentsRegex$exec2[3];\n\n logger.debug(proto + ', ' + value + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!value) {\n throw new Error('Check your url. No channel name provided before \"' + modifierSeperator + '\"');\n }\n var isChannel = value.startsWith(module.exports.CHANNEL_CHAR);\n var channelName = isChannel ? value : null;\n var claimId = void 0;\n if (isChannel) {\n if (!channelName) {\n throw new Error('No channel name after @.');\n }\n var nameBadChars = channelName.match(module.exports.REGEXP_INVALID_CHANNEL);\n if (nameBadChars) {\n throw new Error('Invalid characters in channel name: ' + nameBadChars.join(', ') + '.');\n }\n } else {\n claimId = value;\n }\n\n // Validate and process modifier\n var channelClaimId = void 0;\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No modifier provided after separator \"' + modifierSeperator + '\"');\n }\n\n if (modifierSeperator === ':') {\n channelClaimId = modifier;\n } else {\n throw new Error('The \"' + modifierSeperator + '\" modifier is not currently supported');\n }\n }\n return {\n isChannel: isChannel,\n channelName: channelName,\n channelClaimId: channelClaimId,\n claimId: claimId\n };\n },\n parseClaim: function parseClaim(claim) {\n logger.debug('parsing name:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec3 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec4 = _slicedToArray(_componentsRegex$exec3, 4),\n proto = _componentsRegex$exec4[0],\n claimName = _componentsRegex$exec4[1],\n modifierSeperator = _componentsRegex$exec4[2],\n modifier = _componentsRegex$exec4[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n\n // Validate and process name\n if (!claimName) {\n throw new Error('No claim name provided before .');\n }\n var nameBadChars = claimName.match(module.exports.REGEXP_INVALID_CLAIM);\n if (nameBadChars) {\n throw new Error('Invalid characters in claim name: ' + nameBadChars.join(', ') + '.');\n }\n // Validate and process modifier\n if (modifierSeperator) {\n if (!modifier) {\n throw new Error('No file extension provided after separator ' + modifierSeperator + '.');\n }\n if (modifierSeperator !== '.') {\n throw new Error('The ' + modifierSeperator + ' modifier is not supported in the claim name');\n }\n }\n // return results\n return {\n claimName: claimName\n };\n },\n parseModifier: function parseModifier(claim) {\n logger.debug('parsing modifier:', claim);\n var componentsRegex = new RegExp('([^:$#/.]*)' + // name (stops at the first modifier)\n '([:$#.]?)([^/]*)' // modifier separator, modifier (stops at the first path separator or end)\n );\n\n var _componentsRegex$exec5 = componentsRegex.exec(claim).map(function (match) {\n return match || null;\n }),\n _componentsRegex$exec6 = _slicedToArray(_componentsRegex$exec5, 4),\n proto = _componentsRegex$exec6[0],\n claimName = _componentsRegex$exec6[1],\n modifierSeperator = _componentsRegex$exec6[2],\n modifier = _componentsRegex$exec6[3];\n\n logger.debug(proto + ', ' + claimName + ', ' + modifierSeperator + ', ' + modifier);\n // Validate and process modifier\n var hasFileExtension = false;\n if (modifierSeperator) {\n hasFileExtension = true;\n }\n return {\n hasFileExtension: hasFileExtension\n };\n }\n};\n\n/***/ }),\n/* 146 */\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__(32);\n\nvar _redux = __webpack_require__(18);\n\nvar _reducers = __webpack_require__(33);\n\nvar _reducers2 = _interopRequireDefault(_reducers);\n\nvar _reactRedux = __webpack_require__(1);\n\nvar _reactRouterDom = __webpack_require__(4);\n\nvar _GAListener = __webpack_require__(38);\n\nvar _GAListener2 = _interopRequireDefault(_GAListener);\n\nvar _app = __webpack_require__(39);\n\nvar _app2 = _interopRequireDefault(_app);\n\nvar _renderFullPage = __webpack_require__(45);\n\nvar _renderFullPage2 = _interopRequireDefault(_renderFullPage);\n\nvar _reduxSaga = __webpack_require__(147);\n\nvar _reduxSaga2 = _interopRequireDefault(_reduxSaga);\n\nvar _effects = __webpack_require__(15);\n\nvar _show_uri = __webpack_require__(148);\n\nvar _show = __webpack_require__(8);\n\nvar _reactHelmet = __webpack_require__(14);\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)(_reducers2.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 _GAListener2.default,\n null,\n _react2.default.createElement(_app2.default, null)\n )\n )\n ));\n\n // get head tags from helmet\n var helmet = _reactHelmet2.default.renderStatic();\n\n // check for a redirect\n if (context.url) {\n 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/* 147 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"redux-saga\");\n\n/***/ }),\n/* 148 */\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__(15);\n\nvar _show_action_types = __webpack_require__(12);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(8);\n\nvar _show_asset = __webpack_require__(149);\n\nvar _show_channel = __webpack_require__(151);\n\nvar _lbryUri = __webpack_require__(153);\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/* 149 */\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__(15);\n\nvar _show_action_types = __webpack_require__(12);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(8);\n\nvar _assetApi = __webpack_require__(150);\n\nvar _show2 = __webpack_require__(13);\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, 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\n if (!state.requestList[requestId]) {\n _context.next = 8;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 8:\n // get long id && add request to request list\n longId = void 0;\n _context.prev = 9;\n _context.next = 12;\n return (0, _effects.call)(_assetApi.getLongClaimId, name, modifier);\n\n case 12:\n _ref = _context.sent;\n longId = _ref.data;\n _context.next = 21;\n break;\n\n case 16:\n _context.prev = 16;\n _context.t0 = _context['catch'](9);\n _context.next = 20;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 20:\n return _context.abrupt('return', _context.sent);\n\n case 21:\n assetKey = 'a#' + name + '#' + longId;\n _context.next = 24;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, assetKey));\n\n case 24:\n if (!state.assetList[assetKey]) {\n _context.next = 26;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 26:\n // get short Id\n shortId = void 0;\n _context.prev = 27;\n _context.next = 30;\n return (0, _effects.call)(_assetApi.getShortId, name, longId);\n\n case 30:\n _ref2 = _context.sent;\n shortId = _ref2.data;\n _context.next = 39;\n break;\n\n case 34:\n _context.prev = 34;\n _context.t1 = _context['catch'](27);\n _context.next = 38;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 38:\n return _context.abrupt('return', _context.sent);\n\n case 39:\n // get asset claim data\n claimData = void 0;\n _context.prev = 40;\n _context.next = 43;\n return (0, _effects.call)(_assetApi.getClaimData, name, longId);\n\n case 43:\n _ref3 = _context.sent;\n claimData = _ref3.data;\n _context.next = 52;\n break;\n\n case 47:\n _context.prev = 47;\n _context.t2 = _context['catch'](40);\n _context.next = 51;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t2.message));\n\n case 51:\n return _context.abrupt('return', _context.sent);\n\n case 52:\n _context.next = 54;\n return (0, _effects.put)((0, _show.addAssetToAssetList)(assetKey, null, name, longId, shortId, claimData));\n\n case 54:\n _context.next = 56;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 56:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[9, 16], [27, 34], [40, 47]]);\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/* 150 */\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__(11);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _require = __webpack_require__(3),\n host = _require.details.host;\n\nfunction getLongClaimId(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(name, claimId) {\n var url = host + '/api/claim/short-id/' + claimId + '/' + name;\n return (0, _request2.default)(url);\n};\n\nfunction getClaimData(name, claimId) {\n var url = host + '/api/claim/data/' + name + '/' + claimId;\n return (0, _request2.default)(url);\n};\n\n/***/ }),\n/* 151 */\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__(15);\n\nvar _show_action_types = __webpack_require__(12);\n\nvar actions = _interopRequireWildcard(_show_action_types);\n\nvar _show = __webpack_require__(8);\n\nvar _channelApi = __webpack_require__(152);\n\nvar _show2 = __webpack_require__(13);\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, 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\n if (!state.requestList[requestId]) {\n _context.next = 8;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 8:\n // get channel long id\n longId = void 0, shortId = void 0;\n _context.prev = 9;\n _context.next = 12;\n return (0, _effects.call)(_channelApi.getChannelData, channelName, channelId);\n\n case 12:\n _ref = _context.sent;\n _ref$data = _ref.data;\n longId = _ref$data.longChannelClaimId;\n shortId = _ref$data.shortChannelClaimId;\n _context.next = 23;\n break;\n\n case 18:\n _context.prev = 18;\n _context.t0 = _context['catch'](9);\n _context.next = 22;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t0.message));\n\n case 22:\n return _context.abrupt('return', _context.sent);\n\n case 23:\n // store the request in the channel requests list\n channelKey = 'c#' + channelName + '#' + longId;\n _context.next = 26;\n return (0, _effects.put)((0, _show.addRequestToRequestList)(requestId, null, channelKey));\n\n case 26:\n if (!state.channelList[channelKey]) {\n _context.next = 28;\n break;\n }\n\n return _context.abrupt('return', null);\n\n case 28:\n // get channel claims data\n claimsData = void 0;\n _context.prev = 29;\n _context.next = 32;\n return (0, _effects.call)(_channelApi.getChannelClaims, channelName, longId, 1);\n\n case 32:\n _ref2 = _context.sent;\n claimsData = _ref2.data;\n _context.next = 41;\n break;\n\n case 36:\n _context.prev = 36;\n _context.t1 = _context['catch'](29);\n _context.next = 40;\n return (0, _effects.put)((0, _show.onRequestError)(_context.t1.message));\n\n case 40:\n return _context.abrupt('return', _context.sent);\n\n case 41:\n _context.next = 43;\n return (0, _effects.put)((0, _show.addNewChannelToChannelList)(channelKey, channelName, shortId, longId, claimsData));\n\n case 43:\n _context.next = 45;\n return (0, _effects.put)((0, _show.onRequestError)(null));\n\n case 45:\n case 'end':\n return _context.stop();\n }\n }\n }, _marked, this, [[9, 18], [29, 36]]);\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, 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 claimsData = void 0;\n _context3.prev = 2;\n _context3.next = 5;\n return (0, _effects.call)(_channelApi.getChannelClaims, name, longId, page);\n\n case 5:\n _ref3 = _context3.sent;\n claimsData = _ref3.data;\n _context3.next = 14;\n break;\n\n case 9:\n _context3.prev = 9;\n _context3.t0 = _context3['catch'](2);\n _context3.next = 13;\n return (0, _effects.put)((0, _show.onRequestError)(_context3.t0.message));\n\n case 13:\n return _context3.abrupt('return', _context3.sent);\n\n case 14:\n _context3.next = 16;\n return (0, _effects.put)((0, _show.updateChannelClaims)(channelKey, claimsData));\n\n case 16:\n case 'end':\n return _context3.stop();\n }\n }\n }, _marked3, this, [[2, 9]]);\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/* 152 */\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__(11);\n\nvar _request2 = _interopRequireDefault(_request);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _require = __webpack_require__(3),\n host = _require.details.host;\n\nfunction getChannelData(name, id) {\n if (!id) id = 'none';\n var url = host + '/api/channel/data/' + name + '/' + id;\n return (0, _request2.default)(url);\n};\n\nfunction getChannelClaims(name, longId, 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/* 153 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\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/* 154 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar handlePageRender = __webpack_require__(31);\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/******/ ]);\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 = 46);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap ad5c54313d78fb451a0c","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 0\n// module chunks = 0","module.exports = require(\"react-redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-redux\"\n// module id = 1\n// module chunks = 0","module.exports = require(\"winston\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston\"\n// module id = 2\n// module chunks = 0","function SiteConfig () {\n this.analytics = {\n googleId: 'default',\n };\n this.assetDefaults = {\n title : 'Spee.ch',\n thumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',\n description: 'Open-source, decentralized image and video sharing.',\n };\n this.auth = {\n sessionKey: 'default',\n };\n this.details = {\n port : 3000,\n title : 'Spee.ch',\n host : 'default',\n description: 'Open-source, decentralized image and video sharing.',\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, details, publishing } = config;\n this.analytics = analytics;\n this.assetDefaults = assetDefaults;\n this.auth = auth;\n this.details = details;\n this.publishing = publishing;\n };\n};\n\nmodule.exports = new SiteConfig();\n\n\n\n// WEBPACK FOOTER //\n// ./config/siteConfig.js","module.exports = require(\"react-router-dom\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-router-dom\"\n// module id = 4\n// module chunks = 0","import * 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// ./react/actions/publish.js","const Sequelize = require('sequelize');\nconst logger = require('winston');\n\nconsole.log('exporting sequelize models');\nconst { database, username, password } = require('../config/mysqlConfig');\nconst db = {};\n// set sequelize options\nconst sequelize = new Sequelize(database, username, password, {\n host : 'localhost',\n dialect : 'mysql',\n dialectOptions: {decimalNumbers: true}, // fix to ensure DECIMAL will not be stored as a string\n logging : false,\n pool : {\n max : 5,\n min : 0,\n idle : 10000,\n acquire: 10000,\n },\n});\n\n// establish mysql connection\nsequelize\n .authenticate()\n .then(() => {\n logger.info('Sequelize has established mysql connection successfully.');\n })\n .catch(err => {\n logger.error('Sequelize was unable to connect to the database:', err);\n });\n\n// manually add each model to the db object\nconst Certificate = require('./certificate.js');\nconst Channel = require('./channel.js');\nconst Claim = require('./claim.js');\nconst File = require('./file.js');\nconst Request = require('./request.js');\nconst User = require('./user.js');\ndb['Certificate'] = sequelize.import('Certificate', Certificate);\ndb['Channel'] = sequelize.import('Channel', Channel);\ndb['Claim'] = sequelize.import('Claim', Claim);\ndb['File'] = sequelize.import('File', File);\ndb['Request'] = sequelize.import('Request', Request);\ndb['User'] = sequelize.import('User', User);\n\n// run model.association for each model in the db object that has an association\nObject.keys(db).forEach(modelName => {\n if (db[modelName].associate) {\n logger.info('Associating model:', modelName);\n db[modelName].associate(db);\n }\n});\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\n// add an 'upsert' method to the db object\ndb.upsert = (Model, values, condition, tableName) => {\n return Model\n .findOne({\n where: condition,\n })\n .then(obj => {\n if (obj) { // update\n logger.debug(`updating record in db.${tableName}`);\n return obj.update(values);\n } else { // insert\n logger.debug(`creating record in db.${tableName}`);\n return Model.create(values);\n }\n })\n .catch(function (error) {\n logger.error(`${tableName}.upsert error`, error);\n throw error;\n });\n};\n\nmodule.exports = db;\n\n\n\n// WEBPACK FOOTER //\n// ./models/index.js","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from '../../actions/publish';\n\nconst mapStateToProps = ({ channel }) => {\n return {\n channelName : channel.loggedInChannel.name,\n channelShortId: channel.loggedInChannel.shortId,\n channelLongId : channel.loggedInChannel.longId,\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// ./react/containers/NavBar/index.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// ./react/actions/show.js","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 let { pageTitle, asset, channel, pageUri } = this.props;\n pageTitle = createPageTitle(pageTitle);\n const metaTags = createMetaTags(asset, channel);\n const canonicalLink = createCanonicalLink(asset, channel, pageUri);\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// ./react/components/SEO/index.jsx","module.exports = require(\"prop-types\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 10\n// module chunks = 0","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// ./react/utils/request.js","// request actions\nexport const HANDLE_SHOW_URI = 'HANDLE_SHOW_URI';\nexport const REQUEST_ERROR = 'REQUEST_ERROR';\nexport const REQUEST_UPDATE = 'REQUEST_UPDATE';\nexport const ASSET_REQUEST_NEW = 'ASSET_REQUEST_NEW';\nexport const CHANNEL_REQUEST_NEW = 'CHANNEL_REQUEST_NEW';\nexport const REQUEST_LIST_ADD = 'REQUEST_LIST_ADD';\n\n// asset actions\nexport const ASSET_ADD = `ASSET_ADD`;\n\n// channel actions\nexport const CHANNEL_ADD = 'CHANNEL_ADD';\n\nexport const CHANNEL_CLAIMS_UPDATE_ASYNC = 'CHANNEL_CLAIMS_UPDATE_ASYNC';\nexport const CHANNEL_CLAIMS_UPDATE_SUCCESS = 'CHANNEL_CLAIMS_UPDATE_SUCCESS';\n\n// asset/file display actions\nexport const FILE_REQUESTED = 'FILE_REQUESTED';\nexport const FILE_AVAILABILITY_UPDATE = 'FILE_AVAILABILITY_UPDATE';\nexport const DISPLAY_ASSET_ERROR = 'DISPLAY_ASSET_ERROR';\n\n\n\n// WEBPACK FOOTER //\n// ./react/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// ./react/selectors/show.js","module.exports = require(\"react-helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-helmet\"\n// module id = 14\n// module chunks = 0","module.exports = require(\"redux-saga/effects\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga/effects\"\n// module id = 15\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// ./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// ./helpers/googleAnalytics.js","module.exports = require(\"redux\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux\"\n// module id = 18\n// module chunks = 0","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// ./react/actions/channel.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// ./react/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// ./react/components/ErrorPage/index.jsx","module.exports = require(\"passport\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"passport\"\n// module id = 22\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 = 25\n// module chunks = 0","module.exports = require(\"sequelize\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"sequelize\"\n// module id = 26\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// ./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// ./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// ./helpers/errorHandlers.js","const db = require('../models');\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// ./controllers/serveController.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore } from 'redux';\nimport Reducer from '../react/reducers';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../react/components/GAListener';\nimport App from '../react/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// ./helpers/handlePageRender.jsx","module.exports = require(\"react-dom/server\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-dom/server\"\n// module id = 32\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// ./react/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// ./react/constants/publish_action_types.js","export const LOGIN = 'Existing';\nexport const CREATE = 'New';\n\n\n\n// WEBPACK FOOTER //\n// ./react/constants/publish_channel_select_states.js","export const CHANNEL_UPDATE = 'CHANNEL_UPDATE';\n\n\n\n// WEBPACK FOOTER //\n// ./react/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// ./react/constants/asset_display_states.js","import React from 'react';\nimport GoogleAnalytics from 'react-ga';\nimport { withRouter } from 'react-router-dom';\nconst {analytics: googleId} = require('../../../config/siteConfig.js');\n\nGoogleAnalytics.initialize(googleId);\n\nclass GAListener extends React.Component {\n componentDidMount () {\n this.sendPageView(this.props.history.location);\n this.props.history.listen(this.sendPageView);\n }\n\n sendPageView (location) {\n GoogleAnalytics.set({ page: location.pathname });\n GoogleAnalytics.pageview(location.pathname);\n }\n\n render () {\n return this.props.children;\n }\n}\n\nexport default withRouter(GAListener);\n\n\n\n// WEBPACK FOOTER //\n// ./react/components/GAListener/index.jsx","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport HomePage from 'components/HomePage';\nimport AboutPage from 'components/AboutPage';\nimport LoginPage from 'containers/LoginPage';\nimport ShowPage from 'containers/ShowPage';\nimport FourOhFourPage from 'components/FourOhFourPage';\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// ./react/app.js","import { connect } from 'react-redux';\nimport { selectFile, updateError, clearFile } from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n file : publish.file,\n thumbnail: publish.thumbnail,\n fileError: publish.error.file,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n selectFile: (file) => {\n dispatch(selectFile(file));\n },\n setFileError: (value) => {\n dispatch(clearFile());\n dispatch(updateError('file', value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/Dropzone/index.js","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from '../../actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/ChannelLoginForm/index.js","import { connect } from 'react-redux';\nimport { updateLoggedInChannel } from 'actions/channel';\nimport View from './view';\nimport {updateSelectedChannel} from 'actions/publish';\n\nconst mapDispatchToProps = dispatch => {\n return {\n onChannelLogin: (name, shortId, longId) => {\n dispatch(updateLoggedInChannel(name, shortId, longId));\n dispatch(updateSelectedChannel(name));\n },\n };\n};\n\nexport default connect(null, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/ChannelCreateForm/index.js","export const CHANNEL = 'CHANNEL';\nexport const ASSET_LITE = 'ASSET_LITE';\nexport const ASSET_DETAILS = 'ASSET_DETAILS';\n\n\n\n// WEBPACK FOOTER //\n// ./react/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// ./react/containers/AssetDisplay/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// ./helpers/renderFullPage.js","module.exports = require(\"babel-polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"babel-polyfill\"\n// module id = 47\n// module chunks = 0","module.exports = require(\"whatwg-fetch\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"whatwg-fetch\"\n// module id = 48\n// module chunks = 0","// app dependencies\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst expressHandlebars = require('express-handlebars');\nconst Handlebars = require('handlebars');\nconst helmet = require('helmet');\nconst passport = require('passport');\nconst { populateLocalsDotUser, 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 ({ mysqlConfig, siteConfig, slackConfig }) {\n this.start = () => {\n this.configureConfigFiles();\n this.configureLogging();\n this.configureApp();\n this.configureServer();\n this.startServer();\n };\n this.configureConfigFiles = () => {\n const mysqlAppConfig = require('./config/mysqlConfig.js');\n mysqlAppConfig.configure(mysqlConfig);\n const siteAppConfig = require('./config/siteConfig.js');\n siteAppConfig.configure(siteConfig);\n this.PORT = siteAppConfig.details.port;\n const slackAppConfig = require('./config/slackConfig.js');\n slackAppConfig.configure(slackConfig);\n };\n this.configureLogging = () => {\n require('./helpers/configureLogger.js')(logger);\n require('./helpers/configureSlack.js')(logger);\n };\n this.configureApp = () => {\n const app = express(); // create an Express application\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 : [siteConfig.auth.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 // middleware to pass user info back to client (for handlebars access), if user is logged in\n app.use(populateLocalsDotUser); // note: I don't think I need this any more?\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/serve-routes.js')(app);\n require('./routes/fallback-routes.js')(app);\n\n this.app = app;\n };\n this.configureServer = () => {\n this.server = http.Server(this.app);\n };\n this.startServer = () => {\n const db = require('./models');\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.js","module.exports = require(\"express\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express\"\n// module id = 50\n// module chunks = 0","module.exports = require(\"body-parser\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"body-parser\"\n// module id = 51\n// module chunks = 0","module.exports = require(\"express-handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"express-handlebars\"\n// module id = 52\n// module chunks = 0","module.exports = require(\"handlebars\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"handlebars\"\n// module id = 53\n// module chunks = 0","module.exports = require(\"helmet\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"helmet\"\n// module id = 54\n// module chunks = 0","const logger = require('winston');\n\nmodule.exports = {\n populateLocalsDotUser (req, res, next) {\n if (req.user) {\n logger.debug('populating res.locals.user');\n res.locals.user = {\n id : req.user.id,\n userName : req.user.userName,\n channelName : req.user.channelName,\n channelClaimId: req.user.channelClaimId,\n shortChannelId: req.user.shortChannelId,\n };\n }\n next();\n },\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// ./helpers/authHelpers.js","module.exports = require(\"cookie-session\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cookie-session\"\n// module id = 56\n// module chunks = 0","module.exports = require(\"http\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"http\"\n// module id = 57\n// module chunks = 0","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// ./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// ./helpers/configureSlack.js","module.exports = require(\"winston-slack-webhook\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"winston-slack-webhook\"\n// module id = 61\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst lbryApi = require('../helpers/lbryApi.js');\nconst logger = require('winston');\nconst db = require('../models');\n\nmodule.exports = new PassportLocalStrategy(\n {\n usernameField: 'username',\n passwordField: 'password',\n },\n (username, password, done) => {\n logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`);\n let userInfo = {};\n // server-side validaton of inputs (username, password)\n\n // create the channel and retrieve the metadata\n return lbryApi.createChannel(`@${username}`)\n .then(tx => {\n // create user record\n const userData = {\n userName: username,\n password: password,\n };\n logger.verbose('userData >', userData);\n // create user record\n const channelData = {\n channelName : `@${username}`,\n channelClaimId: tx.claim_id,\n };\n logger.verbose('channelData >', channelData);\n // create certificate record\n const certificateData = {\n claimId: tx.claim_id,\n name : `@${username}`,\n // address,\n };\n logger.verbose('certificateData >', certificateData);\n // save user and certificate to db\n return Promise.all([db.User.create(userData), db.Channel.create(channelData), db.Certificate.create(certificateData)]);\n })\n .then(([newUser, newChannel, newCertificate]) => {\n logger.verbose('user and certificate successfully created');\n // store the relevant newUser info to be passed back for req.User\n userInfo['id'] = newUser.id;\n userInfo['userName'] = newUser.userName;\n userInfo['channelName'] = newChannel.channelName;\n userInfo['channelClaimId'] = newChannel.channelClaimId;\n // associate the instances\n return Promise.all([newCertificate.setChannel(newChannel), newChannel.setUser(newUser)]);\n })\n .then(() => {\n logger.verbose('user and certificate successfully associated');\n return db.Certificate.getShortChannelIdFromLongChannelId(userInfo.channelClaimId, userInfo.channelName);\n })\n .then(shortChannelId => {\n userInfo['shortChannelId'] = shortChannelId;\n return done(null, userInfo);\n })\n .catch(error => {\n logger.error('signup error', error);\n return done(error);\n });\n }\n);\n\n\n\n// WEBPACK FOOTER //\n// ./passport/local-signup.js","module.exports = require(\"axios\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"axios\"\n// module id = 63\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 = 65\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// ./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// ./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// ./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// ./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// ./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// ./models/user.js","module.exports = require(\"bcrypt\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"bcrypt\"\n// module id = 72\n// module chunks = 0","const PassportLocalStrategy = require('passport-local').Strategy;\nconst logger = require('winston');\nconst db = require('../models');\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// ./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 logger.debug('info:', 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// ./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');\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// ./routes/api-routes.js","module.exports = require(\"connect-multiparty\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"connect-multiparty\"\n// module id = 76\n// module chunks = 0","const logger = require('winston');\nconst db = require('../models');\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// ./controllers/publishController.js","module.exports = require(\"fs\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"fs\"\n// module id = 78\n// module chunks = 0","const db = require('../models');\nconst logger = require('winston');\n\nmodule.exports = {\n authenticateUser (channelName, channelId, channelPassword, user) {\n // case: no channelName or channel Id are provided (anonymous), regardless of whether user token is provided\n if (!channelName && !channelId) {\n return {\n channelName : null,\n channelClaimId: null,\n };\n }\n // case: channelName or channel Id are provided with user token\n if (user) {\n if (channelName && channelName !== user.channelName) {\n throw new Error('the provided channel name does not match user credentials');\n }\n if (channelId && channelId !== user.channelClaimId) {\n throw new Error('the provided channel id does not match user credentials');\n }\n return {\n channelName : user.channelName,\n channelClaimId: user.channelClaimId,\n };\n }\n // case: channelName or channel Id are provided with password instead of user token\n if (!channelPassword) throw new Error('no channel password provided');\n return module.exports.authenticateChannelCredentials(channelName, channelId, channelPassword);\n },\n authenticateChannelCredentials (channelName, channelId, userPassword) {\n return new Promise((resolve, reject) => {\n // hoisted variables\n let channelData;\n // build the params for finding the channel\n let channelFindParams = {};\n if (channelName) channelFindParams['channelName'] = channelName;\n if (channelId) channelFindParams['channelClaimId'] = channelId;\n // find the channel\n db.Channel\n .findOne({\n where: channelFindParams,\n })\n .then(channel => {\n if (!channel) {\n logger.debug('no channel found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n channelData = channel.get();\n logger.debug('channel data:', channelData);\n return db.User.findOne({\n where: { userName: channelData.channelName.substring(1) },\n });\n })\n .then(user => {\n if (!user) {\n logger.debug('no user found');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n return user.comparePassword(userPassword);\n })\n .then(isMatch => {\n if (!isMatch) {\n logger.debug('incorrect password');\n throw new Error('Authentication failed, you do not have access to that channel');\n }\n logger.debug('...password was a match...');\n resolve(channelData);\n })\n .catch(error => {\n reject(error);\n });\n });\n },\n};\n\n\n\n// WEBPACK FOOTER //\n// ./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// ./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// ./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// ./react/reducers/publish.js","import * as actions from 'constants/channel_action_types';\n\nconst initialState = {\n loggedInChannel: {\n name : null,\n shortId: null,\n longId : null,\n },\n};\n\nexport default function (state = initialState, action) {\n switch (action.type) {\n case actions.CHANNEL_UPDATE:\n return Object.assign({}, state, {\n loggedInChannel: action.data,\n });\n default:\n return state;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react/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// ./react/reducers/show.js","const { details: { host } } = require('../../config/siteConfig.js');\n\nconst initialState = {\n host: host,\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// ./react/reducers/site.js","module.exports = require(\"react-ga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-ga\"\n// module id = 86\n// module chunks = 0","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport PublishTool from 'containers/PublishTool';\n\nclass HomePage extends React.Component {\n render () {\n return (\n <div className={'row row--tall flex-container--column'}>\n <SEO />\n <NavBar />\n <div className={'row row--tall row--padded flex-container--column'}>\n <PublishTool />\n </div>\n </div>\n );\n }\n};\n\nexport default HomePage;\n\n\n\n// WEBPACK FOOTER //\n// ./react/components/HomePage/index.jsx","const { details: { title } } = require('../../config/siteConfig.js');\n\nexport const createPageTitle = (pageTitle) => {\n if (!pageTitle) {\n return `${title}`;\n }\n return `${title} - ${pageTitle}`;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./react/utils/pageTitle.js","const { details: { title, host, description }, assetDefaults: { thumbnail: defaultThumbnail, description: defaultDescription } } = require('../../config/siteConfig.js');\n\nconst 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 = () => {\n return [\n {property: 'og:title', content: title},\n {property: 'og:url', content: host},\n {property: 'og:site_name', content: title},\n {property: 'og:description', content: description},\n {property: 'twitter:site', content: '@spee_ch'},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createChannelMetaTags = (channel) => {\n const { name, longId } = channel;\n return [\n {property: 'og:title', content: `${name} on ${title}`},\n {property: 'og:url', content: `${host}/${name}:${longId}`},\n {property: 'og:site_name', content: title},\n {property: 'og:description', content: `${name}, a channel on ${title}`},\n {property: 'twitter:site', content: '@spee_ch'},\n {property: 'twitter:card', content: 'summary'},\n ];\n};\n\nconst createAssetMetaTags = (asset) => {\n const { claimData } = asset;\n const { contentType } = claimData;\n const embedUrl = `${host}/${claimData.claimId}/${claimData.name}`;\n const showUrl = `${host}/${claimData.claimId}/${claimData.name}`;\n const source = `${host}/${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: title},\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: '@spee_ch'},\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 = (asset, channel) => {\n if (asset) {\n return createAssetMetaTags(asset);\n };\n if (channel) {\n return createChannelMetaTags(channel);\n };\n return createBasicMetaTags();\n};\n\n\n\n// WEBPACK FOOTER //\n// ./react/utils/metaTags.js","const { details: { host } } = require('../../config/siteConfig.js');\n\nconst createBasicCanonicalLink = (page) => {\n if (!page) {\n return `${host}`;\n };\n return `${host}/${page}`;\n};\n\nconst createAssetCanonicalLink = (asset) => {\n let channelName, certificateId, name, claimId;\n if (asset.claimData) {\n ({ channelName, certificateId, name, claimId } = asset.claimData);\n };\n if (channelName) {\n return `${host}/${channelName}:${certificateId}/${name}`;\n };\n return `${host}/${claimId}/${name}`;\n};\n\nconst createChannelCanonicalLink = (channel) => {\n const { name, longId } = channel;\n return `${host}/${name}:${longId}`;\n};\n\nexport const createCanonicalLink = (asset, channel, page) => {\n if (asset) {\n return createAssetCanonicalLink(asset);\n }\n if (channel) {\n return createChannelCanonicalLink(channel);\n }\n if (page) {\n return createBasicCanonicalLink(page);\n }\n return createBasicCanonicalLink();\n};\n\n\n\n// WEBPACK FOOTER //\n// ./react/utils/canonicalLink.js","import React from 'react';\nimport { NavLink, withRouter } from 'react-router-dom';\nimport Logo from 'components/Logo';\nimport NavBarChannelDropdown from 'components/NavBarChannelOptionsDropdown';\nimport request from 'utils/request';\n\nconst VIEW = 'VIEW';\nconst LOGOUT = 'LOGOUT';\n\nclass NavBar extends React.Component {\n constructor (props) {\n super(props);\n this.checkForLoggedInUser = this.checkForLoggedInUser.bind(this);\n this.logoutUser = this.logoutUser.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n componentDidMount () {\n // check to see if the user is already logged in\n this.checkForLoggedInUser();\n }\n checkForLoggedInUser () {\n const params = {credentials: 'include'};\n request('/user', params)\n .then(({ data }) => {\n this.props.onChannelLogin(data.channelName, data.shortChannelId, data.channelClaimId);\n })\n .catch(error => {\n console.log('/user error:', error.message);\n });\n }\n logoutUser () {\n const params = {credentials: 'include'};\n request('/logout', params)\n .then(() => {\n this.props.onChannelLogout();\n })\n .catch(error => {\n console.log('/logout error', error.message);\n });\n }\n handleSelection (event) {\n const value = event.target.selectedOptions[0].value;\n switch (value) {\n case LOGOUT:\n this.logoutUser();\n break;\n case VIEW:\n // redirect to channel page\n this.props.history.push(`/${this.props.channelName}:${this.props.channelLongId}`);\n break;\n default:\n break;\n }\n }\n render () {\n 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'>Open-source, decentralized image and video sharing.</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// ./react/containers/NavBar/view.jsx","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&lt;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// ./react/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// ./react/components/NavBarChannelOptionsDropdown/index.jsx","module.exports = require(\"cross-fetch/polyfill\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"cross-fetch/polyfill\"\n// module id = 94\n// module chunks = 0","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n disabled: publish.disabled,\n file : publish.file,\n status : publish.status.status,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishTool/index.js","import React from 'react';\nimport Dropzone from 'containers/Dropzone';\nimport PublishDetails from 'containers/PublishDetails';\nimport PublishStatus from 'containers/PublishStatus';\nimport PublishDisabledMessage from 'containers/PublishDisabledMessage';\n\nclass PublishTool extends React.Component {\n render () {\n if (this.props.disabled) {\n console.log('publish is disabled');\n return (\n <PublishDisabledMessage />\n );\n } else {\n console.log('publish is not disabled');\n if (this.props.file) {\n if (this.props.status) {\n return (\n <PublishStatus />\n );\n } else {\n return <PublishDetails />;\n }\n }\n return <Dropzone />;\n }\n }\n};\n\nexport default PublishTool;\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishTool/view.jsx","import React from 'react';\nimport { validateFile } from 'utils/file';\nimport Preview from 'components/Preview';\n\nclass Dropzone extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n dragOver : false,\n mouseOver : false,\n dimPreview: false,\n };\n this.handleDrop = this.handleDrop.bind(this);\n this.handleDragOver = this.handleDragOver.bind(this);\n this.handleDragEnd = this.handleDragEnd.bind(this);\n this.handleDragEnter = this.handleDragEnter.bind(this);\n this.handleDragLeave = this.handleDragLeave.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n this.handleClick = this.handleClick.bind(this);\n this.handleFileInput = this.handleFileInput.bind(this);\n this.chooseFile = this.chooseFile.bind(this);\n }\n handleDrop (event) {\n event.preventDefault();\n this.setState({dragOver: false});\n // if dropped items aren't files, reject them\n const dt = event.dataTransfer;\n if (dt.items) {\n if (dt.items[0].kind === 'file') {\n const droppedFile = dt.items[0].getAsFile();\n this.chooseFile(droppedFile);\n }\n }\n }\n handleDragOver (event) {\n event.preventDefault();\n }\n handleDragEnd (event) {\n var dt = event.dataTransfer;\n if (dt.items) {\n for (var i = 0; i < dt.items.length; i++) {\n dt.items.remove(i);\n }\n } else {\n event.dataTransfer.clearData();\n }\n }\n handleDragEnter () {\n this.setState({dragOver: true, dimPreview: true});\n }\n handleDragLeave () {\n this.setState({dragOver: false, dimPreview: false});\n }\n handleMouseEnter () {\n this.setState({mouseOver: true, dimPreview: true});\n }\n handleMouseLeave () {\n this.setState({mouseOver: false, dimPreview: false});\n }\n handleClick (event) {\n event.preventDefault();\n document.getElementById('file_input').click();\n }\n handleFileInput (event) {\n event.preventDefault();\n const fileList = event.target.files;\n this.chooseFile(fileList[0]);\n }\n chooseFile (file) {\n if (file) {\n try {\n validateFile(file); // validate the file's name, type, and size\n } catch (error) {\n return this.props.setFileError(error.message);\n }\n // stage it so it will be ready when the publish button is clicked\n this.props.selectFile(file);\n }\n }\n render () {\n return (\n <div className='row row--tall flex-container--column'>\n <form>\n <input className='input-file' type='file' id='file_input' name='file_input' accept='video/*,image/*' onChange={this.handleFileInput} encType='multipart/form-data' />\n </form>\n <div id='preview-dropzone' className={'row row--padded row--tall dropzone' + (this.state.dragOver ? ' dropzone--drag-over' : '')} onDrop={this.handleDrop} onDragOver={this.handleDragOver} onDragEnd={this.handleDragEnd} onDragEnter={this.handleDragEnter} onDragLeave={this.handleDragLeave} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave} onClick={this.handleClick}>\n {this.props.file ? (\n <div>\n <Preview\n dimPreview={this.state.dimPreview}\n file={this.props.file}\n thumbnail={this.props.thumbnail}\n />\n <div id='dropzone-text-holder' className={'flex-container--column flex-container--center-center'}>\n { this.state.dragOver ? (\n <div id='dropzone-dragover'>\n <p className='blue'>Drop it.</p>\n </div>\n ) : (\n null\n )}\n { this.state.mouseOver ? (\n <div id='dropzone-instructions'>\n <p className='info-message-placeholder info-message--failure' id='input-error-file-selection'>{this.props.fileError}</p>\n <p>Drag & drop image or video here to publish</p>\n <p className='fine-print'>OR</p>\n <p className='blue--underlined'>CHOOSE FILE</p>\n </div>\n ) : (\n null\n )}\n </div>\n </div>\n ) : (\n <div id='dropzone-text-holder' className={'flex-container--column flex-container--center-center'}>\n { this.state.dragOver ? (\n <div id='dropzone-dragover'>\n <p className='blue'>Drop it.</p>\n </div>\n ) : (\n <div id='dropzone-instructions'>\n <p className='info-message-placeholder info-message--failure' id='input-error-file-selection'>{this.props.fileError}</p>\n <p>Drag & drop image or video here to publish</p>\n <p className='fine-print'>OR</p>\n <p className='blue--underlined'>CHOOSE FILE</p>\n </div>\n )}\n </div>\n )}\n </div>\n </div>\n );\n }\n};\n\nexport default Dropzone;\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/Dropzone/view.jsx","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// ./react/utils/file.js","import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass Preview 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\nPreview.propTypes = {\n dimPreview: PropTypes.bool.isRequired,\n file : PropTypes.object.isRequired,\n thumbnail : PropTypes.object,\n};\n\nexport default Preview;\n\n\n\n// WEBPACK FOOTER //\n// ./react/components/Preview/index.jsx","import {connect} from 'react-redux';\nimport {clearFile, startPublish} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, publish }) => {\n return {\n file: publish.file,\n };\n};\n\nconst mapDispatchToProps = {\n clearFile,\n startPublish,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishDetails/index.js","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport Dropzone from 'containers/Dropzone';\nimport PublishTitleInput from 'containers/PublishTitleInput';\nimport PublishUrlInput from 'containers/PublishUrlInput';\nimport PublishThumbnailInput from 'containers/PublishThumbnailInput';\nimport PublishMetadataInputs from 'containers/PublishMetadataInputs';\nimport ChannelSelect from 'containers/ChannelSelect';\n\nclass PublishDetails extends React.Component {\n constructor (props) {\n super(props)\n this.onPublishSubmit = this.onPublishSubmit.bind(this);\n }\n onPublishSubmit () {\n this.props.startPublish(this.props.history);\n }\n render () {\n return (\n <div className='row row--no-bottom'>\n <div className='column column--10'>\n <PublishTitleInput />\n </div>\n {/* left column */}\n <div className='column column--5 column--sml-10' >\n <div className='row row--padded'>\n <Dropzone />\n </div>\n </div>\n {/* right column */}\n <div className='column column--5 column--sml-10 align-content-top'>\n <div id='publish-active-area' className='row row--padded'>\n <div className='row row--padded row--no-top row--wide'>\n <PublishUrlInput />\n </div>\n <div className='row row--padded row--no-top row--wide'>\n <ChannelSelect />\n </div>\n { (this.props.file.type === 'video/mp4') && (\n <div className='row row--padded row--no-top row--wide '>\n <PublishThumbnailInput />\n </div>\n )}\n <div className='row row--padded row--no-top row--no-bottom row--wide'>\n <PublishMetadataInputs />\n </div>\n <div className='row row--wide align-content-center'>\n <button id='publish-submit' className='button--primary button--large' onClick={this.onPublishSubmit}>Publish</button>\n </div>\n <div className='row row--padded row--no-bottom align-content-center'>\n <button className='button--cancel' onClick={this.props.clearFile}>Cancel</button>\n </div>\n <div className='row row--short align-content-center'>\n <p className='fine-print'>By clicking 'Publish', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. <a className='link--primary' target='_blank' href='https://lbry.io/learn'>Read more.</a></p>\n </div>\n </div>\n </div>\n </div>\n );\n }\n};\n\nexport default withRouter(PublishDetails);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishDetails/view.jsx","import {connect} from 'react-redux';\nimport {updateMetadata} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n title: publish.metadata.title,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onMetadataChange: (name, value) => {\n dispatch(updateMetadata(name, value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishTitleInput/index.js","import React from 'react';\n\nclass PublishTitleInput extends React.Component {\n constructor (props) {\n super(props);\n this.handleInput = this.handleInput.bind(this);\n }\n handleInput (e) {\n const name = e.target.name;\n const value = e.target.value;\n this.props.onMetadataChange(name, value);\n }\n render () {\n return (\n <input type='text' id='publish-title' className='input-text text--large input-text--full-width' name='title' placeholder='Give your post a title...' onChange={this.handleInput} value={this.props.title} />\n );\n }\n}\n\nexport default PublishTitleInput;\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishTitleInput/view.jsx","import {updateClaim, updateError} from 'actions/publish';\nimport {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, publish }) => {\n return {\n loggedInChannelName : channel.loggedInChannel.name,\n loggedInChannelShortId: channel.loggedInChannel.shortId,\n fileName : publish.file.name,\n publishInChannel : publish.publishInChannel,\n selectedChannel : publish.selectedChannel,\n claim : publish.claim,\n urlError : publish.error.url,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onClaimChange: (value) => {\n dispatch(updateClaim(value));\n dispatch(updateError('publishSubmit', null));\n },\n onUrlError: (value) => {\n dispatch(updateError('url', value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishUrlInput/index.js","import React from 'react';\nimport request from 'utils/request';\nimport UrlMiddle from 'components/PublishUrlMiddleDisplay';\n\nclass PublishUrlInput extends React.Component {\n constructor (props) {\n super(props);\n this.handleInput = this.handleInput.bind(this);\n }\n componentDidMount () {\n const { claim, fileName } = this.props;\n if (!claim) {\n this.setClaimName(fileName);\n }\n }\n componentWillReceiveProps ({ claim, fileName }) {\n // if a new file was chosen, update the claim name\n if (fileName !== this.props.fileName) {\n return this.setClaimName(fileName);\n }\n // if the claim has updated, check its availability\n if (claim !== this.props.claim) {\n this.validateClaim(claim);\n }\n }\n handleInput (event) {\n let value = event.target.value;\n value = this.cleanseInput(value);\n // update the state\n this.props.onClaimChange(value);\n }\n cleanseInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n setClaimName (fileName) {\n const fileNameWithoutEnding = fileName.substring(0, fileName.lastIndexOf('.'));\n const cleanClaimName = this.cleanseInput(fileNameWithoutEnding);\n this.props.onClaimChange(cleanClaimName);\n }\n validateClaim (claim) {\n if (!claim) {\n return this.props.onUrlError('Enter a url above');\n }\n request(`/api/claim/availability/${claim}`)\n .then(() => {\n this.props.onUrlError(null);\n })\n .catch((error) => {\n this.props.onUrlError(error.message);\n });\n }\n render () {\n const { claim, loggedInChannelName, loggedInChannelShortId, publishInChannel, selectedChannel, urlError } = this.props;\n return (\n <div className='column column--10 column--sml-10'>\n <div className='input-text--primary span--relative'>\n <span className='url-text--secondary'>spee.ch / </span>\n <UrlMiddle\n publishInChannel={publishInChannel}\n selectedChannel={selectedChannel}\n loggedInChannelName={loggedInChannelName}\n loggedInChannelShortId={loggedInChannelShortId}\n />\n <input type='text' id='claim-name-input' className='input-text' name='claim' placeholder='your-url-here' onChange={this.handleInput} value={claim} />\n { (claim && !urlError) && <span id='input-success-claim-name' className='info-message--success span--absolute'>{'\\u2713'}</span> }\n { urlError && <span id='input-success-channel-name' className='info-message--failure span--absolute'>{'\\u2716'}</span> }\n </div>\n <div>\n { urlError ? (\n <p id='input-error-claim-name' className='info-message--failure'>{urlError}</p>\n ) : (\n <p className='info-message'>Choose a custom url</p>\n )}\n </div>\n </div>\n );\n }\n}\n\nexport default PublishUrlInput;\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishUrlInput/view.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// ./react/components/PublishUrlMiddleDisplay/index.jsx","import { connect } from 'react-redux';\nimport { onNewThumbnail } from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish: { file } }) => {\n return {\n file,\n };\n};\n\nconst mapDispatchToProps = {\n onNewThumbnail,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishThumbnailInput/index.js","import React from 'react';\n\nfunction dataURItoBlob(dataURI) {\n // convert base64/URLEncoded data component to raw binary data held in a string\n let byteString = atob(dataURI.split(',')[1]);\n // separate out the mime component\n let mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n // write the bytes of the string to a typed array\n let ia = new Uint8Array(byteString.length);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n return new Blob([ia], {type: mimeString});\n}\n\nclass PublishThumbnailInput extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n videoSource : null,\n error : null,\n sliderMinRange: 1,\n sliderMaxRange: null,\n sliderValue : null,\n };\n this.handleVideoLoadedData = this.handleVideoLoadedData.bind(this);\n this.handleSliderChange = this.handleSliderChange.bind(this);\n this.createThumbnail = this.createThumbnail.bind(this);\n }\n componentDidMount () {\n const { file } = this.props;\n this.setVideoSource(file);\n }\n componentWillReceiveProps (nextProps) {\n // if file changes\n if (nextProps.file && nextProps.file !== this.props.file) {\n const { file } = nextProps;\n this.setVideoSource(file);\n };\n }\n setVideoSource (file) {\n const previewReader = new FileReader();\n previewReader.readAsDataURL(file);\n previewReader.onloadend = () => {\n const dataUri = previewReader.result;\n const blob = dataURItoBlob(dataUri);\n const videoSource = URL.createObjectURL(blob);\n this.setState({ videoSource });\n };\n }\n handleVideoLoadedData (event) {\n const duration = event.target.duration;\n const totalMinutes = Math.floor(duration / 60);\n const totalSeconds = Math.floor(duration % 60);\n // set the slider\n this.setState({\n sliderMaxRange: duration * 100,\n sliderValue : duration * 100 / 2,\n totalMinutes,\n totalSeconds,\n });\n // update the current time of the video\n let video = document.getElementById('video-thumb-player');\n video.currentTime = duration / 2;\n }\n handleSliderChange (event) {\n const value = parseInt(event.target.value);\n // update the slider value\n this.setState({\n sliderValue: value,\n });\n // update the current time of the video\n let video = document.getElementById('video-thumb-player');\n video.currentTime = value / 100;\n }\n createThumbnail () {\n // take a snapshot\n let video = document.getElementById('video-thumb-player');\n let canvas = document.createElement('canvas');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);\n const dataUrl = canvas.toDataURL();\n const blob = dataURItoBlob(dataUrl);\n const snapshot = new File([blob], `thumbnail.png`, {\n type: 'image/png',\n });\n // set the thumbnail in redux store\n if (snapshot) {\n this.props.onNewThumbnail(snapshot);\n }\n }\n render () {\n const { error, videoSource, sliderMinRange, sliderMaxRange, sliderValue, totalMinutes, totalSeconds } = this.state;\n return (\n <div>\n <label className='label'>Thumbnail:</label>\n <video\n id='video-thumb-player'\n preload='metadata'\n muted\n style={{display: 'none'}}\n playsInline\n onLoadedData={this.handleVideoLoadedData}\n src={videoSource}\n onSeeked={this.createThumbnail}\n />\n {\n sliderValue ? (\n <div>\n <div className='flex-container--row flex-container--space-between-center' style={{width: '100%'}}>\n <span className='info-message'>0'00\"</span>\n <span className='info-message'>{totalMinutes}'{totalSeconds}\"</span>\n </div>\n <div>\n <input\n type='range'\n min={sliderMinRange}\n max={sliderMaxRange}\n value={sliderValue}\n className='slider'\n onChange={this.handleSliderChange}\n />\n </div>\n </div>\n ) : (\n <p className='info-message' >loading... </p>\n )\n }\n { error ? (\n <p className='info-message--failure'>{error}</p>\n ) : (\n <p className='info-message'>Use slider to set thumbnail</p>\n )}\n </div>\n );\n }\n}\n\nexport default PublishThumbnailInput;\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishThumbnailInput/view.jsx","import {connect} from 'react-redux';\nimport {updateMetadata, toggleMetadataInputs} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n showMetadataInputs: publish.showMetadataInputs,\n description : publish.metadata.description,\n license : publish.metadata.license,\n nsfw : publish.metadata.nsfw,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onMetadataChange: (name, value) => {\n dispatch(updateMetadata(name, value));\n },\n onToggleMetadataInputs: (value) => {\n dispatch(toggleMetadataInputs(value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishMetadataInputs/index.js","import React from 'react';\nimport ExpandingTextArea from 'components/ExpandingTextArea';\n\nclass PublishMetadataInputs extends React.Component {\n constructor (props) {\n super(props);\n this.toggleShowInputs = this.toggleShowInputs.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.handleSelect = this.handleSelect.bind(this);\n }\n toggleShowInputs () {\n this.props.onToggleMetadataInputs(!this.props.showMetadataInputs);\n }\n handleInput (event) {\n const target = event.target;\n const value = target.type === 'checkbox' ? target.checked : target.value;\n const name = target.name;\n this.props.onMetadataChange(name, value);\n }\n handleSelect (event) {\n const name = event.target.name;\n const selectedOption = event.target.selectedOptions[0].value;\n this.props.onMetadataChange(name, selectedOption);\n }\n render () {\n return (\n <div id='publish-details' className='row row--padded row--no-top row--wide'>\n {this.props.showMetadataInputs && (\n <div>\n <div className='row row--no-top'>\n <div className='column column--3 column--med-10 align-content-top'>\n <label htmlFor='publish-license' className='label'>Description:</label>\n </div><div className='column column--7 column--sml-10'>\n <ExpandingTextArea\n id='publish-description'\n className='textarea textarea--primary textarea--full-width'\n rows={1}\n maxLength={2000}\n style={{ maxHeight: 200 }}\n name='description'\n placeholder='Optional description'\n value={this.props.description}\n onChange={this.handleInput} />\n </div>\n </div>\n\n <div className='row row--no-top'>\n <div className='column column--3 column--med-10'>\n <label htmlFor='publish-license' className='label'>License:</label>\n </div><div className='column column--7 column--sml-10'>\n <select type='text' name='license' id='publish-license' className='select select--primary' onChange={this.handleSelect}>\n <option value=' '>Unspecified</option>\n <option value='Public Domain'>Public Domain</option>\n <option value='Creative Commons'>Creative Commons</option>\n </select>\n </div>\n </div>\n\n <div className='row row--no-top'>\n <div className='column column--3'>\n <label htmlFor='publish-nsfw' className='label'>Mature:</label>\n </div><div className='column column--7'>\n <input className='input-checkbox' type='checkbox' id='publish-nsfw' name='nsfw' value={this.props.nsfw} onChange={this.handleInput} />\n </div>\n </div>\n </div>\n )}\n <button className='button--secondary' onClick={this.toggleShowInputs}>{this.props.showMetadataInputs ? 'less' : 'more'}</button>\n </div>\n );\n }\n}\n\nexport default PublishMetadataInputs;\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishMetadataInputs/view.jsx","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass ExpandingTextarea extends Component {\n constructor (props) {\n super(props);\n this._handleChange = this._handleChange.bind(this);\n }\n componentDidMount () {\n this.adjustTextarea({});\n }\n _handleChange (event) {\n const { onChange } = this.props;\n if (onChange) onChange(event);\n this.adjustTextarea(event);\n }\n adjustTextarea ({ target = this.el }) {\n target.style.height = 0;\n target.style.height = `${target.scrollHeight}px`;\n }\n render () {\n const { ...rest } = this.props;\n return (\n <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// ./react/components/ExpandingTextArea/index.jsx","import {connect} from 'react-redux';\nimport {setPublishInChannel, updateSelectedChannel, updateError} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ channel, publish }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n publishInChannel : publish.publishInChannel,\n selectedChannel : publish.selectedChannel,\n channelError : publish.error.channel,\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onPublishInChannelChange: (value) => {\n dispatch(updateError('channel', null));\n dispatch(setPublishInChannel(value));\n },\n onChannelSelect: (value) => {\n dispatch(updateError('channel', null));\n dispatch(updateSelectedChannel(value));\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/ChannelSelect/index.js","import React from 'react';\nimport ChannelLoginForm from 'containers/ChannelLoginForm';\nimport ChannelCreateForm from 'containers/ChannelCreateForm';\nimport * as states from 'constants/publish_channel_select_states';\n\nclass ChannelSelect extends React.Component {\n constructor (props) {\n super(props);\n this.toggleAnonymousPublish = this.toggleAnonymousPublish.bind(this);\n this.handleSelection = this.handleSelection.bind(this);\n }\n toggleAnonymousPublish (event) {\n const value = event.target.value;\n if (value === 'anonymous') {\n this.props.onPublishInChannelChange(false);\n } else {\n this.props.onPublishInChannelChange(true);\n }\n }\n handleSelection (event) {\n const selectedOption = event.target.selectedOptions[0].value;\n this.props.onChannelSelect(selectedOption);\n }\n render () {\n return (\n <div>\n <form>\n <div className='column column--3 column--med-10'>\n <input type='radio' name='anonymous-or-channel' id='anonymous-radio' className='input-radio' value='anonymous' checked={!this.props.publishInChannel} onChange={this.toggleAnonymousPublish} />\n <label className='label label--pointer' htmlFor='anonymous-radio'>Anonymous</label>\n </div>\n <div className='column column--7 column--med-10'>\n <input type='radio' name='anonymous-or-channel' id='channel-radio' className='input-radio' value='in a channel' checked={this.props.publishInChannel} onChange={this.toggleAnonymousPublish} />\n <label className='label label--pointer' htmlFor='channel-radio'>In a channel</label>\n </div>\n { this.props.channelError ? (\n <p className='info-message--failure'>{this.props.channelError}</p>\n ) : (\n <p className='info-message'>Publish anonymously or in a channel</p>\n )}\n </form>\n { this.props.publishInChannel && (\n <div>\n <div className='column column--3'>\n <label className='label' htmlFor='channel-name-select'>Channel:</label>\n </div><div className='column column--7'>\n <select type='text' id='channel-name-select' className='select select--arrow' value={this.props.selectedChannel} onChange={this.handleSelection}>\n { this.props.loggedInChannelName && <option value={this.props.loggedInChannelName} id='publish-channel-select-channel-option'>{this.props.loggedInChannelName}</option> }\n <option value={states.LOGIN}>Existing</option>\n <option value={states.CREATE}>New</option>\n </select>\n </div>\n { (this.props.selectedChannel === states.LOGIN) && <ChannelLoginForm /> }\n { (this.props.selectedChannel === states.CREATE) && <ChannelCreateForm /> }\n </div>\n )}\n </div>\n );\n }\n}\n\nexport default ChannelSelect;\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/ChannelSelect/view.jsx","import React from 'react';\nimport request from 'utils/request';\n\nclass ChannelLoginForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n name : '',\n password: '',\n };\n this.handleInput = this.handleInput.bind(this);\n this.loginToChannel = this.loginToChannel.bind(this);\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n loginToChannel (event) {\n event.preventDefault();\n const params = {\n method : 'POST',\n body : JSON.stringify({username: this.state.name, password: this.state.password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n request('login', params)\n .then(({success, channelName, shortChannelId, channelClaimId, message}) => {\n if (success) {\n this.props.onChannelLogin(channelName, shortChannelId, channelClaimId);\n } else {\n this.setState({'error': message});\n };\n })\n .catch(error => {\n if (error.message) {\n this.setState({'error': error.message});\n } else {\n this.setState({'error': error});\n }\n });\n }\n render () {\n return (\n <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// ./react/containers/ChannelLoginForm/view.jsx","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport request from 'utils/request';\n\nclass ChannelCreateForm extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n error : null,\n channel : '',\n password: '',\n status : null,\n };\n this.handleChannelInput = this.handleChannelInput.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.createChannel = this.createChannel.bind(this);\n }\n cleanseChannelInput (input) {\n input = input.replace(/\\s+/g, '-'); // replace spaces with dashes\n input = input.replace(/[^A-Za-z0-9-]/g, ''); // remove all characters that are not A-Z, a-z, 0-9, or '-'\n return input;\n }\n handleChannelInput (event) {\n let value = event.target.value;\n value = this.cleanseChannelInput(value);\n this.setState({channel: value});\n if (value) {\n this.updateIsChannelAvailable(value);\n } else {\n this.setState({error: 'Please enter a channel name'});\n }\n }\n handleInput (event) {\n const name = event.target.name;\n const value = event.target.value;\n this.setState({[name]: value});\n }\n updateIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n request(`/api/channel/availability/${channelWithAtSymbol}`)\n .then(() => {\n this.setState({'error': null});\n })\n .catch((error) => {\n this.setState({'error': error.message});\n });\n }\n checkIsChannelAvailable (channel) {\n const channelWithAtSymbol = `@${channel}`;\n return request(`/api/channel/availability/${channelWithAtSymbol}`);\n }\n checkIsPasswordProvided (password) {\n return new Promise((resolve, reject) => {\n if (!password || password.length < 1) {\n return reject(new Error('Please provide a password'));\n }\n resolve();\n });\n }\n makePublishChannelRequest (username, password) {\n const params = {\n method : 'POST',\n body : JSON.stringify({username, password}),\n headers: new Headers({\n 'Content-Type': 'application/json',\n }),\n credentials: 'include',\n };\n return new Promise((resolve, reject) => {\n request('/signup', params)\n .then(result => {\n return resolve(result);\n })\n .catch(error => {\n reject(new Error(`Unfortunately, we encountered an error while creating your channel. Please let us know in Discord! ${error.message}`));\n });\n });\n }\n createChannel (event) {\n event.preventDefault();\n this.checkIsPasswordProvided(this.state.password)\n .then(() => {\n return this.checkIsChannelAvailable(this.state.channel);\n })\n .then(() => {\n this.setState({status: 'We are publishing your new channel. Sit tight...'});\n return this.makePublishChannelRequest(this.state.channel, this.state.password);\n })\n .then(result => {\n this.setState({status: null});\n this.props.onChannelLogin(result.channelName, result.shortChannelId, result.channelClaimId);\n })\n .catch((error) => {\n if (error.message) {\n this.setState({'error': error.message, status: null});\n } else {\n this.setState({'error': error, status: null});\n };\n });\n }\n render () {\n return (\n <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// ./react/containers/ChannelCreateForm/view.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// ./react/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// ./react/components/InactiveStatusBar/index.jsx","import {connect} from 'react-redux';\nimport {clearFile} from 'actions/publish';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n status : publish.status.status,\n message: publish.status.message,\n };\n};\n\nconst mapDispatchToProps = {\n clearFile,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishStatus/index.js","import React from 'react';\nimport ProgressBar from 'components/ProgressBar';\nimport * as publishStates from 'constants/publish_claim_states';\n\nclass PublishStatus extends React.Component {\n render () {\n const { status, message, clearFile } = this.props;\n return (\n <div className='row row--tall flex-container--column flex-container--center-center'>\n {status === publishStates.LOAD_START &&\n <div className='row align-content-center'>\n <p>File is loading to server</p>\n <p className='blue'>0%</p>\n </div>\n }\n {status === publishStates.LOADING &&\n <div>\n <div className='row align-content-center'>\n <p>File is loading to server</p>\n <p className='blue'>{message}</p>\n </div>\n </div>\n }\n {status === publishStates.PUBLISHING &&\n <div className='row align-content-center'>\n <p>Upload complete. Your file is now being published on the blockchain...</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 === publishStates.SUCCESS &&\n <div className='row align-content-center'>\n <p>Your publish is complete! You are being redirected to it now.</p>\n <p>If you are not automatically redirected, <a className='link--primary' target='_blank' href={message}>click here.</a></p>\n </div>\n }\n {status === publishStates.FAILED &&\n <div className='row align-content-center'>\n <p>Something went wrong...</p>\n <p><strong>{message}</strong></p>\n <p>For help, post the above error text in the #speech channel on the <a className='link--primary' href='https://discord.gg/YjYbwhS' target='_blank'>lbry discord</a></p>\n <button className='button--secondary' onClick={clearFile}>Reset</button>\n </div>\n }\n </div>\n );\n }\n};\n\nexport default PublishStatus;\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishStatus/view.jsx","export const LOAD_START = 'LOAD_START';\nexport const LOADING = 'LOADING';\nexport const PUBLISHING = 'PUBLISHING';\nexport const SUCCESS = 'SUCCESS';\nexport const FAILED = 'FAILED';\n\n\n\n// WEBPACK FOOTER //\n// ./react/constants/publish_claim_states.js","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ publish }) => {\n return {\n message: publish.disabledMessage,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishDisabledMessage/index.js","import React from 'react';\n\nclass PublishDisabledMessage extends React.Component {\n render () {\n const message = this.props.message;\n console.log('this.props.message:', message);\n return (\n <div className='row dropzone--disabled row--tall flex-container--column flex-container--center-center'>\n <p className='text--disabled'>Publishing is currently disabled.</p>\n <p className='text--disabled'>{message}</p>\n </div>\n );\n }\n}\n\nexport default PublishDisabledMessage;\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/PublishDisabledMessage/view.jsx","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// ./react/components/AboutPage/index.jsx","import {connect} from 'react-redux';\nimport View from './view';\n\nconst mapStateToProps = ({ channel }) => {\n return {\n loggedInChannelName: channel.loggedInChannel.name,\n };\n};\n\nexport default connect(mapStateToProps, null)(View);\n\n\n\n// WEBPACK FOOTER //\n// ./react/containers/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// ./react/containers/LoginPage/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// ./react/containers/ShowPage/index.js","import React from 'react';\nimport ErrorPage from 'components/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// ./react/containers/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// ./react/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// ./react/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// ./react/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// ./react/containers/ShowAssetDetails/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport NavBar from 'containers/NavBar';\nimport ErrorPage from 'components/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// ./react/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// ./react/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// ./react/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// ./react/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// ./react/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// ./react/containers/ShowChannel/index.js","import React from 'react';\nimport SEO from 'components/SEO';\nimport ErrorPage from 'components/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// ./react/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// ./react/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// ./react/containers/ChannelClaimsDisplay/view.jsx","import React from 'react';\nimport { Link } from 'react-router-dom';\nconst { assetDefaults: { thumbnail: defaultThumbnail } } = require('../../../config/siteConfig.js');\n\nconst AssetPreview = ({ 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// ./react/components/AssetPreview/index.jsx","import React from 'react';\nimport NavBar from 'containers/NavBar';\nimport Helmet from 'react-helmet';\nconst { details: { title, host } } = require('../../../config/siteConfig.js');\n\nclass FourOhForPage extends React.Component {\n render () {\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// ./react/components/FourOhFourPage/index.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// ./routes/serve-routes.js","const logger = require('winston');\nconst { getClaimId, getLocalFileRecord } = require('../controllers/serveController.js');\nconst { handleErrorResponse } = require('../helpers/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// ./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// ./helpers/lbryUri.js","import React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport { createStore, applyMiddleware } from 'redux';\nimport Reducer from '../react/reducers';\nimport { Provider } from 'react-redux';\nimport { StaticRouter } from 'react-router-dom';\nimport GAListener from '../react/components/GAListener';\nimport App from '../react/app';\nimport renderFullPage from './renderFullPage';\nimport createSagaMiddleware from 'redux-saga';\nimport { call } from 'redux-saga/effects';\nimport { handleShowPageUri } from '../react/sagas/show_uri';\nimport { onHandleShowPageUri } from '../react/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// ./helpers/handleShowRender.jsx","module.exports = require(\"redux-saga\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"redux-saga\"\n// module id = 147\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// ./react/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';\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 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, 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, 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, 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// ./react/sagas/show_asset.js","import Request from 'utils/request';\nconst { details: { host } } = require('../../config/siteConfig.js');\n\nexport function getLongClaimId (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 (name, claimId) {\n const url = `${host}/api/claim/short-id/${claimId}/${name}`;\n return Request(url);\n};\n\nexport function getClaimData (name, claimId) {\n const url = `${host}/api/claim/data/${name}/${claimId}`;\n return Request(url);\n};\n\n\n\n// WEBPACK FOOTER //\n// ./react/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';\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 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, 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, channelName, longId, 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 let claimsData;\n try {\n ({ data: claimsData } = yield call(getChannelClaims, name, longId, 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// ./react/sagas/show_channel.js","import Request from 'utils/request';\nconst { details: { host } } = require('../../config/siteConfig.js');\n\nexport function getChannelData (name, id) {\n if (!id) id = 'none';\n const url = `${host}/api/channel/data/${name}/${id}`;\n return Request(url);\n};\n\nexport function getChannelClaims (name, longId, 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// ./react/api/channelApi.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// ./react/utils/lbryUri.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// ./routes/fallback-routes.js"],"sourceRoot":""}