PageSourceSearch

https://herpowerapp.com/assets/AdminAnalytics-C35hjYBa.js

js herpowerapp.com collected 2026-10-09 22:04:03 UTC 59,950 bytes, 10 lines download raw bytes

vendor: 25,871 bytes, lines 1-7
1import{c as pr,aR as z,$ as h,a1 as Xe,r as le,b as mr,u as hr,K as vr,g as gr,j as i,a2 as yr,M as br,B as xe,J as xr,C as N,y as k,z as E,a as I,Q as jr,R as Ar,U as me,V as he,I as q,ae as Or,E as wr,aS as _r}from"./index-DO0ZNUzu.js";import{C as Pr}from"./chart-column-RBik8eZM.js";import{H as Tr}from"./house-CUUNLlcb.js";import{f as S,_ as Et,c as It,d as Sr,e as $r,i as U,g as Ze,p as V,h as C,j as Rt,k as Re,l as Lt,D as Nr,m as kr,n as oe,o as W,S as Ct,A as Dt,q as Er,r as D,s as Ft,t as ae,u as Je,G as Bt,v as Kt,w as Ir,x as je,y as at,z as we,B as Rr,E as Te,F as Qe,H as Mt,X as Me,Y as We,I as Lr,J as Cr,K as Wt,M as Dr,N as Ut,O as et,P as zt,Q as Fr,U as Br,V as Kr,W as Vt,Z as Mr,$ as Gt,a0 as Wr,a1 as Ur,a2 as zr,a3 as Vr,a4 as tt,a5 as Ht,a6 as Yt,a7 as qt,a8 as Gr,a9 as Hr,aa as Yr,ab as qr,ac as Xr,ad as Zr,ae as Xt,af as Jr,ag as Qr,ah as en,ai as tn,aj as rn,ak as nn,al as an,am as sn,an as on,ao as ln,R as Ae,L as cn,C as it,T as Oe,b as st,a as Be}from"./LineChart-B2vz4ggM.js";import{G as ot}from"./globe-Brfby88_.js";import{A as un}from"./activity-DEuq9EdJ.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const dn=pr("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);var fn=["points","className","baseLinePoints","connectNulls"];function ie(){return ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ie.apply(this,arguments)}function pn(e,t){if(e==null)return{};var n=mn(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lt(e){return yn(e)||gn(e)||vn(e)||hn()}function hn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
7In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vn(e,t){if(e){if(typeof e=="string")return Ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ue(e,t)}}function gn(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yn(e){if(Array.isArray(e))return Ue(e)}function Ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ct=function(t){return t&&t.x===+t.x&&t.y===+t.y},bn=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){ct(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),ct(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},ve=function(t,n){var r=bn(t);n&&(r=[r.reduce(function(o,s){return[].concat(lt(o),lt(s))},[])]);var a=r.map(function(o){return o.reduce(function(s,c,l){return"".concat(s).concat(l===0?"M":"L").concat(c.x,",").concat(c.y)},"")}).join("");return r.length===1?"".concat(a,"Z"):a},xn=function(t,n,r){var a=ve(t,r);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(ve(n.reverse(),r).slice(1))},jn=function(t){var n=t.points,r=t.className,a=t.baseLinePoints,o=t.connectNulls,s=pn(t,fn);if(!n||!n.length)return null;var c=z("recharts-polygon",r);if(a&&a.length){var l=s.stroke&&s.stroke!=="none",u=xn(n,a,o);return h.createElement("g",{className:c},h.createElement("path",ie({},S(s,!0),{fill:u.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:u})),l?h.createElement("path",ie({},S(s,!0),{fill:"none",d:ve(n,o)})):null,l?h.createElement("path",ie({},S(s,!0),{fill:"none",d:ve(a,o)})):null)}var p=ve(n,o);return h.createElement("path",ie({},S(s,!0),{fill:p.slice(-1)==="Z"?s.fill:"none",className:c,d:p}))},An=Et,On=Sr,wn=It;function _n(e,t){return e&&e.length?An(e,wn(t),On):void 0}var Pn=_n;const Tn=Xe(Pn);var Sn=Et,$n=It,Nn=$r;function kn(e,t){return e&&e.length?Sn(e,$n(t),Nn):void 0}var En=kn;const In=Xe(En);var Rn=["cx","cy","angle","ticks","axisLine"],Ln=["ticks","tick","angle","tickFormatter","stroke"];function ce(e){"@babel/helpers - typeof";return ce=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},ce(e)}function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ge.apply(this,arguments)}function ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ut(Object(n),!0).forEach(function(r){Le(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dt(e,t){if(e==null)return{};var n=Cn(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Dn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ft(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Jt(r.key),r)}}function Fn(e,t,n){return t&&ft(e.prototype,t),n&&ft(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bn(e,t,n){return t=Se(t),Kn(e,Zt()?Reflect.construct(t,n||[],Se(e).constructor):t.apply(e,n))}function Kn(e,t){if(t&&(ce(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mn(e)}function Mn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zt=function(){return!!e})()}function Se(e){return Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Se(e)}function Wn(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&&ze(e,t)}function ze(e,t){return ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},ze(e,t)}function Le(e,t,n){return t=Jt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(e){var t=Un(e,"string");return ce(t)=="symbol"?t:t+""}function Un(e,t){if(ce(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ce(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ce=function(e){function t(){return Dn(this,t),Bn(this,t,arguments)}return Wn(t,e),Fn(t,[{key:"getTickValueCoord",value:function(r){var a=r.coordinate,o=this.props,s=o.angle,c=o.cx,l=o.cy;return V(c,l,a,s)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,a;switch(r){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var r=this.props,a=r.cx,o=r.cy,s=r.angle,c=r.ticks,l=Tn(c,function(p){return p.coordinate||0}),u=In(c,function(p){return p.coordinate||0});return{cx:a,cy:o,startAngle:s,endAngle:s,innerRadius:u.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,o=r.cy,s=r.angle,c=r.ticks,l=r.axisLine,u=dt(r,Rn),p=c.reduce(function(f,d){return[Math.min(f[0],d.coordinate),Math.max(f[1],d.coordinate)]},[1/0,-1/0]),m=V(a,o,p[0],s),g=V(a,o,p[1],s),b=J(J(J({},S(u,!1)),{},{fill:"none"},S(l,!1)),{},{x1:m.x,y1:m.y,x2:g.x,y2:g.y});return h.createElement("line",ge({className:"recharts-polar-radius-axis-line"},b))}},{key:"renderTicks",value:function(){var r=this,a=this.props,o=a.ticks,s=a.tick,c=a.angle,l=a.tickFormatter,u=a.stroke,p=dt(a,Ln),m=this.getTickTextAnchor(),g=S(p,!1),b=S(s,!1),f=o.map(function(d,y){var v=r.getTickValueCoord(d),O=J(J(J(J({textAnchor:m,transform:"rotate(".concat(90-c,", ").concat(v.x,", ").concat(v.y,")")},g),{},{stroke:"none",fill:u},b),{},{index:y},v),{},{payload:d});return h.createElement(C,ge({className:z("recharts-polar-radius-axis-tick",Rt(s)),key:"tick-".concat(d.coordinate)},Re(r.props,d,y)),t.renderTickItem(s,O,l?l(d.value,y):d.value))});return h.createElement(C,{className:"recharts-polar-radius-axis-ticks"},f)}},{key:"render",value:function(){var r=this.props,a=r.ticks,o=r.axisLine,s=r.tick;return!a||!a.length?null:h.createElement(C,{className:z("recharts-polar-radius-axis",this.props.className)},o&&this.renderAxisLine(),s&&this.renderTicks(),Lt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,a,o){var s;return h.isValidElement(r)?s=h.cloneElement(r,a):U(r)?s=r(a):s=h.createElement(Ze,ge({},a,{className:"recharts-polar-radius-axis-tick-value"}),o),s}}])}(le.PureComponent);Le(Ce,"displayName","PolarRadiusAxis");Le(Ce,"axisType","radiusAxis");Le(Ce,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function ue(e){"@babel/helpers - typeof";return ue=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},ue(e)}function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ee.apply(this,arguments)}function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pt(Object(n),!0).forEach(function(r){De(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,er(r.key),r)}}function Vn(e,t,n){return t&&mt(e.prototype,t),n&&mt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gn(e,t,n){return t=$e(t),Hn(e,Qt()?Reflect.construct(t,n||[],$e(e).constructor):t.apply(e,n))}function Hn(e,t){if(t&&(ue(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yn(e)}function Yn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qt=function(){return!!e})()}function $e(e){return $e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$e(e)}function qn(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&&Ve(e,t)}function Ve(e,t){return Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Ve(e,t)}function De(e,t,n){return t=er(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function er(e){var t=Xn(e,"string");return ue(t)=="symbol"?t:t+""}function Xn(e,t){if(ue(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ue(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zn=Math.PI/180,ht=1e-5,Fe=function(e){function t(){return zn(this,t),Gn(this,t,arguments)}return qn(t,e),Vn(t,[{key:"getTickLineCoord",value:function(r){var a=this.props,o=a.cx,s=a.cy,c=a.radius,l=a.orientation,u=a.tickSize,p=u||8,m=V(o,s,c,r.coordinate),g=V(o,s,c+(l==="inner"?-1:1)*p,r.coordinate);return{x1:m.x,y1:m.y,x2:g.x,y2:g.y}}},{key:"getTickTextAnchor",value:function(r){var a=this.props.orientation,o=Math.cos(-r.coordinate*Zn),s;return o>ht?s=a==="outer"?"start":"end":o<-ht?s=a==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,o=r.cy,s=r.radius,c=r.axisLine,l=r.axisLineType,u=Q(Q({},S(this.props,!1)),{},{fill:"none"},S(c,!1));if(l==="circle")return h.createElement(Nr,ee({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:o,r:s}));var p=this.props.ticks,m=p.map(function(g){return V(a,o,s,g.coordinate)});return h.createElement(jn,ee({className:"recharts-polar-angle-axis-line"},u,{points:m}))}},{key:"renderTicks",value:function(){var r=this,a=this.props,o=a.ticks,s=a.tick,c=a.tickLine,l=a.tickFormatter,u=a.stroke,p=S(this.props,!1),m=S(s,!1),g=Q(Q({},p),{},{fill:"none"},S(c,!1)),b=o.map(function(f,d){var y=r.getTickLineCoord(f),v=r.getTickTextAnchor(f),O=Q(Q(Q({textAnchor:v},p),{},{stroke:"none",fill:u},m),{},{index:d,payload:f,x:y.x2,y:y.y2});return h.createElement(C,ee({className:z("recharts-polar-angle-axis-tick",Rt(s)),key:"tick-".concat(f.coordinate)},Re(r.props,f,d)),c&&h.createElement("line",ee({className:"recharts-polar-angle-axis-tick-line"},g,y)),s&&t.renderTickItem(s,O,l?l(f.value,d):f.value))});return h.createElement(C,{className:"recharts-polar-angle-axis-ticks"},b)}},{key:"render",value:function(){var r=this.props,a=r.ticks,o=r.radius,s=r.axisLine;return o<=0||!a||!a.length?null:h.createElement(C,{className:z("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,a,o){var s;return h.isValidElement(r)?s=h.cloneElement(r,a):U(r)?s=r(a):s=h.createElement(Ze,ee({},a,{className:"recharts-polar-angle-axis-tick-value"}),o),s}}])}(le.PureComponent);De(Fe,"displayName","PolarAngleAxis");De(Fe,"axisType","angleAxis");De(Fe,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var _e;function de(e){"@babel/helpers - typeof";return de=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},de(e)}function se(){return se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},se.apply(this,arguments)}function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vt(Object(n),!0).forEach(function(r){F(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rr(r.key),r)}}function Qn(e,t,n){return t&&gt(e.prototype,t),n&&gt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ea(e,t,n){return t=Ne(t),ta(e,tr()?Reflect.construct(t,n||[],Ne(e).constructor):t.apply(e,n))}function ta(e,t){if(t&&(de(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ra(e)}function ra(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tr=function(){return!!e})()}function Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ne(e)}function na(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&&Ge(e,t)}function Ge(e,t){return Ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Ge(e,t)}function F(e,t,n){return t=rr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rr(e){var t=aa(e,"string");return de(t)=="symbol"?t:t+""}function aa(e,t){if(de(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(de(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var H=function(e){function t(n){var r;return Jn(this,t),r=ea(this,t,[n]),F(r,"pieRef",null),F(r,"sectorRefs",[]),F(r,"id",Rr("recharts-pie-")),F(r,"handleAnimationEnd",function(){var a=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),U(a)&&a()}),F(r,"handleAnimationStart",function(){var a=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),U(a)&&a()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return na(t,e),Qn(t,[{key:"isActiveIndex",value:function(r){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(r)!==-1:r===a}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var o=this.props,s=o.label,c=o.labelLine,l=o.dataKey,u=o.valueKey,p=S(this.props,!1),m=S(s,!1),g=S(c,!1),b=s&&s.offsetRadius||20,f=r.map(function(d,y){var v=(d.startAngle+d.endAngle)/2,O=V(d.cx,d.cy,d.outerRadius+b,v),w=A(A(A(A({},p),d),{},{stroke:"none"},m),{},{index:y,textAnchor:t.getTextAnchor(O.x,d.cx)},O),K=A(A(A(A({},p),d),{},{fill:"none",stroke:d.fill},g),{},{index:y,points:[V(d.cx,d.cy,d.outerRadius,v),O]}),R=l;return oe(l)&&oe(u)?R="value":oe(l)&&(R=u),h.createElement(C,{key:"label-".concat(d.startAngle,"-").concat(d.endAngle,"-").concat(d.midAngle,"-").concat(y)},c&&t.renderLabelLineItem(c,K,"line"),t.renderLabelItem(s,w,W(d,R)))});return h.createElement(C,{className:"recharts-pie-labels"},f)}},{key:"renderSectorsStatically",value:function(r){var a=this,o=this.props,s=o.activeShape,c=o.blendStroke,l=o.inactiveShape;return r.map(function(u,p){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var m=a.isActiveIndex(p),g=l&&a.hasActiveIndex()?l:null,b=m?s:g,f=A(A({},u),{},{stroke:c?u.fill:u.stroke,tabIndex:-1});return h.createElement(C,se({ref:function(y){y&&!a.sectorRefs.includes(y)&&a.sectorRefs.push(y)},tabIndex:-1,className:"recharts-pie-sector"},Re(a.props,u,p),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(p)}),h.createElement(Ct,se({option:b,isActive:m,shapeType:"sector"},f)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,a=this.props,o=a.sectors,s=a.isAnimationActive,c=a.animationBegin,l=a.animationDuration,u=a.animationEasing,p=a.animationId,m=this.state,g=m.prevSectors,b=m.prevIsAnimationActive;return h.createElement(Dt,{begin:c,duration:l,isActive:s,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(p,"-").concat(b),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(f){var d=f.t,y=[],v=o&&o[0],O=v.startAngle;return o.forEach(function(w,K){var R=g&&g[K],x=K>0?Er(w,"paddingAngle",0):0;if(R){var $=D(R.endAngle-R.startAngle,w.endAngle-w.startAngle),_=A(A({},w),{},{startAngle:O+x,endAngle:O+$(d)+x});y.push(_),O=_.endAngle}else{var B=w.endAngle,P=w.startAngle,L=D(0,B-P),te=L(d),M=A(A({},w),{},{startAngle:O+x,endAngle:O+te+x});y.push(M),O=M.endAngle}}),h.createElement(C,null,r.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(r){var a=this;r.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var s=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[s].focus(),a.setState({sectorToFocus:s});break}case"ArrowRight":{var c=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[c].focus(),a.setState({sectorToFocus:c});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,a=r.sectors,o=r.isAnimationActive,s=this.state.prevSectors;return o&&a&&a.length&&(!s||!Ft(s,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,a=this.props,o=a.hide,s=a.sectors,c=a.className,l=a.label,u=a.cx,p=a.cy,m=a.innerRadius,g=a.outerRadius,b=a.isAnimationActive,f=this.state.isAnimationFinished;if(o||!s||!s.length||!ae(u)||!ae(p)||!ae(m)||!ae(g))return null;var d=z("recharts-pie",c);return h.createElement(C,{tabIndex:this.props.rootTabIndex,className:d,ref:function(v){r.pieRef=v}},this.renderSectors(),l&&this.renderLabels(s),Lt.renderCallByParent(this.props,null,!1),(!b||f)&&Je.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return a.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:r.sectors!==a.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,a){return r>a?"start":r<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,a,o){if(h.isValidElement(r))return h.cloneElement(r,a);if(U(r))return r(a);var s=z("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return h.createElement(kr,se({},a,{key:o,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(r,a,o){if(h.isValidElement(r))return h.cloneElement(r,a);var s=o;if(U(r)&&(s=r(a),h.isValidElement(s)))return s;var c=z("recharts-pie-label-text",typeof r!="boolean"&&!U(r)?r.className:"");return h.createElement(Ze,se({},a,{alignmentBaseline:"middle",className:c}),s)}}])}(le.PureComponent);_e=H;F(H,"displayName","Pie");F(H,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Bt.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});F(H,"parseDeltaAngle",function(e,t){var n=we(t-e),r=Math.min(Math.abs(t-e),360);return n*r});F(H,"getRealPieData",function(e){var t=e.data,n=e.children,r=S(e,!1),a=Kt(n,Te);return t&&t.length?t.map(function(o,s){return A(A(A({payload:o},r),o),a&&a[s]&&a[s].props)}):a&&a.length?a.map(function(o){return A(A({},r),o.props)}):[]});F(H,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,a=t.width,o=t.height,s=Ir(a,o),c=r+je(e.cx,a,a/2),l=n+je(e.cy,o,o/2),u=je(e.innerRadius,s,0),p=je(e.outerRadius,s,s*.8),m=e.maxRadius||Math.sqrt(a*a+o*o)/2;return{cx:c,cy:l,innerRadius:u,outerRadius:p,maxRadius:m}});F(H,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?A(A({},t.type.defaultProps),t.props):t.props,a=_e.getRealPieData(r);if(!a||!a.length)return null;var o=r.cornerRadius,s=r.startAngle,c=r.endAngle,l=r.paddingAngle,u=r.dataKey,p=r.nameKey,m=r.valueKey,g=r.tooltipType,b=Math.abs(r.minAngle),f=_e.parseCoordinateOfPie(r,n),d=_e.parseDeltaAngle(s,c),y=Math.abs(d),v=u;oe(u)&&oe(m)?(at(!1,`Use "dataKey" to specify the value of pie,
8      the props "valueKey" will be deprecated in 1.1.0`),v="value"):oe(u)&&(at(!1,`Use "dataKey" to specify the value of pie,
9      the props "valueKey" will be deprecated in 1.1.0`),v=m);var O=a.filter(function(_){return W(_,v,0)!==0}).length,w=(y>=360?O:O-1)*l,K=y-O*b-w,R=a.reduce(function(_,B){var P=W(B,v,0);return _+(ae(P)?P:0)},0),x;if(R>0){var $;x=a.map(function(_,B){var P=W(_,v,0),L=W(_,p,B),te=(ae(P)?P:0)/R,M;B?M=$.endAngle+we(d)*l*(P!==0?1:0):M=s;var pe=M+we(d)*((P!==0?b:0)+te*K),re=(M+pe)/2,ne=(f.innerRadius+f.outerRadius)/2,Y=[{name:L,value:P,payload:_,dataKey:v,type:g}],Z=V(f.cx,f.cy,ne,re);return $=A(A(A({percent:te,cornerRadius:o,name:L,tooltipPayload:Y,midAngle:re,middleRadius:ne,tooltipPosition:Z},_),f),{},{value:W(_,v),startAngle:M,endAngle:pe,payload:_,paddingAngle:we(d)*l}),$})}return A(A({},f),{},{sectors:x,data:a})});var ia=Qe({chartName:"BarChart",GraphicalChild:Mt,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Me},{axisType:"yAxis",AxisComp:We}],formatAxisMap:Lr}),sa=Qe({chartName:"PieChart",GraphicalChild:H,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Fe},{axisType:"radiusAxis",AxisComp:Ce}],formatAxisMap:Cr,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});function oa(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var la=oa,ca=Wt,ua=Dr,da=Object.prototype,fa=da.hasOwnProperty;function pa(e,t,n){var r=e[t];(!(fa.call(e,t)&&ua(r,n))||n===void 0&&!(t in e))&&ca(e,t,n)}var nr=pa,ma=nr,ha=Wt;function va(e,t,n,r){var a=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var c=t[o],l=r?r(n[c],e[c],c,n,e):void 0;l===void 0&&(l=e[c]),a?ha(n,c,l):ma(n,c,l)}return n}var be=va,ga=be,ya=Ut;function ba(e,t){return e&&ga(t,ya(t),e)}var xa=ba;function ja(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Aa=ja,Oa=et,wa=zt,_a=Aa,Pa=Object.prototype,Ta=Pa.hasOwnProperty;function Sa(e){if(!Oa(e))return _a(e);var t=wa(e),n=[];for(var r in e)r=="constructor"&&(t||!Ta.call(e,r))||n.push(r);return n}var $a=Sa,Na=Fr,ka=$a,Ea=Br;function Ia(e){return Ea(e)?Na(e,!0):ka(e)}var rt=Ia,Ra=be,La=rt;function Ca(e,t){return e&&Ra(t,La(t),e)}var Da=Ca,ke={exports:{}};ke.exports;(function(e,t){var n=Kr,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===r,s=o?n.Buffer:void 0,c=s?s.allocUnsafe:void 0;function l(u,p){if(p)return u.slice();var m=u.length,g=c?c(m):new u.constructor(m);return u.copy(g),g}e.exports=l})(ke,ke.exports);var Fa=ke.exports;function Ba(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Ka=Ba,Ma=be,Wa=Vt;function Ua(e,t){return Ma(e,Wa(e),t)}var za=Ua,Va=Mr,Ga=Gt,Ha=Vt,Ya=Wr,qa=Object.getOwnPropertySymbols,Xa=qa?function(e){for(var t=[];e;)Va(t,Ha(e)),e=Ga(e);return t}:Ya,ar=Xa,Za=be,Ja=ar;function Qa(e,t){return Za(e,Ja(e),t)}var ei=Qa,ti=Ur,ri=ar,ni=rt;function ai(e){return ti(e,ni,ri)}var ir=ai,ii=Object.prototype,si=ii.hasOwnProperty;function oi(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&si.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var li=oi,yt=zr;function ci(e){var t=new e.constructor(e.byteLength);return new yt(t).set(new yt(e)),t}var nt=ci,ui=nt;function di(e,t){var n=t?ui(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var fi=di,pi=/\w*$/;function mi(e){var t=new e.constructor(e.source,pi.exec(e));return t.lastIndex=e.lastIndex,t}var hi=mi,bt=Vr,xt=bt?bt.prototype:void 0,jt=xt?xt.valueOf:void 0;function vi(e){return jt?Object(jt.call(e)):{}}var gi=vi,yi=nt;function bi(e,t){var n=t?yi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var xi=bi,ji=nt,Ai=fi,Oi=hi,wi=gi,_i=xi,Pi="[object Boolean]",Ti="[object Date]",Si="[object Map]",$i="[object Number]",Ni="[object RegExp]",ki="[object Set]",Ei="[object String]",Ii="[object Symbol]",Ri="[object ArrayBuffer]",Li="[object DataView]",Ci="[object Float32Array]",Di="[object Float64Array
9]",Fi="[object Int8Array]",Bi="[object Int16Array]",Ki="[object Int32Array]",Mi="[object Uint8Array]",Wi="[object Uint8ClampedArray]",Ui="[object Uint16Array]",zi="[object Uint32Array]";function Vi(e,t,n){var r=e.constructor;switch(t){case Ri:return ji(e);case Pi:case Ti:return new r(+e);case Li:return Ai(e,n);case Ci:case Di:case Fi:case Bi:case Ki:case Mi:case Wi:case Ui:case zi:return _i(e,n);case Si:return new r;case $i:case Ei:return new r(e);case Ni:return Oi(e);case ki:return new r;case Ii:return wi(e)}}var Gi=Vi,Hi=et,At=Object.create,Yi=function(){function e(){}return function(t){if(!Hi(t))return{};if(At)return At(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),qi=Yi,Xi=qi,Zi=Gt,Ji=zt;function Qi(e){return typeof e.constructor=="function"&&!Ji(e)?Xi(Zi(e)):{}}var es=Qi,ts=tt,rs=Ht,ns="[object Map]";function as(e){return rs(e)&&ts(e)==ns}var is=as,ss=is,os=qt,Ot=Yt,wt=Ot&&Ot.isMap,ls=wt?os(wt):ss,cs=ls,us=tt,ds=Ht,fs="[object Set]";function ps(e){return ds(e)&&us(e)==fs}var ms=ps,hs=ms,vs=qt,_t=Yt,Pt=_t&&_t.isSet,gs=Pt?vs(Pt):hs,ys=gs,bs=Gr,xs=la,js=nr,As=xa,Os=Da,ws=Fa,_s=Ka,Ps=za,Ts=ei,Ss=Yr,$s=ir,Ns=tt,ks=li,Es=Gi,Is=es,Rs=qr,Ls=Hr,Cs=cs,Ds=et,Fs=ys,Bs=Ut,Ks=rt,Ms=1,Ws=2,Us=4,sr="[object Arguments]",zs="[object Array]",Vs="[object Boolean]",Gs="[object Date]",Hs="[object Error]",or="[object Function]",Ys="[object GeneratorFunction]",qs="[object Map]",Xs="[object Number]",lr="[object Object]",Zs="[object RegExp]",Js="[object Set]",Qs="[object String]",eo="[object Symbol]",to="[object WeakMap]",ro="[object ArrayBuffer]",no="[object DataView]",ao="[object Float32Array]",io="[object Float64Array]",so="[object Int8Array]",oo="[object Int16Array]",lo="[object Int32Array]",co="[object Uint8Array]",uo="[object Uint8ClampedArray]",fo="[object Uint16Array]",po="[object Uint32Array]",j={};j[sr]=j[zs]=j[ro]=j[no]=j[Vs]=j[Gs]=j[ao]=j[io]=j[so]=j[oo]=j[lo]=j[qs]=j[Xs]=j[lr]=j[Zs]=j[Js]=j[Qs]=j[eo]=j[co]=j[uo]=j[fo]=j[po]=!0;j[Hs]=j[or]=j[to]=!1;function Pe(e,t,n,r,a,o){var s,c=t&Ms,l=t&Ws,u=t&Us;if(n&&(s=a?n(e,r,a,o):n(e)),s!==void 0)return s;if(!Ds(e))return e;var p=Rs(e);if(p){if(s=ks(e),!c)return _s(e,s)}else{var m=Ns(e),g=m==or||m==Ys;if(Ls(e))return ws(e,c);if(m==lr||m==sr||g&&!a){if(s=l||g?{}:Is(e),!c)return l?Ts(e,Os(s,e)):Ps(e,As(s,e))}else{if(!j[m])return a?e:{};s=Es(e,m,c)}}o||(o=new bs);var b=o.get(e);if(b)return b;o.set(e,s),Fs(e)?e.forEach(function(y){s.add(Pe(y,t,n,y,e,o))}):Cs(e)&&e.forEach(function(y,v){s.set(v,Pe(y,t,n,v,e,o))});var f=u?l?$s:Ss:l?Ks:Bs,d=p?void 0:f(e);return xs(d||e,function(y,v){d&&(v=y,y=e[v]),js(s,v,Pe(y,t,n,v,e,o))}),s}var mo=Pe,ho=Xr,vo=Zr;function go(e,t){return t.length<2?e:ho(e,vo(t,0,-1))}var yo=go,bo=Xt,xo=Jr,jo=yo,Ao=Qr;function Oo(e,t){return t=bo(t,e),e=jo(e,t),e==null||delete e[Ao(xo(t))]}var wo=Oo,_o=en;function Po(e){return _o(e)?void 0:e}var To=Po,So=tn;function $o(e){var t=e==null?0:e.length;return t?So(e,1):[]}var No=$o,ko=No,Eo=rn,Io=nn;function Ro(e){return Io(Eo(e,void 0,ko),e+"")}var Lo=Ro,Co=an,Do=mo,Fo=wo,Bo=Xt,Ko=be,Mo=To,Wo=Lo,Uo=ir,zo=1,Vo=2,Go=4,Ho=Wo(function(e,t){var n={};if(e==null)return n;var r=!1;t=Co(t,function(o){return o=Bo(o,e),r||(r=o.length>1),o}),Ko(e,Uo(e),n),r&&(n=Do(n,zo|Vo|Go,Mo));for(var a=t.length;a--;)Fo(n,t[a]);return n}),Yo=Ho;const qo=Xe(Yo);function ye(e){"@babel/helpers - typeof";return ye=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},ye(e)}function He(){return He=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},He.apply(this,arguments)}function Tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ke(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
vendor: 7,921 bytes, lines 9-10
9t%2?Tt(Object(n),!0).forEach(function(r){Xo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xo(e,t,n){return t=Zo(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zo(e){var t=Jo(e,"string");return ye(t)=="symbol"?t:t+""}function Jo(e,t){if(ye(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ye(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qo(e,t){var n="".concat(t.x||e.x),r=parseInt(n,10),a="".concat(t.y||e.y),o=parseInt(a,10),s="".concat((t==null?void 0:t.height)||(e==null?void 0:e.height)),c=parseInt(s,10);return Ke(Ke(Ke({},t),sn(e)),{},{height:c,x:r,y:o})}function el(e){return h.createElement(Ct,He({shapeType:"trapezoid",propTransformer:Qo},e))}var Ye;function St(e,t){return al(e)||nl(e,t)||rl(e,t)||tl()}function tl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
10In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rl(e,t){if(e){if(typeof e=="string")return $t(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $t(e,t)}}function $t(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nl(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,s,c=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(p){u=!0,a=p}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function al(e){if(Array.isArray(e))return e}function fe(e){"@babel/helpers - typeof";return fe=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},fe(e)}function Ee(){return Ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ee.apply(this,arguments)}function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nt(Object(n),!0).forEach(function(r){G(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function il(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ur(r.key),r)}}function sl(e,t,n){return t&&kt(e.prototype,t),n&&kt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ol(e,t,n){return t=Ie(t),ll(e,cr()?Reflect.construct(t,n||[],Ie(e).constructor):t.apply(e,n))}function ll(e,t){if(t&&(fe(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cl(e)}function cl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cr=function(){return!!e})()}function Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ie(e)}function ul(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&&qe(e,t)}function qe(e,t){return qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},qe(e,t)}function G(e,t,n){return t=ur(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ur(e){var t=dl(e,"string");return fe(t)=="symbol"?t:t+""}function dl(e,t){if(fe(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(fe(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var X=function(e){function t(){var n;il(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=ol(this,t,[].concat(a)),G(n,"state",{isAnimationFinished:!1}),G(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),U(s)&&s()}),G(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),U(s)&&s()}),n}return ul(t,e),sl(t,[{key:"isActiveIndex",value:function(r){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(r)!==-1:r===a}},{key:"renderTrapezoidsStatically",value:function(r){var a=this,o=this.props,s=o.shape,c=o.activeShape;return r.map(function(l,u){var p=a.isActiveIndex(u)?c:s,m=T(T({},l),{},{isActive:a.isActiveIndex(u),stroke:l.stroke});return h.createElement(C,Ee({className:"recharts-funnel-trapezoid"},Re(a.props,l,u),{key:"trapezoid-".concat(l==null?void 0:l.x,"-").concat(l==null?void 0:l.y,"-").concat(l==null?void 0:l.name,"-").concat(l==null?void 0:l.value),role:"img"}),h.createElement(el,Ee({option:p},m)))})}},{key:"renderTrapezoidsWithAnimation",value:function(){var r=this,a=this.props,o=a.trapezoids,s=a.isAnimationActive,c=a.animationBegin,l=a.animationDuration,u=a.animationEasing,p=a.animationId,m=this.state.prevTrapezoids;return h.createElement(Dt,{begin:c,duration:l,isActive:s,easing:u,from:{t:0},to:{t:1},key:"funnel-".concat(p),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var b=g.t,f=o.map(function(d,y){var v=m&&m[y];if(v){var O=D(v.x,d.x),w=D(v.y,d.y),K=D(v.upperWidth,d.upperWidth),R=D(v.lowerWidth,d.lowerWidth),x=D(v.height,d.height);return T(T({},d),{},{x:O(b),y:w(b),upperWidth:K(b),lowerWidth:R(b),height:x(b)})}var $=D(d.x+d.upperWidth/2,d.x),_=D(d.y+d.height/2,d.y),B=D(0,d.upperWidth),P=D(0,d.lowerWidth),L=D(0,d.height);return T(T({},d),{},{x:$(b),y:_(b),upperWidth:B(b),lowerWidth:P(b),height:L(b)})});return h.createElement(C,null,r.renderTrapezoidsStatically(f))})}},{key:"renderTrapezoids",value:function(){var r=this.props,a=r.trapezoids,o=r.isAnimationActive,s=this.state.prevTrapezoids;return o&&a&&a.length&&(!s||!Ft(s,a))?this.renderTrapezoidsWithAnimation():this.renderTrapezoidsStatically(a)}},{key:"render",value:function(){var r=this.props,a=r.hide,o=r.trapezoids,s=r.className,c=r.isAnimationActive,l=this.state.isAnimationFinished;if(a||!o||!o.length)return null;var u=z("recharts-trapezoids",s);return h.createElement(C,{className:u},this.renderTrapezoids(),(!c||l)&&Je.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curTrapezoids:r.trapezoids,prevTrapezoids:a.curTrapezoids}:r.trapezoids!==a.curTrapezoids?{curTrapezoids:r.trapezoids}:null}}])}(le.PureComponent);Ye=X;
10G(X,"displayName","Funnel");G(X,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",labelLine:!0,hide:!1,isAnimationActive:!Bt.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",lastShapeType:"triangle"});G(X,"getRealFunnelData",function(e){var t=e.props,n=t.data,r=t.children,a=S(e.props,!1),o=Kt(r,Te);return n&&n.length?n.map(function(s,c){return T(T(T({payload:s},a),s),o&&o[c]&&o[c].props)}):o&&o.length?o.map(function(s){return T(T({},a),s.props)}):[]});G(X,"getRealWidthHeight",function(e,t){var n=e.props.width,r=t.width,a=t.height,o=t.left,s=t.right,c=t.top,l=t.bottom,u=a,p=r;return on(n)?p=n:ln(n)&&(p=p*parseFloat(n)/100),{realWidth:p-o-s-50,realHeight:u-l-c,offsetX:(r-p)/2,offsetY:(a-u)/2}});G(X,"getComposedData",function(e){var t=e.item,n=e.offset,r=Ye.getRealFunnelData(t),a=t.props,o=a.dataKey,s=a.nameKey,c=a.tooltipType,l=a.lastShapeType,u=a.reversed,p=n.left,m=n.top,g=Ye.getRealWidthHeight(t,n),b=g.realHeight,f=g.realWidth,d=g.offsetX,y=g.offsetY,v=Math.max.apply(null,r.map(function(x){return W(x,o,0)})),O=r.length,w=b/O,K={x:n.left,y:n.top,width:n.width,height:n.height},R=r.map(function(x,$){var _=W(x,o,0),B=W(x,s,$),P=_,L;if($!==O-1){if(L=W(r[$+1],o,0),L instanceof Array){var te=L,M=St(te,1);L=M[0]}}else if(_ instanceof Array&&_.length===2){var pe=St(_,2);P=pe[0],L=pe[1]}else l==="rectangle"?L=P:L=0;var re=(v-P)*f/(2*v)+m+25+d,ne=w*$+p+y,Y=P/v*f,Z=L/v*f,dr=[{name:B,value:P,payload:x,dataKey:o,type:c}],fr={x:re+Y/2,y:ne+w/2};return T(T({x:re,y:ne,width:Math.max(Y,Z),upperWidth:Y,lowerWidth:Z,height:w,name:B,val:P,tooltipPayload:dr,tooltipPosition:fr},qo(x,"width")),{},{payload:x,parentViewBox:K,labelViewBox:{x:re+(Y-Z)/4,y:ne,width:Math.abs(Y-Z)/2+Math.min(Y,Z),height:w}})});return u&&(R=R.map(function(x,$){var _=x.y-$*w+(O-1-$)*w;return T(T({},x),{},{upperWidth:x.lowerWidth,lowerWidth:x.upperWidth,x:x.x-(x.lowerWidth-x.upperWidth)/2,y:x.y-$*w+(O-1-$)*w,tooltipPosition:T(T({},x.tooltipPosition),{},{y:_+w/2}),labelViewBox:T(T({},x.labelViewBox),{},{y:_})})})),{trapezoids:R,data:r}});var fl=Qe({chartName:"FunnelChart",GraphicalChild:X,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",axisComponents:[],defaultProps:{layout:"centric"}});const bl=()=>{const e=mr();hr();const{isAdmin:t,loading:n}=vr(),{toast:r}=gr(),[a,o]=le.useState(!1);if(le.useEffect(()=>{!n&&!t&&(e("/admin/dashboard"),r({title:"Access Denied",description:"You must be an admin to access this page",variant:"destructive"}))},[t,n,e]),n||a)return i.jsx(yr,{});if(!t)return null;const s=[{title:"Total Users",value:"12,543",change:"+12.3%",trend:"up",icon:Or,description:"Last 30 days"},{title:"Page Views",value:"45,821",change:"+8.7%",trend:"up",icon:wr,description:"Last 30 days"},{title:"Avg. Session",value:"4m 32s",change:"+2.1%",trend:"up",icon:_r,description:"Time on site"},{title:"Bounce Rate",value:"42.3%",change:"-3.2%",trend:"down",icon:un,description:"Last 30 days"}],c=[{name:"Mon",sessions:1200,pageviews:3400,users:890},{name:"Tue",sessions:1400,pageviews:3800,users:1050},{name:"Wed",sessions:1600,pageviews:4200,users:1180},{name:"Thu",sessions:1350,pageviews:3600,users:980},{name:"Fri",sessions:1800,pageviews:4800,users:1320},{name:"Sat",sessions:2100,pageviews:5400,users:1580},{name:"Sun",sessions:1900,pageviews:5e3,users:1420}],l=[{name:"Landing Page Visit",value:1e4,fill:"hsl(var(--primary))"},{name:"Sign Up Started",value:5e3,fill:"hsl(var(--primary) / 0.8)"},{name:"Account Created",value:3500,fill:"hsl(var(--primary) / 0.6)"},{name:"Profile Completed",value:2800,fill:"hsl(var(--primary) / 0.4)"},{name:"First Feature Used",value:2200,fill:"hsl(var(--primary) / 0.3)"},{name:"Premium Upgrade",value:450,fill:"hsl(var(--primary) / 0.2)"}],u=[{name:"Organic Search",value:4200,color:"hsl(220, 70%, 50%)"},{name:"Direct",value:2100,color:"hsl(280, 70%, 50%)"},{name:"Social Media",value:1800,color:"hsl(340, 70%, 50%)"},{name:"Referral",value:900,color:"hsl(160, 70%, 50%)"},{name:"Email",value:600,color:"hsl(30, 70%, 50%)"}],p=[{name:"Mobile",value:6200,color:"hsl(var(--primary))"},{name:"Desktop",value:4800,color:"hsl(var(--primary) / 0.6)"},{name:"Tablet",value:1200,color:"hsl(var(--primary) / 0.3)"}],m=[{page:"/",views:12543,avgTime:"2m 34s",bounceRate:"38%"},{page:"/mirror",views:8921,avgTime:"5m 12s",bounceRate:"28%"},{page:"/vision-board",views:7654,avgTime:"7m 45s",bounceRate:"22%"},{page:"/circles",views:6234,avgTime:"6m 18s",bounceRate:"31%"},{page:"/voice-notes",views:5432,avgTime:"4m 56s",bounceRate:"35%"}],g=[{ageGroup:"18-24",percentage:35,users:4390},{ageGroup:"25-34",percentage:42,users:5268},{ageGroup:"35-44",percentage:15,users:1881},{ageGroup:"45-54",percentage:6,users:752},{ageGroup:"55+",percentage:2,users:251}],b=[{event:"affirmation_viewed",count:15234,users:3421},{event:"journal_entry_created",count:8912,users:2145},{event:"mood_tracked",count:7654,users:2834},{event:"voice_note_created",count:5432,users:1876},{event:"vision_board_updated",count:4321,users:1543},{event:"premium_upgrade",count:234,users:234}];return i.jsx("div",{className:"min-h-screen bg-background",children:i.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-7xl",children:[i.jsxs("div",{className:"flex items-center justify-between mb-6",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Pr,{className:"h-8 w-8 text-primary"}),i.jsxs("div",{children:[i.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Analytics Dashboard"}),i.jsx("p",{className:"text-muted-foreground",children:"Google Analytics insights and metrics"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(br,{}),i.jsxs(xe,{variant:"outline",onClick:()=>
10e("/admin/dashboard"),className:"gap-2",children:[i.jsx(xr,{className:"h-4 w-4"}),"Usage Stats"]}),i.jsx(xe,{variant:"ghost",onClick:()=>e("/admin/dashboard"),className:"rounded-full",children:i.jsx(Tr,{className:"h-5 w-5"})})]})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:s.map(f=>i.jsxs(N,{children:[i.jsxs(k,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(E,{className:"text-sm font-medium",children:f.title}),i.jsx(f.icon,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(I,{children:[i.jsx("div",{className:"text-2xl font-bold",children:f.value}),i.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[i.jsxs("span",{className:`text-xs font-medium flex items-center gap-1 ${f.trend==="up"?"text-green-600":"text-red-600"}`,children:[i.jsx(dn,{className:`h-3 w-3 ${f.trend==="down"?"rotate-180":""}`}),f.change]}),i.jsx("span",{className:"text-xs text-muted-foreground",children:f.description})]})]})]},f.title))}),i.jsxs(jr,{defaultValue:"engagement",className:"space-y-6",children:[i.jsxs(Ar,{className:"flex w-full overflow-x-auto justify-start sm:grid sm:grid-cols-5",children:[i.jsx(me,{value:"engagement",children:"Engagement"}),i.jsx(me,{value:"conversions",children:"Conversions"}),i.jsx(me,{value:"traffic",children:"Traffic"}),i.jsx(me,{value:"demographics",children:"Demographics"}),i.jsx(me,{value:"events",children:"Events"})]}),i.jsxs(he,{value:"engagement",className:"space-y-6",children:[i.jsxs(N,{children:[i.jsxs(k,{children:[i.jsx(E,{children:"Weekly Engagement Trends"}),i.jsx(q,{children:"Sessions, page views, and unique users over the last 7 days"})]}),i.jsx(I,{children:i.jsx("div",{className:"h-[400px]",children:i.jsx(Ae,{width:"100%",height:"100%",children:i.jsxs(cn,{data:c,children:[i.jsx(it,{strokeDasharray:"3 3",className:"stroke-muted"}),i.jsx(Me,{dataKey:"name",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(We,{tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Oe,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px"}}),i.jsx(st,{}),i.jsx(Be,{type:"monotone",dataKey:"sessions",stroke:"hsl(var(--primary))",strokeWidth:2,name:"Sessions"}),i.jsx(Be,{type:"monotone",dataKey:"pageviews",stroke:"hsl(220, 70%, 50%)",strokeWidth:2,name:"Page Views"}),i.jsx(Be,{type:"monotone",dataKey:"users",stroke:"hsl(280, 70%, 50%)",strokeWidth:2,name:"Users"})]})})})})]}),i.jsxs(N,{children:[i.jsxs(k,{children:[i.jsx(E,{children:"Top Performing Pages"}),i.jsx(q,{children:"Most visited pages and their metrics"})]}),i.jsx(I,{children:i.jsx("div",{className:"space-y-4",children:m.map((f,d)=>i.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[i.jsx("div",{className:"text-2xl font-bold text-muted-foreground w-8",children:d+1}),i.jsxs("div",{className:"flex-1",children:[i.jsx("p",{className:"font-medium",children:f.page}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:[f.views.toLocaleString()," views"]})]})]}),i.jsxs("div",{className:"flex gap-8 text-sm",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-muted-foreground",children:"Avg Time"}),i.jsx("p",{className:"font-medium",children:f.avgTime})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-muted-foreground",children:"Bounce Rate"}),i.jsx("p",{className:"font-medium",children:f.bounceRate})]})]})]},f.page))})})]})]}),i.jsxs(he,{value:"conversions",className:"space-y-6",children:[i.jsxs(N,{children:[i.jsxs(k,{children:[i.jsx(E,{children:"Conversion Funnel"}),i.jsx(q,{children:"User journey from landing page to premium upgrade"})]}),i.jsx(I,{children:i.jsx("div",{className:"h-[500px]",children:i.jsx(Ae,{width:"100%",height:"100%",children:i.jsxs(fl,{children:[i.jsx(Oe,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px"}}),i.jsx(X,{dataKey:"value",data:l,children:i.jsx(Je,{position:"right",fill:"hsl(var(--foreground))",stroke:"none",dataKey:"name"})})]})})})})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[i.jsxs(N,{children:[i.jsx(k,{children:i.jsx(E,{className:"text-sm font-medium",children:"Sign Up Rate"})}),i.jsxs(I,{children:[i.jsx("div",{className:"text-3xl font-bold",children:"50%"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Visitors to sign ups"})]})]}),i.jsxs(N,{children:[i.jsx(k,{children:i.jsx(E,{className:"text-sm font-medium",children:"Activation Rate"})}),i.jsxs(I,{children:[i.jsx("div",{className:"text-3xl font-bold",children:"62.9%"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Sign ups to first feature use"})]})]}),i.jsxs(N,{children:[i.jsx(k,{children:i.jsx(E,{className:"text-sm font-medium",children:"Premium Conversion"})}),i.jsxs(I,{children:[i.jsx("div",{className:"text-3xl font-bold",children:"4.5%"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Free to premium users"})]})]})]})]}),i.jsx(he,{value:"traffic",className:"space-y-6",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[i.jsxs(N,{children:[i.jsxs(k,{children:[i.jsx(E,{children:"Traffic Sources"}),i.jsx(q,{children:"Where your visitors come from"})]}),i.jsx(I,{children:i.jsx("div",{className:"h-[300px]",children:i.jsx(Ae,{width:"100%",height:"100%",children:i.jsxs(sa,{children:[i.jsx(H,{data:u,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:100,label:!0,children:u.map((f,d)=>i.jsx(Te,{fill:f.color},`cell-${d}`))}),i.jsx(Oe,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px"}}),i.jsx(st,{})]})})})})]}),i.jsxs(N,{children:[i.jsxs(k,{children:[i.jsx(E,{children:"Device Breakdown"}),i.jsx(q,{children:"User devices and platforms"})]}),i.jsx(I,{children:i.jsx("div",{className:"h-[300px]",children:i.jsx(Ae,{width:"100%",height:"100%",children:i.jsxs(ia,{data:p,children:[i.jsx(it,{strokeDasharray:"3 3",className:"stroke-muted"}),i.jsx(Me,{dataKey:"name",tick:{fill:"hsl(var(--muted-foreground))"}}
10),i.jsx(We,{tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Oe,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"8px"}}),i.jsx(Mt,{dataKey:"value",radius:[8,8,0,0],children:p.map((f,d)=>i.jsx(Te,{fill:f.color},`cell-${d}`))})]})})})})]})]})}),i.jsxs(he,{value:"demographics",className:"space-y-6",children:[i.jsxs(N,{children:[i.jsxs(k,{children:[i.jsx(E,{children:"Age Distribution"}),i.jsx(q,{children:"User age groups and percentages"})]}),i.jsx(I,{children:i.jsx("div",{className:"space-y-4",children:g.map(f=>i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-sm font-medium",children:f.ageGroup}),i.jsxs("span",{className:"text-sm text-muted-foreground",children:[f.percentage,"% (",f.users.toLocaleString()," users)"]})]}),i.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:i.jsx("div",{className:"bg-primary h-2 rounded-full transition-all",style:{width:`${f.percentage}%`}})})]},f.ageGroup))})})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsxs(N,{children:[i.jsx(k,{children:i.jsx(E,{children:"Gender Distribution"})}),i.jsx(I,{children:i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{children:"Female"}),i.jsx("span",{className:"font-bold",children:"78%"})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{children:"Male"}),i.jsx("span",{className:"font-bold",children:"20%"})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{children:"Other/Not specified"}),i.jsx("span",{className:"font-bold",children:"2%"})]})]})})]}),i.jsxs(N,{children:[i.jsx(k,{children:i.jsx(E,{children:"Top Locations"})}),i.jsx(I,{children:i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{children:"United States"}),i.jsx("span",{className:"font-bold",children:"45%"})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{children:"United Kingdom"}),i.jsx("span",{className:"font-bold",children:"18%"})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{children:"Canada"}),i.jsx("span",{className:"font-bold",children:"12%"})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{children:"Australia"}),i.jsx("span",{className:"font-bold",children:"8%"})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{children:"Other"}),i.jsx("span",{className:"font-bold",children:"17%"})]})]})})]})]})]}),i.jsxs(he,{value:"events",className:"space-y-6",children:[i.jsxs(N,{children:[i.jsxs(k,{children:[i.jsx(E,{children:"Top Custom Events"}),i.jsx(q,{children:"Most tracked user interactions and engagement events"})]}),i.jsx(I,{children:i.jsx("div",{className:"space-y-4",children:b.map((f,d)=>i.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[i.jsx("div",{className:"text-2xl font-bold text-muted-foreground w-8",children:d+1}),i.jsxs("div",{className:"flex-1",children:[i.jsx("p",{className:"font-medium font-mono text-sm",children:f.event}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:[f.users.toLocaleString()," unique users"]})]})]}),i.jsxs("div",{className:"text-right",children:[i.jsx("p",{className:"text-2xl font-bold",children:f.count.toLocaleString()}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Total events"})]})]},f.event))})})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[i.jsxs(N,{children:[i.jsx(k,{children:i.jsx(E,{className:"text-sm",children:"Engagement Events"})}),i.jsxs(I,{children:[i.jsx("div",{className:"text-3xl font-bold",children:"41,553"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Journal, mood, affirmations"})]})]}),i.jsxs(N,{children:[i.jsx(k,{children:i.jsx(E,{className:"text-sm",children:"Conversion Events"})}),i.jsxs(I,{children:[i.jsx("div",{className:"text-3xl font-bold",children:"1,284"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Sign ups and upgrades"})]})]}),i.jsxs(N,{children:[i.jsx(k,{children:i.jsx(E,{className:"text-sm",children:"Feature Usage Events"})}),i.jsxs(I,{children:[i.jsx("div",{className:"text-3xl font-bold",children:"18,432"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Buttons, modals, searches"})]})]})]})]})]}),i.jsxs(N,{className:"mt-8",children:[i.jsxs(k,{children:[i.jsxs(E,{className:"flex items-center gap-2",children:[i.jsx(ot,{className:"h-5 w-5"}),"Connect to Live Google Analytics"]}),i.jsx(q,{children:"To see real-time data from your Google Analytics account"})]}),i.jsxs(I,{className:"space-y-4",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"The data shown above is sample data for demonstration. To connect your live Google Analytics data:"}),i.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-sm text-muted-foreground",children:[i.jsx("li",{children:"Set up Google Analytics Reporting API credentials"}),i.jsx("li",{children:"Add the Google Analytics Data API package to the project"}),i.jsx("li",{children:"Configure API authentication in the backend"}),i.jsx("li",{children:"Replace sample data with live API calls"})]}),i.jsxs("div",{className:"flex gap-2 mt-4",children:[i.jsxs(xe,{variant:"outline",onClick:()=>window.open("https://analytics.google.com/","_blank"),children:[i.jsx(ot,{className:"h-4 w-4 mr-2"}),"Open Google Analytics"]}),i.jsx(xe,{variant:"outline",onClick:()=>window.open("https://developers.google.com/analytics/devguides/reporting/data/v1","_blank"),children:"View API Docs"})]})]})]})]})})};export{bl as default};

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.