(this["webpackJsonpmusic-vine"]=this["webpackJsonpmusic-vine"]||[]).push([[52],{1400:function(t,n,e){"use strict";e.r(n);var c=e(4),o=e(5),a=e(8),i=e(7),r=e(6),s=e(1),u=e.n(s),l=e(29),d=e(252),h=e.n(d),f=e(66),p=e(2),j=e.n(p),b=e(25),m=e.n(b),_=e(1368),O=e(1369),g=e(935),v=e(947);var y=Object(v.a)("email",(function(t,n){var e=n.subject,c=n.body;return"mailto:"+Object(g.a)({subject:e,body:c||t})}),(function(t){return{subject:t.subject,body:t.body}}),{subject:j.a.string,body:j.a.string},{openWindow:!1,onClick:function(t){window.location.href=t}}),T=e(838),S=e.n(T),k=e(267),x=e(263),w=e(934),E=e(16),A=e(254),C=e(49),N=e(0),I=function(t){Object(i.a)(e,t);var n=Object(r.a)(e);function e(t){var o;return Object(c.a)(this,e),(o=n.call(this,t)).share=o.share.bind(Object(a.a)(o)),o.onClickFollow=o.onClickFollow.bind(Object(a.a)(o)),o}return Object(o.a)(e,[{key:"componentWillMount",value:function(){this.setState({artist:this.props.artist,followingArtist:!1})}},{key:"onClickFollow",value:function(){if(!sessionStorage.getItem("auth_token"))return this.props.showSignUpModal();var t=this.props,n=t.following,e=t.artist;return n.includes(e.id)?this.props.unfollowArtist(e.id):this.props.followArtist(e.id)}},{key:"share",value:function(){m()(".hero__icons").find(".hero__icons--block").toggleClass("active")}},{key:"render",value:function(){var t=window.location.href,n="".concat(t),e=null;this.props.artist.full_description&&(e=this.props.artist.full_description);var c=this.props,o=c.following,a=c.artist,i=o.includes(a.id),r=Object(N.jsxs)(s.Fragment,{children:[Object(N.jsxs)("div",{className:"hero__intro hero__intro--bare col-12 order-1",children:[Object(N.jsx)("h5",{className:"hero__sub",children:"Artist"}),Object(N.jsx)("h2",{className:"hero__title",children:this.props.artist.name})]}),Object(N.jsxs)("div",{className:"text-center col-12 order-3 order-md-2",children:[Object(N.jsxs)("div",{className:"hero__icons",children:[Object(N.jsxs)("div",{className:"hero__icons--block",children:[Object(N.jsx)(_.a,{url:n,quote:"'".concat(this.state.artist.name,"' - artist on Music Vine"),className:"social-icon-main",children:Object(N.jsx)("div",{className:"social-icon-circle",children:Object(N.jsx)(k.a,{})})}),Object(N.jsx)(O.a,{url:n,title:"'".concat(this.state.artist.name,"' - artist on Music Vine"),className:"social-icon-main",children:Object(N.jsx)("div",{className:"social-icon-circle",children:Object(N.jsx)(x.a,{})})}),Object(N.jsx)(y,{url:n,subject:"'".concat(this.state.artist.name,"' - artist on Music Vine"),body:"Hi, Take a look at this artist on Music Vine: \n\n".concat(window.location.href),className:"social-icon-main",children:Object(N.jsx)("div",{className:"social-icon-circle",children:Object(N.jsx)(w.a,{})})})]}),Object(N.jsx)("a",{href:"#share",className:"hero__custom-btn hero__custom-btn--share",onClick:this.share,children:Object(N.jsx)("div",{className:"svg-container",children:Object(N.jsx)("img",{alt:"Share Artist",className:"svg-xxs",src:"https://cdn.musicvine.com/images/svg/share.svg"})})})]}),Object(N.jsxs)("div",{className:"hero__share-btn",children:[Object(N.jsx)("button",{onClick:this.onClickFollow,type:"button",name:"button",className:"".concat(i?"following-artist":""),children:i?Object(N.jsx)("span",{className:"hero__unfollow",children:"Following"}):Object(N.jsx)("span",{className:"hero__follow",children:"Follow"})}),Object(N.jsx)("div",{className:"hero__tooltip",children:Object(N.jsx)("span",{children:"Get notified when this artist releases new music."})})]})]})]});return Object(N.jsx)("div",{className:"d-flex flex-column d-lg-block",children:Object(N.jsx)("div",{style:this.props.artist.header_image.image_aws_url?F(this.props.artist):null,className:"hero hero--secondary hero--artist hero--bare",children:Object(N.jsx)("div",{className:"hero__content container-fluid",children:Object(N.jsxs)("div",{className:"row",children:[e&&r,Object(N.jsx)("div",{className:"grid__item col-6 offset-3 offset-md-0 col-md-4 order-2 order-md-3",children:this.props.artist.avatar_image.image_aws_url&&Object(N.jsx)("div",{className:"hero__thumb",children:Object(N.jsx)("img",{src:Object(C.b)(this.props.artist.avatar_image.image_aws_url,380),alt:this.props.artist.name})})}),Object(N.jsxs)("div",{className:"grid__item col-md-8 order-4",children:[e&&Object(N.jsx)("p",{className:"hero__text",children:e}),!e&&r]})]})})})})}}]),e}(u.a.Component);function F(t){return t.header_image?{backgroundImage:"url(".concat(Object(C.b)(t.header_image.image_aws_url,"?auto=compress"),")"),backgroundPosition:"center",backgroundSize:"cover"}:null}var D=Object(l.b)((function(t){return{following:t.get("following")}}),(function(t){return{followArtist:function(n){t(Object(A.a)(n))},unfollowArtist:function(n){t(Object(A.c)(n))},showSignUpModal:function(){t(Object(E.a)("playSignup","follow_artist"))}}}))(I),L=e(14),R=function(t){var n=t.artist;return Object(N.jsxs)("span",{className:"filter-browse__music",children:[Object(N.jsx)("span",{className:"filter__title",children:Object(N.jsx)(L.a,{to:"/artists",children:"Artists"})}),Object(N.jsx)("ul",{className:"list-bare",children:Object(N.jsx)("li",{children:Object(N.jsx)(L.a,{className:"filter__styles-dropdown filter__breadcrumb-active",to:"/browse/artist/".concat(n.slug?n.slug:n.id),children:Object(N.jsx)(S.a,{text:n.name,length:18})})})})]})},M=e(848),P=e(255),G=e(783),V=e(73),H=e(188),U=e(148),J=e(821),W=e(177),q=function(t){Object(i.a)(e,t);var n=Object(r.a)(e);function e(t){var o;return Object(c.a)(this,e),(o=n.call(this,t)).state={artist:{}},o.loadData=o.loadData.bind(Object(a.a)(o)),o}return Object(o.a)(e,[{key:"componentWillMount",value:function(){this.props.onSetAppliedFilters(this.props.location.query)}},{key:"componentDidMount",value:function(){var t=this;Object(G.a)(this.props.params.artistId).then((function(n){n?(t.setState({artist:n}),t.props.onLoadEditData({type:"artist",id:n.id,name:n.name}),t.props.params.artistId!=n.slug&&n.slug&&t.props.router.push("/browse/artist/"+n.slug)):window.location.href="/artists"})).catch((function(t){console.log(t)})),window.addEventListener("popstate",(function(){t.props.onSetAppliedFilters(t.props.location.query),t.props.onSetNotFiltered()}),!1)}},{key:"componentWillReceiveProps",value:function(t){var n=this;this.props.params.artistId!==t.params.artistId&&(Object(G.a)(t.params.artistId).then((function(t){n.setState({artist:t})})).catch((function(t){console.log(t)})),this.props.onSetAppliedFilters(t.location.query),this.props.onSetNotFiltered(),this.props.onFetchArtistTracks(t.params.artistId,0,0,"Relevance",0,[],1))}},{key:"componentWillUnmount",value:function(){this.props.flushTrackWave(),this.props.onClearEditData()}},{key:"componentDidCatch",value:function(t,n){console.log(t,n)}},{key:"loadData",value:function(t,n,e,c,o,a){var i=this.props.params.artistId;this.props.onFetchArtistTracks(i,t,n,e,c,o,a)}},{key:"render",value:function(){var t=this.state.artist,n=(this.props.params.artistId,Object(J.c)(t.meta_title,t.name,"artist")),e=Object(J.b)(t.meta_description,{name:t.name},"artist"),c=t.header_image?Object(N.jsx)(D,{artist:t}):null,o=0!=Object.keys(t).length?Object(N.jsx)(R,{artist:t}):null,a="/browse/artist/".concat(t.slug?t.slug:t.id);return Object(N.jsxs)("section",{id:"browse-artist-page",children:[Object(N.jsxs)(h.a,{children:[Object(N.jsx)("title",{children:n}),Object(N.jsx)("meta",{name:"description",content:e})]}),Object(N.jsx)(W.a,{children:Object(N.jsx)(M.a,{breadcrumb:o,url:a,hero:c,loadData:this.loadData,hideCollection:!0})})]})}}]),e}(s.Component);q.contextTypes={router:j.a.object};var z=Object(f.createStructuredSelector)({});n.default=Object(l.b)(z,(function(t){return{onFetchArtistTracks:function(n,e,c,o,a,i,r){t(Object(P.a)("artist",n,e,c,o,a,i,r))},flushTrackWave:function(){return t(Object(V.n)())},onSetAppliedFilters:function(n){t(Object(H.c)(n))},onSetNotFiltered:function(){t(Object(H.e)())},onLoadEditData:function(n){t(Object(U.c)(n))},onClearEditData:function(){t(Object(U.a)())}}}))(q)},783:function(t,n,e){"use strict";e.d(n,"a",(function(){return s})),e.d(n,"e",(function(){return u})),e.d(n,"f",(function(){return l})),e.d(n,"h",(function(){return d})),e.d(n,"i",(function(){return h})),e.d(n,"c",(function(){return f})),e.d(n,"j",(function(){return p})),e.d(n,"g",(function(){return j})),e.d(n,"b",(function(){return b})),e.d(n,"d",(function(){return m})),e.d(n,"k",(function(){return _})),e.d(n,"l",(function(){return O})),e.d(n,"m",(function(){return g}));var c=e(3),o=e(13),a=e.n(o),i=e(10),r=e(33);function s(t){return a()("".concat(Object(r.a)(),"artists/").concat(t),{method:"GET"}).then((function(t){return t.json()})).catch((function(t){return t}))}function u(){return function(t){return new Promise((function(n,e){a()("".concat(Object(r.a)(),"artist/categories"),{method:"GET"}).then((function(t){return t.json()})).then((function(e){t({type:"FETCH_CATEGORIES_SUCCESS",payload:e}),n(e)})).catch((function(n){e(n),t({type:"FETCH_CATEGORIES_FAILURE",payload:n})}))}))}}function l(t,n,e){return"#"===n&&(n="$"),function(c){return c({type:"FETCH_CATEGORY_ARTISTS_REQUEST"}),new Promise((function(o,i){return a()("".concat(Object(r.a)(),"artists/").concat(t,"/categories/").concat(n,"/letters/").concat(e),{method:"GET"}).then((function(t){return t.json()})).then((function(t){o(t),c({type:"FETCH_CATEGORY_ARTISTS_SUCCESS",payload:t})})).catch((function(t){i(t),c({type:"FETCH_CATEGORY_ARTISTS_FAILURE",payload:t})}))}))}}function d(t,n,e){return function(c){return new Promise((function(o,i){a()("".concat(Object(r.a)(),"artists/").concat(t,"/latests/").concat(n,"/letters/").concat(e),{method:"GET"}).then((function(t){return t.json()})).then((function(t){o(t),c({type:"FETCH_LATEST_ARTISTS_SUCCESS",payload:t})})).catch((function(t){i(t),c({type:"FETCH_LATEST_ARTISTS_FAILURE",payload:t})}))}))}}function h(){return function(t){return new Promise((function(n,e){a()("".concat(Object(r.a)(),"artist/letters"),{method:"GET"}).then((function(t){return t.json()})).then((function(e){n(e),t({type:"FETCH_LETTERS_SUCCESS",payload:e})})).catch((function(n){e(n),t({type:"FETCH_LETTERS_FAILURE",payload:n})}))}))}}function f(t){var n=sessionStorage.getItem("auth_token");return function(e){return a()("".concat(i.a,"api-artist/account/statement"),{method:"POST",body:JSON.stringify(Object(c.a)({token:n},t)),headers:{"Content-Type":"application/json",token:n||null}}).then((function(t){return t.json()})).then((function(t){return e({type:"ADD_ARTIST_DETAILS",payload:t.artist_details}),t})).catch((function(t){return t}))}}function p(t){var n=sessionStorage.getItem("auth_token");return function(e){return a()("".concat(i.a,"api-artist/account/portfolio"),{method:"POST",body:JSON.stringify(Object(c.a)({token:n},t)),headers:{"Content-Type":"application/json",token:n||null}}).then((function(t){return t.json()})).then((function(t){return e({type:"ADD_ARTIST_DETAILS",payload:t.artist_details}),t})).catch((function(t){return t}))}}function j(){var t=sessionStorage.getItem("auth_token");return function(n){return a()("".concat(i.a,"api-artist/account/artist-earnings"),{method:"POST",body:JSON.stringify({token:t}),headers:{"Content-Type":"application/json",token:t||null}}).then((function(t){return t.json()})).then((function(t){return n({type:"ADD_ARTIST_DETAILS",payload:t.artist_details}),t})).catch((function(t){return t}))}}function b(){var t=sessionStorage.getItem("auth_token");return function(n){return a()("".concat(i.a,"api-artist/account"),{method:"GET",headers:{"Content-Type":"application/json","X-Auth-Token":t||null}}).then((function(t){return t.json()})).then((function(t){return n({type:"ADD_ARTIST_DETAILS",payload:t.artist_details}),t})).catch((function(t){return t}))}}function m(){var t=sessionStorage.getItem("auth_token");return function(n){return a()("".concat(i.a,"api-artist/account/submissions"),{method:"POST",headers:{"Content-Type":"application/json",token:t||null},body:JSON.stringify({token:t})}).then((function(t){return t.json()})).then((function(t){return n({type:"ADD_ARTIST_DETAILS",payload:t.artist_details}),t})).catch((function(t){return t}))}}function _(t){var n=sessionStorage.getItem("auth_token");return function(){return a()("".concat(i.a,"api-artist/account/statement/subscription-usage-report/").concat(t),{method:"GET",headers:{"Content-Type":"application/json","X-Auth-Token":n||null}}).then((function(t){return t.json()})).catch((function(t){return t}))}}function O(t){var n=sessionStorage.getItem("auth_token");return function(){return a()("".concat(i.a,"api-artist/account"),{method:"POST",body:JSON.stringify(Object(c.a)({token:n},t)),headers:{"Content-Type":"application/json",token:n||null}}).then((function(t){return t.json()})).catch((function(t){return t}))}}function g(t){var n=sessionStorage.getItem("auth_token");return function(){return a()("".concat(i.a,"api-update-paypal-email"),{method:"POST",body:JSON.stringify({token:n,paypal_email:t}),headers:{"Content-Type":"application/json",token:n||null}}).then((function(t){return t.json()})).catch((function(t){return t}))}}},821:function(t,n,e){"use strict";function c(t,n,e){var c=n,o="";if(t&&""!==t)return t;if(void 0===n||""===n)return"";switch(e){case"artist":o="Production Music Licensing";break;case"collection":o="Music For Video";break;case"style":case"track":case"general":o="Music Licensing";break;default:o="Music Licensing For Video And Film"}return"".concat(c," ").concat("\u2022"," ").concat(o," ").concat("\u2022"," ").concat("Music Vine")}function o(t,n,e){var c="";if(t&&""!==t)return t;if(void 0===n||""===n)return"";switch(e){case"collection":n&&n.desc&&n.name&&(c="".concat(n.desc," Explore '").concat(n.name,"' on Music Vine."));break;case"style":case"track":c="Music Licensing";break;case"general":c=n.subtitle?"".concat(n.name,". ").concat(n.subtitle):n.name;break;default:c=""}return c}function a(t,n){var e="";return t&&n&&(e="".concat(t," by ").concat(n," \u2022 Music Licensing \u2022 Music Vine")),e}function i(t,n,e,c){var o="";if(c)return"Page not found \u2022 Music Vine";if(t&&(o=t),n&&(o+=" \u2022 ".concat(n)),""===o){if(!e||""===e)return"";o="".concat(e," \u2022 Music Licensing")}return o+=" \u2022 Music Vine"}function r(t){var n="",e=s(t.styles,2),c=s(t.moods,2,e);return(n="Listen to this ".concat(c[0]," and ").concat(c[1]," track from ").concat(t.artist," that's perfect for ").concat(e[0]," and ").concat(e[1]," productions. License ").concat(t.track," now.")).includes("undefined")&&(n=""),n}function s(t,n,e){var c=[],o=!1;for(var a in t){for(var i in t[a])if(o=t[a][i][0],e&&e.includes(o)||c.push(o),c.length>=n)break;if(c.length>=n)break}return c}e.d(n,"c",(function(){return c})),e.d(n,"b",(function(){return o})),e.d(n,"e",(function(){return a})),e.d(n,"a",(function(){return i})),e.d(n,"d",(function(){return r}))},934:function(t,n,e){"use strict";var c=e(4),o=e(5),a=e(7),i=e(6),r=e(1),s=e.n(r),u=e(15),l=e.n(u),d=e(0),h=function(t){Object(a.a)(e,t);var n=Object(i.a)(e);function e(){return Object(c.a)(this,e),n.apply(this,arguments)}return Object(o.a)(e,[{key:"render",value:function(){return Object(d.jsx)(l.a,{src:''})}}]),e}(s.a.Component);n.a=h}}]); //# sourceMappingURL=52.chunk.js.map?hash=acae3924