1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AdminMarketplaceDashboardTab-DeznCqrZ.js","assets/query-vendor-D21EOBPj.js","assets/react-vendor-wzkxw4Be.js","assets/index-D2LQAM4H.js","assets/seo-vendor-CwGKcEKF.js","assets/radix-vendor-BPyhJHu2.js","assets/supabase-vendor-kR6BuSaZ.js","assets/i18n-vendor-DHTM_nKn.js","assets/index-B__PEh0O.css","assets/card-Cy_9nZSP.js","assets/skeleton-CKqgDaBh.js","assets/users-BFrzvimV.js","assets/store-DmwBAru_.js","assets/button-B86YiuNJ.js","assets/tabs-DPzGfrDb.js","assets/AdminHeaderSwitcher-CQL7hLWV.js","assets/dropdown-menu-CDQdTKmJ.js","assets/chevron-right-KBDJSA4M.js","assets/check-BfrsabcL.js","assets/chevron-down-BPvMgUtW.js","assets/motion-vendor-BAXfWeLF.js","assets/circle-alert-BLB2XvpZ.js","assets/map-pin-N3k91gsM.js","assets/AdminMarketplaceProducersTab-BtOvP5be.js","assets/input-CQECCY9r.js","assets/badge-BKiA7n5q.js","assets/textarea-fx9IzCVF.js","assets/dialog-rJDUBHd6.js","assets/select-BDmKCuwP.js","assets/chevron-up-Bg9AQ5m7.js","assets/label-D4YhD4aI.js","assets/switch-DFWRZlfr.js","assets/useMarketplaceCertificacoes-DyB8MPUL.js","assets/useDestinations-B9XVN1wr.js","assets/AwardsEditor-Cat14-sh.js","assets/plus-CFja9yuX.js","assets/search-DC8mLYoW.js","assets/circle-x-DGaXXmux.js","assets/square-pen-C-7SbSYe.js","assets/settings-2-Bcs40zSN.js","assets/book-open-DgjXuDZl.js","assets/save-y-7EKlg6.js","assets/AdminMarketplaceProductsTab-D0XgglSB.js","assets/checkbox-tYhfxKca.js","assets/alert-dialog-qSw8mZIV.js","assets/useMarketplaceIndicacoesGeograficas-tofly4Ty.js","assets/useIngredients-BkI1tig5.js","assets/useTypicalDishes-yjmf-KYc.js","assets/image-C9Ex9L6d.js","assets/star-
1BCMOh4ms.js","assets/chevron-left-B0-0WVss.js","assets/trash-2-B9y24U5G.js","assets/index-VuPoiv-4.js","assets/sanitizeHtml-zp3OfoLJ.js","assets/list-Cym17mrh.js","assets/list-ordered-B8KHDqee.js","assets/external-link-U5_WjRXP.js","assets/dollar-sign-C8-UGVmS.js","assets/file-text-DWwKh_rr.js","assets/list-filter-ew7KsMp0.js","assets/link-2-DHoHKkMm.js","assets/form-vendor-BmPm3KuV.js","assets/AdminMarketplaceApprovalsTab-MUXg6ZBs.js","assets/AdminMarketplaceTaxonomyTab-PKH1j0D1.js","assets/scroll-area-5gghzNEm.js","assets/sortable.esm-BXylrAqm.js","assets/grip-vertical-zF6144pR.js","assets/layers-B6MEx3r9.js","assets/tag-DG5US6i2.js","assets/triangle-alert-CrECR48G.js","assets/AdminMarketplaceCertificacoesTab-BdhOEKr4.js","assets/PhotoGalleryManager-DtexZxXF.js","assets/upload-CpPtbEax.js","assets/AdminMarketplaceIndicacoesGeograficasTab-B4Chc8EM.js","assets/useIgs-9_sYlWIY.js","assets/map-CRh90O0Y.js","assets/EntityMultiSelect-dM3hCkLC.js","assets/command-ls_vsnOy.js","assets/popover-nrVlCTM4.js","assets/chevrons-up-down-VR4r4stv.js","assets/leaf-DvGi22cd.js"])))=>i.map(i=>d[i]); 2import{c as d,g as p,b as h,s as g,_ as i}from"./index-D2LQAM4H.js";import{a as b,j as e}from"./query-vendor-D21EOBPj.js";import{N as j,r as a}from"./react-vendor-wzkxw4Be.js";import{B as c}from"./button-B86YiuNJ.js";import{T as v,a as f,b as t,c as r}from"./tabs-DPzGfrDb.js";import{S as o}from"./skeleton-CKqgDaBh.js";import{A as y}from"./AdminHeaderSwitcher-CQL7hLWV.js";import{m as n,A as N}from"./motion-vendor-BAXfWeLF.js";import{C as k}from"./circle-alert-BLB2XvpZ.js";import{L as _,A}from"./dropdown-menu-CDQdTKmJ.js";import{S as w}from"./store-DmwBAru_.js";import{M as T}from"./map-pin-N3k91gsM.js";/** 3 * @license lucide-react v0.462.0 - ISC 4 * 5 * This source code is licensed under the ISC license. 6 * See the LICENSE file in the root directory of this source tree. 7 */const z=d("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** 8 * @license lucide-react v0.462.0 - ISC 9 * 10 * This source code is licensed under the ISC license. 11 * See the LICENSE file in the root directory of this source tree. 12 */const E=d("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 13 * @license lucide-react v0.462.0 - ISC 14 * 15 * This source code is licensed under the ISC license. 16 * See the LICENSE file in the root directory of this source tree. 17 */const M=d("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 18 * @license lucide-react v0.462.0 - ISC 19 * 20 * This source code is licensed under the ISC license. 21 * See the LICENSE file in the root directory of this source tree. 22 */const L=d("Tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]),P=a.lazy(()=>i(()=>import("./AdminMarketplaceDashboardTab-DeznCqrZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]))),C=a.lazy(()=>i(()=>import("./AdminMarketplaceProducersTab-BtOvP5be.js"),__vite__mapDeps([23,1,2,3,4,5,6,7,8,24,13,25,10,26,14,27,28,19,29,18,30,31,32,33,34,35,12,36,37,38,39,40,16,17,41,15,20,21,22]))),S=a.lazy(()=>i(()=>import("./AdminMarketplaceProductsTab-D0XgglSB.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,8,43,18,44,13,32,45,25,46,47,28,19,29,24,10,30,26,27,14,48,20,49,50,17,51,35,34,52,53,54,55,36,38,56,39,57,58,59,60,21,16,22,41,61,15,12]))),I=a.lazy(()=>i(()=>import("./AdminMarketplaceApprovalsTab-MUXg6ZBs.js"),__vite__mapDeps([62,1,2,3,4,5,6,7,8,13,10,27,24,30,18,38,14,15,16,17,19,12,20,21,22]))),O=a.lazy(()=>i(()=>import("./AdminMarketplaceTaxonomyTab-PKH1j0D1.js"),__vite__mapDeps([63,1,2,3,4,5,6,7,8,13,10,27,28,19,29,18,24,30,43,64,14,65,66,51,67,59,35,17,68,60,38,41,69]))),V=a.lazy(()=>i(()=>import("./AdminMarketplaceCertificacoesTab-BdhOEKr4.js"),__vite__mapDeps([70,1,2,3,4,5,6,7,8,13,24,26,30,31,10,27,44,32,71,65,72,66,51,16,17,18,35,48,38,21,41,61]))),D=a.lazy(()=>i(()=>import("./AdminMarketplaceIndicacoesGeograficasTab-B4Chc8EM.js"),__vite__mapDeps([73,1,2,3,4,5,6,7,8,13,24,26,30,31,10,27,44,45,74,75,72,61,76,25,77,36,78,79,18,22,80,71,65,66,51,35,48,38,21,41]))),R=()=>e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(o,{className:"h-8 w-48 rounded-xl"}),e.jsx(o,{className:"h-9 w-32 rounded-xl"})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:6}).map((s,l)=>e.jsx(o,{className:"h-32 rounded-2xl"},l))})]});function B(){const{user:s,signOut:l}=p();h();const{data:m,isLoading:x}=b({queryKey:["is-admin",s?.id],queryFn:async()=>
22{if(!s)return!1;const{data:u}=await g.rpc("is_admin",{_user_id:s.id});return!!u},enabled:!!s});return x?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsxs(n.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"flex flex-col items-center gap-4",children:[e.jsxs("div",{className:"relative w-12 h-12",children:[e.jsx("div",{className:"absolute inset-0 border-4 border-primary/20 rounded-full"}),e.jsx("div",{className:"absolute inset-0 border-4 border-primary border-t-transparent rounded-full animate-spin"})]}),e.jsx("p",{className:"text-sm font-medium text-muted-foreground animate-pulse font-display",children:"Verificando credenciais..."})]})}):s?m?e.jsxs("div",{className:"min-h-screen bg-[radial-gradient(ellipse_at_top_right,_var(--tw-gradient-stops))] from-primary/5 via-background to-background",children:[e.jsx("header",{className:"sticky top-0 z-50 w-full border-b border-white/5 bg-background/60 backdrop-blur-xl supports-[backdrop-filter]:bg-background/40",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"flex h-16 items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(y,{}),e.jsx("div",{className:"h-4 w-px bg-border/50 hidden sm:block"}),e.jsxs("div",{className:"hidden sm:flex items-center gap-2 px-2 py-1 bg-muted/50 rounded-lg border border-border/50",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),e.jsx("span",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest",children:"SISTEMA ATIVO"})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex flex-col items-end hidden md:flex",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:s.email?.split("@")[0]}),e.jsx("span",{className:"text-[10px] text-muted-foreground font-medium uppercase tracking-wider mt-0.5",children:"Administrador Master"})]}),e.jsx("div",{className:"h-8 w-px bg-border/50"}),e.jsxs(c,{variant:"ghost",size:"sm",onClick:()=>l(),className:"rounded-xl gap-2 hover:bg-destructive/10 hover:text-destructive transition-all",children:[e.jsx(_,{size:16}),e.jsx("span",{className:"hidden sm:inline",children:"Encerrar Sessão"})]})]})]})})}),e.jsx("main",{className:"container mx-auto px-4 py-8",children:e.jsxs(v,{defaultValue:"dashboard",className:"space-y-8",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-primary/5 to-transparent rounded-2xl -z-10 blur-xl"}),e.jsxs(f,{className:"w-full justify-start h-auto p-1 bg-muted/30 backdrop-blur-md border border-white/5 rounded-2xl flex-wrap gap-1",children:[e.jsxs(t,{value:"dashboard",className:"rounded-xl px-4 py-2 gap-2 data-[state=active]:bg-background data-[state=active]:shadow-lg transition-all",children:[e.jsx(M,{size:15})," Dashboard"]}),e.jsxs(t,{value:"producers",className:"rounded-xl px-4 py-2 gap-2 data-[state=active]:bg-background data-[state=active]:shadow-lg transition-all",children:[e.jsx(w,{size:15})," Produtores"]}),e.jsxs(t,{value:"products",className:"rounded-xl px-4 py-2 gap-2 data-[state=active]:bg-background data-[state=active]:shadow-lg transition-all",children:[e.jsx(z,{size:15})," Produtos"]}),e.jsxs(t,{value:"approvals",className:"rounded-xl px-4 py-2 gap-2 data-[state=active]:bg-background data-[state=active]:shadow-lg transition-all",children:[e.jsx(E,{size:15})," Aprovações"]}),e.jsxs(t,{value:"taxonomy",className:"rounded-xl px-4 py-2 gap-2 data-[state=active]:bg-background data-[state=active]:shadow-lg transition-all",children:[e.jsx(L,{size:15})," Taxonomia & Atributos"]}),e.jsxs(t,{value:"certificacoes",className:"rounded-xl px-4 py-2 gap-2 data-[state=active]:bg-background data-[state=active]:shadow-lg transition-all",children:[e.jsx(A,{size:15})," Certificações"]}),e.jsxs(t,{value:"igs",className:"rounded-xl px-4 py-2 gap-2 data-[state=active]:bg-background data-[state=active]:shadow-lg transition-all",children:[e.jsx(T,{size:15})," Indicações Geográficas"]})]})]}),e.jsx(N,{mode:"wait",children:e.jsx(n.div,{initial:{opacity:0,y:10}
22,animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:e.jsxs(a.Suspense,{fallback:e.jsx(R,{}),children:[e.jsx(r,{value:"dashboard",className:"mt-0 outline-none",children:e.jsx(P,{})}),e.jsx(r,{value:"producers",className:"mt-0 outline-none",children:e.jsx(C,{})}),e.jsx(r,{value:"products",className:"mt-0 outline-none",children:e.jsx(S,{})}),e.jsx(r,{value:"approvals",className:"mt-0 outline-none",children:e.jsx(I,{})}),e.jsx(r,{value:"taxonomy",className:"mt-0 outline-none",children:e.jsx(O,{})}),e.jsx(r,{value:"certificacoes",className:"mt-0 outline-none",children:e.jsx(V,{})}),e.jsx(r,{value:"igs",className:"mt-0 outline-none",children:e.jsx(D,{})})]})},"admin-marketplace-content")})]})})]}):e.jsx("div",{className:"min-h-screen bg-background flex flex-col items-center justify-center gap-6 p-8",children:e.jsxs(n.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},className:"bg-card/50 backdrop-blur-xl border border-border p-8 rounded-3xl shadow-2xl flex flex-col items-center text-center max-w-sm",children:[e.jsx("div",{className:"w-16 h-16 bg-destructive/10 text-destructive rounded-2xl flex items-center justify-center mb-4",children:e.jsx(k,{size:32})}),e.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:"Acesso Restrito"}),e.jsx("p",{className:"text-muted-foreground mt-2 leading-relaxed",children:"Esta área é exclusiva para administradores da plataforma. Se você acredita que isso é um erro, entre em contato com o suporte."}),e.jsx(c,{onClick:()=>window.location.href="/",variant:"outline",className:"mt-6 rounded-xl hover:bg-muted transition-all",children:"Voltar ao inÃcio"})]})}):e.jsx(j,{to:"/login",replace:!0})}const Y=Object.freeze(Object.defineProperty({__proto__:null,default:B},Symbol.toStringTag,{value:"Module"}));export{Y as A,z as B,E as C};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.