1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5007],{4474:(e,t,r)=>{r.d(t,{$:()=>c});var o=r(95155),n=r(12115),l=r(42442),a=r(18460),i=r(31919);let s=(0,a.F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=n.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...a},c)=>{let d=n?l.DX:"button";return(0,o.jsx)(d,{className:(0,i.cn)(s({variant:t,size:r,className:e})),ref:c,...a})});c.displayName="Button"},14339:(e,t,r)=>{r.d(t,{J:()=>n});var o=r(9339);let n=(0,o.createServerReference)("c088e0bf5e34fd0eea3b0972ade848456da11235ec",o.callServer,void 0,o.findSourceMapURL,"getToolByUrl")},35451:(e,t,r)=>{r.d(t,{CompareProvider:()=>f,f:()=>m});var o=r(95155),n=r(12115),l=r(47650),a=r(6059),i=r(73321),s=r(14339);let c="toolbit_compare_tools",d=(0,n.createContext)(null);function u({onChange:e}){let t=(0,i.usePathname)();return(0,n.useEffect)(()=>{e(t)},[t,e]),null}function f({children:e}
1){let[t,r]=(0,n.useState)([]),[i,m]=(0,n.useState)(!1),[p,h]=(0,n.useState)(""),b=n.useRef(null),x=n.useRef(t);(0,n.useEffect)(()=>{x.current=t},[t]),(0,n.useEffect)(()=>{try{let e=localStorage.getItem(c);if(e){let t=JSON.parse(e);Array.isArray(t)&&r(t.slice(0,3))}}catch(e){console.error("Failed to load compare tools from localStorage",e)}m(!0)},[]),(0,n.useEffect)(()=>{if(i)try{localStorage.setItem(c,JSON.stringify(t))}catch(e){console.error("Failed to save compare tools to localStorage",e)}},[t,i]),(0,n.useEffect)(()=>{if(!i)return;let e=window.location.pathname;if("/compare"===e||e.startsWith("/compare/")){let t=e.replace("/compare","").replace(/^\//,"");if(!(b.current===e||null===b.current&&!t))return}if("/compare"===p||p.startsWith("/compare/")){let e=[...t].map(e=>e.tool_url).sort((e,t)=>e.localeCompare(t)),r=e.length>0?`/compare/${e.join("-vs-")}`:"/compare";window.location.pathname!==r&&window.history.replaceState(null,"",r),b.current=r}},[t,p,i]),(0,n.useEffect)(()=>{if(!i)return;let e=!0,t=async()=>{let t=window.location.pathname,o=x.current;if("/compare"===t||t.startsWith("/compare/")){let n=t.replace("/compare","").replace(/^\//,""),l=n?n.split("-vs-").map(e=>decodeURIComponent(e).trim()).filter(Boolean):[];if(o.map(e=>e.tool_url).sort().join(",")!==[...l].sort().join(","))if(0===l.length){let t=b.current;if(null!==t&&t.startsWith("/compare")){if(!e)return;r([])}}else{let t=await Promise.all(l.map(async e=>{let t=o.find(t=>t.tool_url===e);if(t)return t;try{let t=await (0,s.J)(e);if(t)return{tool_id:t.tool_id,tool_name:t.tool_info?.toolName||"Unnamed Tool",tool_url:t.tool_url||"",favicon_url:t.favicon_url,categories:t.categories?.map(e=>e.name)||[]}}catch(t){console.error("Failed to sync tool from URL:",e,t)}return null}));if(!e)return;r(t.filter(Boolean))}}e&&(b.current=t)};return t(),window.addEventListener("popstate",t),()=>{e=!1,window.removeEventListener("popstate",t)}},[p,i]);let[g,v]=(0,n.useState)(null),w=(0,n.useCallback)(e=>{let t=!1;return r(r=>r.some(t=>t.tool_url===e.tool_url)?(t=!0,r):r.length>=3?(v(e),t=!1,r):(t=!0,[...r,e])),t},[]),k=(0,n.useCallback)(e=>{r(t=>t.filter(t=>t.tool_url!==e))},[]),j=(0,n.useCallback)((e,t)=>{r(r=>r.some(e=>e.tool_url===t.tool_url)?r.filter(t=>t.tool_url!==e):r.map(r=>r.tool_url===e?t:r))},[]),y=(0,n.useCallback)(()=>{r([])},[]),z=(0,n.useCallback)(e=>t.some(t=>t.tool_url===e),[t]),_=(0,n.useCallback)(e=>{r(e)},[]),N=(0,n.useMemo)(()=>{if(t.length<2)return"";let e=[...t].map(e=>e.tool_url).sort((e,t)=>e.localeCompare(t));return`/compare/${e.join("-vs-")}`},[t]),C=(0,n.useMemo)(()=>({selectedTools:t,addTool:w,removeTool:k,replaceTool:j,clearTools:y,isToolSelected:z,compareUrl:N,reorderTools:_}),[t,w,k,j,y,z,N,_]);return(0,o.jsxs)(d.Provider,{value:C,children:[(0,o.jsx)(n.Suspense,{fallback:null,children:(0,o.jsx)(u,{onChange:h})}),e,g&&"u">typeof document&&(0,l.createPortal)((0,o.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4 bg-black/60 backdrop-blur-xs animate-in fade-in duration-200",onClick:()=>v(null),children:(0,o.jsxs)("div",{className:"relative w-full max-w-md bg-[#f9f8f6] dark:bg-zinc-900 border border-[#e5e3df] dark:border-zinc-800 rounded-2xl shadow-xl overflow-hidden animate-in zoom-in-95 duration-200",onClick:e=>e.stopPropagation(),children:[(0,o.jsxs)("div",{className:"px-6 pt-6 pb-4 border-b border-zinc-200/80 dark:border-zinc-800 text-center",children:[(0,o.jsx)("div",{className:"inline-flex items-center justify-center w-11 h-11 rounded-full bg-amber-500/10 border border-amber-500/20 mb-3",children:(0,o.jsx)(a.A,{className:"w-5 h-5 text-amber-600 dark:text-amber-400"})}),(0,o.jsx)("h3",{className:"text-base sm:text-lg font-bold text-zinc-900 dark:text-zinc-100",children:"Comparison Limit Reached"}),(0,o.jsxs)("p",{className:"text-xs text-zinc-500 dark:text-zinc-450 mt-1 leading-relaxed",children:["You already have 3 tools selected. Choose which one to replace with"," ",(0,o.jsx)("strong",{className:"font-semibold text-zinc-700 dark:text-zinc-300",children:g.tool_name}),"."]})]}),(0,o.jsx)("div",{className:"px-6 py-4 space-y-2",children:t.map(e=>(0,o.jsxs)("button",{onClick:()=>{var t;return t=e.tool_url,void(g&&(r(e=>e.map(e=>e.tool_url===t?g:e)),v(null)))},className:"group w-full flex items-center justify-between p-3.5 rounded-[10px] border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950/30 hover:border-zinc-300 dark:hover:border-zinc-700 hover:bg-zinc-50 dark:hover:bg-zinc-900 hover:shadow-xs transition-all duration-200 text-left",children:[(0,o.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,o.jsx)("div",{className:"w-8 h-8 rounded-lg overflow-hidden bg-white dark:bg-zinc-800 flex items-center justify-center p-1 border border-zinc-200/80 dark:border-zinc-700 shrink-0",children:e.favicon_url?(0,o.jsx)("img",{src:e.favicon_url,alt:"",className:"w-5 h-5 object-contain",onError:e=>{e.currentTarget.style.display="none"}}):(0,o.jsx)("span",{className:"text-xs font-bold text-zinc-400",children:e.tool_name.charAt(0)})}),(0,o.jsx)("span",{className:"text-xs font-semibold text-zinc-900 dark:text-zinc-100 truncate",children:e.tool_name})]}),(0,o.jsx)("span",{className:"shrink-0 text-[10px] font-bold px-3 py-1.5 rounded-[8px] bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900 group-hover:bg-amber-600 dar
1k:group-hover:bg-amber-500 dark:group-hover:text-white transition-all duration-200",children:"Replace"})]},e.tool_url))}),(0,o.jsx)("div",{className:"px-6 pb-5 pt-3 border-t border-zinc-200/80 dark:border-zinc-800 flex justify-end",children:(0,o.jsx)("button",{onClick:()=>v(null),className:"px-4 py-2 h-9 text-xs font-semibold rounded-[10px] border border-zinc-200 dark:border-zinc-800 text-zinc-650 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors",children:"Cancel"})})]})}),document.body)]})}function m(){let e=(0,n.useContext)(d);if(!e)throw Error("useCompare must be used within a CompareProvider");return e}},39635:(e,t,r)=>{r.d(t,{C6:()=>l,Kq:()=>i,rf:()=>a});var o=r(95155),n=r(31919);function l({size:e="sm",className:t}){return(0,o.jsx)("span",{role:"img",title:"Verified Listing","aria-label":"Verified listing",className:(0,n.cn)("inline-flex items-center justify-center shrink-0 select-none transition-all duration-300 hover:scale-110 active:scale-95","md"===e?"w-4.5 h-4.5 sm:w-5 sm:h-5 lg:w-[22px] lg:h-[22px]":"horizontal"===e?"w-3.5 h-3.5 sm:w-4 sm:h-4":"w-3 h-3 sm:w-3.5 sm:h-3.5",t),children:(0,o.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full","aria-hidden":"true",children:[(0,o.jsx)("path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",fill:"#1D9BF0"}),(0,o.jsx)("path",{d:"m9 12 2 2 4-4",stroke:"white",strokeWidth:"3.25",strokeLinecap:"round",strokeLinejoin:"round"})]})})}function a(e){if(!e||"object"!=typeof e)return!1;let t=!!(e.is_paid??e.isPaid),r=e.submission_tier??e.submissionTier??null;return t&&("paid_launch_tool"===r||"paid_update_tool"===r)}function i(e){if(!e||"string"!=typeof e)return e;let t=e.split(/((?:official\s+)?blue\s+verified\s+badge)/gi);return t.length<=1?e:(0,o.jsx)("span",{className:"inline",children:t.map((e,t)=>e?e.toLowerCase().includes("blue verified badge")?(0,o.jsxs)("span",{className:"inline-flex items-center gap-1.5 align-baseline",children:[(0,o.jsx)("span",{children:e}),(0,o.jsx)(l,{size:"sm",className:"inline-block shrink-0 align-middle"})]},t):(0,o.jsx)("span",{children:e},t):null)})}},39658:(e,t,r)=>{r.d(t,{p:()=>a});var o=r(95155),n=r(12115),l=r(31919);let a=n.forwardRef(({className:e,type:t,...r},n)=>(0,o.jsx)("input",{type:t,className:(0,l.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));a.displayName="Input"},75910:(e,t,r)=>{r.d(t,{K:()=>n});var o=r(9339);let n=(0,o.createServerReference)("60be61ff757da0e2b0773b11228840f1f766c35b3c",o.callServer,void 0,o.findSourceMapURL,"toggleSavedTool")},89520:(e,t,r)=>{r.d(t,{n:()=>i});var o=r(95155),n=r(5772),l=r(12115),a=r(31919);let i=(0,l.memo)(function({toolSiteUrl:e,faviconUrl:t,toolName:r,size:i=80,className:s="",isSubmissionFlow:c=!1,priority:d=!1,loading:u="lazy"}){let f="https://cdn.toolbit.ai/favicon-ic/default.png",m=(0,l.useMemo)(()=>(function(e,t,r){let o=[];if(e&&e.trim()&&!e.includes("default.png")&&o.push(e.trim()),r){let r=t||e;if(r){let e=function(e){try{let t=e.trim().match(/^https?:\/\//)?e.trim():`https://${e.trim()}`;return new URL(t).hostname.replace(/^www\./,"")}catch{return null}}(r);e&&(o.push(`https://www.google.com/s2/favicons?sz=128&domain=${e}`),o.push(`https://favicon.im/${e}?larger=true`))}}return o.push("https://cdn.toolbit.ai/favicon-ic/default.png"),Array.from(new Set(o))})(t,e,c),[t,e,c]),[p,h]=(0,l.useState)(()=>m[0]||f),[b,x]=(0,l.useState)(0);(0,l.useEffect)(()=>{h(m[0]||f),x(0)},[m]);let g=(0,l.useCallback)(()=>{x(e=>{let t=e+1;return t<m.length?(h(m[t]),t):(h(f),e)})},[m]);return(0,o.jsx)("div",{className:(0,a.cn)("relative overflow-hidden bg-muted/20 shrink-0 aspect-square",s),children:(0,o.jsx)(n.default,{src:p,alt:`${r} favicon`,width:i,height:i,sizes:`${i}px`,className:"h-full w-full object-contain",onError:g,priority:d,loading:d?"eager":u,unoptimized:!0})})})}}]);
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.