PageSourceSearch

https://app.serprecon.com/_next/static/chunks/7203-d5c5b92cae6ce48f.js

js serprecon.com collected 2026-09-24 11:55:35 UTC 56,391 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7203],{54013:function(e,t,r){"use strict";var n=r(85893);r(67294);var l=r(41664),a=r.n(l),s=r(25432);t.Z=e=>{let{disableAos:t,aosType:r,aosOffset:l,children:o,hasOnClick:i,variant:c,onClick:d,disabled:u,type:p,href:h,opensInNewTab:x,fullWidth:m,style:g,color:v,capitalize:f}=e;return i?(0,n.jsx)("button",{"data-aos":t?null:r,"data-aos-offset":t?null:l,onClick:d,className:"".concat(s.button," ").concat(m?s.block:null," ").concat(v||null," ").concat(s[c]," ").concat(f&&s.capitalize),disabled:u,type:p,children:o}):(0,n.jsx)(a(),{"data-aos":t?null:r,"data-aos-offset":t?null:l,href:h,target:x?"_blank":null,className:"".concat(s.button," ").concat(m?s.block:null," ").concat(v&&s.color," ").concat("link"===g&&s.link," ").concat("outline"===g&&s.outline," ").concat(s[c]," ").concat(s[v]," ").concat(s[g],"  ").concat(f&&s.capitalize),children:o})}},48975:function(e,t,r){"use strict";var n=r(85893),l=r(25675),a=r.n(l),s=r(77688),o=r.n(s);t.Z=e=>{let{src:t,alt:r,cover:l,priority:s=null}=e;return(0,n.jsx)("span",{className:o().imgContainer,children:(0,n.jsx)(a(),{fill:!0,className:"".concat(o().img," ").concat(l?o().cover:""),src:t,alt:r,priority:s||null})})}},54327:function(e,t,r){"use strict";var n=r(85893),l=r(67294),a=r(7269);t.Z=e=>{let{id:t,label:r,type:s,name:o,value:i,variant:c,handleChange:d,placeholder:u,required:p,isTextarea:h,textAreaResize:x,hasMarginTop:m,noMarginBottom:g,inline:v,pattern:f,enforcePattern:j,maxLength:b,min:y,max:_,disabled:N,size:w,rows:k,onBlur:C=()=>null}=e,[S,P]=(0,l.useState)(i),[B,A]=(0,l.useState)(!1),R="password"===s,T=R&&B?"text":s;(0,l.useMemo)(()=>{P(i)},[i]);let handleUpdate=e=>{let t=f?RegExp(f):RegExp(".*");j?j&&t.test(e.target.value)&&(P(e.target.value),d(e.target.value,e.target.id,e.target.files)):(P(e.target.value),d(e.target.value,e.target.id,e.target.files))};return(0,n.jsx)("div",{className:"".concat(a.form_group," ").concat(m?a.hasMarginTop:null," ").concat(v?a.inline:null," ").concat("small"===w?a.small:null),children:h?(0,n.jsxs)("div",{children:[""!==r&&(0,n.jsx)("label",{htmlFor:t,children:(0,n.jsx)("b",{children:r})}),(0,n.jsx)("textarea",{id:t,className:"".concat(a.input," ").concat(g?a.noMarginBottom:null," ").concat(c?a[c]:null," ").concat(v?a.inline:null,"  ").concat(x?a["".concat(x,"TextAreaResize")]:""),disabled:N,name:o,value:S,placeholder:u,type:s,required:p||null,onChange:handleUpdate,onBlur:C,rows:null!=k?k:"5",maxLength:b})]}):(0,n.jsxs)("div",{children:[""!==r&&(0,n.jsx)("label",{htmlFor:t,children:(0,n.jsx)("b",{children:r})}),(0,n.jsxs)("div",{className:R?a.passwordContainer:"",children:[(0,n.jsx)("input",{id:t,className:"".concat(a.input," ").concat(g?a.noMarginBottom:null," ").concat(c?a[c]:null," ").concat(v?a.inline:null," ").concat(R?a.passwordInput
1:""),disabled:N,name:o,value:S,placeholder:u,type:T,pattern:f,required:p||null,onChange:handleUpdate,onBlur:C,autoComplete:"email"===t||"password"===t?"off":"on",min:y,max:_}),R&&(0,n.jsx)("button",{type:"button",className:a.passwordToggle,onClick:()=>A(!B),"aria-label":B?"Hide password":"Show password",children:B?(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12c1.292 2.942 4.402 5 8.066 5 1.297 0 2.522-.236 3.654-.643m2.155-1.647c1.04-.926 1.849-2.087 2.262-3.71a10.477 10.477 0 0 0-2.155-3.71M6.72 6.72l10.56 10.56m-10.56 0L12 12m0 0l4.72-4.72M12 12v.01",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M1 1l22 22",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}):(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M12 4.5C7.305 4.5 3.346 7.857 2 12.5c1.346 4.643 5.305 8 10 8s8.654-3.357 10-8c-1.346-4.643-5.305-8-10-8z",stroke:"currentColor",strokeWidth:"1.5"}),(0,n.jsx)("circle",{cx:"12",cy:"12.5",r:"3",stroke:"currentColor",strokeWidth:"1.5"})]})})]})]})})}},61683:function(e,t,r){"use strict";r(85893),r(67294),r(73935),r(67814)},67313:function(e,t,r){"use strict";var n=r(85893),l=r(67294),a=r(82241);r(17013);var s=r(43897);t.Z=e=>{let{handleChange:t=()=>null,onCreateOption:r=()=>null,options:o=[],label:i,name:c,id:d,placeholder:u,defaultValue:p,required:h,disabled:x,value:m,hasMarginTop:g,capitalize:v,isSmall:f}=e,j=(0,l.useMemo)(()=>{let e=null==o?void 0:o.map((e,t)=>{let r=e;return null==r?null:r="object"==typeof r&&void 0!==r.value&&void 0!==r.label?{value:String(r.value),label:String(r.label)}:{value:String(r),label:String(r)}}).filter(e=>null!==e);return e},[o]),b=(0,l.useMemo)(()=>null==p?null:"object"==typeof p&&null!==p&&(p.value||""===p.value)?{value:String(p.value),label:String(p.label)}:{value:String(p),label:String(p)},[p]),y=(0,l.useMemo)(()=>null==m||""===m?null:"object"==typeof m&&null!==m&&(m.value||""===m.value)?{value:String(m.value),label:String(m.label)}:{value:String(m),label:String(m)},[m]);return(0,n.jsxs)("div",{className:"".concat(s.form_group," ").concat(g?s.hasMarginTop:null),children:[i&&(0,n.jsx)("label",{className:s.label,htmlFor:d,children:i}),(0,n.jsx)(a.Z,{className:" ".concat(v&&s.capitalize," ").concat(f&&s.isSmall),name:c,id:d,isDisabled:x,required:h,value:y,onChange:e=>{t(e?e.value:null,d)},onCreateOption:e=>{r(e)},options:j,classNamePrefix:"react-select",defaultValue:b,styles:{control:e=>({...e,border:"1px solid var(--color-serp-dark-gray)",boxShadow:"none","&:hover":{border:"1px solid var(--color-serp-green)"},minHeight:"58px",padding:"1rem 0.5rem 1rem 1rem",fontSize:"1rem",color:"var(--color-serp-dark-gray"}),menu:e=>({...e,zIndex:9999}),option:(e,t)=>({...e,backgroundColor:t.isFocused?"#F3F4F6":"white",color:"var(--color-dark)",cursor:"pointer","&:active":{backgroundColor:"var(--color-serp-dark-gray)"}}),placeholder:e=>({...e,color:"var(--color-serp-dark-gray-90)",fontWeight:500,fontSize:"1rem"}),input:e=>({...e,lineHeight:"24px",color:"var(--color-serp-dark-gray",fontSize:"1rem",padding:"0",margin:"0"})},placeholder:u})]})}},75438:function(e,t,r){"use strict";r.d(t,{Z:function(){return Seo}});var n=r(85893),l=r(9008),a=r.n(l);function Seo(e){let{seo:t}=e;return(0,n.jsxs)(a(),{children:[(0,n.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"}),(0,n.jsx)("meta",{httpEquiv:"Content-Language",content:"en-us"}),(0,n.jsx)("meta",{name:"facebook-domain-verification",content:""}),(0,n.jsx)("meta",{name:"robots",content:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"}),(0,n.jsx)("title",{children:(null==t?void 0:t.pageTitle)||"SERPrecon"}),(0,n.jsx)("meta",{name:"description",content:null==t?void 0:t.description})]})}},17151:function(e,t,r){"use strict";r.d(t,{Z:function(){return features_AddButton}});var n=r(85893),l=r(93200),a=r(45837),s=r(50051),o=r(40352),i=r(66294),c=r(67814),d=r(73582),u=r(68779),p=r(19870),h=r(35417),x=r(96092),m=r(11163);r(41664);var ModalContent_SOVReportCreateLimitReachedModal=e=>{let{}=e,t=(0,m.useRouter)(),{resetModalState:r}=(0,l.v)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.$N,{className:"p-4  border-b-1 border-b-serp-mid-gray",children:"You Have Hit Your Monthly Share of Voice Report Limit"}),(0,n.jsx)("div",{className:"px-6 py-4 flex flex-col gap-4",children:(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{role:"button",className:"text-serp-green font-semibold underline cursor-pointer",onClick:()=>{r(),t.push("/account/plan/")},children:"Upgrade"})," ","now to increase your limit."," "]})}),(0,n.jsx)("div",{className:"w-full flex flex-row justify-end gap-4 py-3 px-4 border-t-1 border-t-serp-mid-gray",children:(0,n.jsx)(p.Z,{hasOnClick:!0,variant:"cancel",onClick:r,type:"button",children:"Cancel"})})]})};function IconButton(e){var t,r;let{content:s}=e,{openModal:o}=(0,l.v)(),{user:i}=(0,a.S)();return(null==i?void 0:null===(t=i.subscription)||void 0===t?void 0:t.status)==="canceled"||(null==i?void 0:null===(r=i.subscription)||void 0===r?void 0:r.status)==="past_due"?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)(c.G,{icon:d.CPW,className:"text-serp-bright-green iconSm p-1.5 border-1 border-serp-bright-green/42 bg-serp-bright-green/5 rounded-md cursor-pointer",role:"button",tabIndex:0,onClick:()=>o({content:s})})}function RealButton(e){var t,r;let{content:s,buttonVariant:o}=e,{openModal:i}=(0,l.v)(),{user:c}=(0,a.S)();return(null==c?void 0:null===(t=c.subscription)||void 0===t?void 0:t.status)==="canceled"||(null==c?void 0:null===(r=c.subscription)||void 0===r?void 0:r.status)==="past_due"?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)(p.Z,{hasOnClick:!0,onClick:()=>i({content:s}),variant:o,children:"Add a Project"})}function MenuItemButton(e){var t,r;let{content:s}=e,{openModal:o}=(0,l.v)(),{user:i}=(0,a.S)();return(null==i?void 0:null===(t=i.subscription)||void 0===t?void 0:t.status)==="canceled"||(null==i?void 0:null===(r=i.subscription)||void 0===r?void 0:r.status)==="past_due"?(0,n.jsx)(n.Fragment,{}):(0,n.jsxs)("div",{onClick:()=>o({content:s}),className:"px-6 py-4 hover:bg-serp-light-gray cursor-pointer",children:[(0,n.jsx)(c.G,{icon:u.r8p,className:"pr-4"}),"Create New"]})}var features_AddButton=function(e){let{type:t,project:r,projects:l=[],buttonType:c="button",buttonVariant:d}=e,{user:u}=(0,a.S)(),p=null==u?void 0:u.Plan,x=l.length>=(null==p?void 0:p.projects_limit),m=(null==u?void 0:u.sov_reports_used)>=(null==p?void 0:p.sov_monthly_limit),g=(0,n.jsx)(n.Fragment,{});"project"===t&&x?g=(0,n.jsx)(s.Z,{}):"project"===t&&(g=(0,n.jsx)(o.Z,{redirect:!0})),"report"===t&&(g=(0,n.jsx)(i.Z,{project:r})),"SOV"===t&&m?g=(0,n.jsx)(ModalContent_SOVReportCreateLimitReachedModal,{}):"SOV"===t&&(g=(0,n.jsx)(h.Z,{project:r}));let v="button"===c?(0,n.jsx)(RealButton,{content:g,buttonVariant:d}):"menu"===c?(0,n.jsx)(MenuItemButton,{content:g}):(0,n.jsx)(IconButton,{content:g});return"project"===t?(null==u?void 0:u.id)?v:(0,n.jsx)(n.Fragment,{}):"report"===t||"SOV"===t?v:void 0}},89002:function(e,t,r){"use strict";var n=r(85893),l=r(41664),a=r.n(l),s=r(67814),o=r(68779),i=r(17013);t.Z=e=>
1{let{project:t,report:r,sovReport:l}=e,c=[{name:"Projects",href:"/"}];return t&&c.push({name:null==t?void 0:t.name,href:"/project/".concat((0,i.slugify)(null==t?void 0:t.name))}),r&&c.push({name:"SERP Report: ".concat(null==r?void 0:r.query),href:"/project/".concat((0,i.slugify)(null==t?void 0:t.name),"/report/").concat(null==r?void 0:r.id)}),l&&c.push({name:"Share of Voice: ".concat(null==l?void 0:l.name),href:"/project/".concat((0,i.slugify)(null==t?void 0:t.name),"/share-of-voice/").concat(null==l?void 0:l.id)}),(0,n.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex items-center pb-4",children:(0,n.jsx)("ol",{role:"list",className:"flex items-center",children:c.map((e,t)=>{let r=t===c.length-1;return(0,n.jsx)("li",{children:(0,n.jsxs)("div",{className:"flex items-center",children:[0!==t&&(0,n.jsx)(s.G,{icon:o._tD,"aria-hidden":"true",className:"text-serp-dark-gray fa-xs px-3"}),r?(0,n.jsx)("span",{className:"text-sm text-serp-dark-gray font-medium",children:e.name}):(0,n.jsx)(a(),{href:e.href,children:(0,n.jsx)("span",{className:"text-sm !text-serp-dark-gray hover:underline cursor-pointer",children:e.name})})]})},t)})})})}},16058:function(e,t,r){"use strict";r.d(t,{Z:function(){return DropdownMenus_ProjectEllipseMenu}});var n=r(85893),l=r(10485),a=r(67814),s=r(73582),o=r(68779),i=r(93200),c=r(37359),d=r(67294),u=r(77768),p=r(16333),h=r(17013),x=r(46406),m=r(32080),g=r(45837),v=r(66926),f=r(11163),j=r(19870),b=r(66683),y=r(88111),_=r(67313);let N=(0,x.d)({authMode:"userPool"});var ModalContent_ProjectEditModal=e=>{let{project:t}=e,{resetModalState:r}=(0,i.v)(),{getCurrentUser:l,updateCurrentUser:a,user:s}=(0,g.S)(),{addToast:o}=(0,v.a)(),c=(0,f.useRouter)(),[x,w]=(0,d.useState)(!1),[k,C]=(0,d.useState)(null),[S,P]=(0,d.useState)(""),{formData:B,handleChange:A,setAllValues:R,resetForm:T}=(0,p.Z)({name:(null==t?void 0:t.name)||"",brand:(null==t?void 0:t.brand)||"",is_archived:(null==t?void 0:t.is_archived)||!1}),handleEditProject=async e=>{e.preventDefault(),w(!0);let n=null==t?void 0:t.name;
1try{let e={id:t.id,name:B.name||t.name,brand:B.brand||t.brand,is_archived:B.is_archived},i=await N.graphql({query:m.ty,variables:{input:e}});if(null==s.brands||s.brands&&!s.brands.includes(B.brand))try{let e=null===s.brands?[]:s.brands,t=[...e,B.brand];await a({id:s.id,brands:t})}catch(e){return console.log("error updating user",e),!1}o("Your project changes have been saved!","success"),localStorage.removeItem("sr_project"),l(),localStorage.setItem("sr_project",i.data.updateProject.id),B.name&&(0,h.slugify)(B.name)!==(0,h.slugify)(n)&&c.replace("/project/".concat((0,h.slugify)(B.name))),r()}catch(e){console.log("error updating project",e),o("There was an issue saving your project. Please try again.","error")}w(!1)},handleAddBrand=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;w(!0);let r=s.brands?s.brands:[],n=[...r,(0,h.capitalizeFirstCharacter)(e)],l=await a({id:s.id,brands:n});l?(o("".concat(e," has been added to your list of tags"),"success"),t&&t()):o("There was an issue adding your new tag. Please refresh and try again.","error"),w(!1)};return(0,n.jsxs)("div",{className:"p-6",children:[(0,n.jsx)("h2",{className:"text-xl font-bold mb-4 text-serp-dark",children:"Edit Project"}),(0,n.jsxs)("form",{onSubmit:handleEditProject,children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("label",{className:"mb-1 block font-medium text-serp-dark",children:"Project Name:*"}),(0,n.jsx)(b.Z,{id:"name",name:"name",type:"text",value:B.name,placeholder:"Project Name",className:"block w-full rounded-md bg-literally-white px-3 py-1.5 text-base text-serp-gray outline-1 -outline-offset-1 outline-serp-gray placeholder:text-serp-dark focus:outline-2 focus:-outline-offset-2 focus:serp-gray sm:text-sm/6",handleChange:(e,t)=>
1{"name"===t&&(e.includes("/")||e.includes("&")||e.includes("?")||e.includes("http")||e.includes(":")?C("Project names shouldn't include '/', '&', '?', ':', or 'http' characters"):C(null),A(e,t),P(""))}}),k&&(0,n.jsx)("span",{className:"error",children:k})]}),(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("label",{className:"mb-1 block font-medium text-serp-dark",children:"Tag:"}),(0,n.jsx)(_.Z,{handleChange:A,onCreateOption:e=>{handleAddBrand(e,()=>A(e,"brand"))},options:((null==s?void 0:s.brands)||[]).map(e=>({label:e,value:e})),value:B.brand,id:"brand",name:"brand",placeholder:"Select or create a tag...",styles:{control:e=>({...e,border:"1px solid var(--color-serp-dark-gray)",boxShadow:"none","&:hover":{border:"1px solid var(--color-serp-green)"},minHeight:"58px",padding:"0.5rem"}),menu:e=>({...e,zIndex:9999}),option:(e,t)=>({...e,backgroundColor:t.isFocused?"#F3F4F6":"white",color:"var(--color-dark)",cursor:"pointer","&:active":{backgroundColor:"var(--color-serp-dark-gray)"}}),placeholder:e=>({...e,color:"var(--color-serp-dark)"}),input:e=>({...e,color:"var(--color-serp-dark)"})}})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between mb-8",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-0.5 pr-6",children:[(0,n.jsx)("label",{className:"text-base font-bold text-serp-dark",children:"Archived Project"}),(0,n.jsx)("h4",{className:"text-base text-serp-dark",children:"Archive this project to keep your project list organized. This project can still be found using filters."})]}),(0,n.jsxs)(u.rs,{checked:B.is_archived,onChange:e=>A(e,"is_archived"),className:"group relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent bg-serp-dark-gray transition-colors duration-200 ease-in-out focus:ring-2 focus:ring-serp-green focus:ring-offset-2 focus:outline-hidden data-checked:bg-serp-green",children:[(0,n.jsx)("span",{className:"sr-only",children:"Use setting"}),(0,n.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none inline-block size-5 transform rounded-full bg-white shadow-sm ring-0 transition duration-200 ease-in-out group-data-checked:translate-x-5"})]})]}),S&&(0,n.jsx)(y.Z,{variant:"error",element:"small",children:S}),(0,n.jsxs)("div",{className:"w-full flex flex-row gap-4 mb-4",children:[(0,n.jsx)(j.Z,{hasOnClick:!0,variant:"cancel",type:"button",onClick:r,widthFull:!0,disabled:x,children:"Cancel"}),(0,n.jsx)(j.Z,{hasOnClick:!0,type:"submit",widthFull:!0,disabled:x,children:"Save"})]})]})]})},w=r(96092);let k=(0,x.d)({authMode:"userPool"});var ModalContent_ProjectDeleteModal=e=>{let{project:t}=e,{resetModalState:r}=(0,i.v)(),{getCurrentUser:l}=(0,g.S)(),s=(0,f.useRouter)(),[c,u]=(0,d.useState)(""),[h,x]=(0,d.useState)(!1),{formData:v,handleChange:y,setAllValues:_,resetForm:N}=(0,p.Z)({deleteProjectName:""}),handleFormSubmit=async e=>{if(e.preventDefault(),x(!0),u(""),v.deleteProjectName!==(null==t?void 0:t.name)){u("The project name does not match. Please try again."),x(!1);return}try{await k.graphql({query:m.th,variables:{input:{id:t.id}}}),await l(),s.push("/"),r()}catch(e){console.log("error removing project",e),u("Failed to delete project. Please try again.")}finally{x(!1)}};return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("form",{onSubmit:handleFormSubmit,className:"sm:my-4 w-full p-6 data-closed:sm:translate-y-0 data-closed:sm:scale-95",children:[(0,n.jsxs)("div",{className:"sm:flex sm:items-start",children:[(0,n.jsx)("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-serp-red/10 sm:mx-0 sm:size-10",children:(0,n.jsx)(a.G,{className:"text-serp-red",icon:o.ik8})}),(0,n.jsxs)("div",{className:"mt-6 sm:mt-0 sm:ml-4 text-left",children:[(0,n.jsx)(w.$N,{as:"h3",className:"text-xl font-bold text-serp-dark",children:"Delete Project"}),(0,n.jsx)("div",{className:"mt-2 mb-4",children:(0,n.jsxs)("p",{className:"text-base font-regular text-serp-dark",children:["Are you sure you want to delete\xa0",(0,n.jsx)("span",{className:"font-bold",children:t.name}),"? This project and all reports will be deleted. This process cannot be undone. In order to delete this project, please provide the name of the project:"]})}),(0,n.jsx)(b.Z,{id:"deleteProjectName",name:"deleteProjectName",type:"text",value:v.deleteProjectName,placeholder:"Type project name here",className:"block w-full rounded-md bg-literally-white px-4 py-1.5 text-base text-serp-dark outline-1 -outline-offset-1 outline-serp-dark placeholder:text-serp-dark focus:outline-2 focus:-outline-offset-2 focus:outline-serp-dark sm:text-sm/6",handleChange:(e,t)=>
1{y(e,t),u("")},required:!0}),""!==c&&(0,n.jsx)("p",{className:"text-sm font-regular text-serp-red mt-2",children:c})]})]}),(0,n.jsxs)("div",{className:"flex flex-row gap-4 mt-8 justify-end",children:[(0,n.jsx)(j.Z,{hasOnClick:!0,variant:"cancel",type:"button",onClick:r,disabled:h,children:"Cancel"}),(0,n.jsx)(j.Z,{hasOnClick:!0,variant:"red",type:"submit",disabled:h,children:"Delete"})]})]})})};let C=[{format:"csv",label:"Export as CSV"},{format:"json",label:"Export as JSON"},{format:"md",label:"Export as Markdown"}];var ModalContent_ExportAllActionPlansModal=e=>{let{plans:t,projectName:r}=e,{resetModalState:l}=(0,i.v)(),handleExport=async e=>{await (0,c.LP)(t,e,r),l()};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w.$N,{className:"text-xl font-bold p-4 border-b-1 border-b-serp-mid-gray",children:"Export All Action Items"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"p-4 border-b-1 border-b-serp-mid-gray",children:(0,n.jsxs)("p",{children:["Download a zip with the action plans of"," ",1===t.length?"1 report":"".concat(t.length," reports")," ","in ",r,"."]})}),(0,n.jsx)("div",{className:"flex flex-col gap-3 p-4 border-b-1 border-b-serp-mid-gray",children:C.map(e=>{let{format:t,label:r}=e;return(0,n.jsxs)("button",{onClick:()=>handleExport(t),className:"flex flex-row items-center gap-3 w-full px-4 py-3 text-left text-base border-1 border-serp-mid-gray rounded-sm cursor-pointer hover:bg-serp-light-gray",children:[(0,n.jsx)(a.G,{icon:s.q7m}),(0,n.jsx)("span",{children:r})]},t)})}),(0,n.jsx)("div",{className:"flex justify-end p-4",children:(0,n.jsx)(j.Z,{type:"button",hasOnClick:!0,variant:"cancel",onClick:l,children:"Cancel"})})]})]})},DropdownMenus_ProjectEllipseMenu=e=>{var t,r;let{isActive:d,onFavorite:u,project:p}=e,{openModal:h}=(0,i.v)(),x=(0,c.kB)(null!==(r=null==p?void 0:null===(t=p.Reports)||void 0===t?void 0:t.items)&&void 0!==r?r:[]);return(0,n.jsxs)("div",{children:[(0,n.jsx)(l.sN,{children:(0,n.jsxs)("button",{onClick:u,className:"block w-full text-left px-6 py-3 data-focus:bg-serp-light-gray",children:[(0,n.jsx)("span",{children:(0,n.jsx)(a.G,{className:"pr-4 ".concat(d?"text-serp-yellow":"text-serp-gray"),icon:d?s.Tab:o.Tab})}),(0,n.jsx)("span",{className:"text-base text-serp-gray",children:"Favorite"})]})}),(0,n.jsx)(l.sN,{children:(0,n.jsxs)("button",{onClick:()=>{h({content:(0,n.jsx)(ModalContent_ProjectEditModal,{project:p})})},className:"block w-full text-left px-6 py-3 text-base hover:bg-serp-light-gray",children:[(0,n.jsx)("span",{className:"pr-4",children:(0,n.jsx)(a.G,{icon:s.IwR})}),(0,n.jsx)("span",{children:"Edit"})]})}),x.length>0&&(0,n.jsx)(l.sN,{children:(0,n.jsxs)("button",{onClick:()=>{h({content:(0,n.jsx)(ModalContent_ExportAllActionPlansModal,{plans:x,projectName:p.name})})},className:"block w-full text-left px-6 py-3 text-base hover:bg-serp-light-gray",children:[(0,n.jsx)("span",{className:"pr-4",children:(0,n.jsx)(a.G,{icon:s.q7m})}),(0,n.jsx)("span",{children:"Export All Action Items"})]})}),(0,n.jsx)(l.sN,{children:(0,n.jsxs)("button",{onClick:()=>{h({content:(0,n.jsx)(ModalContent_ProjectDeleteModal,{project:p})})},className:"block w-full px-6 py-3 text-left text-base text-serp-red data-focus:bg-serp-light-gray data-focus:outline-hidden",children:[(0,n.jsx)("span",{className:"pr-4",children:(0,n.jsx)(a.G,{icon:s.XAH})}),(0,n.jsx)("span",{children:"Delete"})]})})]})}},55572:function(e,t,r){"use strict";r.d(t,{Z:function(){return Layout}});var n=r(85893),l=r(67294),a=r(46406),s=r(66926),o=r(86024),components_Banner=e=>{let{props:t}=e,{type:r,message:l}=t;return(0,n.jsx)("div",{className:"".concat(o.banner," ").concat(o[r]),children:(0,n.jsx)("p",{dangerouslySetInnerHTML:{__html:l}})})},i=r(75438),c=r(60732),d=r(38098),u=r(60889),p=r(41664),h=r.n(p),x=r(38221);r(18713),(0,a.d)({authMode:"userPool"});var m=r(45837);r(54013),r(88111);var g=r(67814);r(498),r(48975),r(54327),r(61683);var v=r(474),features_Footer=()=>(0,n.jsxs)("footer",{className:v.footer,children:["\xa9 2026 SERPrecon LLC. All rights reserved. Made by"," ",(0,n.jsx)("a",{href:"https://www.ryanmjones.com/",target:"_blank",children:"Ryan Jones"})," and ",(0,n.jsx)("a",{href:"https://moonello.com?utm_source=serprecon",target:"_blank",children:"Moonello"}),"."]});r(89002);var f=r(25675),j=r.n(f),b=r(11163),y=r(59417),_=r(68779),N=r(10485);r(72770);var DropdownMenus_ProfileEllipseMenu=e=>{var t;let{}=e,r=(0,b.useRouter)(),{user:l}=(0,m.S)(),a=!l||(null==l?void 0:null===(t=l.subscription)||void 0===t?void 0:t.status)==="trialing";return(0,n.jsxs)("div",{children:[(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>r.push("/account"),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"Profile"})}),(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>r.push("/account/plan"),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"Plan"})}),!a&&(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>r.push("/account/payment-methods"),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"Payment Methods"})}),!a&&(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>r.push("/account/invoices"),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"Invoices"})}),(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>r.push("/account/tags"),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"Tags"})}),(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>r.push("/refer-a-friend"),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"Refer a Friend"})}),(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>r.push("/get-support"),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"Get Support"})}),(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>r.push("/logout"),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"Logout"})})]})};r(16058);var w=r(17013),k=r(19870),C=r(86418);r(59085);var S={src:"/_next/static/media/serprecon-v2-logo.7a601e4e.svg",height:27,width:200,blurWidth:0,blurHeight:0},P=r(93200);r(66294),r(40352),r(50051);var B=r(17151),TopBarMenus_TopBarProjectsEllipseMenu=e=>{let{projects:t}=e,{openModal:r}=(0,P.v)(),a=(0,b.useRouter)();return(0,l.useEffect)(()=>{console.log("Projects: ",t)},[t]),(0,n.jsxs)("div",{className:"max-h-[50vh]",children:[(0,n.jsx)(N.sN,{children:(0,n.jsx)(B.Z,{type:"project",projects:t,buttonType:"menu"})},"add-project"),(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>
1a.push("/"),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"All Projects"})}),t&&t.map(e=>(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>a.push("/project/"+(0,w.slugify)(e.name)),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:e.name})},"project-".concat(e.id)))]})},TopBarSOVReportEllipseMenu=e=>{let{currentProject:t,sovReports:r}=e,{openModal:l}=(0,P.v)(),a=(0,b.useRouter)();return(0,n.jsxs)("div",{className:"max-h-[50vh]",children:[(0,n.jsx)(N.sN,{children:(0,n.jsx)(B.Z,{type:"SOV",project:t,buttonType:"menu"})},"new-sov-report"),(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>a.push({pathname:"/all-reports",query:{tab:"sov"}}),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"All SOV Reports"})}),r&&Object.keys(r).length>0?Object.entries(r).map(e=>{let[t,r]=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)(N.sN,{children:(0,n.jsx)("div",{className:"px-6 py-2 text-sm font-semibold text-gray-500 bg-gray-50",children:t})}),r.map(e=>(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>a.push("/project/".concat((0,w.slugify)(t),"/share-of-voice/").concat(e.id)),className:"block w-full text-left px-8 py-3 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:e.name})},"sov-report-".concat(e.id)))]},"project-".concat(t))}):(0,n.jsx)(N.sN,{children:(0,n.jsx)("span",{className:"block w-full text-left px-6 py-4 text-base cursor-pointer focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"No reports found"})},"no-sov-reports")]})},TopBarMenus_TopBarSERPReportEllipseMenu=e=>{let{currentProject:t,reports:r}=e,{openModal:a}=(0,P.v)(),s=(0,b.useRouter)();return(0,l.useEffect)(()=>{},[r]),(0,n.jsxs)("div",{className:"max-h-[50vh]",children:[(0,n.jsx)(N.sN,{children:(0,n.jsx)(B.Z,{type:"report",project:t,buttonType:"menu"})},"new-serp-report"),(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>s.push("/all-reports"),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"All SERP Reports"})}),r&&Object.keys(r).length>0?Object.entries(r).map(e=>{let[t,r]=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)(N.sN,{children:(0,n.jsx)("div",{className:"px-6 py-2 text-sm font-semibold text-gray-500 bg-gray-50",children:t})}),r.map(e=>(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>s.push("/project/".concat((0,w.slugify)(t),"/").concat(e.id)),className:"block w-full text-left px-8 py-3 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:e.query})},"report-".concat(e.id)))]},"project-".concat(t))}):(0,n.jsx)(N.sN,{children:(0,n.jsx)("span",{className:"block w-full text-left px-6 py-4 text-base cursor-pointer focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"No reports found"})},"no-reports")]})},TopBarMenus_TopBarToolsEllipseMenu=e=>{let{projects:t}=e,{openModal:r}=(0,P.v)(),a=(0,b.useRouter)();return(0,l.useEffect)(()=>{console.log("Projects: ",t)},[t]),(0,n.jsx)("div",{children:(0,n.jsx)(N.sN,{children:(0,n.jsx)("button",{onClick:()=>a.push("/tools"),className:"block w-full text-left px-6 py-4 text-base cursor-pointer hover:bg-serp-light-gray focus:bg-serp-light-gray active:bg-serp-light-gray focus:outline-hidden",children:"AI Overview Optimization Tool"})})})};function ProfileButton(e){let{subscription:t={},plan:r={},availableCredits:l=null,maxPlanCredits:a=null}=e,s=(0,b.useRouter)(),o=(null==t?void 0:t.status)||null,i=(null==r?void 0:r.name)||null;if(!o)return null;let c="past_due"===o&&(null==t?void 0:t.trial_end)===(null==t?void 0:t.current_period_start);if("active"!==o&&"trialing"!==o&&!c)return(0,n.jsx)(k.Z,{href:"/resubscribe",title:"Resubscribe to SERPrecon",icon:(0,n.jsx)(g.G,{icon:_.Atu,className:"iconSm"}),children:"Resubscribe"});
1if("trialing"===o){let e=new Date,r=(0,w.newDateFromStripeTimestamp)(t.trial_end),s=Math.ceil((r-e)/864e5),o=1===s?"":"s",i=null!=a?"".concat(l,"/").concat(a," credits"):"".concat(l," credits"),c="".concat(s," day").concat(o," and ").concat(i," remain in your trial");return(0,n.jsx)(k.Z,{href:"/start-subscription",title:c,icon:(0,n.jsx)(g.G,{icon:_.DH$,className:"iconSm"}),children:(0,n.jsxs)("span",{className:"flex flex-col items-start leading-tight",children:[(0,n.jsx)("span",{children:"Subscribe Now"}),(0,n.jsxs)("span",{className:"text-md font-normal",children:[s," day",o," and ",i," remain"]})]})})}return"active"===o&&l&&!i.includes("Agency")?(0,n.jsx)(k.Z,{href:"/account/plan/upgrade-downgrade",title:"Upgrade your plan",icon:(0,n.jsx)(g.G,{icon:_.XEr,className:"iconSm"}),children:"Upgrade Your Plan"}):"active"!==o||0!==l||i.includes("Agency")?c?"/trial-complete"===s.pathname?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)("div",{className:"flex flex-row gap-4 rounded-md bg-serp-dark items-center",children:(0,n.jsx)(k.Z,{href:"/trial-complete",title:"Subscribe",widthFull:!1,icon:(0,n.jsx)(g.G,{icon:_.XEr,className:"iconSm"}),children:"Your trial has ended. Subscribe here"})}):(0,n.jsx)(n.Fragment,{}):(0,n.jsx)(k.Z,{href:"/account/plan/upgrade-downgrade",title:"Upgrade your plan for more credits",icon:(0,n.jsx)(g.G,{icon:_.XEr,className:"iconSm"}),children:"Upgrade Your Plan"})}function TopbarNavigation_Profile(e){let{authUser:t,user:r,removeCounts:l=!1}=e,{firstName:a,lastName:s}=(0,w.splitName)(t.name);return(0,n.jsx)(C.Z,{anchor:"top end",noButtonBorder:!0,menuButton:(0,n.jsxs)("div",{className:"flex flex-row gap-2 items-center text-left",children:[(0,n.jsx)("div",{className:"flex flex-col justify-center items-center w-[32px] h-[32px] bg-serp-green rounded-full",children:(0,n.jsxs)("span",{children:[a[0],s?s[0]:""," "]})}),(0,n.jsx)("div",{className:"flex flex-col gap-2",children:(0,n.jsx)("span",{children:(0,n.jsx)(g.G,{icon:y.eW2,className:"iconSm"})})})]}),menuItems:(0,n.jsx)(DropdownMenus_ProfileEllipseMenu,{}),srText:"Open profile navigation"})}var features_TopbarNavigation=()=>{var e,t,r,l,a,s,o,i,c,d,u,p,v,f,N,k,P,B,A;let R=(0,b.useRouter)(),{user:T}=(0,m.S)(),{authUser:M}=(0,x.E)(),E="/get-started"===R.pathname,Z=((null==T?void 0:null===(e=T.Projects)||void 0===e?void 0:e.items)||[]).slice().sort((e,t)=>e.createdAt&&t.createdAt?new Date(t.createdAt)-new Date(e.createdAt):0),O=(null==R?void 0:null===(t=R.query)||void 0===t?void 0:t.project)||"",F=(null==R?void 0:null===(r=R.query)||void 0===r?void 0:r.report)||"",I=(null==R?void 0:null===(l=R.query)||void 0===l?void 0:l.sovReport)||"",q=Z.find(e=>(0,w.slugify)(e.name.toLowerCase())===O.toLowerCase()),D=(null==q?void 0:null===(a=q.Reports)||void 0===a?void 0:a.items.filter(e=>!e.is_running))||[],L=Z.reduce((e,t)=>{var r,n;let l=(null==t?void 0:null===(n=t.Reports)||void 0===n?void 0:null===(r=n.items)||void 0===r?void 0:r.filter(e=>!e.is_running))||[];return l.length>0&&(e[t.name]=l),e},{});D.find(e=>e.id===F);let z=(null==q?void 0:null===(s=q.SOVReports)||void 0===s?void 0:s.items.filter(e=>!e.is_running))||[];z.find(e=>e.id===I);let G=Z.reduce((e,t)=>{var r,n;let l=(null==t?void 0:null===(n=t.SOVReports)||void 0===n?void 0:null===(r=n.items)||void 0===r?void 0:r.filter(e=>!e.is_running))||[];return l.length>0&&(e[t.name]=l),e},{});return(0,n.jsxs)("div",{className:"flex flex-row px-8 py-[14px] gap-1.5 justify-between bg-serp-dark text-literally-white h-[76px] overflow-auto",children:[(0,n.jsxs)("div",{className:"flex flex-row flex-1 gap-5",children:[(0,n.jsx)("div",{className:"flex mr-2 bg-serp-dark justify-center items-center",children:(0,n.jsx)(h(),{href:"/",title:"SERPrecon",className:"",children:(0,n.jsx)(j(),{src:S,alt:"SERPrecon",className:"max-w-[116px]"})})}),!E&&!((null==T?void 0:null===(o=T.subscription)||void 0===o?void 0:o.status)==="past_due"&&(null==T?void 0:null===(i=T.subscription)||void 0===i?void 0:i.trial_end)===(null==T?void 0:null===(c=T.subscription)||void 0===c?void 0:c.current_period_start))&&(0,n.jsx)("div",{className:"flex flex-col gap-4 bg-serp-dark p-0 justify-center",children:(0,n.jsx)("div",{className:"",children:(0,n.jsx)(C.Z,{anchor:"top",noButtonBorder:!0,menuItems:(0,n.jsx)(TopBarMenus_TopBarProjectsEllipseMenu,{projects:Z}),srText:"Open project navigation",menuButton:(0,n.jsx)("div",{className:"flex flex-row gap-4 justify-between items-center",children:(0,n.jsxs)("div",{className:"px-2 flex flex-row gap-2",href:"/",children:[(0,n.jsx)("span",{className:"",children:(0,n.jsx)(g.G,{icon:_.vp0,className:"text-serp-bright-green pt-1 iconSm "})}),(0,n.jsx)("span",{className:"flex-1 text-literally-white",children:"Projects"}),(0,n.jsx)("span",{children:(0,n.jsx)(g.G,{icon:y.gc2,className:"text-[12px] text-white"})})]})})})})}),!E&&!((null==T?void 0:null===(d=T.subscription)||void 0===d?void 0:d.status)==="past_due"&&(null==T?void 0:null===(u=T.subscription)||void 0===u?void 0:u.trial_end)===(null==T?void 0:null===(p=T.subscription)||void 0===p?void 0:p.current_period_start))&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsx)(C.Z,{anchor:"top",noButtonBorder:!0,menuItems:(0,n.jsx)(TopBarMenus_TopBarSERPReportEllipseMenu,{reports:L,currentProject:q}),srText:"Open project navigation",menuButton:(0,n.jsx)("div",{className:"flex flex-col gap-2 bg-serp-dark p-0 justify-center",children:(0,n.jsx)("div",{className:"flex flex-row justify-between items-center",children:(0,n.jsxs)("div",{className:"px-2 flex flex-row gap-2 cursor-pointer items-center   ",role:"button",noIndex:0,children:[(0,n.jsx)("span",{className:"",children:(0,n.jsx)(g.G,{icon:_.M9J,className:"text-serp-bright-green pt-1 iconSm "})}),(0,n.jsx)("span",{className:"flex-1",children:"SERP Reports"}),(0,n.jsx)("span",{children:(0,n.jsx)(g.G,{icon:y.gc2,className:"text-[12px] text-white"})})]})})})})}),(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsx)(C.Z,{anchor:"top",noButtonBorder:!0,menuItems:(0,n.jsx)(TopBarSOVReportEllipseMenu,{sovReports:G,currentProject:q}),srText:"Open project navigation",menuButton:(0,n.jsx)("div",{className:"flex flex-col gap-2 bg-serp-dark p-0 justify-center",children:(0,n.jsx)("div",{className:"flex flex-row justify-between items-center",children:(0,n.jsxs)("div",{className:"px-2 flex flex-row gap-2 cursor-pointer items-center",role:"button",noIndex:0,children:[(0,n.jsx)("span",{className:"",children:(0,n.jsx)(g.G,{icon:_.Acd,className:"text-serp-bright-green pt-1 iconSm "})}),(0,n.jsx)("span",{className:"flex-1",children:"Share of Voice"}),(0,n.jsx)("span",{children:(0,n.jsx)(g.G,{icon:y.gc2,className:"text-[12px] text-white"})})]})})})})}),(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsx)(C.Z,{anchor:"top",noButtonBorder:!0,menuItems:(0,n.jsx)(TopBarMenus_TopBarToolsEllipseMenu,{projects:Z}),srText:"Open project navigation",menuButton:(0,n.jsx)("div",{className:"flex flex-col gap-2 bg-serp-dark p-0 justify-center",children:(0,n.jsx)("div",{className:"flex flex-row justify-between items-center",children:(0,n.jsxs)("div",{className:"px-2 flex flex-row gap-2 cursor-pointer items-center",role:"button",noIndex:0,children:[(0,n.jsx)("span",{className:"",children:(0,n.jsx)(g.G,{icon:_.klh,className:"text-serp-bright-green pt-1 iconSm "})}),(0,n.jsx)("span",{className:"flex-1",children:"Tools"}),(0,n.jsx)("span",{children:(0,n.jsx)(g.G,{icon:y.gc2,className:"text-[12px] text-white"})})]})})})})})]})]}),(0,n.jsxs)("div",{className:"flex flex-row gap-4.5 bg-serp-dark ps-6 py-4 items-center",children:[(0,n.jsx)("div",{className:"hidden xl:inline-block",children:(0,n.jsx)("a",{onClick:()=>R.push("/get-support"),children:"Get Support"})}),(0,n.jsx)("div",{children:(0,n.jsx)(ProfileButton,{subscription:null==T?void 0:T.subscription,plan:null==T?void 0:T.Plan,availableCredits:null==T?void 0:T.available_credits,maxPlanCredits:null==T?void 0:T.max_plan_credits})}),T&&(null==T?void 0:null===(v=T.subscription)||void 0===v?void 0:v.status)!=="trialing"&&!((null==T?void 0:null===(f=T.subscription)||void 0===f?void 0:f.status)==="past_due"&&(null==T?void 0:null===(N=T.subscription)||void 0===N?void 0:N.trial_end)===(null==T?void 0:null===(k=T.subscription)||void 0===k?void 0:k.current_period_start))&&(0,n.jsxs)("span",{className:"text-sm text-serp-light-gray whitespace-nowrap",children:["Remaining Credits: ",T.available_credits,T.max_plan_credits?" / ".concat(T.max_plan_credits):""]}),M&&T&&(0,n.jsx)(TopbarNavigation_Profile,{authUser:M,user:T,removeCounts:(null==T?void 0:null===(P=T.subscription)||void 0===P?void 0:P.status)==="past_due"&&(null==T?void 0:null===(B=T.subscription)||void 0===B?void 0:B.trial_end)===(null==T?void 0:null===(A=T.subscription)||void 0===A?void 0:A.current_period_start)})]})]})},A=r(89323),R=r(33891),T=r.n(R);let M=(0,a.d)({authMode:"userPool"});function Layout(e){var t,r;
1let{seo:a,children:o,projectData:p=null,scrollMode:h="container"}=e,{toasts:x,removeToast:m}=(0,s.a)(),[g,v]=(0,l.useState)(null);(0,l.useEffect)(()=>{let getBannerContent=async()=>{try{let e=await M.graphql({query:A.getBanner,variables:{id:"03678197-e6f7-411e-89cc-2e21ea33b668"}});v(e.data.getBanner)}catch(e){console.log("error getting banner",e)}};getBannerContent()},[]);let f={pageTitle:null!==(t=null==a?void 0:a.pageTitle)&&void 0!==t?t:"SERPrecon",pageDescription:null!==(r=null==a?void 0:a.pageDescription)&&void 0!==r?r:"Outrank your competition."},j="page"===h?"".concat(T().content," min-h-[calc(100vh-76px)] flex flex-col justify-between"):"".concat(T().content," h-[100vh] overflow-auto flex flex-col justify-between");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.Z,{seo:f}),(0,n.jsxs)("main",{className:"".concat(T().main),id:"main",children:[x.length>0&&(0,n.jsx)("div",{className:T().toastContainer,children:x.map(e=>(0,n.jsx)(c.Z,{toast:e,removeToast:m},e.id))}),(0,n.jsx)(d.Z,{}),(0,n.jsx)(u.Z,{}),(0,n.jsxs)("div",{className:T().layoutShell,children:[g&&g.type&&g.message&&(0,n.jsx)(components_Banner,{props:g}),(0,n.jsx)(features_TopbarNavigation,{}),(0,n.jsxs)("div",{"data-scroll-container":"app-content",className:j,children:[(0,n.jsx)("div",{className:"".concat(T().body),children:o}),(0,n.jsx)("div",{children:(0,n.jsx)(features_Footer,{})})]})]})]})]})}},50051:function(e,t,r){"use strict";var n=r(85893),l=r(96092),a=r(11163),s=r(93200),o=r(19870);r(41664),t.Z=e=>{let{}=e,t=(0,a.useRouter)(),{resetModalState:r}=(0,s.v)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.$N,{className:"p-4  border-b-1 border-b-serp-mid-gray",children:"You Have Hit Your Plan Projects Limit"}),(0,n.jsx)("div",{className:"px-6 py-4 flex flex-col gap-4",children:(0,n.jsxs)("p",{children:["Delete a project or"," ",(0,n.jsx)("span",{role:"button",className:"text-serp-green font-semibold underline cursor-pointer",onClick:()=>{r(),t.push("/account/plan/")},children:"upgrade"})," ","now to get more projects."," "]})}),(0,n.jsx)("div",{className:"w-full flex flex-row justify-end gap-4 py-3 px-4 border-t-1 border-t-serp-mid-gray",children:(0,n.jsx)(o.Z,{hasOnClick:!0,variant:"cancel",onClick:r,type:"button",children:"Cancel"})})]})}},40352:function(e,t,r){"use strict";var n=r(85893),l=r(67294),a=r(96092),s=r(11163),o=r(46406),i=r(32080),c=r(16333),d=r(17013),u=r(93200),p=r(45837),h=r(66926),x=r(19870),m=r(66683),g=r(67313);let v=(0,o.d)({authMode:"userPool"});t.Z=e=>{let{redirect:t=!1}=e,r=(0,s.useRouter)(),{resetModalState:o}=(0,u.v)(),{getCurrentUser:f,updateCurrentUser:j,user:b}=(0,p.S)(),{addToast:y}=(0,h.a)(),{formData:_,handleChange:N}=(0,c.Z)({confirmDelete:""}),[w,k]=(0,l.useState)(!1),[C,S]=(0,l.useState)(null),[P,B]=(0,l.useState)(""),handleAddProject=async e=>{e.preventDefault(),k(!0);try{let e={name:_.name,domain:_.domain.replace(/\/$/,""),user_id:b.id};_.brand&&""!==_.brand&&(e.brand=_.brand);let n=await v.graphql({query:i.$L,variables:{input:e}});f(),t&&r.push("/project/".concat((0,d.slugify)(n.data.createProject.name))),o()}catch(e){return console.log("error creating new project",e),B("There was an issue adding your project."),!1}k(!1)},handleChangeIntercept=(e,t)=>{if("name"===t&&(e.includes("/")||e.includes("&")||e.includes("?")||e.includes("http")||e.includes(":")?S("Project names shouldn't include '/', '&', '?', ':', or 'http' characters"):S(null),N(e,t),B("")),"domain"===t){let r=e.includes("https://")?e:"https://"+e;N(r,t)}},handleAddBrand=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;k(!0);let r=b.brands?b.brands:[],n=[...r,(0,d.capitalizeFirstCharacter)(e)],l=await j({id:b.id,brands:n});l?(y("".concat(e," has been added to your list of tags"),"success"),t&&t()):y("There was an issue adding your new tag. Please refresh and try again.","error"),k(!1)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.$N,{className:"p-4  border-b-1 border-b-serp-mid-gray",children:"Add a Project"}),(0,n.jsxs)("form",{onSubmit:handleAddProject,children:[(0,n.jsxs)("div",{className:"px-6 py-4 flex flex-col gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(m.Z,{id:"name",name:"name",type:"text",label:"Project Name:*",value:_.name,className:"block w-full rounded-md bg-literally-white px-3 py-1.5 text-base text-serp-gray outline-1 -outline-offset-1 outline-serp-gray placeholder:text-serp-dark focus:outline-2 focus:-outline-offset-2 focus:serp-gray sm:text-sm/6",handleChange:handleChangeIntercept,placeholder:"Client Project Name",required:!0}),C&&(0,n.jsx)("span",{className:"error",children:C})]}),(0,n.jsx)(m.Z,{type:"url",label:"Domain:*",name:"domain",id:"domain",value:_.domain,handleChange:handleChangeIntercept,placeholder:"www.clientsite.com",required:!0}),(0,n.jsx)("div",{children:(0,n.jsx)(g.Z,{handleChange:N,onCreateOption:e=>{handleAddBrand(e,()=>N(e,"brand"))},options:((null==b?void 0:b.brands)||[]).map(e=>({value:e,label:e})),value:_.brand,id:"brand",name:"brand",placeholder:"Optionally group projects by client, service, or vertical",label:"Tag:"})})]}),(0,n.jsxs)("div",{className:"w-full flex flex-row justify-end gap-4 py-3 px-4 border-t-1 border-t-serp-mid-gray",children:[(0,n.jsx)(x.Z,{disabled:w,hasOnClick:!0,variant:"cancel",onClick:o,type:"button",children:"Cancel"}),(0,n.jsx)(x.Z,{disabled:w,hasOnClick:!0,type:"submit",children:w?"Adding...":"Add"})]})]})]})}},35417:function(e,t,r){"use strict";var n=r(85893),l=r(67294),a=r(96092),s=r(11163);r(41664);var o=r(16333),i=r(17013);r(498),r(892);var c=r(93200),d=r(45837);r(66926);var u=r(38221),p=r(95821),h=r(19870),x=r(66683);r(11527);var m=r(45793),g=r(76523);r(24853);var v=r(34676),f=r(73582),j=r(67814),b=r(32949),y=r(50361),_=r.n(y);let N=Number("10");t.Z=e=>{var t,r,y,w;let{project:k}=e,C=(0,s.useRouter)(),{resetModalState:S}=(0,c.v)(),{user:P}=(0,d.S)(),{authUser:B}=(0,u.E)(),{handleAddSOVReport:A}=(0,p.L)(),{formData:R,handleChange:T}=(0,o.Z)({keyword:"",schedule:"once",name:""}),[M,E]=(0,l.useState)([]),[Z,O]=(0,l.useState)(null!=k?k:null),[F,I]=(0,l.useState)(!1),handleStartAddSOVReport=async e=>{e.preventDefault(),I(!0);let t=(0,i.slugify)(Z.name);A({schedule:R.schedule,keywords:M,name:R.name,url:Z.domain,project_id:Z.id,userId:P.
1id,authUser:B,projectSlug:t,projectName:Z.name}),k||(localStorage.setItem("sr_project",Z.id),C.push({pathname:"/project/".concat(t),query:{reportType:"sov"}},"/project/".concat(t))),S(),I(!1)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.$N,{className:"p-4  border-b-1 border-b-serp-mid-gray",children:["Add a New Share of Voice Report",(0,n.jsx)("div",{className:"w-full flex flex-row text-sm font-normal text-serp-dark-gray",children:(0,n.jsx)("p",{children:"Running a new share of voice report costs a credit."})})]}),(null==P?void 0:P.available_credits)>0&&(null==P?void 0:P.sov_reports_used)<(null==P?void 0:null===(t=P.Plan)||void 0===t?void 0:t.sov_monthly_limit)?(0,n.jsx)("form",{onSubmit:handleStartAddSOVReport,children:(0,n.jsxs)("div",{className:"px-6 py-4 flex flex-col gap-4",children:[!k&&(0,n.jsx)(m.Z,{label:"Project",options:null!==(y=null==P?void 0:null===(r=P.Projects)||void 0===r?void 0:r.items)&&void 0!==y?y:[],handleChange:(e,t)=>O(e),name:"project",id:"project",startingOptionText:"Choose a Project..."}),Z?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{children:"Domain:"}),(0,n.jsx)("span",{children:(0,n.jsx)(b.Z,{domain:Z.domain})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{children:"Report Name:*"}),(0,n.jsx)(x.Z,{id:"name",type:"text",handleChange:T,value:R.name,required:!0})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1 mb-2",children:[(0,n.jsxs)("span",{children:["Add up to ",N," keywords:"]}),(0,n.jsx)("span",{className:"text-serp-dark-gray text-[14px]",children:"Enter each keyword on a new line."})]}),(0,n.jsx)("div",{className:"flex flex-row gap-2 items-center",children:(0,n.jsx)(x.Z,{placeholder:"running shoes\nhiking boots\nbest shoes for trails",id:"keyword",type:"text",isTextarea:!0,rows:5,onBlur:e=>{let t=e.target.value.split("\n").map(e=>e.trim()).filter(e=>e.length>0);E(e=>{let r=Array.from(new Set([...e,...t])),n=r.slice(0,N),l=r.slice(N);return l.length>0?T(l.join("\n"),"keyword"):T("","keyword"),n})},handleChange:T,value:R.keyword,disabled:M.length>=N})}),M.length===N&&(0,n.jsx)("div",{className:" text-serp-dark-gray font-bold text-[14px]",children:"Keyword limit reached."}),(0,n.jsx)("div",{className:"".concat(M.length>0?"mt-2":""),children:(0,n.jsx)(v.Z,{keywords:M,noPadding:!0,noKeywordsText:(0,n.jsx)("span",{className:"text-serp-dark-gray text-[14px]",children:"Add at least one keyword"}),onClick:e=>{E(t=>_()(t).filter(t=>t!==e))},onClickIcon:(0,n.jsx)(j.G,{icon:f.EOp,className:"text-literally-white text-[10px]"}),onClickBackgroundColor:"bg-serp-red"})})]}),!P.Plan.name.toLowerCase().includes("lite")&&(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)("h3",{children:"Frequency*:"}),(0,n.jsx)(g.Z,{options:["daily","weekly","monthly","once"],id:"schedule",capitalizeLabels:!0,selected:null!==(w=R.schedule)&&void 0!==w?w:"once",handleChange:T,className:"flex flex-row gap-4 flex-wrap"})]}),(0,n.jsxs)("div",{className:"w-full flex flex-row justify-end gap-4 py-3 px-4 border-t-1 border-t-serp-mid-gray",children:[(0,n.jsx)(h.Z,{disabled:F,hasOnClick:!0,variant:"cancel",onClick:S,type:"button",children:"Cancel"}),(0,n.jsx)(h.Z,{disabled:F||0===M.length||M.length>N,hasOnClick:!0,type:"submit",children:F?"Running...":"Run"})]})]}):(0,n.jsx)("div",{className:"flex flex-row justify-end mt-2",children:(0,n.jsx)(h.Z,{disabled:F,hasOnClick:!0,variant:"cancel",onClick:S,type:"button",children:"Cancel"})})]})}):(0,n.jsxs)("div",{className:"px-6 py-4",children:[(0,n.jsxs)("p",{children:["You have hit your plan credits limit."," ",(0,n.jsx)("span",{role:"button",className:"text-serp-green font-semibold underline cursor-pointer",onClick:()=>{S(),C.push("/account/plan/")},children:"Upgrade"})," ","to get more credits."]}),(0,n.jsx)("div",{className:"flex flex-row justify-end mt-2",children:(0,n.jsx)(h.Z,{disabled:F,hasOnClick:!0,variant:"cancel",onClick:S,type:"button",children:"Cancel"})})]})]})}},37359:function(e,t,r){"use strict";r.d(t,{LP:function(){return exportAllActionPlans},kB:function(){return collectActionPlans},nu:function(){return parseActionPlan},oE:function(){return exportActionPlan}});var n=r(55733),l=r.n(n),a=r(17013);function parseActionPlan(e){try{let t=e.replace(/\\\\&quot;/g,"&apos;").replace(/\\&quot;/g,"&apos;").replace(/\\"/g,"'").replaceAll("\\","").replaceAll("  ","").replace(/^"|"$/g,"");return JSON.parse((0,a.inverseReplaceSpecialCharacters)(t))}catch(e){return console.error("Error parsing JSON:",e),null}}function normalizeItem(e){let t=null!=e.issue||null!=e.why_it_matters,r=(t?e.issue:e.Description)||"",n=(t?e.
1why_it_matters:e.ToDoText)||"",l="";return t?l=e.fix||"":e.Examples&&(l=Array.isArray(e.Examples)?e.Examples.join("; "):String(e.Examples)),{status:e.checked?"Done":"Open",severity:e.severity||"",issue:r,why_it_matters:n,fix:l}}function escapeCsvValue(e){let t=String(null!=e?e:"");return/[",\n\r]/.test(t)?'"'.concat(t.replace(/"/g,'""'),'"'):t}let s=[["status","Status"],["severity","Severity"],["issue","Issue"],["why_it_matters","Why it matters"],["fix","How to fix"]],o={csv:{build:function(e){let t=e.map(normalizeItem),r=s.map(e=>{let[,t]=e;return escapeCsvValue(t)}).join(","),n=t.map(e=>s.map(t=>{let[r]=t;return escapeCsvValue(e[r])}).join(","));return[r,...n].join("\r\n")},mime:"text/csv;charset=utf-8",ext:"csv"},json:{build:function(e){return JSON.stringify(e.map(normalizeItem),null,2)},mime:"application/json",ext:"json"},md:{build:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Action Plan",r=e.map(normalizeItem),n=["# ".concat(t),""];return r.forEach((e,t)=>{let r=e.severity?" _(".concat(e.severity,")_"):"";n.push("## ".concat(t+1,". ").concat(e.issue).concat(r)),n.push("**Status:** ".concat(e.status)),n.push(""),e.why_it_matters&&(n.push(e.why_it_matters),n.push("")),e.fix&&(n.push("**How to fix:** ".concat(e.fix)),n.push(""))}),n.join("\n").trimEnd()+"\n"},mime:"text/markdown;charset=utf-8",ext:"md"}};function triggerDownload(e,t,r){let n=e instanceof Blob?e:new Blob([e],{type:t}),l=URL.createObjectURL(n),a=document.createElement("a");a.href=l,a.download=r,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(l)}function collectActionPlans(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(e=>{var t,r;let n=null!==(r=null==e?void 0:null===(t=e.ReportOutputs)||void 0===t?void 0:t.items)&&void 0!==r?r:[];if(!n.length)return null;let l=n.reduce((e,t)=>new Date(t.createdAt)>new Date(e.createdAt)?t:e);if(!(null==l?void 0:l.ai_suggestions))return null;let a=parseActionPlan(l.ai_suggestions);return Array.isArray(a)&&0!==a.length?{reportName:e.query,items:a}:null}).filter(Boolean)}function toSafeFilename(e){return e.replace(/[<>:"/\\|?*]/g,"-").replace(/-{2,}/g,"-").replace(/^[-.]+|[-.]+$/g,"")}async function exportAllActionPlans(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!e||0===e.length)return;let n=o[t];if(!n)return;let s=new(l()),i=new Set;e.forEach(e=>{let{reportName:r,items:l}=e,o=(r?toSafeFilename((0,a.slugify)(r)):"")||"report",c="".concat(o,"-action-plan.").concat(n.ext),d=2;for(;i.has(c);)c="".concat(o,"-action-plan-").concat(d,".").concat(n.ext),d+=1;i.add(c);let u="md"===t?n.build(l,"Action Plan — ".concat(r||"Report")):n.build(l);s.file(c,u)});let c=await s.generateAsync({type:"blob"}),d=(r?toSafeFilename((0,a.slugify)(r)):"")||"project";triggerDownload(c,"application/zip","".concat(d,"-action-plans.zip"))}function exportActionPlan(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!e||0===e.length)return;let n=o[t];if(!n)return;let l=r?(0,a.slugify)(r):"report",s="".concat(l,"-action-plan.").concat(n.ext),i="md"===t?n.build(e,"Action Plan"):n.build(e);triggerDownload(i,n.mime,s)}},18713:function(e,t,r){"use strict";r.d(t,{m:function(){return getGraphqlDataArray}});var n=r(46406),l=r(89323);let a=(0,n.d)({authMode:"userPool"}),getGraphqlDataArray=async(e,t,r)=>{let n,s;if(r){n=customQueries[t];let e=n.replaceAll(" ","").indexOf("("),r=n.replaceAll(" ","").indexOf("y"),l=n.replaceAll(" ","").slice(r+1,e);s=l.charAt(0).toLowerCase()+l.slice(1)}else n=l[t],s=t;let o={msg:"",status:null,error:{},pass:!0};if(e.limit||(e.limit=200),n||(o={msg:"Not a valid list query",status:!0,error:{},pass:!1}),o.status)return o;{var i,c,d,u;let r=[],l=null,p=0;try{let t=await a.graphql({query:n,variables:e}),{items:o,nextToken:i}=t.data[s];r=[...r,...o],l=i||null}catch(e){if(null===(c=(o={msg:"There was an error fetching the initial data for the ".concat(t," query"),status:!0,error:e}).error)||void 0===c?void 0:null===(i=c.data[s])||void 0===i?void 0:i.items){let{items:e,nextToken:t}=o.error.data[s];r=[...r,...e],l=t||null}else console.log("error",e)}for(;l;){p++,e.nextToken=l;try{let t=await a.graphql({query:n,variables:e}),{items:o,nextToken:i}=t.data[s];r=[...r,...o],l=i||null}catch(e){if(console.log("error in while loop",e),null===(u=(o={msg:"There was an error fetching the lopped data for the ".concat(n," query on iteration #").concat(p),status:!0,error:e}).error)||void 0===u?void 0:null===(d=u.data[s])||void 0===d?void 0:d.items){let{items:e,nextToken:t}=o.error.data[s];r=[...r,...e],l=t||null}else l=null,console.log("error",e)}}return o.status?r.length>0?r:o:r}}},86024:function(e){e.exports={banner:"Banner_banner__cvXnk",info:"Banner_info__LBdpF",warning:"Banner_warning__cihkW",danger:"Banner_danger__LNMnV",success:"Banner_success__619ZH",light:"Banner_light__tMNEf",dark:"Banner_dark__VHkgW"}},25432:function(e){e.exports={button:"Button_button__exqP_",block:"Button_block__j_lXi",secondary:"Button_secondary__9ex2D",tert
1iary:"Button_tertiary__ze_KB",quaternary:"Button_quaternary__0zheK",link:"Button_link__9n7Et",dangerLink:"Button_dangerLink__12w3r",danger:"Button_danger__MnjLX",dangerSmall:"Button_dangerSmall__s_JKT",info:"Button_info__bChu8",newsletter:"Button_newsletter__QfiJQ",navigation:"Button_navigation__kJK8R",blogPagination:"Button_blogPagination__hys1C",blogPaginationActive:"Button_blogPaginationActive__h2yDJ",blogPaginationArrow:"Button_blogPaginationArrow__sukDB",capitalize:"Button_capitalize__TFEo9"}},77688:function(e){e.exports={imgContainer:"Img_imgContainer__8G9nH",img:"Img_img__VVb7_",cover:"Img_cover__HoGYo"}},7269:function(e){e.exports={form_group:"Input_form_group__DgNPe",newsletter:"Input_newsletter__LOXF2",verticalTextAreaResize:"Input_verticalTextAreaResize__Z8cP3",horizontalTextAreaResize:"Input_horizontalTextAreaResize__1N7Tr",noneTextAreaResize:"Input_noneTextAreaResize__6XSgu",passwordContainer:"Input_passwordContainer__D5y8q",passwordInput:"Input_passwordInput__XNWkX",passwordToggle:"Input_passwordToggle__y64Aw"}},474:function(e){e.exports={footer:"Footer_footer__irkep"}},33891:function(e){e.exports={main:"Layout_main__56Ytm",body:"Layout_body__MUg4F",toastContainer:"Layout_toastContainer__lNw_E",layoutShell:"Layout_layoutShell__clVxH",navigationalMenu:"Layout_navigationalMenu__clbqq",content:"Layout_content__h61TM"}}}]);

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.