1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[82828],{1953:(e,t,a)=>{a.d(t,{P:()=>h});var r=a(12115),n=a(52393),l=a(74797),s=a(38881),i=a(84020),o=a(55572),c=a(85224);function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)({}).hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(null,arguments)}var u={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},h=(0,r.forwardRef)(function(e,t){var a,h=(0,c.e)(e.categoricalChartProps,u),{chartName:m,defaultTooltipEventType:x,validateTooltipEventTypes:g,tooltipPayloadSearcher:v,categoricalChartProps:p}=e;return r.createElement(n.J,{preloadedState:{options:{chartName:m,defaultTooltipEventType:x,validateTooltipEventTypes:g,tooltipPayloadSearcher:v,eventEmitter:void 0}},reduxStoreName:null!=(a=p.id)?a:m},r.createElement(l.TK,{chartData:p.data}),r.createElement(s.s,{layout:h.layout,margin:h.margin}),r.createElement(i.p,{baseValue:h.baseValue,accessibilityLayer:h.accessibilityLayer,barCategoryGap:h.barCategoryGap,maxBarSize:h.maxBarSize,stackOffset:h.stackOffset,barGap:h.barGap,barSize:h.barSize,syncId:h.syncId,syncMethod:h.syncMethod,className:h.className,reverseStackOrder:h.reverseStackOrder}),r.createElement(o.L,d({},h,{ref:t})))})},29552:(e,t,a)=>{a.d(t,{Q:()=>o,l:()=>i});var r=a(12115),n=a(81024),l=a(210),s=a(70806);function i(e,t){var a,r,s=(0,n.G)(t=>(0,l.Rl)(t,e)),i=(0,n.G)(e=>(0,l.sf)(e,t)),o=null!=(a=null==s?void 0:s.allowDataOverflow)?a:l.PU.allowDataOverflow,c=null!=(r=null==i?void 0:i.allowDataOverflow)?r:l.cd.allowDataOverflow;return{needClip:o||c,needClipX:o,needClipY:c}}function o(e){var{xAxisId:t,yAxisId:a,clipPathId:n}=e,l=(0,s.oM)(),{needClipX:o,needClipY:c,needClip:d}=i(t,a);if(!d||!l)return null;var{x:u,y:h,width:m,height:x}=l;return r.createElement("clipPath",{id:"clipPath-".concat(n)},r.createElement("rect",{x:o?u:u-m/2,y:c?h:h-x/2,width:o?m:2*m,height:c?x:2*x}))}},70265:(e,t,a)=>{a.r(t),a.d(t,{default:()=>f});var r=a(95155),n=a(12115),l=a(18955),s=a(26265),i=a(80019),o=a(57095),c=a(33420),d=a(35299),u=a(1524),h=a(26921),m=a(7125),x=a(24033),g=a(22042),v=a(84431),p=a(39690);function f(e){var t,a,f,y,b;let{domain:w,currentAnalysisId:k,onSelectAnalysis:N}=e,j=(0,l.c)("sitemapAnalysis"),[S,O]=(0,n.useState)(null),[A,C]=(0,n.useState)(!0),[D,E]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{!async function(){try{let e=await fetch("/api/tools/geo/sitemap/history?domain=".concat(encodeURIComponent(w),"&limit=20"),{credentials:"include"}),t=await e.json();t.success&&O(t)}catch(e){}finally{C(!1)}}()},[w]),A)return(0,r.jsx)("div",{className:"bg-white dark:bg-[#1a2332] border border-white/10 rounded-2xl p-6",children:(0,r.jsx)(d.A,{className:"h-5 w-5 animate-spin text-brand-primary mx-auto"})});if((!S||S.analyses.length<2)&&(null!=(t=null==S?void 0:S.analyses.filter(e=>null!==e.avgOverallScore).length)?t:0)<2)return(0,r.jsx)("div",{className:"bg-white dark:bg-[#1a2332] border border-white/10 rounded-2xl p-4",children:(0,r.jsx)("p",{className:"text-sm text-gray-400 dark:text-white/40 text-center",children:j("trend.noHistory")})});let G=(null!=(a=null==S?void 0:S.analyses)?a:[]).filter(e=>null!==e.avgOverallScore).reverse().map(e=>{var t,a,r,n;return{date:new Date(e.completedAt||e.createdAt).toLocaleDateString("en-GB",{day:"numeric",month:"short"}),score:Math.round(e.avgOverallScore),contentQuality:Math.round(null!=(t=e.avgContentQualityScore)?t:0),aiReadiness:Math.round(null!=(a=e.avgAiReadinessScore)?a:0),technicalBasis:Math.round(null!=(r=e.avgTechnicalBasisScore)?r:0),authorityTrust:Math.round(null!=(n=e.avgAuthorityTrustScore)?n:0),id:e.id,label:"".concat(new Date(e.completedAt||e.createdAt).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"})," â Score: ").concat(Math.round(e.avgOverallScore)," (").concat(e.pagesCompleted," pages)")}}),M=(null!=(f=null==S?void 0:S.analyses)?f:[]).filter(e=>e.id!==k&&null!==e.avgOverallScore),B=null!=(y=null==S?void 0:S.trend)?y:"stable",z=null!=(b=null==S?void 0:S.totalChange)?b:0,F="improving"===B?u.A:"declining"===B?h.A:m.A,L="improving"===B?"text-semantic-success":"declining"===B?"text-semantic-error":"text-gray-400 dark:text-white/40";return(0,r.jsxs)("div",{className:"bg-white dark:bg-[#1a2332] border border-white/10 rounded-2xl p-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-gray-500 dark:text-white/60",children:j("trend.title")}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full ".concat("improving"===B?"bg-semantic-success/10":"declining"===B?"bg-semantic-error/10":"bg-white/5"),children:[(0,r.jsx)(F,{className:"h-3.5 w-3.5 ".concat(L)}),(0,r.jsxs)("span",{className:"text-xs font-medium ".concat(L),children:[j("trend.".concat(B)),0!==z&&(0,r.jsxs)(r.Fragment,{children:[" ",z>0?"+":"",Math.round(10*z)/10]})]})]})]}),G.length>=2&&(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsx)(s.u,{width:"100%",height:100,children:(0,r.jsxs)(i.b,{data:G,children:[p.s2.map(e=>(0,r.jsx)(o.N1,{type:"monotone",dataKey:e,stroke:v.GA[e].chartColor,strokeWidth:1,strokeOpacity:.4,dot:!1,activeDot:!1},e)),(0,r.jsx)(o.N1,{type:"monotone",dataKey:"score",stroke:"#5B9FED",strokeWidth:2,dot:{r:3,fill:"#5B9FED",strokeWidth:0},activeDot:{r:5,fill:"#5B9FED",strokeWidth:2,stroke:"#fff"}}),(0,r.jsx)(c.m,{contentStyle:{background:"#0F1629",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"8px",fontSize:"11px",color:"#fff",padding:"8px 10px"},labelStyle:{display:"none"},formatter:(e,t)=>["".concat(e),{score:"Overall",contentQuality:"Content",aiReadiness:"AI",technicalBasis:"Tech",authorityTrust:"Authority"}[t]||t]})]})})}),M.length>0&&N&&(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("button",{onClick:()=>E(!D),className:"w-full flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-[#0F1629] border border-white/10 rounded-lg text-sm text-gray-500 dark:text-white/60 hover:text-gray-900 dark:text-white hover:border-white/20 transition-colors",children:[(0,r.jsx)("span",{children:j("trend.selectToCompare")}),(0,r.jsx)(x.A,{className:"h-4 w-4 transition-transform ".concat(D?"rotate-180":"")})]}),D&&(0,r.jsx)("div",{className:"absolute z-10 mt-1 w-full bg-gray-50 dark:bg-[#0F1629] border border-white/10 rounded-lg shadow-xl max-h-48 overflow-y-auto",children:M.map(e=>(0,r.jsxs)("button",{onClick:()=>{N(e.id),E(!1)},className:"w-full px-3 py-2 text-left text-sm hover:bg-white/5 transition-colors flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-gray-600 dark:text-white/70",children:new Date(e.completedAt||e.createdAt).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"})}),(0,r.jsxs)("span",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"font-medium ".concat((0,g.YH)(e.avgOverallScore)),children:null!==e.avgOverallScore?Math.round(e.avgOverallScore):"â"}),(0,r.jsxs)("span",{className:"text-gray-300 dark:text-white/30 text-xs",children:[e.pagesCompleted,"p"]})]})]},e.id))})]})]})}},88431:(e,t,a)=>{a.d(t,{x:()=>n});var r=a(4264);function n(e){var t=(0,r.ic)(e);if(null!=t){var{r:a,strokeWidth:n}=t,l=Number(a),s=Number(n);return(Number.isNaN(l)||l<0)&&(l=3),(Number.isNaN(s)||s<0)&&(s=2),{r:l,strokeWidth:s}}return{r:3,strokeWidth:2}}}}]);
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.