module.exports=function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=115)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("react-redux")},function(e,t){e.exports=require("winston")},function(e,t,n){"use strict";function r(){var e=this;this.analytics={googleId:"default"},this.assetDefaults={description:"An asset published on Spee.ch",thumbnail:"https://spee.ch/assets/img/video_thumb_default.png",title:"Spee.ch"},this.auth={sessionKey:"default"},this.componentsConfig={components:{},containers:{},pages:{}},this.details={description:"Open-source, decentralized image and video sharing.",host:"default",port:3e3,title:"Spee.ch",twitter:"@spee_ch"},this.publishing={additionalClaimAddresses:[],disabled:!1,disabledMessage:"Please check back soon.",primaryClaimAddress:"default",thumbnailChannel:"default",thumbnailChannelId:"default",uploadDirectory:"/home/lbry/Uploads"},this.configure=function(t){if(!t)return console.log("No site config received.");var n=t.analytics,r=t.assetDefaults,a=t.auth,l=t.componentsConfig,o=t.details,i=t.publishing;e.analytics=n,e.assetDefaults=r,e.auth=a,e.details=o,e.publishing=i,e.componentsConfig=l}}e.exports=new r},function(e,t){e.exports=require("react-router-dom")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=n(64),l=n(6),o=n(65),i=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(e){var t=e.channel,n=e.site;return{channelName:t.loggedInChannel.name,channelShortId:t.loggedInChannel.shortId,channelLongId:t.loggedInChannel.longId,siteDescription:n.description}},s=function(e){return{onChannelLogin:function(t,n,r){e((0,a.updateLoggedInChannel)(t,n,r)),e((0,l.updateSelectedChannel)(t))},onChannelLogout:function(){e((0,a.updateLoggedInChannel)(null,null,null))}}};t.default=(0,r.connect)(u,s)(i.default)},function(e,t,n){"use strict";function r(e){return{type:m.FILE_SELECTED,data:e}}function a(){return{type:m.FILE_CLEAR}}function l(e,t){return{type:m.METADATA_UPDATE,data:{name:e,value:t}}}function o(e){return{type:m.CLAIM_UPDATE,data:e}}function i(e){return{type:m.SET_PUBLISH_IN_CHANNEL,channel:e}}function u(e,t){return{type:m.PUBLISH_STATUS_UPDATE,data:{status:e,message:t}}}function s(e,t){return{type:m.ERROR_UPDATE,data:{name:e,value:t}}}function c(e){return{type:m.SELECTED_CHANNEL_UPDATE,data:e}}function d(e){return{type:m.TOGGLE_METADATA_INPUTS,data:e}}function f(e){return{type:m.THUMBNAIL_NEW,data:e}}function p(e){return{type:m.PUBLISH_START,data:{history:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.selectFile=r,t.clearFile=a,t.updateMetadata=l,t.updateClaim=o,t.setPublishInChannel=i,t.updatePublishStatus=u,t.updateError=s,t.updateSelectedChannel=c,t.toggleMetadataInputs=d,t.onNewThumbnail=f,t.startPublish=p;var h=n(104),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=n(66),l=function(e){return e&&e.__esModule?e:{default:e}}(a),o=function(e){var t=e.site;return{defaultDescription:t.defaultDescription,defaultThumbnail:t.defaultThumbnail,siteDescription:t.description,siteHost:t.host,siteTitle:t.title,siteTwitter:t.twitter}};t.default=(0,r.connect)(o,null)(l.default)},function(e,t,n){"use strict";function r(e){return 204===e.status||205===e.status?null:e.json()}function a(e,t){if(e.status>=200&&e.status<300)return t;var n=new Error(t.message);throw n.response=e,n}function l(e,t){return fetch(e,t).then(function(e){return Promise.all([e,r(e)])}).then(function(e){var t=o(e,2);return a(t[0],t[1])})}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],r=!0,a=!1,l=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,l=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw l}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=l,n(152)},function(e,t,n){"use strict";var r=n(95),a=n(2);console.log("exporting sequelize models");var l=n(92),o=l.database,i=l.username,u=l.password,s={},c=new r(o,i,u,{host:"localhost",dialect:"mysql",dialectOptions:{decimalNumbers:!0},logging:!1,pool:{max:5,min:0,idle:1e4,acquire:1e4}});c.authenticate().then(function(){a.info("Sequelize has established mysql connection successfully.")}).catch(function(e){a.error("Sequelize was unable to connect to the database:",e)});var d=n(132),f=n(133),p=n(134),h=n(135),m=n(136),b=n(137);s.Certificate=c.import("Certificate",d),s.Channel=c.import("Channel",f),s.Claim=c.import("Claim",p),s.File=c.import("File",h),s.Request=c.import("Request",m),s.User=c.import("User",b),Object.keys(s).forEach(function(e){s[e].associate&&(a.info("Associating model:",e),s[e].associate(s))}),s.sequelize=c,s.Sequelize=r,s.upsert=function(e,t,n,r){return e.findOne({where:n}).then(function(n){return n?(a.debug("updating record in db."+r),n.update(t)):(a.debug("creating record in db."+r),e.create(t))}).catch(function(e){throw a.error(r+".upsert error",e),e})},e.exports=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;nthis.props.size)&&(t*=-1,e+=t),n[e].isActive=t>0,e+=t,this.setState({bars:n,incrementer:t,index:e})}},{key:"stopProgressBar",value:function(){clearInterval(this.updateInterval)}},{key:"render",value:function(){return s.default.createElement("div",null,this.state.bars.map(function(e,t){return e.isActive?s.default.createElement(p.default,{key:t}):s.default.createElement(m.default,{key:t})}))}}]),t}(s.default.Component);b.propTypes={size:d.default.number.isRequired},t.default=b},function(e,t,n){"use strict";function r(e){return{type:v.HANDLE_SHOW_URI,data:e}}function a(e){return{type:v.REQUEST_ERROR,data:e}}function l(e,t){var n=g.CHANNEL,r="cr#"+e+"#"+t;return{type:v.CHANNEL_REQUEST_NEW,data:{requestType:n,requestId:r,channelName:e,channelId:t}}}function o(e,t,n,r,a){var l=a?g.ASSET_LITE:g.ASSET_DETAILS,o="ar#"+e+"#"+t+"#"+n+"#"+r;return{type:v.ASSET_REQUEST_NEW,data:{requestType:l,requestId:o,name:e,modifier:{id:t,channel:{name:n,id:r}}}}}function i(e,t){return{type:v.REQUEST_UPDATE,data:{requestType:e,requestId:t}}}function u(e,t,n){return{type:v.REQUEST_LIST_ADD,data:{id:e,error:t,key:n}}}function s(e,t,n,r,a,l){return{type:v.ASSET_ADD,data:{id:e,error:t,name:n,claimId:r,shortId:a,claimData:l}}}function c(e,t,n,r,a){return{type:v.CHANNEL_ADD,data:{id:e,name:t,shortId:n,longId:r,claimsData:a}}}function d(e,t,n,r){return{type:v.CHANNEL_CLAIMS_UPDATE_ASYNC,data:{channelKey:e,name:t,longId:n,page:r}}}function f(e,t){return{type:v.CHANNEL_CLAIMS_UPDATE_SUCCESS,data:{channelListId:e,claimsData:t}}}function p(e,t){return{type:v.FILE_REQUESTED,data:{name:e,claimId:t}}}function h(e){return{type:v.FILE_AVAILABILITY_UPDATE,data:e}}function m(e){return{type:v.DISPLAY_ASSET_ERROR,data:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.onHandleShowPageUri=r,t.onRequestError=a,t.onNewChannelRequest=l,t.onNewAssetRequest=o,t.onRequestUpdate=i,t.addRequestToRequestList=u,t.addAssetToAssetList=s,t.addNewChannelToChannelList=c,t.onUpdateChannelClaims=d,t.updateChannelClaims=f,t.fileRequested=p,t.updateFileAvailability=h,t.updateDisplayAssetError=m;var b=n(19),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(b),g=n(112)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t> Publishing claim to "'+e.name+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"publish",params:e}).then(function(r){f("lbrynet","publish",d(e),t,Date.now()),p(r,n,a)}).catch(function(e){a(e)})})},getClaim:function(e){a.debug('lbryApi >> Getting Claim for "'+e+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"get",params:{uri:e,timeout:20}}).then(function(e){f("lbrynet","getClaim","GET",t,Date.now()),p(e,n,a)}).catch(function(e){a(e)})})},getClaimList:function(e){a.debug('lbryApi >> Getting claim_list for "'+e+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"claim_list",params:{name:e}}).then(function(e){f("lbrynet","getClaimList","CLAIM_LIST",t,Date.now()),p(e,n,a)}).catch(function(e){a(e)})})},resolveUri:function(e){a.debug('lbryApi >> Resolving URI for "'+e+'"');var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"resolve",params:{uri:e}}).then(function(r){var l=r.data;f("lbrynet","resolveUri","RESOLVE",t,Date.now()),l.result[e].error?a(l.result[e].error):n(l.result[e])}).catch(function(e){a(e)})})},getDownloadDirectory:function(){a.debug("lbryApi >> Retrieving the download directory path from lbry daemon...");var e=Date.now();return new Promise(function(t,n){r.post(s,{method:"settings_get"}).then(function(n){var r=n.data;if(f("lbrynet","getDownloadDirectory","SETTINGS_GET",e,Date.now()),!r.result)return new Error("Successfully connected to lbry daemon, but unable to retrieve the download directory.");t(r.result.download_directory)}).catch(function(e){a.error("Lbrynet Error:",e),t("/home/lbry/Downloads/")})})},createChannel:function(e){a.debug("lbryApi >> Creating channel for "+e+"...");var t=Date.now();return new Promise(function(n,a){r.post(s,{method:"channel_new",params:{channel_name:e,amount:.1}}).then(function(e){f("lbrynet","createChannel","CHANNEL_NEW",t,Date.now()),p(e,n,a)}).catch(function(e){a(e)})})}}},function(e,t,n){"use strict";function r(e,t,n){return{eventCategory:"client requests",eventAction:"serve request",eventLabel:n,ipOverride:t,userAgentOverride:e["user-agent"]}}function a(e,t,n,r,a){return{userTimingCategory:e,userTimingVariableName:t,userTimingTime:a-r,userTimingLabel:n}}function l(e,t){var n=e.replace(/\./g,"-");u(c,n,{strictCidFormat:!1,https:!0}).event(t,function(e){e&&i.error("Google Analytics Event Error >>",e)})}function o(e,t){u(c,e,{strictCidFormat:!1,https:!0}).timing(t,function(e){e&&i.error("Google Analytics Event Error >>",e),i.debug("Timing event successfully sent to google analytics")})}var i=n(2),u=n(131),s=n(3),c=s.analytics.googleId,d=s.details.title;e.exports={sendGAServeEvent:function(e,t,n){l(t,r(e,t,n))},sendGATimingEvent:function(e,t,n,r,l){var i=a(e,t,n,r,l);o(d,i)},chooseGaLbrynetPublishLabel:function(e){var t=e.channel_name,n=e.channel_id;return t||n?"PUBLISH_IN_CHANNEL_CLAIM":"PUBLISH_ANONYMOUS_CLAIM"}}},function(e,t){e.exports=require("redux")},function(e,t,n){"use strict";function r(e,t){var n=t.shift(),a=e[n];return t.length>=1?r(a,t):a}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=n(3),o=l.componentsConfig;t.dynamicImport=function(e){if(!e)throw new Error("no file path provided to dynamicImport()");if("string"!=typeof e)throw console.log("dynamicImport > filePath:",e),console.log("dynamicImport > filePath type:",void 0===e?"undefined":a(e)),new Error("file path provided to dynamicImport() must be a string");if(!o)return console.log("no componentsConfig found in siteConfig.js"),n(109)(""+e);var t=e.split("/").filter(function(e){return e.replace(/\s/g,"").length}),l=r(o,t);return l||n(109)(""+e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return t+"/"+e},a=function(e,t){var n=void 0,r=void 0,a=void 0,l=void 0;if(e.claimData){var o=e.claimData;n=o.channelName,r=o.certificateId,a=o.name,l=o.claimId}return n?t+"/"+n+":"+r+"/"+a:t+"/"+l+"/"+a},l=function(e,t){return t+"/"+e.name+":"+e.longId};t.createCanonicalLink=function(e,t,n,o){return e?a(e,o):t?l(t,o):r(n,o)}},function(e,t,n){"use strict";e.exports={validateFile:function(e){if(!e)throw new Error("no file provided");if(/'/.test(e.name))throw new Error("apostrophes are not allowed in the file name");switch(e.type){case"image/jpeg":case"image/jpg":case"image/png":if(e.size>1e7)throw new Error("Sorry, images are limited to 10 megabytes.");break;case"image/gif":if(e.size>5e7)throw new Error("Sorry, GIFs are limited to 50 megabytes.");break;case"video/mp4":if(e.size>5e7)throw new Error("Sorry, videos are limited to 50 megabytes.");break;default:throw new Error(e.type+" is not a supported file type. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.")}}}},function(e,t,n){"use strict";var r=function(){function e(e,t){var n=[],r=!0,a=!1,l=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,l=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw l}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.exports={REGEXP_INVALID_CLAIM:/[^A-Za-z0-9-]/g,REGEXP_INVALID_CHANNEL:/[^A-Za-z0-9-@]/g,REGEXP_ADDRESS:/^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/,CHANNEL_CHAR:"@",parseIdentifier:function(t){var n=new RegExp("([^:$#/]*)([:$#]?)([^/]*)"),a=n.exec(t).map(function(e){return e||null}),l=r(a,4),o=(l[0],l[1]),i=l[2],u=l[3];if(!o)throw new Error('Check your URL. No channel name provided before "'+i+'"');var s=o.startsWith(e.exports.CHANNEL_CHAR),c=s?o:null,d=void 0;if(s){if(!c)throw new Error('Check your URL. No channel name after "@".');var f=c.match(e.exports.REGEXP_INVALID_CHANNEL);if(f)throw new Error('Check your URL. Invalid characters in channel name: "'+f.join(", ")+'".')}else d=o;var p=void 0;if(i){if(!u)throw new Error('Check your URL. No modifier provided after separator "'+i+'"');if(":"!==i)throw new Error('Check your URL. The "'+i+'" modifier is not currently supported');p=u}return{isChannel:s,channelName:c,channelClaimId:p||null,claimId:d||null}},parseClaim:function(t){var n=new RegExp("([^:$#/.]*)([:$#.]?)([^/]*)"),a=n.exec(t).map(function(e){return e||null}),l=r(a,4),o=(l[0],l[1]),i=l[2],u=l[3];if(!o)throw new Error('Check your URL. No claim name provided before "."');var s=o.match(e.exports.REGEXP_INVALID_CLAIM);if(s)throw new Error('Check your URL. Invalid characters in claim name: "'+s.join(", ")+'".');if(i){if(!u)throw new Error('Check your URL. No file extension provided after separator "'+i+'".');if("."!==i)throw new Error('Check your URL. The "'+i+'" separator is not supported in the claim name.')}return{claimName:o,extension:u||null}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e){switch(e.substring(e.lastIndexOf("."))){case"jpeg":case"jpg":return"image/jpeg";case"png":return"image/png";case"gif":return"image/gif";case"mp4":return"video/mp4";default:return"image/jpeg"}}return""},a=function(e,t,n,r){return[{property:"og:title",content:n},{property:"og:url",content:e},{property:"og:site_name",content:n},{property:"og:description",content:t},{property:"twitter:site",content:r},{property:"twitter:card",content:"summary"}]},l=function(e,t,n,r){var a=r.name;return[{property:"og:title",content:a+" on "+e},{property:"og:url",content:t+"/"+a+":"+r.longId},{property:"og:site_name",content:e},{property:"og:description",content:a+", a channel on "+e},{property:"twitter:site",content:n},{property:"twitter:card",content:"summary"}]},o=function(e,t,n,a,l,o){var i=a.claimData,u=i.contentType,s=e+"/"+i.claimId+"/"+i.name,c=e+"/"+i.claimId+"/"+i.name,d=e+"/"+i.claimId+"/"+i.name+"."+i.fileExt,f=i.title||i.name,p=i.description||l,h=r(i.thumbnail),m=i.thumbnail||o,b=[{property:"og:title",content:f},{property:"og:url",content:c},{property:"og:site_name",content:t},{property:"og:description",content:p},{property:"og:image:width",content:600},{property:"og:image:height",content:315},{property:"twitter:site",content:n}];return"video/mp4"===u||"video/webm"===u?(b.push({property:"og:video",content:d}),b.push({property:"og:video:secure_url",content:d}),b.push({property:"og:video:type",content:u}),b.push({property:"og:image",content:m}),b.push({property:"og:image:type",content:h}),b.push({property:"og:type",content:"video"}),b.push({property:"twitter:card",content:"player"}),b.push({property:"twitter:player",content:s}),b.push({property:"twitter:player:width",content:600}),b.push({property:"twitter:text:player_width",content:600}),b.push({property:"twitter:player:height",content:337}),b.push({property:"twitter:player:stream",content:d}),b.push({property:"twitter:player:stream:content_type",content:u})):(b.push({property:"og:image",content:d}),b.push({property:"og:image:type",content:u}),b.push({property:"og:type",content:"article"}),b.push({property:"twitter:card",content:"summary_large_image"})),b};t.createMetaTags=function(e,t,n,r,i,u,s,c){return i?o(t,n,r,i,s,c):u?l(t,n,r,u):a(e,t,n,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.createPageTitle=function(e,t){return t?e+" - "+t:""+e}},function(e,t,n){"use strict";function r(e,t,n){return{type:l.CHANNEL_UPDATE,data:{name:e,shortId:t,longId:n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.updateLoggedInChannel=r;var a=n(106),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(a)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n'}):u.default.createElement("input",{type:"text",id:"embed-text",className:"input-disabled input-text--full-width",readOnly:!0,onClick:this.select,spellCheck:"false",value:''})),u.default.createElement("div",{className:"column column--1"}),u.default.createElement("div",{className:"column column--2"},u.default.createElement("button",{className:"button--primary button--wide","data-elementtocopy":"embed-text",onClick:this.copyToClipboard},"copy")))))),u.default.createElement("div",{className:"flex-container--row flex-container--space-between-bottom"},u.default.createElement(s.Link,{className:"link--primary",to:"/"+t+"/"+o+"."+c},u.default.createElement("span",{className:"text"},"Direct Link")),u.default.createElement("a",{className:"link--primary",href:p+"/"+i+"/"+o+"."+c,download:o},"Download"),u.default.createElement("a",{className:"link--primary",target:"_blank",href:"https://lbry.io/dmca"},"Report")))}}]),t}(u.default.Component);t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0?s.default.createElement("div",null,t.map(function(e,t){return s.default.createElement(d.default,{claimData:e,key:e.name+"-"+t})}),s.default.createElement("div",null,n>1&&s.default.createElement("button",{className:"button--secondary",onClick:this.showPreviousResultsPage},"Previous Page"),n0;)a+=1,r=t.substring(0,a),l=l.filter(function(e){return e.claimId&&e.claimId.substring(0,a)===r});return r}}},function(e,t,n){"use strict";var r=n(2),a=n(98),l=n(3),o=l.details,i=l.publishing;e.exports={parsePublishApiRequestBody:function(e){var t=e.name,n=e.nsfw,r=e.license,a=e.title,l=e.description,o=e.thumbnail;if(!t)throw new Error("no name field found in request");if(/[^A-Za-z0-9,-]/.exec(t))throw new Error('The claim name you provided is not allowed. Only the following characters are allowed: A-Z, a-z, 0-9, and "-"');return n="true"===n,r=r||null,a=a||null,l=l||null,o=o||null,{name:t,nsfw:n,license:r,title:a,description:l,thumbnail:o}},parsePublishApiRequestFiles:function(t){var n=t.file,r=t.thumbnail;if(!n)throw new Error("no file with key of [file] found in request");if(!n.path)throw new Error("no file path found");if(!n.type)throw new Error("no file type found");if(!n.size)throw new Error("no file type found");if(/'/.test(n.name))throw new Error("apostrophes are not allowed in the file name");return e.exports.validateFileTypeAndSize(n),{fileName:n.name,filePath:n.path,fileType:n.type,thumbnailFileName:r?r.name:null,thumbnailFilePath:r?r.path:null,thumbnailFileType:r?r.type:null}},validateFileTypeAndSize:function(e){switch(e.type){case"image/jpeg":case"image/jpg":case"image/png":if(e.size>1e7)throw r.debug("publish > file validation > .jpeg/.jpg/.png was too big"),new Error("Sorry, images are limited to 10 megabytes.");break;case"image/gif":if(e.size>5e7)throw r.debug("publish > file validation > .gif was too big"),new Error("Sorry, .gifs are limited to 50 megabytes.");break;case"video/mp4":if(e.size>5e7)throw r.debug("publish > file validation > .mp4 was too big"),new Error("Sorry, videos are limited to 50 megabytes.");break;default:throw r.debug("publish > file validation > unrecognized file type"),new Error("The "+e.type+" content type is not supported. Only, .jpeg, .png, .gif, and .mp4 files are currently supported.")}return e},createBasicPublishParams:function(e,t,n,a,l,u,s){r.debug("Creating Publish Parameters"),null!==n&&""!==n.trim()||(n=t),null!==a&&""!==a.trim()||(a=""),null!==l&&""!==l.trim()||(l=" ");var c={name:t,file_path:e,bid:.01,metadata:{description:a,title:n,author:o.title,language:"en",license:l,nsfw:u},claim_address:i.primaryClaimAddress};return s&&(c.metadata.thumbnail=s),c},createThumbnailPublishParams:function(e,t,n,a){if(e)return r.debug("Creating Thumbnail Publish Parameters"),{name:t+"-thumb",file_path:e,bid:.01,metadata:{title:t+" thumbnail",description:"a thumbnail for "+t,author:o.title,language:"en",license:n,nsfw:a},claim_address:i.primaryClaimAddress,channel_name:i.thumbnailChannel,channel_id:i.thumbnailChannelId}},deleteTemporaryFile:function(e){a.unlink(e,function(t){if(t)throw r.error("error deleting temporary file "+e),t;r.debug("successfully deleted "+e)})},addGetResultsToFileData:function(e,t){return e.fileName=t.file_name,e.filePath=t.download_path,e},createFileData:function(e){var t=e.name,n=e.claimId,r=e.outpoint,a=e.height,l=e.address,o=e.nsfw;return{name:t,claimId:n,outpoint:r,height:a,address:l,fileName:"",filePath:"",fileType:e.contentType,nsfw:o}}}},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";var r=function(){function e(e,t){var n=[],r=!0,a=!1,l=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,l=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw l}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=n(2);e.exports={handleErrorResponse:function(t,n,l,o){a.error("Error on "+t,e.exports.useObjectPropertiesIfNoKeys(l));var i=e.exports.returnErrorMessageAndStatus(l),u=r(i,2),s=u[0],c=u[1];o.status(s).json(e.exports.createErrorResponsePayload(s,c))},returnErrorMessageAndStatus:function(e){var t=void 0,n=void 0;return"ECONNREFUSED"===e.code?(t=503,n="Connection refused. The daemon may not be running."):(t=400,n=e.message?e.message:e),[t,n]},useObjectPropertiesIfNoKeys:function(e){if(0===Object.keys(e).length){var t={};return Object.getOwnPropertyNames(e).forEach(function(n){t[n]=e[n]}),t}return e},createErrorResponsePayload:function(e,t){return{status:e,success:!1,message:t}}}},function(e,t,n){"use strict";var r=function(){function e(e,t){var n=[],r=!0,a=!1,l=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,l=e}finally{try{!r&&i.return&&i.return()}finally{if(a)throw l}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=n(9),l=n(2),o=n(145),i=o.returnPaginatedChannelClaims;e.exports={getClaimId:function(t,n,r,a){return t?e.exports.getClaimIdByChannel(t,n,r):e.exports.getClaimIdByClaim(r,a)},getClaimIdByClaim:function(e,t){return l.debug("getClaimIdByClaim("+e+", "+t+")"),new Promise(function(n,r){a.Claim.getLongClaimId(e,t).then(function(e){e||n("NO_CLAIM"),n(e)}).catch(function(e){r(e)})})},getClaimIdByChannel:function(e,t,n){return l.debug("getClaimIdByChannel("+e+", "+t+", "+n+")"),new Promise(function(l,o){a.Certificate.getLongChannelId(e,t).then(function(e){return e?Promise.all([e,a.Claim.getClaimIdByLongChannelId(e,n)]):[null,null]}).then(function(e){var t=r(e,2),n=t[0],a=t[1];return n?a?void l(a):l("NO_CLAIM"):l("NO_CHANNEL")}).catch(function(e){o(e)})})},getChannelData:function(e,t,n){return new Promise(function(n,l){a.Certificate.getLongChannelId(e,t).then(function(t){return t?Promise.all([t,a.Certificate.getShortChannelIdFromLongChannelId(t,e)]):[null,null,null]}).then(function(t){var a=r(t,2),l=a[0],o=a[1];if(!l)return n("NO_CHANNEL");n({channelName:e,longChannelClaimId:l,shortChannelClaimId:o})}).catch(function(e){l(e)})})},getChannelClaims:function(e,t,n){return new Promise(function(l,o){a.Certificate.getLongChannelId(e,t).then(function(e){return e?Promise.all([e,a.Claim.getAllChannelClaims(e)]):[null,null,null]}).then(function(t){var a=r(t,2),o=a[0],u=a[1];if(!o)return l("NO_CHANNEL");var s=i(e,o,u,n);l(s)}).catch(function(e){o(e)})})},getLocalFileRecord:function(e,t){return a.File.findOne({where:{claimId:e,name:t}}).then(function(e){return e?e.dataValues:"NO_FILE"})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(0),l=r(a),o=n(102),i=n(57),u=n(103),s=r(u),c=n(1),d=n(4),f=n(13),p=r(f),h=n(108),m=r(h),b=n(113),v=r(b),g=n(48),y=r(g);e.exports=function(e,t){var n={},r=(0,i.createStore)(s.default),a=(0,o.renderToString)(l.default.createElement(c.Provider,{store:r},l.default.createElement(d.StaticRouter,{location:e.url,context:n},l.default.createElement(p.default,null,l.default.createElement(m.default,null))))),u=y.default.renderStatic();if(n.url)return t.redirect(301,n.url);var f=r.getState();t.send((0,v.default)(u,a,f))}},function(e,t){e.exports=require("react-dom/server")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(57),l=n(147),o=r(l),i=n(148),u=r(i),s=n(149),c=r(s),d=n(150),f=r(d);t.default=(0,a.combineReducers)({channel:u.default,publish:o.default,show:c.default,site:f.default})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.FILE_SELECTED="FILE_SELECTED",t.FILE_CLEAR="FILE_CLEAR",t.METADATA_UPDATE="METADATA_UPDATE",t.CLAIM_UPDATE="CLAIM_UPDATE",t.SET_PUBLISH_IN_CHANNEL="SET_PUBLISH_IN_CHANNEL",t.PUBLISH_STATUS_UPDATE="PUBLISH_STATUS_UPDATE",t.ERROR_UPDATE="ERROR_UPDATE",t.SELECTED_CHANNEL_UPDATE="SELECTED_CHANNEL_UPDATE",t.TOGGLE_METADATA_INPUTS="TOGGLE_METADATA_INPUTS",t.THUMBNAIL_NEW="THUMBNAIL_NEW",t.PUBLISH_START="PUBLISH_START"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.LOGIN="Existing",t.CREATE="New"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CHANNEL_UPDATE="CHANNEL_UPDATE"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.LOCAL_CHECK="LOCAL_CHECK",t.UNAVAILABLE="UNAVAILABLE",t.ERROR="ERROR",t.AVAILABLE="AVAILABLE"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),l=r(a),o=n(4),i=n(58),u=n(20),s=r(u),c=n(23),d=r(c),f=n(26),p=r(f),h=n(35),m=r(h),b=(0,i.dynamicImport)("pages/HomePage"),v=function(){return l.default.createElement(o.Switch,null,l.default.createElement(o.Route,{exact:!0,path:"/",component:b}),l.default.createElement(o.Route,{exact:!0,path:"/about",component:s.default}),l.default.createElement(o.Route,{exact:!0,path:"/login",component:d.default}),l.default.createElement(o.Route,{exact:!0,path:"/:identifier/:claim",component:p.default}),l.default.createElement(o.Route,{exact:!0,path:"/:claim",component:p.default}),l.default.createElement(o.Route,{component:m.default}))};t.default=v},function(e,t,n){function r(e){return n(a(e))}function a(e){var t=l[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}var l={"./canonicalLink":59,"./canonicalLink.js":59,"./dynamicImport":58,"./dynamicImport.js":58,"./file":60,"./file.js":60,"./lbryUri":61,"./lbryUri.js":61,"./metaTags":62,"./metaTags.js":62,"./pageTitle":63,"./pageTitle.js":63,"./publish":110,"./publish.js":110,"./request":8,"./request.js":8,"./validate":111,"./validate.js":111};r.keys=function(){return Object.keys(l)},r.resolve=a,e.exports=r,r.id=109},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.createPublishMetadata=function(e,t,n,r,a){var l=t.type,o=n.title,i=n.description,u=n.license,s=n.nsfw,c={name:e,title:o,description:i,license:u,nsfw:s,type:l};return r&&(c.channelName=a),c},t.createPublishFormData=function(e,t,n){var r=new FormData;r.append("file",e),t&&r.append("thumbnail",t);for(var a in n)n.hasOwnProperty(a)&&r.append(a,n[a]);return r},t.createThumbnailUrl=function(e,t,n,r){return r+"/"+e+":"+t+"/"+n+"-thumb.png"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.validateChannelSelection=function(e,t,n){if(e&&t!==n.name)throw new Error("Log in to a channel or select Anonymous")},t.validatePublishParams=function(e,t,n){if(!e)throw new Error("Please choose a file");if(!t)throw new Error("Please enter a URL");if(n)throw new Error("Fix the url")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CHANNEL="CHANNEL",t.ASSET_LITE="ASSET_LITE",t.ASSET_DETAILS="ASSET_DETAILS"},function(e,t,n){"use strict";e.exports=function(e,t,n){return'\n \n \n \n \n \n \n \x3c!--helmet--\x3e\n '+e.title.toString()+"\n "+e.meta.toString()+"\n "+e.link.toString()+'\n \x3c!--style sheets--\x3e\n \n \n \n \x3c!--google font--\x3e\n \n \n \n
\n
'+t+"
\n
\n