vendor: 25,880 bytes, lines 1-7
1import{a as h,g as He,r as L,u as ce,j as i,k as st}from"./vendor-query-BEIJVMdj.js";import{N as ot,L as ct}from"./vendor-react-B5CYxRoX.js";import{c as lt,a0 as M,j as ut,k as dt,a1 as ft,L as Ae,B as ke,a2 as pt,N as mt,Z as ht,z as vt,R as gt,O as yt,a3 as Le,a4 as xt,S as bt,a as jt,b as At,d as kt,e as we,a5 as wt}from"./index-k-dLgr5f.js";import{C as Z,a as Y,b as le,c as ue}from"./card-t8-F8lWt.js";import{A as Pt}from"./AdminPageHeader-B63t_LvS.js";import{S as Ot}from"./shield-alert-BfvgDwzp.js";import{f as w,_ as Ze,a as _t,b as Ye,c as Nt,i as W,T as Se,p as C,L as I,g as Xe,d as Te,e as Qe,D as St,C as Tt,h as te,j as X,S as Lt,A as Et,k as Rt,l as Ee,m as It,n as Q,o as $t,u as Dt,G as Ct,q as pe,r as Kt,s as Je,t as Ft,v as de,w as Re,x as Bt,y as Mt,R as Ie,z as Vt,X as zt,Y as qt,B as $e}from"./generateCategoricalChart-DsNOxW77.js";import{L as Wt,a as fe}from"./LineChart-BadBAR8X.js";import{G as De}from"./globe-DkM-M5n-.js";import{A as Gt}from"./arrow-up-down-DgqX7Aar.js";import{A as Ut}from"./arrow-up-D3yB-fTG.js";import"./vendor-firebase-DGyKCgmH.js";import"./vendor-datefns-CwLhcdpR.js";import"./vendor-carousel-CFO2eJHO.js";import"./index-Dh4i1-J3.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 Ht=lt("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var Zt=["points","className","baseLinePoints","connectNulls"];function J(){return J=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},J.apply(this,arguments)}function Yt(r,e){if(r==null)return{};var n=Xt(r,e),t,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(a=0;a<o.length;a++)t=o[a],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function Xt(r,e){if(r==null)return{};var n={};for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){if(e.indexOf(t)>=0)continue;n[t]=r[t]}return n}function Ce(r){return tr(r)||er(r)||Jt(r)||Qt()}function Qt(){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 Jt(r,e){if(r){if(typeof r=="string")return Pe(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor&&(n=r.constructor.name),n==="Map"||n==="Set")return Array.from(r);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pe(r,e)}}function er(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function tr(r){if(Array.isArray(r))return Pe(r)}function Pe(r,e){(e==null||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}var Ke=function(e){return e&&e.x===+e.x&&e.y===+e.y},rr=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return e.forEach(function(t){Ke(t)?n[n.length-1].push(t):n[n.length-1].length>0&&n.push([])}),Ke(e[0])&&n[n.length-1].push(e[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},ie=function(e,n){var t=rr(e);n&&(t=[t.reduce(function(o,s){return[].concat(Ce(o),Ce(s))},[])]);var a=t.map(function(o){return o.reduce(function(s,c,f){return"".concat(s).concat(f===0?"M":"L").concat(c.x,",").concat(c.y)},"")}).join("");return t.length===1?"".concat(a,"Z"):a},nr=function(e,n,t){var a=ie(e,t);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(ie(n.reverse(),t).slice(1))},ar=function(e){var n=e.points,t=e.className,a=e.baseLinePoints,o=e.connectNulls,s=Yt(e,Zt);if(!n||!n.length)return null;var c=M("recharts-polygon",t);if(a&&a.length){var f=s.stroke&&s.stroke!=="none",l=nr(n,a,o);return h.createElement("g",{className:c},h.createElement("path",J({},w(s,!0),{fill:l.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:l})),f?h.createElement("path",J({},w(s,!0),{fill:"none",d:ie(n,o)})):null,f?h.createElement("path",J({},w(s,!0),{fill:"none",d:ie(a,o)})):null)}var p=ie(n,o);return h.createElement("path",J({},w(s,!0),{fill:p.slice(-1)==="Z"?s.fill:"none",className:c,d:p}))},ir=Ze,sr=_t,or=Ye;function cr(r,e){return r&&r.length?ir(r,or(e),sr):void 0}var lr=cr;const ur=He(lr);var dr=Ze,fr=Ye,pr=Nt;function mr(r,e){return r&&r.length?dr(r,fr(e),pr):void 0}var hr=mr;const vr=He(hr);var gr=["cx","cy","angle","ticks","axisLine"],yr=["ticks","tick","angle","tickFormatter","stroke"];function re(r){"@babel/helpers - typeof";return re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},re(r)}function se(){return se=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},se.apply(this,arguments)}function Fe(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),n.push.apply(n,t)}return n}function z(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Fe(Object(n),!0).forEach(function(t){ye(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function Be(r,e){if(r==null)return{};var n=xr(r,e),t,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(a=0;a<o.length;a++)t=o[a],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function xr(r,e){if(r==null)return{};var n={};for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){if(e.indexOf(t)>=0)continue;n[t]=r[t]}return n}function br(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Me(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,tt(t.key),t)}}function jr(r,e,n){return e&&Me(r.prototype,e),n&&Me(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Ar(r,e,n){return e=he(e),kr(r,et()?Reflect.construct(e,n||[],he(r).constructor):e.apply(r,n))}function kr(r,e){if(e&&(re(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wr(r)}function wr(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function et(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(et=function(){return!!r})()}function he(r){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},he(r)}function Pr(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Oe(r,e)}function Oe(r,e){return Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,a){return t.__proto__=a,t},Oe(r,e)}function ye(r,e,n){return e=tt(e),e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function tt(r){var e=Or(r,"string");return re(e)=="symbol"?e:e+""}function Or(r,e){if(re(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e);if(re(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var xe=function(r){function e(){return br(this,e),Ar(this,e,arguments)}return Pr(e,r),jr(e,[{key:"getTickValueCoord",value:function(t){var a=t.coordinate,o=this.props,s=o.angle,c=o.cx,f=o.cy;return C(c,f,a,s)}},{key:"getTickTextAnchor",value:function(){var t=this.props.orientation,a;switch(t){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var t=this.props,a=t.cx,o=t.cy,s=t.angle,c=t.ticks,f=ur(c,function(p){return p.coordinate||0}),l=vr(c,function(p){return p.coordinate||0});return{cx:a,cy:o,startAngle:s,endAngle:s,innerRadius:l.coordinate||0,outerRadius:f.coordinate||0}}},{key:"renderAxisLine",value:function(){var t=this.props,a=t.cx,o=t.cy,s=t.angle,c=t.ticks,f=t.axisLine,l=Be(t,gr),p=c.reduce(function(y,d){return[Math.min(y[0],d.coordinate),Math.max(y[1],d.coordinate)]},[1/0,-1/0]),m=C(a,o,p[0],s),g=C(a,o,p[1],s),j=z(z(z({},w(l,!1)),{},{fill:"none"},w(f,!1)),{},{x1:m.x,y1:m.y,x2:g.x,y2:g.y});return h.createElement("line",se({className:"recharts-polar-radius-axis-line"},j))}},{key:"renderTicks",value:function(){var t=this,a=this.props,o=a.ticks,s=a.tick,c=a.angle,f=a.tickFormatter,l=a.stroke,p=Be(a,yr),m=this.getTickTextAnchor(),g=w(p,!1),j=w(s,!1),y=o.map(function(d,x){var b=t.getTickValueCoord(d),k=z(z(z(z({textAnchor:m,transform:"rotate(".concat(90-c,", ").concat(b.x,", ").concat(b.y,")")},g),{},{stroke:"none",fill:l},j),{},{index:x},b),{},{payload:d});return h.createElement(I,se({className:M("recharts-polar-radius-axis-tick",Xe(s)),key:"tick-".concat(d.coordinate)},Te(t.props,d,x)),e.renderTickItem(s,k,f?f(d.value,x):d.value))});return h.createElement(I,{className:"recharts-polar-radius-axis-ticks"},y)}},{key:"render",value:function(){var t=this.props,a=t.ticks,o=t.axisLine,s=t.tick;return!a||!a.length?null:h.createElement(I,{className:M("recharts-polar-radius-axis",this.props.className)},o&&this.renderAxisLine(),s&&this.renderTicks(),Qe.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(t,a,o){var s;return h.isValidElement(t)?s=h.cloneElement(t,a):W(t)?s=t(a):s=h.createElement(Se,se({},a,{className:"recharts-polar-radius-axis-tick-value"}),o),s}}])}(L.PureComponent);ye(xe,"displayName","PolarRadiusAxis");ye(xe,"axisType","radiusAxis");ye(xe,"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 ne(r){"@babel/helpers - typeof";return ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(r)}function G(){return G=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},G.apply(this,arguments)}function Ve(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),n.push.apply(n,t)}return n}function q(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ve(Object(n),!0).forEach(function(t){be(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function _r(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function ze(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,nt(t.key),t)}}function Nr(r,e,n){return e&&ze(r.prototype,e),n&&ze(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Sr(r,e,n){return e=ve(e),Tr(r,rt()?Reflect.construct(e,n||[],ve(r).constructor):e.apply(r,n))}function Tr(r,e){if(e&&(ne(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lr(r)}function Lr(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function rt(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rt=function(){return!!r})()}function ve(r){return ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ve(r)}function Er(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&_e(r,e)}function _e(r,e){return _e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,a){return t.__proto__=a,t},_e(r,e)}function be(r,e,n){return e=nt(e),e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function nt(r){var e=Rr(r,"string");return ne(e)=="symbol"?e:e+""}function Rr(r,e){if(ne(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e);if(ne(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Ir=Math.PI/180,qe=1e-5,je=function(r){function e(){return _r(this,e),Sr(this,e,arguments)}return Er(e,r),Nr(e,[{key:"getTickLineCoord",value:function(t){var a=this.props,o=a.cx,s=a.cy,c=a.radius,f=a.orientation,l=a.tickSize,p=l||8,m=C(o,s,c,t.coordinate),g=C(o,s,c+(f==="inner"?-1:1)*p,t.coordinate);return{x1:m.x,y1:m.y,x2:g.x,y2:g.y}}},{key:"getTickTextAnchor",value:function(t){var a=this.props.orientation,o=Math.cos(-t.coordinate*Ir),s;return o>qe?s=a==="outer"?"start":"end":o<-qe?s=a==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var t=this.props,a=t.cx,o=t.cy,s=t.radius,c=t.axisLine,f=t.axisLineType,l=q(q({},w(this.props,!1)),{},{fill:"none"},w(c,!1));if(f==="circle")return h.createElement(St,G({className:"recharts-polar-angle-axis-line"},l,{cx:a,cy:o,r:s}));var p=this.props.ticks,m=p.map(function(g){return C(a,o,s,g.coordinate)});return h.createElement(ar,G({className:"recharts-polar-angle-axis-line"},l,{points:m}))}},{key:"renderTicks",value:function(){var t=this,a=this.props,o=a.ticks,s=a.tick,c=a.tickLine,f=a.tickFormatter,l=a.stroke,p=w(this.props,!1),m=w(s,!1),g=q(q({},p),{},{fill:"none"},w(c,!1)),j=o.map(function(y,d){var x=t.getTickLineCoord(y),b=t.getTickTextAnchor(y),k=q(q(q({textAnchor:b},p),{},{stroke:"none",fill:l},m),{},{index:d,payload:y,x:x.x2,y:x.y2});return h.createElement(I,G({className:M("recharts-polar-angle-axis-tick",Xe(s)),key:"tick-".concat(y.coordinate)},Te(t.props,y,d)),c&&h.createElement("line",G({className:"recharts-polar-angle-axis-tick-line"},g,x)),s&&e.renderTickItem(s,k,f?f(y.value,d):y.value))});return h.createElement(I,{className:"recharts-polar-angle-axis-ticks"},j)}},{key:"render",value:function(){var t=this.props,a=t.ticks,o=t.radius,s=t.axisLine;return o<=0||!a||!a.length?null:h.createElement(I,{className:M("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(t,a,o){var s;return h.isValidElement(t)?s=h.cloneElement(t,a):W(t)?s=t(a):s=h.createElement(Se,G({},a,{className:"recharts-polar-angle-axis-tick-value"}),o),s}}])}(L.PureComponent);be(je,"displayName","PolarAngleAxis");be(je,"axisType","angleAxis");be(je,"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 me;function ae(r){"@babel/helpers - typeof";return ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(r)}function ee(){return ee=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},ee.apply(this,arguments)}function We(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),n.push.apply(n,t)}return n}function A(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?We(Object(n),!0).forEach(function(t){E(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function $r(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Ge(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,it(t.key),t)}}function Dr(r,e,n){return e&&Ge(r.prototype,e),n&&Ge(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Cr(r,e,n){return e=ge(e),Kr(r,at()?Reflect.construct(e,n||[],ge(r).constructor):e.apply(r,n))}function Kr(r,e){if(e&&(ae(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fr(r)}function Fr(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function at(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(at=function(){return!!r})()}function ge(r){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ge(r)}function Br(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ne(r,e)}function Ne(r,e){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,a){return t.__proto__=a,t},Ne(r,e)}function E(r,e,n){return e=it(e),e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function it(r){var e=Mr(r,"string");return ae(e)=="symbol"?e:e+""}function Mr(r,e){if(ae(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e);if(ae(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var K=function(r){function e(n){var t;return $r(this,e),t=Cr(this,e,[n]),E(t,"pieRef",null),E(t,"sectorRefs",[]),E(t,"id",Dt("recharts-pie-")),E(t,"handleAnimationEnd",function(){var a=t.props.onAnimationEnd;t.setState({isAnimationFinished:!0}),W(a)&&a()}),E(t,"handleAnimationStart",function(){var a=t.props.onAnimationStart;t.setState({isAnimationFinished:!1}),W(a)&&a()}),t.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},t}return Br(e,r),Dr(e,[{key:"isActiveIndex",value:function(t){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(t)!==-1:t===a}},{key:"hasActiveIndex",value:function(){var t=this.props.activeIndex;return Array.isArray(t)?t.length!==0:t||t===0}},{key:"renderLabels",value:function(t){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var o=this.props,s=o.label,c=o.labelLine,f=o.dataKey,l=o.valueKey,p=w(this.props,!1),m=w(s,!1),g=w(c,!1),j=s&&s.offsetRadius||20,y=t.map(function(d,x){var b=(d.startAngle+d.endAngle)/2,k=C(d.cx,d.cy,d.outerRadius+j,b),P=A(A(A(A({},p),d),{},{stroke:"none"},m),{},{index:x,textAnchor:e.getTextAnchor(k.x,d.cx)},k),R=A(A(A(A({},p),d),{},{fill:"none",stroke:d.fill},g),{},{index:x,points:[C(d.cx,d.cy,d.outerRadius,b),k]}),S=f;return te(f)&&te(l)?S="value":te(f)&&(S=l),h.createElement(I,{key:"label-".concat(d.startAngle,"-").concat(d.endAngle,"-").concat(d.midAngle,"-").concat(x)},c&&e.renderLabelLineItem(c,R,"line"),e.renderLabelItem(s,P,X(d,S)))});return h.createElement(I,{className:"recharts-pie-labels"},y)}},{key:"renderSectorsStatically",value:function(t){var a=this,o=this.props,s=o.activeShape,c=o.blendStroke,f=o.inactiveShape;return t.map(function(l,p){if((l==null?void 0:l.startAngle)===0&&(l==null?void 0:l.endAngle)===0&&t.length!==1)return null;var m=a.isActiveIndex(p),g=f&&a.hasActiveIndex()?f:null,j=m?s:g,y=A(A({},l),{},{stroke:c?l.fill:l.stroke,tabIndex:-1});return h.createElement(I,ee({ref:function(x){x&&!a.sectorRefs.includes(x)&&a.sectorRefs.push(x)},tabIndex:-1,className:"recharts-pie-sector"},Te(a.props,l,p),{key:"sector-".concat(l==null?void 0:l.startAngle,"-").concat(l==null?void 0:l.endAngle,"-").concat(l.midAngle,"-").concat(p)}),h.createElement(Lt,ee({option:j,isActive:m,shapeType:"sector"},y)))})}},{key:"renderSectorsWithAnimation",value:function(){var t=this,a=this.props,o=a.sectors,s=a.isAnimationActive,c=a.animationBegin,f=a.animationDuration,l=a.animationEasing,p=a.animationId,m=this.state,g=m.prevSectors,j=m.prevIsAnimationActive;return h.createElement(Et,{begin:c,duration:f,isActive:s,easing:l,from:{t:0},to:{t:1},key:"pie-".concat(p,"-").concat(j),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(y){var d=y.t,x=[],b=o&&o[0],k=b.startAngle;return o.forEach(function(P,R){var S=g&&g[R],T=R>0?Rt(P,"paddingAngle",0):0;if(S){var O=Ee(S.endAngle-S.startAngle,P.endAngle-P.startAngle),_=A(A({},P),{},{startAngle:k+T,endAngle:k+O(d)+T});x.push(_),k=_.endAngle}else{var F=P.endAngle,N=P.startAngle,U=Ee(0,F-N),H=U(d),$=A(A({},P),{},{startAngle:k+T,endAngle:k+H+T});x.push($),k=$.endAngle}}),h.createElement(I,null,t.renderSectorsStatically(x))})}},{key:"attachKeyboardHandlers",value:function(t){var a=this;t.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 t=this.props,a=t.sectors,o=t.isAnimationActive,s=this.state.prevSectors;return o&&a&&a.length&&(!s||!It(s,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var t=this,a=this.props,o=a.hide,s=a.sectors,c=a.className,f=a.label,l=a.cx,p=a.cy,m=a.innerRadius,g=a.outerRadius,j=a.isAnimationActive,y=this.state.isAnimationFinished;if(o||!s||!s.length||!Q(l)||!Q(p)||!Q(m)||!Q(g))return null;var d=M("recharts-pie",c);return h.createElement(I,{tabIndex:this.props.rootTabIndex,className:d,ref:function(b){t.pieRef=b}},this.renderSectors(),f&&this.renderLabels(s),Qe.renderCallByParent(this.props,null,!1),(!j||y)&&$t.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(t,a){return a.prevIsAnimationActive!==t.isAnimationActive?{prevIsAnimationActive:t.isAnimationActive,prevAnimationId:t.animationId,curSectors:t.sectors,prevSectors:[],isAnimationFinished:!0}:t.isAnimationActive&&t.animationId!==a.prevAnimationId?{prevAnimationId:t.animationId,curSectors:t.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:t.sectors!==a.curSectors?{curSectors:t.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(t,a){return t>a?"start":t<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(t,a,o){if(h.isValidElement(t))return h.cloneElement(t,a);if(W(t))return t(a);var s=M("recharts-pie-label-line",typeof t!="boolean"?t.className:"");return h.createElement(Tt,ee({},a,{key:o,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(t,a,o){if(h.isValidElement(t))return h.cloneElement(t,a);var s=o;if(W(t)&&(s=t(a),h.isValidElement(s)))return s;var c=M("recharts-pie-label-text",typeof t!="boolean"&&!W(t)?t.className:"");return h.createElement(Se,ee({},a,{alignmentBaseline:"middle",className:c}),s)}}])}(L.PureComponent);me=K;E(K,"displayName","Pie");E(K,"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:!Ct.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});E(K,"parseDeltaAngle",function(r,e){var n=pe(e-r),t=Math.min(Math.abs(e-r),360);return n*t});E(K,"getRealPieData",function(r){var e=r.data,n=r.children,t=w(r,!1),a=Kt(n,Je);return e&&e.length?e.map(function(o,s){return A(A(A({payload:o},t),o),a&&a[s]&&a[s].props)}):a&&a.length?a.map(function(o){return A(A({},t),o.props)}):[]});E(K,"parseCoordinateOfPie",function(r,e){var n=e.top,t=e.left,a=e.width,o=e.height,s=Ft(a,o),c=t+de(r.cx,a,a/2),f=n+de(r.cy,o,o/2),l=de(r.innerRadius,s,0),p=de(r.outerRadius,s,s*.8),m=r.maxRadius||Math.sqrt(a*a+o*o)/2;return{cx:c,cy:f,innerRadius:l,outerRadius:p,maxRadius:m}});E(K,"getComposedData",function(r){var e=r.item,n=r.offset,t=e.type.defaultProps!==void 0?A(A({},e.type.defaultProps),e.props):e.props,a=me.getRealPieData(t);if(!a||!a.length)return null;var o=t.cornerRadius,s=t.startAngle,c=t.endAngle,f=t.paddingAngle,l=t.dataKey,p=t.nameKey,m=t.valueKey,g=t.tooltipType,j=Math.abs(t.minAngle),y=me.parseCoordinateOfPie(t,n),d=me.parseDeltaAngle(s,c),x=Math.abs(d),b=l;te(l)&&te(m)?(Re(!1,`Use "dataKey" to specify the value of pie,
8 the props "valueKey" will be deprecated in 1.1.0`),b="value"):te(l)&&(Re(!1,`Use "dataKey" to specify the value of pie, 9 the props "valueKey" will be deprecated in 1.1.0`),b=m);var k=a.filter(function(_){return X(_,b,0)!==0}).length,P=(x>=360?k:k-1)*f,R=x-k*j-P,S=a.reduce(function(_,F){var N=X(F,b,0);return _+(Q(N)?N:0)},0),T;if(S>0){var O;T=a.map(function(_,F){var N=X(_,b,0),U=X(_,p,F),H=(Q(N)?N:0)/S,$;F?$=O.endAngle+pe(d)*f*(N!==0?1:0):$=s;var oe=$+pe(d)*((N!==0?j:0)+H*R),u=($+oe)/2,v=(y.innerRadius+y.outerRadius)/2,B=[{name:U,value:N,payload:_,dataKey:b,type:g}],D=C(y.cx,y.cy,v,u);return O=A(A(A({percent:H,cornerRadius:o,name:U,tooltipPayload:B,midAngle:u,middleRadius:v,tooltipPosition:D},_),y),{},{value:X(_,b),startAngle:$,endAngle:oe,payload:_,paddingAngle:pe(d)*f}),O})}return A(A({},y),{},{sectors:T,data:a})});var Vr=Bt({chartName:"PieChart",GraphicalChild:K,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:je},{axisType:"radiusAxis",AxisComp:xe}],formatAxisMap:Mt,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const Ue=["hsl(0, 72%, 51%)","hsl(220, 70%, 50%)","hsl(150, 60%, 40%)","hsl(45, 90%, 50%)","hsl(280, 60%, 55%)","hsl(180, 50%, 45%)","hsl(30, 80%, 50%)","hsl(330, 60%, 50%)","hsl(200, 70%, 45%)","hsl(100, 50%, 40%)"],an=()=>{const{isAdmin:r,isLoading:e,user:n,getIdToken:t}=ut(),[a,o]=L.useState("7"),{data:s}=dt();L.useEffect(()=>{s&&(document.title=`Analytics | ${s.site_name}`)},[s]);const{data:c,isLoading:f}=ce({queryKey:["analytics-summary"],queryFn:async()=>{const u=await t(),v=await fetch("/api/admin/analytics/summary",{headers:{Authorization:`Bearer ${u}`}});if(!v.ok)throw new Error("Failed to fetch summary stats");return await v.json()},enabled:!!n&&!!r,staleTime:5*60*1e3,gcTime:30*60*1e3}),{data:l,isLoading:p}=ce({queryKey:["analytics-by-language"],queryFn:async()=>{const u=await t(),v=await fetch("/api/admin/analytics/languages",{headers:{Authorization:`Bearer ${u}`}});if(!v.ok)throw new Error("Failed to fetch languages analytics");return await v.json()},staleTime:5*60*1e3,gcTime:30*60*1e3}),m=L.useMemo(()=>Array.isArray(l)?l.map(u=>({code:u.name,name:ft(u.name),value:Number(u.value)})):[],[l]),{data:g}=ce({queryKey:["analytics-source-ranking"],queryFn:async()=>{const u=await t(),v=await fetch("/api/admin/analytics/sources",{headers:{Authorization:`Bearer ${u}`}});if(!v.ok)throw new Error("Failed to fetch source ranking");return v.json()},enabled:!!n&&!!r,staleTime:5*60*1e3,gcTime:30*60*1e3}),[j,y]=L.useState({key:"articles",direction:"desc"}),[d,x]=L.useState(1),b=50,k=L.useMemo(()=>{if(!Array.isArray(g))return[];const u=[...g].map(v=>({...v,avg_views:v.articles>0?v.views/v.articles:0}));return u.sort((v,B)=>{let D=v[j.key],V=B[j.key];
9return D==null&&(D=0),V==null&&(V=0),typeof D=="string"&&(D=D.toLowerCase(),V=V.toLowerCase()),D<V?j.direction==="asc"?-1:1:D>V?j.direction==="asc"?1:-1:0}),u},[g,j]),P=u=>{let v="desc";j.key===u&&j.direction==="desc"&&(v="asc"),y({key:u,direction:v}),x(1)},R=u=>j.key!==u?i.jsx(Gt,{className:"ml-1 h-3 w-3 opacity-30"}):j.direction==="asc"?i.jsx(Ut,{className:"ml-1 h-3 w-3 text-primary"}):i.jsx(Ht,{className:"ml-1 h-3 w-3 text-primary"}),S=L.useMemo(()=>{const u=(d-1)*b;return k.slice(u,u+b)},[k,d]),T=Math.ceil(k.length/b),{data:O,isLoading:_,isError:F}=ce({queryKey:["analytics-per-day",a],queryFn:async()=>{const u=await t(),v=await fetch(`/api/admin/analytics/daily?days=${a}`,{headers:{Authorization:`Bearer ${u}`}});if(!v.ok)throw new Error("Failed to fetch daily analytics");return v.json()},enabled:!!n&&!!r,placeholderData:st,staleTime:5*60*1e3,gcTime:30*60*1e3}),N=L.useMemo(()=>Array.isArray(O)?O:[],[O]),U=L.useMemo(()=>_||O&&!Array.isArray(O)&&O.loading,[_,O]),H=f||c&&c.loading,$=p||l&&l.loading,oe=g==null?void 0:g.loading;return e||H&&!(c!=null&&c.total_articles)||$&&m.length===0?i.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center bg-background gap-4",children:[i.jsx(Ae,{className:"h-8 w-8 animate-spin text-primary"}),((c==null?void 0:c.message)||(l==null?void 0:l.message))&&i.jsx("p",{className:"text-sm text-muted-foreground italic",children:(c==null?void 0:c.message)||(l==null?void 0:l.message)})]}):n?r?i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx(Pt,{icon:pt,title:"Analytics"}),i.jsxs("div",{className:"container mx-auto px-4 py-8 space-y-8",children:[i.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-4",children:[{label:"Total Articles",value:(c==null?void 0:c.total_articles)||0,icon:mt},{label:"Total Videos",value:(c==null?void 0:c.total_videos)||0,icon:ht},{label:"Total Views",value:((c==null?void 0:c.total_views)||0).toLocaleString(),icon:vt},{label:"Total Sources",value:(c==null?void 0:c.active_sources)||0,icon:gt},{label:"Total Projects",value:(c==null?void 0:c.total_projects)||0,icon:yt},{label:"Total Users",value:(c==null?void 0:c.total_users)||0,icon:Le}].map(u=>i.jsx(Z,{className:"hover:shadow-md transition-shadow",children:i.jsx(Y,{className:"pt-6",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(u.icon,{className:"h-8 w-8 text-primary/70"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-2xl font-bold font-display text-foreground",children:u.value}),i.jsx("p",{className:"text-xs text-muted-foreground",children:u.label})]})]})})},u.label))}),i.jsxs(Z,{children:[i.jsxs(le,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsxs(ue,{className:"font-display flex items-center gap-2",children:[i.jsx(xt,{className:"h-5 w-5 text-primary"})," Content Entered per Day"]}),i.jsx("div",{className:"w-[140px]",children:i.jsxs(bt,{value:a,onValueChange:u=>o(u),children:[i.jsx(jt,{children:i.jsx(At,{placeholder:"Select period"})}),i.jsxs(kt,{children:[i.jsx(we,{value:"7",children:"7 dias"}),i.jsx(we,{value:"30",children:"30 dias"}),i.jsx(we,{value:"90",children:"90 dias"})]})]})})]}),i.jsx(Y,{children:F?i.jsx("div",{className:"h-[300px] flex items-center justify-center text-sm text-muted-foreground",children:"Unable to load chart data for this period."}):U&&N.length===0?i.jsxs("div",{className:"h-[300px] flex items-center justify-center flex-col gap-2",children:[i.jsx(Ae,{className:"h-6 w-6 animate-spin text-primary"}),O&&O.message&&i.jsx("p",{className:"text-xs text-muted-foreground",children:O.message})]}):!N||(Array.isArray(N)?N:[]).length===0?i.jsx("div",{className:"h-[300px] flex items-center justify-center text-sm text-muted-foreground",children:"No data for selected period."}):i.jsx(Ie,{width:"100%",height:300,children:i.jsxs(Wt,{data:N,children:[i.jsx(Vt,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),i.jsx(zt,{dataKey:"date",tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"}}),i.jsx(qt,{tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"}}),i.jsx($e,{contentStyle:{background:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:8},itemStyle:{fontSize:"12px"}}),i.jsx(fe,{type:"monotone",dataKey:"articles",name:"Articles",stroke:"#1e3a8a",strokeWidth:2,dot:{fill:"#1e3a8a"},activeDot:{r:6}}),i.jsx(fe,{type:"monotone",dataKey:"articles_ada",name:"ADA Relevant",stroke:"#0ea5e9",strokeWidth:2,dot:{fill:"#0ea5e9"},activeDot:{r:6}}),i.jsx(fe,{type:"monotone",dataKey:"videos",name:"Videos",stroke:"#ef4444",strokeWidth:2,dot:{fill:"#ef4444"},activeDot:{r:6}}),i.jsx(fe,{type:"monotone",dataKey:"videos_ada",name:"Videos ADA Related",stroke:"#f87171",strokeWidth:2,dot:{fill:"#f87171"},activeDot:{r:6}})]})})})]}),i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[m&&m.length>0&&i.jsxs(Z,{className:"flex flex-col lg:col-span-1",children:[i.jsx(le,{children:i.jsxs(ue,{className:"font-display flex items-center gap-2",children:[i.jsx(De,{className:"h-5 w-5 text-primary"})," By Language ",i.jsxs("span",{className:"text-muted-foreground ml-1 text-sm font-normal",children:["(",(c==null?void 0:c.total_languages)||0,")"]})]})}),i.jsx(Y,{className:"flex-1 flex items-center justify-center",children:i.jsx(Ie,{width:"100%",height:300,children:i.jsxs(Vr,{children:[i.jsx(K,{data:m,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:100,label:({name:u,percent:v})=>`${u} ${(v*100).toFixed(0)}%`,children:m.map((u,v)=>i.jsx(Je,{fill:Ue[v%Ue.length]},v))}),i.jsx($e,{})]})})})]}),m&&m.length>0&&i.jsxs(Z,{className:"flex flex-col lg:col-span-2",children:[i.jsx(le,{children:i.jsxs(ue,{className:"font-display flex items-center gap-2",children:[i.jsx(De,{className:"h-5 w-5 text-primary"})," Detailed Language breakdown"]})}),i.jsx(Y,{children:i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-3",children:m.map(u=>{const v=(c==null?void 0:c.total_articles)||1,B=(u.value/v*100).toFixed(1);return i.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl border border-border/40 bg-card/50 hover:bg-muted/30 transition-all group",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("span",{className:"text-2xl group-hover:scale-110 transition-transform",children:wt(u.code)}),i.jsxs("div",{children:[i.jsx("p",{className:"font-semibold text-xs text-foreground uppercase tracking-wider",children:u.code}),i.jsx("p",{className:"text-xs text-muted-foreground truncate max-w-[80px]",children:u.name})]})]}),i.jsxs("div",{className:"text-right",children:[i.jsx("p",{className:"font-bold text-sm text-foreground",children:u.value.toLocaleStr
9ing()}),i.jsxs("p",{className:"text-[10px] text-primary/80 font-medium",children:[B,"%"]})]})]},u.code)})})})]})]}),oe&&k.length===0?i.jsx(Z,{children:i.jsxs(Y,{className:"py-12 flex flex-col items-center justify-center gap-2",children:[i.jsx(Ae,{className:"h-6 w-6 animate-spin text-primary"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Calculating source rankings..."})]})}):Array.isArray(g)&&g.length>0&&i.jsxs(Z,{children:[i.jsx(le,{children:i.jsxs(ue,{className:"font-display flex items-center gap-2",children:[i.jsx(Le,{className:"h-5 w-5 text-primary"})," Source Ranking"]})}),i.jsxs(Y,{children:[i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-sm",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border",children:[i.jsx("th",{className:"text-left py-3 px-2 text-muted-foreground font-medium w-12",children:"#"}),i.jsx("th",{className:"text-left py-3 px-2 text-muted-foreground font-medium cursor-pointer hover:text-primary transition-colors group",onClick:()=>P("name"),children:i.jsxs("div",{className:"flex items-center",children:["Source ",R("name")]})}),i.jsx("th",{className:"text-right py-3 px-2 text-muted-foreground font-medium cursor-pointer hover:text-primary transition-colors group",onClick:()=>P("articles"),children:i.jsxs("div",{className:"flex items-center justify-end",children:["Articles ",R("articles")]})}),i.jsx("th",{className:"text-right py-3 px-2 text-muted-foreground font-medium cursor-pointer hover:text-primary transition-colors group",onClick:()=>P("views"),children:i.jsxs("div",{className:"flex items-center justify-end",children:["Views ",R("views")]})}),i.jsx("th",{className:"text-right py-3 px-2 text-muted-foreground font-medium cursor-pointer hover:text-primary transition-colors group",onClick:()=>P("avg_views"),children:i.jsxs("div",{className:"flex items-center justify-end",children:["Avg Views ",R("avg_views")]})})]})}),i.jsx("tbody",{children:S.map((u,v)=>{const B=(d-1)*b+v+1;return i.jsxs("tr",{className:"border-b border-border/50 hover:bg-muted/30 transition-colors",children:[i.jsx("td",{className:"py-3 px-2 font-bold text-primary/60",children:B}),i.jsx("td",{className:"py-3 px-2 font-medium text-foreground",children:i.jsx("a",{href:u.type==="YouTube"?`/videos/channel/${u.slug}`:`/source/${u.slug}`,target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary hover:underline transition-colors",children:u.name})}),i.jsx("td",{className:"py-3 px-2 text-right text-foreground",children:u.articles}),i.jsx("td",{className:"py-3 px-2 text-right text-foreground",children:u.views.toLocaleString()}),i.jsx("td",{className:"py-3 px-2 text-right text-muted-foreground",children:Math.round(u.avg_views)})]},B)})})]})}),T>1&&i.jsxs("div",{className:"flex items-center justify-between mt-4 px-2 pt-4 border-t border-border/50",children:[i.jsxs("p",{className:"text-xs text-muted-foreground",children:["Showing ",(d-1)*b+1," to ",Math.min(d*b,k.length)," of ",k.length," sources"]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(ke,{variant:"outline",size:"sm",onClick:()=>x(u=>Math.max(1,u-1)),disabled:d===1,className:"h-8",children:"Previous"}),i.jsx("div",{className:"flex items-center gap-1",children:i.jsxs("span",{className:"text-xs font-medium px-2",children:["Page ",d," of ",T]})}),i.jsx(ke,{variant:"outline",size:"sm",onClick:()=>x(u=>Math.min(T,u+1)),disabled:d===T,className:"h-8",children:"Next"})]})]})]})]})]})]}):i.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:i.jsxs("div",{className:"text-center space-y-4",children:[i.jsx(Ot,{className:"h-16 w-16 text-destructive/40 mx-auto"}),i.jsx("h1",{className:"font-display text-2xl font-bold",children:"Access denied"}),i.jsx("p",{className:"text-muted-foreground",children:"Administrators only."}),i.jsx(ct,{to:"/",children:i.jsx(ke,{variant:"outline",children:"Go back"})})]})}):i.jsx(ot,{to:"/auth",replace:!0})};export{an 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.