1"use strict";(self["webpackChunkOneSub"]=self["webpackChunkOneSub"]||[]).push([[8778],{95320:function(e,t,s){s.r(t),s.d(t,{default:function(){return p}});var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"thread-wrapper"},[t("div",{staticClass:"layout-row stretch hero-image"},[t("img",{attrs:{src:e.getPaper.element_images[0],alt:e.getPaper.name}})]),t("div",{staticClass:"layout-row stretch"},[t("h1",{class:{limit:e.headlineLimit()},domProps:{innerHTML:e._s(e.getPaper.name)}})]),t("div",{staticClass:"layout-row"},[t("div",{staticClass:"layout-column first profile-image"},[t("img",{attrs:{src:e.getAuthor.avatar,alt:e.getAuthor.name}})]),t("div",{staticClass:"layout-column last"},[t("div",[t("span",{staticClass:"name",on:{click:function(t){return e.goToProfile()}}},[e._v(e._s(e.getAuthor.name))]),e.doesFollow||e.myProfile?e._e():t("button",{staticClass:"btn btn-meta follower follow",on:{click:function(t){return e.didSelectFollow()}}},[e._v("Follow")]),e.isLoggedIn&&e.doesFollow&&!e.myProfile?t("button",{staticClass:"btn btn-meta follower following",attrs:{href:"#thread_handles"},on:{click:function(t){return e.didSelectUnfollow()},mouseover:function(t){return e.handleFollowHover(!0)},mouseleave:function(t){return e.handleFollowHover(!1)}}},[e._v(e._s(e.followButton))]):e._e()]),t("div",[t("div",[t("span",{staticClass:"label"},[e._v("Last updated")]),t("span",{staticClass:"stat"},[e._v(e._s(e._f("ago")(e.getPaper.updated)))])]),t("span",{staticClass:"spacer"},[e._v("â¢")]),t("div",[t("span",{staticClass:"stat"},[e._v(e._s(e.getPaper.elements.length))]),t("span",{staticClass:"label"},[e._v("clips")])]),t("span",{staticClass:"spacer"},[e._v("â¢")]),t("div",[t("span",{staticClass:"stat"},[e._v("1")]),t("span",{staticClass:"label"},[e._v(e._s(e._f("plural")(1,"likes")))])]),t("span",{staticClass:"spacer"},[e._v("â¢")]),t("div",[t("span",{staticClass:"stat"},[e._v(e._s(e.getPaper.comments.length))]),t("span",{staticClass:"label"},[e._v(e._s(e._f("plural")(e.getPaper.comments.length,"responses")))])])])])])])},r=[],i=(s(44114),s(18111),s(61701),s(14603),s(47566),s(98721),s(37693)),l={name:"Read",components:{},data(){return{isLegacy:!1,profile:{},paper_:null,isEdited:!1,editOn:!1,error:!1,followHover:!1,unfollowConfirm:!1,delete_message:"Delete Thread"}},computed:{paper(){return this.$store.getters.getThread(this.slug)},xname(){return this.$route.params.xname},slug(){return this.$route.params.slug},doesFollow(){return this.$store.getters.checkFollowing(this.xname)},followButton(){return this.unfollowConfirm?"Are you sure?":!0===this.followHover?"Unfollow":"Following"},myProfile(){return this.$store.getters.screenName&&this.xname==this.$store.getters.screenName},getProfile(){return this.profile||{}},getStats(){return this.getProfile.stats||{}},getComments(){var e;return(null===(e=this.paper)||void 0===e?void 0:e.comments)||[]},isLoggedIn(){return this.$store.getters.isLoggedIn},hasApp(){return this.$store.getters.hasApp},showCTA(){return this.getElements.length>3&&!this.myProfile},getPaper(){var e;return null!==(e=this.paper)&&void 0!==e&&e.slug?this.paper:{name:""}},getAuthor(){var e;return(null===(e=this.paper)||void 0===e?void 0:e.author)||{}},myPaper(){var e,t;return this.$store.getters.screenName&&(null===(e=this.paper)||void 0===e||null===(t=e.author)||void 0===t?void 0:t.screen_name)==this.$store.getters.screenName},getScreenName(){return this.$store.getters.screenName},getElements(){var e;return(null===(e=this.paper)||void 0===e?void 0:e.elements)||[]},canPublish(){var e,t;return(null===(e=this.paper)||void 0===e||null===(t=e.elements)||void 0===t?void 0:t.length)>=2},getThreadLockTime(){return"1 hour"},isAlpha(){return this.$store.getters.isAlpha}},mounted(){var e;const t=new URL(window.location).searchParams.get("legacy");"on"===t&&(this.isLegacy=!0),this.load(),this.slug&&i.A.getThread(this.xname,this.slug).then(e=>{var t;this.error=e.error,this.paper_={...e},window.document.title=(null===(t=this.paper_)||void 0===t?void 0:t.name)||"Loading"}).catch(e=>{console.error(e)}),window.document.title=(null===(e=this.paper_)||void 0===e?void 0:e.name)||"Loading"},methods:{didSelectFollow(){this.isLoggedIn?i.A.followUser(this.xname).then(()=>{this.profile.stats.followers+=1}):this.$store.commit("updateShowModal","skip")},headlineLimit(){return this.getPaper.name.length>60},didSelectUnfollow(){this.isLoggedIn&&(this.unfollowConfirm?i.A.unfollowUser(this.xname).then(()=>{this.unfollowConfirm=!1,this.profile.stats.followers-=1}):this.unfollowConfirm=!0)},handleFollowHover(e){this.followHover=e},addClipping(){this.EventBus.$emit("thread:share",{thread:this.slug,on:!0})},deleteThread(){this.EventBus.$emit("showInboundMessage",{code:"TH002",callback:e=>{"delete"==e&&(this.delete_message="Deleting...",i.A.post(`/thread/update/${this.$store.getters.screenName}/${this.paper.slug}`,{delete:"on"}).then(()=>{this.$router.push(`/~${this.$store.getters.screenName}`)}))}})},clipDeleted(e){i.A.post(`/thread/update-element/${this.$store.getters.screenName}/${this.paper.slug}`,{clip:e,delete:"on"}).then(()=>{i.A.getThread(this.xname,this.slug).then(e=>{this.error=e.error,this.paper_={...e}}).catch(e=>{console.error(e)})})},load(){this.myProfile?i.A.getThreadsMine().then(e=>{this.error=e.error,this.profile=e.profile,this.threads=e.threads}).catch(e=>{console.error(e)}):(i.A.getThreadsScreenName(this.xname).then(e=>{this.error=e.error,this.profile=e.profile,this.threads=e.threads}).catch(e=>{console.error(e)}),i.A.checkIfFollowing(this.xname))},editMode(e){this.editOn=this.myPaper&&e},publishThread(){this.EventBus.$emit("showInboundMessage",{code:"CBX_threads_publish",callback:e=>{"publish"==e&&(this.paper.public=1,this.updatePaper({public:1}))}})},updatePaper(e){this.editOn=!1,i.A.post(`/thread/update/${this.xname}/${this.slug}`,e).then(e=>{this.paper_={...e.data},this.$store.commit("storeLibraryItem",{endpoint:"threads",item_key:this.slug,full:!0,data:e.data})})},updateClip(e){i.A.post(`/thread/update-element/${this.xname}/${this.slug}`,e).then(e=>{this.paper_={...e.data},this.$store.commit("storeLibraryItem",{endpoint:"threads",item_key:this.slug,full:!0,data:e.data})})},adjustPlacement(e){this.paper.elements.splice(e.idx+e.direction,0,this.paper.elements.splice(e.idx,1)[0]);let t=this.paper.elements.map(e=>e.slug);i.A.post(`/thread/update-element-order/${this.xname}/${this.slug}`,{order:t.join(",")}).then(e=>{this.paper_={...e.data},this.$store.commit("storeLibraryItem",{endpoint:"threads",item_key:this.slug,full:!0,data:e.data})})},didSelectSocial(e){let t,s,a,r,i,l,o=`${document.location.origin}/~${this.getAuthor.screen_name}/${this.getPaper.slug}
1`,n=`${this.paper.name} - Join me @onesub_threads`;switch(e){case"twitter":r=`https://twitter.com/share?text=${n}&url=${o}`,this.hasApp?this.EventBus.$emit("appCallback",{type:"socialCallback",data:{social:"twitter",type:"link",link:r}}):(s=window.open(`${r}`,"_blank"),s.focus());break;case"facebook":l=`https://www.facebook.com/sharer/sharer.php?u=${o}`,this.hasApp?this.EventBus.$emit("appCallback",{type:"socialCallback",data:{social:"facebook",type:"link",link:l}}):(t=window.open(`${l}`,"_blank"),t.focus());break;case"linkedin":i=`https://www.linkedin.com/shareArticle?mini=true&url=${o}&title=${this.paper.name}`,this.hasApp?this.EventBus.$emit("appCallback",{type:"socialCallback",data:{social:"linkedin",type:"link",link:i}}):(a=window.open(`${i}`,"_blank"),a.focus());break}},goToProfile(){this.$router.push("/~"+this.getAuthor.screen_name)}},watch:{slug(){i.A.getThread(this.xname,this.slug)},paper:{deep:!0,handler(){var e;window.document.title=(null===(e=this.paper)||void 0===e?void 0:e.name)||"OneSub Threads - Tell your story.",this.isEdited=["name","text"].find(e=>{var t,s;return(null===(t=this.paper)||void 0===t?void 0:t[e])!=(null===(s=this.paper_)||void 0===s?void 0:s[e])})}}}},o=l,n=s(81656),h=(0,n.A)(o,a,r,!1,null,"54f2e6fa",null),p=h.exports}}]); 2//# sourceMappingURL=view-ThreadNew-vue.e34f8102.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.