PageSourceSearch

https://kromio.ai/static/js/917.e2c298b6.chunk.js

js kromio.ai collected 2026-10-01 23:50:13 UTC 33,446 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkchrome_extension_builder=self.webpackChunkchrome_extension_builder||[]).push([[570,917],{536:(e,t,s)=>{s.d(t,{A:()=>l});const l=(0,s(3797).A)("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]])},1021:(e,t,s)=>{s.d(t,{A:()=>r});var l=s(2555),i=s(5043),a=s(8775),n=s(579);const r=function(e){let{extensions:t,onSelectExtension:s,onPreviewExtension:r,currentExtensionId:o,showActions:c=!0,title:d="Extensions"}=e;const[x,m]=(0,i.useState)(null),h=(0,i.useMemo)(()=>{if(!t||0===t.length)return[];const e=t.reduce((e,t)=>(e[t.id]=(0,l.A)((0,l.A)({},t),{},{revisions:[]}),e),{});return(()=>{for(const i of t)i.parent_id&&e[i.parent_id]&&e[i.parent_id].revisions.push(e[i.id]);const s=e=>{e.revisions&&e.revisions.length>0&&(e.revisions.sort((e,t)=>new Date(e.created_at)-new Date(t.created_at)),e.revisions.forEach(s))},l=[];for(const i of t)if(!i.parent_id||!e[i.parent_id]){const t=e[i.id];s(t),l.push(t)}return l})()},[t]),u=e=>{if(!e||!e.files)return"";const t=Object.keys(e.files).find(e=>e.endsWith(".html"));if(!t)return'<div style="padding: 20px; font-family: Arial; color: #333;">Preview unavailable: No HTML file found.</div>';let s=e.files[t];const l=Object.keys(e.files).find(e=>e.endsWith(".css")),i=l?e.files[l]:"";s=s.replace(/<link.*rel="stylesheet".*>/g,"");const a="body { margin: 0; padding: 10px; font-family: Arial, sans-serif; background-color: #ffffff; color: #333333; }\n"+(i||"");return s.includes("</head>")?s.replace("</head>","<style>".concat(a,"</style></head>")):"<!DOCTYPE html><html><head><style>".concat(a,"</style></head><body>").concat(s,"</body></html>")},f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const l=e.id===o;return(0,n.jsxs)("div",{className:"bg-white/10 backdrop-blur-lg rounded-xl p-4 border border-white/20 ".concat(t?"ml-8":""," ").concat(l?"ring-2 ring-purple-400":""),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between min-w-0",children:[(0,n.jsxs)("div",{className:"flex items-center space-x-4 flex-1 min-w-0",children:[(0,n.jsx)("div",{className:"w-24 h-24 bg-gray-700 rounded-lg flex-shrink-0 flex items-center justify-center",children:(0,n.jsx)("iframe",{srcDoc:u(e),style:{width:"100%",height:"100%",border:"none",borderRadius:"8px"},title:"Preview of ".concat(e.name),sandbox:"allow-scripts"})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("h3",{className:"text-xl font-semibold text-white truncate",children:[e.name,t&&(0,n.jsxs)("span",{className:"text-sm text-gray-400",children:[" v",e.version]}),l&&(0,n.jsx)("span",{className:"ml-2 text-purple-400 text-sm",children:"(Current)"})]}),(0,n.jsx)("p",{className:"text-gray-400 text-sm truncate",children:t?"Revision: ".concat(e.revision_prompt):"Prompt: ".concat(e.prompt)})]})]}),c&&(0,n.jsx)("div",{className:"flex items-center space-x-2 flex-shrink-0 ml-4",children:!l&&(0,n.jsx)("button",{onClick:()=>s(e),className:"p-2 bg-blue-500 rounded-full text-white hover:bg-blue-600",title:"View Extension",children:(0,n.jsx)(a.A,{className:"w-5 h-5"})})})]}),e.revisions&&e.revisions.length>0&&(0,n.jsx)("div",{className:"mt-4 pl-8 border-l-2 border-gray-700",children:e.revisions.map(e=>f(e,!0))})]},e.id)};return t&&0!==t.length?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"space-y-4",children:[d&&(0,n.jsx)("h3",{className:"text-xl font-semibold text-white mb-4",children:d}),h.map(e=>f(e))]}),!r&&x&&(0,n.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-80 flex items-center justify-center z-60 p-4",children:(0,n.jsxs)("div",{className:"bg-gray-800 rounded-lg shadow-2xl w-full max-w-lg relative",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-gray-700",children:[(0,n.jsxs)("h3",{className:"text-xl font-bold text-white",children:["Preview: ",x.name]}),(0,n.jsx)("button",{onClick:()=>m(null),className:"text-gray-400 hover:text-white",children:(0,n.jsx)("span",{className:"text-2xl",children:"\xd7"})})]}),(0,n.jsx)("div",{className:"px-4 py-2 bg-yellow-500/10 border-b border-yellow-500/20",children:(0,n.jsx)("p",{className:"text-yellow-300 text-sm text-center",children:"\u26a0\ufe0f Preview may not render accurately. Data fetching doesn't work and button clicks won't respond properly."})}),(0,n.jsx)("div",{className:"p-4 bg-white",style:{height:"60vh"},children:(0,n.jsx)("iframe",{srcDoc:u(x),style:{width:"100%",height:"100%",border:"none"},title:"Preview of ".concat(x.name),sandbox:"allow-scripts allow-modals"})})]})})]}):(0,n.jsx)("div",{className:"text-center text-gray-400 py-8",children:(0,n.jsx)("p",{children:"No extensions foun
1d."})})}},1570:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o});var l=s(5043),i=s(1172),a=s(5185),n=s(1021),r=s(579);const o=function(e){let{isOpen:t,onClose:s,onSelectExtension:o}=e;const[c,d]=(0,l.useState)([]),[x,m]=(0,l.useState)(!0),[h,u]=(0,l.useState)(null);(0,l.useEffect)(()=>{t&&f()},[t]);const f=async()=>{m(!0);const{data:{user:e}}=await a.supabase.auth.getUser();if(e){const{data:t,error:s}=await a.supabase.from("extensions").select("*").eq("user_id",e.id).order("created_at",{ascending:!1});s?console.error("Error fetching extensions:",s):d(t)}m(!1)};return t?(0,r.jsxs)("div",{className:"fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 p-4",children:[(0,r.jsxs)("div",{className:"bg-gray-900 rounded-lg p-8 max-w-4xl w-full relative border border-gray-700 shadow-xl",children:[(0,r.jsx)("button",{onClick:s,className:"absolute top-4 right-4 text-gray-400 hover:text-white",children:(0,r.jsx)(i.A,{className:"w-6 h-6"})}),(0,r.jsx)("h2",{className:"text-3xl font-bold text-white mb-8 text-center",children:"My Extensions"}),(0,r.jsx)("div",{className:"max-h-[70vh] overflow-y-auto",children:x?(0,r.jsx)("p",{className:"text-center text-gray-400",children:"Loading..."}):(0,r.jsx)(n.A,{extensions:c,onSelectExtension:o,onPreviewExtension:u,title:""})})]}),h&&(0,r.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-80 flex items-center justify-center z-60 p-4",children:(0,r.jsxs)("div",{className:"bg-gray-800 rounded-lg shadow-2xl w-full max-w-lg relative",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-gray-700",children:[(0,r.jsxs)("h3",{className:"text-xl font-bold text-white",children:["Preview: ",h.name]}),(0,r.jsx)("button",{onClick:()=>u(null),className:"text-gray-400 hover:text-white",children:(0,r.jsx)(i.A,{className:"w-6 h-6"})})]}),(0,r.jsx)("div",{className:"p-4 bg-white",style:{height:"60vh"},children:(0,r.jsx)("iframe",{srcDoc:(()=>
1{if(!h||!h.files)return"No preview available";const e=Object.keys(h.files).find(e=>e.endsWith(".html"));if(!e)return'<div style="padding: 20px; font-family: Arial; color: #333;">Preview unavailable: No HTML file found.</div>';let t=h.files[e];const s=Object.keys(h.files).find(e=>e.endsWith(".css")),l=s?h.files[s]:"";t=t.replace(/<link.*rel="stylesheet".*>/g,"");const i="body { margin: 0; padding: 10px; font-family: Arial, sans-serif; background-color: #ffffff; color: #333333; }\n"+(l||"");return t.includes("</head>")?t.replace("</head>","<style>".concat(i,"</style></head>")):"<!DOCTYPE html><html><head><style>".concat(i,"</style></head><body>").concat(t,"</body></html>")})(),style:{width:"100%",height:"100%",border:"none"},title:"Preview of ".concat(h.name),sandbox:"allow-scripts allow-modals"})})]})})]}):null}},1917:(e,t,s)=>{s.r(t),s.d(t,{default:()=>O});var l=s(2555),i=s(5043),a=s(7950),n=s(5475),r=s(3216),o=s(4951),c=s(3616),d=s(9256),x=s(1172),m=s(536),h=s(3666),u=s(1969),f=s(712),p=s(3443),g=s(8775),b=s(3625),v=s(5185),w=s(9339),y=s(2372),j=s(1570),N=s(2895),k=s(579);const _=()=>(0,k.jsxs)("div",{className:"bg-white/10 backdrop-blur-lg rounded-xl p-6 border border-white/20 shadow-xl animate-pulse",children:[(0,k.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[(0,k.jsxs)("div",{className:"flex items-start space-x-3 flex-1 mr-2 min-w-0",children:[(0,k.jsx)("div",{className:"w-10 h-10 bg-gray-600 rounded-lg flex-shrink-0"}),(0,k.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,k.jsx)("div",{className:"h-5 bg-gray-600 rounded w-3/4 mb-1"}),(0,k.jsx)("div",{className:"h-4 bg-gray-700 rounded w-1/2"})]})]}),(0,k.jsxs)("div",{className:"flex flex-col items-center",children:[(0,k.jsx)("div",{className:"w-7 h-7 bg-gray-600 rounded flex-shrink-0 mb-1"}),(0,k.jsx)("div",{className:"h-4 w-6 bg-gray-700 rounded"})]})]}),(0,k.jsxs)("div",{className:"mb-4 space-y-2",children:[(0,k.jsx)("div",{className:"h-3 bg-gray-600 rounded w-full"}),(0,k.jsx)("div",{className:"h-3 bg-gray-600 rounded w-4/5"}),(0,k.jsx)("div",{className:"h-3 bg-gray-600 rounded w-2/3"})]}),(0,k.jsx)("div",{className:"text-center mb-3",children:(0,k.jsx)("div",{className:"h-5 w-32 bg-gray-700 rounded-full mx-auto"})}),(0,k.jsxs)("div",{className:"space-y-3",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between",children:[(0,k.jsx)("div",{className:"h-5 w-20 bg-gray-600 rounded"}),(0,k.jsx)("div",{className:"h-5 w-12 bg-gray-600 rounded"})]}),(0,k.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,k.jsx)("div",{className:"flex-1 h-10 bg-gray-600 rounded-lg"}),(0,k.jsx)("div",{className:"flex-1 h-10 bg-gray-600 rounded-lg"})]})]})]});var A=s(2929),E=s(5964);const S={"gemini-3-flash-preview":"Gemini 3 Flash","gemini-2.5-flash":"Gemini 2.5 Flash","claude-sonnet-4-5":"Claude Sonnet 4.5"},C=[{value:"created_desc",label:"Date Created (Newest)",field:"created_at",direction:"desc"},{value:"views_desc",label:"Page Views (Most)",field:"view_count",direction:"desc"},{value:"views_asc",label:"Page Views (Least)",field:"view_count",direction:"asc"},{value:"favorites_desc",label:"# Favorites (Most)",field:"favorite_count",direction:"desc"},{value:"name_asc",label:"Title (A-Z)",field:"name",direction:"asc"},{value:"name_desc",label:"Title (Z-A)",field:"name",direction:"desc"},{value:"created_asc",label:"Date Created (Oldest)",field:"created_at",direction:"asc"}],M=[{id:"all",label:"\u26a1 All"},{id:"productivity",label:"\u23f1\ufe0f Productivity",query:"productivity timer focus task note"},{id:"ai",label:"\ud83e\udd16 AI & LLM",query:"ai gpt summary prompt chat"},{id:"scraping",label:"\ud83d\udcca Scraping & SEO",query:"scrape extract data seo"},{id:"dev",label:"\ud83d\udee0\ufe0f Developer Tools",query:"developer code json github api css"},{id:"utility",label:"\u2728 Utilities",query:"color tab bookmark password quote"}],P=[{id:"all",label:"All AI Models"},{id:"gemini",label:"Gemini"},{id:"claude",label:"Claude"},{id:"chatgpt",label:"ChatGPT"}],L=e=>{let{title:t,emoji:s}=e;if(s)return(0,k.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-2xl flex-shrink-0 bg-white/10 border border-white/20",children:s});const l=(t||"E").charAt(0).toUpperCase(),i=(t||"E").charAt((t||"E").length-1).toUpperCase(),a=e=>{const t=e.charCodeAt(0);return"hsl(".concat(137.508*t%360,", 70%, 60%)")},n=a(l),r=a(i);return(0,k.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-white font-bold text-lg flex-shrink-0",style:{background:"linear-gradient(135deg, ".concat(n," 0%, ").concat(r," 100%)")},children:l})};const O=function(e){var t;let{session:s,sessionLoading:O,defaultViewMode:D="all",onShowLoginModal:q,onRevise:I}=e;const[R,T]=(0,i.useState)([]),[z,F]=(0,i.useState)(!0),[G,V]=(0,i.useState)(!1),[Y,U]=(0,i.useState)(!1),[W,H]=(0,i.useState)([]),[K,Z]=(0,n.ok)(),B=(0,r.Zp)(),J=(0,r.zy)(),$=K.get("sort"),Q=K.get("q")||"",X=K.get("cat")||"all",ee=K.get("model")||"all";(0,o.A)("my"===D?"My Extensions":"Explore AI Chrome Extensions Gallery");const[te,se]=(0,i.useState)(0),[le,ie]=(0,i.useState)(!0),[ae,ne]=(0,i.useState)(!1),re=(0,i.useRef)(null),[oe,ce]=(0,i.useState)(D),[de,xe]=(0,i.useState)("all"),[me,he]=(0,i.useState)(Q),[ue,fe]=(0,i.useState)(Q),[pe,ge]=(0,i.useState)(X),[be,ve]=(0,i.useState)(ee),[we,ye]=(0,i.useState)($||"created_desc"),[je,Ne]=(0,i.useState)(new Set),[ke,_e]=(0,i.useState)(null),[Ae,Ee]=(0,i.useState)(null),[Se,Ce]=(0,i.useState)(!1),[Me,Pe]=(0,i.useState)(Date.now()),[Le,Oe]=(0,i.useState)(!1),[De,qe]=(0,i.useState)({top:0,right:0}),Ie=(0,i.useRef)(null);(0,i.useEffect)(()=>{const e=setTimeout(()=>{fe(me)}
1,300);return()=>clearTimeout(e)},[me]);const Re=(0,i.useCallback)(e=>{const t=new URLSearchParams(K);Object.entries(e).forEach(e=>{let[s,l]=e;!l||"all"===l||"sort"===s&&"created_desc"===l?t.delete(s):t.set(s,l)}),Z(t,{replace:!0})},[K,Z]);(0,i.useEffect)(()=>{Te()},[s,oe,Me,ue,pe,be,de,we]),(0,i.useEffect)(()=>{if(z||ae||!le)return;const e=new IntersectionObserver(e=>{e[0].isIntersecting&&ze()},{threshold:.1,rootMargin:"200px"}),t=re.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[z,ae,le,te]),(0,i.useEffect)(()=>{const e=e=>{const{viewMode:t}=e.detail;ce(t),"my"===t&&ye("created_desc"),xe("all"),he(""),fe(""),ge("all"),ve("all"),Pe(Date.now())};return window.addEventListener("forceGalleryRefresh",e),()=>{window.removeEventListener("forceGalleryRefresh",e)}},[]),(0,i.useEffect)(()=>{const e=e=>{const t=Ie.current&&Ie.current.contains(e.target),s=e.target.closest("[data-sort-dropdown]");t||s||Oe(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,i.useEffect)(()=>{s?Fe():Ne(new Set)},[s]),(0,i.useEffect)(()=>{const e="/my-extensions"===J.pathname?"my":"all";ce(e),"my"===e&&ye("created_desc"),Pe(Date.now()),xe("all")},[J.pathname]);const Te=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?ne(!0):(F(!0),se(0),ie(!0));try{if("my"===oe&&!s)return T([]),F(!1),void ne(!1);const t=e?te+1:0,i=24*t,a=i+24-1;let n=v.supabase.from("extensions").select("id, name, description, created_at, user_id, version, favorite_count, view_count, ai_model, is_public, parent_id, prompt, revision_prompt, emoji").range(i,a);"my"===oe&&s?n=n.eq("user_id",s.user.id):"all"===oe&&(n=n.eq("is_public",!0)),be&&"all"!==be&&(n=n.ilike("ai_model","%".concat(be,"%")));let r=ue.trim();if(!r&&pe&&"all"!==pe){const e=M.find(e=>e.id===pe);null!==e&&void 0!==e&&e.query&&(r=e.query.split(" ")[0])}r&&(n=n.or("name.ilike.%".concat(r,"%,description.ilike.%").concat(r,"%,prompt.ilike.%").concat(r,"%,revision_prompt.
1ilike.%").concat(r,"%")));const o=C.find(e=>e.value===we)||C[0],d="asc"===o.direction;n="view_count"===o.field?n.order("view_count",{ascending:d,nullsFirst:!1}):"favorite_count"===o.field?n.order("favorite_count",{ascending:d,nullsFirst:!1}):"name"===o.field?n.order("name",{ascending:d}):n.order("created_at",{ascending:d});const{data:x,error:m}=await n;if(m)(0,c.AO)("Error fetching extensions:",m);else{const i=x&&24===x.length;ie(i);let a=(x||[]).map(e=>(0,l.A)((0,l.A)({},e),{},{revision_count:0}));"favorites"===de&&s&&(a=a.filter(e=>je.has(e.id))),e?(T(e=>[...e,...a]),se(t)):(T(a),se(0))}}catch(t){(0,c.AO)("Error:",t)}finally{e?ne(!1):F(!1)}},ze=()=>{!ae&&le&&Te(!0)},Fe=async()=>{if(s)try{const{data:e,error:t}=await v.supabase.from("favorites").select("extension_id").eq("user_id",s.user.id);if(t)(0,c.AO)("Error fetching favorites:",t);else{const t=new Set(e.map(e=>e.extension_id));Ne(t)}}catch(e){(0,c.AO)("Error fetching favorites:",e)}},Ge=R,Ve={"@context":"https://schema.org","@type":"CollectionPage",name:"Kromio AI Chrome Extension Gallery",description:"Explore and download thousands of custom Chrome extensions built with Kromio AI. Open-source, Manifest V3 compliant, and ready to install.",url:"https://kromio.ai/gallery",mainEntity:{"@type":"ItemList",itemListElement:Ge.slice(0,12).map((e,t)=>({"@type":"ListItem",position:t+1,name:e.name,url:"https://kromio.ai/extension/".concat(e.id)}))}};return(0,k.jsxs)(N.A,{children:[(0,k.jsx)("script",{type:"application/ld+json",children:JSON.stringify(Ve)}),(0,k.jsx)(w.A,{onShowFeaturesModal:()=>V(!0),onShowLoginModal:q}),(0,k.jsxs)("div",{children:[(0,k.jsx)("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-bold text-white mb-4 bg-gradient-to-r from-purple-400 to-blue-400 bg-clip-text text-transparent px-2 pb-2 text-center",children:"Extension Gallery"}),(0,k.jsx)("p",{className:"text-lg sm:text-xl text-gray-300 text-center max-w-2xl mx-auto mb-6",children:"Explore thousands of AI-generated Chrome extensions. Download code, preview UI, or remake in 1-click."}),(0,k.jsx)("div",{className:"flex items-center justify-start sm:justify-center overflow-x-auto pb-2 mb-6 gap-2 no-scrollbar",children:M.map(e=>{const t=pe===e.id;return(0,k.jsx)("button",{onClick:()=>{(0,A.M)("gallery_category_pill_click",{category:e.id}),ge(e.id),Re({cat:e.id,q:me})},className:"px-4 py-1.5 rounded-full text-xs sm:text-sm font-medium whitespace-nowrap transition-all duration-200 border ".concat(t?"bg-purple-600 border-purple-400 text-white shadow-lg shadow-purple-600/30":"bg-white/5 hover:bg-white/15 border-white/10 text-gray-300 hover:text-white"),children:e.label},e.id)})}),(0,k.jsxs)("div",{className:"bg-white/10 backdrop-blur-lg rounded-2xl p-4 sm:p-6 border border-white/20 shadow-xl mb-6 space-y-4",children:[(0,k.jsxs)("div",{className:"flex flex-col lg:flex-row gap-4 lg:gap-6 items-start lg:items-center justify-between",children:[(0,k.jsxs)("div",{className:"flex items-center space-x-2 w-full lg:w-auto",children:[(0,k.jsx)("span",{className:"text-white text-sm font-medium w-16 lg:w-auto flex-shrink-0",children:"View:"}),(0,k.jsxs)("div",{className:"bg-gray-800 rounded-lg p-1 flex w-full lg:flex-initial lg:w-auto",children:[(0,k.jsx)("button",{onClick:()=>{(0,A.M)("gallery_view_mode_toggle",{mode:"my"}),ce("my"),ye("created_desc"),Re({view:"my"})},className:"flex-1 lg:flex-initial px-3 lg:px-4 py-2 text-xs sm:text-sm font-medium rounded-md transition-colors ".concat("my"===oe?"bg-purple-600 text-white":"text-gray-300 hover:text-white"),children:"My Extensions"}),(0,k.jsx)("button",{onClick:()=>{(0,A.M)("gallery_view_mode_toggle",{mode:"all"}),ce("all"),Re({view:"all"})},className:"flex-1 lg:flex-initial px-3 lg:px-4 py-2 text-xs sm:text-sm font-medium rounded-md transition-colors ".concat("all"===oe?"bg-purple-600 text-white":"text-gray-300 hover:text-white"),children:"All Public"})]})]}),(0,k.jsxs)("div",{className:"flex items-center space-x-2 w-full lg:w-auto",children:[(0,k.jsx)("span",{className:"text-white text-sm font-medium w-16 lg:w-auto flex-shrink-0",children:"Show:"}),(0,k.jsxs)("div",{className:"bg-gray-800 rounded-lg p-1 flex w-full lg:flex-initial lg:w-auto",children:[(0,k.jsx)("button",{onClick:()=>{(0,A.M)("gallery_favorites_filter_toggle",{filter:"all"}),xe("all")},className:"flex-1 lg:flex-initial px-3 lg:px-4 py-2 text-xs sm:text-sm font-medium rounded-md transition-colors ".concat("all"===de?"bg-blue-600 text-white":"text-gray-300 hover:text-white"),children:"All"}),(0,k.jsx)("button",{onClick:()=>{(0,A.M)("gallery_favorites_filter_toggle",{filter:"favorites"}),xe("favorites")},className:"flex-1 lg:flex-initial px-3 lg:px-4 py-2 text-xs sm:text-sm font-medium rounded-md transition-colors ".concat("favorites"===de?"bg-blue-600 text-white":"text-gray-300 hover:text-white"),children:"My Favorites"})]})]}),(0,k.jsx)("div",{className:"flex items-center space-x-2 w-full lg:flex-1 lg:max-w-md",children:(0,k.jsxs)("div",{className:"relative w-full",children:[(0,k.jsx)(d.A,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),(0,k.jsx)("input",{type:"text",placeholder:"Search 3,800+ extensions by name or prompt...",value:me,onChange:e=>{const t=e.target.value;he(t),Re({q:t,cat:pe,sort:we})},className:"w-full pl-10 pr-8 py-2 bg-gray-800 border border-gray-600 rounded-lg text-white placeholder-gray-400 text-sm focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent"}),me&&(0,k.jsx)("button",{onClick:()=>{he(""),Re({q:""})},className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-white",children:(0,k.jsx)(x.A,{className:"w-4 h-4"})})]})}),(0,k.jsx)("div",{className:"relative z-50 w-full lg:w-auto",children:(0,k.jsxs)("div",{className:"flex items-center space-x-2 w-full lg:w-auto",children:[(0,k.jsx)("span",{className:"text-white text-sm font-medium w-16 lg:w-auto flex-shrink-0",children:"Sort:"}),(0,k.jsx)("div",{className:"relative w-full lg:flex-initial lg:w-auto",ref:Ie,children:(0,k.jsxs)("button",{onClick:()=>
1{if(!Le&&Ie.current){const e=Ie.current.getBoundingClientRect();qe({top:e.bottom+8,right:window.innerWidth-e.right})}Oe(!Le)},className:"flex items-center justify-between space-x-2 px-3 lg:px-4 py-2 bg-gray-800 border border-gray-600 rounded-lg text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-purple-500 transition-colors w-full text-xs sm:text-sm",children:[(0,k.jsxs)("div",{className:"flex items-center space-x-1.5 truncate",children:[(0,k.jsx)(m.A,{className:"w-3.5 h-3.5 text-purple-400 flex-shrink-0"}),(0,k.jsx)("span",{className:"truncate",children:(null===(t=C.find(e=>e.value===we))||void 0===t?void 0:t.label)||"Date Created (Newest)"})]}),(0,k.jsx)(h.A,{className:"w-4 h-4 transition-transform flex-shrink-0 ".concat(Le?"rotate-180":"")})]})})]})})]}),(0,k.jsxs)("div",{className:"pt-2 border-t border-white/10 flex items-center space-x-2 overflow-x-auto text-xs",children:[(0,k.jsxs)("span",{className:"text-gray-400 flex-shrink-0 flex items-center gap-1",children:[(0,k.jsx)(u.A,{className:"w-3 h-3 text-yellow-400"})," Model:"]}),P.map(e=>{const t=be===e.id;return(0,k.jsx)("button",{onClick:()=>{(0,A.M)("gallery_model_filter_click",{model:e.id}),ve(e.id),Re({model:e.id})},className:"px-2.5 py-1 rounded-md transition-colors whitespace-nowrap ".concat(t?"bg-yellow-500/20 text-yellow-300 border border-yellow-500/40 font-semibold":"text-gray-400 hover:text-white bg-gray-800/60"),children:e.label},e.id)})]})]}),(0,k.jsx)("div",{className:"mb-8",children:z?(0,k.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:24},(e,t)=>(0,k.jsx)(_,{},t))}):0===Ge.length?(0,k.jsxs)("div",{className:"text-center py-12",children:[(0,k.jsx)("p",{className:"text-gray-400 text-lg mb-4",children:ue.trim()||"all"!==pe?"No extensions match your filters.":"favorites"===de?s?"No favorite extensions found.":"You must log in to view your favorite extensions.":"my"===oe?s?"You haven't created any extensions yet.":"You must log in and create an extension to view your extensions.":"No public extensions available."}),!s&&("my"===oe||"favorites"===de)&&(0,k.jsx)("button",{onClick:q,className:"bg-purple-600 hover:bg-purple-700 text-white px-6 py-3 rounded-lg font-semibold transition-colors",children:"my"===oe?"Log In to View Your Extensions":"Log In to View Your Favorites"})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Ge.map(e=>{return(0,k.jsxs)(n.N_,{to:"/extension/".concat(e.id),className:"bg-white/10 backdrop-blur-lg rounded-xl p-5 border border-white/20 shadow-xl hover:shadow-2xl hover:bg-white/15 hover:border-purple-500/50 transition-all duration-300 flex flex-col justify-between no-underline text-inherit group cursor-pointer",children:[(0,k.jsxs)("div",{children:[(0,k.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[(0,k.jsxs)("div",{className:"flex items-start space-x-3 flex-1 mr-2 min-w-0",children:[(0,k.jsx)(L,{title:e.name,emoji:e.emoji}),(0,k.jsx)("h3",{className:"text-base sm:text-lg font-semibold text-white flex-1 min-w-0 line-clamp-2 leading-tight group-hover:text-purple-300 transition-colors",children:e.name})]}),(0,k.jsxs)("div",{className:"flex flex-col items-center",children:[(0,k.jsx)("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),(async e=>{if(!s)return(0,A.M)("gallery_favorite_unauthenticated_click",{extension_id:e}),void q();const t=je.has(e);(0,A.M)("gallery_favorite_click",{extension_id:e,action:t?"unfavorite":"favorite"});try{if(t){const{error:t}=await v.supabase.from("favorites").delete().eq("user_id",s.user.id).eq("extension_id",e);t?(0,c.AO)("Error removing from favorites:",t):(Ne(t=>{const s=new Set(t);return s.delete(e),s}),T(t=>t.map(t=>t.id===e?(0,l.A)((0,l.A)({},t),{},{favorite_count:Math.max(0,(t.favorite_count||1)-1)}):t)))}else{const{error:t}=await v.supabase.from("favorites").insert([{user_id:s.user.id,extension_id:e}]);t?(0,c.AO)("Error adding to favorites:",t):(Ne(t=>{const s=new Set(t);return s.add(e),s}),T(t=>t.map(t=>
1t.id===e?(0,l.A)((0,l.A)({},t),{},{favorite_count:(t.favorite_count||0)+1}):t)))}}catch(i){(0,c.AO)("Error toggling favorite:",i)}})(e.id)},className:"flex-shrink-0 p-1 hover:bg-white/10 rounded transition-colors","aria-label":s?je.has(e.id)?"Remove from favorites":"Add to favorites":"Login to favorite this extension",children:(0,k.jsx)(f.A,{className:"w-5 h-5 ".concat(je.has(e.id)?"text-yellow-400 fill-current":"text-gray-400 hover:text-yellow-400")})}),(0,k.jsx)("span",{className:"text-xs text-gray-400 mt-0.5",children:e.favorite_count||0})]})]}),(0,k.jsx)("p",{className:"text-gray-300 text-xs sm:text-sm mb-3 line-clamp-3 h-14 overflow-hidden",children:e.description||e.prompt}),e.ai_model&&(0,k.jsx)("div",{className:"mb-3",children:(0,k.jsxs)("span",{className:"text-[11px] text-gray-300 bg-gray-800/80 px-2 py-0.5 rounded-full inline-block truncate max-w-full",children:["\u2728 ",(t=e.ai_model,t?S[t]?S[t]:(0,E.$L)(t):"Unknown")]})})]}),(0,k.jsxs)("div",{className:"space-y-2 pt-2 border-t border-white/10",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between text-xs text-gray-400",children:[(0,k.jsxs)("span",{children:["v",e.version||"1.0"]}),(0,k.jsx)("span",{children:new Date(e.created_at).toLocaleDateString()})]}),(0,k.jsxs)("div",{className:"flex items-center space-x-1.5 pt-1",children:[(0,k.jsxs)("button",{onClick:t=>((e,t)=>{t.preventDefault(),t.stopPropagation(),(0,A.M)("gallery_remake_click",{extension_id:e.id,extension_name:e.name}),B("/",{state:{initialPrompt:e.prompt||e.description}})})(e,t),className:"flex items-center justify-center space-x-1 bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-500 hover:to-indigo-500 text-white px-2 py-1.5 rounded-lg transition-all text-xs font-semibold flex-1 shadow-md",title:"Load prompt into AI builder",children:[(0,k.jsx)(p.A,{className:"w-3.5 h-3.5"}),(0,k.jsx)("span",{children:"Remake"})]}),(0,k.jsxs)("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),_e(e),Ee(null),(async e=>{Ce(!0);try{const{data:t,error:s}=await v.supabase.from("extensions").select("files").eq("id",e).single();s?((0,c.AO)("Error fetching preview files:",s),Ee(null)):Ee(t.files)}catch(t){(0,c.AO)("Error loading preview files:",t),Ee(null)}finally{Ce(!1)}})(e.id)},className:"flex items-center justify-center space-x-1 bg-gray-700 hover:bg-gray-600 text-white px-2 py-1.5 rounded-lg transition-colors text-xs font-medium flex-1",children:[(0,k.jsx)(g.A,{className:"w-3.5 h-3.5"}),(0,k.jsx)("span",{children:"Preview"})]}),(0,k.jsxs)("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),s?I(e):q()},className:"flex items-center justify-center space-x-1 bg-gray-700 hover:bg-gray-600 text-white px-2 py-1.5 rounded-lg transition-colors text-xs font-medium flex-1",title:"Revise with AI",children:[(0,k.jsx)(b.A,{className:"w-3.5 h-3.5"}),(0,k.jsx)("span",{children:"Revise"})]})]})]})]},e.id);var t})}),ae&&(0,k.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 mt-6",children:Array.from({length:8},(e,t)=>(0,k.jsx)(_,{},"loading-".concat(t)))}),(0,k.jsx)("div",{ref:re,className:"h-10 w-full"}),!z&&Ge.length>0&&le&&!ae&&(0,k.jsx)("div",{className:"text-center mt-4",children:(0,k.jsx)("button",{onClick:ze,className:"bg-purple-600/50 hover:bg-purple-600 text-white text-sm px-6 py-2 rounded-lg font-medium transition-colors",children:"Load More"})}),!z&&Ge.length>0&&!le&&(0,k.jsx)("div",{className:"text-center mt-8 py-4 border-t border-white/10",children:(0,k.jsx)("p",{className:"text-gray-400 text-sm",children:ue.trim()?"Showing all ".concat(Ge.length,' results for "').concat(ue,'"'):"You've explored all ".concat(Ge.length," public Chrome extensions! \ud83d\ude80")})})]})})]}),(0,k.jsx)(y.A,{isOpen:G,onClose:()=>V(!1)}),(0,k.jsx)(j.default,{isOpen:Y,onClose:()=>U(!1),extensions:W,onSelectExtension:e=>{U(!1),B("/extension/".concat(e.id))}}),ke&&(0,k.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-80 flex items-center justify-center z-[9999] p-2 sm:p-4",onClick:()=>_e(null),children:(0,k.jsxs)("div",{className:"bg-gray-800 rounded-lg shadow-2xl w-full max-w-6xl relative h-[90vh] sm:max-h-[90vh] flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,k.jsxs)("div",{className:"flex items-center justify-between p-3 sm:p-4 border-b border-gray-700 flex-shrink-0",children:[(0,k.jsxs)("h3",{className:"text-lg sm:text-xl font-bold text-white truncate mr-4",children:["Preview: ",ke.name]}),(0,k.jsx)("button",{onClick:()=>_e(null),className:"text-gray-400 hover:text-white flex-shrink-0",children:(0,k.jsx)(x.A,{className:"w-6 h-6"})})]}),(0,k.jsx)("div",{className:"px-3 sm:px-4 py-2 bg-yellow-500/10 border-b border-yellow-500/20 flex-shrink-0",children:(0,k.jsx)("p",{className:"text-yellow-300 text-sm text-center",children:"\u26a0\ufe0f Preview may not render accurately. Data fetching doesn't work and button clicks won't respond properly."})}),(0,k.jsx)("div",{className:"p-2 sm:p-4 bg-white flex-1 min-h-0",children:(0,k.jsx)("iframe",{srcDoc:(()=>
1{if(Se)return'<div style="padding: 20px; font-family: Arial; color: #666; text-align: center;">Loading preview...</div>';if(!Ae)return'<div style="padding: 20px; font-family: Arial; color: #333;">Preview unavailable: No files found.</div>';const e=Object.keys(Ae).find(e=>e.endsWith(".html"));if(!e)return'<div style="padding: 20px; font-family: Arial; color: #333;">Preview unavailable: No HTML file found.</div>';let t=Ae[e];const s=Object.keys(Ae).find(e=>e.endsWith(".css")),l=s?Ae[s]:"";t=t.replace(/<link.*rel="stylesheet".*>/g,"");const i='\n      body {\n        margin: 0;\n        padding: 10px;\n        font-family: Arial, sans-serif;\n        background-color: #ffffff;\n        color: #333333;\n        min-width: 0;\n        overflow-x: auto;\n      }\n      \n      /* Mobile-responsive fixes */\n      @media (max-width: 768px) {\n        body {\n          padding: 5px;\n        }\n        \n        /* Scale down fixed-width elements on mobile */\n        * {\n          max-width: 100% !important;\n          box-sizing: border-box;\n        }\n        \n        /* Handle common fixed-width patterns */\n        [style*="width: 400px"], [style*="width:400px"],\n        [style*="width: 500px"], [style*="width:500px"] {\n          width: 100% !important;\n          max-width: 100% !important;\n        }\n        \n        /* Responsive text sizing */\n        body {\n          font-size: 14px;\n        }\n        \n        /* Handle absolute positioning issues */\n        [style*="position: absolute"], [style*="position:absolute"] {\n          position: relative !important;\n        }\n      }\n    \n'+(l||"");if(t.includes("</head>")){let e=t;return t.includes("viewport")||(e=t.replace("<head>",'<head>\n<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes, minimum-scale=0.5, maximum-scale=2.0">')),e.replace("</head>","<style>".concat(i,"</style></head>"))}return'<!DOCTYPE html><html><head>\n<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes, minimum-scale=0.5, maximum-scale=2.0">\n<style>'.concat(i,"</style></head><body>").concat(t,"</body></html>")})(),className:"w-full h-full border-none rounded",title:"Preview of ".concat(ke.name),sandbox:"allow-scripts allow-modals"})})]})}),Le&&(0,a.createPortal)((0,k.jsx)("div",{"data-sort-dropdown":!0,className:"fixed w-56 bg-gray-800 border border-gray-600 rounded-lg shadow-2xl",style:{top:De.top+"px",right:De.right+"px",zIndex:99999},children:C.map(e=>(0,k.jsx)("button",{onClick:()=>{(0,A.M)("gallery_sort_change",{sort_by:e.value,label:e.label}),ye(e.value),saveState({sortBy:e.value}),Oe(!1)},className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-700 transition-colors first:rounded-t-lg last:rounded-b-lg ".concat(we===e.value?"bg-purple-600 text-white":"text-gray-300"),children:e.label},e.value))}),document.body)]})}},3443:(e,t,s)=>{s.d(t,{A:()=>l});const l=(0,s(3797).A)("Wand2",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72Z",key:"1bcowg"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]])},4951:(e,t,s)=>{s.d(t,{A:()=>i});var l=s(5043);const i=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(0,l.useEffect)(()=>{document.title;const s=t&&!e.includes("Kromio")?"".concat(e," - Kromio"):e;document.title=s;const l=document.querySelector('meta[property="og:title"]');l&&l.setAttribute("content",s);const i=document.querySelector('meta[property="twitter:title"]');return i&&i.setAttribute("content",s),()=>{}},[e,t])}}}]);
2//# sourceMappingURL=917.e2c298b6.chunk.js.map

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.