(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5547],{81862:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/embed/creator-profile",function(){return r(15620)}])},56881:function(e,t,r){"use strict";var a=r(85893),n=r(29009),l=r(98321),s=r(90508),i=r(39277),d=r(81508),o=r(50294),c=r(26050),u=r(46299),m=r(37700);let buildData=e=>e?.metrics?e?.metrics?.viewsConsistency?[{metric:"View Consistency",normalized:(0,u.Vr)(e.metrics.viewsConsistencyZscore)},{metric:"Vocal Audience",normalized:(0,u.Vr)(e.metrics.vocalAudienceZscore)},{metric:"Audience Enjoyment",normalized:(0,u.Vr)(e.metrics.audienceEnjoymentZscore)},{metric:"Audience Engagement",normalized:(0,u.Vr)(e.metrics.audienceEngagementZscore)},{metric:"Loyal Views",normalized:(0,u.Vr)(e.metrics.loyalAudienceZscore)}]:buildDataLegacy(e):[],buildDataLegacy=e=>{if(!e?.metrics)return[];let t=e.metrics.avgCommentCount/e.metrics.avgViewCount,r=e.metrics.avgLikeCount/e.metrics.avgViewCount,a=e.metrics.avgCommentCount/e.metrics.avgLikeCount,n=e.metrics.avgViewCount/e.metrics.subscriberCount,round=e=>Math.round(1e4*e)/1e4;return[{metric:"View Consistency",original:40,normalized:40},{metric:"Vocal Audience",original:round(t),normalized:Math.min(round(100*t/1*100),100)},{metric:"Audience Enjoyment",original:round(r),normalized:Math.min(round(100*r/10*100),100)},{metric:"Audience Engagement",original:round(a),normalized:Math.min(round(100*a/50*100),100)},{metric:"Loyal Views",original:round(n),normalized:Math.min(round(100*n/30*100),100)}]},CustomTooltip=e=>{let{active:t,payload:r}=e;return t&&r&&r.length?(0,a.jsxs)("div",{className:"bg-neutral-50 rounded-lg dark:bg-black border border-neutral-300 dark:border-neutral-700 px-3 py-2",children:[(0,a.jsx)("p",{className:"pb-2 mb-2 border-b-2 dark:border-neutral-700",children:r[0].payload.metric}),(0,a.jsx)("p",{className:"text-neutral-700 dark:text-neutral-300 text-sm",children:`Category Percentile: ${r[0].payload.normalized}`})]}):null},RadarLabel=e=>{let{payload:t,x:r,y:n,textAnchor:l,radius:s}=e;return(0,a.jsx)("g",{className:"recharts-layer recharts-polar-angle-axis-tick",children:(0,a.jsx)("text",{radius:s,stroke:(0,m.T)()?"#d4d4d4":"#737373",fontWeight:300,x:r,y:n-10,className:"recharts-text recharts-polar-angle-axis-tick-value",textAnchor:l,children:t.value.split(" ").map((e,t)=>(0,a.jsx)("tspan",{x:r,dy:t?"1.2em":0,fontSize:"0.7rem",children:e},t))})})};t.Z=e=>{let{channelData:t}=e;return(0,a.jsx)(n.h,{width:"100%",height:"100%",className:"mx-auto",children:(0,a.jsxs)(l.H,{cx:"50%",cy:"50%",outerRadius:"70%",data:buildData(t),children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("radialGradient",{id:"audienceScoreValue",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#504099",stopOpacity:.15}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#504099",stopOpacity:.2})]})}),(0,a.jsx)(s.n,{stroke:(0,m.T)()?"#9CA3AF":"#A3A3A3"}),(0,a.jsx)(i.I,{dataKey:"metric",tick:RadarLabel}),(0,a.jsx)(d.S,{axisLine:!1,tick:!1,angle:90,domain:[0,100]}),(0,a.jsx)(o.F,{name:"Value",dataKey:"normalized",stroke:"#504099",strokeWidth:"2px",dot:{fill:"#504099",stroke:"#fff",strokeWidth:1,r:4},fill:"url(#audienceScoreValue)",fillOpacity:1}),(0,a.jsx)(c.u,{content:CustomTooltip,wrapperStyle:{outline:"none"}})]})})}},73380:function(e,t,r){"use strict";var a=r(85893),n=r(25724),l=r(29009),s=r(46888),i=r(14195),d=r(26050),o=r(86108),c=r(75358),u=r(25048),m=r(3023),x=r(23191),h=r(25108),p=r(27484),b=r.n(p),g=r(67294),j=r(27367),f=r(37700);let CustomTooltip=e=>{let{active:t,payload:r}=e;return t&&r&&r.length?(0,a.jsxs)("div",{className:"bg-neutral-50 dark:bg-black rounded-lg border border-neutral-300 dark:border-neutral-700 px-3 py-2 max-w-xs",children:[(0,a.jsx)("p",{className:"pb-2 mb-2 border-b-2 dark:border-neutral-700",children:b()(r[0].payload.timeStamp).format("MMM D, YYYY")}),(0,a.jsx)("p",{children:`Ad Value: $${(Math.round(100*r[0].value)/100).toLocaleString()}`})]}):null};t.Z=e=>{let{data:t}=e,[r,p]=(0,g.useState)([]);(0,g.useEffect)(()=>{if(!t)return;let e=t.map(e=>e.timeStamp);p([Math.min(...e),Math.max(...e)])},[t]);let v=(0,h.Z)().domain(r).nice(t?.length);return t?(0,a.jsx)(l.h,{width:"100%",height:"100%",children:(0,a.jsxs)(s.T,{width:500,height:300,data:t,margin:{top:5,right:30,left:20,bottom:0},children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"colorAdValue",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#504099",stopOpacity:.15}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#504099",stopOpacity:0})]})}),(0,a.jsx)(i.q,{opacity:.1,vertical:!1}),(0,a.jsx)(d.u,{content:CustomTooltip,wrapperStyle:{outline:"none"}}),(0,a.jsx)(o.u,{type:"monotone",dataKey:e=>(0,x.ZP)(e),fill:"url(#colorAdValue)",fillOpacity:1,stroke:"#504099",strokeWidth:"3px"}),(0,a.jsx)(c.B,{stroke:(0,f.T)()?"#9CA3AF":"#A3A3A3",tickFormatter:e=>`$${(0,j.R)(Math.round(e))}`,children:(0,a.jsx)(u._,{value:"Ad Value",position:"insideLeft",angle:-90,offset:-15,style:{textAnchor:"middle"}})}),(0,a.jsx)(m.K,{dataKey:"timeStamp",scale:v,type:"number",stroke:(0,f.T)()?"#9CA3AF":"#A3A3A3",ticks:v.ticks(5).map(e=>e.valueOf()),tickFormatter:e=>b()(e).format("MMM D"),domain:v.domain().map(e=>e.valueOf())})]})}):(0,a.jsx)(n.Z,{})}},57943:function(e,t,r){"use strict";var a=r(85893),n=r(47356),l=r(89413),s=r.n(l);t.Z=e=>{let{disabled:t,children:r,content:l}=e;return t?(0,a.jsx)(a.Fragment,{children:r}):(0,a.jsxs)(n.fC,{children:[(0,a.jsx)(n.xz,{asChild:!0,children:r}),(0,a.jsx)(n.h_,{children:(0,a.jsx)(n.VY,{className:`${s().TooltipContent} bg-neutral-50 dark:bg-neutral-950 border border-neutral-300 dark:border-neutral-700`,sideOffset:5,children:l})})]})}},15620:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return v}});var a=r(85893),n=r(57943),l=r(80393),s=r(57776),i=r(67294),d=r(78633),o=r(23191);let c={sixtySeconds:1,full:2},u={sixtySeconds:"30-60 sec.",full:"Full"};var forms_BrandDealForm=e=>{let{channelData:t}=e,{activeCampaign:r,setActiveCampaign:m}=(0,l.Q)(),{addToast:x}=(0,s.p)(),[h,p]=(0,i.useState)("sixtySeconds"),b=Math.round((0,o.ZP)(t)*c[h]);return(0,a.jsxs)("form",{className:"m-2",children:[(0,a.jsx)("div",{className:"mb-4 font-medium text-neutral-700 dark:text-neutral-300 text-lg",children:"Create Brand Deal"}),(0,a.jsxs)("div",{className:"flex justify-start space-x-2 mb-6 text-sm",children:[(0,a.jsx)("button",{type:"button",onClick:()=>p("sixtySeconds"),className:`px-2 py-1 border border-neutral-300 dark:border-neutral-700 rounded-lg ${"sixtySeconds"===h?"bg-neutral-200 dark:bg-neutral-925":" text-neutral-700 dark:text-neutral-600"}`,children:"30-60 sec."}),(0,a.jsx)("button",{type:"button",onClick:()=>p("full"),className:`px-2 py-1 border border-neutral-300 dark:border-neutral-700 rounded-lg ${"full"===h?"bg-neutral-200 dark:bg-neutral-925":" text-neutral-700 dark:text-neutral-600"}`,children:"Full"})]}),(0,a.jsx)("div",{className:"text-xs text-neutral-600 dark:text-neutral-400 mb-2",children:`Dreamwell recommends a price of ${t?`$${b.toLocaleString()}.`:"-"}`}),(0,a.jsx)("input",{type:"text",defaultValue:t?b:"",placeholder:"Price",className:"text-neutral-900 dark:text-neutral-100 mb-2 text-lg font-semibold w-full border-2 border-neutral-500 bg-neutral-50 dark:bg-neutral-950 rounded-lg px-4 py-2"}),(0,a.jsx)("div",{className:"my-4",children:(0,a.jsx)("div",{children:(0,a.jsx)(n.Z,{content:(0,a.jsx)("span",{className:"p-1 text-xs rounded max-x-xs",children:"This estimate is based on their last 15 videos."}),children:(0,a.jsxs)("div",{className:"inline-block",children:[(0,a.jsxs)("div",{className:"text-xs flex items-center text-neutral-600 dark:text-neutral-400",children:[(0,a.jsx)("span",{className:"mr-1",children:"Estimated Views"}),(0,a.jsx)(d.Hfo,{})]}),(0,a.jsx)("div",{className:"text-xl font-semibold",children:t?`${Math.round(.8*t.metrics.avgViewCountNormalized).toLocaleString()} - ${Math.round(1.2*t.metrics.avgViewCountNormalized).toLocaleString()}`:"-"})]})})})}),(0,a.jsx)("button",{type:"button",className:"uppercase mt-2 w-full py-2 text-sm font-bold rounded-full text-mirage-500 bg-teal-300 hover:brightness-110",onClick:()=>{m({status:"new",...r,channels:[...r?.channels||[],{channelID:t?.channelID,channelTitle:t?.channelTitle,category:t?.category,adType:u[h],adValue:b}]}),x({type:"success",title:"Added to Campaign!",description:`You have added ${t?.channelTitle} to your campaign.`})},children:"Review Request"})]})},m=r(56881),x=r(73380),h=r(78859),p=r(67611),b=r(18340),g=r(53002),j=r(27484),f=r.n(j);let CreatorProfile=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.Z,{}),(0,a.jsx)(h.Z,{children:(0,a.jsx)("div",{className:"p-6 mb-4",children:(0,a.jsxs)("div",{className:"max-w-8xl mx-auto",children:[(0,a.jsx)(p.Z,{channelData:b.H,channelSummarySnapshots:b.e.data}),(0,a.jsx)("div",{className:"border border-neutral-300 dark:border-neutral-700 bg-neutral-50 dark:bg-neutral-950 rounded-lg",children:(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-8",children:[(0,a.jsx)("div",{className:"font-medium text-neutral-700 dark:text-neutral-300 text-lg",children:"Ad Value"}),(0,a.jsxs)("div",{className:"sm:inline-flex items-center text-neutral-600 dark:text-neutral-400 text-sm",children:[(0,a.jsx)("div",{className:"hidden sm:block mx-2 px-2 py-1 bg-neutral-200 dark:bg-neutral-925 rounded-lg",children:"Changes"}),(0,a.jsxs)("div",{className:"my-4 sm:my-0 mx-2 inline-flex items-center",children:[(0,a.jsx)("div",{children:"Est. Views"}),(0,a.jsxs)("div",{className:"mx-2",children:[(0,a.jsx)("div",{children:b.H?b.H.metrics.avgViewCountNormalized.toLocaleString():"-"}),(0,a.jsx)("div",{children:(()=>{let e=b.e.data;if(!e)return"-";let t=e[e.length-1].metrics.avgViewCountNormalized-e[0].metrics.avgViewCountNormalized;return(0,a.jsx)("span",{className:`${t>=0?"text-teal-500":"text-red-500"}`,children:`${t>0?"+":""}${t.toLocaleString()}`})})()})]})]}),(0,a.jsxs)("div",{className:"mx-2 inline-flex items-center",children:[(0,a.jsx)("div",{children:"Subscribers"}),(0,a.jsxs)("div",{className:"mx-2",children:[(0,a.jsx)("div",{children:b.H?b.H.metrics.subscriberCount.toLocaleString():"-"}),(0,a.jsx)("div",{children:(()=>{let e=b.e.data;if(!e)return"-";let t=e[e.length-1].metrics.subscriberCount-e[0].metrics.subscriberCount;return(0,a.jsx)("span",{className:`${t>0?"text-teal-500":"text-red-500"}`,children:`${t>0?"+":"-"}${t.toLocaleString()}`})})()})]})]})]})]}),(0,a.jsx)("div",{className:"h-96",children:(0,a.jsx)(x.Z,{data:b.e.data,range:[f()(1676053624807).valueOf(),f()(1678472824807).valueOf()]})})]})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 mt-4",children:[(0,a.jsx)("div",{className:"border border-neutral-300 dark:border-neutral-700 bg-neutral-50 dark:bg-neutral-950 rounded-lg md:mr-2",children:(0,a.jsxs)("div",{className:"p-4",style:{height:"28rem"},children:[(0,a.jsx)("div",{className:"mb-8 font-medium text-neutral-700 dark:text-neutral-300 text-lg",children:"Audience Analysis"}),(0,a.jsx)(m.Z,{channelData:b.H})]})}),(0,a.jsx)("div",{className:"border border-neutral-300 dark:border-neutral-700 bg-neutral-50 dark:bg-neutral-950 rounded-lg p-4 mt-4 md:mt-0 md:ml-2",children:(0,a.jsx)(forms_BrandDealForm,{channelData:b.H})})]})]})})})]});CreatorProfile.authed=!1;var v=CreatorProfile},46299:function(e,t,r){"use strict";r.d(t,{Vr:function(){return convertZscoreToNormalized}}),r(27484);let convertZscoreToNormalized=e=>{if(e<-6.5)return 0;if(e>6.5)return 100;let t=1,r=0,a=1,n=0,l=Math.exp(-23);for(;Math.abs(a)>l;)r+=a=.3989422804*Math.pow(-1,n)*Math.pow(e,n)/(2*n+1)/Math.pow(2,n)*Math.pow(e,n+1)/t,t*=++n;return Math.round(100*(r+=.5))}},89413:function(e){e.exports={TooltipContent:"Tooltip_TooltipContent__mzXSl",slideDownAndFade:"Tooltip_slideDownAndFade__RRYUK",slideLeftAndFade:"Tooltip_slideLeftAndFade__Vfxf8",slideUpAndFade:"Tooltip_slideUpAndFade__U7Mw0",slideRightAndFade:"Tooltip_slideRightAndFade__m68Td"}}},function(e){e.O(0,[4838,8482,6750,3438,8676,5257,1535,6758,9774,2888,179],function(){return e(e.s=81862)}),_N_E=e.O()}]);