1import{r as w,R as m,I as dt,x as yt,y as ht,j as o}from"./index-D5orObeG.js";import{i as mt,r as vt}from"./admin-errors-CKoTLluY.js";import{f as bt}from"./analytics-functions-CiOdq3T-.js";import{f as G}from"./block-labels-d0Up04H-.js";import{S as Q,o as xt,j as Z,p as T,q as gt,A as At,r as C,s as jt,t as rt,E as wt,v as N,x as Ot,e as Pt,y as St,z as _,l as _t,D as Et,G as Bt,k as ot,F as tt,m as kt,X as at,Y as st,n as Tt,R as zt,H as It,T as Kt}from"./generateCategoricalChart-C7ay4b4n.js";import{c as Dt}from"./clsx-B-dksMZM.js";import"./createServerFn-DdQ-IzOa.js";function E(e){"@babel/helpers - typeof";return E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(e)}function Rt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $t(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,pt(i.key),i)}}function Ft(e,t,n){return t&&$t(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ct(e,t,n){return t=L(t),Nt(e,lt()?Reflect.construct(t,n||[],L(e).constructor):t.apply(e,n))}function Nt(e,t){if(t&&(E(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lt(e)}function Lt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lt=function(){return!!e})()}
vendor: 8,923 bytes, line 1
1function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},L(e)}function Wt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},J(e,t)}function ct(e,t,n){return t=pt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pt(e){var t=Vt(e,"string");return E(t)=="symbol"?t:t+""}function Vt(e,t){if(E(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(E(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var R=(function(e){function t(){return Rt(this,t),Ct(this,t,arguments)}return Wt(t,e),Ft(t,[{key:"render",value:function(){return null}}])})(w.Component);ct(R,"displayName","ZAxis");ct(R,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var Mt=["option","isActive"];function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},K.apply(this,arguments)}function Zt(e,t){if(e==null)return{};var n=qt(e,t),i,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)i=s[a],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function qt(e,t){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function Gt(e){var t=e.option,n=e.isActive,i=Zt(e,Mt);return typeof t=="string"?w.createElement(Q,K({option:w.createElement(xt,K({type:t},i)),isActive:n,shapeType:"symbols"},i)):w.createElement(Q,K({option:t,isActive:n,shapeType:"symbols"},i))}function B(e){"@babel/helpers - typeof";return B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(e)}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},D.apply(this,arguments)}function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?et(Object(n),!0).forEach(function(i){P(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function it(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ft(i.key),i)}}function Xt(e,t,n){return t&&it(e.prototype,t),n&&it(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yt(e,t,n){return t=W(t),Ht(e,ut()?Reflect.construct(t,n||[],W(e).constructor):t.apply(e,n))}function Ht(e,t){if(t&&(B(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ut(e)}function Ut(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ut(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ut=function(){return!!e})()}function W(e){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},W(e)}function Qt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},X(e,t)}function P(e,t,n){return t=ft(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ft(e){var t=te(e,"string");return B(t)=="symbol"?t:t+""}function te(e,t){if(B(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(B(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $=(function(e){function t(){var n;Jt(this,t);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=Yt(this,t,[].concat(a)),P(n,"state",{isAnimationFinished:!1}),P(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0})}),P(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1})}),P(n,"id",Et("recharts-scatter-")),n}return Qt(t,e),Xt(t,[{key:"renderSymbolsStatically",value:function(i){var a=this,s=this.props,y=s.shape,v=s.activeShape,f=s.activeIndex,h=Z(this.props,!1);return i.map(function(l,c){var u=f===c,r=u?v:y,p=j(j({},h),l);return m.createElement(T,D({className:"recharts-scatter-symbol",key:"symbol-".concat(l?.cx,"-").concat(l?.cy,"-").concat(l?.size,"-").concat(c)},gt(a.props,l,c),{role:"img"}),m.createElement(Gt,D({option:r,isActive:u,key:"symbol-".concat(c)},p)))})}},{key:"renderSymbolsWithAnimation",value:function(){var i=this,a=this.props,s=a.points,y=a.isAnimationActive,v=a.animationBegin,f=a.animationDuration,h=a.animationEasing,l=a.animationId,c=this.state.prevPoints;return m.createElement(At,{begin:v,duration:f,isActive:y,easing:h,from:{t:0},to:{t:1},key:"pie-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(u){var r=u.t,p=s.map(function(b,x){var g=c&&c[x];if(g){var A=C(g.cx,b.cx),d=C(g.cy,b.cy),O=C(g.size,b.size);return j(j({},b),{},{cx:A(r),cy:d(r),size:O(r)})}var S=C(0,b.size);return j(j({},b),{},{size:S(r)})});return m.createElement(T,null,i.renderSymbolsStatically(p))})}},{key:"renderSymbols",value:function(){var i=this.props,a=i.points,s=i.isAnimationActive,y=this.state.prevPoints;return s&&a&&a.length&&(!y||!jt(y,a))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(a)}},{key:"renderErrorBar",value:function(){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.points,y=a.xAxis,v=a.yAxis,f=a.children,h=rt(f,wt);return h?h.map(function(l,c){var u=l.props,r=u.direction,p=u.dataKey;return m.cloneElement(l,{key:"".concat(r,"-").concat(p,"-").concat(s[c]),data:s,xAxis:y,yAxis:v,layout:r==="x"?"vertical":"horizontal",dataPointFormatter:function(x,g){return{x:x.cx,y:x.cy,value:r==="x"?+x.node.x:+x.node.y,errorVal:N(x,g)}}})}):null}},{key:"renderLine",value:function(){var i=this.props,a=i.points,s=i.line,y=i.lineType,v=i.lineJointType,f=Z(this.props,!1),h=Z(s,!1),l,c;if(y==="joint")l=a.map(function(d){return{x:d.cx,y:d.cy}});else if(y==="fitting"){var u=Ot(a),r=u.xmin,p=u.xmax,b=u.a,x=u.b,g=function(O){return b*O+x};l=[{x:r,y:g(r)},{x:p,y:g(p)}]}var A=j(j(j({},f),{},{fill:"none",stroke:f&&f.fill},h),{},{points:l});return m.isValidElement(s)?c=m.cloneElement(s,A):Pt(s)?c=s(A):c=m.createElement(St,D({},A,{type:v})),m.createElement(T,{className:"recharts-scatter-line",key:"recharts-scatter-line"},c)}},{key:"render",value:function(){var i=this.props,a=i.hide,s=i.points,y=i.line,v=i.className,f=i.xAxis,h=i.yAxis,l=i.left,c=i.top,u=i.width,r=i.height,p=i.id,b=i.isAnimationActive;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,g=Dt("recharts-scatter",v),A=f&&f.allowDataOverflow,d=h&&h.allowDataOverflow,O=A||d,S=_(p)?this.id:p;return m.createElement(T,{className:g,clipPath:O?"url(#clipPath-".concat(S,")"):null},A||d?m.createElement("defs",null,m.createElement("clipPath",{id:"clipPath-".concat(S)},m.createElement("rect",{x:A?l:l-u/2,y:d?c:c-r/2,width:A?u:u*2,height:d?r:r*2}))):null,y&&this.renderLine(),this.renderErrorBar(),m.createElement(T,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!b||x)&&_t.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(i,a){return i.animationId!==a.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,prevPoints:a.curPoints}:i.points!==a.curPoints?{curPoints:i.points}:null}}])})(w.PureComponent);P($,"displayName","Scatter");
1P($,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!Bt.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});P($,"getComposedData",function(e){var t=e.xAxis,n=e.yAxis,i=e.zAxis,a=e.item,s=e.displayedData,y=e.xAxisTicks,v=e.yAxisTicks,f=e.offset,h=a.props.tooltipType,l=rt(a.props.children,ot),c=_(t.dataKey)?a.props.dataKey:t.dataKey,u=_(n.dataKey)?a.props.dataKey:n.dataKey,r=i&&i.dataKey,p=i?i.range:R.defaultProps.range,b=p&&p[0],x=t.scale.bandwidth?t.scale.bandwidth():0,g=n.scale.bandwidth?n.scale.bandwidth():0,A=s.map(function(d,O){var S=N(d,c),Y=N(d,u),k=!_(r)&&N(d,r)||"-",H=[{name:_(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:S,payload:d,dataKey:c,type:h},{name:_(n.dataKey)?a.props.name:n.name||n.dataKey,unit:n.unit||"",value:Y,payload:d,dataKey:u,type:h}];k!=="-"&&H.push({name:i.name||i.dataKey,unit:i.unit||"",value:k,payload:d,dataKey:r,type:h});var V=tt({axis:t,ticks:y,bandSize:x,entry:d,index:O,dataKey:c}),M=tt({axis:n,ticks:v,bandSize:g,entry:d,index:O,dataKey:u}),U=k!=="-"?i.scale(k):b,F=Math.sqrt(Math.max(U,0)/Math.PI);return j(j({},d),{},{cx:V,cy:M,x:V-F,y:M-F,xAxis:t,yAxis:n,zAxis:i,width:2*F,height:2*F,size:U,node:{x:S,y:Y,z:k},tooltipPayload:H,tooltipPosition:{x:V,y:M},payload:d},l&&l[O]&&l[O].props)});return j({points:A},f)});var ee=kt({chartName:"ScatterChart",GraphicalChild:$,defaultTooltipEventType:"item",validateTooltipEventTypes:["item"],axisComponents:[{axisType:"xAxis",AxisComp:at},{axisType:"yAxis",AxisComp:st},{axisType:"zAxis",AxisComp:R}],formatAxisMap:Tt});function de(){const{projectId:e}=dt.useParams(),t=yt(),[n,i]=w.useState([]),[a,s]=w.useState(!0),[y,v]=w.useState(!1);w.useEffect(()=>{s(!0),bt({data:{projectId:e,...ht(t),includeTest:y}}).then(r=>i(r.rows)).catch(r=>mt(r)?vt():console.error(r)).finally(()=>s(!1))},[e,t.from,t.to,y]);const f=w.useMemo(()=>n.filter(r=>r.viewers>0),[n]),h=w.useMemo(()=>n.filter(r=>r.viewers===0),[n]),l=w.useMemo(()=>f.map((r,p)=>({x:p,y:r.lift_pct,name:G(r.block_id),block_id:r.block_id,viewers:r.viewers,viewer_cr:r.viewer_cr})),[f]),c=new Set(f.slice(0,3).map(r=>r.block_id)),u=new Set(f.slice(-3).map(r=>r.block_id));return o.jsxs("div",{children:[o.jsxs("header",{style:ne,children:[o.jsx("h1",{style:{margin:0,fontSize:24,fontWeight:700},children:"Block Impact"}),o.jsxs("label",{style:oe,children:[o.jsx("input",{type:"checkbox",checked:y,onChange:r=>v(r.target.checked)}),"ÐклÑÑаÑи test-ÑеÑÑÑ"]})]}),a&&!n.length?o.jsx("p",{style:{color:"#94A3B8"},children:"ÐаванÑаженнÑâ¦"}):o.jsxs(o.Fragment,{children:[o.jsxs("section",{style:q,children:[o.jsxs("p",{style:{color:"#94A3B8",fontSize:13,margin:"0 0 12px"},children:[o.jsx("b",{style:{color:"#CBD5E1"},children:"Lift %"})," â наÑкÑлÑки конвеÑÑÑÑ ÑиÑ
, Ñ
Ñо баÑив блок, виÑа (",o.jsx("span",{style:{color:"#10B981"},children:"зелене"}),") Ñи нижÑа (",o.jsx("span",{style:{color:"#EF4444"},children:"ÑеÑвоне"}),") за ÑеÑÐµÐ´Ð½Ñ Ð¿Ð¾ лендингÑ. РозмÑÑ ÑоÑки â кÑлÑкÑÑÑÑ Ð³Ð»ÑдаÑÑв."]}),l.length>0?o.jsx("div",{style:{width:"100%",height:360},children:o.jsx(zt,{children:o.jsxs(ee,{margin:{top:20,right:20,bottom:20,left:20},children:[o.jsx(at,{dataKey:"x",type:"number",stroke:"#475569",tick:!1}),o.jsx(st,{dataKey:"y",stroke:"#94A3B8",fontSize:11,unit:"%"}),o.jsx(R,{dataKey:"viewers",range:[60,400]}),o.jsx(It,{y:0,stroke:"#475569",strokeDasharray:"4 4"}),o.jsx(Kt,{contentStyle:{background:"#0B1220",border:"1px solid #1E293B",fontSize:12},formatter:(r,p)=>p==="y"?[`${r}%`,"Lift"]:[r,p],labelFormatter:(r,p)=>p?.[0]?.payload?.name??""}),o.jsx($,{data:l,children:l.map((r,p)=>o.jsx(ot,{fill:c.has(r.block_id)?"#10B981":u.has(r.block_id)?"#EF4444":"#3B82F6"},p))})]})})}):o.jsx("p",{style:{color:"#94A3B8",fontSize:13},children:"Ðоки Ð½ÐµÐ¼Ð°Ñ Ð´Ð¾ÑÑаÑнÑо даниÑ
Ð´Ð»Ñ ÑозÑаÑ
ÑÐ½ÐºÑ lift."})]}),o.jsxs("section",{style:{...q,marginTop:16},children:[o.jsx("h2",{style:nt,children:"ТаблиÑÑ (акÑÐ¸Ð²Ð½Ñ ÑекÑÑÑ)"}),f.length===0?o.jsx("p",{style:{color:"#94A3B8",fontSize:13},children:"Ðоден блок Ñе не пеÑеглÑдали (нема block_view подÑй за пеÑÑод)."}):o.jsx("div",{style:{overflow:"auto"},children:o.jsxs("table",{style:re,children:[o.jsx("thead",{children:o.jsxs("tr",{style:{color:"#94A3B8",textAlign:"left"},children:[o.jsx("th",{style:z,children:"СекÑÑÑ"}),o.jsx("th",{style:{...z,textAlign:"right"},children:"ÐлÑдаÑÑ"}),o.jsx("th",{style:{...z,textAlign:"right"},children:"CR глÑдаÑÑв"}),o.jsx("th",{style:{...z,textAlign:"right"},children:"Baseline"}),o.jsx("th",{style:{...z,textAlign:"right"},children:"Lift"})]})}),o.jsx("tbody",{children:f.map(r=>o.jsx(ie,{row:r},r.block_id))})]})})]}),h.length>0&&o.jsxs("section",{style:{...q,marginTop:16},children:[o.jsx("h2",{style:nt,children:"СекÑÑÑ Ð±ÐµÐ· пеÑеглÑдÑв"}),o.jsx("p",{style:{color:"#64748B",fontSize:12,margin:"0 0 12px"},children:"Ð¦Ñ ÑекÑÑÑ Ñ Ð½Ð° лендингÑ, але за обÑаний пеÑÑод нÑÑ
Ñо до ниÑ
не доÑкÑоли (або ÑкÑол глибÑе не дÑйÑов)."}),o.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:h.map(r=>o.jsx("span",{style:{padding:"6px 12px",background:"#0B1220",border:"1px solid #1E293B",borderRadius:999,fontSize:12,color:"#94A3B8"},title:r.block_id,children:G(r.block_id)},r.block_id))})]})]})]})}function ie({row:e}){return o.jsxs("tr",{style:{borderTop:"1px solid #1E293B"},children:[o.jsxs("td",{style:I,children:[o.jsx("div",{style:{fontWeight:600,color:"#E2E8F0"},children:G(e.block_id)}),o.jsx("div",{style:{fontFamily:"monospace",fontSize:11,color:"#64748B"},children:e.block_id})]}),o.jsx("td",{style:{...I,textAlign:"right",fontVariantNumeric:"tabular-nums"},children:e.viewers}),o.jsxs("td",{style:{...I,textAlign:"right",fontVariantNumeric:"tabular-nums"},children:[e.viewer_cr,"%"]}),o.jsxs("td",{style:{...I,textAlign:"right",color:"#64748B",fontVariantNumeric:"tabular-nums"},children:[e.baseline_cr,"%"]}),o.jsxs("td",{style:{...I,textAlign:"right",fontWeight:700,fontVariantNumeric:"tabular-nums",color:e.lift_pct>0?"#10B981":e.lift_pct<0?"#EF4444":"#94A3B8"},children:[e.lift_pct>0?"+":"",e.lift_pct,"%"]})]})}const q={background:"#0F172A",border:"1px solid #1E293B",borderRadius:12,padding:20},ne={display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16,flexWrap:"wrap",gap:12},nt={margin:"0 0 12px",fontSize:16},re={width:"100%",borderCollapse:"collapse",fontSize:13},z={padding:"8px 12px",fontWeight:500,fontSize:12},I={padding:"10px 12px"},oe={display:"flex",alignItems:"center",gap:6,fontSize:12,color:"#94A3B8",cursor:"pointer"};export{de as component};
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.