From 34314f8b220ed587c5f1260b1d240e5841b3a1b0 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 06:50:58 +0000 Subject: [PATCH] perf: consolidate useMemo hooks and avoid map/flatMap for categories and profiles Co-authored-by: alazndy <78882672+alazndy@users.noreply.github.com> --- components/CategoryFilterWidget.tsx | 21 ++++++--- ...Modal-Ylmnq22h.js => AddModal-b9YQl9w7.js} | 2 +- ...js => BackgroundSettingsModal-DLn0MpXH.js} | 2 +- ...oYPW.js => ClockSettingsModal-BgJzA91Y.js} | 2 +- ...JZs6xGL.js => FolderViewModal-a6QU9HbF.js} | 2 +- ...1.js => ShortcutSettingsModal-7JjP3Ut6.js} | 2 +- .../{main-BX_0fFXn.js => main-ByMmISQz.js} | 4 +- dist-store/index.html | 44 +++++++++---------- src/vite-env.d.ts | 1 + 9 files changed, 46 insertions(+), 34 deletions(-) rename dist-store/assets/{AddModal-Ylmnq22h.js => AddModal-b9YQl9w7.js} (99%) rename dist-store/assets/{BackgroundSettingsModal-B5X-Q6xJ.js => BackgroundSettingsModal-DLn0MpXH.js} (99%) rename dist-store/assets/{ClockSettingsModal-CueBoYPW.js => ClockSettingsModal-BgJzA91Y.js} (99%) rename dist-store/assets/{FolderViewModal-DJZs6xGL.js => FolderViewModal-a6QU9HbF.js} (97%) rename dist-store/assets/{ShortcutSettingsModal-CjZJDRQ1.js => ShortcutSettingsModal-7JjP3Ut6.js} (99%) rename dist-store/assets/{main-BX_0fFXn.js => main-ByMmISQz.js} (76%) create mode 100644 src/vite-env.d.ts diff --git a/components/CategoryFilterWidget.tsx b/components/CategoryFilterWidget.tsx index 992f1bc..83e1acc 100644 --- a/components/CategoryFilterWidget.tsx +++ b/components/CategoryFilterWidget.tsx @@ -6,12 +6,23 @@ import { UsersIcon } from '@heroicons/react/24/outline'; export const CategoryFilterWidget: React.FC = () => { const { shortcuts, filterCategory, setFilterCategory, filterProfile, setFilterProfile } = useGTab(); - const activeCategories = useMemo(() => { - return ['All', ...new Set(shortcuts.map(s => s.category))]; - }, [shortcuts]); + const { activeCategories, uniqueProfiles } = useMemo(() => { + const categoriesSet = new Set(); + const profilesSet = new Set(); + + for (const s of shortcuts) { + if (s.category) categoriesSet.add(s.category); + if (s.profiles) { + for (const p of s.profiles) { + if (p.name) profilesSet.add(p.name); + } + } + } - const uniqueProfiles = useMemo(() => { - return Array.from(new Set(shortcuts.flatMap(s => s.profiles?.map(p => p.name) || []))).sort(); + return { + activeCategories: ['All', ...categoriesSet], + uniqueProfiles: Array.from(profilesSet).sort() + }; }, [shortcuts]); return ( diff --git a/dist-store/assets/AddModal-Ylmnq22h.js b/dist-store/assets/AddModal-b9YQl9w7.js similarity index 99% rename from dist-store/assets/AddModal-Ylmnq22h.js rename to dist-store/assets/AddModal-b9YQl9w7.js index d26b31f..84d98a0 100644 --- a/dist-store/assets/AddModal-Ylmnq22h.js +++ b/dist-store/assets/AddModal-b9YQl9w7.js @@ -1 +1 @@ -import{r as l,C as u,j as e}from"./index-DEWape2v.js";import{F as k}from"./ChevronLeftIcon-DHpP5kml.js";import{F as C,a as E}from"./main-BX_0fFXn.js";import{F}from"./LinkIcon-2Miy7fz5.js";function R({title:r,titleId:i,...n},x){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:x,"aria-labelledby":i},n),r?l.createElement("title",{id:i},r):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const v=l.forwardRef(R),L=({isOpen:r,onClose:i,onAdd:n,groups:x,isInsideGroup:o,initialUrl:h})=>{const[s,c]=l.useState("choose"),[a,m]=l.useState(""),[b,f]=l.useState(""),[p,w]=l.useState(u.OTHER),[g,j]=l.useState("");if(l.useEffect(()=>{r&&(c(h||o?"shortcut":"choose"),m(""),f(h??""),w(u.OTHER),j(""))},[r,o,h]),!r)return null;const d=()=>i(),y=t=>{t.preventDefault(),n([{title:a.trim(),url:b.trim(),category:p}],g||void 0),d()},N=t=>{t.preventDefault(),a.trim()&&(n([{title:a.trim(),url:"",category:u.OTHER,isFolder:!0,children:[]}]),d())};return e.jsxs("div",{className:"fixed inset-0 z-[90] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:d}),e.jsxs("div",{className:"relative w-full max-w-sm bg-black/50 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl animate-slide-up text-white overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-white/10",children:[s!=="choose"&&!o&&e.jsx("button",{type:"button",onClick:()=>c("choose"),className:"text-white/40 hover:text-white transition-colors",children:e.jsx(k,{className:"w-4 h-4"})}),e.jsxs("span",{className:"text-sm font-semibold flex-1",children:[s==="choose"&&"Ne eklemek istiyorsun?",s==="shortcut"&&(o?"Gruba Kısayol Ekle":"Kısayol Ekle"),s==="group"&&"Grup Oluştur"]}),e.jsx("button",{onClick:d,className:"text-white/40 hover:text-white transition-colors",children:e.jsx(C,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"p-5",children:[s==="choose"&&e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("button",{onClick:()=>c("shortcut"),className:"flex flex-col items-center gap-3 py-6 px-4 rounded-xl bg-blue-500/10 border border-blue-500/20 hover:bg-blue-500/20 hover:border-blue-500/40 transition-all group",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/20 flex items-center justify-center group-hover:scale-110 transition-transform",children:e.jsx(F,{className:"w-6 h-6 text-blue-400"})}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-sm font-semibold text-white",children:"Kısayol"}),e.jsx("div",{className:"text-[11px] text-white/40 mt-0.5 leading-tight",children:"URL veya uygulama linki"})]})]}),e.jsxs("button",{onClick:()=>c("group"),className:"flex flex-col items-center gap-3 py-6 px-4 rounded-xl bg-yellow-500/10 border border-yellow-500/20 hover:bg-yellow-500/20 hover:border-yellow-500/40 transition-all group",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-yellow-500/20 flex items-center justify-center group-hover:scale-110 transition-transform",children:e.jsx(v,{className:"w-6 h-6 text-yellow-400"})}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-sm font-semibold text-white",children:"Grup"}),e.jsx("div",{className:"text-[11px] text-white/40 mt-0.5 leading-tight",children:"Linkleri bir arada tut"})]})]})]}),s==="shortcut"&&e.jsxs("form",{onSubmit:y,className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/50 mb-1.5",children:"Ad"}),e.jsx("input",{type:"text",required:!0,autoFocus:!0,value:a,onChange:t=>m(t.target.value),placeholder:"Örn: Spotify",className:"w-full bg-black/40 border border-white/10 rounded-lg px-3 py-2.5 text-sm text-white placeholder-white/20 focus:border-blue-500/50 focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/50 mb-1.5",children:"URL veya Protokol"}),e.jsx("input",{type:"text",required:!0,value:b,onChange:t=>f(t.target.value),placeholder:"https://... veya spotify: steam:",className:"w-full bg-black/40 border border-white/10 rounded-lg px-3 py-2.5 text-sm text-white font-mono placeholder-white/20 focus:border-blue-500/50 focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/50 mb-1.5",children:"Kategori"}),e.jsx("select",{value:p,onChange:t=>w(t.target.value),className:"w-full bg-black/40 border border-white/10 rounded-lg px-3 py-2.5 text-sm text-white focus:border-blue-500/50 focus:outline-none",children:Object.values(u).map(t=>e.jsx("option",{value:t,className:"bg-black",children:t},t))})]}),!o&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/50 mb-1.5",children:"Nereye eklensin?"}),e.jsxs("select",{value:g,onChange:t=>j(t.target.value),className:"w-full bg-black/40 border border-white/10 rounded-lg px-3 py-2.5 text-sm text-white focus:border-blue-500/50 focus:outline-none",children:[e.jsx("option",{value:"",className:"bg-black",children:"Ana sayfaya ekle"}),x.map(t=>e.jsxs("option",{value:t.id,className:"bg-black",children:["📁 ",t.title]},t.id))]})]}),e.jsxs("button",{type:"submit",className:"w-full bg-blue-600 hover:bg-blue-500 text-white font-medium py-2.5 rounded-lg transition-colors flex items-center justify-center gap-2 text-sm mt-1",children:[e.jsx(E,{className:"w-4 h-4"}),"Ekle"]})]}),s==="group"&&e.jsxs("form",{onSubmit:N,className:"flex flex-col gap-4",children:[e.jsx("div",{className:"bg-yellow-500/8 border border-yellow-500/20 rounded-lg p-3",children:e.jsx("p",{className:"text-xs text-yellow-200/70 leading-relaxed",children:"Grubu oluşturduktan sonra üzerine tıklayarak içine kısayol ekleyebilirsin."})}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/50 mb-1.5",children:"Grup Adı"}),e.jsx("input",{type:"text",required:!0,autoFocus:!0,value:a,onChange:t=>m(t.target.value),placeholder:"Örn: Geliştirici Araçları",className:"w-full bg-black/40 border border-white/10 rounded-lg px-3 py-2.5 text-sm text-white placeholder-white/20 focus:border-yellow-500/50 focus:outline-none"})]}),e.jsxs("button",{type:"submit",className:"w-full bg-yellow-600 hover:bg-yellow-500 text-white font-medium py-2.5 rounded-lg transition-colors flex items-center justify-center gap-2 text-sm mt-1",children:[e.jsx(v,{className:"w-4 h-4"}),"Grubu Oluştur"]})]})]})]})]})};export{L as default}; +import{r as l,C as u,j as e}from"./index-DEWape2v.js";import{F as k}from"./ChevronLeftIcon-DHpP5kml.js";import{F as C,a as E}from"./main-ByMmISQz.js";import{F}from"./LinkIcon-2Miy7fz5.js";function R({title:r,titleId:i,...n},x){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:x,"aria-labelledby":i},n),r?l.createElement("title",{id:i},r):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const v=l.forwardRef(R),L=({isOpen:r,onClose:i,onAdd:n,groups:x,isInsideGroup:o,initialUrl:h})=>{const[s,c]=l.useState("choose"),[a,m]=l.useState(""),[b,f]=l.useState(""),[p,w]=l.useState(u.OTHER),[g,j]=l.useState("");if(l.useEffect(()=>{r&&(c(h||o?"shortcut":"choose"),m(""),f(h??""),w(u.OTHER),j(""))},[r,o,h]),!r)return null;const d=()=>i(),y=t=>{t.preventDefault(),n([{title:a.trim(),url:b.trim(),category:p}],g||void 0),d()},N=t=>{t.preventDefault(),a.trim()&&(n([{title:a.trim(),url:"",category:u.OTHER,isFolder:!0,children:[]}]),d())};return e.jsxs("div",{className:"fixed inset-0 z-[90] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:d}),e.jsxs("div",{className:"relative w-full max-w-sm bg-black/50 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl animate-slide-up text-white overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-white/10",children:[s!=="choose"&&!o&&e.jsx("button",{type:"button",onClick:()=>c("choose"),className:"text-white/40 hover:text-white transition-colors",children:e.jsx(k,{className:"w-4 h-4"})}),e.jsxs("span",{className:"text-sm font-semibold flex-1",children:[s==="choose"&&"Ne eklemek istiyorsun?",s==="shortcut"&&(o?"Gruba Kısayol Ekle":"Kısayol Ekle"),s==="group"&&"Grup Oluştur"]}),e.jsx("button",{onClick:d,className:"text-white/40 hover:text-white transition-colors",children:e.jsx(C,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"p-5",children:[s==="choose"&&e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("button",{onClick:()=>c("shortcut"),className:"flex flex-col items-center gap-3 py-6 px-4 rounded-xl bg-blue-500/10 border border-blue-500/20 hover:bg-blue-500/20 hover:border-blue-500/40 transition-all group",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/20 flex items-center justify-center group-hover:scale-110 transition-transform",children:e.jsx(F,{className:"w-6 h-6 text-blue-400"})}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-sm font-semibold text-white",children:"Kısayol"}),e.jsx("div",{className:"text-[11px] text-white/40 mt-0.5 leading-tight",children:"URL veya uygulama linki"})]})]}),e.jsxs("button",{onClick:()=>c("group"),className:"flex flex-col items-center gap-3 py-6 px-4 rounded-xl bg-yellow-500/10 border border-yellow-500/20 hover:bg-yellow-500/20 hover:border-yellow-500/40 transition-all group",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-yellow-500/20 flex items-center justify-center group-hover:scale-110 transition-transform",children:e.jsx(v,{className:"w-6 h-6 text-yellow-400"})}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-sm font-semibold text-white",children:"Grup"}),e.jsx("div",{className:"text-[11px] text-white/40 mt-0.5 leading-tight",children:"Linkleri bir arada tut"})]})]})]}),s==="shortcut"&&e.jsxs("form",{onSubmit:y,className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/50 mb-1.5",children:"Ad"}),e.jsx("input",{type:"text",required:!0,autoFocus:!0,value:a,onChange:t=>m(t.target.value),placeholder:"Örn: Spotify",className:"w-full bg-black/40 border border-white/10 rounded-lg px-3 py-2.5 text-sm text-white placeholder-white/20 focus:border-blue-500/50 focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/50 mb-1.5",children:"URL veya Protokol"}),e.jsx("input",{type:"text",required:!0,value:b,onChange:t=>f(t.target.value),placeholder:"https://... veya spotify: steam:",className:"w-full bg-black/40 border border-white/10 rounded-lg px-3 py-2.5 text-sm text-white font-mono placeholder-white/20 focus:border-blue-500/50 focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/50 mb-1.5",children:"Kategori"}),e.jsx("select",{value:p,onChange:t=>w(t.target.value),className:"w-full bg-black/40 border border-white/10 rounded-lg px-3 py-2.5 text-sm text-white focus:border-blue-500/50 focus:outline-none",children:Object.values(u).map(t=>e.jsx("option",{value:t,className:"bg-black",children:t},t))})]}),!o&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/50 mb-1.5",children:"Nereye eklensin?"}),e.jsxs("select",{value:g,onChange:t=>j(t.target.value),className:"w-full bg-black/40 border border-white/10 rounded-lg px-3 py-2.5 text-sm text-white focus:border-blue-500/50 focus:outline-none",children:[e.jsx("option",{value:"",className:"bg-black",children:"Ana sayfaya ekle"}),x.map(t=>e.jsxs("option",{value:t.id,className:"bg-black",children:["📁 ",t.title]},t.id))]})]}),e.jsxs("button",{type:"submit",className:"w-full bg-blue-600 hover:bg-blue-500 text-white font-medium py-2.5 rounded-lg transition-colors flex items-center justify-center gap-2 text-sm mt-1",children:[e.jsx(E,{className:"w-4 h-4"}),"Ekle"]})]}),s==="group"&&e.jsxs("form",{onSubmit:N,className:"flex flex-col gap-4",children:[e.jsx("div",{className:"bg-yellow-500/8 border border-yellow-500/20 rounded-lg p-3",children:e.jsx("p",{className:"text-xs text-yellow-200/70 leading-relaxed",children:"Grubu oluşturduktan sonra üzerine tıklayarak içine kısayol ekleyebilirsin."})}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/50 mb-1.5",children:"Grup Adı"}),e.jsx("input",{type:"text",required:!0,autoFocus:!0,value:a,onChange:t=>m(t.target.value),placeholder:"Örn: Geliştirici Araçları",className:"w-full bg-black/40 border border-white/10 rounded-lg px-3 py-2.5 text-sm text-white placeholder-white/20 focus:border-yellow-500/50 focus:outline-none"})]}),e.jsxs("button",{type:"submit",className:"w-full bg-yellow-600 hover:bg-yellow-500 text-white font-medium py-2.5 rounded-lg transition-colors flex items-center justify-center gap-2 text-sm mt-1",children:[e.jsx(v,{className:"w-4 h-4"}),"Grubu Oluştur"]})]})]})]})]})};export{L as default}; diff --git a/dist-store/assets/BackgroundSettingsModal-B5X-Q6xJ.js b/dist-store/assets/BackgroundSettingsModal-DLn0MpXH.js similarity index 99% rename from dist-store/assets/BackgroundSettingsModal-B5X-Q6xJ.js rename to dist-store/assets/BackgroundSettingsModal-DLn0MpXH.js index 50c9bdf..566a05c 100644 --- a/dist-store/assets/BackgroundSettingsModal-B5X-Q6xJ.js +++ b/dist-store/assets/BackgroundSettingsModal-DLn0MpXH.js @@ -1 +1 @@ -import{r as i,j as e,d as X,e as q}from"./index-DEWape2v.js";import{i as w,b as k,P as Q,f as K,j as $,k as N,c as ee,F as T,D as M,l as se,s as te,m as ae,n as re,o as ie}from"./main-BX_0fFXn.js";import{F as le}from"./LinkIcon-2Miy7fz5.js";function ne({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))}const de=i.forwardRef(ne);function oe({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}))}const ce=i.forwardRef(oe);function xe({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const he=i.forwardRef(xe);function me({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"}))}const pe=i.forwardRef(me);function be({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42"}))}const y=i.forwardRef(be);function ue({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 14.25h13.5m-13.5 0a3 3 0 0 1-3-3m3 3a3 3 0 1 0 0 6h13.5a3 3 0 1 0 0-6m-16.5-3a3 3 0 0 1 3-3h13.5a3 3 0 0 1 3 3m-19.5 0a4.5 4.5 0 0 1 .9-2.7L5.737 5.1a3.375 3.375 0 0 1 2.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 0 1 .9 2.7m0 0a3 3 0 0 1-3 3m0 3h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Zm-3 6h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Z"}))}const z=i.forwardRef(ue);function ge({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z"}))}const we=i.forwardRef(ge),je=[{id:"default",name:"Varsayılan",desc:"Klasik glassmorphism.",gradient:"from-slate-800 to-slate-900"},{id:"neon",name:"Neon Cyber",desc:"Mor-pembe neon geçişi.",gradient:"from-indigo-900 via-purple-900 to-pink-900"},{id:"starship",name:"Starship",desc:"Derin uzay, mavi aksan.",gradient:"from-gray-950 to-blue-950"},{id:"terminal",name:"Terminal",desc:"Retro yeşil-siyah.",gradient:"from-black to-green-950"},{id:"portal",name:"Aperture",desc:"#FF9900 turuncu · #99CCFF mavi portal.",gradient:"from-[#131313] via-[#1a1a1a] to-[#2A2A2A]"},{id:"custom",name:"Özel Tema",desc:"Kendi renklerini belirle.",gradient:"from-blue-600 via-purple-600 to-pink-600"}],fe=[{name:"Siyah",value:"#000000"},{name:"Koyu Gri",value:"#121212"},{name:"Gece Mavisi",value:"#0f172a"},{name:"Derin Mor",value:"#1e1b4b"},{name:"Orman",value:"#022c22"},{name:"Bordo",value:"#450a0a"}],ve=[{id:"sharp",label:"Keskin",radius:0},{id:"rounded",label:"Yuvarlak",radius:12},{id:"pill",label:"Kapsül",radius:24}],Ne=[{id:"sm",label:"Küçük",bars:1},{id:"md",label:"Orta",bars:2},{id:"lg",label:"Büyük",bars:3},{id:"xl",label:"Çok Büyük",bars:4}],ye=[{id:"left",label:"Sol",bars:[!0,!1,!1]},{id:"center",label:"Merkez",bars:[!1,!0,!1]},{id:"right",label:"Sağ",bars:[!1,!1,!0]}],ke=[{id:"geist",label:"Geist Sans",style:{fontFamily:'"Geist Sans", system-ui, sans-serif'}},{id:"system",label:"Sistem",style:{fontFamily:"system-ui, sans-serif"}},{id:"mono",label:"Monospace",style:{fontFamily:'"Geist Mono", monospace'}},{id:"serif",label:"Serif",style:{fontFamily:"Georgia, serif"}}],Be=[{id:"xs",label:"Çok Küçük",px:16},{id:"sm",label:"Küçük",px:24},{id:"md",label:"Orta",px:32},{id:"lg",label:"Büyük",px:44}],G={clock:"Saat & Tarih",search:"Arama Çubuğu",tasks:"Görevler",categories:"Kategori & Profil",shortcuts:"Kısayollar",gmail:"Gmail",calendar:"Takvim",stocks:"Borsa","google-tasks":"Google Görevler","google-keep":"Google Keep",weather:"Hava Durumu",pomodoro:"Pomodoro Timer",spotify:"Spotify"},x=({children:t})=>e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-white/40 mb-0",children:t}),g=({active:t,onClick:a,children:s,className:l=""})=>e.jsx("button",{onClick:a,className:`transition-all text-left ${t?"bg-white/10 border-white/30 text-white":"bg-white/5 border-white/8 text-white/60 hover:bg-white/8 hover:text-white/80"} border rounded-xl ${l}`,children:s}),Ee=[{id:"themes",label:"Tema"},{id:"presets",label:"Fotoğraf"},{id:"color",label:"Renk"},{id:"custom",label:"Özel URL"}],Ae=({bgMode:t,setBgMode:a,currentConfig:s,applyBg:l,customUrl:h,setCustomUrl:b})=>e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx("div",{className:"flex gap-2 flex-wrap",children:Ee.map(n=>e.jsx("button",{onClick:()=>a(n.id),className:`px-3 py-1.5 rounded-full text-xs font-medium transition-all border ${t===n.id?"bg-blue-500/20 border-blue-500/50 text-blue-400":"bg-white/5 border-white/10 text-white/50 hover:bg-white/10 hover:text-white/80"}`,children:n.label},n.id))}),t==="themes"&&e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:je.map(n=>{const p=s.type==="theme"&&s.value===n.id;return e.jsxs("button",{onClick:()=>l("theme",n.id),className:`p-4 rounded-xl border transition-all text-left relative overflow-hidden group ${p?"border-blue-500/50 ring-1 ring-blue-500/20":"border-white/8 hover:border-white/20"}`,children:[e.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${n.gradient} opacity-20 group-hover:opacity-40 transition-opacity`}),e.jsxs("div",{className:"relative flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-semibold text-white",children:n.name}),e.jsx("div",{className:"text-xs text-white/50 mt-0.5",children:n.desc})]}),p&&e.jsx(w,{className:"w-4 h-4 text-blue-400 flex-shrink-0"})]})]},n.id)})}),t==="presets"&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("button",{onClick:()=>l("random",""),className:`flex items-center gap-3 p-3 rounded-xl border transition-all ${s.type==="random"?"bg-white/10 border-white/30":"bg-white/5 border-white/10 hover:bg-white/8"}`,children:[e.jsx(k,{className:"w-4 h-4 text-white/60 flex-shrink-0"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"text-sm font-medium",children:"Rastgele"}),e.jsx("div",{className:"text-xs text-white/40",children:"Her açılışta farklı bir fotoğraf"})]}),s.type==="random"&&e.jsx(w,{className:"w-4 h-4 ml-auto text-white"})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:Q.map((n,p)=>{const r=s.type==="image"&&s.value===n;return e.jsxs("button",{onClick:()=>l("image",n),className:`relative aspect-video rounded-lg overflow-hidden border-2 transition-all ${r?"border-white/60 scale-95":"border-transparent hover:border-white/20"}`,children:[e.jsx("img",{src:n,alt:"",className:"w-full h-full object-cover"}),r&&e.jsx("div",{className:"absolute inset-0 bg-black/40 flex items-center justify-center",children:e.jsx(w,{className:"w-5 h-5 text-white drop-shadow"})})]},p)})})]}),t==="color"&&e.jsx("div",{className:"grid grid-cols-3 gap-3",children:fe.map(n=>{const p=s.type==="color"&&s.value===n.value;return e.jsxs("button",{onClick:()=>l("color",n.value),className:`rounded-xl border overflow-hidden transition-all ${p?"border-white/50 scale-95":"border-white/8 hover:border-white/25"}`,children:[e.jsx("div",{className:"h-16",style:{backgroundColor:n.value}}),e.jsx("div",{className:`px-3 py-2 text-xs font-medium text-center ${p?"text-white":"text-white/60"}`,children:n.name})]},n.value)})}),t==="custom"&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-xs text-white/50 leading-relaxed",children:"Herhangi bir resim veya GIF URL'sini yapıştır."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(le,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-white/30 w-4 h-4"}),e.jsx("input",{type:"text",value:h,onChange:n=>b(n.target.value),placeholder:"https://example.com/bg.jpg",className:"w-full bg-black/30 border border-white/10 rounded-lg py-2.5 pl-10 pr-4 text-sm text-white placeholder-white/20 focus:border-white/30 focus:outline-none"})]}),e.jsx("button",{onClick:()=>h.trim()&&l("image",h),disabled:!h.trim(),className:"px-5 bg-white/15 hover:bg-white/25 text-white font-medium rounded-lg transition-colors disabled:opacity-30 disabled:cursor-not-allowed text-sm",children:"Uygula"})]}),s.type==="image"&&s.value&&e.jsx("div",{className:"rounded-xl overflow-hidden border border-white/10 h-36",children:e.jsx("img",{src:s.value,className:"w-full h-full object-cover opacity-60",alt:"Önizleme"})})]})]}),Fe=({localCard:t,cardSet:a})=>e.jsxs("div",{className:"space-y-6 animate-fade-in",children:[e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-6",children:[e.jsxs("h3",{className:"text-sm font-semibold text-white mb-6 flex items-center gap-2",children:[e.jsx(K,{className:"w-5 h-5 text-blue-400"})," Düzen ve Yerleşim"]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(x,{children:"Kart Genişliği (%)"}),e.jsxs("span",{className:"text-xs font-bold text-blue-400 bg-blue-500/10 px-2 py-0.5 rounded",children:[t.cardWidth??100,"%"]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(pe,{className:"w-4 h-4 text-white/20"}),e.jsx("input",{type:"range",min:20,max:100,step:1,value:t.cardWidth??100,onChange:s=>a("cardWidth",Number(s.target.value)),className:"flex-1 accent-blue-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(x,{children:"Bir Satırdaki Kısayol (Kolon)"}),e.jsx("span",{className:"text-xs font-bold text-blue-400 bg-blue-500/10 px-2 py-0.5 rounded",children:t.gridCols??6})]}),e.jsx("input",{type:"range",min:2,max:12,step:1,value:t.gridCols??6,onChange:s=>a("gridCols",Number(s.target.value)),className:"w-full accent-blue-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(x,{children:"Yatay Aralık"}),e.jsxs("span",{className:"text-xs font-bold text-blue-400 bg-blue-500/10 px-2 py-0.5 rounded",children:[t.gridGapX??16,"px"]})]}),e.jsx("input",{type:"range",min:0,max:64,step:2,value:t.gridGapX??16,onChange:s=>a("gridGapX",Number(s.target.value)),className:"w-full accent-blue-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(x,{children:"Dikey Aralık"}),e.jsxs("span",{className:"text-xs font-bold text-blue-400 bg-blue-500/10 px-2 py-0.5 rounded",children:[t.gridGapY??16,"px"]})]}),e.jsx("input",{type:"range",min:0,max:64,step:2,value:t.gridGapY??16,onChange:s=>a("gridGapY",Number(s.target.value)),className:"w-full accent-blue-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),e.jsxs("div",{className:"md:col-span-2 mt-2",children:[e.jsx("div",{className:"mb-3",children:e.jsx(x,{children:"Sayfa Hizalaması"})}),e.jsx("div",{className:"grid grid-cols-3 gap-3",children:ye.map(s=>e.jsxs(g,{active:t.alignment===s.id,onClick:()=>a("alignment",s.id),className:"p-3 flex flex-col items-center gap-2",children:[e.jsx("div",{className:"flex gap-1 items-end h-4",children:s.bars.map((l,h)=>e.jsx("div",{className:`w-2 h-3 rounded-sm ${l?"bg-white/70":"bg-white/15"}`},h))}),e.jsx("span",{className:"text-xs",children:s.label})]},s.id))})]})]})]}),e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-6",children:[e.jsxs("h3",{className:"text-sm font-semibold text-white mb-6 flex items-center gap-2",children:[e.jsx($,{className:"w-5 h-5 text-pink-400"})," Görünüm ve Efektler"]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-8",children:[e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-3",children:e.jsx(x,{children:"Kart Boyutu"})}),e.jsx("div",{className:"grid grid-cols-4 gap-2",children:Ne.map(s=>e.jsxs(g,{active:t.size===s.id,onClick:()=>a("size",s.id),className:"p-3 flex flex-col items-center gap-2",children:[e.jsx("div",{className:"flex flex-col gap-0.5 w-full items-center",children:Array.from({length:s.bars}).map((l,h)=>e.jsx("div",{className:"w-6 h-1.5 bg-white/30 rounded-sm"},h))}),e.jsx("span",{className:"text-xs",children:s.label})]},s.id))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-3",children:e.jsx(x,{children:"Köşe Şekli"})}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:ve.map(s=>e.jsxs(g,{active:t.shape===s.id,onClick:()=>a("shape",s.id),className:"p-3 flex flex-col items-center gap-2",children:[e.jsx("div",{className:"w-10 h-6 bg-white/20",style:{borderRadius:s.radius}}),e.jsx("span",{className:"text-xs",children:s.label})]},s.id))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-3",children:e.jsx(x,{children:"Hover Parlama (Glow)"})}),e.jsxs("button",{onClick:()=>a("glowEnabled",!t.glowEnabled),className:`flex items-center gap-3 w-full p-4 rounded-xl border transition-all ${t.glowEnabled?"bg-pink-500/10 border-pink-500/50 text-white":"bg-white/5 border-white/10 text-white/40"}`,children:[e.jsx("div",{className:`p-2 rounded-lg transition-colors ${t.glowEnabled?"bg-pink-500 text-white":"bg-white/10"}`,children:e.jsx($,{className:"w-4 h-4"})}),e.jsx("span",{className:"text-sm font-medium",children:"Efekti Aç"}),e.jsx("div",{className:`ml-auto w-10 h-5 rounded-full p-0.5 transition-colors ${t.glowEnabled?"bg-pink-500":"bg-white/20"}`,children:e.jsx("div",{className:`w-4 h-4 bg-white rounded-full transition-transform ${t.glowEnabled?"translate-x-5":"translate-x-0"}`})})]})]})]}),e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(x,{children:"Arkaplan Opaklığı"}),e.jsxs("span",{className:"text-xs font-bold text-white/70 bg-white/10 px-2 py-0.5 rounded",children:[t.bgOpacity,"%"]})]}),e.jsx("input",{type:"range",min:0,max:80,step:5,value:t.bgOpacity,onChange:s=>a("bgOpacity",Number(s.target.value)),className:"w-full accent-white h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(x,{children:"Kart Kenarlığı (Border)"}),e.jsx("button",{onClick:()=>a("showCardBorder",!t.showCardBorder),className:`px-3 py-1 rounded text-[10px] uppercase font-bold transition-colors ${t.showCardBorder!==!1?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:t.showCardBorder!==!1?"Görünür":"Gizli"})]}),t.showCardBorder!==!1&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xs text-white/40 w-12",children:"Opaklık:"}),e.jsx("input",{type:"range",min:0,max:100,step:5,value:t.cardBorderOpacity??10,onChange:s=>a("cardBorderOpacity",Number(s.target.value)),className:"flex-1 accent-white/80 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"}),e.jsxs("span",{className:"text-xs font-bold text-white/70 bg-white/10 px-2 py-0.5 rounded",children:[t.cardBorderOpacity??10,"%"]})]})]}),e.jsxs("div",{className:"p-4 bg-black/20 rounded-xl border border-white/5 space-y-4",children:[e.jsx("div",{className:"mb-2",children:e.jsx(x,{children:"Profil Menü Stili"})}),e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-between mb-2 text-xs text-white/50",children:e.jsx("span",{children:"Arkaplan Matlığı"})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"range",min:20,max:100,step:5,value:t.menuOpacity??95,onChange:s=>a("menuOpacity",Number(s.target.value)),className:"flex-1 accent-white/80 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"}),e.jsxs("span",{className:"text-xs font-bold text-white/70 bg-white/10 px-2 py-0.5 rounded",children:[t.menuOpacity??95,"%"]})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-between mb-2 text-xs text-white/50",children:e.jsx("span",{children:"Çerçeve Belirginliği"})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"range",min:0,max:100,step:5,value:t.menuBorderOpacity??10,onChange:s=>a("menuBorderOpacity",Number(s.target.value)),className:"flex-1 accent-white/40 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"}),e.jsxs("span",{className:"text-xs font-bold text-white/70 bg-white/10 px-2 py-0.5 rounded",children:[t.menuBorderOpacity??10,"%"]})]})]})]})]})]})]}),e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-6",children:[e.jsxs("h3",{className:"text-sm font-semibold text-white mb-6 flex items-center gap-2",children:[e.jsx(y,{className:"w-5 h-5 text-orange-400"})," Tipografi ve İkonlar"]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-6",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-3",children:e.jsx(x,{children:"Yazı Tipi"})}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:ke.map(s=>e.jsxs(g,{active:t.font===s.id,onClick:()=>a("font",s.id),className:"px-4 py-3 flex items-center justify-between",children:[e.jsx("span",{className:"text-base",style:s.style,children:"Aa"}),e.jsx("span",{className:"text-xs",children:s.label})]},s.id))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-3",children:e.jsx(x,{children:"İkon Boyutu"})}),e.jsx("div",{className:"grid grid-cols-4 gap-3",children:Be.map(s=>e.jsxs(g,{active:t.iconSize===s.id,onClick:()=>a("iconSize",s.id),className:"p-3 flex flex-col items-center gap-2",children:[e.jsx("div",{className:"rounded-md bg-white/20 flex-shrink-0",style:{width:s.px/2,height:s.px/2}}),e.jsx("span",{className:"text-xs",children:s.label})]},s.id))})]})]})]})]}),Re=({localLayout:t,setLocalLayout:a,onSaveLayout:s,currentConfig:l,onSaveBgConfig:h})=>{const[b,n]=i.useState(!1),p=t.filter(r=>r.visible);return e.jsxs("div",{className:"space-y-5 animate-fade-in",children:[e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-5",children:[e.jsxs("h3",{className:"text-sm font-semibold text-white mb-1 flex items-center gap-2",children:[e.jsx(we,{className:"w-4 h-4 text-blue-400"})," Widget Yönetimi"]}),e.jsx("p",{className:"text-[11px] text-white/40 mb-4",children:"Görmek istediğiniz alanları açıp kapatın."}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(r=>e.jsxs("button",{onClick:()=>{const o=t.map(d=>d.id===r.id?{...d,visible:!d.visible}:d);a(o),s(o)},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg border transition-all text-xs font-medium ${r.visible?"bg-blue-500/15 border-blue-500/30 text-blue-300":"bg-white/5 border-white/10 text-white/30 hover:bg-white/10"}`,children:[r.visible?e.jsx(X,{className:"w-3.5 h-3.5"}):e.jsx(q,{className:"w-3.5 h-3.5"}),G[r.id]||r.id]},r.id))})]}),e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-5",children:[e.jsxs("h3",{className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[e.jsx(N,{className:"w-4 h-4 text-green-400"})," Yerleşim"]}),e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-white",children:"Serbest Yerleşim"}),e.jsx("p",{className:"text-[10px] text-white/40 mt-0.5",children:"Kapalıyken grid, açıkken serbest konumlandırma."})]}),e.jsx("button",{onClick:()=>{const r=!l.isFreeLayout;if(h({...l,isFreeLayout:r}),r){const o=t.map((d,c)=>d.x===void 0||d.y===void 0?{...d,x:c%2*450+50,y:Math.floor(c/2)*350+50}:d);a(o),s(o)}},className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors ${l.isFreeLayout?"bg-blue-500":"bg-white/10"}`,children:e.jsx("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white transition-transform ${l.isFreeLayout?"translate-x-[18px]":"translate-x-[3px]"}`})})]}),l.isFreeLayout&&e.jsxs("button",{onClick:()=>{if(confirm("Tüm widget konumları sıfırlanacak. Emin misiniz?")){const r=t.map(o=>{const{x:d,y:c,...j}=o;return j});a(r),s(r)}},className:"mt-2 w-full py-2 rounded-lg bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/20 transition-all text-xs font-medium flex items-center justify-center gap-2",children:[e.jsx(k,{className:"w-3.5 h-3.5"}),"Konumları Sıfırla"]})]}),p.length>0&&e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl overflow-hidden",children:[e.jsxs("button",{onClick:()=>n(!b),className:"w-full flex items-center justify-between p-5 hover:bg-white/5 transition-colors",children:[e.jsxs("h3",{className:"text-sm font-semibold text-white flex items-center gap-2",children:[e.jsx(N,{className:"w-4 h-4 text-purple-400"})," Opaklık & Çerçeve"]}),b?e.jsx(he,{className:"w-4 h-4 text-white/40"}):e.jsx(ee,{className:"w-4 h-4 text-white/40"})]}),b&&e.jsx("div",{className:"px-5 pb-5 grid grid-cols-1 md:grid-cols-2 gap-4",children:p.sort((r,o)=>r.order-o.order).map(r=>e.jsxs("div",{className:"border border-white/5 rounded-xl p-4 bg-black/20",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h4",{className:"text-xs font-medium text-white/90",children:G[r.id]}),e.jsxs("button",{onClick:()=>{const o=t.map(d=>d.id===r.id?{...d,showBorder:d.showBorder===!1}:d);a(o),s(o)},className:`px-2 py-0.5 rounded text-[9px] uppercase font-bold transition-colors ${r.showBorder!==!1?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:["Çerçeve: ",r.showBorder!==!1?"Açık":"Kapalı"]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-1 text-[10px] text-white/40",children:[e.jsx("span",{children:"Arkaplan"}),e.jsxs("span",{children:[r.opacity??10,"%"]})]}),e.jsx("input",{type:"range",min:0,max:100,step:5,value:r.opacity??10,onChange:o=>{const d=t.map(c=>c.id===r.id?{...c,opacity:Number(o.target.value)}:c);a(d),s(d)},className:"w-full accent-white/80 h-1 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),r.showBorder!==!1&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-1 text-[10px] text-white/40",children:[e.jsx("span",{children:"Çerçeve"}),e.jsxs("span",{children:[r.borderOpacity??20,"%"]})]}),e.jsx("input",{type:"range",min:0,max:100,step:5,value:r.borderOpacity??20,onChange:o=>{const d=t.map(c=>c.id===r.id?{...c,borderOpacity:Number(o.target.value)}:c);a(d),s(d)},className:"w-full accent-green-400 h-1 bg-white/10 rounded-lg appearance-none cursor-pointer"})]})]})]},r.id))})]})]})},Se=({shortcuts:t,doExport:a,doImport:s,importStatus:l,importError:h,stocksConfig:b,setStocksConfig:n,saveStocksConfig:p})=>e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(x,{children:"Yedekleme"}),e.jsx("p",{className:"text-xs text-white/40 leading-relaxed",children:"Tüm kısayolları ve profilleri JSON dosyası olarak yedekle veya başka cihazdan aktar."}),e.jsxs("button",{onClick:a,className:"flex items-center gap-4 p-4 rounded-xl bg-white/5 border border-white/8 hover:bg-white/8 transition-all",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-white/8 flex items-center justify-center flex-shrink-0",children:e.jsx(de,{className:"w-5 h-5 text-white/60"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"Dışa Aktar"}),e.jsxs("div",{className:"text-xs text-white/40 mt-0.5",children:[t.length," kısayol · JSON indir"]})]})]}),e.jsxs("button",{onClick:s,className:"flex items-center gap-4 p-4 rounded-xl bg-white/5 border border-white/8 hover:bg-white/8 transition-all",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-white/8 flex items-center justify-center flex-shrink-0",children:e.jsx(ce,{className:"w-5 h-5 text-white/60"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"İçe Aktar"}),e.jsx("div",{className:"text-xs text-white/40 mt-0.5",children:"JSON dosyasından yükle · mevcut liste değişir"})]})]}),l==="ok"&&e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-white/5 border border-white/15 text-white/80 text-sm",children:[e.jsx(w,{className:"w-4 h-4 flex-shrink-0"}),"Kısayollar başarıyla yüklendi."]}),l==="err"&&e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-red-500/10 border border-red-500/20 text-red-300 text-sm",children:[e.jsx(T,{className:"w-4 h-4 flex-shrink-0"}),h]})]}),e.jsxs("div",{className:"flex flex-col gap-6 bg-white/5 border border-white/10 rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"p-2 bg-blue-500/20 rounded-lg",children:e.jsx(z,{className:"w-5 h-5 text-blue-400"})}),e.jsx("h3",{className:"text-sm font-semibold text-white",children:"Borsa Verileri (Alpha Vantage)"})]}),e.jsx("p",{className:"text-xs text-white/40 leading-relaxed",children:"Borsa verileri Alpha Vantage üzerinden çekilir. Ücretsiz bir API anahtarı kullanarak daha kararlı veriler alabilirsiniz. Sembolleri virgülle ayırarak girin (Örn: AAPL, TSLA, BTCUSD)."}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-white/30 ml-1",children:"Alpha Vantage API Key"}),e.jsx("input",{type:"password",value:b.apiKey,onChange:r=>{const o={...b,apiKey:r.target.value};n(o),p(o)},placeholder:"API Key yapıştırın (Varsayılan aktif)...",className:"w-full bg-black/30 border border-white/10 rounded-lg py-2.5 px-4 text-sm text-white placeholder-white/20 focus:border-blue-500/50 focus:outline-none transition-all"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-white/30 ml-1",children:"Takip Edilen Semboller"}),e.jsx("input",{type:"text",value:b.symbols.join(", "),onChange:r=>{const o=r.target.value.split(",").map(c=>c.trim()).filter(c=>c!==""),d={...b,symbols:o};n(d),p(d)},placeholder:"AAPL, MSFT, GOOGL...",className:"w-full bg-black/30 border border-white/10 rounded-lg py-2.5 px-4 text-sm text-white placeholder-white/20 focus:border-blue-500/50 focus:outline-none transition-all"})]})]})]})]}),Oe=({customTheme:t,updateCustomTheme:a})=>e.jsxs("div",{className:"flex flex-col gap-6 animate-fade-in",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(x,{children:"Temel Renkler"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Arkaplan Rengi"}),e.jsx("input",{type:"color",value:t.wrapperBg,onChange:s=>a({wrapperBg:s.target.value}),className:"w-8 h-8 rounded-lg bg-transparent border-none cursor-pointer"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Aksan Rengi (Neon)"}),e.jsx("input",{type:"color",value:t.accentColor,onChange:s=>a({accentColor:s.target.value}),className:"w-8 h-8 rounded-lg bg-transparent border-none cursor-pointer"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Yazı Rengi"}),e.jsx("input",{type:"color",value:t.textColor,onChange:s=>a({textColor:s.target.value}),className:"w-8 h-8 rounded-lg bg-transparent border-none cursor-pointer"})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(x,{children:"Cam (Glass) Efekti"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Cam Rengi (RGBA)"}),e.jsx("input",{type:"text",value:t.glassBg,onChange:s=>a({glassBg:s.target.value}),className:"bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] w-32 focus:outline-none"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Cam Çerçeve (RGBA)"}),e.jsx("input",{type:"text",value:t.glassBorder,onChange:s=>a({glassBorder:s.target.value}),className:"bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] w-32 focus:outline-none"})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(x,{children:"Menüler"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Menü Arkaplan"}),e.jsx("input",{type:"text",value:t.menuBg,onChange:s=>a({menuBg:s.target.value}),className:"bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] w-32 focus:outline-none"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Menü Çerçeve"}),e.jsx("input",{type:"text",value:t.menuBorder,onChange:s=>a({menuBorder:s.target.value}),className:"bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] w-32 focus:outline-none"})]})]})]})]}),e.jsxs("button",{onClick:()=>a(M),className:"text-[10px] text-white/30 hover:text-white transition-colors w-fit flex items-center gap-1",children:[e.jsx(k,{className:"w-3 h-3"})," Varsayılana Dön"]})]}),Te=({isOpen:t,onClose:a,currentConfig:s,onSave:l,cardConfig:h,onSaveCard:b,shortcuts:n,onImportShortcuts:p,layout:r,onSaveLayout:o})=>{const[d,c]=i.useState("background"),[j,C]=i.useState("themes"),[L,D]=i.useState(""),[B,E]=i.useState(h),[V,A]=i.useState(r),[I,F]=i.useState({apiKey:"",symbols:[]}),[P,f]=i.useState("idle"),[W,Y]=i.useState(""),[v,R]=i.useState(s.customTheme||M);if(i.useEffect(()=>{t&&(E(h),A(r),F(se()),s.customTheme&&R(s.customTheme))},[t,h,r,s.customTheme]),!t)return null;const H=(m,u)=>{l({type:m,value:u,customTheme:u==="custom"?v:void 0}),u!=="custom"?a():c("theme-editor")},U=(m,u)=>{const O={...B,[m]:u};E(O),b(O)},Z=m=>{const u={...v,...m};R(u),l({...s,customTheme:u})},_=()=>ae(n),J=async()=>{f("idle");try{const m=await ie();p(m),f("ok")}catch(m){f("err"),Y(m instanceof Error?m.message:"Bilinmeyen hata")}},S=[{id:"background",icon:e.jsx(re,{className:"w-5 h-5"}),label:"Arkaplan"},{id:"cards",icon:e.jsx(K,{className:"w-5 h-5"}),label:"Kart & Yazı"},{id:"widgets",icon:e.jsx(N,{className:"w-5 h-5"}),label:"Alanlar"},{id:"data",icon:e.jsx(z,{className:"w-5 h-5"}),label:"Veri"}];return s.type==="theme"&&s.value==="custom"&&S.splice(1,0,{id:"theme-editor",icon:e.jsx(y,{className:"w-5 h-5"}),label:"Tema Editörü"}),e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:a}),e.jsxs("div",{className:"relative w-full max-w-4xl bg-black/50 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl flex flex-col max-h-[90vh] overflow-hidden animate-slide-up text-white",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-white/10 bg-black/20",children:[e.jsxs("h2",{className:"text-base font-semibold flex items-center gap-2",children:[e.jsx(y,{className:"w-4 h-4 text-white/50"}),"Görünüm Ayarları"]}),e.jsx("button",{onClick:a,className:"text-white/40 hover:text-white transition-colors",children:e.jsx(T,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsxs("nav",{className:"w-44 flex-shrink-0 flex flex-col gap-1.5 p-4 border-r border-white/5 bg-black/20",children:[e.jsx("div",{className:"text-[10px] font-bold text-white/30 uppercase tracking-widest pl-2 mb-2",children:"Ayarlar Menüsü"}),S.map(m=>e.jsxs("button",{onClick:()=>c(m.id),className:`flex items-center gap-3 py-2.5 px-3 rounded-lg text-sm font-medium transition-all ${d===m.id?"bg-blue-500/15 text-blue-400":"text-white/50 hover:bg-white/5 hover:text-white/90"}`,children:[m.icon,m.label]},m.id))]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-6 min-h-0 bg-black/5",children:[d==="background"&&e.jsx(Ae,{bgMode:j,setBgMode:C,currentConfig:s,applyBg:H,customUrl:L,setCustomUrl:D}),d==="theme-editor"&&e.jsx(Oe,{customTheme:v,updateCustomTheme:Z}),d==="cards"&&e.jsx(Fe,{localCard:B,cardSet:U}),d==="widgets"&&e.jsx(Re,{localLayout:V,setLocalLayout:A,onSaveLayout:o,currentConfig:s,onSaveBgConfig:l}),d==="data"&&e.jsx(Se,{shortcuts:n,doExport:_,doImport:J,importStatus:P,importError:W,stocksConfig:I,setStocksConfig:F,saveStocksConfig:te})]})]})]})]})};export{Te as default}; +import{r as i,j as e,d as X,e as q}from"./index-DEWape2v.js";import{i as w,b as k,P as Q,f as K,j as $,k as N,c as ee,F as T,D as M,l as se,s as te,m as ae,n as re,o as ie}from"./main-ByMmISQz.js";import{F as le}from"./LinkIcon-2Miy7fz5.js";function ne({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))}const de=i.forwardRef(ne);function oe({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}))}const ce=i.forwardRef(oe);function xe({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const he=i.forwardRef(xe);function me({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"}))}const pe=i.forwardRef(me);function be({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42"}))}const y=i.forwardRef(be);function ue({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 14.25h13.5m-13.5 0a3 3 0 0 1-3-3m3 3a3 3 0 1 0 0 6h13.5a3 3 0 1 0 0-6m-16.5-3a3 3 0 0 1 3-3h13.5a3 3 0 0 1 3 3m-19.5 0a4.5 4.5 0 0 1 .9-2.7L5.737 5.1a3.375 3.375 0 0 1 2.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 0 1 .9 2.7m0 0a3 3 0 0 1-3 3m0 3h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Zm-3 6h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Z"}))}const z=i.forwardRef(ue);function ge({title:t,titleId:a,...s},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),t?i.createElement("title",{id:a},t):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z"}))}const we=i.forwardRef(ge),je=[{id:"default",name:"Varsayılan",desc:"Klasik glassmorphism.",gradient:"from-slate-800 to-slate-900"},{id:"neon",name:"Neon Cyber",desc:"Mor-pembe neon geçişi.",gradient:"from-indigo-900 via-purple-900 to-pink-900"},{id:"starship",name:"Starship",desc:"Derin uzay, mavi aksan.",gradient:"from-gray-950 to-blue-950"},{id:"terminal",name:"Terminal",desc:"Retro yeşil-siyah.",gradient:"from-black to-green-950"},{id:"portal",name:"Aperture",desc:"#FF9900 turuncu · #99CCFF mavi portal.",gradient:"from-[#131313] via-[#1a1a1a] to-[#2A2A2A]"},{id:"custom",name:"Özel Tema",desc:"Kendi renklerini belirle.",gradient:"from-blue-600 via-purple-600 to-pink-600"}],fe=[{name:"Siyah",value:"#000000"},{name:"Koyu Gri",value:"#121212"},{name:"Gece Mavisi",value:"#0f172a"},{name:"Derin Mor",value:"#1e1b4b"},{name:"Orman",value:"#022c22"},{name:"Bordo",value:"#450a0a"}],ve=[{id:"sharp",label:"Keskin",radius:0},{id:"rounded",label:"Yuvarlak",radius:12},{id:"pill",label:"Kapsül",radius:24}],Ne=[{id:"sm",label:"Küçük",bars:1},{id:"md",label:"Orta",bars:2},{id:"lg",label:"Büyük",bars:3},{id:"xl",label:"Çok Büyük",bars:4}],ye=[{id:"left",label:"Sol",bars:[!0,!1,!1]},{id:"center",label:"Merkez",bars:[!1,!0,!1]},{id:"right",label:"Sağ",bars:[!1,!1,!0]}],ke=[{id:"geist",label:"Geist Sans",style:{fontFamily:'"Geist Sans", system-ui, sans-serif'}},{id:"system",label:"Sistem",style:{fontFamily:"system-ui, sans-serif"}},{id:"mono",label:"Monospace",style:{fontFamily:'"Geist Mono", monospace'}},{id:"serif",label:"Serif",style:{fontFamily:"Georgia, serif"}}],Be=[{id:"xs",label:"Çok Küçük",px:16},{id:"sm",label:"Küçük",px:24},{id:"md",label:"Orta",px:32},{id:"lg",label:"Büyük",px:44}],G={clock:"Saat & Tarih",search:"Arama Çubuğu",tasks:"Görevler",categories:"Kategori & Profil",shortcuts:"Kısayollar",gmail:"Gmail",calendar:"Takvim",stocks:"Borsa","google-tasks":"Google Görevler","google-keep":"Google Keep",weather:"Hava Durumu",pomodoro:"Pomodoro Timer",spotify:"Spotify"},x=({children:t})=>e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-white/40 mb-0",children:t}),g=({active:t,onClick:a,children:s,className:l=""})=>e.jsx("button",{onClick:a,className:`transition-all text-left ${t?"bg-white/10 border-white/30 text-white":"bg-white/5 border-white/8 text-white/60 hover:bg-white/8 hover:text-white/80"} border rounded-xl ${l}`,children:s}),Ee=[{id:"themes",label:"Tema"},{id:"presets",label:"Fotoğraf"},{id:"color",label:"Renk"},{id:"custom",label:"Özel URL"}],Ae=({bgMode:t,setBgMode:a,currentConfig:s,applyBg:l,customUrl:h,setCustomUrl:b})=>e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx("div",{className:"flex gap-2 flex-wrap",children:Ee.map(n=>e.jsx("button",{onClick:()=>a(n.id),className:`px-3 py-1.5 rounded-full text-xs font-medium transition-all border ${t===n.id?"bg-blue-500/20 border-blue-500/50 text-blue-400":"bg-white/5 border-white/10 text-white/50 hover:bg-white/10 hover:text-white/80"}`,children:n.label},n.id))}),t==="themes"&&e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:je.map(n=>{const p=s.type==="theme"&&s.value===n.id;return e.jsxs("button",{onClick:()=>l("theme",n.id),className:`p-4 rounded-xl border transition-all text-left relative overflow-hidden group ${p?"border-blue-500/50 ring-1 ring-blue-500/20":"border-white/8 hover:border-white/20"}`,children:[e.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${n.gradient} opacity-20 group-hover:opacity-40 transition-opacity`}),e.jsxs("div",{className:"relative flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-semibold text-white",children:n.name}),e.jsx("div",{className:"text-xs text-white/50 mt-0.5",children:n.desc})]}),p&&e.jsx(w,{className:"w-4 h-4 text-blue-400 flex-shrink-0"})]})]},n.id)})}),t==="presets"&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("button",{onClick:()=>l("random",""),className:`flex items-center gap-3 p-3 rounded-xl border transition-all ${s.type==="random"?"bg-white/10 border-white/30":"bg-white/5 border-white/10 hover:bg-white/8"}`,children:[e.jsx(k,{className:"w-4 h-4 text-white/60 flex-shrink-0"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"text-sm font-medium",children:"Rastgele"}),e.jsx("div",{className:"text-xs text-white/40",children:"Her açılışta farklı bir fotoğraf"})]}),s.type==="random"&&e.jsx(w,{className:"w-4 h-4 ml-auto text-white"})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:Q.map((n,p)=>{const r=s.type==="image"&&s.value===n;return e.jsxs("button",{onClick:()=>l("image",n),className:`relative aspect-video rounded-lg overflow-hidden border-2 transition-all ${r?"border-white/60 scale-95":"border-transparent hover:border-white/20"}`,children:[e.jsx("img",{src:n,alt:"",className:"w-full h-full object-cover"}),r&&e.jsx("div",{className:"absolute inset-0 bg-black/40 flex items-center justify-center",children:e.jsx(w,{className:"w-5 h-5 text-white drop-shadow"})})]},p)})})]}),t==="color"&&e.jsx("div",{className:"grid grid-cols-3 gap-3",children:fe.map(n=>{const p=s.type==="color"&&s.value===n.value;return e.jsxs("button",{onClick:()=>l("color",n.value),className:`rounded-xl border overflow-hidden transition-all ${p?"border-white/50 scale-95":"border-white/8 hover:border-white/25"}`,children:[e.jsx("div",{className:"h-16",style:{backgroundColor:n.value}}),e.jsx("div",{className:`px-3 py-2 text-xs font-medium text-center ${p?"text-white":"text-white/60"}`,children:n.name})]},n.value)})}),t==="custom"&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-xs text-white/50 leading-relaxed",children:"Herhangi bir resim veya GIF URL'sini yapıştır."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(le,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-white/30 w-4 h-4"}),e.jsx("input",{type:"text",value:h,onChange:n=>b(n.target.value),placeholder:"https://example.com/bg.jpg",className:"w-full bg-black/30 border border-white/10 rounded-lg py-2.5 pl-10 pr-4 text-sm text-white placeholder-white/20 focus:border-white/30 focus:outline-none"})]}),e.jsx("button",{onClick:()=>h.trim()&&l("image",h),disabled:!h.trim(),className:"px-5 bg-white/15 hover:bg-white/25 text-white font-medium rounded-lg transition-colors disabled:opacity-30 disabled:cursor-not-allowed text-sm",children:"Uygula"})]}),s.type==="image"&&s.value&&e.jsx("div",{className:"rounded-xl overflow-hidden border border-white/10 h-36",children:e.jsx("img",{src:s.value,className:"w-full h-full object-cover opacity-60",alt:"Önizleme"})})]})]}),Fe=({localCard:t,cardSet:a})=>e.jsxs("div",{className:"space-y-6 animate-fade-in",children:[e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-6",children:[e.jsxs("h3",{className:"text-sm font-semibold text-white mb-6 flex items-center gap-2",children:[e.jsx(K,{className:"w-5 h-5 text-blue-400"})," Düzen ve Yerleşim"]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(x,{children:"Kart Genişliği (%)"}),e.jsxs("span",{className:"text-xs font-bold text-blue-400 bg-blue-500/10 px-2 py-0.5 rounded",children:[t.cardWidth??100,"%"]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(pe,{className:"w-4 h-4 text-white/20"}),e.jsx("input",{type:"range",min:20,max:100,step:1,value:t.cardWidth??100,onChange:s=>a("cardWidth",Number(s.target.value)),className:"flex-1 accent-blue-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(x,{children:"Bir Satırdaki Kısayol (Kolon)"}),e.jsx("span",{className:"text-xs font-bold text-blue-400 bg-blue-500/10 px-2 py-0.5 rounded",children:t.gridCols??6})]}),e.jsx("input",{type:"range",min:2,max:12,step:1,value:t.gridCols??6,onChange:s=>a("gridCols",Number(s.target.value)),className:"w-full accent-blue-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(x,{children:"Yatay Aralık"}),e.jsxs("span",{className:"text-xs font-bold text-blue-400 bg-blue-500/10 px-2 py-0.5 rounded",children:[t.gridGapX??16,"px"]})]}),e.jsx("input",{type:"range",min:0,max:64,step:2,value:t.gridGapX??16,onChange:s=>a("gridGapX",Number(s.target.value)),className:"w-full accent-blue-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(x,{children:"Dikey Aralık"}),e.jsxs("span",{className:"text-xs font-bold text-blue-400 bg-blue-500/10 px-2 py-0.5 rounded",children:[t.gridGapY??16,"px"]})]}),e.jsx("input",{type:"range",min:0,max:64,step:2,value:t.gridGapY??16,onChange:s=>a("gridGapY",Number(s.target.value)),className:"w-full accent-blue-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),e.jsxs("div",{className:"md:col-span-2 mt-2",children:[e.jsx("div",{className:"mb-3",children:e.jsx(x,{children:"Sayfa Hizalaması"})}),e.jsx("div",{className:"grid grid-cols-3 gap-3",children:ye.map(s=>e.jsxs(g,{active:t.alignment===s.id,onClick:()=>a("alignment",s.id),className:"p-3 flex flex-col items-center gap-2",children:[e.jsx("div",{className:"flex gap-1 items-end h-4",children:s.bars.map((l,h)=>e.jsx("div",{className:`w-2 h-3 rounded-sm ${l?"bg-white/70":"bg-white/15"}`},h))}),e.jsx("span",{className:"text-xs",children:s.label})]},s.id))})]})]})]}),e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-6",children:[e.jsxs("h3",{className:"text-sm font-semibold text-white mb-6 flex items-center gap-2",children:[e.jsx($,{className:"w-5 h-5 text-pink-400"})," Görünüm ve Efektler"]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-8",children:[e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-3",children:e.jsx(x,{children:"Kart Boyutu"})}),e.jsx("div",{className:"grid grid-cols-4 gap-2",children:Ne.map(s=>e.jsxs(g,{active:t.size===s.id,onClick:()=>a("size",s.id),className:"p-3 flex flex-col items-center gap-2",children:[e.jsx("div",{className:"flex flex-col gap-0.5 w-full items-center",children:Array.from({length:s.bars}).map((l,h)=>e.jsx("div",{className:"w-6 h-1.5 bg-white/30 rounded-sm"},h))}),e.jsx("span",{className:"text-xs",children:s.label})]},s.id))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-3",children:e.jsx(x,{children:"Köşe Şekli"})}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:ve.map(s=>e.jsxs(g,{active:t.shape===s.id,onClick:()=>a("shape",s.id),className:"p-3 flex flex-col items-center gap-2",children:[e.jsx("div",{className:"w-10 h-6 bg-white/20",style:{borderRadius:s.radius}}),e.jsx("span",{className:"text-xs",children:s.label})]},s.id))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-3",children:e.jsx(x,{children:"Hover Parlama (Glow)"})}),e.jsxs("button",{onClick:()=>a("glowEnabled",!t.glowEnabled),className:`flex items-center gap-3 w-full p-4 rounded-xl border transition-all ${t.glowEnabled?"bg-pink-500/10 border-pink-500/50 text-white":"bg-white/5 border-white/10 text-white/40"}`,children:[e.jsx("div",{className:`p-2 rounded-lg transition-colors ${t.glowEnabled?"bg-pink-500 text-white":"bg-white/10"}`,children:e.jsx($,{className:"w-4 h-4"})}),e.jsx("span",{className:"text-sm font-medium",children:"Efekti Aç"}),e.jsx("div",{className:`ml-auto w-10 h-5 rounded-full p-0.5 transition-colors ${t.glowEnabled?"bg-pink-500":"bg-white/20"}`,children:e.jsx("div",{className:`w-4 h-4 bg-white rounded-full transition-transform ${t.glowEnabled?"translate-x-5":"translate-x-0"}`})})]})]})]}),e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(x,{children:"Arkaplan Opaklığı"}),e.jsxs("span",{className:"text-xs font-bold text-white/70 bg-white/10 px-2 py-0.5 rounded",children:[t.bgOpacity,"%"]})]}),e.jsx("input",{type:"range",min:0,max:80,step:5,value:t.bgOpacity,onChange:s=>a("bgOpacity",Number(s.target.value)),className:"w-full accent-white h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(x,{children:"Kart Kenarlığı (Border)"}),e.jsx("button",{onClick:()=>a("showCardBorder",!t.showCardBorder),className:`px-3 py-1 rounded text-[10px] uppercase font-bold transition-colors ${t.showCardBorder!==!1?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:t.showCardBorder!==!1?"Görünür":"Gizli"})]}),t.showCardBorder!==!1&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xs text-white/40 w-12",children:"Opaklık:"}),e.jsx("input",{type:"range",min:0,max:100,step:5,value:t.cardBorderOpacity??10,onChange:s=>a("cardBorderOpacity",Number(s.target.value)),className:"flex-1 accent-white/80 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"}),e.jsxs("span",{className:"text-xs font-bold text-white/70 bg-white/10 px-2 py-0.5 rounded",children:[t.cardBorderOpacity??10,"%"]})]})]}),e.jsxs("div",{className:"p-4 bg-black/20 rounded-xl border border-white/5 space-y-4",children:[e.jsx("div",{className:"mb-2",children:e.jsx(x,{children:"Profil Menü Stili"})}),e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-between mb-2 text-xs text-white/50",children:e.jsx("span",{children:"Arkaplan Matlığı"})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"range",min:20,max:100,step:5,value:t.menuOpacity??95,onChange:s=>a("menuOpacity",Number(s.target.value)),className:"flex-1 accent-white/80 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"}),e.jsxs("span",{className:"text-xs font-bold text-white/70 bg-white/10 px-2 py-0.5 rounded",children:[t.menuOpacity??95,"%"]})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"flex justify-between mb-2 text-xs text-white/50",children:e.jsx("span",{children:"Çerçeve Belirginliği"})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"range",min:0,max:100,step:5,value:t.menuBorderOpacity??10,onChange:s=>a("menuBorderOpacity",Number(s.target.value)),className:"flex-1 accent-white/40 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"}),e.jsxs("span",{className:"text-xs font-bold text-white/70 bg-white/10 px-2 py-0.5 rounded",children:[t.menuBorderOpacity??10,"%"]})]})]})]})]})]})]}),e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-6",children:[e.jsxs("h3",{className:"text-sm font-semibold text-white mb-6 flex items-center gap-2",children:[e.jsx(y,{className:"w-5 h-5 text-orange-400"})," Tipografi ve İkonlar"]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-6",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-3",children:e.jsx(x,{children:"Yazı Tipi"})}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:ke.map(s=>e.jsxs(g,{active:t.font===s.id,onClick:()=>a("font",s.id),className:"px-4 py-3 flex items-center justify-between",children:[e.jsx("span",{className:"text-base",style:s.style,children:"Aa"}),e.jsx("span",{className:"text-xs",children:s.label})]},s.id))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-3",children:e.jsx(x,{children:"İkon Boyutu"})}),e.jsx("div",{className:"grid grid-cols-4 gap-3",children:Be.map(s=>e.jsxs(g,{active:t.iconSize===s.id,onClick:()=>a("iconSize",s.id),className:"p-3 flex flex-col items-center gap-2",children:[e.jsx("div",{className:"rounded-md bg-white/20 flex-shrink-0",style:{width:s.px/2,height:s.px/2}}),e.jsx("span",{className:"text-xs",children:s.label})]},s.id))})]})]})]})]}),Re=({localLayout:t,setLocalLayout:a,onSaveLayout:s,currentConfig:l,onSaveBgConfig:h})=>{const[b,n]=i.useState(!1),p=t.filter(r=>r.visible);return e.jsxs("div",{className:"space-y-5 animate-fade-in",children:[e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-5",children:[e.jsxs("h3",{className:"text-sm font-semibold text-white mb-1 flex items-center gap-2",children:[e.jsx(we,{className:"w-4 h-4 text-blue-400"})," Widget Yönetimi"]}),e.jsx("p",{className:"text-[11px] text-white/40 mb-4",children:"Görmek istediğiniz alanları açıp kapatın."}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(r=>e.jsxs("button",{onClick:()=>{const o=t.map(d=>d.id===r.id?{...d,visible:!d.visible}:d);a(o),s(o)},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg border transition-all text-xs font-medium ${r.visible?"bg-blue-500/15 border-blue-500/30 text-blue-300":"bg-white/5 border-white/10 text-white/30 hover:bg-white/10"}`,children:[r.visible?e.jsx(X,{className:"w-3.5 h-3.5"}):e.jsx(q,{className:"w-3.5 h-3.5"}),G[r.id]||r.id]},r.id))})]}),e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-5",children:[e.jsxs("h3",{className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[e.jsx(N,{className:"w-4 h-4 text-green-400"})," Yerleşim"]}),e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-white",children:"Serbest Yerleşim"}),e.jsx("p",{className:"text-[10px] text-white/40 mt-0.5",children:"Kapalıyken grid, açıkken serbest konumlandırma."})]}),e.jsx("button",{onClick:()=>{const r=!l.isFreeLayout;if(h({...l,isFreeLayout:r}),r){const o=t.map((d,c)=>d.x===void 0||d.y===void 0?{...d,x:c%2*450+50,y:Math.floor(c/2)*350+50}:d);a(o),s(o)}},className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors ${l.isFreeLayout?"bg-blue-500":"bg-white/10"}`,children:e.jsx("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white transition-transform ${l.isFreeLayout?"translate-x-[18px]":"translate-x-[3px]"}`})})]}),l.isFreeLayout&&e.jsxs("button",{onClick:()=>{if(confirm("Tüm widget konumları sıfırlanacak. Emin misiniz?")){const r=t.map(o=>{const{x:d,y:c,...j}=o;return j});a(r),s(r)}},className:"mt-2 w-full py-2 rounded-lg bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/20 transition-all text-xs font-medium flex items-center justify-center gap-2",children:[e.jsx(k,{className:"w-3.5 h-3.5"}),"Konumları Sıfırla"]})]}),p.length>0&&e.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl overflow-hidden",children:[e.jsxs("button",{onClick:()=>n(!b),className:"w-full flex items-center justify-between p-5 hover:bg-white/5 transition-colors",children:[e.jsxs("h3",{className:"text-sm font-semibold text-white flex items-center gap-2",children:[e.jsx(N,{className:"w-4 h-4 text-purple-400"})," Opaklık & Çerçeve"]}),b?e.jsx(he,{className:"w-4 h-4 text-white/40"}):e.jsx(ee,{className:"w-4 h-4 text-white/40"})]}),b&&e.jsx("div",{className:"px-5 pb-5 grid grid-cols-1 md:grid-cols-2 gap-4",children:p.sort((r,o)=>r.order-o.order).map(r=>e.jsxs("div",{className:"border border-white/5 rounded-xl p-4 bg-black/20",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h4",{className:"text-xs font-medium text-white/90",children:G[r.id]}),e.jsxs("button",{onClick:()=>{const o=t.map(d=>d.id===r.id?{...d,showBorder:d.showBorder===!1}:d);a(o),s(o)},className:`px-2 py-0.5 rounded text-[9px] uppercase font-bold transition-colors ${r.showBorder!==!1?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:["Çerçeve: ",r.showBorder!==!1?"Açık":"Kapalı"]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-1 text-[10px] text-white/40",children:[e.jsx("span",{children:"Arkaplan"}),e.jsxs("span",{children:[r.opacity??10,"%"]})]}),e.jsx("input",{type:"range",min:0,max:100,step:5,value:r.opacity??10,onChange:o=>{const d=t.map(c=>c.id===r.id?{...c,opacity:Number(o.target.value)}:c);a(d),s(d)},className:"w-full accent-white/80 h-1 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),r.showBorder!==!1&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-1 text-[10px] text-white/40",children:[e.jsx("span",{children:"Çerçeve"}),e.jsxs("span",{children:[r.borderOpacity??20,"%"]})]}),e.jsx("input",{type:"range",min:0,max:100,step:5,value:r.borderOpacity??20,onChange:o=>{const d=t.map(c=>c.id===r.id?{...c,borderOpacity:Number(o.target.value)}:c);a(d),s(d)},className:"w-full accent-green-400 h-1 bg-white/10 rounded-lg appearance-none cursor-pointer"})]})]})]},r.id))})]})]})},Se=({shortcuts:t,doExport:a,doImport:s,importStatus:l,importError:h,stocksConfig:b,setStocksConfig:n,saveStocksConfig:p})=>e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(x,{children:"Yedekleme"}),e.jsx("p",{className:"text-xs text-white/40 leading-relaxed",children:"Tüm kısayolları ve profilleri JSON dosyası olarak yedekle veya başka cihazdan aktar."}),e.jsxs("button",{onClick:a,className:"flex items-center gap-4 p-4 rounded-xl bg-white/5 border border-white/8 hover:bg-white/8 transition-all",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-white/8 flex items-center justify-center flex-shrink-0",children:e.jsx(de,{className:"w-5 h-5 text-white/60"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"Dışa Aktar"}),e.jsxs("div",{className:"text-xs text-white/40 mt-0.5",children:[t.length," kısayol · JSON indir"]})]})]}),e.jsxs("button",{onClick:s,className:"flex items-center gap-4 p-4 rounded-xl bg-white/5 border border-white/8 hover:bg-white/8 transition-all",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-white/8 flex items-center justify-center flex-shrink-0",children:e.jsx(ce,{className:"w-5 h-5 text-white/60"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"İçe Aktar"}),e.jsx("div",{className:"text-xs text-white/40 mt-0.5",children:"JSON dosyasından yükle · mevcut liste değişir"})]})]}),l==="ok"&&e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-white/5 border border-white/15 text-white/80 text-sm",children:[e.jsx(w,{className:"w-4 h-4 flex-shrink-0"}),"Kısayollar başarıyla yüklendi."]}),l==="err"&&e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-red-500/10 border border-red-500/20 text-red-300 text-sm",children:[e.jsx(T,{className:"w-4 h-4 flex-shrink-0"}),h]})]}),e.jsxs("div",{className:"flex flex-col gap-6 bg-white/5 border border-white/10 rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"p-2 bg-blue-500/20 rounded-lg",children:e.jsx(z,{className:"w-5 h-5 text-blue-400"})}),e.jsx("h3",{className:"text-sm font-semibold text-white",children:"Borsa Verileri (Alpha Vantage)"})]}),e.jsx("p",{className:"text-xs text-white/40 leading-relaxed",children:"Borsa verileri Alpha Vantage üzerinden çekilir. Ücretsiz bir API anahtarı kullanarak daha kararlı veriler alabilirsiniz. Sembolleri virgülle ayırarak girin (Örn: AAPL, TSLA, BTCUSD)."}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-white/30 ml-1",children:"Alpha Vantage API Key"}),e.jsx("input",{type:"password",value:b.apiKey,onChange:r=>{const o={...b,apiKey:r.target.value};n(o),p(o)},placeholder:"API Key yapıştırın (Varsayılan aktif)...",className:"w-full bg-black/30 border border-white/10 rounded-lg py-2.5 px-4 text-sm text-white placeholder-white/20 focus:border-blue-500/50 focus:outline-none transition-all"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-white/30 ml-1",children:"Takip Edilen Semboller"}),e.jsx("input",{type:"text",value:b.symbols.join(", "),onChange:r=>{const o=r.target.value.split(",").map(c=>c.trim()).filter(c=>c!==""),d={...b,symbols:o};n(d),p(d)},placeholder:"AAPL, MSFT, GOOGL...",className:"w-full bg-black/30 border border-white/10 rounded-lg py-2.5 px-4 text-sm text-white placeholder-white/20 focus:border-blue-500/50 focus:outline-none transition-all"})]})]})]})]}),Oe=({customTheme:t,updateCustomTheme:a})=>e.jsxs("div",{className:"flex flex-col gap-6 animate-fade-in",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(x,{children:"Temel Renkler"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Arkaplan Rengi"}),e.jsx("input",{type:"color",value:t.wrapperBg,onChange:s=>a({wrapperBg:s.target.value}),className:"w-8 h-8 rounded-lg bg-transparent border-none cursor-pointer"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Aksan Rengi (Neon)"}),e.jsx("input",{type:"color",value:t.accentColor,onChange:s=>a({accentColor:s.target.value}),className:"w-8 h-8 rounded-lg bg-transparent border-none cursor-pointer"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Yazı Rengi"}),e.jsx("input",{type:"color",value:t.textColor,onChange:s=>a({textColor:s.target.value}),className:"w-8 h-8 rounded-lg bg-transparent border-none cursor-pointer"})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(x,{children:"Cam (Glass) Efekti"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Cam Rengi (RGBA)"}),e.jsx("input",{type:"text",value:t.glassBg,onChange:s=>a({glassBg:s.target.value}),className:"bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] w-32 focus:outline-none"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Cam Çerçeve (RGBA)"}),e.jsx("input",{type:"text",value:t.glassBorder,onChange:s=>a({glassBorder:s.target.value}),className:"bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] w-32 focus:outline-none"})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(x,{children:"Menüler"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Menü Arkaplan"}),e.jsx("input",{type:"text",value:t.menuBg,onChange:s=>a({menuBg:s.target.value}),className:"bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] w-32 focus:outline-none"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-white/60",children:"Menü Çerçeve"}),e.jsx("input",{type:"text",value:t.menuBorder,onChange:s=>a({menuBorder:s.target.value}),className:"bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] w-32 focus:outline-none"})]})]})]})]}),e.jsxs("button",{onClick:()=>a(M),className:"text-[10px] text-white/30 hover:text-white transition-colors w-fit flex items-center gap-1",children:[e.jsx(k,{className:"w-3 h-3"})," Varsayılana Dön"]})]}),Te=({isOpen:t,onClose:a,currentConfig:s,onSave:l,cardConfig:h,onSaveCard:b,shortcuts:n,onImportShortcuts:p,layout:r,onSaveLayout:o})=>{const[d,c]=i.useState("background"),[j,C]=i.useState("themes"),[L,D]=i.useState(""),[B,E]=i.useState(h),[V,A]=i.useState(r),[I,F]=i.useState({apiKey:"",symbols:[]}),[P,f]=i.useState("idle"),[W,Y]=i.useState(""),[v,R]=i.useState(s.customTheme||M);if(i.useEffect(()=>{t&&(E(h),A(r),F(se()),s.customTheme&&R(s.customTheme))},[t,h,r,s.customTheme]),!t)return null;const H=(m,u)=>{l({type:m,value:u,customTheme:u==="custom"?v:void 0}),u!=="custom"?a():c("theme-editor")},U=(m,u)=>{const O={...B,[m]:u};E(O),b(O)},Z=m=>{const u={...v,...m};R(u),l({...s,customTheme:u})},_=()=>ae(n),J=async()=>{f("idle");try{const m=await ie();p(m),f("ok")}catch(m){f("err"),Y(m instanceof Error?m.message:"Bilinmeyen hata")}},S=[{id:"background",icon:e.jsx(re,{className:"w-5 h-5"}),label:"Arkaplan"},{id:"cards",icon:e.jsx(K,{className:"w-5 h-5"}),label:"Kart & Yazı"},{id:"widgets",icon:e.jsx(N,{className:"w-5 h-5"}),label:"Alanlar"},{id:"data",icon:e.jsx(z,{className:"w-5 h-5"}),label:"Veri"}];return s.type==="theme"&&s.value==="custom"&&S.splice(1,0,{id:"theme-editor",icon:e.jsx(y,{className:"w-5 h-5"}),label:"Tema Editörü"}),e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:a}),e.jsxs("div",{className:"relative w-full max-w-4xl bg-black/50 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl flex flex-col max-h-[90vh] overflow-hidden animate-slide-up text-white",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-white/10 bg-black/20",children:[e.jsxs("h2",{className:"text-base font-semibold flex items-center gap-2",children:[e.jsx(y,{className:"w-4 h-4 text-white/50"}),"Görünüm Ayarları"]}),e.jsx("button",{onClick:a,className:"text-white/40 hover:text-white transition-colors",children:e.jsx(T,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsxs("nav",{className:"w-44 flex-shrink-0 flex flex-col gap-1.5 p-4 border-r border-white/5 bg-black/20",children:[e.jsx("div",{className:"text-[10px] font-bold text-white/30 uppercase tracking-widest pl-2 mb-2",children:"Ayarlar Menüsü"}),S.map(m=>e.jsxs("button",{onClick:()=>c(m.id),className:`flex items-center gap-3 py-2.5 px-3 rounded-lg text-sm font-medium transition-all ${d===m.id?"bg-blue-500/15 text-blue-400":"text-white/50 hover:bg-white/5 hover:text-white/90"}`,children:[m.icon,m.label]},m.id))]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-6 min-h-0 bg-black/5",children:[d==="background"&&e.jsx(Ae,{bgMode:j,setBgMode:C,currentConfig:s,applyBg:H,customUrl:L,setCustomUrl:D}),d==="theme-editor"&&e.jsx(Oe,{customTheme:v,updateCustomTheme:Z}),d==="cards"&&e.jsx(Fe,{localCard:B,cardSet:U}),d==="widgets"&&e.jsx(Re,{localLayout:V,setLocalLayout:A,onSaveLayout:o,currentConfig:s,onSaveBgConfig:l}),d==="data"&&e.jsx(Se,{shortcuts:n,doExport:_,doImport:J,importStatus:P,importError:W,stocksConfig:I,setStocksConfig:F,saveStocksConfig:te})]})]})]})]})};export{Te as default}; diff --git a/dist-store/assets/ClockSettingsModal-CueBoYPW.js b/dist-store/assets/ClockSettingsModal-BgJzA91Y.js similarity index 99% rename from dist-store/assets/ClockSettingsModal-CueBoYPW.js rename to dist-store/assets/ClockSettingsModal-BgJzA91Y.js index 885d5ea..690f5f3 100644 --- a/dist-store/assets/ClockSettingsModal-CueBoYPW.js +++ b/dist-store/assets/ClockSettingsModal-BgJzA91Y.js @@ -1 +1 @@ -import{r as l,R as d,j as e}from"./index-DEWape2v.js";import{p as c,F as b}from"./main-BX_0fFXn.js";import{F as u}from"./CheckIcon-CxKfb6Lo.js";function w({title:r,titleId:a,...i},n){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":a},i),r?l.createElement("title",{id:a},r):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const f=l.forwardRef(w);function g({title:r,titleId:a,...i},n){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":a},i),r?l.createElement("title",{id:a},r):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.098 19.902a3.75 3.75 0 0 0 5.304 0l6.401-6.402M6.75 21A3.75 3.75 0 0 1 3 17.25V4.125C3 3.504 3.504 3 4.125 3h5.25c.621 0 1.125.504 1.125 1.125v4.072M6.75 21a3.75 3.75 0 0 0 3.75-3.75V8.197M6.75 21h13.125c.621 0 1.125-.504 1.125-1.125v-5.25c0-.621-.504-1.125-1.125-1.125h-4.072M10.5 8.197l2.88-2.88c.438-.439 1.15-.439 1.59 0l3.712 3.713c.44.44.44 1.152 0 1.59l-2.879 2.88M6.75 17.25h.008v.008H6.75v-.008Z"}))}const p=l.forwardRef(g);function j({title:r,titleId:a,...i},n){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":a},i),r?l.createElement("title",{id:a},r):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.745 3A23.933 23.933 0 0 0 3 12c0 3.183.62 6.22 1.745 9M19.5 3c.967 2.78 1.5 5.817 1.5 9s-.533 6.22-1.5 9M8.25 8.885l1.444-.89a.75.75 0 0 1 1.105.402l2.402 7.206a.75.75 0 0 0 1.104.401l1.445-.889m-8.25.75.213.09a1.687 1.687 0 0 0 2.062-.617l4.45-6.676a1.688 1.688 0 0 1 2.062-.618l.213.09"}))}const v=l.forwardRef(j),S=({isOpen:r,onClose:a,config:i,onSave:n})=>{const[t,o]=d.useState(i);if(d.useEffect(()=>{r&&o(i)},[r,i]),!r)return null;const h=()=>{n(t),a()},m=[{id:"geist",label:"Geist Sans"},{id:"system",label:"Sistem"},{id:"mono",label:"Mono"},{id:"serif",label:"Serif"}],x=[{id:"sm",label:"Küçük"},{id:"md",label:"Orta"},{id:"lg",label:"Büyük"},{id:"xl",label:"Ekstra"}];return e.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:a}),e.jsxs("div",{className:"relative w-full max-w-md bg-black/50 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl flex flex-col animate-slide-up text-white overflow-hidden max-h-[90vh]",children:[e.jsxs("div",{className:"flex items-center justify-between p-5 border-b border-white/10 bg-black/20",children:[e.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[e.jsx(c,{className:"w-5 h-5 text-blue-400"}),"Saat ve Tarih Ayarları"]}),e.jsx("button",{onClick:a,title:"Kapat",className:"text-white/50 hover:text-white transition-colors",children:e.jsx(b,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"p-6 space-y-6 overflow-y-auto",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium text-white/60 mb-3 flex items-center gap-2",children:[e.jsx(c,{className:"w-3.5 h-3.5"}),"Zaman Biçimi"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("button",{onClick:()=>o({...t,format:"24h"}),className:`p-3 rounded-xl border text-center transition-all ${t.format==="24h"?"bg-blue-500/20 border-blue-500 text-white":"bg-white/5 border-transparent hover:bg-white/10 text-white/70"}`,children:[e.jsx("div",{className:"text-lg font-bold",children:"17:49"}),e.jsx("div",{className:"text-xs opacity-60",children:"24 Saat"})]}),e.jsxs("button",{onClick:()=>o({...t,format:"12h"}),className:`p-3 rounded-xl border text-center transition-all ${t.format==="12h"?"bg-blue-500/20 border-blue-500 text-white":"bg-white/5 border-transparent hover:bg-white/10 text-white/70"}`,children:[e.jsx("div",{className:"text-lg font-bold",children:"05:49 PM"}),e.jsx("div",{className:"text-xs opacity-60",children:"12 Saat"})]})]}),e.jsx("div",{className:"mt-4",children:e.jsxs("button",{onClick:()=>o({...t,showSeconds:!t.showSeconds}),className:"flex items-center gap-3 cursor-pointer group p-2 rounded-lg hover:bg-white/5 transition-colors w-full text-left",children:[e.jsx("div",{className:`w-10 h-5 rounded-full p-0.5 transition-colors ${t.showSeconds?"bg-blue-500":"bg-white/20"}`,children:e.jsx("div",{className:`w-4 h-4 bg-white rounded-full shadow-sm transition-transform ${t.showSeconds?"translate-x-5":"translate-x-0"}`})}),e.jsx("span",{className:"text-sm text-white/80",children:"Saniyeyi Göster"})]})})]}),e.jsx("hr",{className:"border-white/10"}),e.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium text-white/60 mb-3 flex items-center gap-2",children:[e.jsx(v,{className:"w-3.5 h-3.5"}),"Yazı Tipi (Font)"]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:m.map(s=>e.jsx("button",{onClick:()=>o({...t,fontFamily:s.id}),className:`px-3 py-2 rounded-lg text-xs font-medium border transition-all ${t.fontFamily===s.id?"bg-blue-500/20 border-blue-500 text-blue-400":"bg-white/5 border-white/10 text-white/60 hover:bg-white/10"}`,children:s.label},s.id))})]}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium text-white/60 mb-3 flex items-center gap-2",children:[e.jsx(p,{className:"w-3.5 h-3.5"}),"Boyut"]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:x.map(s=>e.jsx("button",{onClick:()=>o({...t,fontSize:s.id}),className:`px-3 py-2 rounded-lg text-xs font-medium border transition-all ${t.fontSize===s.id?"bg-blue-500/20 border-blue-500 text-blue-400":"bg-white/5 border-white/10 text-white/60 hover:bg-white/10"}`,children:s.label},s.id))})]})]}),e.jsx("hr",{className:"border-white/10"}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium text-white/60 mb-3 flex items-center gap-2",children:[e.jsx(f,{className:"w-3.5 h-3.5"}),"Tarih Biçimi"]}),e.jsx("div",{className:"space-y-2",children:[{id:"full",label:"Görünür",example:"19 Kasım Çarşamba"},{id:"hidden",label:"Gizli",example:"(Tarih gösterilmez)"}].map(s=>e.jsxs("button",{onClick:()=>o({...t,showDate:s.id!=="hidden"}),className:`w-full flex items-center justify-between p-3 rounded-lg border transition-all ${s.id==="hidden"&&!t.showDate||s.id!=="hidden"&&t.showDate?"bg-blue-500/20 border-blue-500/50":"bg-white/5 border-transparent hover:bg-white/10"}`,children:[e.jsx("span",{className:"text-sm font-medium text-white",children:s.example}),e.jsx("span",{className:"text-xs text-white/40",children:s.label})]},s.id))})]})]}),e.jsxs("div",{className:"p-4 border-t border-white/10 flex justify-end gap-3 bg-black/20 mt-auto",children:[e.jsx("button",{onClick:a,className:"px-4 py-2 text-sm text-white/70 hover:text-white transition-colors",children:"İptal"}),e.jsxs("button",{onClick:h,className:"px-6 py-2 bg-blue-600 hover:bg-blue-500 text-white text-sm font-medium rounded-lg transition-colors flex items-center gap-2",children:[e.jsx(u,{className:"w-4 h-4"}),"Kaydet"]})]})]})]})};export{S as default}; +import{r as l,R as d,j as e}from"./index-DEWape2v.js";import{p as c,F as b}from"./main-ByMmISQz.js";import{F as u}from"./CheckIcon-CxKfb6Lo.js";function w({title:r,titleId:a,...i},n){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":a},i),r?l.createElement("title",{id:a},r):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const f=l.forwardRef(w);function g({title:r,titleId:a,...i},n){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":a},i),r?l.createElement("title",{id:a},r):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.098 19.902a3.75 3.75 0 0 0 5.304 0l6.401-6.402M6.75 21A3.75 3.75 0 0 1 3 17.25V4.125C3 3.504 3.504 3 4.125 3h5.25c.621 0 1.125.504 1.125 1.125v4.072M6.75 21a3.75 3.75 0 0 0 3.75-3.75V8.197M6.75 21h13.125c.621 0 1.125-.504 1.125-1.125v-5.25c0-.621-.504-1.125-1.125-1.125h-4.072M10.5 8.197l2.88-2.88c.438-.439 1.15-.439 1.59 0l3.712 3.713c.44.44.44 1.152 0 1.59l-2.879 2.88M6.75 17.25h.008v.008H6.75v-.008Z"}))}const p=l.forwardRef(g);function j({title:r,titleId:a,...i},n){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":a},i),r?l.createElement("title",{id:a},r):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.745 3A23.933 23.933 0 0 0 3 12c0 3.183.62 6.22 1.745 9M19.5 3c.967 2.78 1.5 5.817 1.5 9s-.533 6.22-1.5 9M8.25 8.885l1.444-.89a.75.75 0 0 1 1.105.402l2.402 7.206a.75.75 0 0 0 1.104.401l1.445-.889m-8.25.75.213.09a1.687 1.687 0 0 0 2.062-.617l4.45-6.676a1.688 1.688 0 0 1 2.062-.618l.213.09"}))}const v=l.forwardRef(j),S=({isOpen:r,onClose:a,config:i,onSave:n})=>{const[t,o]=d.useState(i);if(d.useEffect(()=>{r&&o(i)},[r,i]),!r)return null;const h=()=>{n(t),a()},m=[{id:"geist",label:"Geist Sans"},{id:"system",label:"Sistem"},{id:"mono",label:"Mono"},{id:"serif",label:"Serif"}],x=[{id:"sm",label:"Küçük"},{id:"md",label:"Orta"},{id:"lg",label:"Büyük"},{id:"xl",label:"Ekstra"}];return e.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:a}),e.jsxs("div",{className:"relative w-full max-w-md bg-black/50 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl flex flex-col animate-slide-up text-white overflow-hidden max-h-[90vh]",children:[e.jsxs("div",{className:"flex items-center justify-between p-5 border-b border-white/10 bg-black/20",children:[e.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[e.jsx(c,{className:"w-5 h-5 text-blue-400"}),"Saat ve Tarih Ayarları"]}),e.jsx("button",{onClick:a,title:"Kapat",className:"text-white/50 hover:text-white transition-colors",children:e.jsx(b,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"p-6 space-y-6 overflow-y-auto",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium text-white/60 mb-3 flex items-center gap-2",children:[e.jsx(c,{className:"w-3.5 h-3.5"}),"Zaman Biçimi"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("button",{onClick:()=>o({...t,format:"24h"}),className:`p-3 rounded-xl border text-center transition-all ${t.format==="24h"?"bg-blue-500/20 border-blue-500 text-white":"bg-white/5 border-transparent hover:bg-white/10 text-white/70"}`,children:[e.jsx("div",{className:"text-lg font-bold",children:"17:49"}),e.jsx("div",{className:"text-xs opacity-60",children:"24 Saat"})]}),e.jsxs("button",{onClick:()=>o({...t,format:"12h"}),className:`p-3 rounded-xl border text-center transition-all ${t.format==="12h"?"bg-blue-500/20 border-blue-500 text-white":"bg-white/5 border-transparent hover:bg-white/10 text-white/70"}`,children:[e.jsx("div",{className:"text-lg font-bold",children:"05:49 PM"}),e.jsx("div",{className:"text-xs opacity-60",children:"12 Saat"})]})]}),e.jsx("div",{className:"mt-4",children:e.jsxs("button",{onClick:()=>o({...t,showSeconds:!t.showSeconds}),className:"flex items-center gap-3 cursor-pointer group p-2 rounded-lg hover:bg-white/5 transition-colors w-full text-left",children:[e.jsx("div",{className:`w-10 h-5 rounded-full p-0.5 transition-colors ${t.showSeconds?"bg-blue-500":"bg-white/20"}`,children:e.jsx("div",{className:`w-4 h-4 bg-white rounded-full shadow-sm transition-transform ${t.showSeconds?"translate-x-5":"translate-x-0"}`})}),e.jsx("span",{className:"text-sm text-white/80",children:"Saniyeyi Göster"})]})})]}),e.jsx("hr",{className:"border-white/10"}),e.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium text-white/60 mb-3 flex items-center gap-2",children:[e.jsx(v,{className:"w-3.5 h-3.5"}),"Yazı Tipi (Font)"]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:m.map(s=>e.jsx("button",{onClick:()=>o({...t,fontFamily:s.id}),className:`px-3 py-2 rounded-lg text-xs font-medium border transition-all ${t.fontFamily===s.id?"bg-blue-500/20 border-blue-500 text-blue-400":"bg-white/5 border-white/10 text-white/60 hover:bg-white/10"}`,children:s.label},s.id))})]}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium text-white/60 mb-3 flex items-center gap-2",children:[e.jsx(p,{className:"w-3.5 h-3.5"}),"Boyut"]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:x.map(s=>e.jsx("button",{onClick:()=>o({...t,fontSize:s.id}),className:`px-3 py-2 rounded-lg text-xs font-medium border transition-all ${t.fontSize===s.id?"bg-blue-500/20 border-blue-500 text-blue-400":"bg-white/5 border-white/10 text-white/60 hover:bg-white/10"}`,children:s.label},s.id))})]})]}),e.jsx("hr",{className:"border-white/10"}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium text-white/60 mb-3 flex items-center gap-2",children:[e.jsx(f,{className:"w-3.5 h-3.5"}),"Tarih Biçimi"]}),e.jsx("div",{className:"space-y-2",children:[{id:"full",label:"Görünür",example:"19 Kasım Çarşamba"},{id:"hidden",label:"Gizli",example:"(Tarih gösterilmez)"}].map(s=>e.jsxs("button",{onClick:()=>o({...t,showDate:s.id!=="hidden"}),className:`w-full flex items-center justify-between p-3 rounded-lg border transition-all ${s.id==="hidden"&&!t.showDate||s.id!=="hidden"&&t.showDate?"bg-blue-500/20 border-blue-500/50":"bg-white/5 border-transparent hover:bg-white/10"}`,children:[e.jsx("span",{className:"text-sm font-medium text-white",children:s.example}),e.jsx("span",{className:"text-xs text-white/40",children:s.label})]},s.id))})]})]}),e.jsxs("div",{className:"p-4 border-t border-white/10 flex justify-end gap-3 bg-black/20 mt-auto",children:[e.jsx("button",{onClick:a,className:"px-4 py-2 text-sm text-white/70 hover:text-white transition-colors",children:"İptal"}),e.jsxs("button",{onClick:h,className:"px-6 py-2 bg-blue-600 hover:bg-blue-500 text-white text-sm font-medium rounded-lg transition-colors flex items-center gap-2",children:[e.jsx(u,{className:"w-4 h-4"}),"Kaydet"]})]})]})]})};export{S as default}; diff --git a/dist-store/assets/FolderViewModal-DJZs6xGL.js b/dist-store/assets/FolderViewModal-a6QU9HbF.js similarity index 97% rename from dist-store/assets/FolderViewModal-DJZs6xGL.js rename to dist-store/assets/FolderViewModal-a6QU9HbF.js index e3e82d8..b9fbeaa 100644 --- a/dist-store/assets/FolderViewModal-DJZs6xGL.js +++ b/dist-store/assets/FolderViewModal-a6QU9HbF.js @@ -1 +1 @@ -import{r as i,j as e,b as f,c as w}from"./index-DEWape2v.js";import{q as g,F as j,r as d,g as v,e as N,a as y}from"./main-BX_0fFXn.js";function k({title:r,titleId:a,...s},c){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:c,"aria-labelledby":a},s),r?i.createElement("title",{id:a},r):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776"}))}const x=i.forwardRef(k),C=r=>{const a=document.createElement("a");a.href=r,a.target="_blank",a.rel="noopener noreferrer",document.body.appendChild(a),a.click(),document.body.removeChild(a)},R=({folder:r,isOpen:a,onClose:s,onEditItem:c,onDeleteItem:h,onAddItem:m})=>{if(!a)return null;const n=r.children||[],p=()=>{n.forEach(l=>{const o=d(l);o&&window.open(o,"_blank")})};return e.jsxs("div",{className:"fixed inset-0 z-[80] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:s}),e.jsxs("div",{className:"relative w-full max-w-2xl bg-black/50 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl animate-slide-up text-white max-h-[85vh] flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 p-5 border-b border-white/10",children:[e.jsx(x,{className:"w-7 h-7 text-yellow-400 flex-shrink-0"}),e.jsx("h2",{className:"text-lg font-semibold flex-1 truncate",children:r.title}),e.jsxs("div",{className:"flex items-center gap-2",children:[n.length>0&&e.jsxs("button",{onClick:p,title:"Hepsini aynı anda aç",className:"flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-yellow-500/15 hover:bg-yellow-500/30 border border-yellow-500/25 text-yellow-300 text-xs font-medium transition-all",children:[e.jsx(g,{className:"w-3.5 h-3.5"}),"Hepsini Aç"]}),e.jsx("button",{onClick:s,title:"Kapat",className:"text-white/50 hover:text-white transition-colors p-1",children:e.jsx(j,{className:"w-5 h-5"})})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-5",children:n.length===0?e.jsxs("div",{className:"text-center py-16 text-white/40",children:[e.jsx(x,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{className:"text-sm",children:"Bu grup boş."}),e.jsx("p",{className:"text-xs mt-1 text-white/30",children:"Aşağıdan kısayol ekleyebilirsin."})]}):e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:n.map(l=>{const o=l.profiles&&l.profiles.length>0,u=d(l),b=l.iconType==="image"&&l.iconValue?l.iconValue:v(l.url);return e.jsxs("div",{className:"group relative flex flex-col bg-white/5 hover:bg-white/8 border border-white/10 rounded-xl overflow-hidden transition-all",children:[e.jsxs("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"flex flex-col items-center p-4 gap-2 flex-1 hover:bg-white/5 transition-colors",children:[e.jsx("img",{src:b,alt:l.title,className:"w-9 h-9 rounded-md object-contain flex-shrink-0",onError:t=>t.target.src="https://via.placeholder.com/36?text=?"}),e.jsx("span",{className:"text-xs text-white/90 font-medium truncate w-full text-center leading-tight",children:l.title})]}),o&&e.jsx("div",{className:"border-t border-white/8 px-2 py-2 flex flex-wrap gap-1.5 justify-center",children:l.profiles.map(t=>e.jsxs("button",{onClick:()=>C(d(l,t)),title:`${t.name} ile aç`,className:`flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-medium transition-all hover:scale-105 hover:brightness-110 ${t.avatarColor||"bg-blue-500/70"} text-white`,children:[e.jsx("span",{children:t.name.substring(0,1).toUpperCase()}),e.jsx("span",{className:"max-w-[48px] truncate",children:t.name}),e.jsx(f,{className:"w-2.5 h-2.5 opacity-70"})]},t.id))}),e.jsxs("div",{className:"absolute top-1.5 right-1.5 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx("button",{onClick:t=>{t.preventDefault(),c(l)},title:"Düzenle",className:"p-1 rounded-full bg-black/40 hover:bg-blue-500/80 transition-colors",children:e.jsx(w,{className:"w-3 h-3"})}),e.jsx("button",{onClick:t=>{t.preventDefault(),h(l.id)},title:"Sil",className:"p-1 rounded-full bg-black/40 hover:bg-red-500/80 transition-colors",children:e.jsx(N,{className:"w-3 h-3"})})]})]},l.id)})})}),e.jsx("div",{className:"p-4 border-t border-white/10",children:e.jsxs("button",{onClick:m,className:"w-full bg-blue-600 hover:bg-blue-500 text-white font-medium py-2.5 rounded-lg transition-colors flex items-center justify-center gap-2 text-sm",children:[e.jsx(y,{className:"w-4 h-4"}),"Bu Gruba Kısayol Ekle"]})})]})]})};export{R as default}; +import{r as i,j as e,b as f,c as w}from"./index-DEWape2v.js";import{q as g,F as j,r as d,g as v,e as N,a as y}from"./main-ByMmISQz.js";function k({title:r,titleId:a,...s},c){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:c,"aria-labelledby":a},s),r?i.createElement("title",{id:a},r):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776"}))}const x=i.forwardRef(k),C=r=>{const a=document.createElement("a");a.href=r,a.target="_blank",a.rel="noopener noreferrer",document.body.appendChild(a),a.click(),document.body.removeChild(a)},R=({folder:r,isOpen:a,onClose:s,onEditItem:c,onDeleteItem:h,onAddItem:m})=>{if(!a)return null;const n=r.children||[],p=()=>{n.forEach(l=>{const o=d(l);o&&window.open(o,"_blank")})};return e.jsxs("div",{className:"fixed inset-0 z-[80] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:s}),e.jsxs("div",{className:"relative w-full max-w-2xl bg-black/50 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl animate-slide-up text-white max-h-[85vh] flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 p-5 border-b border-white/10",children:[e.jsx(x,{className:"w-7 h-7 text-yellow-400 flex-shrink-0"}),e.jsx("h2",{className:"text-lg font-semibold flex-1 truncate",children:r.title}),e.jsxs("div",{className:"flex items-center gap-2",children:[n.length>0&&e.jsxs("button",{onClick:p,title:"Hepsini aynı anda aç",className:"flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-yellow-500/15 hover:bg-yellow-500/30 border border-yellow-500/25 text-yellow-300 text-xs font-medium transition-all",children:[e.jsx(g,{className:"w-3.5 h-3.5"}),"Hepsini Aç"]}),e.jsx("button",{onClick:s,title:"Kapat",className:"text-white/50 hover:text-white transition-colors p-1",children:e.jsx(j,{className:"w-5 h-5"})})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-5",children:n.length===0?e.jsxs("div",{className:"text-center py-16 text-white/40",children:[e.jsx(x,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{className:"text-sm",children:"Bu grup boş."}),e.jsx("p",{className:"text-xs mt-1 text-white/30",children:"Aşağıdan kısayol ekleyebilirsin."})]}):e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:n.map(l=>{const o=l.profiles&&l.profiles.length>0,u=d(l),b=l.iconType==="image"&&l.iconValue?l.iconValue:v(l.url);return e.jsxs("div",{className:"group relative flex flex-col bg-white/5 hover:bg-white/8 border border-white/10 rounded-xl overflow-hidden transition-all",children:[e.jsxs("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"flex flex-col items-center p-4 gap-2 flex-1 hover:bg-white/5 transition-colors",children:[e.jsx("img",{src:b,alt:l.title,className:"w-9 h-9 rounded-md object-contain flex-shrink-0",onError:t=>t.target.src="https://via.placeholder.com/36?text=?"}),e.jsx("span",{className:"text-xs text-white/90 font-medium truncate w-full text-center leading-tight",children:l.title})]}),o&&e.jsx("div",{className:"border-t border-white/8 px-2 py-2 flex flex-wrap gap-1.5 justify-center",children:l.profiles.map(t=>e.jsxs("button",{onClick:()=>C(d(l,t)),title:`${t.name} ile aç`,className:`flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-medium transition-all hover:scale-105 hover:brightness-110 ${t.avatarColor||"bg-blue-500/70"} text-white`,children:[e.jsx("span",{children:t.name.substring(0,1).toUpperCase()}),e.jsx("span",{className:"max-w-[48px] truncate",children:t.name}),e.jsx(f,{className:"w-2.5 h-2.5 opacity-70"})]},t.id))}),e.jsxs("div",{className:"absolute top-1.5 right-1.5 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx("button",{onClick:t=>{t.preventDefault(),c(l)},title:"Düzenle",className:"p-1 rounded-full bg-black/40 hover:bg-blue-500/80 transition-colors",children:e.jsx(w,{className:"w-3 h-3"})}),e.jsx("button",{onClick:t=>{t.preventDefault(),h(l.id)},title:"Sil",className:"p-1 rounded-full bg-black/40 hover:bg-red-500/80 transition-colors",children:e.jsx(N,{className:"w-3 h-3"})})]})]},l.id)})})}),e.jsx("div",{className:"p-4 border-t border-white/10",children:e.jsxs("button",{onClick:m,className:"w-full bg-blue-600 hover:bg-blue-500 text-white font-medium py-2.5 rounded-lg transition-colors flex items-center justify-center gap-2 text-sm",children:[e.jsx(y,{className:"w-4 h-4"}),"Bu Gruba Kısayol Ekle"]})})]})]})};export{R as default}; diff --git a/dist-store/assets/ShortcutSettingsModal-CjZJDRQ1.js b/dist-store/assets/ShortcutSettingsModal-7JjP3Ut6.js similarity index 99% rename from dist-store/assets/ShortcutSettingsModal-CjZJDRQ1.js rename to dist-store/assets/ShortcutSettingsModal-7JjP3Ut6.js index ad40958..473bc1a 100644 --- a/dist-store/assets/ShortcutSettingsModal-CjZJDRQ1.js +++ b/dist-store/assets/ShortcutSettingsModal-7JjP3Ut6.js @@ -1,3 +1,3 @@ -import{r as i,j as e,C as E}from"./index-DEWape2v.js";import{b as S,c as T,a as I,d as z,e as L,g as F,F as V,f as U,h as K}from"./main-BX_0fFXn.js";import{F as N}from"./CheckIcon-CxKfb6Lo.js";function O({title:s,titleId:r,...t},a){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),s?i.createElement("title",{id:r},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"}))}const A=i.forwardRef(O);function G({title:s,titleId:r,...t},a){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),s?i.createElement("title",{id:r},s):null,i.createElement("path",{fillRule:"evenodd",d:"M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z",clipRule:"evenodd"}))}const M=i.forwardRef(G),Y=({formData:s,setFormData:r})=>e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-1",children:"Başlık"}),e.jsx("input",{type:"text",value:s.title,onChange:t=>r({...s,title:t.target.value}),className:"w-full bg-black/40 border border-white/10 rounded-lg p-2.5 text-white text-sm focus:border-blue-500/50 focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-1",children:"Kategori"}),e.jsx("select",{value:s.category,onChange:t=>r({...s,category:t.target.value}),className:"w-full bg-black/40 border border-white/10 rounded-lg p-2.5 text-white text-sm focus:border-blue-500/50 focus:outline-none",children:Object.values(E).map(t=>e.jsx("option",{value:t,className:"bg-black",children:t},t))})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-1",children:"Ana URL veya Protokol"}),e.jsx("input",{type:"text",value:s.url,onChange:t=>r({...s,url:t.target.value}),placeholder:"https://... veya spotify:",className:"w-full bg-black/40 border border-white/10 rounded-lg p-2.5 text-white text-sm focus:border-blue-500/50 focus:outline-none font-mono"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-3",children:"İkon Tipi"}),e.jsxs("div",{className:"flex gap-4 mb-4",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"radio",name:"iconType",checked:s.iconType==="favicon",onChange:()=>r({...s,iconType:"favicon",iconValue:void 0}),className:"accent-blue-500"}),e.jsx("span",{className:"text-sm",children:"Otomatik (Favicon)"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"radio",name:"iconType",checked:s.iconType==="image",onChange:()=>r({...s,iconType:"image"}),className:"accent-blue-500"}),e.jsx("span",{className:"text-sm",children:"Özel Resim URL"})]})]}),s.iconType==="image"&&e.jsxs("div",{children:[e.jsx("input",{type:"text",placeholder:"https://example.com/logo.png",value:s.iconValue||"",onChange:t=>r({...s,iconValue:t.target.value}),className:"w-full bg-black/40 border border-white/10 rounded-lg p-2.5 text-white text-sm focus:border-blue-500/50 focus:outline-none"}),s.iconValue&&e.jsx("img",{src:s.iconValue,alt:"Preview",className:"w-12 h-12 mt-2 rounded-md object-contain bg-white/5"})]})]})]}),p=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500","bg-gray-500"],B=({formData:s,setFormData:r,allShortcuts:t})=>{const[a,f]=i.useState(null),[c,h]=i.useState(""),[n,u]=i.useState(""),[b,m]=i.useState(p[10]),[g,w]=i.useState(!1),v=i.useRef(null),y=i.useMemo(()=>{const l=new Map;return t.forEach(d=>{var o;(o=d.profiles)==null||o.forEach(x=>{x.name&&!l.has(x.name)&&l.set(x.name,{name:x.name,color:x.avatarColor||p[0],url:x.url})})}),Array.from(l.values())},[t]);i.useEffect(()=>{const l=d=>{v.current&&!v.current.contains(d.target)&&w(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[]);const j=()=>{f(null),h(""),u(""),m(p[10]),w(!1)},k=()=>{var l;if(c.trim()){if(a){const d=(l=s.profiles)==null?void 0:l.map(o=>o.id===a?{...o,name:c,url:n.trim()||void 0,avatarColor:b}:o);r({...s,profiles:d})}else{const d={id:crypto.randomUUID(),name:c,url:n.trim()||void 0,avatarColor:b};r({...s,profiles:[...s.profiles||[],d]})}j()}},P=l=>{f(l.id),h(l.name),u(l.url||""),m(l.avatarColor||p[10])},C=l=>{h(l.name),m(l.color),u(l.url||"")},R=l=>{var o;const d=s.defaultProfileId===l;r({...s,defaultProfileId:d?void 0:s.defaultProfileId,profiles:(o=s.profiles)==null?void 0:o.filter(x=>x.id!==l)}),a===l&&j()},$=l=>{r({...s,defaultProfileId:s.defaultProfileId===l?void 0:l})};return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"bg-purple-500/10 border border-purple-500/20 rounded-lg p-3",children:e.jsxs("p",{className:"text-xs text-purple-200",children:["Profiller, aynı sitede farklı hesaplar (örn: İş, Kişisel Gmail) kullanmanızı sağlar. ",e.jsx("br",{}),"Yıldız ikonuna tıklayarak varsayılan profili seçebilirsiniz."]})}),e.jsxs("div",{className:`bg-white/5 p-4 rounded-xl border transition-colors space-y-3 z-20 relative ${a?"border-purple-500/50 bg-purple-500/5":"border-white/10"}`,children:[e.jsxs("div",{className:"flex justify-between items-center mb-1",children:[e.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-white/40",children:a?"Profili Düzenle":"Yeni Profil Ekle"}),a&&e.jsxs("button",{onClick:j,className:"text-xs text-white/50 hover:text-white flex items-center gap-1",children:[e.jsx(S,{className:"w-2.5 h-2.5"})," Vazgeç"]})]}),!a&&y.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[e.jsx("span",{className:"text-[10px] text-white/40 w-full",children:"Kayıtlı Profillerden Seç:"}),y.map(l=>{var o;return((o=s.profiles)==null?void 0:o.some(x=>x.name===l.name))?null:e.jsxs("button",{onClick:()=>C(l),className:"flex items-center gap-1.5 px-2 py-1 rounded-full bg-white/5 hover:bg-white/10 border border-white/5 hover:border-white/20 transition-all group",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${l.color}`}),e.jsx("span",{className:"text-xs text-white/80 group-hover:text-white",children:l.name})]},l.name)})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"flex-1",children:e.jsx("input",{type:"text",placeholder:"Profil Adı (Örn: İş, Kişisel)",value:c,onChange:l=>h(l.target.value),className:"w-full bg-black/40 border border-white/10 rounded-lg p-2 text-white text-sm focus:border-purple-500/50 focus:outline-none"})}),e.jsxs("div",{className:"relative",ref:v,children:[e.jsxs("button",{onClick:()=>w(!g),className:"flex items-center justify-between gap-2 h-full bg-black/40 hover:bg-black/60 rounded-lg px-3 border border-white/10 min-w-[80px] transition-colors",children:[e.jsx("div",{className:`w-5 h-5 rounded-full shadow-sm ${b} border border-white/20`}),e.jsx(T,{className:"w-3.5 h-3.5 text-white/50"})]}),g&&e.jsx("div",{className:"absolute top-full right-0 mt-2 p-3 bg-black/70 backdrop-blur-2xl border border-white/10 rounded-xl shadow-2xl grid grid-cols-6 gap-2 w-[220px] z-50 animate-fade-in",children:p.map(l=>e.jsx("button",{onClick:()=>{m(l),w(!1)},className:`w-6 h-6 rounded-full transition-all hover:scale-110 flex items-center justify-center ${l} ${b===l?"ring-2 ring-white ring-offset-1 ring-offset-black/70":""}`,children:b===l&&e.jsx(N,{className:"w-3 h-3 text-white drop-shadow-md"})},l))})]})]}),e.jsx("input",{type:"text",placeholder:"Özel URL veya E-posta Adresi",value:n,onChange:l=>u(l.target.value),className:"w-full bg-black/40 border border-white/10 rounded-lg p-2 text-white text-sm focus:border-purple-500/50 focus:outline-none font-mono text-xs"}),e.jsx("p",{className:"text-[10px] text-white/40",children:"İpucu: Tam URL (https://...) veya Google uygulamaları için e-posta adresi girebilirsiniz."}),e.jsx("button",{onClick:k,disabled:!c.trim(),className:`w-full text-white text-sm font-medium py-2 rounded-lg transition-colors disabled:opacity-50 flex items-center justify-center gap-2 +import{r as i,j as e,C as E}from"./index-DEWape2v.js";import{b as S,c as T,a as I,d as z,e as L,g as F,F as V,f as U,h as K}from"./main-ByMmISQz.js";import{F as N}from"./CheckIcon-CxKfb6Lo.js";function O({title:s,titleId:r,...t},a){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),s?i.createElement("title",{id:r},s):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"}))}const A=i.forwardRef(O);function G({title:s,titleId:r,...t},a){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),s?i.createElement("title",{id:r},s):null,i.createElement("path",{fillRule:"evenodd",d:"M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z",clipRule:"evenodd"}))}const M=i.forwardRef(G),Y=({formData:s,setFormData:r})=>e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-1",children:"Başlık"}),e.jsx("input",{type:"text",value:s.title,onChange:t=>r({...s,title:t.target.value}),className:"w-full bg-black/40 border border-white/10 rounded-lg p-2.5 text-white text-sm focus:border-blue-500/50 focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-1",children:"Kategori"}),e.jsx("select",{value:s.category,onChange:t=>r({...s,category:t.target.value}),className:"w-full bg-black/40 border border-white/10 rounded-lg p-2.5 text-white text-sm focus:border-blue-500/50 focus:outline-none",children:Object.values(E).map(t=>e.jsx("option",{value:t,className:"bg-black",children:t},t))})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-1",children:"Ana URL veya Protokol"}),e.jsx("input",{type:"text",value:s.url,onChange:t=>r({...s,url:t.target.value}),placeholder:"https://... veya spotify:",className:"w-full bg-black/40 border border-white/10 rounded-lg p-2.5 text-white text-sm focus:border-blue-500/50 focus:outline-none font-mono"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-3",children:"İkon Tipi"}),e.jsxs("div",{className:"flex gap-4 mb-4",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"radio",name:"iconType",checked:s.iconType==="favicon",onChange:()=>r({...s,iconType:"favicon",iconValue:void 0}),className:"accent-blue-500"}),e.jsx("span",{className:"text-sm",children:"Otomatik (Favicon)"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"radio",name:"iconType",checked:s.iconType==="image",onChange:()=>r({...s,iconType:"image"}),className:"accent-blue-500"}),e.jsx("span",{className:"text-sm",children:"Özel Resim URL"})]})]}),s.iconType==="image"&&e.jsxs("div",{children:[e.jsx("input",{type:"text",placeholder:"https://example.com/logo.png",value:s.iconValue||"",onChange:t=>r({...s,iconValue:t.target.value}),className:"w-full bg-black/40 border border-white/10 rounded-lg p-2.5 text-white text-sm focus:border-blue-500/50 focus:outline-none"}),s.iconValue&&e.jsx("img",{src:s.iconValue,alt:"Preview",className:"w-12 h-12 mt-2 rounded-md object-contain bg-white/5"})]})]})]}),p=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500","bg-gray-500"],B=({formData:s,setFormData:r,allShortcuts:t})=>{const[a,f]=i.useState(null),[c,h]=i.useState(""),[n,u]=i.useState(""),[b,m]=i.useState(p[10]),[g,w]=i.useState(!1),v=i.useRef(null),y=i.useMemo(()=>{const l=new Map;return t.forEach(d=>{var o;(o=d.profiles)==null||o.forEach(x=>{x.name&&!l.has(x.name)&&l.set(x.name,{name:x.name,color:x.avatarColor||p[0],url:x.url})})}),Array.from(l.values())},[t]);i.useEffect(()=>{const l=d=>{v.current&&!v.current.contains(d.target)&&w(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[]);const j=()=>{f(null),h(""),u(""),m(p[10]),w(!1)},k=()=>{var l;if(c.trim()){if(a){const d=(l=s.profiles)==null?void 0:l.map(o=>o.id===a?{...o,name:c,url:n.trim()||void 0,avatarColor:b}:o);r({...s,profiles:d})}else{const d={id:crypto.randomUUID(),name:c,url:n.trim()||void 0,avatarColor:b};r({...s,profiles:[...s.profiles||[],d]})}j()}},P=l=>{f(l.id),h(l.name),u(l.url||""),m(l.avatarColor||p[10])},C=l=>{h(l.name),m(l.color),u(l.url||"")},R=l=>{var o;const d=s.defaultProfileId===l;r({...s,defaultProfileId:d?void 0:s.defaultProfileId,profiles:(o=s.profiles)==null?void 0:o.filter(x=>x.id!==l)}),a===l&&j()},$=l=>{r({...s,defaultProfileId:s.defaultProfileId===l?void 0:l})};return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"bg-purple-500/10 border border-purple-500/20 rounded-lg p-3",children:e.jsxs("p",{className:"text-xs text-purple-200",children:["Profiller, aynı sitede farklı hesaplar (örn: İş, Kişisel Gmail) kullanmanızı sağlar. ",e.jsx("br",{}),"Yıldız ikonuna tıklayarak varsayılan profili seçebilirsiniz."]})}),e.jsxs("div",{className:`bg-white/5 p-4 rounded-xl border transition-colors space-y-3 z-20 relative ${a?"border-purple-500/50 bg-purple-500/5":"border-white/10"}`,children:[e.jsxs("div",{className:"flex justify-between items-center mb-1",children:[e.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-white/40",children:a?"Profili Düzenle":"Yeni Profil Ekle"}),a&&e.jsxs("button",{onClick:j,className:"text-xs text-white/50 hover:text-white flex items-center gap-1",children:[e.jsx(S,{className:"w-2.5 h-2.5"})," Vazgeç"]})]}),!a&&y.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[e.jsx("span",{className:"text-[10px] text-white/40 w-full",children:"Kayıtlı Profillerden Seç:"}),y.map(l=>{var o;return((o=s.profiles)==null?void 0:o.some(x=>x.name===l.name))?null:e.jsxs("button",{onClick:()=>C(l),className:"flex items-center gap-1.5 px-2 py-1 rounded-full bg-white/5 hover:bg-white/10 border border-white/5 hover:border-white/20 transition-all group",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${l.color}`}),e.jsx("span",{className:"text-xs text-white/80 group-hover:text-white",children:l.name})]},l.name)})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"flex-1",children:e.jsx("input",{type:"text",placeholder:"Profil Adı (Örn: İş, Kişisel)",value:c,onChange:l=>h(l.target.value),className:"w-full bg-black/40 border border-white/10 rounded-lg p-2 text-white text-sm focus:border-purple-500/50 focus:outline-none"})}),e.jsxs("div",{className:"relative",ref:v,children:[e.jsxs("button",{onClick:()=>w(!g),className:"flex items-center justify-between gap-2 h-full bg-black/40 hover:bg-black/60 rounded-lg px-3 border border-white/10 min-w-[80px] transition-colors",children:[e.jsx("div",{className:`w-5 h-5 rounded-full shadow-sm ${b} border border-white/20`}),e.jsx(T,{className:"w-3.5 h-3.5 text-white/50"})]}),g&&e.jsx("div",{className:"absolute top-full right-0 mt-2 p-3 bg-black/70 backdrop-blur-2xl border border-white/10 rounded-xl shadow-2xl grid grid-cols-6 gap-2 w-[220px] z-50 animate-fade-in",children:p.map(l=>e.jsx("button",{onClick:()=>{m(l),w(!1)},className:`w-6 h-6 rounded-full transition-all hover:scale-110 flex items-center justify-center ${l} ${b===l?"ring-2 ring-white ring-offset-1 ring-offset-black/70":""}`,children:b===l&&e.jsx(N,{className:"w-3 h-3 text-white drop-shadow-md"})},l))})]})]}),e.jsx("input",{type:"text",placeholder:"Özel URL veya E-posta Adresi",value:n,onChange:l=>u(l.target.value),className:"w-full bg-black/40 border border-white/10 rounded-lg p-2 text-white text-sm focus:border-purple-500/50 focus:outline-none font-mono text-xs"}),e.jsx("p",{className:"text-[10px] text-white/40",children:"İpucu: Tam URL (https://...) veya Google uygulamaları için e-posta adresi girebilirsiniz."}),e.jsx("button",{onClick:k,disabled:!c.trim(),className:`w-full text-white text-sm font-medium py-2 rounded-lg transition-colors disabled:opacity-50 flex items-center justify-center gap-2 ${a?"bg-purple-600 hover:bg-purple-500":"bg-white/10 hover:bg-white/20"} `,children:a?e.jsxs(e.Fragment,{children:[e.jsx(N,{className:"w-3.5 h-3.5"})," Güncelle"]}):e.jsxs(e.Fragment,{children:[e.jsx(I,{className:"w-3.5 h-3.5"})," Ekle"]})})]}),e.jsx("div",{className:"space-y-2",children:s.profiles&&s.profiles.length>0?s.profiles.map(l=>e.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border transition-all group ${s.defaultProfileId===l.id?"bg-purple-500/10 border-purple-500/30":"bg-white/5 border-white/5"}`,children:[e.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[e.jsx("div",{className:`w-8 h-8 rounded-full shrink-0 ${l.avatarColor||"bg-gray-500"} flex items-center justify-center text-xs font-bold text-white shadow-sm border border-white/10`,children:l.name.substring(0,2).toUpperCase()}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"text-sm font-medium text-white flex items-center gap-2",children:[e.jsx("span",{className:"truncate",children:l.name}),s.defaultProfileId===l.id&&e.jsx("span",{className:"text-[10px] bg-purple-500/30 text-purple-200 px-1.5 py-0.5 rounded border border-purple-500/20 shrink-0",children:"Varsayılan"})]}),e.jsx("div",{className:"text-xs text-white/40 truncate max-w-[200px]",children:l.url||"Ana URL"})]})]}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[e.jsx("button",{onClick:()=>$(l.id),className:`p-2 rounded-lg transition-colors ${s.defaultProfileId===l.id?"text-yellow-400 hover:bg-yellow-400/10":"text-white/20 hover:text-yellow-400 hover:bg-white/10"}`,title:s.defaultProfileId===l.id?"Varsayılanı Kaldır":"Varsayılan Yap",children:s.defaultProfileId===l.id?e.jsx(M,{className:"w-4 h-4"}):e.jsx(A,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>P(l),className:`p-2 rounded-lg transition-colors ${a===l.id?"text-blue-400 bg-blue-400/10":"text-white/30 hover:text-blue-400 hover:bg-blue-400/10"}`,title:"Düzenle",children:e.jsx(z,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>R(l.id),className:"p-2 text-white/30 hover:text-red-400 hover:bg-red-400/10 rounded-lg transition-colors",title:"Sil",children:e.jsx(L,{className:"w-4 h-4"})})]})]},l.id)):e.jsxs("div",{className:"text-center py-8 text-white/30 text-sm border border-dashed border-white/10 rounded-xl",children:["Henüz profil eklenmemiş. ",e.jsx("br",{}),'"Yeni Profil Ekle" formunu kullanın.']})})]})},q=({isOpen:s,onClose:r,shortcut:t,allShortcuts:a=[],onSave:f})=>{var m;const[c,h]=i.useState("general"),[n,u]=i.useState(null);if(i.useEffect(()=>{t&&u({...t,iconType:t.iconType||"favicon",profiles:t.profiles||[]})},[t,s]),!s||!n)return null;const b=()=>{n&&(f(n),r())};return e.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),e.jsxs("div",{className:"relative w-full max-w-2xl bg-black/50 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl flex flex-col max-h-[90vh] overflow-hidden animate-slide-up text-white",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/10",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:n.iconType==="image"&&n.iconValue?n.iconValue:F(n.url),className:"w-6 h-6 rounded-sm",onError:g=>g.target.src="https://via.placeholder.com/24",alt:""}),e.jsx("h2",{className:"text-xl font-semibold",children:"Kısayol Ayarları"})]}),e.jsx("button",{onClick:r,title:"Kapat",className:"text-white/50 hover:text-white",children:e.jsx(V,{className:"w-6 h-6"})})]}),e.jsxs("div",{className:"flex border-b border-white/10",children:[e.jsxs("button",{onClick:()=>h("general"),className:`flex-1 py-3 text-sm font-medium flex items-center justify-center gap-2 transition-colors ${c==="general"?"bg-white/5 text-blue-400 border-b-2 border-blue-400":"text-white/60 hover:bg-white/5 hover:text-white"}`,children:[e.jsx(U,{className:"w-4 h-4"}),"Görünüm & İkon"]}),e.jsxs("button",{onClick:()=>h("profiles"),className:`flex-1 py-3 text-sm font-medium flex items-center justify-center gap-2 transition-colors ${c==="profiles"?"bg-white/5 text-purple-400 border-b-2 border-purple-400":"text-white/60 hover:bg-white/5 hover:text-white"}`,children:[e.jsx(K,{className:"w-4 h-4"}),"Profiller (",((m=n.profiles)==null?void 0:m.length)||0,")"]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-6 custom-scrollbar",children:[c==="general"&&e.jsx(Y,{formData:n,setFormData:u}),c==="profiles"&&e.jsx(B,{formData:n,setFormData:u,allShortcuts:a})]}),e.jsxs("div",{className:"p-4 border-t border-white/10 flex justify-end gap-3 bg-black/20",children:[e.jsx("button",{onClick:r,className:"px-4 py-2 text-sm text-white/70 hover:text-white transition-colors",children:"İptal"}),e.jsxs("button",{onClick:b,className:"px-6 py-2 bg-blue-600 hover:bg-blue-500 text-white text-sm font-medium rounded-lg transition-colors flex items-center gap-2",children:[e.jsx(N,{className:"w-4 h-4"}),"Kaydet"]})]})]})]})};export{q as default}; diff --git a/dist-store/assets/main-BX_0fFXn.js b/dist-store/assets/main-ByMmISQz.js similarity index 76% rename from dist-store/assets/main-BX_0fFXn.js rename to dist-store/assets/main-ByMmISQz.js index be9a345..6c6de6c 100644 --- a/dist-store/assets/main-BX_0fFXn.js +++ b/dist-store/assets/main-ByMmISQz.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AddModal-Ylmnq22h.js","assets/index-DEWape2v.js","assets/index-C6j3YXVw.css","assets/ChevronLeftIcon-DHpP5kml.js","assets/LinkIcon-2Miy7fz5.js","assets/ShortcutSettingsModal-CjZJDRQ1.js","assets/CheckIcon-CxKfb6Lo.js","assets/BackgroundSettingsModal-B5X-Q6xJ.js","assets/ClockSettingsModal-CueBoYPW.js","assets/FolderViewModal-DJZs6xGL.js"])))=>i.map(i=>d[i]); -import{R as U,j as e,r,F as pt,C as J,a as ze,b as Se,c as je,d as ft,e as gt,f as Ue,g as wt}from"./index-DEWape2v.js";const bt="modulepreload",vt=function(t){return"/"+t},Le={},ee=function(s,a,n){let l=Promise.resolve();if(a&&a.length>0){let i=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),u=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));l=i(a.map(h=>{if(h=vt(h),h in Le)return;Le[h]=!0;const m=h.endsWith(".css"),x=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${x}`))return;const c=document.createElement("link");if(c.rel=m?"stylesheet":bt,m||(c.as="script"),c.crossOrigin="",c.href=h,u&&c.setAttribute("nonce",u),document.head.appendChild(c),m)return new Promise((p,b)=>{c.addEventListener("load",p),c.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(i){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=i,window.dispatchEvent(d),!d.defaultPrevented)throw i}return l.then(i=>{for(const d of i||[])d.status==="rejected"&&o(d.reason);return s().catch(o)})},yt=({config:t,isEditMode:s,onOpenSettings:a})=>{const[n,l]=U.useState(new Date),o=U.useMemo(()=>new Intl.DateTimeFormat("tr-TR",{hour:"2-digit",minute:"2-digit",second:t.showSeconds?"2-digit":void 0,hour12:t.format==="12h"}),[t.showSeconds,t.format]);U.useEffect(()=>{const m=setInterval(()=>{l(x=>{const c=new Date;return o.format(c)===o.format(x)?x:c})},1e3);return()=>clearInterval(m)},[o]);const i=U.useMemo(()=>{const m={geist:'"Geist Sans", system-ui, sans-serif',system:"system-ui, sans-serif",mono:'"Geist Mono", monospace',serif:"Georgia, serif"},x={sm:"text-4xl md:text-5xl",md:"text-5xl md:text-6xl",lg:"text-6xl md:text-8xl",xl:"text-7xl md:text-9xl"};return{fontFamily:m[t.fontFamily||"geist"],sizeClass:x[t.fontSize||"xl"]}},[t.fontFamily,t.fontSize]),d=U.useMemo(()=>new Intl.DateTimeFormat("tr-TR",{weekday:"long",year:"numeric",month:"long",day:"numeric"}),[]),u=()=>o.format(n),h=()=>d.format(n);return e.jsxs("div",{className:"text-center mb-8 animate-fade-in relative group",style:{fontFamily:i.fontFamily},children:[e.jsx("div",{className:`${i.sizeClass} font-thin tracking-tight drop-shadow-lg transition-all duration-700`,style:{color:"var(--theme-accent, white)"},children:u()}),t.showDate&&e.jsx("div",{className:"text-lg md:text-xl text-white/70 mt-2 font-light capitalize",children:h()})]})};function jt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"}))}const kt=r.forwardRef(jt);function Nt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const G=r.forwardRef(Nt);function Et({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6 9 12.75l4.286-4.286a11.948 11.948 0 0 1 4.306 6.43l.776 2.898m0 0 3.182-5.511m-3.182 5.51-5.511-3.181"}))}const St=r.forwardRef(Et);function Ct({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 18 9 11.25l4.306 4.306a11.95 11.95 0 0 1 5.814-5.518l2.74-1.22m0 0-5.94-2.281m5.94 2.28-2.28 5.941"}))}const Lt=r.forwardRef(Ct);function Rt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"}))}const $t=r.forwardRef(Rt);function Ot({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"}))}const _t=r.forwardRef(Ot);function It({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const At=r.forwardRef(It);function Bt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"}))}const Tt=r.forwardRef(Bt);function Pt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"}))}const Re=r.forwardRef(Pt);function Mt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))}const Ft=r.forwardRef(Mt);function Dt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const zt=r.forwardRef(Dt);function Ut({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Wt=r.forwardRef(Ut);function Ht({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const $e=r.forwardRef(Ht);function Gt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m-3-2.818.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const Zt=r.forwardRef(Gt);function Kt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const Oe=r.forwardRef(Kt);function Yt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75"}))}const Vt=r.forwardRef(Yt);function Jt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z"}))}const qt=r.forwardRef(Jt);function Xt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const ke=r.forwardRef(Xt);function Qt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z"}))}const _e=r.forwardRef(Qt);function er({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const tr=r.forwardRef(er);function rr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const sr=r.forwardRef(rr);function ar({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const q=r.forwardRef(ar);function nr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"}))}const We=r.forwardRef(nr);function or({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"}))}const Ie=r.forwardRef(or);function lr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const ir=r.forwardRef(lr);function cr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"}))}const dr=r.forwardRef(cr);function ur({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const He=r.forwardRef(ur);function hr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const mr=r.forwardRef(hr);function xr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"}))}const pr=r.forwardRef(xr);function fr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"}))}const gr=r.forwardRef(fr);function wr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const Ne=r.forwardRef(wr),br=()=>{const[t,s]=r.useState(""),a=r.useRef(null),n=l=>{if(l.preventDefault(),!t.trim())return;const o=`https://www.google.com/search?q=${encodeURIComponent(t)}`,i=document.createElement("a");i.href=o,i.click()};return e.jsx("div",{className:"w-full max-w-2xl mx-auto mb-12 animate-slide-up group relative z-50",children:e.jsxs("form",{ref:a,onSubmit:n,className:"relative flex items-center",children:[e.jsx(pt,{className:"absolute left-4 w-6 h-6 text-white/70 transition-colors group-focus-within:text-white"}),e.jsx("input",{id:"search-query",name:"q",type:"text",value:t,onChange:l=>s(l.target.value),placeholder:"Web'de ara...",autoComplete:"off",className:"w-full bg-white/10 backdrop-blur-md border border-white/20 text-white text-lg placeholder-white/60 py-4 pl-14 pr-6 outline-none focus:bg-white/20 focus:border-[var(--theme-accent,white)] transition-all shadow-lg rounded-full"})]})})};function vr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",clipRule:"evenodd"}))}const yr=r.forwardRef(vr);function jr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{d:"M9.195 18.44c1.25.714 2.805-.189 2.805-1.629v-2.34l6.945 3.968c1.25.715 2.805-.188 2.805-1.628V8.69c0-1.44-1.555-2.343-2.805-1.628L12 11.029v-2.34c0-1.44-1.555-2.343-2.805-1.628l-7.108 4.061c-1.26.72-1.26 2.536 0 3.256l7.108 4.061Z"}))}const kr=r.forwardRef(jr);function Nr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const Ge=r.forwardRef(Nr);function Er({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{d:"M5.055 7.06C3.805 6.347 2.25 7.25 2.25 8.69v8.122c0 1.44 1.555 2.343 2.805 1.628L12 14.471v2.34c0 1.44 1.555 2.343 2.805 1.628l7.108-4.061c1.26-.72 1.26-2.536 0-3.256l-7.108-4.061C13.555 6.346 12 7.249 12 8.689v2.34L5.055 7.061Z"}))}const Ze=r.forwardRef(Er);function Sr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{fillRule:"evenodd",d:"M19.952 1.651a.75.75 0 0 1 .298.599V16.303a3 3 0 0 1-2.176 2.884l-1.32.377a2.553 2.553 0 1 1-1.403-4.909l2.311-.66a1.5 1.5 0 0 0 1.088-1.442V6.994l-9 2.572v9.737a3 3 0 0 1-2.176 2.884l-1.32.377a2.553 2.553 0 1 1-1.402-4.909l2.31-.66a1.5 1.5 0 0 0 1.088-1.442V5.25a.75.75 0 0 1 .544-.721l10.5-3a.75.75 0 0 1 .658.122Z",clipRule:"evenodd"}))}const ae=r.forwardRef(Sr);function Cr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{fillRule:"evenodd",d:"M6.75 5.25a.75.75 0 0 1 .75-.75H9a.75.75 0 0 1 .75.75v13.5a.75.75 0 0 1-.75.75H7.5a.75.75 0 0 1-.75-.75V5.25Zm7.5 0A.75.75 0 0 1 15 4.5h1.5a.75.75 0 0 1 .75.75v13.5a.75.75 0 0 1-.75.75H15a.75.75 0 0 1-.75-.75V5.25Z",clipRule:"evenodd"}))}const Ke=r.forwardRef(Cr);function Lr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{fillRule:"evenodd",d:"M4.5 5.653c0-1.427 1.529-2.33 2.779-1.643l11.54 6.347c1.295.712 1.295 2.573 0 3.286L7.28 19.99c-1.25.687-2.779-.217-2.779-1.643V5.653Z",clipRule:"evenodd"}))}const Ye=r.forwardRef(Lr),Ve="gtab_shortcuts",Je="gtab_layout",qe="gtab_tasks",Xe="gtab_bg_config",Qe="gtab_view_state",et="gtab_clock_config",tt="gtab_card_config",rt="gtab_stocks",Q=["https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=70&w=1600&auto=format&fit=crop","https://images.unsplash.com/photo-1614850523459-c2f4c699c52e?q=70&w=1600&auto=format&fit=crop","https://images.unsplash.com/photo-1506259091721-347f7c3bbcbf?q=70&w=1600&auto=format&fit=crop","https://images.unsplash.com/photo-1485470733090-0aae1788d5af?q=70&w=1600&auto=format&fit=crop","https://images.unsplash.com/photo-1550684848-fac1c5b4e853?q=70&w=1600&auto=format&fit=crop","https://images.unsplash.com/photo-1604871000636-074fa5117945?q=70&w=1600&auto=format&fit=crop","https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=70&w=1600&auto=format&fit=crop"],Ae=[{id:"1",title:"Google",url:"https://google.com",category:J.OTHER,iconType:"favicon"},{id:"2",title:"YouTube",url:"https://youtube.com",category:J.ENTERTAINMENT,iconType:"favicon"},{id:"3",title:"GitHub",url:"https://github.com",category:J.DEV,iconType:"favicon"},{id:"4",title:"Gmail",url:"https://mail.google.com",category:J.WORK,iconType:"favicon"},{id:"5",title:"Google Drive",url:"https://drive.google.com",category:J.WORK,iconType:"favicon"},{id:"6",title:"Twitter",url:"https://twitter.com",category:J.SOCIAL,iconType:"favicon"}],ne=[{id:"clock",visible:!0,order:0,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"search",visible:!0,order:1,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"tasks",visible:!0,order:2,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"categories",visible:!0,order:3,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"shortcuts",visible:!0,order:4,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"gmail",visible:!1,order:5,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"calendar",visible:!1,order:6,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"stocks",visible:!1,order:7,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"google-tasks",visible:!1,order:8,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20,widthPx:350,heightPx:500},{id:"google-keep",visible:!1,order:9,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20,widthPx:400,heightPx:600},{id:"weather",visible:!1,order:10,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20,widthPx:280,heightPx:320},{id:"pomodoro",visible:!1,order:11,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20,widthPx:280,heightPx:380},{id:"spotify",visible:!1,order:12,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20,widthPx:280,heightPx:400}],pe={format:"24h",showSeconds:!1,showDate:!0,fontFamily:"geist",fontSize:"xl"},zs={wrapperBg:"#0f172a",overlayBg:"rgba(0,0,0,0.3)",accentColor:"#3b82f6",glassBorder:"rgba(255,255,255,0.1)",glassBg:"rgba(255,255,255,0.05)",menuBg:"rgba(15,23,42,0.95)",menuBorder:"rgba(255,255,255,0.1)",textColor:"#ffffff"},fe={bgOpacity:10,shape:"rounded",size:"md",alignment:"center",font:"geist",iconSize:"md",cardWidth:100,glowEnabled:!0,gridGapX:16,gridGapY:16,gridCols:6,showCardBorder:!0,cardBorderOpacity:10,menuOpacity:95,menuBorderOpacity:10},Rr=()=>{try{const t=localStorage.getItem(Ve);return t?JSON.parse(t):Ae}catch(t){return console.error("Failed to load shortcuts",t),Ae}},$r=t=>{try{localStorage.setItem(Ve,JSON.stringify(t))}catch(s){console.error("Failed to save shortcuts",s)}},Or=()=>{try{const t=localStorage.getItem(Je);if(!t)return ne;let s=JSON.parse(t);return ne.forEach(a=>{s.some(l=>l.id===a.id)||s.push({...a})}),s.map(a=>({opacity:10,glassEffect:a.glassEffect??!0,showBorder:a.showBorder??!0,borderOpacity:a.borderOpacity??20,...a}))}catch{return ne}},_r=t=>{try{localStorage.setItem(Je,JSON.stringify(t))}catch(s){console.error("Failed to save layout",s)}},Ir=()=>{try{const t=localStorage.getItem(qe);return t?JSON.parse(t):[]}catch{return[]}},Ar=t=>{try{localStorage.setItem(qe,JSON.stringify(t))}catch(s){console.error("Failed to save tasks",s)}},Be=()=>{try{const t=localStorage.getItem(Xe);return t?JSON.parse(t):{type:"random",value:""}}catch{return{type:"random",value:""}}},Br=t=>{try{localStorage.setItem(Xe,JSON.stringify(t))}catch(s){console.error("Failed to save background",s)}},Tr=()=>{try{const t=localStorage.getItem(Qe);return t?JSON.parse(t):{category:"All",profile:"All"}}catch{return{category:"All",profile:"All"}}},Pr=t=>{try{localStorage.setItem(Qe,JSON.stringify(t))}catch(s){console.error("Failed to save view state",s)}},Mr=()=>{try{const t=localStorage.getItem(et);return t?{...pe,...JSON.parse(t)}:pe}catch{return pe}},Fr=t=>{try{localStorage.setItem(et,JSON.stringify(t))}catch(s){console.error("Failed to save clock config",s)}},Dr=()=>{try{const t=localStorage.getItem(tt);return t?{...fe,...JSON.parse(t)}:fe}catch{return fe}},zr=t=>{try{localStorage.setItem(tt,JSON.stringify(t))}catch(s){console.error("Failed to save card config",s)}},st=()=>{try{const t=localStorage.getItem(rt);return t?JSON.parse(t):{apiKey:"4QO8AQO0Y6B6NIPI",symbols:["AAPL","MSFT","GOOGL"]}}catch{return{apiKey:"4QO8AQO0Y6B6NIPI",symbols:["AAPL","MSFT","GOOGL"]}}},Us=t=>{try{localStorage.setItem(rt,JSON.stringify(t))}catch(s){console.error("Failed to save stocks config",s)}},Ws=t=>{const s=new Blob([JSON.stringify(t,null,2)],{type:"application/json"}),a=URL.createObjectURL(s),n=document.createElement("a");n.href=a,n.download=`gtab-backup-${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(a)},Hs=()=>new Promise((t,s)=>{const a=document.createElement("input");a.type="file",a.accept=".json",a.onchange=n=>{var i;const l=(i=n.target.files)==null?void 0:i[0];if(!l){s(new Error("Dosya seçilmedi"));return}const o=new FileReader;o.onload=d=>{var u;try{const h=JSON.parse((u=d.target)==null?void 0:u.result);Array.isArray(h)?t(h):s(new Error("Geçersiz format"))}catch{s(new Error("Dosya okunamadı"))}},o.readAsText(l)},document.body.appendChild(a),a.click(),document.body.removeChild(a)}),Ur=()=>{const[t,s]=r.useState(()=>Ir()),[a,n]=r.useState("");r.useEffect(()=>{Ar(t)},[t]);const l=d=>{if(d.preventDefault(),!a.trim())return;const u={id:crypto.randomUUID(),text:a,completed:!1,createdAt:Date.now()};s(h=>[u,...h]),n("")},o=d=>{s(u=>{const h=u.findIndex(x=>x.id===d);if(h===-1)return u;const m=[...u];return m[h]={...m[h],completed:!m[h].completed},m})},i=d=>{s(u=>u.filter(h=>h.id!==d))};return e.jsxs("div",{className:"flex flex-col h-full min-w-[200px]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4 text-white/90",children:[e.jsx(ke,{className:"w-5 h-5 text-blue-400"}),e.jsx("span",{className:"font-semibold text-sm tracking-wide",children:"Yapılacaklar"})]}),e.jsxs("form",{onSubmit:l,className:"mb-4 flex gap-2",children:[e.jsx("input",{type:"text",value:a,onChange:d=>n(d.target.value),placeholder:"Yeni görev...",className:"flex-1 bg-white/5 border border-white/10 rounded-xl px-4 py-2 text-sm text-white placeholder-white/20 focus:ring-1 focus:ring-blue-500/50 outline-none transition-all"}),e.jsx("button",{type:"submit",disabled:!a.trim(),className:"bg-blue-600 hover:bg-blue-500 text-white p-2 rounded-xl transition-all disabled:opacity-50 disabled:grayscale",children:e.jsx(q,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto space-y-1 custom-scrollbar pr-1",children:t.length===0?e.jsx("div",{className:"text-center py-10 text-white/10 text-sm italic",children:"Henüz görev eklenmemiş."}):t.map(d=>e.jsxs("div",{className:"group flex items-center gap-3 p-2 rounded-xl hover:bg-white/5 transition-all",children:[e.jsx("button",{onClick:()=>o(d.id),className:`transition-all shrink-0 ${d.completed?"text-green-400":"text-white/20 hover:text-white/40"}`,children:d.completed?e.jsx(Ge,{className:"w-6 h-6"}):e.jsx(ze,{className:"w-6 h-6"})}),e.jsx("span",{className:`flex-1 text-sm text-white/80 transition-all ${d.completed?"line-through opacity-30":""}`,children:d.text}),e.jsx("button",{onClick:()=>i(d.id),className:"opacity-0 group-hover:opacity-100 p-1.5 text-white/10 hover:text-red-400 transition-all shrink-0",children:e.jsx(He,{className:"w-4 h-4"})})]},d.id))})]})},le=async(t=!1,s=!1)=>{var h,m,x;const a=chrome.runtime.getManifest(),n=(h=a.oauth2)==null?void 0:h.client_id,l=((x=(m=a.oauth2)==null?void 0:m.scopes)==null?void 0:x.join(" "))||"openid email profile";let o=chrome.identity.getRedirectURL();o.endsWith("/")||(o+="/");const i=t?s?"consent":"select_account":"none",u={url:`https://accounts.google.com/o/oauth2/v2/auth?client_id=${n}&response_type=token&redirect_uri=${encodeURIComponent(o)}&scope=${encodeURIComponent(l)}&prompt=${i}`,interactive:t};return t||(u.abortOnLoadForNonInteractive=!0,u.timeoutMsForNonInteractive=3e3),new Promise((c,p)=>{chrome.identity.launchWebAuthFlow(u,b=>{if(chrome.runtime.lastError){p(new Error(chrome.runtime.lastError.message));return}if(!b){p(new Error("Kullanıcı girişi iptal edildi veya yönlendirme başarısız."));return}const f=new URL(b).hash.substring(1),g=new URLSearchParams(f),k=g.get("error");if(k){p(t?new Error(`Google Hatası: ${k}`):new Error("User interaction required"));return}const v=g.get("access_token");v?c(v):p(new Error("Bağlantı sağlandı ancak access_token bulunamadı."))})})},Wr=async t=>{var a;const s=await fetch("https://gmail.googleapis.com/gmail/v1/users/me/messages?q=is:unread&maxResults=5",{headers:{Authorization:`Bearer ${t}`}});if(!s.ok){const n=await s.json().catch(()=>({}));throw new Error(((a=n.error)==null?void 0:a.message)||`Gmail API Error: ${s.statusText}`)}return s.json()},Hr=async(t,s)=>{var u;const n=`https://gmail.googleapis.com/gmail/v1/users/me/messages/${s}?format=metadata&metadataHeaders=From&metadataHeaders=Subject&metadataHeaders=Date`,l=await fetch(n,{headers:{Authorization:`Bearer ${t}`}});if(!l.ok)throw new Error(`Gmail API Error: ${l.statusText}`);const o=await l.json(),i=((u=o.payload)==null?void 0:u.headers)??[],d=h=>{var m;return((m=i.find(x=>x.name.toLowerCase()===h.toLowerCase()))==null?void 0:m.value)||""};return{id:o.id,snippet:"",subject:d("subject"),from:d("from"),date:d("date"),internalDate:o.internalDate??"0"}},Gr=async t=>{var n;const s=new Date().toISOString(),a=await fetch(`https://www.googleapis.com/calendar/v3/calendars/primary/events?timeMin=${s}&maxResults=5&orderBy=startTime&singleEvents=true`,{headers:{Authorization:`Bearer ${t}`}});if(!a.ok){const l=await a.json().catch(()=>({}));throw new Error(((n=l.error)==null?void 0:n.message)||`Calendar API Error: ${a.statusText}`)}return a.json()},Zr=()=>{const[t,s]=r.useState([]),[a,n]=r.useState(0),[l,o]=r.useState(!0),i=t[a],d=async()=>{try{const c=await le(!0),f=(await(await fetch("https://www.googleapis.com/oauth2/v2/userinfo",{headers:{Authorization:`Bearer ${c}`}})).json()).email,g=t.findIndex(S=>S.email===f);if(g!==-1){n(g),h(g,c);return}const k={email:f,token:c,messages:[],loading:!0,error:null},v=[...t,k];s(v);const y=v.length-1;n(y),h(y,c);const E=v.map(S=>S.email);localStorage.setItem("gtab_gmail_accounts",JSON.stringify(E))}catch(c){console.error("Failed to add account",c)}},u=c=>{const p=t.filter((f,g)=>g!==c);s(p),a>=p.length&&n(Math.max(0,p.length-1));const b=p.map(f=>f.email);localStorage.setItem("gtab_gmail_accounts",JSON.stringify(b))},h=async(c,p)=>{s(b=>b.map((f,g)=>g===c?{...f,loading:!0,error:null}:f));try{const b=t[c]||{token:p},f=p||b.token||await le(!1),g=await Wr(f);let k=[];g.messages&&g.messages.length>0&&(k=await Promise.all(g.messages.map(v=>Hr(f,v.id)))),s(v=>{const y=v.map((N,C)=>C===c?{...N,token:f,messages:k,loading:!1,error:null}:N);let E=0,S=a;return y.forEach((N,C)=>{if(N.messages.length>0){const O=Math.max(...N.messages.map(j=>parseInt(j.internalDate)));O>E&&(E=O,S=C)}}),S!==a&&n(S),y})}catch{s(f=>f.map((g,k)=>k===c?{...g,loading:!1,error:"Yüklenemedi"}:g))}},m=r.useCallback(async()=>{t.forEach((c,p)=>h(p))},[t.length]);r.useEffect(()=>{(async()=>{const b=localStorage.getItem("gtab_gmail_accounts");if(b)try{const f=JSON.parse(b);if(f.length>0){const g=f.map(k=>({email:k,token:"",messages:[],loading:!0,error:null}));s(g),f.forEach((k,v)=>h(v))}}catch(f){console.error("Failed to parse stored accounts",f)}o(!1)})();const p=setInterval(m,120*1e3);return()=>clearInterval(p)},[]);const x=c=>{const p=c.match(/^(.*?)\s*<.*>$/);return p?p[1]:c};return t.length===0&&!l?e.jsx("div",{className:"w-full h-full animate-slide-up",children:e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl p-6 shadow-2xl flex flex-col items-center justify-center text-center gap-4 h-full",children:[e.jsx(Vt,{className:"w-8 h-8 text-red-400 opacity-50"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-white",children:"Gmail"}),e.jsx("p",{className:"text-xs text-white/40 mt-1",children:"Okunmamış e-postalarınızı görmek için hesap ekleyin."})]}),e.jsxs("button",{onClick:d,className:"w-full max-w-[200px] py-2 bg-red-600 hover:bg-red-500 text-white text-xs font-medium rounded-lg transition-colors flex items-center justify-center gap-2",children:[e.jsx(q,{className:"w-4 h-4"})," Hesap Ekle"]})]})}):e.jsx("div",{className:"w-full h-full animate-slide-up",children:e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl overflow-hidden shadow-2xl flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center gap-1 p-1 bg-white/5 border-b border-white/10 overflow-x-auto no-scrollbar",children:[t.map((c,p)=>e.jsxs("div",{className:"relative group shrink-0",children:[e.jsxs("button",{onClick:()=>n(p),className:`px-3 py-1.5 rounded-lg text-[10px] font-medium transition-all flex items-center gap-2 ${p===a?"bg-red-500/20 text-red-400 border border-red-500/30":"text-white/40 hover:bg-white/5 hover:text-white/60 border border-transparent"}`,title:c.email,children:[e.jsx(mr,{className:"w-3 h-3"}),e.jsx("span",{className:"max-w-[80px] truncate",children:c.email.split("@")[0]}),c.messages.length>0&&e.jsx("span",{className:"bg-red-500 text-white text-[8px] px-1 rounded-full",children:c.messages.length})]}),t.length>1&&e.jsx("button",{onClick:b=>{b.stopPropagation(),u(p)},className:"absolute -top-1 -right-1 bg-black text-white rounded-full p-0.5 opacity-0 group-hover:opacity-100 transition-opacity border border-white/10",children:e.jsx(Ne,{className:"w-2 h-2"})})]},c.email)),e.jsx("button",{onClick:d,className:"p-1.5 rounded-lg text-white/30 hover:bg-white/5 hover:text-white/60 transition-all shrink-0",title:"Hesap Ekle",children:e.jsx(q,{className:"w-3 h-3"})}),e.jsx("div",{className:"flex-1"}),e.jsx("button",{onClick:()=>h(a),className:"p-1.5 text-white/30 hover:text-red-300 transition-colors shrink-0",title:"Yenile",children:e.jsx(G,{className:`w-3 h-3 ${i!=null&&i.loading?"animate-spin":""}`})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1 custom-scrollbar",children:i!=null&&i.error?e.jsxs("div",{className:"text-center py-6 text-red-400/60 text-xs italic flex flex-col items-center gap-2",children:[e.jsx("span",{children:i.error}),e.jsx("button",{onClick:()=>h(a),className:"text-white/40 hover:text-white underline",children:"Yeniden Dene"})]}):i!=null&&i.loading&&(i==null?void 0:i.messages.length)===0?e.jsx("div",{className:"text-center py-6 text-white/20 text-xs italic",children:"Yükleniyor..."}):(i==null?void 0:i.messages.length)===0?e.jsx("div",{className:"text-center py-6 text-white/20 text-xs italic",children:"Okunmamış ileti yok."}):i==null?void 0:i.messages.map(c=>e.jsxs("a",{href:`https://mail.google.com/mail/#inbox/${c.id}`,target:"_blank",rel:"noopener noreferrer",className:"group flex flex-col gap-0.5 p-2 rounded-md hover:bg-white/5 transition-colors cursor-pointer border border-transparent hover:border-white/5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"flex-1 text-xs font-bold text-white/90 truncate",children:x(c.from)}),e.jsx(Se,{className:"w-2.5 h-2.5 text-white/0 group-hover:text-white/20 transition-all"})]}),e.jsx("span",{className:"text-[10px] text-white/70 truncate",children:c.subject||"(Konu yok)"}),!1]},c.id))})]})})},Kr=()=>{const[t,s]=r.useState([]),[a,n]=r.useState(!0),[l,o]=r.useState(null),[i,d]=r.useState(!1),u=async(x=!1)=>{n(!0),o(null);try{const c=await le(x);d(!0);const p=await Gr(c);s(p.items||[])}catch(c){c.message!=="No token"&&!c.message.includes("User interaction required")&&(o("Etkinlikler yüklenemedi."),console.error(c)),d(!1)}finally{n(!1)}};r.useEffect(()=>{u(!1)},[]);const h=(x,c)=>x?new Date(x).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):c?"Tüm gün":"",m=(x,c)=>{const p=new Date().toDateString();return x?new Date(x).toDateString()===p:c?new Date(c).toDateString()===p:!1};return!i&&!a?e.jsx("div",{className:"w-full h-full animate-slide-up",children:e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl p-6 shadow-2xl flex flex-col items-center justify-center text-center gap-4 h-full",children:[e.jsx(Re,{className:"w-8 h-8 text-blue-400 opacity-50"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-white",children:"Google Takvim"}),e.jsx("p",{className:"text-xs text-white/40 mt-1",children:"Etkinliklerinizi görmek için giriş yapın."})]}),e.jsx("button",{onClick:()=>u(!0),className:"w-full max-w-[200px] py-2 bg-blue-600 hover:bg-blue-500 text-white text-xs font-medium rounded-lg transition-colors",children:"Google ile Bağlan"})]})}):e.jsx("div",{className:"w-full h-full animate-slide-up",children:e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl overflow-hidden shadow-2xl flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-white/10 bg-white/5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(Re,{className:"w-4 h-4 text-blue-400"}),e.jsx("span",{className:"font-medium text-sm",children:"Takvim"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>u(!1),className:"text-white/30 hover:text-blue-300 transition-colors",title:"Yenile",children:e.jsx(G,{className:`w-3 h-3 ${a?"animate-spin":""}`})}),e.jsx("a",{href:"https://calendar.google.com",target:"_blank",rel:"noopener noreferrer",className:"text-white/30 hover:text-blue-300 transition-colors",title:"Google Takvim'i Aç",children:e.jsx(Se,{className:"w-3 h-3"})})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1 custom-scrollbar",children:l?e.jsx("div",{className:"text-center py-6 text-red-400/60 text-xs italic",children:l}):a&&t.length===0?e.jsx("div",{className:"text-center py-6 text-white/20 text-xs italic",children:"Yükleniyor..."}):t.length===0?e.jsx("div",{className:"text-center py-6 text-white/20 text-xs italic",children:"Yaklaşan etkinlik yok."}):t.map(x=>e.jsxs("div",{className:"group flex flex-col gap-0.5 p-2 rounded-md hover:bg-white/5 transition-colors",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"flex-1 text-xs font-medium text-white/90 truncate",children:x.summary}),e.jsx("span",{className:`text-[10px] shrink-0 ${m(x.start.dateTime,x.start.date)?"text-blue-400 font-bold":"text-white/40"}`,children:h(x.start.dateTime,x.start.date)})]}),x.location&&e.jsx("span",{className:"text-[10px] text-white/30 truncate",children:x.location})]},x.id))})]})})},Yr=async(t,s)=>{const a=t.toUpperCase().replace("/",""),n=s||"4QO8AQO0Y6B6NIPI";try{const l=await fetch(`https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=${a}&apikey=${n}`);if(!l.ok)throw new Error(`Alpha Vantage API Error for ${a}`);const i=(await l.json())["Global Quote"];return!i||Object.keys(i).length===0?(console.warn(`Alpha Vantage failed for ${a}, trying Yahoo fallback...`),Te(a)):{c:parseFloat(i["05. price"]),d:parseFloat(i["09. change"]),dp:parseFloat(i["10. change percent"].replace("%","")),h:parseFloat(i["03. high"]),l:parseFloat(i["04. low"]),o:parseFloat(i["02. open"]),pc:parseFloat(i["08. previous close"]),t:Math.floor(Date.now()/1e3)}}catch(l){return console.error("Stock Fetch Error:",l),Te(a)}},Te=async t=>{var d,u;const n=(u=(d=(await(await fetch(`https://query1.finance.yahoo.com/v8/finance/chart/${t}?range=2d&interval=1d`)).json()).chart)==null?void 0:d.result)==null?void 0:u[0];if(!n||!n.meta)throw new Error(`Sembol bulunamadı: ${t}`);const l=n.meta,o=l.regularMarketPrice,i=l.previousClose||o;return{c:o,d:o-i,dp:(o-i)/i*100,h:l.regularMarketDayHigh||o,l:l.regularMarketDayLow||o,o,pc:i,t:Math.floor(Date.now()/1e3)}},Vr=()=>{const[t,s]=r.useState({}),[a,n]=r.useState(!0),[l,o]=r.useState(null),{apiKey:i,symbols:d}=st(),u=async()=>{n(!0),o(null);try{const h={};await Promise.all(d.map(async m=>{try{const x=await Yr(m,i);h[m]=x}catch(x){console.error(`Failed to fetch ${m}`,x)}})),s(h)}catch(h){o("Hisse bilgileri yüklenemedi."),console.error(h)}finally{n(!1)}};return r.useEffect(()=>{u();const h=setInterval(u,1800*1e3);return()=>clearInterval(h)},[d.join(","),i]),e.jsx("div",{className:"w-full h-full animate-slide-up",children:e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl overflow-hidden shadow-2xl flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-white/10 bg-white/5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(Ft,{className:"w-4 h-4 text-green-400"}),e.jsx("span",{className:"font-medium text-sm",children:"Borsa"})]}),e.jsx("button",{onClick:u,className:"text-white/30 hover:text-green-300 transition-colors",title:"Yenile",children:e.jsx(G,{className:`w-3 h-3 ${a?"animate-spin":""}`})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1 custom-scrollbar",children:l?e.jsx("div",{className:"text-center py-6 text-red-400/60 text-xs italic",children:l}):a&&Object.keys(t).length===0?e.jsx("div",{className:"text-center py-6 text-white/20 text-xs italic",children:"Yükleniyor..."}):d.length===0?e.jsx("div",{className:"text-center py-6 text-white/20 text-xs italic",children:"Takip edilen hisse yok."}):d.map(h=>{const m=t[h];if(!m)return null;const x=m.d>=0;return e.jsxs("div",{className:"group flex items-center justify-between p-2 rounded-md hover:bg-white/5 transition-colors",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-xs font-bold text-white/90",children:h}),e.jsx("span",{className:"text-[10px] text-white/40",children:"Yahoo Finance"})]}),e.jsxs("div",{className:"flex flex-col items-end",children:[e.jsxs("span",{className:"text-xs font-medium text-white",children:["$",m.c.toFixed(2)]}),e.jsxs("div",{className:`flex items-center gap-0.5 text-[10px] ${x?"text-green-400":"text-red-400"}`,children:[x?e.jsx(Lt,{className:"w-2.5 h-2.5"}):e.jsx(St,{className:"w-2.5 h-2.5"}),e.jsxs("span",{children:[x?"+":"",m.d.toFixed(2)," (",m.dp.toFixed(2),"%)"]})]})]})]},h)})})]})})},Jr=async t=>{var n;const s=await fetch("https://tasks.googleapis.com/tasks/v1/users/@me/lists?maxResults=20",{headers:{Authorization:`Bearer ${t}`}});if(!s.ok){const l=await s.json().catch(()=>({})),o=((n=l==null?void 0:l.error)==null?void 0:n.message)||"";throw s.status===401||s.status===403?o.toLowerCase().includes("disabled")||o.toLowerCase().includes("not been used")?new Error("API_NOT_ENABLED"):new Error("REAUTH_REQUIRED"):new Error(`Tasks API: ${s.statusText}`)}return(await s.json()).items||[]},ge=async(t,s)=>{const a=await fetch(`https://tasks.googleapis.com/tasks/v1/lists/${s}/tasks?showCompleted=false&showHidden=false&maxResults=50`,{headers:{Authorization:`Bearer ${t}`}});if(!a.ok)throw new Error(`Tasks API: ${a.statusText}`);return((await a.json()).items||[]).filter(l=>l.title)},qr=async(t,s,a)=>{await fetch(`https://tasks.googleapis.com/tasks/v1/lists/${s}/tasks/${a}`,{method:"PATCH",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({status:"completed"})})},Xr=async(t,s,a)=>{await fetch(`https://tasks.googleapis.com/tasks/v1/lists/${s}/tasks`,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({title:a})})},Qr=()=>{const[t,s]=r.useState(null),[a,n]=r.useState([]),[l,o]=r.useState(null),[i,d]=r.useState([]),[u,h]=r.useState(!0),[m,x]=r.useState(null),[c,p]=r.useState(""),[b,f]=r.useState(!1),[g,k]=r.useState(!1),[v,y]=r.useState(new Set),E=a.find(j=>j.id===l),S=r.useCallback(async(j=!1,B=!1)=>{var P;h(!0),x(null);try{const _=await le(j,B);s(_);const w=await Jr(_);n(w);const M=l||((P=w[0])==null?void 0:P.id);if(M){o(M);const A=await ge(_,M);d(A)}}catch(_){_.message==="REAUTH_REQUIRED"||_.message==="API_NOT_ENABLED"?(s(null),x(_.message)):x(_.message||"Yüklenemedi")}finally{h(!1)}},[l]),N=async j=>{if(k(!1),o(j),!!t){h(!0);try{const B=await ge(t,j);d(B)}catch(B){x(B.message||"Yüklenemedi")}finally{h(!1)}}},C=async j=>{if(!(!t||!l)){y(B=>new Set(B).add(j));try{await qr(t,l,j),setTimeout(()=>{d(B=>B.filter(P=>P.id!==j)),y(B=>{const P=new Set(B);return P.delete(j),P})},400)}catch{y(B=>{const P=new Set(B);return P.delete(j),P})}}},O=async()=>{if(!(!t||!l||!c.trim())){f(!0);try{await Xr(t,l,c.trim()),p("");const j=await ge(t,l);d(j)}catch(j){x(j.message||"Eklenemedi")}finally{f(!1)}}};if(r.useEffect(()=>{S(!1)},[]),u&&i.length===0)return e.jsx("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex items-center justify-center",children:e.jsx("div",{className:"text-white/30 text-xs",children:"Yükleniyor..."})});if(m&&!t){const j=m==="API_NOT_ENABLED";return e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col items-center justify-center gap-3 p-4",children:[e.jsx(ke,{className:"w-8 h-8 text-blue-400 opacity-50"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm font-medium text-white",children:"Google Tasks"}),e.jsx("p",{className:"text-xs text-white/40 mt-1",children:j?"Tasks API disabled. Google Cloud Console → APIs & Services → Enable Tasks API.":"Görevlerinizi görmek için giriş yapın."})]}),!j&&e.jsx("button",{onClick:()=>S(!0,m==="REAUTH_REQUIRED"),className:"px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white text-xs font-medium rounded-lg transition-colors",children:"Google ile Giriş Yap"})]})}return e.jsxs("div",{className:"w-full h-full flex flex-col bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-white/10 bg-white/5 shrink-0",children:[e.jsx(ke,{className:"w-3.5 h-3.5 text-blue-400 shrink-0"}),e.jsxs("button",{onClick:()=>k(j=>!j),className:"flex-1 flex items-center gap-1 text-left text-xs font-medium text-white/80 hover:text-white transition-colors",children:[e.jsx("span",{className:"truncate",children:(E==null?void 0:E.title)||"Görevler"}),e.jsx(Wt,{className:`w-3 h-3 shrink-0 transition-transform ${g?"rotate-180":""}`})]}),e.jsx("button",{onClick:()=>S(!1),className:"p-1 text-white/30 hover:text-blue-300 transition-colors",title:"Yenile",children:e.jsx(G,{className:`w-3.5 h-3.5 ${u?"animate-spin":""}`})})]}),g&&e.jsx("div",{className:"absolute z-10 mt-9 left-0 right-0 bg-black/90 border border-white/10 rounded-b-xl overflow-hidden shadow-xl",children:a.map(j=>e.jsx("button",{onClick:()=>N(j.id),className:`w-full text-left px-3 py-2 text-xs transition-colors ${j.id===l?"text-blue-400 bg-blue-500/10":"text-white/60 hover:bg-white/5 hover:text-white/90"}`,children:j.title},j.id))}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-0.5 custom-scrollbar",onClick:()=>k(!1),children:[m&&e.jsx("div",{className:"text-center py-4 text-red-400/60 text-xs",children:m}),!u&&i.length===0&&!m&&e.jsx("div",{className:"text-center py-8 text-white/20 text-xs italic",children:"Tamamlanmış görev yok."}),i.map(j=>e.jsxs("div",{className:`flex items-start gap-2 px-2 py-1.5 rounded-lg hover:bg-white/5 group transition-all ${v.has(j.id)?"opacity-40 scale-95":"opacity-100"}`,children:[e.jsx("button",{onClick:()=>C(j.id),className:"mt-0.5 shrink-0 text-white/20 hover:text-blue-400 transition-colors",children:v.has(j.id)?e.jsx(Ge,{className:"w-4 h-4 text-blue-400"}):e.jsx(ze,{className:"w-4 h-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-white/80 leading-tight",children:j.title}),j.notes&&e.jsx("p",{className:"text-[10px] text-white/30 mt-0.5 line-clamp-1",children:j.notes}),j.due&&e.jsx("p",{className:"text-[10px] text-blue-400/60 mt-0.5",children:new Date(j.due).toLocaleDateString("tr-TR",{day:"numeric",month:"short"})})]})]},j.id))]}),e.jsx("div",{className:"p-2 border-t border-white/10 shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2 bg-white/5 rounded-lg px-2 py-1.5 border border-white/5 focus-within:border-blue-500/40 transition-colors",children:[e.jsx(q,{className:"w-3.5 h-3.5 text-white/20 shrink-0"}),e.jsx("input",{type:"text",value:c,onChange:j=>p(j.target.value),onKeyDown:j=>j.key==="Enter"&&O(),placeholder:"Görev ekle...",className:"flex-1 bg-transparent text-xs text-white/80 placeholder-white/20 outline-none"}),b&&e.jsx(G,{className:"w-3 h-3 text-white/20 animate-spin shrink-0"})]})})]})},at="gtab_quick_notes",es=()=>{try{const t=localStorage.getItem(at);return t?JSON.parse(t):[]}catch{return[]}},ts=t=>{localStorage.setItem(at,JSON.stringify(t))},rs=()=>{const[t,s]=r.useState(es),[a,n]=r.useState(""),[l,o]=r.useState(!1),i=r.useRef(null);r.useEffect(()=>{ts(t)},[t]),r.useEffect(()=>{l&&i.current&&i.current.focus()},[l]);const d=()=>{const m=a.trim();if(!m){o(!1);return}const x={id:crypto.randomUUID(),text:m,createdAt:Date.now()};s(c=>[x,...c]),n(""),o(!1)},u=m=>{s(x=>x.filter(c=>c.id!==m))},h=m=>{const x=new Date(m),c=new Date,p=c.getTime()-m;return p<6e4?"Az önce":p<36e5?`${Math.floor(p/6e4)}d önce`:x.toDateString()===c.toDateString()?x.toLocaleTimeString("tr-TR",{hour:"2-digit",minute:"2-digit"}):x.toLocaleDateString("tr-TR",{day:"numeric",month:"short"})};return e.jsxs("div",{className:"w-full h-full flex flex-col bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-white/10 bg-white/5 shrink-0",children:[e.jsx(Oe,{className:"w-3.5 h-3.5 text-yellow-400 shrink-0"}),e.jsx("span",{className:"flex-1 text-xs font-medium text-white/80",children:"Notlar"}),e.jsx("button",{onClick:()=>o(!0),className:"p-1 text-white/30 hover:text-yellow-300 transition-colors",title:"Not ekle",children:e.jsx(q,{className:"w-3.5 h-3.5"})})]}),l&&e.jsx("div",{className:"p-2 border-b border-white/10 shrink-0",children:e.jsx("textarea",{ref:i,value:a,onChange:m=>n(m.target.value),onKeyDown:m=>{m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),d()),m.key==="Escape"&&(o(!1),n(""))},onBlur:d,placeholder:"Not yaz... (Enter ile kaydet)",rows:3,className:"w-full bg-white/5 border border-yellow-400/20 rounded-lg px-2 py-1.5 text-xs text-white/80 placeholder-white/20 outline-none focus:border-yellow-400/40 resize-none transition-colors"})}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-1.5 custom-scrollbar",children:[t.length===0&&!l&&e.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3 text-center",children:[e.jsx(Oe,{className:"w-8 h-8 text-yellow-400/20"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-white/40",children:"Henüz not yok"}),e.jsx("p",{className:"text-[10px] text-white/20 mt-0.5",children:"+ butonuna bas veya tıkla"})]})]}),t.map(m=>e.jsxs("div",{className:"group relative bg-white/5 hover:bg-white/8 border border-white/5 hover:border-yellow-400/20 rounded-lg px-2.5 py-2 transition-all",children:[e.jsx("p",{className:"text-xs text-white/80 whitespace-pre-wrap leading-relaxed pr-4",children:m.text}),e.jsx("p",{className:"text-[10px] text-white/25 mt-1",children:h(m.createdAt)}),e.jsx("button",{onClick:()=>u(m.id),className:"absolute top-1.5 right-1.5 p-0.5 text-white/0 group-hover:text-white/30 hover:!text-red-400 transition-colors",children:e.jsx(He,{className:"w-3 h-3"})})]},m.id))]})]})},ss={0:"☀️",1:"🌤️",2:"⛅",3:"☁️",45:"🌫️",48:"🌫️",51:"🌦️",53:"🌦️",55:"🌦️",61:"🌧️",63:"🌧️",65:"🌧️",71:"🌨️",73:"🌨️",75:"🌨️",77:"🌨️",80:"🌦️",81:"🌦️",82:"🌦️",85:"🌨️",86:"🌨️",95:"⛈️",96:"⛈️",99:"⛈️"},as={0:"Açık",1:"Açık",2:"Parçalı bulutlu",3:"Bulutlu",45:"Sisli",48:"Sisli",51:"Hafif çisenti",53:"Çisenti",55:"Yoğun çisenti",61:"Hafif yağmur",63:"Yağmur",65:"Yoğun yağmur",71:"Hafif kar",73:"Kar",75:"Yoğun kar",77:"Kar taneleri",80:"Sağanak",81:"Sağanak",82:"Yoğun sağanak",85:"Kar sağanağı",86:"Kar sağanağı",95:"Fırtına",96:"Fırtına",99:"Fırtına"},ns=t=>ss[t]??"🌡️",os=t=>as[t]??"Bilinmiyor",we="gtab_weather_v2",Pe=1800*1e3,ls=()=>{const[t,s]=r.useState(null),[a,n]=r.useState(!0),[l,o]=r.useState(null),i=r.useCallback(async(d=!1)=>{var u,h,m,x;if(!d){const c=localStorage.getItem(we);if(c){const p=JSON.parse(c);if(Date.now()-p.cachedAt{navigator.geolocation.getCurrentPosition(N,C,{timeout:1e4})}),{latitude:p,longitude:b}=c.coords,[f,g]=await Promise.all([fetch(`https://api.open-meteo.com/v1/forecast?latitude=${p}&longitude=${b}¤t=temperature_2m,apparent_temperature,relative_humidity_2m,wind_speed_10m,weather_code&timezone=auto`),fetch(`https://nominatim.openstreetmap.org/reverse?lat=${p}&lon=${b}&format=json`,{headers:{"User-Agent":"GTab-Extension/4.2"}})]),k=await f.json(),v=await g.json(),y=((u=v.address)==null?void 0:u.city)||((h=v.address)==null?void 0:h.town)||((m=v.address)==null?void 0:m.village)||((x=v.address)==null?void 0:x.county)||"Konum",E=k.current,S={temp:Math.round(E.temperature_2m),feelsLike:Math.round(E.apparent_temperature),humidity:E.relative_humidity_2m,windSpeed:Math.round(E.wind_speed_10m),code:E.weather_code,city:y,cachedAt:Date.now()};s(S),localStorage.setItem(we,JSON.stringify(S))}catch(c){c.code===1?o("Konum izni reddedildi."):o("Hava durumu yüklenemedi.");const p=localStorage.getItem(we);p&&(s(JSON.parse(p)),o(null))}finally{n(!1)}},[]);return r.useEffect(()=>{i();const d=setInterval(()=>i(),Pe);return()=>clearInterval(d)},[i]),a&&!t?e.jsx("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex items-center justify-center",children:e.jsx("div",{className:"text-white/30 text-xs",children:"Konum alınıyor..."})}):l&&!t?e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col items-center justify-center gap-3 p-4 text-center",children:[e.jsx(_e,{className:"w-8 h-8 text-white/20"}),e.jsx("p",{className:"text-xs text-white/50",children:l}),e.jsx("button",{onClick:()=>i(!0),className:"px-3 py-1.5 bg-white/10 hover:bg-white/20 text-white text-xs rounded-lg transition-colors",children:"Tekrar Dene"})]}):e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-4 gap-1",children:[e.jsx("span",{className:"text-6xl leading-none",children:ns(t.code)}),e.jsxs("div",{className:"flex items-end gap-1 mt-2",children:[e.jsx("span",{className:"text-5xl font-thin text-white",children:t.temp}),e.jsx("span",{className:"text-xl text-white/50 mb-1",children:"°C"})]}),e.jsx("p",{className:"text-sm text-white/70 mt-0.5",children:os(t.code)}),e.jsxs("div",{className:"flex items-center gap-1 text-white/40 text-xs mt-1",children:[e.jsx(_e,{className:"w-3 h-3"}),e.jsx("span",{children:t.city})]})]}),e.jsxs("div",{className:"grid grid-cols-3 divide-x divide-white/5 border-t border-white/10",children:[e.jsxs("div",{className:"flex flex-col items-center py-2.5 gap-0.5",children:[e.jsx("span",{className:"text-[10px] text-white/30 uppercase tracking-wide",children:"Hissedilen"}),e.jsxs("span",{className:"text-sm font-medium text-white/70",children:[t.feelsLike,"°"]})]}),e.jsxs("div",{className:"flex flex-col items-center py-2.5 gap-0.5",children:[e.jsx("span",{className:"text-[10px] text-white/30 uppercase tracking-wide",children:"Nem"}),e.jsxs("span",{className:"text-sm font-medium text-white/70",children:[t.humidity,"%"]})]}),e.jsxs("div",{className:"flex flex-col items-center py-2.5 gap-0.5",children:[e.jsx("span",{className:"text-[10px] text-white/30 uppercase tracking-wide",children:"Rüzgar"}),e.jsxs("span",{className:"text-sm font-medium text-white/70",children:[t.windSpeed," km/h"]})]})]}),e.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-t border-white/5",children:[e.jsx("span",{className:"text-[10px] text-white/20",children:t!=null&&t.cachedAt?new Date(t.cachedAt).toLocaleTimeString("tr-TR",{hour:"2-digit",minute:"2-digit"}):""}),e.jsx("button",{onClick:()=>i(!0),disabled:a,className:"p-1 text-white/20 hover:text-white/50 transition-colors",children:e.jsx(G,{className:`w-3 h-3 ${a?"animate-spin":""}`})})]})]})},Y={work:1500,"short-break":300,"long-break":900},Me={work:"Odak","short-break":"Kısa Mola","long-break":"Uzun Mola"},Fe={work:"text-red-400","short-break":"text-green-400","long-break":"text-blue-400"},is={work:"stroke-red-400","short-break":"stroke-green-400","long-break":"stroke-blue-400"},cs={work:"bg-red-500","short-break":"bg-green-500","long-break":"bg-blue-500"},De=2*Math.PI*54,ds=()=>{const[t,s]=r.useState("work"),[a,n]=r.useState(Y.work),[l,o]=r.useState(!1),[i,d]=r.useState(0),u=r.useRef(null),h=(Y[t]-a)/Y[t],m=De*(1-h),x=f=>`${Math.floor(f/60).toString().padStart(2,"0")}:${(f%60).toString().padStart(2,"0")}`,c=f=>{o(!1),s(f),n(Y[f])},p=r.useCallback(f=>{o(!1),d(g=>{const k=t==="work"&&f?g+1:g;if(t==="work"){const v=k>0&&k%4===0?"long-break":"short-break";s(v),n(Y[v])}else s("work"),n(Y.work);return k})},[t]);r.useEffect(()=>{if(u.current&&clearInterval(u.current),!!l)return u.current=window.setInterval(()=>{n(f=>f<=1?(clearInterval(u.current),"Notification"in window&&Notification.permission==="granted"&&new Notification(t==="work"?"⏰ Odak tamamlandı! Mola zamanı.":"✅ Mola bitti! Odağa dön."),p(!0),0):f-1)},1e3),()=>{u.current&&clearInterval(u.current)}},[l,t,p]);const b=()=>{o(!1),n(Y[t])};return e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col overflow-hidden",children:[e.jsx("div",{className:"flex border-b border-white/10 shrink-0",children:["work","short-break","long-break"].map(f=>e.jsx("button",{onClick:()=>c(f),className:`flex-1 py-2 text-[10px] font-medium transition-colors ${t===f?`${Fe[f]} border-b-2 border-current -mb-px`:"text-white/30 hover:text-white/60"}`,children:Me[f]},f))}),e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-5 p-4",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 128 128",className:"-rotate-90",children:[e.jsx("circle",{cx:"64",cy:"64",r:"54",fill:"none",stroke:"rgba(255,255,255,0.07)",strokeWidth:"8"}),e.jsx("circle",{cx:"64",cy:"64",r:"54",fill:"none",className:`${is[t]} transition-all duration-700`,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:De,strokeDashoffset:m})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[e.jsx("span",{className:"text-3xl font-mono font-light text-white tracking-wide",children:x(a)}),e.jsx("span",{className:`text-[10px] font-semibold uppercase tracking-widest mt-1 ${Fe[t]}`,children:Me[t]})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:b,className:"p-2 text-white/30 hover:text-white/60 transition-colors",children:e.jsx(yr,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>o(f=>!f),className:`p-3 rounded-full transition-all ${cs[t]} hover:opacity-90 shadow-lg`,children:l?e.jsx(Ke,{className:"w-6 h-6 text-white"}):e.jsx(Ye,{className:"w-6 h-6 text-white"})}),e.jsx("button",{onClick:()=>p(!1),className:"p-2 text-white/30 hover:text-white/60 transition-colors",children:e.jsx(Ze,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"border-t border-white/10 py-3 flex items-center justify-center gap-3 shrink-0",children:[e.jsx("span",{className:"text-[10px] text-white/25",children:"Tamamlanan"}),e.jsx("div",{className:"flex gap-1.5",children:Array.from({length:4}).map((f,g)=>e.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${g{const t=localStorage.getItem(nt),s=localStorage.getItem(ot);return!t||!s||Date.now()>=parseInt(s)-6e4?null:t},hs=async t=>{const s=chrome.identity.getRedirectURL(),n=`https://accounts.spotify.com/authorize?client_id=${t}&response_type=token&redirect_uri=${encodeURIComponent(s)}&scope=${encodeURIComponent("user-read-currently-playing user-read-playback-state user-modify-playback-state")}&show_dialog=true`;return new Promise((l,o)=>{chrome.identity.launchWebAuthFlow({url:n,interactive:!0},i=>{var x;if(chrome.runtime.lastError||!i){o(new Error(((x=chrome.runtime.lastError)==null?void 0:x.message)||"Auth cancelled"));return}const d=new URL(i).hash.substring(1),u=new URLSearchParams(d),h=u.get("access_token"),m=parseInt(u.get("expires_in")||"3600");h?(localStorage.setItem(nt,h),localStorage.setItem(ot,String(Date.now()+m*1e3)),l(h)):o(new Error("No access_token in response"))})})},ms=()=>{var S;const[t,s]=r.useState(localStorage.getItem(be)||""),[a,n]=r.useState(""),[l,o]=r.useState(!localStorage.getItem(be)),[i,d]=r.useState(us()),[u,h]=r.useState(null),[m,x]=r.useState(!1),[c,p]=r.useState(null),b=r.useRef(null),f=r.useCallback(async N=>{var j;const C=await fetch("https://api.spotify.com/v1/me/player/currently-playing",{headers:{Authorization:`Bearer ${N}`}});if(C.status===401)throw new Error("TOKEN_EXPIRED");if(C.status===204||!C.ok){h(null);return}const O=await C.json();if(!(O!=null&&O.item)){h(null);return}h({name:O.item.name,artist:O.item.artists.map(B=>B.name).join(", "),albumArt:((j=O.item.album.images[0])==null?void 0:j.url)||"",isPlaying:O.is_playing,progress:O.progress_ms??0,duration:O.item.duration_ms})},[]);r.useEffect(()=>{if(i)return f(i).catch(N=>{N.message==="TOKEN_EXPIRED"&&d(null)}),b.current=window.setInterval(()=>{f(i).catch(()=>{})},5e3),()=>{b.current&&clearInterval(b.current)}},[i,f]);const g=async()=>{if(t){x(!0),p(null);try{const N=await hs(t);d(N)}catch(N){p(N.message||"Auth failed")}finally{x(!1)}}},k=async N=>{if(!i)return;const C=N==="next"||N==="previous";await fetch(`https://api.spotify.com/v1/me/player/${N}`,{method:C?"POST":"PUT",headers:{Authorization:`Bearer ${i}`}}),setTimeout(()=>f(i).catch(()=>{}),600)},v=()=>{const N=a.trim();N&&(localStorage.setItem(be,N),s(N),o(!1))},y=N=>{const C=Math.floor(N/1e3);return`${Math.floor(C/60)}:${(C%60).toString().padStart(2,"0")}`};if(l){const N=typeof chrome<"u"&&((S=chrome.identity)!=null&&S.getRedirectURL)?chrome.identity.getRedirectURL():"(extension yüklenince görünür)";return e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col items-center justify-center gap-3 p-5",children:[e.jsx(ae,{className:"w-8 h-8 text-green-400 opacity-60"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm font-semibold text-white",children:"Spotify Kurulumu"}),e.jsxs("p",{className:"text-[10px] text-white/40 mt-1 leading-relaxed",children:["1. developer.spotify.com → App oluştur",e.jsx("br",{}),"2. Redirect URI olarak şunu ekle:",e.jsx("br",{}),e.jsx("span",{className:"text-white/60 break-all",children:N})]})]}),e.jsx("input",{type:"text",value:a,onChange:C=>n(C.target.value),onKeyDown:C=>C.key==="Enter"&&v(),placeholder:"Spotify Client ID...",className:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-xs text-white/80 placeholder-white/20 outline-none focus:border-green-400/40 transition-colors"}),e.jsx("button",{onClick:v,disabled:!a.trim(),className:"w-full py-2 bg-green-600 hover:bg-green-500 disabled:opacity-40 text-white text-xs font-medium rounded-lg transition-colors",children:"Kaydet"})]})}if(!i)return e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col items-center justify-center gap-3 p-4",children:[e.jsx(ae,{className:"w-8 h-8 text-green-400 opacity-60"}),e.jsx("p",{className:"text-sm font-semibold text-white",children:"Spotify"}),c&&e.jsx("p",{className:"text-xs text-red-400 text-center",children:c}),e.jsxs("button",{onClick:g,disabled:m,className:"px-5 py-2 bg-green-600 hover:bg-green-500 disabled:opacity-40 text-white text-xs font-medium rounded-lg transition-colors flex items-center gap-2",children:[m&&e.jsx(G,{className:"w-3 h-3 animate-spin"}),"Spotify ile Bağlan"]}),e.jsx("button",{onClick:()=>o(!0),className:"text-[10px] text-white/20 hover:text-white/50 transition-colors",children:"Client ID değiştir"})]});if(!u)return e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col items-center justify-center gap-2 p-4",children:[e.jsx(ae,{className:"w-8 h-8 text-white/10"}),e.jsx("p",{className:"text-xs text-white/30",children:"Spotify'da bir şey çalmıyor."}),e.jsx("button",{onClick:()=>o(!0),className:"text-[10px] text-white/20 hover:text-white/40 mt-2",children:"Ayarlar"})]});const E=u.duration>0?u.progress/u.duration*100:0;return e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-4 gap-3",children:[u.albumArt?e.jsx("img",{src:u.albumArt,alt:"album",className:"w-28 h-28 rounded-xl shadow-2xl object-cover"}):e.jsx("div",{className:"w-28 h-28 rounded-xl bg-white/5 flex items-center justify-center",children:e.jsx(ae,{className:"w-10 h-10 text-white/20"})}),e.jsxs("div",{className:"text-center max-w-full px-2",children:[e.jsx("p",{className:"text-sm font-semibold text-white truncate",children:u.name}),e.jsx("p",{className:"text-xs text-white/50 truncate mt-0.5",children:u.artist})]})]}),e.jsxs("div",{className:"px-4 pb-2",children:[e.jsx("div",{className:"w-full h-1 bg-white/10 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-green-400 transition-all duration-1000",style:{width:`${E}%`}})}),e.jsxs("div",{className:"flex justify-between mt-1",children:[e.jsx("span",{className:"text-[10px] text-white/30",children:y(u.progress)}),e.jsx("span",{className:"text-[10px] text-white/30",children:y(u.duration)})]})]}),e.jsxs("div",{className:"flex items-center justify-center gap-5 pb-4",children:[e.jsx("button",{onClick:()=>k("previous"),className:"p-2 text-white/40 hover:text-white transition-colors",children:e.jsx(kr,{className:"w-5 h-5"})}),e.jsx("button",{onClick:()=>k(u.isPlaying?"pause":"play"),className:"p-2.5 bg-green-500 hover:bg-green-400 rounded-full transition-colors shadow-lg",children:u.isPlaying?e.jsx(Ke,{className:"w-5 h-5 text-white"}):e.jsx(Ye,{className:"w-5 h-5 text-white"})}),e.jsx("button",{onClick:()=>k("next"),className:"p-2 text-white/40 hover:text-white transition-colors",children:e.jsx(Ze,{className:"w-5 h-5"})})]})]})},lt=r.createContext(void 0),ie=()=>{const t=r.useContext(lt);if(!t)throw new Error("useGTab must be used within a GTabProvider");return t},xs=({children:t})=>{const[s,a]=r.useState(()=>Rr()),[n,l]=r.useState(()=>Or()),[o,i]=r.useState(()=>Be()),[d,u]=r.useState(()=>Mr()),[h,m]=r.useState(()=>Dr()),[x,c]=r.useState(()=>st()),[p]=r.useState(()=>Tr()),[b,f]=r.useState(p.category),[g,k]=r.useState(p.profile),[v,y]=r.useState(null),[E,S]=r.useState(!1),[N,C]=r.useState(!1),[O,j]=r.useState(!1),[B,P]=r.useState(!1),[_,w]=r.useState(null),[M,A]=r.useState(""),[z,Z]=r.useState(()=>{const L=Be();return L.type==="image"?L.value:L.type==="random"?L.value||Q[Math.floor(Math.random()*Q.length)]:""}),[te,H]=r.useState(!0),V=U.useRef(!0);r.useEffect(()=>{$r(s)},[s]),r.useEffect(()=>{_r(n)},[n]),r.useEffect(()=>{Br(o)},[o]),r.useEffect(()=>{Fr(d)},[d]),r.useEffect(()=>{zr(h)},[h]),r.useEffect(()=>{Pr({category:b,profile:g})},[b,g]),r.useEffect(()=>{if(V.current){V.current=!1;return}if(o.type==="color"||o.type==="theme"){Z(""),H(!0);return}let L=o.value;if(o.type==="random"&&(z&&Q.includes(z)&&!o.value?L=z:L||(L=Q[Math.floor(Math.random()*Q.length)])),!L)return;if(L===z){H(!0);return}H(!1);const R=new Image;R.src=L,R.onload=()=>{Z(L),H(!0)},R.onerror=()=>H(!0)},[o]),r.useEffect(()=>{const L=R=>{if(R.key==="gtab_shortcuts"&&R.newValue)try{a(JSON.parse(R.newValue))}catch{}};return window.addEventListener("storage",L),()=>window.removeEventListener("storage",L)},[]);const W=r.useCallback((L,R)=>{const T=L.map(I=>({...I,id:crypto.randomUUID()})),$=R??v;a($?I=>I.map(F=>F.id===$&&F.isFolder?{...F,children:[...F.children||[],...T]}:F):I=>[...I,...T])},[v]),ce=r.useCallback(L=>{a(R=>R.find($=>$.id===L)?R.filter($=>$.id!==L):R.map($=>$.isFolder&&$.children?{...$,children:$.children.filter(I=>I.id!==L)}:$))},[]),de=r.useCallback(L=>{a(R=>{const T=R.findIndex(I=>I.id===L.id);if(T!==-1){const I=[...R];return I[T]=L,I}const $=R.findIndex(I=>I.isFolder&&I.children&&I.children.some(F=>F.id===L.id));if($!==-1){const I=[...R],F=I[$];if(F.children){const re=F.children.findIndex(K=>K.id===L.id);if(re!==-1){const K=[...F.children];return K[re]=L,I[$]={...F,children:K},I}}}return R})},[]),ue=r.useCallback(L=>{l(R=>{const T=R.findIndex(I=>I.id===L);if(T===-1)return R;const $=[...R];return $[T]={...$[T],visible:!$[T].visible},$})},[]),he=r.useCallback((L,R)=>{l(T=>{const $=T.findIndex(F=>F.id===L);if($===-1)return T;const I=[...T];return I[$]={...I[$],...R},I})},[]),me=r.useCallback(()=>{l(ne)},[]);r.useEffect(()=>{if(typeof chrome>"u"||!chrome.storage)return;const L=T=>{T&&(chrome.storage.local.remove("gtab_pending_url"),y(null),A(T),C(!0))};chrome.storage.local.get("gtab_pending_url",T=>{T.gtab_pending_url&&L(T.gtab_pending_url)});const R=T=>{var $;($=T.gtab_pending_url)!=null&&$.newValue&&L(T.gtab_pending_url.newValue)};return chrome.storage.onChanged.addListener(R),()=>chrome.storage.onChanged.removeListener(R)},[]);const xe={shortcuts:s,setShortcuts:a,layout:n,setLayout:l,bgConfig:o,setBgConfig:i,clockConfig:d,setClockConfig:u,cardConfig:h,setCardConfig:m,stocksConfig:x,setStocksConfig:c,filterCategory:b,setFilterCategory:f,filterProfile:g,setFilterProfile:k,activeFolderId:v,setActiveFolderId:y,isEditMode:E,setIsEditMode:S,isModalOpen:N,setIsModalOpen:C,isBgModalOpen:O,setIsBgModalOpen:j,isClockModalOpen:B,setIsClockModalOpen:P,editingShortcut:_,setEditingShortcut:w,pendingUrl:M,setPendingUrl:A,activeBgUrl:z,setActiveBgUrl:Z,isBgImageLoaded:te,setIsBgImageLoaded:H,addShortcuts:W,deleteShortcut:ce,updateShortcut:de,toggleWidgetVisibility:ue,updateWidgetConfig:he,resetLayout:me};return e.jsx(lt.Provider,{value:xe,children:t})},ps=({layout:t,onReorder:s})=>{const[a,n]=r.useState(null),[l,o]=r.useState(null),[i,d]=r.useState(t),u=r.useRef(null);r.useEffect(()=>{a||d(t)},[t,a]);const h=r.useCallback((p,b)=>{n(b);const f=t.find(g=>g.id===b);f&&(u.current=f),p.dataTransfer.effectAllowed="move",setTimeout(()=>{const g=p.target;g&&g.classList.add("opacity-20")},0)},[t]),m=r.useCallback((p,b)=>{p.preventDefault(),!(!a||a===b)&&(o(b),d(f=>{const g=f.findIndex(E=>E.id===a),k=f.findIndex(E=>E.id===b);if(g===-1||k===-1)return f;const v=[...f],y=v[g];return v.splice(g,1),v.splice(k,0,y),v.map((E,S)=>({...E,order:S}))}))},[a]),x=r.useCallback(p=>{p.preventDefault()},[]),c=r.useCallback(p=>{const b=p.target;b&&b.classList.remove("opacity-20"),s(i),u.current=null,n(null),o(null)},[i,s]);return{draggedId:a,dragOverId:l,liveLayout:i,onDragStart:h,onDragEnter:m,onDragOver:x,onDragEnd:c}},fs=({snapGridSize:t=20,onResizeEnd:s})=>({handlePointerDown:r.useCallback((n,l)=>{n.stopPropagation(),n.preventDefault();const o=n.clientX,i=n.clientY,d=l.offsetWidth,u=l.offsetHeight,h=l.style.transition;l.style.transition="none",l.classList.add("ring-2","ring-blue-500","ring-offset-2","ring-offset-black","z-50","scale-[1.01]");const m=c=>{let p=Math.max(200,d+(c.clientX-o)),b=Math.max(100,u+(c.clientY-i));t>0&&(p=Math.round(p/t)*t,b=Math.round(b/t)*t),l.style.width=`${p}px`,l.style.height=`${b}px`},x=()=>{l.style.transition=h,l.classList.remove("ring-2","ring-blue-500","ring-offset-2","ring-offset-black","z-50","scale-[1.01]"),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",x),s(l.offsetWidth,l.offsetHeight)};document.addEventListener("pointermove",m),document.addEventListener("pointerup",x)},[t,s])}),gs=({snapGridSize:t=20,updateWidgetConfig:s})=>({handlePointerDown:r.useCallback((n,l,o)=>{if(n.button!==0||n.target.closest("button"))return;n.stopPropagation(),n.preventDefault();const i=n.clientX,d=n.clientY,u=l.x??o.offsetLeft,h=l.y??o.offsetTop,m=o.style.transition;o.style.transition="none",o.style.zIndex="50",o.classList.add("ring-2","ring-blue-500/50","scale-[1.02]");const x=o.parentElement,c=[];x&&x.querySelectorAll(".widget-item").forEach(k=>{if(k===o)return;const v=k;c.push({left:v.offsetLeft,top:v.offsetTop,right:v.offsetLeft+v.offsetWidth,bottom:v.offsetTop+v.offsetHeight})});let p=!1;const b=g=>{let k=u+(g.clientX-i),v=h+(g.clientY-d);t>0&&(k=Math.round(k/t)*t,v=Math.round(v/t)*t);const y=k+o.offsetWidth,E=v+o.offsetHeight;p=c.some(S=>!(y<=S.left||k>=S.right||E<=S.top||v>=S.bottom)),p?(o.classList.add("ring-red-500","ring-4"),o.classList.remove("ring-blue-500/50","ring-2")):(o.classList.add("ring-blue-500/50","ring-2"),o.classList.remove("ring-red-500","ring-4")),o.style.left=`${k}px`,o.style.top=`${v}px`},f=()=>{if(o.style.transition=m,o.style.zIndex="",o.classList.remove("ring-red-500","ring-4","ring-2","ring-blue-500/50","scale-[1.02]"),document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",f),p){o.style.transition="all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",o.style.left=`${u}px`,o.style.top=`${h}px`;return}let g=u+(parseInt(o.style.left)-u),k=h+(parseInt(o.style.top)-h);isNaN(g)&&(g=o.offsetLeft),isNaN(k)&&(k=o.offsetTop),s(l.id,{x:g,y:k})};document.addEventListener("pointermove",b),document.addEventListener("pointerup",f)},[t,s])}),ws=t=>{switch(t){case"neon":return{wrapper:"bg-gradient-to-br from-indigo-900 via-purple-900 to-pink-900",overlay:"bg-black/40 backdrop-blur-[2px]",overlayStyle:{},accent:"text-pink-400 drop-shadow-[0_0_8px_rgba(236,72,153,0.6)]",glass:"border-pink-500/20 backdrop-blur-xl transition-all",glassBgRgb:"255,255,255",menuBg:"rgba(20,20,30,0.97)",menuBorder:"rgba(236,72,153,0.3)",menuBgRgb:"20,20,30",menuBorderRgb:"236,72,153",accentColor:"#ec4899"};case"starship":return{wrapper:"bg-[#050505] bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-gray-900 via-black to-black",overlay:"",overlayStyle:{},accent:"text-blue-400 drop-shadow-[0_0_8px_rgba(96,165,250,0.6)]",glass:"border-white/5 backdrop-blur-lg transition-all",glassBgRgb:"255,255,255",menuBg:"rgba(3,6,24,0.97)",menuBorder:"rgba(96,165,250,0.2)",menuBgRgb:"3,6,24",menuBorderRgb:"96,165,250",accentColor:"#60a5fa"};case"terminal":return{wrapper:"bg-black",overlay:"",overlayStyle:{backgroundImage:"linear-gradient(rgba(18,16,16,0) 50%, rgba(0,0,0,0.25) 50%), linear-gradient(90deg, rgba(255,0,0,0.06), rgba(0,255,0,0.02), rgba(0,0,255,0.06))",backgroundSize:"100% 2px, 3px 100%"},accent:"text-green-500 font-mono drop-shadow-[0_0_5px_#22c55e]",glass:"border-green-500/30 font-mono hover:border-green-500/60 transition-all",glassBgRgb:"0,0,0",menuBg:"rgba(0,8,2,0.97)",menuBorder:"rgba(34,197,94,0.3)",menuBgRgb:"0,8,2",menuBorderRgb:"34,197,94",accentColor:"#22c55e"};case"portal":return{wrapper:"bg-[#060606]",overlay:"",overlayStyle:{},orbs:[{color:"rgba(255,153,0,0.45)",size:"90vmax",animClass:"animate-orb-a"},{color:"rgba(0,163,255,0.35)",size:"90vmax",animClass:"animate-orb-b"}],accent:"text-[#FF9900] drop-shadow-[0_0_15px_rgba(255,153,0,0.9)]",glass:"border-[#FF9900]/40 backdrop-blur-3xl hover:border-[#FF9900]/60 transition-all",glassBgRgb:"20,20,20",menuBg:"rgba(10,10,10,0.98)",menuBorder:"rgba(255,153,0,0.4)",menuBgRgb:"10,10,10",menuBorderRgb:"255,153,0",accentColor:"#FF9900"};default:return{wrapper:"bg-black",overlay:"bg-black/30",overlayStyle:{},accent:"text-blue-400",glass:"border-white/10 backdrop-blur-md",glassBgRgb:"255,255,255",menuBg:"rgba(10,10,12,0.97)",menuBorder:"rgba(255,255,255,0.1)",menuBgRgb:"10,10,12",menuBorderRgb:"255,255,255",accentColor:"#60a5fa"}}},bs=({bgConfig:t,isThemeBg:s,isColorBg:a,activeBgUrl:n,isBgImageLoaded:l,themeOverlayClass:o,themeOverlayStyle:i,themeOrbs:d})=>e.jsxs("div",{className:"fixed inset-0 z-0 pointer-events-none select-none overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-black"}),s&&o&&e.jsx("div",{className:`absolute -inset-[10%] transition-opacity duration-700 animate-glow-drift ${o}`,style:i}),s&&d&&d.map((u,h)=>e.jsx("div",{className:`absolute rounded-full ${u.animClass}`,style:{width:u.size,height:u.size,background:`radial-gradient(circle, ${u.color} 0%, transparent 70%)`,transform:"translate(-50%, -50%)",filter:"blur(30px)"}},h)),a&&e.jsx("div",{className:"absolute inset-0 transition-colors duration-700",style:{backgroundColor:t.value}}),!s&&!a&&e.jsx("img",{src:n,alt:"Background",className:"absolute inset-0 w-full h-full object-cover transition-opacity duration-700",style:{opacity:l?.6:0,filter:"brightness(0.6) contrast(1.1)"}})]}),vs=({isEditMode:t,setIsEditMode:s,setIsBgModalOpen:a,resetLayout:n})=>e.jsx("header",{className:"flex justify-end mb-6 space-x-2 sticky top-4 z-50",children:t?e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>a(!0),className:"flex items-center gap-2 px-4 py-2 rounded-full border border-white/10 backdrop-blur-md transition-colors text-white text-sm font-medium",style:{backgroundColor:"var(--theme-accent, #2563eb)"},children:[e.jsx(sr,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Görünüm"})]}),e.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-4 py-2 rounded-full bg-red-500/20 border border-red-500/30 hover:bg-red-500/40 backdrop-blur-md transition-colors text-white/90 text-sm font-medium",children:[e.jsx(G,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Sıfırla"})]}),e.jsxs("button",{onClick:()=>s(!1),className:"flex items-center gap-2 px-4 py-2 rounded-full bg-green-600 hover:bg-green-500 shadow-lg shadow-green-900/20 backdrop-blur-md transition-all text-white text-sm font-medium animate-fade-in",children:[e.jsx(zt,{className:"w-4 h-4"}),e.jsx("span",{children:"Bitti"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("a",{href:"https://buymeacoffee.com/alazndy",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-4 py-2 rounded-full bg-yellow-500/10 hover:bg-yellow-500/20 border border-yellow-500/20 backdrop-blur-md transition-all text-yellow-200 hover:text-yellow-100 text-sm font-medium group",children:[e.jsx(qt,{className:"w-4 h-4 text-yellow-400 group-hover:scale-110 transition-transform"}),e.jsx("span",{className:"hidden sm:inline",children:"Kahve Ismarla"})]}),e.jsxs("button",{onClick:()=>s(!0),className:"flex items-center gap-2 px-4 py-2 rounded-full bg-white/10 hover:bg-white/20 border border-white/10 backdrop-blur-md transition-all text-white/90 text-sm font-medium",children:[e.jsx(tr,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Düzenle"})]})]})}),ys=({widget:t,onClose:s,setIsBgModalOpen:a,setIsClockModalOpen:n})=>{const{clockConfig:l,setClockConfig:o,cardConfig:i,setCardConfig:d,stocksConfig:u,setStocksConfig:h,updateWidgetConfig:m}=ie(),x=()=>{switch(t.id){case"clock":return e.jsxs("div",{className:"bg-white/5 rounded-xl p-3 border border-white/5 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 pb-1 border-b border-white/5",children:[e.jsx($e,{className:"w-3.5 h-3.5 text-blue-400"}),e.jsx("span",{className:"text-[10px] font-bold text-white/50 uppercase tracking-widest",children:"Saat Ayarları"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[10px] text-white/60",children:"24 Saat Formatı"}),e.jsx("button",{onClick:()=>o(c=>({...c,format:c.format==="24h"?"12h":"24h"})),className:`text-[9px] px-2 py-1 rounded border transition-all ${l.format==="24h"?"bg-blue-500/20 text-blue-400 border-blue-500/30":"bg-white/5 text-white/30 border-white/10"}`,children:l.format==="24h"?"AÇIK":"KAPALI"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[10px] text-white/60",children:"Saniyeleri Göster"}),e.jsx("button",{onClick:()=>o(c=>({...c,showSeconds:!c.showSeconds})),className:`text-[9px] px-2 py-1 rounded border transition-all ${l.showSeconds?"bg-blue-500/20 text-blue-400 border-blue-500/30":"bg-white/5 text-white/30 border-white/10"}`,children:l.showSeconds?"AÇIK":"KAPALI"})]})]});case"shortcuts":return e.jsxs("div",{className:"bg-white/5 rounded-xl p-3 border border-white/5 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 pb-1 border-b border-white/5",children:[e.jsx(ir,{className:"w-3.5 h-3.5 text-indigo-400"}),e.jsx("span",{className:"text-[10px] font-bold text-white/50 uppercase tracking-widest",children:"Kısayol Tasarımı"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"text-[9px] text-white/40 uppercase font-bold tracking-widest",children:"Kart Şekli"}),e.jsx("div",{className:"flex gap-1",children:["sharp","rounded","pill"].map(c=>e.jsx("button",{onClick:()=>d(p=>({...p,shape:c})),className:`flex-1 py-1 text-[8px] rounded border transition-all ${i.shape===c?"bg-indigo-500 text-white border-indigo-400 shadow-[0_0_8px_rgba(99,102,241,0.4)]":"bg-white/5 text-white/30 border-white/10 hover:bg-white/10"}`,children:c.toUpperCase()},c))})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 pt-1",children:[e.jsxs("button",{onClick:()=>d(c=>({...c,glowEnabled:!c.glowEnabled})),className:`flex items-center justify-center gap-2 py-1.5 rounded-lg border text-[9px] font-bold transition-all ${i.glowEnabled?"bg-orange-500/20 text-orange-400 border-orange-500/30 shadow-[0_0_10px_rgba(249,115,22,0.2)]":"bg-white/5 text-white/30 border-white/10"}`,children:[e.jsx(We,{className:"w-3 h-3"})," GLOW"]}),e.jsxs("button",{onClick:()=>d(c=>({...c,showCardBorder:!c.showCardBorder})),className:`flex items-center justify-center gap-2 py-1.5 rounded-lg border text-[9px] font-bold transition-all ${i.showCardBorder?"bg-blue-500/20 text-blue-400 border-blue-500/30":"bg-white/5 text-white/30 border-white/10"}`,children:[e.jsx(Ie,{className:"w-3 h-3"})," KENARLIK"]})]}),e.jsxs("div",{className:"space-y-3 pt-1",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex justify-between text-[9px] text-white/40 font-bold uppercase tracking-widest",children:[e.jsx("span",{children:"Arka Plan Opaklığı"}),e.jsxs("span",{className:"text-indigo-400",children:[i.bgOpacity,"%"]})]}),e.jsx("input",{type:"range",min:0,max:100,step:5,value:i.bgOpacity,onChange:c=>d(p=>({...p,bgOpacity:Number(c.target.value)})),className:"w-full accent-indigo-500 h-1 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),i.showCardBorder&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex justify-between text-[9px] text-white/40 font-bold uppercase tracking-widest",children:[e.jsx("span",{children:"Kenarlık Opaklığı"}),e.jsxs("span",{className:"text-blue-400",children:[i.cardBorderOpacity??20,"%"]})]}),e.jsx("input",{type:"range",min:0,max:100,step:5,value:i.cardBorderOpacity??20,onChange:c=>d(p=>({...p,cardBorderOpacity:Number(c.target.value)})),className:"w-full accent-blue-500 h-1 bg-white/10 rounded-lg appearance-none cursor-pointer"})]})]})]});case"stocks":return e.jsxs("div",{className:"bg-white/5 rounded-xl p-3 border border-white/5 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 pb-1 border-b border-white/5",children:[e.jsx(Zt,{className:"w-3.5 h-3.5 text-green-400"}),e.jsx("span",{className:"text-[10px] font-bold text-white/50 uppercase tracking-widest",children:"Semboller"})]}),e.jsxs("div",{className:"flex flex-wrap gap-1",children:[u.symbols.map(c=>e.jsx("div",{className:"px-2 py-0.5 bg-green-500/10 text-green-400 border border-green-500/20 rounded text-[9px] font-bold uppercase",children:c},c)),e.jsx("button",{onClick:()=>a(!0),className:"px-2 py-0.5 bg-white/5 text-white/30 border border-white/10 rounded text-[9px] hover:bg-white/10",children:"+"})]})]});default:return null}};return e.jsxs("div",{className:"absolute top-full right-0 mt-3 w-72 bg-[#0c0c0c]/90 backdrop-blur-3xl border border-white/10 rounded-2xl shadow-[0_20px_50px_rgba(0,0,0,0.5)] p-4 flex flex-col gap-4 animate-fade-in select-none z-50 overflow-hidden",onPointerDown:c=>c.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-white/5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"p-1 rounded-md bg-blue-500/20 text-blue-400",children:e.jsx(kt,{className:"w-3.5 h-3.5"})}),e.jsx("span",{className:"text-[10px] font-bold text-white/70 uppercase tracking-widest",children:"Hızlı Ayarlar"})]}),e.jsx("button",{onClick:c=>{c.stopPropagation(),a(!0),s()},className:"text-[9px] bg-white/5 hover:bg-white/10 text-white/50 hover:text-white px-2 py-1 rounded-md transition-all border border-white/5",children:"Tüm Ayarlar"})]}),x(),e.jsxs("div",{className:"bg-white/5 rounded-xl p-3 border border-white/5 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(dr,{className:"w-4 h-4 text-orange-400/80"}),e.jsx("span",{className:"text-[10px] font-medium text-white/60",children:"Opaklık"})]}),e.jsxs("span",{className:"text-[10px] font-bold text-orange-400",children:[t.opacity??10,"%"]})]}),e.jsx("input",{type:"range",min:0,max:100,step:5,value:t.opacity??10,onChange:c=>m(t.id,{opacity:Number(c.target.value)}),className:"w-full accent-orange-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),e.jsxs("div",{className:"space-y-2 pt-2 border-t border-white/5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:"w-4 h-4 text-blue-400/80"}),e.jsx("span",{className:"text-[10px] font-medium text-white/60",children:"Kenarlık"})]}),e.jsx("button",{onClick:()=>m(t.id,{showBorder:t.showBorder===!1}),className:`text-[9px] px-2.5 py-1 rounded-md border transition-all font-bold ${t.showBorder!==!1?"bg-blue-500 text-white border-blue-400 shadow-[0_0_10px_rgba(59,130,246,0.3)]":"bg-white/5 text-white/30 border-white/10"}`,children:t.showBorder!==!1?"AKTİF":"PASİF"})]}),t.showBorder!==!1&&e.jsx("input",{type:"range",min:0,max:100,step:5,value:t.borderOpacity??20,onChange:c=>m(t.id,{borderOpacity:Number(c.target.value)}),className:"w-full accent-blue-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]})]}),e.jsxs("div",{className:"bg-white/5 rounded-xl p-3 border border-white/5 grid grid-cols-1 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($t,{className:"w-4 h-4 text-indigo-400/80"}),e.jsx("span",{className:"text-[10px] font-medium text-white/60",children:"Genişlik"})]}),e.jsx("span",{className:"text-[10px] font-bold text-indigo-400",children:t.widthPx?`${t.widthPx}px`:"Auto"})]}),e.jsx("input",{type:"range",min:200,max:1600,step:10,value:t.widthPx??400,onChange:c=>m(t.id,{widthPx:Number(c.target.value)}),className:"w-full accent-indigo-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_t,{className:"w-4 h-4 text-indigo-400/80"}),e.jsx("span",{className:"text-[10px] font-medium text-white/60",children:"Yükseklik"})]}),e.jsx("span",{className:"text-[10px] font-bold text-indigo-400",children:t.heightPx?`${t.heightPx}px`:"Auto"})]}),e.jsx("input",{type:"range",min:100,max:1200,step:10,value:t.heightPx??200,onChange:c=>m(t.id,{heightPx:Number(c.target.value)}),className:"w-full accent-indigo-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]})]}),t.id==="clock"&&e.jsxs("button",{onClick:c=>{c.stopPropagation(),n(!0),s()},className:"w-full py-2 bg-white/5 hover:bg-white/10 text-white/50 text-[9px] uppercase font-bold rounded-lg border border-white/5 transition-all flex items-center justify-center gap-2",children:[e.jsx($e,{className:"w-3.5 h-3.5"})," Tüm Saat Stil Ayarlarını Aç"]})]})},js=({widget:t,index:s,isEditMode:a,activeTheme:n,themeStyles:l,showQuickSettings:o,setShowQuickSettings:i,draggedId:d,dragOverId:u,onDragStart:h,onDragEnter:m,onDragOver:x,onDragEnd:c,updateWidgetConfig:p,setIsBgModalOpen:b,setIsClockModalOpen:f,toggleWidgetVisibility:g,resizeHandler:k,getWidgetLabel:v,isFreeLayout:y,onPointerDownFreeDrag:E,children:S})=>{const N=d===t.id&&!y,C=u===t.id&&!N&&!y,O=t.glassEffect!==!1,j=O&&t.showBorder!==!1,B=O?`${l.glass} shadow-2xl shadow-black/20`:"bg-transparent border-transparent",P=a?`border-2 border-dashed ${N?"opacity-20 scale-95":"opacity-100"} ${C?"border-blue-400 bg-blue-500/10 scale-[1.02] z-40":"border-white/20 hover:border-white/40"}`:`${B} ${j?"border-2":"border-0"}`,_={width:t.widthPx?`${t.widthPx}px`:"100%",height:t.heightPx?`${t.heightPx}px`:"auto",backgroundColor:O&&n!=="custom"?`rgba(${l.glassBgRgb||"255,255,255"}, ${(t.opacity??10)/100})`:void 0,borderColor:j&&n!=="custom"?`rgba(${l.glassBgRgb||"255,255,255"}, ${(t.borderOpacity??20)/100})`:void 0,...y&&{position:"absolute",left:t.x!==void 0?`${t.x}px`:`${s%2*450+50}px`,top:t.y!==void 0?`${t.y}px`:`${Math.floor(s/2)*350+50}px`}};return e.jsxs("div",{draggable:a&&o!==t.id&&!y,onDragStart:y?void 0:w=>h(w,t.id,s),onDragEnter:y?void 0:w=>m(w,t.id,s),onDragOver:y?void 0:x,onDragEnd:y?void 0:c,onPointerDown:a&&y&&E?w=>E(w,t,w.currentTarget):void 0,className:`widget-item transition-all duration-300 rounded-2xl p-4 md:p-6 ${P} ${!t.visible&&a?"grayscale":""} ${a?"cursor-move":""} ${y?"":"relative"}`,style:_,"data-widget-id":t.id,children:[a&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"absolute -top-3 left-4 text-white text-xs font-bold px-3 py-1 rounded-full shadow-lg flex items-center gap-2 z-20",style:{backgroundColor:"var(--theme-accent, #2563eb)"},children:[e.jsx(At,{className:"w-3 h-3"}),v(t.id)]}),e.jsxs("div",{className:"absolute top-4 right-4 flex items-center gap-2 z-30",onPointerDown:w=>w.stopPropagation(),children:[e.jsxs("div",{className:"relative group/settings",children:[e.jsx("button",{onClick:w=>{w.stopPropagation(),i(o===t.id?null:t.id)},className:`p-1.5 rounded-full transition-all border border-white/20 ${o===t.id?"bg-blue-500 text-white":"bg-black/60 hover:bg-black/80 text-white/70"}`,children:e.jsx(je,{className:"w-4 h-4"})}),o===t.id&&e.jsx(ys,{widget:t,onClose:()=>i(null),setIsBgModalOpen:b,setIsClockModalOpen:f})]}),e.jsx("button",{onClick:w=>{w.preventDefault(),p(t.id,{glassEffect:t.glassEffect===!1})},className:`p-1.5 rounded-full transition-all border border-white/20 ${t.glassEffect===!1?"bg-indigo-500/80 text-white shadow-[0_0_8px_rgba(99,102,241,0.5)]":"bg-black/60 hover:bg-black/80 text-white/70"}`,title:"Cam Efekti",children:e.jsx(We,{className:"w-4 h-4"})}),e.jsx("button",{onClick:w=>{w.stopPropagation(),g(t.id)},className:`p-1.5 rounded-full transition-all border border-white/20 ${t.visible?"bg-black/60 hover:bg-black/80 text-white/70":"bg-red-500/80 text-white shadow-[0_0_8px_rgba(239,68,68,0.5)] hover:bg-red-500"}`,title:t.visible?"Gizle":"Göster",children:t.visible?e.jsx(ft,{className:"w-4 h-4"}):e.jsx(gt,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"absolute bottom-1 right-1 w-10 h-10 cursor-nwse-resize opacity-50 hover:opacity-100 flex items-end justify-end p-2 z-30",onPointerDown:w=>k(w,w.currentTarget.parentElement,(M,A)=>p(t.id,{widthPx:M,heightPx:A})),title:"Boyutlandır (Grid 20px)",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-4 h-4 stroke-white stroke-2",children:e.jsx("path",{d:"M21 15L15 21M21 9L9 21"})})})]}),e.jsx("div",{className:`w-full h-full ${n==="terminal"?"font-mono":""}`,children:S})]})},ks=()=>{const{shortcuts:t,filterCategory:s,setFilterCategory:a,filterProfile:n,setFilterProfile:l}=ie(),o=r.useMemo(()=>["All",...new Set(t.map(d=>d.category))],[t]),i=r.useMemo(()=>Array.from(new Set(t.flatMap(d=>{var u;return((u=d.profiles)==null?void 0:u.map(h=>h.name))||[]}))).sort(),[t]);return e.jsxs("div",{className:"flex flex-col gap-4 w-full mb-8 animate-fade-in",children:[e.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:o.map(d=>e.jsx("button",{onClick:()=>a(d),className:`px-4 py-1.5 rounded-full text-sm font-medium transition-all backdrop-blur-md border border-transparent ${s===d?"bg-white/90 text-black shadow-lg scale-105":"bg-black/30 text-white/70 hover:bg-white/20 hover:text-white border-white/10"}`,children:d==="All"?"Tümü":d},d))}),i.length>0&&e.jsxs("div",{className:"flex flex-wrap justify-center gap-2 items-center bg-white/5 p-2 rounded-xl border border-white/5 mx-auto w-fit backdrop-blur-sm",children:[e.jsxs("span",{className:"text-xs text-white/40 font-semibold px-2 uppercase tracking-wider flex items-center gap-1",children:[e.jsx(gr,{className:"w-3 h-3"})," Profil:"]}),e.jsx("button",{onClick:()=>l("All"),className:`px-3 py-1 rounded-md text-xs font-medium transition-all ${n==="All"?"bg-blue-500 text-white shadow-md":"text-white/60 hover:bg-white/10 hover:text-white"}`,children:"Tümü"}),i.map(d=>e.jsx("button",{onClick:()=>l(d),className:`px-3 py-1 rounded-md text-xs font-medium transition-all flex items-center gap-1 ${n===d?"bg-blue-500 text-white shadow-md":"text-white/60 hover:bg-white/10 hover:text-white"}`,children:d},d))]})]})},ve=new Map,Ee=t=>{if(!t)return"";const s=t.trim();return s?/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(s)?s:`https://${s}`:""},ye=(t,s)=>{var o;const a=Ee(t.url);if(!s)return a;const n=(o=s.url)==null?void 0:o.trim();if(!n)return a;if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)){if(a.includes("google.com")||a.includes("youtube.com"))try{const i=new URL(a);return i.searchParams.set("authuser",n),i.toString()}catch{const i=a.includes("?")?"&":"?";return`${a}${i}authuser=${n}`}return`mailto:${n}`}return Ee(n)},oe=(t,s)=>{const a=s?`${t}|${s}`:t;if(ve.has(a))return ve.get(a);let n;try{const l=Ee(t);l.startsWith("mailto:")&&s?n=oe(s):n=`https://www.google.com/s2/favicons?domain=${new URL(l).hostname}&sz=128`}catch{n=`https://ui-avatars.com/api/?name=${encodeURIComponent(t.substring(0,1))}&background=random&color=fff&size=128`}return ve.set(a,n),n},Ns=({profiles:t,cardConfig:s,onProfileClick:a})=>!t||t.length===0?null:e.jsx("div",{className:"absolute top-[95%] left-1/2 -translate-x-1/2 min-w-[180px] pt-2 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 transform origin-top z-40",children:e.jsxs("div",{className:"backdrop-blur-xl rounded-xl p-2 shadow-2xl flex flex-col gap-1",style:{backgroundColor:`rgba(var(--menu-bg-rgb, 10,10,12), ${((s==null?void 0:s.menuOpacity)??95)/100})`,border:`${(s==null?void 0:s.menuBorderOpacity)===0?"0px":"1px"} solid rgba(var(--menu-border-rgb, 255,255,255), ${((s==null?void 0:s.menuBorderOpacity)??10)/100})`},children:[e.jsx("div",{className:"text-[10px] text-white/40 px-2 py-1 uppercase tracking-wider font-semibold",children:"Profiller"}),t.map(n=>e.jsxs("button",{onClick:l=>a(l,n),className:"flex items-center gap-3 p-2 rounded-lg hover:bg-white/10 transition-colors w-full text-left group/profile relative",children:[e.jsx("div",{className:`w-6 h-6 rounded-full ${n.avatarColor||"bg-blue-500"} flex items-center justify-center text-[10px] font-bold text-white shadow-sm`,children:n.name.substring(0,2).toUpperCase()}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"text-xs font-medium text-white truncate flex items-center gap-2",children:n.name})}),e.jsx(Se,{className:"w-2.5 h-2.5 text-white/30 opacity-0 group-hover/profile:opacity-100"})]},n.id))]})}),Es={sharp:"rounded-none",rounded:"rounded-xl",pill:"rounded-3xl"},Ss={sm:"h-24",md:"h-32",lg:"h-40",xl:"h-48"},Cs={sm:"w-6 h-6",md:"w-9 h-9",lg:"w-10 h-10",xl:"w-12 h-12"},Ls={xs:"w-5 h-5",sm:"w-7 h-7",md:"w-9 h-9",lg:"w-12 h-12"},Rs={sm:"p-2",md:"p-3",lg:"p-4",xl:"p-4"},$s={sm:"mb-1",md:"mb-2",lg:"mb-3",xl:"mb-3"},Os=r.memo(({shortcut:t,activeProfileFilter:s="All",onDelete:a,onEdit:n,onFolderClick:l,cardConfig:o,draggable:i,onDragStart:d,onDragOver:u,onDrop:h})=>{const m=t.isFolder,x=t.profiles&&t.profiles.length>0,c=Es[(o==null?void 0:o.shape)??"rounded"],p=Ss[(o==null?void 0:o.size)??"md"],b=(o==null?void 0:o.bgOpacity)??10,f=o!=null&&o.iconSize?Ls[o.iconSize]:Cs[(o==null?void 0:o.size)??"md"],g=Rs[(o==null?void 0:o.size)??"md"],k=$s[(o==null?void 0:o.size)??"md"],v=((o==null?void 0:o.size)??"md")==="sm",y=s!=="All"&&t.profiles?t.profiles.find(w=>w.name===s):void 0,E=!y&&t.defaultProfileId&&t.profiles?t.profiles.find(w=>w.id===t.defaultProfileId):void 0,S=y||E,N=ye(t,S),C=(w,M="w-10 h-10",A="mb-3")=>{const z=w.iconType==="image"&&w.iconValue?w.iconValue:oe(w.url,t.url);return e.jsx("img",{src:z,alt:w.title,loading:"lazy",decoding:"async",className:`${M} ${A} rounded-md shadow-md object-contain ${w.iconType==="image"?"bg-white/10":""} flex-shrink-0`,onError:Z=>{Z.target.src=oe(w.url,t.url)}})},O=w=>{m&&l&&(w.preventDefault(),l(t))},j=w=>{var M;w.stopPropagation(),w.preventDefault(),(M=t.children)==null||M.forEach(A=>{const z=ye(A);z&&window.open(z,"_blank")})},B=(w,M)=>{w.stopPropagation(),w.preventDefault();const A=ye(t,M),z=document.createElement("a");z.href=A,z.click()},P=o!=null&&o.cardWidth?{width:`${o.cardWidth}%`}:void 0,_=o!=null&&o.glowEnabled?"hover:shadow-[0_0_20px_var(--theme-accent,rgba(59,130,246,0.5))]":"hover:shadow-xl";if(m){const w=t.children||[],M=w.slice(0,4);return e.jsx("div",{className:"group relative z-0 hover:z-20",draggable:i,onDragStart:A=>d==null?void 0:d(A,t.id),onDragOver:u,onDrop:A=>h==null?void 0:h(A,t.id),style:P,children:e.jsxs("div",{onClick:O,className:`relative backdrop-blur-md flex flex-col items-center justify-center transition-all duration-300 cursor-pointer hover:-translate-y-1 w-full overflow-hidden ${c} ${p} ${g} ${_} ${(o==null?void 0:o.showCardBorder)!==!1?"border":"border-0"}`,style:{backgroundColor:`rgba(255,255,255,${b/100})`,borderColor:(o==null?void 0:o.showCardBorder)!==!1?`rgba(255,255,255,${((o==null?void 0:o.cardBorderOpacity)??10)/100})`:"transparent"},children:[e.jsxs("div",{className:`grid grid-cols-2 gap-1 p-1 bg-black/20 rounded-lg flex-shrink-0 ${v?"w-9 h-9 mb-1":"w-[52px] h-[52px] mb-2"}`,children:[M.map(A=>e.jsx("div",{className:"flex items-center justify-center w-full h-full overflow-hidden",children:e.jsx("img",{src:A.iconType==="image"?A.iconValue:oe(A.url),className:"w-4 h-4 rounded-[2px] object-cover",alt:"",onError:z=>z.target.style.display="none"})},A.id)),w.length===0&&e.jsx(Ue,{className:"w-5 h-5 text-white/20 col-span-2 row-span-2 mx-auto my-auto"})]}),e.jsx("span",{className:`text-white font-medium text-center truncate w-full px-1 leading-tight ${v?"text-[11px]":"text-sm"}`,children:t.title}),!v&&e.jsxs("div",{className:"text-[10px] text-white/40 mt-0.5",children:[w.length," öğe"]}),e.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity z-30",children:[w.length>0&&e.jsx("button",{onClick:j,title:"Hepsini Aç",className:"p-1.5 rounded-full bg-black/20 text-white/70 hover:bg-yellow-500/80 hover:text-white transition-all",children:e.jsx(Tt,{className:"w-3 h-3"})}),e.jsx("button",{onClick:A=>{A.stopPropagation(),n(t)},title:"Ayarlar",className:"p-1.5 rounded-full bg-black/20 text-white/70 hover:bg-blue-500/80 hover:text-white transition-all",children:e.jsx(je,{className:"w-3 h-3"})}),e.jsx("button",{onClick:A=>{A.stopPropagation(),a(t.id)},title:"Sil",className:"p-1.5 rounded-full bg-black/20 text-white/70 hover:bg-red-500/80 hover:text-white transition-all",children:e.jsx(Ne,{className:"w-3 h-3"})})]})]})})}return e.jsxs("div",{className:"group relative z-0 hover:z-20",draggable:i,onDragStart:w=>d==null?void 0:d(w,t.id),onDragOver:u,onDrop:w=>h==null?void 0:h(w,t.id),style:P,children:[e.jsxs("div",{className:`relative backdrop-blur-md flex flex-col items-center justify-center transition-all duration-300 cursor-pointer hover:-translate-y-1 shadow-sm w-full overflow-hidden ${c} ${p} ${g} ${_} ${(o==null?void 0:o.showCardBorder)!==!1?"border":"border-0"}`,style:{backgroundColor:y?"rgba(59,130,246,0.2)":E?`rgba(255,255,255,${(b+5)/100})`:`rgba(255,255,255,${b/100})`,borderColor:(o==null?void 0:o.showCardBorder)!==!1?y?"rgba(59,130,246,0.4)":`rgba(255,255,255,${((o==null?void 0:o.cardBorderOpacity)??10)/100})`:"transparent"},children:[e.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity z-30",children:[e.jsx("button",{onClick:w=>{w.stopPropagation(),n(t)},title:"Ayarlar",className:"p-1.5 rounded-full bg-black/20 text-white/70 hover:bg-blue-500/80 hover:text-white transition-all",children:e.jsx(je,{className:"w-3 h-3"})}),e.jsx("button",{onClick:w=>{w.stopPropagation(),a(t.id)},title:"Sil",className:"p-1.5 rounded-full bg-black/20 text-white/70 hover:bg-red-500/80 hover:text-white transition-all",children:e.jsx(Ne,{className:"w-3 h-3"})})]}),e.jsxs("a",{href:N,className:"flex flex-col items-center w-full h-full justify-center relative min-w-0",children:[C(t,f,k),e.jsx("span",{className:`text-white font-medium text-center truncate w-full px-1 leading-tight ${v?"text-[11px]":"text-sm"}`,children:t.title}),!v&&e.jsx("div",{className:"text-xs text-white/50 mt-1 flex items-center gap-1 h-4 min-w-0 max-w-full",children:S?e.jsxs("span",{className:`flex items-center gap-1 font-medium animate-fade-in truncate ${y?"text-blue-200":"text-white/70"}`,children:[e.jsx("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${S.avatarColor||"bg-blue-400"} ${!y&&"ring-1 ring-white/20"}`}),S.name]}):e.jsxs(e.Fragment,{children:[x&&e.jsx(pr,{className:"w-2.5 h-2.5 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:t.category})]})})]})]}),x&&!y&&t.profiles&&e.jsx(Ns,{profiles:t.profiles,cardConfig:o,onProfileClick:B})]})}),_s=()=>{const{shortcuts:t,setShortcuts:s,filterCategory:a,setFilterCategory:n,filterProfile:l,setFilterProfile:o,cardConfig:i,setEditingShortcut:d,setActiveFolderId:u,setIsModalOpen:h,deleteShortcut:m}=ie(),x=r.useRef(null),c=r.useRef(null),p=r.useCallback((y,E)=>{x.current=E,y.dataTransfer.effectAllowed="move",y.dataTransfer.setData("text/plain",E)},[]),b=r.useCallback((y,E)=>{y.preventDefault();const S=x.current;!S||S===E||(s(N=>{const C=N.findIndex(_=>_.id===S),O=N.findIndex(_=>_.id===E);if(C===-1||O===-1)return N;const j=N[O],B=N[C];if(j.isFolder){const _=[...N];_.splice(C,1);const w=_.findIndex(M=>M.id===E);if(w!==-1){const M={..._[w],children:[..._[w].children||[],B]};return _[w]=M,_}return N}const P=[...N];return P.splice(C,1),P.splice(O,0,B),P}),x.current=null,c.current=null)},[s]),f=r.useCallback(y=>{y.preventDefault()},[]),g=r.useCallback(y=>d(y),[d]),k=r.useCallback(y=>u(y.id),[u]),v=r.useMemo(()=>t.filter(y=>{const E=a==="All"||y.category===a,S=l==="All"||y.profiles&&y.profiles.some(N=>N.name===l);return E&&S}),[t,a,l]);return e.jsx("div",{className:"w-full",children:v.length===0?e.jsxs("div",{className:"text-center text-white/50 py-12 bg-white/5 rounded-xl border border-white/5",children:[e.jsx(Ue,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),e.jsx("p",{children:"Bu filtreye uygun kısayol bulunamadı."}),(a!=="All"||l!=="All")&&e.jsx("button",{onClick:()=>{n("All"),o("All")},className:"text-blue-400 text-sm mt-2 hover:underline",children:"Filtreleri Temizle"})]}):e.jsxs("div",{className:"grid w-full pb-24",style:{columnGap:`${i.gridGapX??16}px`,rowGap:`${i.gridGapY??16}px`,gridTemplateColumns:`repeat(${i.gridCols??6}, minmax(0, 1fr))`},children:[v.map(y=>e.jsx(Os,{shortcut:y,activeProfileFilter:l,onDelete:m,onEdit:g,onFolderClick:k,cardConfig:i,draggable:!0,onDragStart:p,onDragOver:f,onDrop:b},y.id)),e.jsxs("button",{onClick:()=>{u(null),h(!0)},className:`group rounded-xl border border-white/5 border-dashed bg-transparent hover:bg-white/5 flex flex-col items-center justify-center transition-all opacity-30 hover:opacity-100 ${(i==null?void 0:i.size)==="sm"?"h-24":(i==null?void 0:i.size)==="lg"?"h-40":(i==null?void 0:i.size)==="xl"?"h-48":"h-32"}`,children:[e.jsx("div",{className:"p-2 rounded-full bg-white/5 group-hover:bg-white/10 mb-1 transition-colors",children:e.jsx(q,{className:"w-5 h-5 text-white/50"})}),e.jsx("span",{className:"text-[11px] text-white/40 font-medium group-hover:text-white/60",children:"Yeni Ekle"})]})]})})},Is=U.lazy(()=>ee(()=>import("./AddModal-Ylmnq22h.js"),__vite__mapDeps([0,1,2,3,4]))),As=U.lazy(()=>ee(()=>import("./ShortcutSettingsModal-CjZJDRQ1.js"),__vite__mapDeps([5,1,2,6]))),Bs=U.lazy(()=>ee(()=>import("./BackgroundSettingsModal-B5X-Q6xJ.js"),__vite__mapDeps([7,1,2,4]))),Ts=U.lazy(()=>ee(()=>import("./ClockSettingsModal-CueBoYPW.js"),__vite__mapDeps([8,1,2,6]))),Ps=U.lazy(()=>ee(()=>import("./FolderViewModal-DJZs6xGL.js"),__vite__mapDeps([9,1,2]))),Ms=()=>{const{shortcuts:t,setShortcuts:s,layout:a,setLayout:n,bgConfig:l,setBgConfig:o,clockConfig:i,setClockConfig:d,cardConfig:u,setCardConfig:h,filterCategory:m,setFilterCategory:x,filterProfile:c,setFilterProfile:p,activeFolderId:b,setActiveFolderId:f,isEditMode:g,setIsEditMode:k,isModalOpen:v,setIsModalOpen:y,isBgModalOpen:E,setIsBgModalOpen:S,isClockModalOpen:N,setIsClockModalOpen:C,editingShortcut:O,setEditingShortcut:j,pendingUrl:B,setPendingUrl:P,activeBgUrl:_,isBgImageLoaded:w,addShortcuts:M,deleteShortcut:A,updateShortcut:z,toggleWidgetVisibility:Z,updateWidgetConfig:te,resetLayout:H}=ie(),V=r.useMemo(()=>l.type==="theme"?l.value:"default",[l]),W=r.useMemo(()=>ws(V),[V]),[ce,de]=U.useState(null),{draggedId:ue,dragOverId:he,onDragStart:me,onDragEnter:xe,onDragOver:L,onDragEnd:R}=ps({layout:a,onReorder:n}),{handlePointerDown:T}=gs({snapGridSize:20,updateWidgetConfig:te}),{handlePointerDown:$}=fs({snapGridSize:20,onResizeEnd:(D,X)=>{}}),I=r.useMemo(()=>t.filter(D=>D.isFolder),[t]),F=a,re=r.useMemo(()=>l.type==="color",[l.type]),K=r.useMemo(()=>l.type==="theme",[l.type]),Ce=r.useMemo(()=>t.find(D=>D.id===b),[t,b]),ct=r.useMemo(()=>{const D={geist:'"Geist Sans", system-ui, sans-serif',system:"system-ui, sans-serif",mono:'"Geist Mono", "Courier New", monospace',serif:"Georgia, serif"};return{fontFamily:D[u.font]??D.geist}},[u.font]),dt=r.useMemo(()=>l.isFreeLayout?`${F.reduce((X,se)=>{if(!se.visible&&!g)return X;const xt=(se.y!==void 0?se.y:0)+(se.heightPx||400);return Math.max(X,xt)},600)+100}px`:"auto",[F,l.isFreeLayout,g]),ut=r.useMemo(()=>({left:"mr-auto ml-0",center:"mx-auto",right:"ml-auto mr-0"})[u.alignment]??"mx-auto",[u.alignment]),ht=D=>{switch(D){case"clock":return e.jsx(yt,{config:i,isEditMode:g,onOpenSettings:()=>C(!0)});case"search":return e.jsx(br,{});case"tasks":return e.jsx(Ur,{});case"categories":return e.jsx(ks,{});case"shortcuts":return e.jsx(_s,{});case"gmail":return e.jsx(Zr,{});case"calendar":return e.jsx(Kr,{});case"stocks":return e.jsx(Vr,{});case"google-tasks":return e.jsx(Qr,{});case"google-keep":return e.jsx(rs,{});case"weather":return e.jsx(ls,{});case"pomodoro":return e.jsx(ds,{});case"spotify":return e.jsx(ms,{});default:return null}},mt=D=>{switch(D){case"clock":return"Saat & Tarih";case"search":return"Arama Çubuğu";case"tasks":return"Görevler (Yerel)";case"categories":return"Kategori & Profil Filtreleri";case"shortcuts":return"Kısayol Izgarası";case"gmail":return"Gmail";case"calendar":return"Takvim";case"stocks":return"Borsa";case"google-tasks":return"Google Görevler";case"google-keep":return"Google Keep";case"weather":return"Hava Durumu";case"pomodoro":return"Pomodoro";case"spotify":return"Spotify"}};return e.jsxs("div",{className:`min-h-screen w-full relative overflow-y-auto overflow-x-hidden flex flex-col text-white transition-colors duration-700 ${K?W.wrapper:""}`,style:{"--theme-accent":W.accentColor,"--menu-bg":W.menuBg,"--menu-border":W.menuBorder,"--menu-bg-rgb":W.menuBgRgb,"--menu-border-rgb":W.menuBorderRgb,...ct},children:[e.jsx(bs,{bgConfig:l,isThemeBg:K,isColorBg:re,activeBgUrl:_,isBgImageLoaded:w,themeOverlayClass:W.overlay||"",themeOverlayStyle:W.overlayStyle,themeOrbs:W.orbs}),e.jsxs("div",{className:"relative z-10 flex-1 flex flex-col p-4 md:p-6 lg:p-8 h-full w-full",children:[e.jsx(vs,{isEditMode:g,setIsEditMode:k,setIsBgModalOpen:S,resetLayout:H}),e.jsx("main",{className:`flex-1 flex flex-col items-center w-full transition-all ${ut} ${l.isFreeLayout?"relative":""}`,children:e.jsx("div",{className:`w-full ${l.isFreeLayout?"absolute top-0 left-0":"flex flex-row flex-wrap justify-start gap-6 items-start"}`,style:l.isFreeLayout?{minHeight:dt}:void 0,children:F.map((D,X)=>!D.visible&&!g?null:e.jsx(js,{widget:D,index:X,isEditMode:g,activeTheme:V,themeStyles:W,showQuickSettings:ce,setShowQuickSettings:de,draggedId:ue,dragOverId:he,onDragStart:me,onDragEnter:xe,onDragOver:L,onDragEnd:R,updateWidgetConfig:te,setIsBgModalOpen:S,setIsClockModalOpen:C,toggleWidgetVisibility:Z,resizeHandler:$,getWidgetLabel:mt,isFreeLayout:l.isFreeLayout,onPointerDownFreeDrag:T,children:ht(D.id)},D.id))})})]}),e.jsxs(r.Suspense,{fallback:null,children:[Ce&&e.jsx(Ps,{folder:Ce,isOpen:!0,onClose:()=>f(null),onEditItem:j,onDeleteItem:A,onAddItem:()=>y(!0)}),e.jsx(Is,{isOpen:v,onClose:()=>{y(!1),P("")},onAdd:M,groups:I,isInsideGroup:b!==null,initialUrl:B}),e.jsx(As,{isOpen:!!O,shortcut:O,allShortcuts:t,onClose:()=>j(null),onSave:z}),e.jsx(Bs,{isOpen:E,currentConfig:l,onClose:()=>S(!1),onSave:o,cardConfig:u,onSaveCard:h,shortcuts:t,onImportShortcuts:s,layout:a,onSaveLayout:n}),e.jsx(Ts,{isOpen:N,config:i,onClose:()=>C(!1),onSave:d})]})]})},it=document.getElementById("root");if(!it)throw new Error("Could not find root element to mount to");const Fs=wt.createRoot(it);Fs.render(e.jsx(U.StrictMode,{children:e.jsx(xs,{children:e.jsx(Ms,{})})}));export{zs as D,Ne as F,Q as P,q as a,G as b,Wt as c,tr as d,He as e,ir as f,oe as g,gr as h,zt as i,We as j,kt as k,st as l,Ws as m,sr as n,Hs as o,$e as p,Tt as q,ye as r,Us as s}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AddModal-b9YQl9w7.js","assets/index-DEWape2v.js","assets/index-C6j3YXVw.css","assets/ChevronLeftIcon-DHpP5kml.js","assets/LinkIcon-2Miy7fz5.js","assets/ShortcutSettingsModal-7JjP3Ut6.js","assets/CheckIcon-CxKfb6Lo.js","assets/BackgroundSettingsModal-DLn0MpXH.js","assets/ClockSettingsModal-BgJzA91Y.js","assets/FolderViewModal-a6QU9HbF.js"])))=>i.map(i=>d[i]); +import{R as U,j as e,r,F as ft,C as q,a as ze,b as Se,c as je,d as pt,e as gt,f as Ue,g as wt}from"./index-DEWape2v.js";const bt="modulepreload",vt=function(t){return"/"+t},Le={},ee=function(s,a,n){let l=Promise.resolve();if(a&&a.length>0){let i=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),u=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));l=i(a.map(h=>{if(h=vt(h),h in Le)return;Le[h]=!0;const m=h.endsWith(".css"),x=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${x}`))return;const c=document.createElement("link");if(c.rel=m?"stylesheet":bt,m||(c.as="script"),c.crossOrigin="",c.href=h,u&&c.setAttribute("nonce",u),document.head.appendChild(c),m)return new Promise((f,b)=>{c.addEventListener("load",f),c.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(i){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=i,window.dispatchEvent(d),!d.defaultPrevented)throw i}return l.then(i=>{for(const d of i||[])d.status==="rejected"&&o(d.reason);return s().catch(o)})},yt=({config:t,isEditMode:s,onOpenSettings:a})=>{const[n,l]=U.useState(new Date),o=U.useMemo(()=>new Intl.DateTimeFormat("tr-TR",{hour:"2-digit",minute:"2-digit",second:t.showSeconds?"2-digit":void 0,hour12:t.format==="12h"}),[t.showSeconds,t.format]);U.useEffect(()=>{const m=setInterval(()=>{l(x=>{const c=new Date;return o.format(c)===o.format(x)?x:c})},1e3);return()=>clearInterval(m)},[o]);const i=U.useMemo(()=>{const m={geist:'"Geist Sans", system-ui, sans-serif',system:"system-ui, sans-serif",mono:'"Geist Mono", monospace',serif:"Georgia, serif"},x={sm:"text-4xl md:text-5xl",md:"text-5xl md:text-6xl",lg:"text-6xl md:text-8xl",xl:"text-7xl md:text-9xl"};return{fontFamily:m[t.fontFamily||"geist"],sizeClass:x[t.fontSize||"xl"]}},[t.fontFamily,t.fontSize]),d=U.useMemo(()=>new Intl.DateTimeFormat("tr-TR",{weekday:"long",year:"numeric",month:"long",day:"numeric"}),[]),u=()=>o.format(n),h=()=>d.format(n);return e.jsxs("div",{className:"text-center mb-8 animate-fade-in relative group",style:{fontFamily:i.fontFamily},children:[e.jsx("div",{className:`${i.sizeClass} font-thin tracking-tight drop-shadow-lg transition-all duration-700`,style:{color:"var(--theme-accent, white)"},children:u()}),t.showDate&&e.jsx("div",{className:"text-lg md:text-xl text-white/70 mt-2 font-light capitalize",children:h()})]})};function jt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"}))}const kt=r.forwardRef(jt);function Nt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const G=r.forwardRef(Nt);function Et({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6 9 12.75l4.286-4.286a11.948 11.948 0 0 1 4.306 6.43l.776 2.898m0 0 3.182-5.511m-3.182 5.51-5.511-3.181"}))}const St=r.forwardRef(Et);function Ct({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 18 9 11.25l4.306 4.306a11.95 11.95 0 0 1 5.814-5.518l2.74-1.22m0 0-5.94-2.281m5.94 2.28-2.28 5.941"}))}const Lt=r.forwardRef(Ct);function Rt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"}))}const $t=r.forwardRef(Rt);function Ot({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"}))}const _t=r.forwardRef(Ot);function It({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const At=r.forwardRef(It);function Bt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"}))}const Tt=r.forwardRef(Bt);function Pt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"}))}const Re=r.forwardRef(Pt);function Ft({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))}const Mt=r.forwardRef(Ft);function Dt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const zt=r.forwardRef(Dt);function Ut({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Wt=r.forwardRef(Ut);function Ht({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const $e=r.forwardRef(Ht);function Gt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m-3-2.818.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const Zt=r.forwardRef(Gt);function Kt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const Oe=r.forwardRef(Kt);function Yt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75"}))}const Vt=r.forwardRef(Yt);function qt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z"}))}const Jt=r.forwardRef(qt);function Xt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const ke=r.forwardRef(Xt);function Qt({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z"}))}const _e=r.forwardRef(Qt);function er({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const tr=r.forwardRef(er);function rr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const sr=r.forwardRef(rr);function ar({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const J=r.forwardRef(ar);function nr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"}))}const We=r.forwardRef(nr);function or({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"}))}const Ie=r.forwardRef(or);function lr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const ir=r.forwardRef(lr);function cr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"}))}const dr=r.forwardRef(cr);function ur({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const He=r.forwardRef(ur);function hr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const mr=r.forwardRef(hr);function xr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"}))}const fr=r.forwardRef(xr);function pr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"}))}const gr=r.forwardRef(pr);function wr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const Ne=r.forwardRef(wr),br=()=>{const[t,s]=r.useState(""),a=r.useRef(null),n=l=>{if(l.preventDefault(),!t.trim())return;const o=`https://www.google.com/search?q=${encodeURIComponent(t)}`,i=document.createElement("a");i.href=o,i.click()};return e.jsx("div",{className:"w-full max-w-2xl mx-auto mb-12 animate-slide-up group relative z-50",children:e.jsxs("form",{ref:a,onSubmit:n,className:"relative flex items-center",children:[e.jsx(ft,{className:"absolute left-4 w-6 h-6 text-white/70 transition-colors group-focus-within:text-white"}),e.jsx("input",{id:"search-query",name:"q",type:"text",value:t,onChange:l=>s(l.target.value),placeholder:"Web'de ara...",autoComplete:"off",className:"w-full bg-white/10 backdrop-blur-md border border-white/20 text-white text-lg placeholder-white/60 py-4 pl-14 pr-6 outline-none focus:bg-white/20 focus:border-[var(--theme-accent,white)] transition-all shadow-lg rounded-full"})]})})};function vr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",clipRule:"evenodd"}))}const yr=r.forwardRef(vr);function jr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{d:"M9.195 18.44c1.25.714 2.805-.189 2.805-1.629v-2.34l6.945 3.968c1.25.715 2.805-.188 2.805-1.628V8.69c0-1.44-1.555-2.343-2.805-1.628L12 11.029v-2.34c0-1.44-1.555-2.343-2.805-1.628l-7.108 4.061c-1.26.72-1.26 2.536 0 3.256l7.108 4.061Z"}))}const kr=r.forwardRef(jr);function Nr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const Ge=r.forwardRef(Nr);function Er({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{d:"M5.055 7.06C3.805 6.347 2.25 7.25 2.25 8.69v8.122c0 1.44 1.555 2.343 2.805 1.628L12 14.471v2.34c0 1.44 1.555 2.343 2.805 1.628l7.108-4.061c1.26-.72 1.26-2.536 0-3.256l-7.108-4.061C13.555 6.346 12 7.249 12 8.689v2.34L5.055 7.061Z"}))}const Ze=r.forwardRef(Er);function Sr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{fillRule:"evenodd",d:"M19.952 1.651a.75.75 0 0 1 .298.599V16.303a3 3 0 0 1-2.176 2.884l-1.32.377a2.553 2.553 0 1 1-1.403-4.909l2.311-.66a1.5 1.5 0 0 0 1.088-1.442V6.994l-9 2.572v9.737a3 3 0 0 1-2.176 2.884l-1.32.377a2.553 2.553 0 1 1-1.402-4.909l2.31-.66a1.5 1.5 0 0 0 1.088-1.442V5.25a.75.75 0 0 1 .544-.721l10.5-3a.75.75 0 0 1 .658.122Z",clipRule:"evenodd"}))}const ae=r.forwardRef(Sr);function Cr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{fillRule:"evenodd",d:"M6.75 5.25a.75.75 0 0 1 .75-.75H9a.75.75 0 0 1 .75.75v13.5a.75.75 0 0 1-.75.75H7.5a.75.75 0 0 1-.75-.75V5.25Zm7.5 0A.75.75 0 0 1 15 4.5h1.5a.75.75 0 0 1 .75.75v13.5a.75.75 0 0 1-.75.75H15a.75.75 0 0 1-.75-.75V5.25Z",clipRule:"evenodd"}))}const Ke=r.forwardRef(Cr);function Lr({title:t,titleId:s,...a},n){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},a),t?r.createElement("title",{id:s},t):null,r.createElement("path",{fillRule:"evenodd",d:"M4.5 5.653c0-1.427 1.529-2.33 2.779-1.643l11.54 6.347c1.295.712 1.295 2.573 0 3.286L7.28 19.99c-1.25.687-2.779-.217-2.779-1.643V5.653Z",clipRule:"evenodd"}))}const Ye=r.forwardRef(Lr),Ve="gtab_shortcuts",qe="gtab_layout",Je="gtab_tasks",Xe="gtab_bg_config",Qe="gtab_view_state",et="gtab_clock_config",tt="gtab_card_config",rt="gtab_stocks",Q=["https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=70&w=1600&auto=format&fit=crop","https://images.unsplash.com/photo-1614850523459-c2f4c699c52e?q=70&w=1600&auto=format&fit=crop","https://images.unsplash.com/photo-1506259091721-347f7c3bbcbf?q=70&w=1600&auto=format&fit=crop","https://images.unsplash.com/photo-1485470733090-0aae1788d5af?q=70&w=1600&auto=format&fit=crop","https://images.unsplash.com/photo-1550684848-fac1c5b4e853?q=70&w=1600&auto=format&fit=crop","https://images.unsplash.com/photo-1604871000636-074fa5117945?q=70&w=1600&auto=format&fit=crop","https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=70&w=1600&auto=format&fit=crop"],Ae=[{id:"1",title:"Google",url:"https://google.com",category:q.OTHER,iconType:"favicon"},{id:"2",title:"YouTube",url:"https://youtube.com",category:q.ENTERTAINMENT,iconType:"favicon"},{id:"3",title:"GitHub",url:"https://github.com",category:q.DEV,iconType:"favicon"},{id:"4",title:"Gmail",url:"https://mail.google.com",category:q.WORK,iconType:"favicon"},{id:"5",title:"Google Drive",url:"https://drive.google.com",category:q.WORK,iconType:"favicon"},{id:"6",title:"Twitter",url:"https://twitter.com",category:q.SOCIAL,iconType:"favicon"}],ne=[{id:"clock",visible:!0,order:0,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"search",visible:!0,order:1,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"tasks",visible:!0,order:2,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"categories",visible:!0,order:3,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"shortcuts",visible:!0,order:4,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"gmail",visible:!1,order:5,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"calendar",visible:!1,order:6,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"stocks",visible:!1,order:7,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20},{id:"google-tasks",visible:!1,order:8,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20,widthPx:350,heightPx:500},{id:"google-keep",visible:!1,order:9,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20,widthPx:400,heightPx:600},{id:"weather",visible:!1,order:10,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20,widthPx:280,heightPx:320},{id:"pomodoro",visible:!1,order:11,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20,widthPx:280,heightPx:380},{id:"spotify",visible:!1,order:12,opacity:10,glassEffect:!0,showBorder:!0,borderOpacity:20,widthPx:280,heightPx:400}],fe={format:"24h",showSeconds:!1,showDate:!0,fontFamily:"geist",fontSize:"xl"},zs={wrapperBg:"#0f172a",overlayBg:"rgba(0,0,0,0.3)",accentColor:"#3b82f6",glassBorder:"rgba(255,255,255,0.1)",glassBg:"rgba(255,255,255,0.05)",menuBg:"rgba(15,23,42,0.95)",menuBorder:"rgba(255,255,255,0.1)",textColor:"#ffffff"},pe={bgOpacity:10,shape:"rounded",size:"md",alignment:"center",font:"geist",iconSize:"md",cardWidth:100,glowEnabled:!0,gridGapX:16,gridGapY:16,gridCols:6,showCardBorder:!0,cardBorderOpacity:10,menuOpacity:95,menuBorderOpacity:10},Rr=()=>{try{const t=localStorage.getItem(Ve);return t?JSON.parse(t):Ae}catch(t){return console.error("Failed to load shortcuts",t),Ae}},$r=t=>{try{localStorage.setItem(Ve,JSON.stringify(t))}catch(s){console.error("Failed to save shortcuts",s)}},Or=()=>{try{const t=localStorage.getItem(qe);if(!t)return ne;let s=JSON.parse(t);return ne.forEach(a=>{s.some(l=>l.id===a.id)||s.push({...a})}),s.map(a=>({opacity:10,glassEffect:a.glassEffect??!0,showBorder:a.showBorder??!0,borderOpacity:a.borderOpacity??20,...a}))}catch{return ne}},_r=t=>{try{localStorage.setItem(qe,JSON.stringify(t))}catch(s){console.error("Failed to save layout",s)}},Ir=()=>{try{const t=localStorage.getItem(Je);return t?JSON.parse(t):[]}catch{return[]}},Ar=t=>{try{localStorage.setItem(Je,JSON.stringify(t))}catch(s){console.error("Failed to save tasks",s)}},Be=()=>{try{const t=localStorage.getItem(Xe);return t?JSON.parse(t):{type:"random",value:""}}catch{return{type:"random",value:""}}},Br=t=>{try{localStorage.setItem(Xe,JSON.stringify(t))}catch(s){console.error("Failed to save background",s)}},Tr=()=>{try{const t=localStorage.getItem(Qe);return t?JSON.parse(t):{category:"All",profile:"All"}}catch{return{category:"All",profile:"All"}}},Pr=t=>{try{localStorage.setItem(Qe,JSON.stringify(t))}catch(s){console.error("Failed to save view state",s)}},Fr=()=>{try{const t=localStorage.getItem(et);return t?{...fe,...JSON.parse(t)}:fe}catch{return fe}},Mr=t=>{try{localStorage.setItem(et,JSON.stringify(t))}catch(s){console.error("Failed to save clock config",s)}},Dr=()=>{try{const t=localStorage.getItem(tt);return t?{...pe,...JSON.parse(t)}:pe}catch{return pe}},zr=t=>{try{localStorage.setItem(tt,JSON.stringify(t))}catch(s){console.error("Failed to save card config",s)}},st=()=>{try{const t=localStorage.getItem(rt);return t?JSON.parse(t):{apiKey:"4QO8AQO0Y6B6NIPI",symbols:["AAPL","MSFT","GOOGL"]}}catch{return{apiKey:"4QO8AQO0Y6B6NIPI",symbols:["AAPL","MSFT","GOOGL"]}}},Us=t=>{try{localStorage.setItem(rt,JSON.stringify(t))}catch(s){console.error("Failed to save stocks config",s)}},Ws=t=>{const s=new Blob([JSON.stringify(t,null,2)],{type:"application/json"}),a=URL.createObjectURL(s),n=document.createElement("a");n.href=a,n.download=`gtab-backup-${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(a)},Hs=()=>new Promise((t,s)=>{const a=document.createElement("input");a.type="file",a.accept=".json",a.onchange=n=>{var i;const l=(i=n.target.files)==null?void 0:i[0];if(!l){s(new Error("Dosya seçilmedi"));return}const o=new FileReader;o.onload=d=>{var u;try{const h=JSON.parse((u=d.target)==null?void 0:u.result);Array.isArray(h)?t(h):s(new Error("Geçersiz format"))}catch{s(new Error("Dosya okunamadı"))}},o.readAsText(l)},document.body.appendChild(a),a.click(),document.body.removeChild(a)}),Ur=()=>{const[t,s]=r.useState(()=>Ir()),[a,n]=r.useState("");r.useEffect(()=>{Ar(t)},[t]);const l=d=>{if(d.preventDefault(),!a.trim())return;const u={id:crypto.randomUUID(),text:a,completed:!1,createdAt:Date.now()};s(h=>[u,...h]),n("")},o=d=>{s(u=>{const h=u.findIndex(x=>x.id===d);if(h===-1)return u;const m=[...u];return m[h]={...m[h],completed:!m[h].completed},m})},i=d=>{s(u=>u.filter(h=>h.id!==d))};return e.jsxs("div",{className:"flex flex-col h-full min-w-[200px]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4 text-white/90",children:[e.jsx(ke,{className:"w-5 h-5 text-blue-400"}),e.jsx("span",{className:"font-semibold text-sm tracking-wide",children:"Yapılacaklar"})]}),e.jsxs("form",{onSubmit:l,className:"mb-4 flex gap-2",children:[e.jsx("input",{type:"text",value:a,onChange:d=>n(d.target.value),placeholder:"Yeni görev...",className:"flex-1 bg-white/5 border border-white/10 rounded-xl px-4 py-2 text-sm text-white placeholder-white/20 focus:ring-1 focus:ring-blue-500/50 outline-none transition-all"}),e.jsx("button",{type:"submit",disabled:!a.trim(),className:"bg-blue-600 hover:bg-blue-500 text-white p-2 rounded-xl transition-all disabled:opacity-50 disabled:grayscale",children:e.jsx(J,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto space-y-1 custom-scrollbar pr-1",children:t.length===0?e.jsx("div",{className:"text-center py-10 text-white/10 text-sm italic",children:"Henüz görev eklenmemiş."}):t.map(d=>e.jsxs("div",{className:"group flex items-center gap-3 p-2 rounded-xl hover:bg-white/5 transition-all",children:[e.jsx("button",{onClick:()=>o(d.id),className:`transition-all shrink-0 ${d.completed?"text-green-400":"text-white/20 hover:text-white/40"}`,children:d.completed?e.jsx(Ge,{className:"w-6 h-6"}):e.jsx(ze,{className:"w-6 h-6"})}),e.jsx("span",{className:`flex-1 text-sm text-white/80 transition-all ${d.completed?"line-through opacity-30":""}`,children:d.text}),e.jsx("button",{onClick:()=>i(d.id),className:"opacity-0 group-hover:opacity-100 p-1.5 text-white/10 hover:text-red-400 transition-all shrink-0",children:e.jsx(He,{className:"w-4 h-4"})})]},d.id))})]})},le=async(t=!1,s=!1)=>{var h,m,x;const a=chrome.runtime.getManifest(),n=(h=a.oauth2)==null?void 0:h.client_id,l=((x=(m=a.oauth2)==null?void 0:m.scopes)==null?void 0:x.join(" "))||"openid email profile";let o=chrome.identity.getRedirectURL();o.endsWith("/")||(o+="/");const i=t?s?"consent":"select_account":"none",u={url:`https://accounts.google.com/o/oauth2/v2/auth?client_id=${n}&response_type=token&redirect_uri=${encodeURIComponent(o)}&scope=${encodeURIComponent(l)}&prompt=${i}`,interactive:t};return t||(u.abortOnLoadForNonInteractive=!0,u.timeoutMsForNonInteractive=3e3),new Promise((c,f)=>{chrome.identity.launchWebAuthFlow(u,b=>{if(chrome.runtime.lastError){f(new Error(chrome.runtime.lastError.message));return}if(!b){f(new Error("Kullanıcı girişi iptal edildi veya yönlendirme başarısız."));return}const p=new URL(b).hash.substring(1),g=new URLSearchParams(p),k=g.get("error");if(k){f(t?new Error(`Google Hatası: ${k}`):new Error("User interaction required"));return}const v=g.get("access_token");v?c(v):f(new Error("Bağlantı sağlandı ancak access_token bulunamadı."))})})},Wr=async t=>{var a;const s=await fetch("https://gmail.googleapis.com/gmail/v1/users/me/messages?q=is:unread&maxResults=5",{headers:{Authorization:`Bearer ${t}`}});if(!s.ok){const n=await s.json().catch(()=>({}));throw new Error(((a=n.error)==null?void 0:a.message)||`Gmail API Error: ${s.statusText}`)}return s.json()},Hr=async(t,s)=>{var u;const n=`https://gmail.googleapis.com/gmail/v1/users/me/messages/${s}?format=metadata&metadataHeaders=From&metadataHeaders=Subject&metadataHeaders=Date`,l=await fetch(n,{headers:{Authorization:`Bearer ${t}`}});if(!l.ok)throw new Error(`Gmail API Error: ${l.statusText}`);const o=await l.json(),i=((u=o.payload)==null?void 0:u.headers)??[],d=h=>{var m;return((m=i.find(x=>x.name.toLowerCase()===h.toLowerCase()))==null?void 0:m.value)||""};return{id:o.id,snippet:"",subject:d("subject"),from:d("from"),date:d("date"),internalDate:o.internalDate??"0"}},Gr=async t=>{var n;const s=new Date().toISOString(),a=await fetch(`https://www.googleapis.com/calendar/v3/calendars/primary/events?timeMin=${s}&maxResults=5&orderBy=startTime&singleEvents=true`,{headers:{Authorization:`Bearer ${t}`}});if(!a.ok){const l=await a.json().catch(()=>({}));throw new Error(((n=l.error)==null?void 0:n.message)||`Calendar API Error: ${a.statusText}`)}return a.json()},Zr=()=>{const[t,s]=r.useState([]),[a,n]=r.useState(0),[l,o]=r.useState(!0),i=t[a],d=async()=>{try{const c=await le(!0),p=(await(await fetch("https://www.googleapis.com/oauth2/v2/userinfo",{headers:{Authorization:`Bearer ${c}`}})).json()).email,g=t.findIndex(S=>S.email===p);if(g!==-1){n(g),h(g,c);return}const k={email:p,token:c,messages:[],loading:!0,error:null},v=[...t,k];s(v);const y=v.length-1;n(y),h(y,c);const E=v.map(S=>S.email);localStorage.setItem("gtab_gmail_accounts",JSON.stringify(E))}catch(c){console.error("Failed to add account",c)}},u=c=>{const f=t.filter((p,g)=>g!==c);s(f),a>=f.length&&n(Math.max(0,f.length-1));const b=f.map(p=>p.email);localStorage.setItem("gtab_gmail_accounts",JSON.stringify(b))},h=async(c,f)=>{s(b=>b.map((p,g)=>g===c?{...p,loading:!0,error:null}:p));try{const b=t[c]||{token:f},p=f||b.token||await le(!1),g=await Wr(p);let k=[];g.messages&&g.messages.length>0&&(k=await Promise.all(g.messages.map(v=>Hr(p,v.id)))),s(v=>{const y=v.map((N,C)=>C===c?{...N,token:p,messages:k,loading:!1,error:null}:N);let E=0,S=a;return y.forEach((N,C)=>{if(N.messages.length>0){const O=Math.max(...N.messages.map(j=>parseInt(j.internalDate)));O>E&&(E=O,S=C)}}),S!==a&&n(S),y})}catch{s(p=>p.map((g,k)=>k===c?{...g,loading:!1,error:"Yüklenemedi"}:g))}},m=r.useCallback(async()=>{t.forEach((c,f)=>h(f))},[t.length]);r.useEffect(()=>{(async()=>{const b=localStorage.getItem("gtab_gmail_accounts");if(b)try{const p=JSON.parse(b);if(p.length>0){const g=p.map(k=>({email:k,token:"",messages:[],loading:!0,error:null}));s(g),p.forEach((k,v)=>h(v))}}catch(p){console.error("Failed to parse stored accounts",p)}o(!1)})();const f=setInterval(m,120*1e3);return()=>clearInterval(f)},[]);const x=c=>{const f=c.match(/^(.*?)\s*<.*>$/);return f?f[1]:c};return t.length===0&&!l?e.jsx("div",{className:"w-full h-full animate-slide-up",children:e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl p-6 shadow-2xl flex flex-col items-center justify-center text-center gap-4 h-full",children:[e.jsx(Vt,{className:"w-8 h-8 text-red-400 opacity-50"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-white",children:"Gmail"}),e.jsx("p",{className:"text-xs text-white/40 mt-1",children:"Okunmamış e-postalarınızı görmek için hesap ekleyin."})]}),e.jsxs("button",{onClick:d,className:"w-full max-w-[200px] py-2 bg-red-600 hover:bg-red-500 text-white text-xs font-medium rounded-lg transition-colors flex items-center justify-center gap-2",children:[e.jsx(J,{className:"w-4 h-4"})," Hesap Ekle"]})]})}):e.jsx("div",{className:"w-full h-full animate-slide-up",children:e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl overflow-hidden shadow-2xl flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center gap-1 p-1 bg-white/5 border-b border-white/10 overflow-x-auto no-scrollbar",children:[t.map((c,f)=>e.jsxs("div",{className:"relative group shrink-0",children:[e.jsxs("button",{onClick:()=>n(f),className:`px-3 py-1.5 rounded-lg text-[10px] font-medium transition-all flex items-center gap-2 ${f===a?"bg-red-500/20 text-red-400 border border-red-500/30":"text-white/40 hover:bg-white/5 hover:text-white/60 border border-transparent"}`,title:c.email,children:[e.jsx(mr,{className:"w-3 h-3"}),e.jsx("span",{className:"max-w-[80px] truncate",children:c.email.split("@")[0]}),c.messages.length>0&&e.jsx("span",{className:"bg-red-500 text-white text-[8px] px-1 rounded-full",children:c.messages.length})]}),t.length>1&&e.jsx("button",{onClick:b=>{b.stopPropagation(),u(f)},className:"absolute -top-1 -right-1 bg-black text-white rounded-full p-0.5 opacity-0 group-hover:opacity-100 transition-opacity border border-white/10",children:e.jsx(Ne,{className:"w-2 h-2"})})]},c.email)),e.jsx("button",{onClick:d,className:"p-1.5 rounded-lg text-white/30 hover:bg-white/5 hover:text-white/60 transition-all shrink-0",title:"Hesap Ekle",children:e.jsx(J,{className:"w-3 h-3"})}),e.jsx("div",{className:"flex-1"}),e.jsx("button",{onClick:()=>h(a),className:"p-1.5 text-white/30 hover:text-red-300 transition-colors shrink-0",title:"Yenile",children:e.jsx(G,{className:`w-3 h-3 ${i!=null&&i.loading?"animate-spin":""}`})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1 custom-scrollbar",children:i!=null&&i.error?e.jsxs("div",{className:"text-center py-6 text-red-400/60 text-xs italic flex flex-col items-center gap-2",children:[e.jsx("span",{children:i.error}),e.jsx("button",{onClick:()=>h(a),className:"text-white/40 hover:text-white underline",children:"Yeniden Dene"})]}):i!=null&&i.loading&&(i==null?void 0:i.messages.length)===0?e.jsx("div",{className:"text-center py-6 text-white/20 text-xs italic",children:"Yükleniyor..."}):(i==null?void 0:i.messages.length)===0?e.jsx("div",{className:"text-center py-6 text-white/20 text-xs italic",children:"Okunmamış ileti yok."}):i==null?void 0:i.messages.map(c=>e.jsxs("a",{href:`https://mail.google.com/mail/#inbox/${c.id}`,target:"_blank",rel:"noopener noreferrer",className:"group flex flex-col gap-0.5 p-2 rounded-md hover:bg-white/5 transition-colors cursor-pointer border border-transparent hover:border-white/5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"flex-1 text-xs font-bold text-white/90 truncate",children:x(c.from)}),e.jsx(Se,{className:"w-2.5 h-2.5 text-white/0 group-hover:text-white/20 transition-all"})]}),e.jsx("span",{className:"text-[10px] text-white/70 truncate",children:c.subject||"(Konu yok)"}),!1]},c.id))})]})})},Kr=()=>{const[t,s]=r.useState([]),[a,n]=r.useState(!0),[l,o]=r.useState(null),[i,d]=r.useState(!1),u=async(x=!1)=>{n(!0),o(null);try{const c=await le(x);d(!0);const f=await Gr(c);s(f.items||[])}catch(c){c.message!=="No token"&&!c.message.includes("User interaction required")&&(o("Etkinlikler yüklenemedi."),console.error(c)),d(!1)}finally{n(!1)}};r.useEffect(()=>{u(!1)},[]);const h=(x,c)=>x?new Date(x).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):c?"Tüm gün":"",m=(x,c)=>{const f=new Date().toDateString();return x?new Date(x).toDateString()===f:c?new Date(c).toDateString()===f:!1};return!i&&!a?e.jsx("div",{className:"w-full h-full animate-slide-up",children:e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl p-6 shadow-2xl flex flex-col items-center justify-center text-center gap-4 h-full",children:[e.jsx(Re,{className:"w-8 h-8 text-blue-400 opacity-50"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-white",children:"Google Takvim"}),e.jsx("p",{className:"text-xs text-white/40 mt-1",children:"Etkinliklerinizi görmek için giriş yapın."})]}),e.jsx("button",{onClick:()=>u(!0),className:"w-full max-w-[200px] py-2 bg-blue-600 hover:bg-blue-500 text-white text-xs font-medium rounded-lg transition-colors",children:"Google ile Bağlan"})]})}):e.jsx("div",{className:"w-full h-full animate-slide-up",children:e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl overflow-hidden shadow-2xl flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-white/10 bg-white/5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(Re,{className:"w-4 h-4 text-blue-400"}),e.jsx("span",{className:"font-medium text-sm",children:"Takvim"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>u(!1),className:"text-white/30 hover:text-blue-300 transition-colors",title:"Yenile",children:e.jsx(G,{className:`w-3 h-3 ${a?"animate-spin":""}`})}),e.jsx("a",{href:"https://calendar.google.com",target:"_blank",rel:"noopener noreferrer",className:"text-white/30 hover:text-blue-300 transition-colors",title:"Google Takvim'i Aç",children:e.jsx(Se,{className:"w-3 h-3"})})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1 custom-scrollbar",children:l?e.jsx("div",{className:"text-center py-6 text-red-400/60 text-xs italic",children:l}):a&&t.length===0?e.jsx("div",{className:"text-center py-6 text-white/20 text-xs italic",children:"Yükleniyor..."}):t.length===0?e.jsx("div",{className:"text-center py-6 text-white/20 text-xs italic",children:"Yaklaşan etkinlik yok."}):t.map(x=>e.jsxs("div",{className:"group flex flex-col gap-0.5 p-2 rounded-md hover:bg-white/5 transition-colors",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"flex-1 text-xs font-medium text-white/90 truncate",children:x.summary}),e.jsx("span",{className:`text-[10px] shrink-0 ${m(x.start.dateTime,x.start.date)?"text-blue-400 font-bold":"text-white/40"}`,children:h(x.start.dateTime,x.start.date)})]}),x.location&&e.jsx("span",{className:"text-[10px] text-white/30 truncate",children:x.location})]},x.id))})]})})},Yr=async(t,s)=>{const a=t.toUpperCase().replace("/",""),n=s||"4QO8AQO0Y6B6NIPI";try{const l=await fetch(`https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=${a}&apikey=${n}`);if(!l.ok)throw new Error(`Alpha Vantage API Error for ${a}`);const i=(await l.json())["Global Quote"];return!i||Object.keys(i).length===0?(console.warn(`Alpha Vantage failed for ${a}, trying Yahoo fallback...`),Te(a)):{c:parseFloat(i["05. price"]),d:parseFloat(i["09. change"]),dp:parseFloat(i["10. change percent"].replace("%","")),h:parseFloat(i["03. high"]),l:parseFloat(i["04. low"]),o:parseFloat(i["02. open"]),pc:parseFloat(i["08. previous close"]),t:Math.floor(Date.now()/1e3)}}catch(l){return console.error("Stock Fetch Error:",l),Te(a)}},Te=async t=>{var d,u;const n=(u=(d=(await(await fetch(`https://query1.finance.yahoo.com/v8/finance/chart/${t}?range=2d&interval=1d`)).json()).chart)==null?void 0:d.result)==null?void 0:u[0];if(!n||!n.meta)throw new Error(`Sembol bulunamadı: ${t}`);const l=n.meta,o=l.regularMarketPrice,i=l.previousClose||o;return{c:o,d:o-i,dp:(o-i)/i*100,h:l.regularMarketDayHigh||o,l:l.regularMarketDayLow||o,o,pc:i,t:Math.floor(Date.now()/1e3)}},Vr=()=>{const[t,s]=r.useState({}),[a,n]=r.useState(!0),[l,o]=r.useState(null),{apiKey:i,symbols:d}=st(),u=async()=>{n(!0),o(null);try{const h={};await Promise.all(d.map(async m=>{try{const x=await Yr(m,i);h[m]=x}catch(x){console.error(`Failed to fetch ${m}`,x)}})),s(h)}catch(h){o("Hisse bilgileri yüklenemedi."),console.error(h)}finally{n(!1)}};return r.useEffect(()=>{u();const h=setInterval(u,1800*1e3);return()=>clearInterval(h)},[d.join(","),i]),e.jsx("div",{className:"w-full h-full animate-slide-up",children:e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl overflow-hidden shadow-2xl flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-white/10 bg-white/5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(Mt,{className:"w-4 h-4 text-green-400"}),e.jsx("span",{className:"font-medium text-sm",children:"Borsa"})]}),e.jsx("button",{onClick:u,className:"text-white/30 hover:text-green-300 transition-colors",title:"Yenile",children:e.jsx(G,{className:`w-3 h-3 ${a?"animate-spin":""}`})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1 custom-scrollbar",children:l?e.jsx("div",{className:"text-center py-6 text-red-400/60 text-xs italic",children:l}):a&&Object.keys(t).length===0?e.jsx("div",{className:"text-center py-6 text-white/20 text-xs italic",children:"Yükleniyor..."}):d.length===0?e.jsx("div",{className:"text-center py-6 text-white/20 text-xs italic",children:"Takip edilen hisse yok."}):d.map(h=>{const m=t[h];if(!m)return null;const x=m.d>=0;return e.jsxs("div",{className:"group flex items-center justify-between p-2 rounded-md hover:bg-white/5 transition-colors",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-xs font-bold text-white/90",children:h}),e.jsx("span",{className:"text-[10px] text-white/40",children:"Yahoo Finance"})]}),e.jsxs("div",{className:"flex flex-col items-end",children:[e.jsxs("span",{className:"text-xs font-medium text-white",children:["$",m.c.toFixed(2)]}),e.jsxs("div",{className:`flex items-center gap-0.5 text-[10px] ${x?"text-green-400":"text-red-400"}`,children:[x?e.jsx(Lt,{className:"w-2.5 h-2.5"}):e.jsx(St,{className:"w-2.5 h-2.5"}),e.jsxs("span",{children:[x?"+":"",m.d.toFixed(2)," (",m.dp.toFixed(2),"%)"]})]})]})]},h)})})]})})},qr=async t=>{var n;const s=await fetch("https://tasks.googleapis.com/tasks/v1/users/@me/lists?maxResults=20",{headers:{Authorization:`Bearer ${t}`}});if(!s.ok){const l=await s.json().catch(()=>({})),o=((n=l==null?void 0:l.error)==null?void 0:n.message)||"";throw s.status===401||s.status===403?o.toLowerCase().includes("disabled")||o.toLowerCase().includes("not been used")?new Error("API_NOT_ENABLED"):new Error("REAUTH_REQUIRED"):new Error(`Tasks API: ${s.statusText}`)}return(await s.json()).items||[]},ge=async(t,s)=>{const a=await fetch(`https://tasks.googleapis.com/tasks/v1/lists/${s}/tasks?showCompleted=false&showHidden=false&maxResults=50`,{headers:{Authorization:`Bearer ${t}`}});if(!a.ok)throw new Error(`Tasks API: ${a.statusText}`);return((await a.json()).items||[]).filter(l=>l.title)},Jr=async(t,s,a)=>{await fetch(`https://tasks.googleapis.com/tasks/v1/lists/${s}/tasks/${a}`,{method:"PATCH",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({status:"completed"})})},Xr=async(t,s,a)=>{await fetch(`https://tasks.googleapis.com/tasks/v1/lists/${s}/tasks`,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({title:a})})},Qr=()=>{const[t,s]=r.useState(null),[a,n]=r.useState([]),[l,o]=r.useState(null),[i,d]=r.useState([]),[u,h]=r.useState(!0),[m,x]=r.useState(null),[c,f]=r.useState(""),[b,p]=r.useState(!1),[g,k]=r.useState(!1),[v,y]=r.useState(new Set),E=a.find(j=>j.id===l),S=r.useCallback(async(j=!1,B=!1)=>{var P;h(!0),x(null);try{const _=await le(j,B);s(_);const w=await qr(_);n(w);const F=l||((P=w[0])==null?void 0:P.id);if(F){o(F);const A=await ge(_,F);d(A)}}catch(_){_.message==="REAUTH_REQUIRED"||_.message==="API_NOT_ENABLED"?(s(null),x(_.message)):x(_.message||"Yüklenemedi")}finally{h(!1)}},[l]),N=async j=>{if(k(!1),o(j),!!t){h(!0);try{const B=await ge(t,j);d(B)}catch(B){x(B.message||"Yüklenemedi")}finally{h(!1)}}},C=async j=>{if(!(!t||!l)){y(B=>new Set(B).add(j));try{await Jr(t,l,j),setTimeout(()=>{d(B=>B.filter(P=>P.id!==j)),y(B=>{const P=new Set(B);return P.delete(j),P})},400)}catch{y(B=>{const P=new Set(B);return P.delete(j),P})}}},O=async()=>{if(!(!t||!l||!c.trim())){p(!0);try{await Xr(t,l,c.trim()),f("");const j=await ge(t,l);d(j)}catch(j){x(j.message||"Eklenemedi")}finally{p(!1)}}};if(r.useEffect(()=>{S(!1)},[]),u&&i.length===0)return e.jsx("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex items-center justify-center",children:e.jsx("div",{className:"text-white/30 text-xs",children:"Yükleniyor..."})});if(m&&!t){const j=m==="API_NOT_ENABLED";return e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col items-center justify-center gap-3 p-4",children:[e.jsx(ke,{className:"w-8 h-8 text-blue-400 opacity-50"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm font-medium text-white",children:"Google Tasks"}),e.jsx("p",{className:"text-xs text-white/40 mt-1",children:j?"Tasks API disabled. Google Cloud Console → APIs & Services → Enable Tasks API.":"Görevlerinizi görmek için giriş yapın."})]}),!j&&e.jsx("button",{onClick:()=>S(!0,m==="REAUTH_REQUIRED"),className:"px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white text-xs font-medium rounded-lg transition-colors",children:"Google ile Giriş Yap"})]})}return e.jsxs("div",{className:"w-full h-full flex flex-col bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-white/10 bg-white/5 shrink-0",children:[e.jsx(ke,{className:"w-3.5 h-3.5 text-blue-400 shrink-0"}),e.jsxs("button",{onClick:()=>k(j=>!j),className:"flex-1 flex items-center gap-1 text-left text-xs font-medium text-white/80 hover:text-white transition-colors",children:[e.jsx("span",{className:"truncate",children:(E==null?void 0:E.title)||"Görevler"}),e.jsx(Wt,{className:`w-3 h-3 shrink-0 transition-transform ${g?"rotate-180":""}`})]}),e.jsx("button",{onClick:()=>S(!1),className:"p-1 text-white/30 hover:text-blue-300 transition-colors",title:"Yenile",children:e.jsx(G,{className:`w-3.5 h-3.5 ${u?"animate-spin":""}`})})]}),g&&e.jsx("div",{className:"absolute z-10 mt-9 left-0 right-0 bg-black/90 border border-white/10 rounded-b-xl overflow-hidden shadow-xl",children:a.map(j=>e.jsx("button",{onClick:()=>N(j.id),className:`w-full text-left px-3 py-2 text-xs transition-colors ${j.id===l?"text-blue-400 bg-blue-500/10":"text-white/60 hover:bg-white/5 hover:text-white/90"}`,children:j.title},j.id))}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-0.5 custom-scrollbar",onClick:()=>k(!1),children:[m&&e.jsx("div",{className:"text-center py-4 text-red-400/60 text-xs",children:m}),!u&&i.length===0&&!m&&e.jsx("div",{className:"text-center py-8 text-white/20 text-xs italic",children:"Tamamlanmış görev yok."}),i.map(j=>e.jsxs("div",{className:`flex items-start gap-2 px-2 py-1.5 rounded-lg hover:bg-white/5 group transition-all ${v.has(j.id)?"opacity-40 scale-95":"opacity-100"}`,children:[e.jsx("button",{onClick:()=>C(j.id),className:"mt-0.5 shrink-0 text-white/20 hover:text-blue-400 transition-colors",children:v.has(j.id)?e.jsx(Ge,{className:"w-4 h-4 text-blue-400"}):e.jsx(ze,{className:"w-4 h-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-white/80 leading-tight",children:j.title}),j.notes&&e.jsx("p",{className:"text-[10px] text-white/30 mt-0.5 line-clamp-1",children:j.notes}),j.due&&e.jsx("p",{className:"text-[10px] text-blue-400/60 mt-0.5",children:new Date(j.due).toLocaleDateString("tr-TR",{day:"numeric",month:"short"})})]})]},j.id))]}),e.jsx("div",{className:"p-2 border-t border-white/10 shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2 bg-white/5 rounded-lg px-2 py-1.5 border border-white/5 focus-within:border-blue-500/40 transition-colors",children:[e.jsx(J,{className:"w-3.5 h-3.5 text-white/20 shrink-0"}),e.jsx("input",{type:"text",value:c,onChange:j=>f(j.target.value),onKeyDown:j=>j.key==="Enter"&&O(),placeholder:"Görev ekle...",className:"flex-1 bg-transparent text-xs text-white/80 placeholder-white/20 outline-none"}),b&&e.jsx(G,{className:"w-3 h-3 text-white/20 animate-spin shrink-0"})]})})]})},at="gtab_quick_notes",es=()=>{try{const t=localStorage.getItem(at);return t?JSON.parse(t):[]}catch{return[]}},ts=t=>{localStorage.setItem(at,JSON.stringify(t))},rs=()=>{const[t,s]=r.useState(es),[a,n]=r.useState(""),[l,o]=r.useState(!1),i=r.useRef(null);r.useEffect(()=>{ts(t)},[t]),r.useEffect(()=>{l&&i.current&&i.current.focus()},[l]);const d=()=>{const m=a.trim();if(!m){o(!1);return}const x={id:crypto.randomUUID(),text:m,createdAt:Date.now()};s(c=>[x,...c]),n(""),o(!1)},u=m=>{s(x=>x.filter(c=>c.id!==m))},h=m=>{const x=new Date(m),c=new Date,f=c.getTime()-m;return f<6e4?"Az önce":f<36e5?`${Math.floor(f/6e4)}d önce`:x.toDateString()===c.toDateString()?x.toLocaleTimeString("tr-TR",{hour:"2-digit",minute:"2-digit"}):x.toLocaleDateString("tr-TR",{day:"numeric",month:"short"})};return e.jsxs("div",{className:"w-full h-full flex flex-col bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-white/10 bg-white/5 shrink-0",children:[e.jsx(Oe,{className:"w-3.5 h-3.5 text-yellow-400 shrink-0"}),e.jsx("span",{className:"flex-1 text-xs font-medium text-white/80",children:"Notlar"}),e.jsx("button",{onClick:()=>o(!0),className:"p-1 text-white/30 hover:text-yellow-300 transition-colors",title:"Not ekle",children:e.jsx(J,{className:"w-3.5 h-3.5"})})]}),l&&e.jsx("div",{className:"p-2 border-b border-white/10 shrink-0",children:e.jsx("textarea",{ref:i,value:a,onChange:m=>n(m.target.value),onKeyDown:m=>{m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),d()),m.key==="Escape"&&(o(!1),n(""))},onBlur:d,placeholder:"Not yaz... (Enter ile kaydet)",rows:3,className:"w-full bg-white/5 border border-yellow-400/20 rounded-lg px-2 py-1.5 text-xs text-white/80 placeholder-white/20 outline-none focus:border-yellow-400/40 resize-none transition-colors"})}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-1.5 custom-scrollbar",children:[t.length===0&&!l&&e.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3 text-center",children:[e.jsx(Oe,{className:"w-8 h-8 text-yellow-400/20"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-white/40",children:"Henüz not yok"}),e.jsx("p",{className:"text-[10px] text-white/20 mt-0.5",children:"+ butonuna bas veya tıkla"})]})]}),t.map(m=>e.jsxs("div",{className:"group relative bg-white/5 hover:bg-white/8 border border-white/5 hover:border-yellow-400/20 rounded-lg px-2.5 py-2 transition-all",children:[e.jsx("p",{className:"text-xs text-white/80 whitespace-pre-wrap leading-relaxed pr-4",children:m.text}),e.jsx("p",{className:"text-[10px] text-white/25 mt-1",children:h(m.createdAt)}),e.jsx("button",{onClick:()=>u(m.id),className:"absolute top-1.5 right-1.5 p-0.5 text-white/0 group-hover:text-white/30 hover:!text-red-400 transition-colors",children:e.jsx(He,{className:"w-3 h-3"})})]},m.id))]})]})},ss={0:"☀️",1:"🌤️",2:"⛅",3:"☁️",45:"🌫️",48:"🌫️",51:"🌦️",53:"🌦️",55:"🌦️",61:"🌧️",63:"🌧️",65:"🌧️",71:"🌨️",73:"🌨️",75:"🌨️",77:"🌨️",80:"🌦️",81:"🌦️",82:"🌦️",85:"🌨️",86:"🌨️",95:"⛈️",96:"⛈️",99:"⛈️"},as={0:"Açık",1:"Açık",2:"Parçalı bulutlu",3:"Bulutlu",45:"Sisli",48:"Sisli",51:"Hafif çisenti",53:"Çisenti",55:"Yoğun çisenti",61:"Hafif yağmur",63:"Yağmur",65:"Yoğun yağmur",71:"Hafif kar",73:"Kar",75:"Yoğun kar",77:"Kar taneleri",80:"Sağanak",81:"Sağanak",82:"Yoğun sağanak",85:"Kar sağanağı",86:"Kar sağanağı",95:"Fırtına",96:"Fırtına",99:"Fırtına"},ns=t=>ss[t]??"🌡️",os=t=>as[t]??"Bilinmiyor",we="gtab_weather_v2",Pe=1800*1e3,ls=()=>{const[t,s]=r.useState(null),[a,n]=r.useState(!0),[l,o]=r.useState(null),i=r.useCallback(async(d=!1)=>{var u,h,m,x;if(!d){const c=localStorage.getItem(we);if(c){const f=JSON.parse(c);if(Date.now()-f.cachedAt{navigator.geolocation.getCurrentPosition(N,C,{timeout:1e4})}),{latitude:f,longitude:b}=c.coords,[p,g]=await Promise.all([fetch(`https://api.open-meteo.com/v1/forecast?latitude=${f}&longitude=${b}¤t=temperature_2m,apparent_temperature,relative_humidity_2m,wind_speed_10m,weather_code&timezone=auto`),fetch(`https://nominatim.openstreetmap.org/reverse?lat=${f}&lon=${b}&format=json`,{headers:{"User-Agent":"GTab-Extension/4.2"}})]),k=await p.json(),v=await g.json(),y=((u=v.address)==null?void 0:u.city)||((h=v.address)==null?void 0:h.town)||((m=v.address)==null?void 0:m.village)||((x=v.address)==null?void 0:x.county)||"Konum",E=k.current,S={temp:Math.round(E.temperature_2m),feelsLike:Math.round(E.apparent_temperature),humidity:E.relative_humidity_2m,windSpeed:Math.round(E.wind_speed_10m),code:E.weather_code,city:y,cachedAt:Date.now()};s(S),localStorage.setItem(we,JSON.stringify(S))}catch(c){c.code===1?o("Konum izni reddedildi."):o("Hava durumu yüklenemedi.");const f=localStorage.getItem(we);f&&(s(JSON.parse(f)),o(null))}finally{n(!1)}},[]);return r.useEffect(()=>{i();const d=setInterval(()=>i(),Pe);return()=>clearInterval(d)},[i]),a&&!t?e.jsx("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex items-center justify-center",children:e.jsx("div",{className:"text-white/30 text-xs",children:"Konum alınıyor..."})}):l&&!t?e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col items-center justify-center gap-3 p-4 text-center",children:[e.jsx(_e,{className:"w-8 h-8 text-white/20"}),e.jsx("p",{className:"text-xs text-white/50",children:l}),e.jsx("button",{onClick:()=>i(!0),className:"px-3 py-1.5 bg-white/10 hover:bg-white/20 text-white text-xs rounded-lg transition-colors",children:"Tekrar Dene"})]}):e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-4 gap-1",children:[e.jsx("span",{className:"text-6xl leading-none",children:ns(t.code)}),e.jsxs("div",{className:"flex items-end gap-1 mt-2",children:[e.jsx("span",{className:"text-5xl font-thin text-white",children:t.temp}),e.jsx("span",{className:"text-xl text-white/50 mb-1",children:"°C"})]}),e.jsx("p",{className:"text-sm text-white/70 mt-0.5",children:os(t.code)}),e.jsxs("div",{className:"flex items-center gap-1 text-white/40 text-xs mt-1",children:[e.jsx(_e,{className:"w-3 h-3"}),e.jsx("span",{children:t.city})]})]}),e.jsxs("div",{className:"grid grid-cols-3 divide-x divide-white/5 border-t border-white/10",children:[e.jsxs("div",{className:"flex flex-col items-center py-2.5 gap-0.5",children:[e.jsx("span",{className:"text-[10px] text-white/30 uppercase tracking-wide",children:"Hissedilen"}),e.jsxs("span",{className:"text-sm font-medium text-white/70",children:[t.feelsLike,"°"]})]}),e.jsxs("div",{className:"flex flex-col items-center py-2.5 gap-0.5",children:[e.jsx("span",{className:"text-[10px] text-white/30 uppercase tracking-wide",children:"Nem"}),e.jsxs("span",{className:"text-sm font-medium text-white/70",children:[t.humidity,"%"]})]}),e.jsxs("div",{className:"flex flex-col items-center py-2.5 gap-0.5",children:[e.jsx("span",{className:"text-[10px] text-white/30 uppercase tracking-wide",children:"Rüzgar"}),e.jsxs("span",{className:"text-sm font-medium text-white/70",children:[t.windSpeed," km/h"]})]})]}),e.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-t border-white/5",children:[e.jsx("span",{className:"text-[10px] text-white/20",children:t!=null&&t.cachedAt?new Date(t.cachedAt).toLocaleTimeString("tr-TR",{hour:"2-digit",minute:"2-digit"}):""}),e.jsx("button",{onClick:()=>i(!0),disabled:a,className:"p-1 text-white/20 hover:text-white/50 transition-colors",children:e.jsx(G,{className:`w-3 h-3 ${a?"animate-spin":""}`})})]})]})},Y={work:1500,"short-break":300,"long-break":900},Fe={work:"Odak","short-break":"Kısa Mola","long-break":"Uzun Mola"},Me={work:"text-red-400","short-break":"text-green-400","long-break":"text-blue-400"},is={work:"stroke-red-400","short-break":"stroke-green-400","long-break":"stroke-blue-400"},cs={work:"bg-red-500","short-break":"bg-green-500","long-break":"bg-blue-500"},De=2*Math.PI*54,ds=()=>{const[t,s]=r.useState("work"),[a,n]=r.useState(Y.work),[l,o]=r.useState(!1),[i,d]=r.useState(0),u=r.useRef(null),h=(Y[t]-a)/Y[t],m=De*(1-h),x=p=>`${Math.floor(p/60).toString().padStart(2,"0")}:${(p%60).toString().padStart(2,"0")}`,c=p=>{o(!1),s(p),n(Y[p])},f=r.useCallback(p=>{o(!1),d(g=>{const k=t==="work"&&p?g+1:g;if(t==="work"){const v=k>0&&k%4===0?"long-break":"short-break";s(v),n(Y[v])}else s("work"),n(Y.work);return k})},[t]);r.useEffect(()=>{if(u.current&&clearInterval(u.current),!!l)return u.current=window.setInterval(()=>{n(p=>p<=1?(clearInterval(u.current),"Notification"in window&&Notification.permission==="granted"&&new Notification(t==="work"?"⏰ Odak tamamlandı! Mola zamanı.":"✅ Mola bitti! Odağa dön."),f(!0),0):p-1)},1e3),()=>{u.current&&clearInterval(u.current)}},[l,t,f]);const b=()=>{o(!1),n(Y[t])};return e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col overflow-hidden",children:[e.jsx("div",{className:"flex border-b border-white/10 shrink-0",children:["work","short-break","long-break"].map(p=>e.jsx("button",{onClick:()=>c(p),className:`flex-1 py-2 text-[10px] font-medium transition-colors ${t===p?`${Me[p]} border-b-2 border-current -mb-px`:"text-white/30 hover:text-white/60"}`,children:Fe[p]},p))}),e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-5 p-4",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 128 128",className:"-rotate-90",children:[e.jsx("circle",{cx:"64",cy:"64",r:"54",fill:"none",stroke:"rgba(255,255,255,0.07)",strokeWidth:"8"}),e.jsx("circle",{cx:"64",cy:"64",r:"54",fill:"none",className:`${is[t]} transition-all duration-700`,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:De,strokeDashoffset:m})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[e.jsx("span",{className:"text-3xl font-mono font-light text-white tracking-wide",children:x(a)}),e.jsx("span",{className:`text-[10px] font-semibold uppercase tracking-widest mt-1 ${Me[t]}`,children:Fe[t]})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:b,className:"p-2 text-white/30 hover:text-white/60 transition-colors",children:e.jsx(yr,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>o(p=>!p),className:`p-3 rounded-full transition-all ${cs[t]} hover:opacity-90 shadow-lg`,children:l?e.jsx(Ke,{className:"w-6 h-6 text-white"}):e.jsx(Ye,{className:"w-6 h-6 text-white"})}),e.jsx("button",{onClick:()=>f(!1),className:"p-2 text-white/30 hover:text-white/60 transition-colors",children:e.jsx(Ze,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"border-t border-white/10 py-3 flex items-center justify-center gap-3 shrink-0",children:[e.jsx("span",{className:"text-[10px] text-white/25",children:"Tamamlanan"}),e.jsx("div",{className:"flex gap-1.5",children:Array.from({length:4}).map((p,g)=>e.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${g{const t=localStorage.getItem(nt),s=localStorage.getItem(ot);return!t||!s||Date.now()>=parseInt(s)-6e4?null:t},hs=async t=>{const s=chrome.identity.getRedirectURL(),n=`https://accounts.spotify.com/authorize?client_id=${t}&response_type=token&redirect_uri=${encodeURIComponent(s)}&scope=${encodeURIComponent("user-read-currently-playing user-read-playback-state user-modify-playback-state")}&show_dialog=true`;return new Promise((l,o)=>{chrome.identity.launchWebAuthFlow({url:n,interactive:!0},i=>{var x;if(chrome.runtime.lastError||!i){o(new Error(((x=chrome.runtime.lastError)==null?void 0:x.message)||"Auth cancelled"));return}const d=new URL(i).hash.substring(1),u=new URLSearchParams(d),h=u.get("access_token"),m=parseInt(u.get("expires_in")||"3600");h?(localStorage.setItem(nt,h),localStorage.setItem(ot,String(Date.now()+m*1e3)),l(h)):o(new Error("No access_token in response"))})})},ms=()=>{var S;const[t,s]=r.useState(localStorage.getItem(be)||""),[a,n]=r.useState(""),[l,o]=r.useState(!localStorage.getItem(be)),[i,d]=r.useState(us()),[u,h]=r.useState(null),[m,x]=r.useState(!1),[c,f]=r.useState(null),b=r.useRef(null),p=r.useCallback(async N=>{var j;const C=await fetch("https://api.spotify.com/v1/me/player/currently-playing",{headers:{Authorization:`Bearer ${N}`}});if(C.status===401)throw new Error("TOKEN_EXPIRED");if(C.status===204||!C.ok){h(null);return}const O=await C.json();if(!(O!=null&&O.item)){h(null);return}h({name:O.item.name,artist:O.item.artists.map(B=>B.name).join(", "),albumArt:((j=O.item.album.images[0])==null?void 0:j.url)||"",isPlaying:O.is_playing,progress:O.progress_ms??0,duration:O.item.duration_ms})},[]);r.useEffect(()=>{if(i)return p(i).catch(N=>{N.message==="TOKEN_EXPIRED"&&d(null)}),b.current=window.setInterval(()=>{p(i).catch(()=>{})},5e3),()=>{b.current&&clearInterval(b.current)}},[i,p]);const g=async()=>{if(t){x(!0),f(null);try{const N=await hs(t);d(N)}catch(N){f(N.message||"Auth failed")}finally{x(!1)}}},k=async N=>{if(!i)return;const C=N==="next"||N==="previous";await fetch(`https://api.spotify.com/v1/me/player/${N}`,{method:C?"POST":"PUT",headers:{Authorization:`Bearer ${i}`}}),setTimeout(()=>p(i).catch(()=>{}),600)},v=()=>{const N=a.trim();N&&(localStorage.setItem(be,N),s(N),o(!1))},y=N=>{const C=Math.floor(N/1e3);return`${Math.floor(C/60)}:${(C%60).toString().padStart(2,"0")}`};if(l){const N=typeof chrome<"u"&&((S=chrome.identity)!=null&&S.getRedirectURL)?chrome.identity.getRedirectURL():"(extension yüklenince görünür)";return e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col items-center justify-center gap-3 p-5",children:[e.jsx(ae,{className:"w-8 h-8 text-green-400 opacity-60"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm font-semibold text-white",children:"Spotify Kurulumu"}),e.jsxs("p",{className:"text-[10px] text-white/40 mt-1 leading-relaxed",children:["1. developer.spotify.com → App oluştur",e.jsx("br",{}),"2. Redirect URI olarak şunu ekle:",e.jsx("br",{}),e.jsx("span",{className:"text-white/60 break-all",children:N})]})]}),e.jsx("input",{type:"text",value:a,onChange:C=>n(C.target.value),onKeyDown:C=>C.key==="Enter"&&v(),placeholder:"Spotify Client ID...",className:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-xs text-white/80 placeholder-white/20 outline-none focus:border-green-400/40 transition-colors"}),e.jsx("button",{onClick:v,disabled:!a.trim(),className:"w-full py-2 bg-green-600 hover:bg-green-500 disabled:opacity-40 text-white text-xs font-medium rounded-lg transition-colors",children:"Kaydet"})]})}if(!i)return e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col items-center justify-center gap-3 p-4",children:[e.jsx(ae,{className:"w-8 h-8 text-green-400 opacity-60"}),e.jsx("p",{className:"text-sm font-semibold text-white",children:"Spotify"}),c&&e.jsx("p",{className:"text-xs text-red-400 text-center",children:c}),e.jsxs("button",{onClick:g,disabled:m,className:"px-5 py-2 bg-green-600 hover:bg-green-500 disabled:opacity-40 text-white text-xs font-medium rounded-lg transition-colors flex items-center gap-2",children:[m&&e.jsx(G,{className:"w-3 h-3 animate-spin"}),"Spotify ile Bağlan"]}),e.jsx("button",{onClick:()=>o(!0),className:"text-[10px] text-white/20 hover:text-white/50 transition-colors",children:"Client ID değiştir"})]});if(!u)return e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col items-center justify-center gap-2 p-4",children:[e.jsx(ae,{className:"w-8 h-8 text-white/10"}),e.jsx("p",{className:"text-xs text-white/30",children:"Spotify'da bir şey çalmıyor."}),e.jsx("button",{onClick:()=>o(!0),className:"text-[10px] text-white/20 hover:text-white/40 mt-2",children:"Ayarlar"})]});const E=u.duration>0?u.progress/u.duration*100:0;return e.jsxs("div",{className:"w-full h-full bg-black/40 backdrop-blur-xl border border-white/10 rounded-xl flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-4 gap-3",children:[u.albumArt?e.jsx("img",{src:u.albumArt,alt:"album",className:"w-28 h-28 rounded-xl shadow-2xl object-cover"}):e.jsx("div",{className:"w-28 h-28 rounded-xl bg-white/5 flex items-center justify-center",children:e.jsx(ae,{className:"w-10 h-10 text-white/20"})}),e.jsxs("div",{className:"text-center max-w-full px-2",children:[e.jsx("p",{className:"text-sm font-semibold text-white truncate",children:u.name}),e.jsx("p",{className:"text-xs text-white/50 truncate mt-0.5",children:u.artist})]})]}),e.jsxs("div",{className:"px-4 pb-2",children:[e.jsx("div",{className:"w-full h-1 bg-white/10 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-green-400 transition-all duration-1000",style:{width:`${E}%`}})}),e.jsxs("div",{className:"flex justify-between mt-1",children:[e.jsx("span",{className:"text-[10px] text-white/30",children:y(u.progress)}),e.jsx("span",{className:"text-[10px] text-white/30",children:y(u.duration)})]})]}),e.jsxs("div",{className:"flex items-center justify-center gap-5 pb-4",children:[e.jsx("button",{onClick:()=>k("previous"),className:"p-2 text-white/40 hover:text-white transition-colors",children:e.jsx(kr,{className:"w-5 h-5"})}),e.jsx("button",{onClick:()=>k(u.isPlaying?"pause":"play"),className:"p-2.5 bg-green-500 hover:bg-green-400 rounded-full transition-colors shadow-lg",children:u.isPlaying?e.jsx(Ke,{className:"w-5 h-5 text-white"}):e.jsx(Ye,{className:"w-5 h-5 text-white"})}),e.jsx("button",{onClick:()=>k("next"),className:"p-2 text-white/40 hover:text-white transition-colors",children:e.jsx(Ze,{className:"w-5 h-5"})})]})]})},lt=r.createContext(void 0),ie=()=>{const t=r.useContext(lt);if(!t)throw new Error("useGTab must be used within a GTabProvider");return t},xs=({children:t})=>{const[s,a]=r.useState(()=>Rr()),[n,l]=r.useState(()=>Or()),[o,i]=r.useState(()=>Be()),[d,u]=r.useState(()=>Fr()),[h,m]=r.useState(()=>Dr()),[x,c]=r.useState(()=>st()),[f]=r.useState(()=>Tr()),[b,p]=r.useState(f.category),[g,k]=r.useState(f.profile),[v,y]=r.useState(null),[E,S]=r.useState(!1),[N,C]=r.useState(!1),[O,j]=r.useState(!1),[B,P]=r.useState(!1),[_,w]=r.useState(null),[F,A]=r.useState(""),[z,Z]=r.useState(()=>{const L=Be();return L.type==="image"?L.value:L.type==="random"?L.value||Q[Math.floor(Math.random()*Q.length)]:""}),[te,H]=r.useState(!0),V=U.useRef(!0);r.useEffect(()=>{$r(s)},[s]),r.useEffect(()=>{_r(n)},[n]),r.useEffect(()=>{Br(o)},[o]),r.useEffect(()=>{Mr(d)},[d]),r.useEffect(()=>{zr(h)},[h]),r.useEffect(()=>{Pr({category:b,profile:g})},[b,g]),r.useEffect(()=>{if(V.current){V.current=!1;return}if(o.type==="color"||o.type==="theme"){Z(""),H(!0);return}let L=o.value;if(o.type==="random"&&(z&&Q.includes(z)&&!o.value?L=z:L||(L=Q[Math.floor(Math.random()*Q.length)])),!L)return;if(L===z){H(!0);return}H(!1);const R=new Image;R.src=L,R.onload=()=>{Z(L),H(!0)},R.onerror=()=>H(!0)},[o]),r.useEffect(()=>{const L=R=>{if(R.key==="gtab_shortcuts"&&R.newValue)try{a(JSON.parse(R.newValue))}catch{}};return window.addEventListener("storage",L),()=>window.removeEventListener("storage",L)},[]);const W=r.useCallback((L,R)=>{const T=L.map(I=>({...I,id:crypto.randomUUID()})),$=R??v;a($?I=>I.map(M=>M.id===$&&M.isFolder?{...M,children:[...M.children||[],...T]}:M):I=>[...I,...T])},[v]),ce=r.useCallback(L=>{a(R=>R.find($=>$.id===L)?R.filter($=>$.id!==L):R.map($=>$.isFolder&&$.children?{...$,children:$.children.filter(I=>I.id!==L)}:$))},[]),de=r.useCallback(L=>{a(R=>{const T=R.findIndex(I=>I.id===L.id);if(T!==-1){const I=[...R];return I[T]=L,I}const $=R.findIndex(I=>I.isFolder&&I.children&&I.children.some(M=>M.id===L.id));if($!==-1){const I=[...R],M=I[$];if(M.children){const re=M.children.findIndex(K=>K.id===L.id);if(re!==-1){const K=[...M.children];return K[re]=L,I[$]={...M,children:K},I}}}return R})},[]),ue=r.useCallback(L=>{l(R=>{const T=R.findIndex(I=>I.id===L);if(T===-1)return R;const $=[...R];return $[T]={...$[T],visible:!$[T].visible},$})},[]),he=r.useCallback((L,R)=>{l(T=>{const $=T.findIndex(M=>M.id===L);if($===-1)return T;const I=[...T];return I[$]={...I[$],...R},I})},[]),me=r.useCallback(()=>{l(ne)},[]);r.useEffect(()=>{if(typeof chrome>"u"||!chrome.storage)return;const L=T=>{T&&(chrome.storage.local.remove("gtab_pending_url"),y(null),A(T),C(!0))};chrome.storage.local.get("gtab_pending_url",T=>{T.gtab_pending_url&&L(T.gtab_pending_url)});const R=T=>{var $;($=T.gtab_pending_url)!=null&&$.newValue&&L(T.gtab_pending_url.newValue)};return chrome.storage.onChanged.addListener(R),()=>chrome.storage.onChanged.removeListener(R)},[]);const xe={shortcuts:s,setShortcuts:a,layout:n,setLayout:l,bgConfig:o,setBgConfig:i,clockConfig:d,setClockConfig:u,cardConfig:h,setCardConfig:m,stocksConfig:x,setStocksConfig:c,filterCategory:b,setFilterCategory:p,filterProfile:g,setFilterProfile:k,activeFolderId:v,setActiveFolderId:y,isEditMode:E,setIsEditMode:S,isModalOpen:N,setIsModalOpen:C,isBgModalOpen:O,setIsBgModalOpen:j,isClockModalOpen:B,setIsClockModalOpen:P,editingShortcut:_,setEditingShortcut:w,pendingUrl:F,setPendingUrl:A,activeBgUrl:z,setActiveBgUrl:Z,isBgImageLoaded:te,setIsBgImageLoaded:H,addShortcuts:W,deleteShortcut:ce,updateShortcut:de,toggleWidgetVisibility:ue,updateWidgetConfig:he,resetLayout:me};return e.jsx(lt.Provider,{value:xe,children:t})},fs=({layout:t,onReorder:s})=>{const[a,n]=r.useState(null),[l,o]=r.useState(null),[i,d]=r.useState(t),u=r.useRef(null);r.useEffect(()=>{a||d(t)},[t,a]);const h=r.useCallback((f,b)=>{n(b);const p=t.find(g=>g.id===b);p&&(u.current=p),f.dataTransfer.effectAllowed="move",setTimeout(()=>{const g=f.target;g&&g.classList.add("opacity-20")},0)},[t]),m=r.useCallback((f,b)=>{f.preventDefault(),!(!a||a===b)&&(o(b),d(p=>{const g=p.findIndex(E=>E.id===a),k=p.findIndex(E=>E.id===b);if(g===-1||k===-1)return p;const v=[...p],y=v[g];return v.splice(g,1),v.splice(k,0,y),v.map((E,S)=>({...E,order:S}))}))},[a]),x=r.useCallback(f=>{f.preventDefault()},[]),c=r.useCallback(f=>{const b=f.target;b&&b.classList.remove("opacity-20"),s(i),u.current=null,n(null),o(null)},[i,s]);return{draggedId:a,dragOverId:l,liveLayout:i,onDragStart:h,onDragEnter:m,onDragOver:x,onDragEnd:c}},ps=({snapGridSize:t=20,onResizeEnd:s})=>({handlePointerDown:r.useCallback((n,l)=>{n.stopPropagation(),n.preventDefault();const o=n.clientX,i=n.clientY,d=l.offsetWidth,u=l.offsetHeight,h=l.style.transition;l.style.transition="none",l.classList.add("ring-2","ring-blue-500","ring-offset-2","ring-offset-black","z-50","scale-[1.01]");const m=c=>{let f=Math.max(200,d+(c.clientX-o)),b=Math.max(100,u+(c.clientY-i));t>0&&(f=Math.round(f/t)*t,b=Math.round(b/t)*t),l.style.width=`${f}px`,l.style.height=`${b}px`},x=()=>{l.style.transition=h,l.classList.remove("ring-2","ring-blue-500","ring-offset-2","ring-offset-black","z-50","scale-[1.01]"),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",x),s(l.offsetWidth,l.offsetHeight)};document.addEventListener("pointermove",m),document.addEventListener("pointerup",x)},[t,s])}),gs=({snapGridSize:t=20,updateWidgetConfig:s})=>({handlePointerDown:r.useCallback((n,l,o)=>{if(n.button!==0||n.target.closest("button"))return;n.stopPropagation(),n.preventDefault();const i=n.clientX,d=n.clientY,u=l.x??o.offsetLeft,h=l.y??o.offsetTop,m=o.style.transition;o.style.transition="none",o.style.zIndex="50",o.classList.add("ring-2","ring-blue-500/50","scale-[1.02]");const x=o.parentElement,c=[];x&&x.querySelectorAll(".widget-item").forEach(k=>{if(k===o)return;const v=k;c.push({left:v.offsetLeft,top:v.offsetTop,right:v.offsetLeft+v.offsetWidth,bottom:v.offsetTop+v.offsetHeight})});let f=!1;const b=g=>{let k=u+(g.clientX-i),v=h+(g.clientY-d);t>0&&(k=Math.round(k/t)*t,v=Math.round(v/t)*t);const y=k+o.offsetWidth,E=v+o.offsetHeight;f=c.some(S=>!(y<=S.left||k>=S.right||E<=S.top||v>=S.bottom)),f?(o.classList.add("ring-red-500","ring-4"),o.classList.remove("ring-blue-500/50","ring-2")):(o.classList.add("ring-blue-500/50","ring-2"),o.classList.remove("ring-red-500","ring-4")),o.style.left=`${k}px`,o.style.top=`${v}px`},p=()=>{if(o.style.transition=m,o.style.zIndex="",o.classList.remove("ring-red-500","ring-4","ring-2","ring-blue-500/50","scale-[1.02]"),document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",p),f){o.style.transition="all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",o.style.left=`${u}px`,o.style.top=`${h}px`;return}let g=u+(parseInt(o.style.left)-u),k=h+(parseInt(o.style.top)-h);isNaN(g)&&(g=o.offsetLeft),isNaN(k)&&(k=o.offsetTop),s(l.id,{x:g,y:k})};document.addEventListener("pointermove",b),document.addEventListener("pointerup",p)},[t,s])}),ws=t=>{switch(t){case"neon":return{wrapper:"bg-gradient-to-br from-indigo-900 via-purple-900 to-pink-900",overlay:"bg-black/40 backdrop-blur-[2px]",overlayStyle:{},accent:"text-pink-400 drop-shadow-[0_0_8px_rgba(236,72,153,0.6)]",glass:"border-pink-500/20 backdrop-blur-xl transition-all",glassBgRgb:"255,255,255",menuBg:"rgba(20,20,30,0.97)",menuBorder:"rgba(236,72,153,0.3)",menuBgRgb:"20,20,30",menuBorderRgb:"236,72,153",accentColor:"#ec4899"};case"starship":return{wrapper:"bg-[#050505] bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-gray-900 via-black to-black",overlay:"",overlayStyle:{},accent:"text-blue-400 drop-shadow-[0_0_8px_rgba(96,165,250,0.6)]",glass:"border-white/5 backdrop-blur-lg transition-all",glassBgRgb:"255,255,255",menuBg:"rgba(3,6,24,0.97)",menuBorder:"rgba(96,165,250,0.2)",menuBgRgb:"3,6,24",menuBorderRgb:"96,165,250",accentColor:"#60a5fa"};case"terminal":return{wrapper:"bg-black",overlay:"",overlayStyle:{backgroundImage:"linear-gradient(rgba(18,16,16,0) 50%, rgba(0,0,0,0.25) 50%), linear-gradient(90deg, rgba(255,0,0,0.06), rgba(0,255,0,0.02), rgba(0,0,255,0.06))",backgroundSize:"100% 2px, 3px 100%"},accent:"text-green-500 font-mono drop-shadow-[0_0_5px_#22c55e]",glass:"border-green-500/30 font-mono hover:border-green-500/60 transition-all",glassBgRgb:"0,0,0",menuBg:"rgba(0,8,2,0.97)",menuBorder:"rgba(34,197,94,0.3)",menuBgRgb:"0,8,2",menuBorderRgb:"34,197,94",accentColor:"#22c55e"};case"portal":return{wrapper:"bg-[#060606]",overlay:"",overlayStyle:{},orbs:[{color:"rgba(255,153,0,0.45)",size:"90vmax",animClass:"animate-orb-a"},{color:"rgba(0,163,255,0.35)",size:"90vmax",animClass:"animate-orb-b"}],accent:"text-[#FF9900] drop-shadow-[0_0_15px_rgba(255,153,0,0.9)]",glass:"border-[#FF9900]/40 backdrop-blur-3xl hover:border-[#FF9900]/60 transition-all",glassBgRgb:"20,20,20",menuBg:"rgba(10,10,10,0.98)",menuBorder:"rgba(255,153,0,0.4)",menuBgRgb:"10,10,10",menuBorderRgb:"255,153,0",accentColor:"#FF9900"};default:return{wrapper:"bg-black",overlay:"bg-black/30",overlayStyle:{},accent:"text-blue-400",glass:"border-white/10 backdrop-blur-md",glassBgRgb:"255,255,255",menuBg:"rgba(10,10,12,0.97)",menuBorder:"rgba(255,255,255,0.1)",menuBgRgb:"10,10,12",menuBorderRgb:"255,255,255",accentColor:"#60a5fa"}}},bs=({bgConfig:t,isThemeBg:s,isColorBg:a,activeBgUrl:n,isBgImageLoaded:l,themeOverlayClass:o,themeOverlayStyle:i,themeOrbs:d})=>e.jsxs("div",{className:"fixed inset-0 z-0 pointer-events-none select-none overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-black"}),s&&o&&e.jsx("div",{className:`absolute -inset-[10%] transition-opacity duration-700 animate-glow-drift ${o}`,style:i}),s&&d&&d.map((u,h)=>e.jsx("div",{className:`absolute rounded-full ${u.animClass}`,style:{width:u.size,height:u.size,background:`radial-gradient(circle, ${u.color} 0%, transparent 70%)`,transform:"translate(-50%, -50%)",filter:"blur(30px)"}},h)),a&&e.jsx("div",{className:"absolute inset-0 transition-colors duration-700",style:{backgroundColor:t.value}}),!s&&!a&&e.jsx("img",{src:n,alt:"Background",className:"absolute inset-0 w-full h-full object-cover transition-opacity duration-700",style:{opacity:l?.6:0,filter:"brightness(0.6) contrast(1.1)"}})]}),vs=({isEditMode:t,setIsEditMode:s,setIsBgModalOpen:a,resetLayout:n})=>e.jsx("header",{className:"flex justify-end mb-6 space-x-2 sticky top-4 z-50",children:t?e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>a(!0),className:"flex items-center gap-2 px-4 py-2 rounded-full border border-white/10 backdrop-blur-md transition-colors text-white text-sm font-medium",style:{backgroundColor:"var(--theme-accent, #2563eb)"},children:[e.jsx(sr,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Görünüm"})]}),e.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-4 py-2 rounded-full bg-red-500/20 border border-red-500/30 hover:bg-red-500/40 backdrop-blur-md transition-colors text-white/90 text-sm font-medium",children:[e.jsx(G,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Sıfırla"})]}),e.jsxs("button",{onClick:()=>s(!1),className:"flex items-center gap-2 px-4 py-2 rounded-full bg-green-600 hover:bg-green-500 shadow-lg shadow-green-900/20 backdrop-blur-md transition-all text-white text-sm font-medium animate-fade-in",children:[e.jsx(zt,{className:"w-4 h-4"}),e.jsx("span",{children:"Bitti"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("a",{href:"https://buymeacoffee.com/alazndy",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-4 py-2 rounded-full bg-yellow-500/10 hover:bg-yellow-500/20 border border-yellow-500/20 backdrop-blur-md transition-all text-yellow-200 hover:text-yellow-100 text-sm font-medium group",children:[e.jsx(Jt,{className:"w-4 h-4 text-yellow-400 group-hover:scale-110 transition-transform"}),e.jsx("span",{className:"hidden sm:inline",children:"Kahve Ismarla"})]}),e.jsxs("button",{onClick:()=>s(!0),className:"flex items-center gap-2 px-4 py-2 rounded-full bg-white/10 hover:bg-white/20 border border-white/10 backdrop-blur-md transition-all text-white/90 text-sm font-medium",children:[e.jsx(tr,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Düzenle"})]})]})}),ys=({widget:t,onClose:s,setIsBgModalOpen:a,setIsClockModalOpen:n})=>{const{clockConfig:l,setClockConfig:o,cardConfig:i,setCardConfig:d,stocksConfig:u,setStocksConfig:h,updateWidgetConfig:m}=ie(),x=()=>{switch(t.id){case"clock":return e.jsxs("div",{className:"bg-white/5 rounded-xl p-3 border border-white/5 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 pb-1 border-b border-white/5",children:[e.jsx($e,{className:"w-3.5 h-3.5 text-blue-400"}),e.jsx("span",{className:"text-[10px] font-bold text-white/50 uppercase tracking-widest",children:"Saat Ayarları"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[10px] text-white/60",children:"24 Saat Formatı"}),e.jsx("button",{onClick:()=>o(c=>({...c,format:c.format==="24h"?"12h":"24h"})),className:`text-[9px] px-2 py-1 rounded border transition-all ${l.format==="24h"?"bg-blue-500/20 text-blue-400 border-blue-500/30":"bg-white/5 text-white/30 border-white/10"}`,children:l.format==="24h"?"AÇIK":"KAPALI"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[10px] text-white/60",children:"Saniyeleri Göster"}),e.jsx("button",{onClick:()=>o(c=>({...c,showSeconds:!c.showSeconds})),className:`text-[9px] px-2 py-1 rounded border transition-all ${l.showSeconds?"bg-blue-500/20 text-blue-400 border-blue-500/30":"bg-white/5 text-white/30 border-white/10"}`,children:l.showSeconds?"AÇIK":"KAPALI"})]})]});case"shortcuts":return e.jsxs("div",{className:"bg-white/5 rounded-xl p-3 border border-white/5 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 pb-1 border-b border-white/5",children:[e.jsx(ir,{className:"w-3.5 h-3.5 text-indigo-400"}),e.jsx("span",{className:"text-[10px] font-bold text-white/50 uppercase tracking-widest",children:"Kısayol Tasarımı"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"text-[9px] text-white/40 uppercase font-bold tracking-widest",children:"Kart Şekli"}),e.jsx("div",{className:"flex gap-1",children:["sharp","rounded","pill"].map(c=>e.jsx("button",{onClick:()=>d(f=>({...f,shape:c})),className:`flex-1 py-1 text-[8px] rounded border transition-all ${i.shape===c?"bg-indigo-500 text-white border-indigo-400 shadow-[0_0_8px_rgba(99,102,241,0.4)]":"bg-white/5 text-white/30 border-white/10 hover:bg-white/10"}`,children:c.toUpperCase()},c))})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 pt-1",children:[e.jsxs("button",{onClick:()=>d(c=>({...c,glowEnabled:!c.glowEnabled})),className:`flex items-center justify-center gap-2 py-1.5 rounded-lg border text-[9px] font-bold transition-all ${i.glowEnabled?"bg-orange-500/20 text-orange-400 border-orange-500/30 shadow-[0_0_10px_rgba(249,115,22,0.2)]":"bg-white/5 text-white/30 border-white/10"}`,children:[e.jsx(We,{className:"w-3 h-3"})," GLOW"]}),e.jsxs("button",{onClick:()=>d(c=>({...c,showCardBorder:!c.showCardBorder})),className:`flex items-center justify-center gap-2 py-1.5 rounded-lg border text-[9px] font-bold transition-all ${i.showCardBorder?"bg-blue-500/20 text-blue-400 border-blue-500/30":"bg-white/5 text-white/30 border-white/10"}`,children:[e.jsx(Ie,{className:"w-3 h-3"})," KENARLIK"]})]}),e.jsxs("div",{className:"space-y-3 pt-1",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex justify-between text-[9px] text-white/40 font-bold uppercase tracking-widest",children:[e.jsx("span",{children:"Arka Plan Opaklığı"}),e.jsxs("span",{className:"text-indigo-400",children:[i.bgOpacity,"%"]})]}),e.jsx("input",{type:"range",min:0,max:100,step:5,value:i.bgOpacity,onChange:c=>d(f=>({...f,bgOpacity:Number(c.target.value)})),className:"w-full accent-indigo-500 h-1 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),i.showCardBorder&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex justify-between text-[9px] text-white/40 font-bold uppercase tracking-widest",children:[e.jsx("span",{children:"Kenarlık Opaklığı"}),e.jsxs("span",{className:"text-blue-400",children:[i.cardBorderOpacity??20,"%"]})]}),e.jsx("input",{type:"range",min:0,max:100,step:5,value:i.cardBorderOpacity??20,onChange:c=>d(f=>({...f,cardBorderOpacity:Number(c.target.value)})),className:"w-full accent-blue-500 h-1 bg-white/10 rounded-lg appearance-none cursor-pointer"})]})]})]});case"stocks":return e.jsxs("div",{className:"bg-white/5 rounded-xl p-3 border border-white/5 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 pb-1 border-b border-white/5",children:[e.jsx(Zt,{className:"w-3.5 h-3.5 text-green-400"}),e.jsx("span",{className:"text-[10px] font-bold text-white/50 uppercase tracking-widest",children:"Semboller"})]}),e.jsxs("div",{className:"flex flex-wrap gap-1",children:[u.symbols.map(c=>e.jsx("div",{className:"px-2 py-0.5 bg-green-500/10 text-green-400 border border-green-500/20 rounded text-[9px] font-bold uppercase",children:c},c)),e.jsx("button",{onClick:()=>a(!0),className:"px-2 py-0.5 bg-white/5 text-white/30 border border-white/10 rounded text-[9px] hover:bg-white/10",children:"+"})]})]});default:return null}};return e.jsxs("div",{className:"absolute top-full right-0 mt-3 w-72 bg-[#0c0c0c]/90 backdrop-blur-3xl border border-white/10 rounded-2xl shadow-[0_20px_50px_rgba(0,0,0,0.5)] p-4 flex flex-col gap-4 animate-fade-in select-none z-50 overflow-hidden",onPointerDown:c=>c.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-white/5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"p-1 rounded-md bg-blue-500/20 text-blue-400",children:e.jsx(kt,{className:"w-3.5 h-3.5"})}),e.jsx("span",{className:"text-[10px] font-bold text-white/70 uppercase tracking-widest",children:"Hızlı Ayarlar"})]}),e.jsx("button",{onClick:c=>{c.stopPropagation(),a(!0),s()},className:"text-[9px] bg-white/5 hover:bg-white/10 text-white/50 hover:text-white px-2 py-1 rounded-md transition-all border border-white/5",children:"Tüm Ayarlar"})]}),x(),e.jsxs("div",{className:"bg-white/5 rounded-xl p-3 border border-white/5 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(dr,{className:"w-4 h-4 text-orange-400/80"}),e.jsx("span",{className:"text-[10px] font-medium text-white/60",children:"Opaklık"})]}),e.jsxs("span",{className:"text-[10px] font-bold text-orange-400",children:[t.opacity??10,"%"]})]}),e.jsx("input",{type:"range",min:0,max:100,step:5,value:t.opacity??10,onChange:c=>m(t.id,{opacity:Number(c.target.value)}),className:"w-full accent-orange-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),e.jsxs("div",{className:"space-y-2 pt-2 border-t border-white/5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:"w-4 h-4 text-blue-400/80"}),e.jsx("span",{className:"text-[10px] font-medium text-white/60",children:"Kenarlık"})]}),e.jsx("button",{onClick:()=>m(t.id,{showBorder:t.showBorder===!1}),className:`text-[9px] px-2.5 py-1 rounded-md border transition-all font-bold ${t.showBorder!==!1?"bg-blue-500 text-white border-blue-400 shadow-[0_0_10px_rgba(59,130,246,0.3)]":"bg-white/5 text-white/30 border-white/10"}`,children:t.showBorder!==!1?"AKTİF":"PASİF"})]}),t.showBorder!==!1&&e.jsx("input",{type:"range",min:0,max:100,step:5,value:t.borderOpacity??20,onChange:c=>m(t.id,{borderOpacity:Number(c.target.value)}),className:"w-full accent-blue-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]})]}),e.jsxs("div",{className:"bg-white/5 rounded-xl p-3 border border-white/5 grid grid-cols-1 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($t,{className:"w-4 h-4 text-indigo-400/80"}),e.jsx("span",{className:"text-[10px] font-medium text-white/60",children:"Genişlik"})]}),e.jsx("span",{className:"text-[10px] font-bold text-indigo-400",children:t.widthPx?`${t.widthPx}px`:"Auto"})]}),e.jsx("input",{type:"range",min:200,max:1600,step:10,value:t.widthPx??400,onChange:c=>m(t.id,{widthPx:Number(c.target.value)}),className:"w-full accent-indigo-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_t,{className:"w-4 h-4 text-indigo-400/80"}),e.jsx("span",{className:"text-[10px] font-medium text-white/60",children:"Yükseklik"})]}),e.jsx("span",{className:"text-[10px] font-bold text-indigo-400",children:t.heightPx?`${t.heightPx}px`:"Auto"})]}),e.jsx("input",{type:"range",min:100,max:1200,step:10,value:t.heightPx??200,onChange:c=>m(t.id,{heightPx:Number(c.target.value)}),className:"w-full accent-indigo-500 h-1.5 bg-white/10 rounded-lg appearance-none cursor-pointer"})]})]}),t.id==="clock"&&e.jsxs("button",{onClick:c=>{c.stopPropagation(),n(!0),s()},className:"w-full py-2 bg-white/5 hover:bg-white/10 text-white/50 text-[9px] uppercase font-bold rounded-lg border border-white/5 transition-all flex items-center justify-center gap-2",children:[e.jsx($e,{className:"w-3.5 h-3.5"})," Tüm Saat Stil Ayarlarını Aç"]})]})},js=({widget:t,index:s,isEditMode:a,activeTheme:n,themeStyles:l,showQuickSettings:o,setShowQuickSettings:i,draggedId:d,dragOverId:u,onDragStart:h,onDragEnter:m,onDragOver:x,onDragEnd:c,updateWidgetConfig:f,setIsBgModalOpen:b,setIsClockModalOpen:p,toggleWidgetVisibility:g,resizeHandler:k,getWidgetLabel:v,isFreeLayout:y,onPointerDownFreeDrag:E,children:S})=>{const N=d===t.id&&!y,C=u===t.id&&!N&&!y,O=t.glassEffect!==!1,j=O&&t.showBorder!==!1,B=O?`${l.glass} shadow-2xl shadow-black/20`:"bg-transparent border-transparent",P=a?`border-2 border-dashed ${N?"opacity-20 scale-95":"opacity-100"} ${C?"border-blue-400 bg-blue-500/10 scale-[1.02] z-40":"border-white/20 hover:border-white/40"}`:`${B} ${j?"border-2":"border-0"}`,_={width:t.widthPx?`${t.widthPx}px`:"100%",height:t.heightPx?`${t.heightPx}px`:"auto",backgroundColor:O&&n!=="custom"?`rgba(${l.glassBgRgb||"255,255,255"}, ${(t.opacity??10)/100})`:void 0,borderColor:j&&n!=="custom"?`rgba(${l.glassBgRgb||"255,255,255"}, ${(t.borderOpacity??20)/100})`:void 0,...y&&{position:"absolute",left:t.x!==void 0?`${t.x}px`:`${s%2*450+50}px`,top:t.y!==void 0?`${t.y}px`:`${Math.floor(s/2)*350+50}px`}};return e.jsxs("div",{draggable:a&&o!==t.id&&!y,onDragStart:y?void 0:w=>h(w,t.id,s),onDragEnter:y?void 0:w=>m(w,t.id,s),onDragOver:y?void 0:x,onDragEnd:y?void 0:c,onPointerDown:a&&y&&E?w=>E(w,t,w.currentTarget):void 0,className:`widget-item transition-all duration-300 rounded-2xl p-4 md:p-6 ${P} ${!t.visible&&a?"grayscale":""} ${a?"cursor-move":""} ${y?"":"relative"}`,style:_,"data-widget-id":t.id,children:[a&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"absolute -top-3 left-4 text-white text-xs font-bold px-3 py-1 rounded-full shadow-lg flex items-center gap-2 z-20",style:{backgroundColor:"var(--theme-accent, #2563eb)"},children:[e.jsx(At,{className:"w-3 h-3"}),v(t.id)]}),e.jsxs("div",{className:"absolute top-4 right-4 flex items-center gap-2 z-30",onPointerDown:w=>w.stopPropagation(),children:[e.jsxs("div",{className:"relative group/settings",children:[e.jsx("button",{onClick:w=>{w.stopPropagation(),i(o===t.id?null:t.id)},className:`p-1.5 rounded-full transition-all border border-white/20 ${o===t.id?"bg-blue-500 text-white":"bg-black/60 hover:bg-black/80 text-white/70"}`,children:e.jsx(je,{className:"w-4 h-4"})}),o===t.id&&e.jsx(ys,{widget:t,onClose:()=>i(null),setIsBgModalOpen:b,setIsClockModalOpen:p})]}),e.jsx("button",{onClick:w=>{w.preventDefault(),f(t.id,{glassEffect:t.glassEffect===!1})},className:`p-1.5 rounded-full transition-all border border-white/20 ${t.glassEffect===!1?"bg-indigo-500/80 text-white shadow-[0_0_8px_rgba(99,102,241,0.5)]":"bg-black/60 hover:bg-black/80 text-white/70"}`,title:"Cam Efekti",children:e.jsx(We,{className:"w-4 h-4"})}),e.jsx("button",{onClick:w=>{w.stopPropagation(),g(t.id)},className:`p-1.5 rounded-full transition-all border border-white/20 ${t.visible?"bg-black/60 hover:bg-black/80 text-white/70":"bg-red-500/80 text-white shadow-[0_0_8px_rgba(239,68,68,0.5)] hover:bg-red-500"}`,title:t.visible?"Gizle":"Göster",children:t.visible?e.jsx(pt,{className:"w-4 h-4"}):e.jsx(gt,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"absolute bottom-1 right-1 w-10 h-10 cursor-nwse-resize opacity-50 hover:opacity-100 flex items-end justify-end p-2 z-30",onPointerDown:w=>k(w,w.currentTarget.parentElement,(F,A)=>f(t.id,{widthPx:F,heightPx:A})),title:"Boyutlandır (Grid 20px)",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-4 h-4 stroke-white stroke-2",children:e.jsx("path",{d:"M21 15L15 21M21 9L9 21"})})})]}),e.jsx("div",{className:`w-full h-full ${n==="terminal"?"font-mono":""}`,children:S})]})},ks=()=>{const{shortcuts:t,filterCategory:s,setFilterCategory:a,filterProfile:n,setFilterProfile:l}=ie(),{activeCategories:o,uniqueProfiles:i}=r.useMemo(()=>{const d=new Set,u=new Set;for(const h of t)if(h.category&&d.add(h.category),h.profiles)for(const m of h.profiles)m.name&&u.add(m.name);return{activeCategories:["All",...d],uniqueProfiles:Array.from(u).sort()}},[t]);return e.jsxs("div",{className:"flex flex-col gap-4 w-full mb-8 animate-fade-in",children:[e.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:o.map(d=>e.jsx("button",{onClick:()=>a(d),className:`px-4 py-1.5 rounded-full text-sm font-medium transition-all backdrop-blur-md border border-transparent ${s===d?"bg-white/90 text-black shadow-lg scale-105":"bg-black/30 text-white/70 hover:bg-white/20 hover:text-white border-white/10"}`,children:d==="All"?"Tümü":d},d))}),i.length>0&&e.jsxs("div",{className:"flex flex-wrap justify-center gap-2 items-center bg-white/5 p-2 rounded-xl border border-white/5 mx-auto w-fit backdrop-blur-sm",children:[e.jsxs("span",{className:"text-xs text-white/40 font-semibold px-2 uppercase tracking-wider flex items-center gap-1",children:[e.jsx(gr,{className:"w-3 h-3"})," Profil:"]}),e.jsx("button",{onClick:()=>l("All"),className:`px-3 py-1 rounded-md text-xs font-medium transition-all ${n==="All"?"bg-blue-500 text-white shadow-md":"text-white/60 hover:bg-white/10 hover:text-white"}`,children:"Tümü"}),i.map(d=>e.jsx("button",{onClick:()=>l(d),className:`px-3 py-1 rounded-md text-xs font-medium transition-all flex items-center gap-1 ${n===d?"bg-blue-500 text-white shadow-md":"text-white/60 hover:bg-white/10 hover:text-white"}`,children:d},d))]})]})},ve=new Map,Ee=t=>{if(!t)return"";const s=t.trim();return s?/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(s)?s:`https://${s}`:""},ye=(t,s)=>{var o;const a=Ee(t.url);if(!s)return a;const n=(o=s.url)==null?void 0:o.trim();if(!n)return a;if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)){if(a.includes("google.com")||a.includes("youtube.com"))try{const i=new URL(a);return i.searchParams.set("authuser",n),i.toString()}catch{const i=a.includes("?")?"&":"?";return`${a}${i}authuser=${n}`}return`mailto:${n}`}return Ee(n)},oe=(t,s)=>{const a=s?`${t}|${s}`:t;if(ve.has(a))return ve.get(a);let n;try{const l=Ee(t);l.startsWith("mailto:")&&s?n=oe(s):n=`https://www.google.com/s2/favicons?domain=${new URL(l).hostname}&sz=128`}catch{n=`https://ui-avatars.com/api/?name=${encodeURIComponent(t.substring(0,1))}&background=random&color=fff&size=128`}return ve.set(a,n),n},Ns=({profiles:t,cardConfig:s,onProfileClick:a})=>!t||t.length===0?null:e.jsx("div",{className:"absolute top-[95%] left-1/2 -translate-x-1/2 min-w-[180px] pt-2 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 transform origin-top z-40",children:e.jsxs("div",{className:"backdrop-blur-xl rounded-xl p-2 shadow-2xl flex flex-col gap-1",style:{backgroundColor:`rgba(var(--menu-bg-rgb, 10,10,12), ${((s==null?void 0:s.menuOpacity)??95)/100})`,border:`${(s==null?void 0:s.menuBorderOpacity)===0?"0px":"1px"} solid rgba(var(--menu-border-rgb, 255,255,255), ${((s==null?void 0:s.menuBorderOpacity)??10)/100})`},children:[e.jsx("div",{className:"text-[10px] text-white/40 px-2 py-1 uppercase tracking-wider font-semibold",children:"Profiller"}),t.map(n=>e.jsxs("button",{onClick:l=>a(l,n),className:"flex items-center gap-3 p-2 rounded-lg hover:bg-white/10 transition-colors w-full text-left group/profile relative",children:[e.jsx("div",{className:`w-6 h-6 rounded-full ${n.avatarColor||"bg-blue-500"} flex items-center justify-center text-[10px] font-bold text-white shadow-sm`,children:n.name.substring(0,2).toUpperCase()}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"text-xs font-medium text-white truncate flex items-center gap-2",children:n.name})}),e.jsx(Se,{className:"w-2.5 h-2.5 text-white/30 opacity-0 group-hover/profile:opacity-100"})]},n.id))]})}),Es={sharp:"rounded-none",rounded:"rounded-xl",pill:"rounded-3xl"},Ss={sm:"h-24",md:"h-32",lg:"h-40",xl:"h-48"},Cs={sm:"w-6 h-6",md:"w-9 h-9",lg:"w-10 h-10",xl:"w-12 h-12"},Ls={xs:"w-5 h-5",sm:"w-7 h-7",md:"w-9 h-9",lg:"w-12 h-12"},Rs={sm:"p-2",md:"p-3",lg:"p-4",xl:"p-4"},$s={sm:"mb-1",md:"mb-2",lg:"mb-3",xl:"mb-3"},Os=r.memo(({shortcut:t,activeProfileFilter:s="All",onDelete:a,onEdit:n,onFolderClick:l,cardConfig:o,draggable:i,onDragStart:d,onDragOver:u,onDrop:h})=>{const m=t.isFolder,x=t.profiles&&t.profiles.length>0,c=Es[(o==null?void 0:o.shape)??"rounded"],f=Ss[(o==null?void 0:o.size)??"md"],b=(o==null?void 0:o.bgOpacity)??10,p=o!=null&&o.iconSize?Ls[o.iconSize]:Cs[(o==null?void 0:o.size)??"md"],g=Rs[(o==null?void 0:o.size)??"md"],k=$s[(o==null?void 0:o.size)??"md"],v=((o==null?void 0:o.size)??"md")==="sm",y=s!=="All"&&t.profiles?t.profiles.find(w=>w.name===s):void 0,E=!y&&t.defaultProfileId&&t.profiles?t.profiles.find(w=>w.id===t.defaultProfileId):void 0,S=y||E,N=ye(t,S),C=(w,F="w-10 h-10",A="mb-3")=>{const z=w.iconType==="image"&&w.iconValue?w.iconValue:oe(w.url,t.url);return e.jsx("img",{src:z,alt:w.title,loading:"lazy",decoding:"async",className:`${F} ${A} rounded-md shadow-md object-contain ${w.iconType==="image"?"bg-white/10":""} flex-shrink-0`,onError:Z=>{Z.target.src=oe(w.url,t.url)}})},O=w=>{m&&l&&(w.preventDefault(),l(t))},j=w=>{var F;w.stopPropagation(),w.preventDefault(),(F=t.children)==null||F.forEach(A=>{const z=ye(A);z&&window.open(z,"_blank")})},B=(w,F)=>{w.stopPropagation(),w.preventDefault();const A=ye(t,F),z=document.createElement("a");z.href=A,z.click()},P=o!=null&&o.cardWidth?{width:`${o.cardWidth}%`}:void 0,_=o!=null&&o.glowEnabled?"hover:shadow-[0_0_20px_var(--theme-accent,rgba(59,130,246,0.5))]":"hover:shadow-xl";if(m){const w=t.children||[],F=w.slice(0,4);return e.jsx("div",{className:"group relative z-0 hover:z-20",draggable:i,onDragStart:A=>d==null?void 0:d(A,t.id),onDragOver:u,onDrop:A=>h==null?void 0:h(A,t.id),style:P,children:e.jsxs("div",{onClick:O,className:`relative backdrop-blur-md flex flex-col items-center justify-center transition-all duration-300 cursor-pointer hover:-translate-y-1 w-full overflow-hidden ${c} ${f} ${g} ${_} ${(o==null?void 0:o.showCardBorder)!==!1?"border":"border-0"}`,style:{backgroundColor:`rgba(255,255,255,${b/100})`,borderColor:(o==null?void 0:o.showCardBorder)!==!1?`rgba(255,255,255,${((o==null?void 0:o.cardBorderOpacity)??10)/100})`:"transparent"},children:[e.jsxs("div",{className:`grid grid-cols-2 gap-1 p-1 bg-black/20 rounded-lg flex-shrink-0 ${v?"w-9 h-9 mb-1":"w-[52px] h-[52px] mb-2"}`,children:[F.map(A=>e.jsx("div",{className:"flex items-center justify-center w-full h-full overflow-hidden",children:e.jsx("img",{src:A.iconType==="image"?A.iconValue:oe(A.url),className:"w-4 h-4 rounded-[2px] object-cover",alt:"",onError:z=>z.target.style.display="none"})},A.id)),w.length===0&&e.jsx(Ue,{className:"w-5 h-5 text-white/20 col-span-2 row-span-2 mx-auto my-auto"})]}),e.jsx("span",{className:`text-white font-medium text-center truncate w-full px-1 leading-tight ${v?"text-[11px]":"text-sm"}`,children:t.title}),!v&&e.jsxs("div",{className:"text-[10px] text-white/40 mt-0.5",children:[w.length," öğe"]}),e.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity z-30",children:[w.length>0&&e.jsx("button",{onClick:j,title:"Hepsini Aç",className:"p-1.5 rounded-full bg-black/20 text-white/70 hover:bg-yellow-500/80 hover:text-white transition-all",children:e.jsx(Tt,{className:"w-3 h-3"})}),e.jsx("button",{onClick:A=>{A.stopPropagation(),n(t)},title:"Ayarlar",className:"p-1.5 rounded-full bg-black/20 text-white/70 hover:bg-blue-500/80 hover:text-white transition-all",children:e.jsx(je,{className:"w-3 h-3"})}),e.jsx("button",{onClick:A=>{A.stopPropagation(),a(t.id)},title:"Sil",className:"p-1.5 rounded-full bg-black/20 text-white/70 hover:bg-red-500/80 hover:text-white transition-all",children:e.jsx(Ne,{className:"w-3 h-3"})})]})]})})}return e.jsxs("div",{className:"group relative z-0 hover:z-20",draggable:i,onDragStart:w=>d==null?void 0:d(w,t.id),onDragOver:u,onDrop:w=>h==null?void 0:h(w,t.id),style:P,children:[e.jsxs("div",{className:`relative backdrop-blur-md flex flex-col items-center justify-center transition-all duration-300 cursor-pointer hover:-translate-y-1 shadow-sm w-full overflow-hidden ${c} ${f} ${g} ${_} ${(o==null?void 0:o.showCardBorder)!==!1?"border":"border-0"}`,style:{backgroundColor:y?"rgba(59,130,246,0.2)":E?`rgba(255,255,255,${(b+5)/100})`:`rgba(255,255,255,${b/100})`,borderColor:(o==null?void 0:o.showCardBorder)!==!1?y?"rgba(59,130,246,0.4)":`rgba(255,255,255,${((o==null?void 0:o.cardBorderOpacity)??10)/100})`:"transparent"},children:[e.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity z-30",children:[e.jsx("button",{onClick:w=>{w.stopPropagation(),n(t)},title:"Ayarlar",className:"p-1.5 rounded-full bg-black/20 text-white/70 hover:bg-blue-500/80 hover:text-white transition-all",children:e.jsx(je,{className:"w-3 h-3"})}),e.jsx("button",{onClick:w=>{w.stopPropagation(),a(t.id)},title:"Sil",className:"p-1.5 rounded-full bg-black/20 text-white/70 hover:bg-red-500/80 hover:text-white transition-all",children:e.jsx(Ne,{className:"w-3 h-3"})})]}),e.jsxs("a",{href:N,className:"flex flex-col items-center w-full h-full justify-center relative min-w-0",children:[C(t,p,k),e.jsx("span",{className:`text-white font-medium text-center truncate w-full px-1 leading-tight ${v?"text-[11px]":"text-sm"}`,children:t.title}),!v&&e.jsx("div",{className:"text-xs text-white/50 mt-1 flex items-center gap-1 h-4 min-w-0 max-w-full",children:S?e.jsxs("span",{className:`flex items-center gap-1 font-medium animate-fade-in truncate ${y?"text-blue-200":"text-white/70"}`,children:[e.jsx("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${S.avatarColor||"bg-blue-400"} ${!y&&"ring-1 ring-white/20"}`}),S.name]}):e.jsxs(e.Fragment,{children:[x&&e.jsx(fr,{className:"w-2.5 h-2.5 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:t.category})]})})]})]}),x&&!y&&t.profiles&&e.jsx(Ns,{profiles:t.profiles,cardConfig:o,onProfileClick:B})]})}),_s=()=>{const{shortcuts:t,setShortcuts:s,filterCategory:a,setFilterCategory:n,filterProfile:l,setFilterProfile:o,cardConfig:i,setEditingShortcut:d,setActiveFolderId:u,setIsModalOpen:h,deleteShortcut:m}=ie(),x=r.useRef(null),c=r.useRef(null),f=r.useCallback((y,E)=>{x.current=E,y.dataTransfer.effectAllowed="move",y.dataTransfer.setData("text/plain",E)},[]),b=r.useCallback((y,E)=>{y.preventDefault();const S=x.current;!S||S===E||(s(N=>{const C=N.findIndex(_=>_.id===S),O=N.findIndex(_=>_.id===E);if(C===-1||O===-1)return N;const j=N[O],B=N[C];if(j.isFolder){const _=[...N];_.splice(C,1);const w=_.findIndex(F=>F.id===E);if(w!==-1){const F={..._[w],children:[..._[w].children||[],B]};return _[w]=F,_}return N}const P=[...N];return P.splice(C,1),P.splice(O,0,B),P}),x.current=null,c.current=null)},[s]),p=r.useCallback(y=>{y.preventDefault()},[]),g=r.useCallback(y=>d(y),[d]),k=r.useCallback(y=>u(y.id),[u]),v=r.useMemo(()=>t.filter(y=>{const E=a==="All"||y.category===a,S=l==="All"||y.profiles&&y.profiles.some(N=>N.name===l);return E&&S}),[t,a,l]);return e.jsx("div",{className:"w-full",children:v.length===0?e.jsxs("div",{className:"text-center text-white/50 py-12 bg-white/5 rounded-xl border border-white/5",children:[e.jsx(Ue,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),e.jsx("p",{children:"Bu filtreye uygun kısayol bulunamadı."}),(a!=="All"||l!=="All")&&e.jsx("button",{onClick:()=>{n("All"),o("All")},className:"text-blue-400 text-sm mt-2 hover:underline",children:"Filtreleri Temizle"})]}):e.jsxs("div",{className:"grid w-full pb-24",style:{columnGap:`${i.gridGapX??16}px`,rowGap:`${i.gridGapY??16}px`,gridTemplateColumns:`repeat(${i.gridCols??6}, minmax(0, 1fr))`},children:[v.map(y=>e.jsx(Os,{shortcut:y,activeProfileFilter:l,onDelete:m,onEdit:g,onFolderClick:k,cardConfig:i,draggable:!0,onDragStart:f,onDragOver:p,onDrop:b},y.id)),e.jsxs("button",{onClick:()=>{u(null),h(!0)},className:`group rounded-xl border border-white/5 border-dashed bg-transparent hover:bg-white/5 flex flex-col items-center justify-center transition-all opacity-30 hover:opacity-100 ${(i==null?void 0:i.size)==="sm"?"h-24":(i==null?void 0:i.size)==="lg"?"h-40":(i==null?void 0:i.size)==="xl"?"h-48":"h-32"}`,children:[e.jsx("div",{className:"p-2 rounded-full bg-white/5 group-hover:bg-white/10 mb-1 transition-colors",children:e.jsx(J,{className:"w-5 h-5 text-white/50"})}),e.jsx("span",{className:"text-[11px] text-white/40 font-medium group-hover:text-white/60",children:"Yeni Ekle"})]})]})})},Is=U.lazy(()=>ee(()=>import("./AddModal-b9YQl9w7.js"),__vite__mapDeps([0,1,2,3,4]))),As=U.lazy(()=>ee(()=>import("./ShortcutSettingsModal-7JjP3Ut6.js"),__vite__mapDeps([5,1,2,6]))),Bs=U.lazy(()=>ee(()=>import("./BackgroundSettingsModal-DLn0MpXH.js"),__vite__mapDeps([7,1,2,4]))),Ts=U.lazy(()=>ee(()=>import("./ClockSettingsModal-BgJzA91Y.js"),__vite__mapDeps([8,1,2,6]))),Ps=U.lazy(()=>ee(()=>import("./FolderViewModal-a6QU9HbF.js"),__vite__mapDeps([9,1,2]))),Fs=()=>{const{shortcuts:t,setShortcuts:s,layout:a,setLayout:n,bgConfig:l,setBgConfig:o,clockConfig:i,setClockConfig:d,cardConfig:u,setCardConfig:h,filterCategory:m,setFilterCategory:x,filterProfile:c,setFilterProfile:f,activeFolderId:b,setActiveFolderId:p,isEditMode:g,setIsEditMode:k,isModalOpen:v,setIsModalOpen:y,isBgModalOpen:E,setIsBgModalOpen:S,isClockModalOpen:N,setIsClockModalOpen:C,editingShortcut:O,setEditingShortcut:j,pendingUrl:B,setPendingUrl:P,activeBgUrl:_,isBgImageLoaded:w,addShortcuts:F,deleteShortcut:A,updateShortcut:z,toggleWidgetVisibility:Z,updateWidgetConfig:te,resetLayout:H}=ie(),V=r.useMemo(()=>l.type==="theme"?l.value:"default",[l]),W=r.useMemo(()=>ws(V),[V]),[ce,de]=U.useState(null),{draggedId:ue,dragOverId:he,onDragStart:me,onDragEnter:xe,onDragOver:L,onDragEnd:R}=fs({layout:a,onReorder:n}),{handlePointerDown:T}=gs({snapGridSize:20,updateWidgetConfig:te}),{handlePointerDown:$}=ps({snapGridSize:20,onResizeEnd:(D,X)=>{}}),I=r.useMemo(()=>t.filter(D=>D.isFolder),[t]),M=a,re=r.useMemo(()=>l.type==="color",[l.type]),K=r.useMemo(()=>l.type==="theme",[l.type]),Ce=r.useMemo(()=>t.find(D=>D.id===b),[t,b]),ct=r.useMemo(()=>{const D={geist:'"Geist Sans", system-ui, sans-serif',system:"system-ui, sans-serif",mono:'"Geist Mono", "Courier New", monospace',serif:"Georgia, serif"};return{fontFamily:D[u.font]??D.geist}},[u.font]),dt=r.useMemo(()=>l.isFreeLayout?`${M.reduce((X,se)=>{if(!se.visible&&!g)return X;const xt=(se.y!==void 0?se.y:0)+(se.heightPx||400);return Math.max(X,xt)},600)+100}px`:"auto",[M,l.isFreeLayout,g]),ut=r.useMemo(()=>({left:"mr-auto ml-0",center:"mx-auto",right:"ml-auto mr-0"})[u.alignment]??"mx-auto",[u.alignment]),ht=D=>{switch(D){case"clock":return e.jsx(yt,{config:i,isEditMode:g,onOpenSettings:()=>C(!0)});case"search":return e.jsx(br,{});case"tasks":return e.jsx(Ur,{});case"categories":return e.jsx(ks,{});case"shortcuts":return e.jsx(_s,{});case"gmail":return e.jsx(Zr,{});case"calendar":return e.jsx(Kr,{});case"stocks":return e.jsx(Vr,{});case"google-tasks":return e.jsx(Qr,{});case"google-keep":return e.jsx(rs,{});case"weather":return e.jsx(ls,{});case"pomodoro":return e.jsx(ds,{});case"spotify":return e.jsx(ms,{});default:return null}},mt=D=>{switch(D){case"clock":return"Saat & Tarih";case"search":return"Arama Çubuğu";case"tasks":return"Görevler (Yerel)";case"categories":return"Kategori & Profil Filtreleri";case"shortcuts":return"Kısayol Izgarası";case"gmail":return"Gmail";case"calendar":return"Takvim";case"stocks":return"Borsa";case"google-tasks":return"Google Görevler";case"google-keep":return"Google Keep";case"weather":return"Hava Durumu";case"pomodoro":return"Pomodoro";case"spotify":return"Spotify"}};return e.jsxs("div",{className:`min-h-screen w-full relative overflow-y-auto overflow-x-hidden flex flex-col text-white transition-colors duration-700 ${K?W.wrapper:""}`,style:{"--theme-accent":W.accentColor,"--menu-bg":W.menuBg,"--menu-border":W.menuBorder,"--menu-bg-rgb":W.menuBgRgb,"--menu-border-rgb":W.menuBorderRgb,...ct},children:[e.jsx(bs,{bgConfig:l,isThemeBg:K,isColorBg:re,activeBgUrl:_,isBgImageLoaded:w,themeOverlayClass:W.overlay||"",themeOverlayStyle:W.overlayStyle,themeOrbs:W.orbs}),e.jsxs("div",{className:"relative z-10 flex-1 flex flex-col p-4 md:p-6 lg:p-8 h-full w-full",children:[e.jsx(vs,{isEditMode:g,setIsEditMode:k,setIsBgModalOpen:S,resetLayout:H}),e.jsx("main",{className:`flex-1 flex flex-col items-center w-full transition-all ${ut} ${l.isFreeLayout?"relative":""}`,children:e.jsx("div",{className:`w-full ${l.isFreeLayout?"absolute top-0 left-0":"flex flex-row flex-wrap justify-start gap-6 items-start"}`,style:l.isFreeLayout?{minHeight:dt}:void 0,children:M.map((D,X)=>!D.visible&&!g?null:e.jsx(js,{widget:D,index:X,isEditMode:g,activeTheme:V,themeStyles:W,showQuickSettings:ce,setShowQuickSettings:de,draggedId:ue,dragOverId:he,onDragStart:me,onDragEnter:xe,onDragOver:L,onDragEnd:R,updateWidgetConfig:te,setIsBgModalOpen:S,setIsClockModalOpen:C,toggleWidgetVisibility:Z,resizeHandler:$,getWidgetLabel:mt,isFreeLayout:l.isFreeLayout,onPointerDownFreeDrag:T,children:ht(D.id)},D.id))})})]}),e.jsxs(r.Suspense,{fallback:null,children:[Ce&&e.jsx(Ps,{folder:Ce,isOpen:!0,onClose:()=>p(null),onEditItem:j,onDeleteItem:A,onAddItem:()=>y(!0)}),e.jsx(Is,{isOpen:v,onClose:()=>{y(!1),P("")},onAdd:F,groups:I,isInsideGroup:b!==null,initialUrl:B}),e.jsx(As,{isOpen:!!O,shortcut:O,allShortcuts:t,onClose:()=>j(null),onSave:z}),e.jsx(Bs,{isOpen:E,currentConfig:l,onClose:()=>S(!1),onSave:o,cardConfig:u,onSaveCard:h,shortcuts:t,onImportShortcuts:s,layout:a,onSaveLayout:n}),e.jsx(Ts,{isOpen:N,config:i,onClose:()=>C(!1),onSave:d})]})]})},it=document.getElementById("root");if(!it)throw new Error("Could not find root element to mount to");const Ms=wt.createRoot(it);Ms.render(e.jsx(U.StrictMode,{children:e.jsx(xs,{children:e.jsx(Fs,{})})}));export{zs as D,Ne as F,Q as P,J as a,G as b,Wt as c,tr as d,He as e,ir as f,oe as g,gr as h,zt as i,We as j,kt as k,st as l,Ws as m,sr as n,Hs as o,$e as p,Tt as q,ye as r,Us as s}; diff --git a/dist-store/index.html b/dist-store/index.html index 96f868f..49befbb 100644 --- a/dist-store/index.html +++ b/dist-store/index.html @@ -1,24 +1,24 @@ - - - - - - GTAB - - - - + + + + + + GTAB + + + + - - -
- - + + +
+ + diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/vite-env.d.ts @@ -0,0 +1 @@ +///