PageSourceSearch

https://featherless.ai/_nuxt/BDAMgXqo.js

js featherless.ai collected 2026-09-24 18:29:31 UTC 3,613 bytes, 1 lines download raw bytes

1import{_ as D}from"./FifX-Uep.js";import{_ as V}from"./CRliR9m2.js";import{_ as L}from"./CKuPrOTA.js";import{_ as N}from"./DyS77D00.js";import{_ as z}from"./eYheClwx.js";import{_ as B}from"./CO035eX4.js";import{_ as T}from"./BQgQ1xeP.js";import{I as _}from"./D9N4QPNq.js";import{P as E,eH as R,fy as S,eV as U,r as F,u as l,bK as t,aN as c,M as n,y as b,an as H,bm as i,L as u,bd as y,aW as K,fx as M}from"./uKV8ELha.js";import"./iOpeB5ah.js";import"./CjY-uNxZ.js";import"./sSDfXBcP.js";import"./Bffxfc44.js";import"./Dme3TewS.js";import"./BUR93Qx9.js";import"./cJAlx_GW.js";import"./CaoggYkt.js";import"./xBsWRliO.js";import"./DqderYID.js";import"./BNmrxVE5.js";try{let o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new o.Error().stack;r&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[r]="0d961e5b-18a9-4e0b-9d72-764fe3830fc5",o._sentryDebugIdIdentifier="sentry-dbid-0d961e5b-18a9-4e0b-9d72-764fe3830fc5")}catch{}const Q={class:"mb-4"},W={class:"font-semibold"},j={class:"font-mono text-xs text-content-secondary"},pe=E({__name:"index",setup(o){const r=R(),{toast:g}=S(),{showAlert:h}=M(),d=K(""),{data:p,pending:x,refresh:P}=U("admin-plans",()=>r.admin.plans.list(),{server:!1}),$=F(()=>{if(!p.value)return[];if(!d.value.trim())return p.value;const s=d.value.toLowerCase();return p.value.filter(e=>e.id.toLowerCase().includes(s)||e.name.toLowerCase().includes(s)||e.app.toLowerCase().includes(s))});async function w(s){const e=!s.paused;await h({title:"Confirm Action",description:e?`Pause "${s.name}"? New signups will be blocked. Existing subscribers are unaffected.`:`Resume "${s.name}"? New signups will be allowed again.`,primaryAction:{label:e?"Pause":"Resume",destructive:e,onAction:async()=>{try{await r.admin.plans.update(s.id,{paused:e}),await P(),g({title:"Plan Updated",description:`"${s.name}" is now ${e?"paused":"active"}.`})}catch(m){g({title:"Error",description:m instanceof Error?m.message:"Failed to update plan",variant:"destructive"})}}}})}return(s,e)=>{const m=D,f=V,v=L,k=N,A=z,C=B;return c(),l(C,{title:"Plans","return-to":"/admin"},{sidebar:t(()=>[n(T)]),default:t(()=>[n(A,{fluid:""},{default:t(()=>[b("div",Q,[n(m,{modelValue:i(d),"onUpdate:modelValue":e[0]||(e[0]=a=>H(d)?d.value=a:null),placeholder:"Search plans by ID, name, or app...",class:"max-w-md"},{prefix:t(()=>[n(i(_),{icon:"lucide:search",class:"text-content-secondary"})]),_:1},8,["modelValue"])]),n(k,{"vertical-align":"top",loading:i(x),"resource-name":{singular:"plan",plural:"plans"},items:i($),columns:[{attribute:"name",header:"Plan"},{attribute:"app",header:"App",width:140},{attribute:"status",header:"Status",width:140,horizontalAlign:"center"},{attribute:"actions",header:"Actions",width:160,horizontalAlign:"center"}]},{name:t(({item:a})=>[b("div",W,y(a.name),1),b("div",j,y(a.id),1)]),app:t(({item:a})=>[n(f,{variant:"secondary"},{default:t(()=>[u(y(a.app),1)]),_:2},1024)]),status:t(({item:a})=>[a.paused?(c(),l(f,{key:0,variant:"warning"},{default:t(()=>[...e[1]||(e[1]=[u(" Paused ",-1)])]),_:1})):(c(),l(f,{key:1,variant:"success"},{default:t(()=>[...e[2]||(e[2]=[u(" Active ",-1)])]),_:1}))]),actions:t(({item:a})=>[a.paused?(c(),l(v,{key:0,size:"sm",onClick:I=>w(a)},{default:t(()=>[n(i(_),{icon:"lucide:play",class:"mr-2"}),e[3]||(e[3]=u(" Resume ",-1))]),_:1},8,["onClick"])):(c(),l(v,{key:1,variant:"secondary",size:"sm",onClick:I=>w(a)},{default:t(()=>[n(i(_),{icon:"lucide:pause",class:"mr-2"}),e[4]||(e[4]=u(" Pause ",-1))]),_:1},8,["onClick"]))]),_:1},8,["loading","items"])]),_:1})]),_:1})}}});
1export{pe as default};

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.