PageSourceSearch

https://prod.mechai.app/chunk-3XNUWR2V.js

js mechai.app collected 2026-10-02 15:19:59 UTC 12,406 bytes, 1 lines download raw bytes

1import{c as W}from"./chunk-UCQ33POQ.js";import{a as T}from"./chunk-24XNY7MW.js";import"./chunk-NWFF56ZO.js";import{a as Q}from"./chunk-KBXFQT45.js";import"./chunk-6XZIC5CN.js";import{a as J}from"./chunk-EHQTGEX5.js";import{a as G}from"./chunk-QSROY3AW.js";import"./chunk-VH7RDF6K.js";import{kb as U}from"./chunk-GNOMKHH2.js";import"./chunk-MIYW5325.js";import"./chunk-FJFH4XCE.js";import"./chunk-T52FVTMS.js";import{u as z,v as H}from"./chunk-4I6Y24VE.js";import"./chunk-VHBEXHUY.js";import"./chunk-IXNXTOPZ.js";import"./chunk-GGY6QDTV.js";import"./chunk-3WQEZLC2.js";import"./chunk-DB7AUQFG.js";import"./chunk-GLFTJW2T.js";import"./chunk-BHLMCFFK.js";import"./chunk-IS3P6TAG.js";import"./chunk-VHXJDH4D.js";import"./chunk-NP4PC25X.js";import"./chunk-D6IOGJMO.js";import{m as q}from"./chunk-MKJMCBBH.js";import"./chunk-KKDZHWJ2.js";import"./chunk-RS4X3CMD.js";import"./chunk-7DHSGR33.js";import{b as R,h as j,i as B,n as K}from"./chunk-4KDBBJRG.js";import"./chunk-3SEIXLDK.js";import{a as $}from"./chunk-V5PNMQTV.js";import{c as I,d as O}from"./chunk-UIEAU6S2.js";import{k as F,l as L,q as V,x as k}from"./chunk-H3Y6JSWE.js";import{C as P,Hb as C,Rb as d,Sb as n,Tb as r,Ub as l,Uc as u,Vc as f,bc as S,cb as N,db as a,gc as p,ic as w,kd as D,mb as c,oa as v,pa as g,sb as x,uc as _,wa as M,wc as m,xc as A,yb as h,yc as y}from"./chunk-AHLRJ2EW.js";import"./chunk-AMJ4GB2S.js";import"./chunk-OXDKANHF.js";import"./chunk-WGJEEJGF.js";import"./chunk-6ACFICIG.js";import"./chunk-K7BHMZHH.js";import"./chunk-FE7444LI.js";import"./chunk-XUHYVR5R.js";var E=[{label:"Insights",items:[{id:"overview",label:"Overview",icon:"activity",route:"overview"}]},{label:"People",items:[{id:"users",label:"Users",icon:"users",route:"users"},{id:"subscriptions",label:"Subscriptions",icon:"credit-card",route:"subscriptions"}]},{label:"Support",items:[{id:"support",label:"Support",icon:"help-circle",route:"support"}]},{label:"Content",items:[{id:"prompts",label:"Prompts",icon:"message-square",route:"prompts"},{id:"corrections",label:"Corrections",icon:"file-text",route:"corrections"},{id:"notifications",label:"Notifications",icon:"bell",route:"notifications"}]},{label:"Operations",items:[{id:"shop-pilots",label:"Shop pilots",labelKey:"V2.ADMIN_PILOT.TITLE",icon:"users",route:"shop-pilots"},{id:"logs",label:"Request Logs",icon:"list",route:"logs"},{id:"audit",label:"Audit Trail",icon:"shield",route:"audit"},{id:"spend",label:"Cloud Spend",icon:"dollar-sign",route:"spend"}]}];function ne(e,b){if(e&1){let t=S();n(0,"li")(1,"button",10),p("click",function(){let i=v(t).$implicit,s=w(2);return g(s.onItem(i))}),n(2,"span",11),l(3,"app-admin-icon",16),r(),n(4,"span",13),m(5),u(6,"translate"),r()()()}if(e&2){let t=b.$implicit,o=w(2);a(),_("is-active",o.activeId===t.id),C("aria-current",o.activeId===t.id?"page":null),a(2),d("name",t.icon),a(2),A(t.labelKey?f(6,5,t.labelKey):t.label)}}function oe(e,b){if(e&1&&(n(0,"div")(1,"p",14),m(2),r(),n(3,"ul",15),h(4,ne,7,7,"li",8),r()()),e&2){let t=b.$implicit;a(2),y(" ",t.label," "),a(2),d("ngForOf",t.items)}}var X=(()=>{class e{constructor(){this.activeId="overview",this.itemSelected=new M,this.exitAdmin=new M,this.sections=E}onItem(t){this.itemSelected.emit(t)}onExit(){this.exitAdmin.emit()}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["app-admin-sidebar"]],inputs:{activeId:"activeId"},outputs:{itemSelected:"itemSelected",exitAdmin:"exitAdmin"},decls:17,vars:1,consts:[["aria-label","Admin sidebar",1,"admin-sidebar","tw-flex","tw-flex-col","tw-bg-mech-surface-inverse","tw-text-mech-text-inverse"],[1,"tw-px-6","tw-py-5","tw-flex","tw-items-center","tw-justify-between","tw-border-b","tw-border-white/10"],[1,"tw-flex","tw-items-center","tw-gap-3"],["variant","tile","size","md"],[1,"tw-flex","tw-flex-col","tw-leading-tight"],[1,"tw-text-sm","tw-font-extrabold","tw-tracking-wide","tw-text-white","tw-uppercase"],[1,"tw-text-[11px]","tw-uppercase","tw-tracking-widest","tw-text-mech-primary-light"],["aria-label","Admin navigation",1,"tw-flex-1","tw-overflow-y-auto","tw-px-3","tw-py-4","tw-space-y-6"],[4,"ngFor","ngForOf"],[1,"admin-exit-row","tw-border-t","tw-border-white/10","tw-px-3","tw-pt-3"],["type","button",1,"admin-nav-item",3,"click"],[1,"tw-w-4","tw-h-4","tw-flex","tw-items-center","tw-justify-center"],["name","log-out"],[1,"tw-text-sm"],[1,"tw-px-3","tw-mb-2","tw-text-[10px]","tw-font-semibold","tw-uppercase","tw-tracking-widest","tw-text-mech-text-inverse","t
1w-opacity-60"],[1,"tw-space-y-1"],[3,"name"]],template:function(o,i){o&1&&(n(0,"aside",0)(1,"div",1)(2,"div",2),l(3,"app-mech-logo",3),n(4,"div",4)(5,"span",5),m(6,"Mech AI"),r(),n(7,"span",6),m(8,"Admin"),r()()()(),n(9,"nav",7),h(10,oe,5,2,"div",8),r(),n(11,"div",9)(12,"button",10),p("click",function(){return i.onExit()}),n(13,"span",11),l(14,"app-admin-icon",12),r(),n(15,"span",13),m(16,"Exit admin"),r()()()()),o&2&&(a(10),d("ngForOf",i.sections))},dependencies:[O,k,F,$,T,I],styles:["[_nghost-%COMP%]{display:block;width:240px;height:100%}.admin-sidebar[_ngcontent-%COMP%]{width:100%;height:100%}.admin-exit-row[_ngcontent-%COMP%]{padding-bottom:max(12px,env(safe-area-inset-bottom))}.admin-nav-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;width:100%;padding:8px 12px;border:none;background:transparent;color:var(--color-text-inverse);border-radius:8px;cursor:pointer;transition:background-color .12s ease,color .12s ease;text-align:left}.admin-nav-item[_ngcontent-%COMP%]:hover{background-color:#ffffff0f;color:var(--color-text-inverse)}.admin-nav-item.is-active[_ngcontent-%COMP%]{background-color:var(--color-primary-100);color:var(--color-text-inverse);box-shadow:inset 2px 0 0 var(--color-primary)}"],changeDetection:0})}}return e})();function re(e,b){if(e&1){let t=S();n(0,"div",17),p("click",function(){v(t);let i=w();return g(i.closeSidebar())}),r()}}var Y=(()=>{class e{constructor(t,o,i,s){this.router=t,this.store=o,this.cdr=i,this.themeService=s,this.activeId="overview",this.activeLabel="Overview",this.adminName="Admin",this.sidebarOpen=!1}ngOnInit(){this.themeService.attachBodyTheme(),this.routerSub=this.router.events.pipe(P(t=>t instanceof R)).subscribe(t=>this.syncActive(t.urlAfterRedirects)),this.syncActive(this.router.url),this.authSub=this.store.select(U.currentUser).subscribe(t=>{this.adminName=t?J(t):"Admin",this.cdr.markForCheck()})}ngOnDestroy(){this.themeService.detachBodyTheme(),this.routerSub?.unsubscribe(),this.authSub?.unsubscribe()}toggleSidebar(){this.sidebarOpen=!this.sidebarOpen,this.cdr.markForCheck()}closeSidebar(){this.sidebarOpen=!1,this.cdr.markForCheck()}onEscapeKey(){this.sidebarOpen&&this.closeSidebar()}onItemSelected(t){this.closeSidebar(),this.router.navigate(["/v2/admin",t.route])}onExitAdmin(){this.closeSidebar(),this.router.navigate(["/v2/home"])}syncActive(t){let i=t.match(/\/admin\/?([^/?#]*)/)?.[1]||"overview";this.activeId=i,this.activeLabel=this.findLabel(i),this.cdr.markForCheck()}findLabel(t){for(let o of E){let i=o.items.find(s=>s.route===t);if(i)return i.label}return"Admin"}static{this.\u0275fac=function(o){return new(o||e)(c(B),c(q),c(D),c(G))}}static{this.\u0275cmp=x({type:e,selectors:[["app-admin-shell"]],hostBindings:function(o,i){o&1&&p("keydown.escape",function(){return i.onEscapeKey()},N)},decls:24,vars:14,consts:[[1,"mech-v2-shell","admin-shell","tw-flex","tw-h-screen","tw-overflow-hidden","tw-font-sans","tw-bg-mech-bg"],["role","presentation","aria-hidden","true","class","admin-sidebar-backdrop sm:tw-hidden",3,"click",4,"ngIf"],[1,"admin-sidebar-wrapper",3,"cdkTrapFocus","cdkTrapFocusAutoCapture"],[3,"itemSelected","exitAdmin","activeId"],[1,"tw-flex-1","tw-flex","tw-flex-col","tw-min-w-0","tw-overflow-hidden"],[1,"admin-topbar","tw-flex","tw-items-center","tw-justify-between","tw-px-4","sm:tw-px-8","tw-bg-mech-surface","tw-border-b","tw-border-mech-border-strong"],[1,"tw-flex","tw-items-center","tw-gap-3"],["type","button","aria-label","Toggle navigation",1,"admin-menu-btn","sm:tw-hidden","tw-w-8","tw-h-8","tw-flex","tw-items-center","tw-justify-center","tw-rounded-lg","tw-text-mech-dark-500","hover:tw-bg-mech-surface-2","tw-border-0","tw-bg-transparent","tw-cursor-pointer",3,"click"],[1,"tw-w-5","tw-h-5","tw-flex","tw-items-center","tw-justify-center"],[3,"name"],[1,"tw-flex","tw-flex-col","tw-gap-0.5"],[1,"tw-text-[11px]","tw-uppercase","tw-tracking-widest","tw-text-mech-text-muted","tw-m-0"],[1,"tw-text-lg","tw-font-semibold","tw-text-mech-dark","tw-m-0"],[1,"tw-flex","tw-items-center","tw-gap-2","sm:tw-gap-3","tw-text-sm","tw-text-mech-dark-500"],[1,"tw-text-mech-dark","tw-hidden","sm:tw-inline"],[1,"tw-px-2","tw-py-0.5","tw-rounded-full","tw-text-[10px]","tw-font-semibold","tw-uppercase","tw-tracking-wider","tw-bg-mech-primary-50","tw-text-mech-primary"],[1,"tw-flex-1","tw-overflow-y-auto","tw-p-4","sm:tw-p-6","lg:tw-p-8"],["role","presentation","aria-hidden","true",1,"admin-sidebar-backdrop","sm:tw-hidden",3,"click"]],template:function(o,i){o&1&&(n(0,"div",0),u(1,"async"),h(2,re,1,0,"div",1),n(3,"div",2)(4,"app-admin-sidebar",3),p("itemSelected",function(Z){return i.onItemSelected(Z)})("exitAdmin",function(){return i.onExitAdmin()}),r()(),n(5,"main",4)(6,"header",5)(7,"div",6)(8,"button",7),p("click",function(){return i.toggleSidebar()}),n(9,"span",8),l(10,"app-admin-icon",9),r()(),n(11,"div",10)(12,"p",11),m(13,"Mech AI Admin"),r(),n(14,"h1",12),m(15),u(16,"translate"),r()()(),n(17,"div",13)(18,"span",14),m(19),r(),n(20,"span",15),m(21," Root "),r()()(),n(22,"div",16),l(23,"router-outlet"),r()()()),o&2&&(C("data-theme",f(1,10,i.themeService.theme$)),a(2),d("ngIf",i.sidebarOpen),a(),_("is-open",i.sidebarOpen),d("cdkTrapFocus",i.sidebarOpen)("cdkTrapFocusAutoCapture",i.sidebarOpen),a(),d("activeId",i.activeId),a(6),d("name",i.sidebarOpen?"x":"menu"),a(5),y(" ",i.activeId==="shop-pilots"?f(16,12,"V2.ADMIN_PILOT.TITLE"):i.activeLabel," "),a(4),A(i.adminName))},dependencies:[O,k,L,K,j,H,z,X,T,I,V],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.admin-topbar[_ngcontent-%COMP%]{height:calc(64px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);flex-shrink:0}.admin-sidebar-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0006;z-index:49}.admin-sidebar-wrapper[_ngcontent-%COMP%]{position:fixed;top:0;left:0;height:100%;z-index:50;transform:translate(-100%);transition:transform .3s cubic-bezier(.4,0,.2,1)}.admin-sidebar-wrapper.is-open[_ngcontent-%COMP%]{transform:translate(0)}@media(min-width:640px){.admin-sidebar-backdrop[_ngcontent-%COMP%]{display:none}.admin-sidebar-wrapper[_ngcontent-%COMP%]{position:static;transform:none;transition:none;flex-shrink:0}}"],changeDetection:0})}}return e})();
1var Le=[{path:"",component:Y,canActivate:[Q,W],children:[{path:"",redirectTo:"overview",pathMatch:"full"},{path:"overview",loadComponent:()=>import("./chunk-F2VYQVTB.js").then(e=>e.AdminOverviewComponent)},{path:"users",loadComponent:()=>import("./chunk-PBMJLRI6.js").then(e=>e.AdminUsersComponent)},{path:"shop-pilots",loadComponent:()=>import("./chunk-2J6Q2H6U.js").then(e=>e.AdminShopPilotsComponent)},{path:"subscriptions",loadComponent:()=>import("./chunk-L3ZEZWLQ.js").then(e=>e.AdminSubscriptionsComponent)},{path:"support",loadComponent:()=>import("./chunk-7VGMPXKH.js").then(e=>e.AdminSupportListComponent)},{path:"support/:id",loadComponent:()=>import("./chunk-F3V7VZAC.js").then(e=>e.AdminSupportDetailComponent)},{path:"prompts",loadComponent:()=>import("./chunk-3YRHKEE7.js").then(e=>e.AdminPromptsListComponent)},{path:"prompts/legacy",loadComponent:()=>import("./chunk-CLCI3EZ5.js").then(e=>e.AdminPromptsLegacyComponent)},{path:"prompts/gemini/:key",loadComponent:()=>import("./chunk-GF2PTO2W.js").then(e=>e.AdminPromptsGeminiComponent)},{path:"notifications",loadComponent:()=>import("./chunk-DLEXFOY3.js").then(e=>e.AdminNotificationsComponent)},{path:"corrections",loadComponent:()=>import("./chunk-RLPIVDPP.js").then(e=>e.AdminContentCorrectionsComponent)},{path:"logs",loadComponent:()=>import("./chunk-D2MEYN2T.js").then(e=>e.AdminPlaceholderComponent),data:{title:"Request Logs",description:"Per-user request counters + error breakdown."}},{path:"audit",loadComponent:()=>import("./chunk-QPDCKFL4.js").then(e=>e.AdminAuditComponent)},{path:"spend",loadComponent:()=>import("./chunk-WXRPX5BY.js").then(e=>e.AdminSpendComponent)},{path:"**",redirectTo:"overview"}]}];export{Le as ADMIN_ROUTES};

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.