PageSourceSearch

https://app.joyso.ai/assets/AvailableChannelsView-DjDym2zX.js

js joyso.ai collected 2026-10-05 14:38:29 UTC 20,915 bytes, 1 lines download raw bytes

1import{d as K,c as I,z as a,C as t,B as l,G as s,r as S,Q as re,D as L,A as T,u as r,E as p,H as _,R as se,L as te,S as ie,U as ne,F as v,k as m,W as C,n as oe,o as ue,K as V,M as ce}from"./vendor-vue-BVJWaRIf.js";import{_ as de}from"./AppLayout.vue_vue_type_script_setup_true_lang-BcOvjNWX.js";import{T as me}from"./TablePageLayout-BohgZIYp.js";import{f as pe,a as le,_ as k}from"./index-xMHQ6xfX.js";import{_ as U}from"./PlatformIcon.vue_vue_type_script_setup_true_lang-Dsanj3Um.js";import{_ as D}from"./GroupBadge.vue_vue_type_script_setup_true_lang-BPDXqyRF.js";import{f as H,r as xe}from"./pricing-DFfTvfS3.js";import{B as W,a as j,b as F,c as Z}from"./channel-CvMwqZOU.js";import{p as fe,e as ge,a as Q}from"./platformColors-n7Cdjx-Y.js";import{u as J}from"./vendor-i18n-pgwztqC8.js";import{h as be,f as ye,s as he}from"./peak-rate-qZGUWdry.js";import{u as ve}from"./groups-u-BXEB33.js";import{a as ke}from"./apiError-zX02PgX9.js";import"./AppHeader.vue_vue_type_style_index_0_scoped_59fb3e77_lang-B0IcU52u.js";import"./vendor-misc-g39fh_pU.js";import"./useClipboard-sjDNYCUN.js";import"./LocaleSwitcher-6jc2cSqg.js";/* empty css                                                                       */async function _e(e){const{data:x}=await pe.get("/channels/available",{signal:e==null?void 0:e.signal});return x}const we={getAvailable:_e},$e={class:"flex justify-between gap-2"},Pe={class:"text-gray-500 dark:text-gray-400"},Ce={class:"font-mono"},R=K({__name:"PricingRow",props:{label:{},value:{default:null},unit:{},scale:{}},setup(e){const x=e,f=I(()=>x.value==null?"-":`${H(x.value,x.scale)} ${x.unit}`);return(i,w)=>(t(),a("div",$e,[l("span",Pe,s(e.label),1),l("span",Ce,s(f.value),1)]))}}),Le={class:"relative inline-block"},Me={key:1,class:"rounded bg-gray-200/60 px-1 text-[10px] uppercase text-gray-600 dark:bg-dark-700 dark:text-gray-400"},Re={class:"truncate font-semibold"},ze={key:0,class:"flex-shrink-0 rounded bg-white/70 px-1.5 py-0.5 text-[10px] uppercase tracking-wide dark:bg-dark-900/60"},Ee={class:"p-3"},Be={key:0,class:"text-gray-500 dark:text-gray-400"},Ge={key:1,class:"space-y-2 text-gray-700 dark:text-gray-300"},Se={class:"flex justify-between"},Te={class:"text-gray-500 dark:text-gray-400"},Ie={class:"mb-1 font-medium text-gray-600 dark:text-gray-400"},qe={class:"space-y-1"},Ae={class:"text-gray-500 dark:text-gray-400"},B=1e6,ee=K({__name:"SupportedModelChip",props:{model:{},pricingKeyPrefix:{default:"availableChannels.pricing"},noPricingLabel:{default:""},showPlatform:{type:Boolean,default:!0},platformHint:{default:""}},setup(e){const x=e,f=I(()=>x.model.platform||x.platformHint||""),{t:i}=J(),w=I(()=>f.value?fe(f.value):"border-gray-200 dark:border-dark-600"),z=I(()=>f.value?ge(f.value):"bg-gray-50 text-gray-700 dark:bg-dark-700/60 dark:text-gray-300");function o(P){return`${x.pricingKeyPrefix}.${P}`}const E=I(()=>{var y;switch((y=x.model.pricing)==null?void 0:y.billing_mode){case Z:return i(o("billingModeToken"));case F:return i(o("billingModePerRequest"));case j:return i(o("billingModeImage"));case W:return i(o("billingModeVideo"));default:return"-"}});function G(P,y){const b=y==null?"∞":String(y);return`(${P}, ${b}]`}function h(P,y){if(y.billing_mode===W)return`${H(P.per_request_price,1)} ${i(o("unitPerSecond"))}`;if(y.billing_mode===F||y.billing_mode===j)return H(P.per_request_price,1);const b=xe(P,y),M=H(b.input_price,B),A=H(b.output_price,B);return`${M} / ${A}`}const g=S(!1),c=S(null),$=S(null),u=S({top:"0px",left:"0px"});function n(){const P=c.value;if(!P)return;const y=P.getBoundingClientRect(),b=8,M=$.value,A=(M==null?void 0:M.offsetWidth)??320,X=(M==null?void 0:M.offsetHeight)??240,Y=window.innerWidth,ae=window.innerHeight;let O=y.bottom+b;O+X>ae-b&&(O=Math.max(b,y.top-X-b));let N=y.left+y.width/2-A/2;N<b&&(N=b),N+A>Y-b&&(N=Y-b-A),u.value={top:`${Math.round(O)}px`,left:`${Math.round(N)}px`}}function d(){g.value=!0,oe(()=>{n(),window.addEventListener("scroll",n,!0),window.addEventListener("resize",n)})}function q(){g.value=!1,window.removeEventListener("scroll",n,!0),window.removeEventListener("resize",n)}return re(()=>{window.removeEventListener("scroll",n,!0),window.removeEventListener("resize",n)}),(P,y)=>(t(),a("div",Le,[l("span",{ref_key:"triggerEl",ref:c,class:T(["inline-flex cursor-help items-center gap-1 rounded-md border px-2 py-0.5 text-xs font-medium transition-colors",f.value?r(Q)(f.value):"border-gray-200 bg-gray-50 text-gray-700 dark:border-dark-600 dark:bg-dark-800 dark:text-gray-300"]),onMouseenter:d,onMouseleave:q,onFocusin:d,onFocusout:q,tabindex:"0"},[f.value?(t(),L(U,{key:0,platform:f.value,size:"xs"},null,8,["platform"])):p("",!0),e.showPlatform&&e.model.platform?(t(),a("span",Me,s(e.model.platform),1)):p("",!0),_(" "+s(e.model.name),1)],34),(t(),L(se,{to:"body"},[te(l("div",{ref_key:"popoverEl",ref:$,role:"tooltip",class:T(["pointer-events-none fixed z-[99999] w-80 max-w-[min(22rem,calc(100vw-1rem))] rounded-lg border bg-white text-xs shadow-xl dark:bg-dark-800",[w.value]]),style:ne(u.value)},[l("div",{class:T(["flex items-center justify-between gap-2 rounded-t-lg border-b px-3 py-2",[z.value,w.value]])},[l("span",Re,s(e.model.name),1),e.model.platform?(t(),a("span",ze,s(e.model.platform),1)):p("",!0)],2),l("div",Ee,[e.model.pricing?(t(),a("div",Ge,[l("div",Se,[l("span",Te,s(r(i)(o("billingMode"))),1),l("span",null,s(E.value),1)]),e.model.pricing.billing_mode===r(Z)?(t(),a(v,{key:0},[m(R,{label:r(i)(o("inputPrice")),value:e.model.pricing.input_price,unit:r(i)(o("unitPerMillion")),scale:B},null,8,["label","value","unit"]),m(R,{label:r(i)(o("outputPrice")),value:e.model.pricing.output_price,unit:r(i)(o("unitPerMillion")),scale:B},null,8,["label","value","unit"]),m(R,{label:r(i)(o("cacheWrite5mPrice")),value:e.model.pricing.cache_write_price,unit:r(i)(o("unitPerMillion")),scale:B},null,8,["label","value","unit"]),e.model.pricing.cache_write_1h_price!=null?(t(),L(R,{key:0,label:r(i)(o("cacheWrite1hPrice")),value:e.model.pricing.cache_write_1h_price,unit:r(i)(o("unitPerMillion")),scale:B},null,8,["label","value","unit"])):p("",!0),m(R,{label:r(i)(o("cacheReadPrice")),value:e.model.pricing.cache_read_price,unit:r(i)(o("unitPerMillion")),scale:B},null,8,["label","value","unit"]),e.model.pricing.image_input_price!=null&&e.model.pricing.image_input_price>0?(t(),L(R,{key:1,label:r(i)(o("imageInputPrice")),value:e.model.pricing.image_input_price,unit:r(i)(o("unitPerMillion")),scale:B},null,8,["label","value","unit"])):p("",!0),e.model.pricing.image_output_price!=null&&e.model.pricing.image_output_price>0?(t(),L(R,{key:2,label:r(i)(o("imageOutputPrice")),value:e.model.pricing.image_output_price,unit:r(i)(o("unitPerMillion")),scale:B},null,8,["label","value","unit"])):p("",!0)],64)):p("",!0),e.model.pricing.billing_mode===r(F)&&e.model.pricing.per_request_price!=null?(t(),L(R,{key:1,label:r(i)(o("perRequestPrice")),value:e.model.pricing.per_request_price,unit:r(i)(o("unitPerRequest")),scale:1},null,8,["label","value","unit"])):p("",!0),e.model.pricing.billing_mode===r(j)&&e.model.pricing.image_output_price!=null?(t(),L(R,{key:2,label:r(i)(o("imageOutputPrice")),value:e.model.pricing.image_output_price,unit:r(i)(o("unitPerRequest")),scale:1},null,8,["label","value","unit"])):p("",!0),e.model.pricing.billing_mode===r(W)&&e.model.pricing.per_request_price!=null?(t(),L(R,{key:3,label:r(i)(o("videoPrice")),value:e.model.pricing.per_request_price,unit:r(i)(o("unitPerSecond")),scale:1},null,8,["label","value","unit"])):p("",!0),e.model.pricing.intervals&&e.model.pricing.intervals.length>0?(t(),a("div",{key:4,class:T(["mt-2 border-t pt-2",[w.value]])},[l("div",Ie,s(r(i)(o("intervals"))),1),l("div",qe,[(t(!0),a(v,null,C(e.model.pricing.intervals,(b,M)=>(t(),a("div",{key:M,class:"flex justify-between text-[11px]"},[l("span",Ae,[b.tier_label?(t(),a(v,{key:0},[_(s(b.tier_label),1)],64)):(t(),a(v,{key:1},[_(s(G(b.min_tokens,b.max_tokens)),1)],64))]),l("span",null,s(h(b,e.model.pricing)),1
1)]))),128))])],2)):p("",!0)])):(t(),a("div",Be,s(e.noPricingLabel),1))])],6),[[ie,g.value]])]))]))}}),Ne={class:"table-wrapper"},He={"data-testid":"desktop-channels",class:"!hidden w-full table-fixed border-collapse text-sm lg:!table"},De={class:"border-b border-gray-100 bg-gray-50/50 text-xs font-medium uppercase tracking-wide text-gray-500 dark:border-dark-700 dark:bg-dark-800/50 dark:text-gray-400"},Ke={class:"w-[180px] px-4 py-3 text-center"},Oe={class:"w-[200px] px-4 py-3 text-left"},Ve={class:"w-[140px] px-4 py-3 text-left"},We={class:"px-4 py-3 text-left"},je={class:"px-4 py-3 text-left"},Fe={key:0},Ue={colspan:"5",class:"py-10 text-center"},Qe={key:1},Je={colspan:"5",class:"py-12 text-center"},Xe={class:"text-sm text-gray-500 dark:text-gray-400"},Ye=["rowspan"],Ze=["rowspan"],et={key:1,class:"text-gray-400"},tt={class:"align-top px-4 py-3"},lt={class:"align-top px-4 py-3"},at={class:"flex flex-col gap-1.5"},rt={key:0,class:"flex flex-wrap items-center gap-1.5"},st=["title"],it=["title"],nt={key:1,class:"flex flex-wrap items-center gap-1.5"},ot=["title"],ut=["title"],ct={key:2,class:"text-xs text-gray-400"},dt={class:"align-top px-4 py-3"},mt={class:"flex flex-wrap gap-1"},pt={key:0,class:"text-xs text-gray-400"},xt={"data-testid":"mobile-channels",class:"w-full min-w-0 overflow-x-hidden lg:hidden"},ft={key:0,"data-testid":"mobile-loading",class:"py-10 text-center"},gt={key:1,"data-testid":"mobile-empty",class:"py-12 text-center"},bt={class:"text-sm text-gray-500 dark:text-gray-400"},yt={class:"mb-3 min-w-0"},ht={class:"break-words text-sm font-semibold text-gray-900 dark:text-white"},vt={class:"mt-1 break-words text-xs leading-5 text-gray-500 dark:text-gray-400"},kt={class:"divide-y divide-gray-100 dark:divide-dark-700/60"},_t={class:"mt-3 space-y-3"},wt={class:"min-w-0"},$t={class:"mb-1.5 text-[11px] font-medium text-gray-500 dark:text-gray-400"},Pt={class:"flex min-w-0 flex-col gap-2"},Ct={key:0,class:"flex min-w-0 flex-wrap items-center gap-1.5"},Lt=["title"],Mt=["title"],Rt={key:1,class:"flex min-w-0 flex-wrap items-center gap-1.5"},zt=["title"],Et=["title"],Bt={key:2,class:"text-xs text-gray-400"},Gt={class:"min-w-0"},St={class:"mb-1.5 text-[11px] font-medium text-gray-500 dark:text-gray-400"},Tt={class:"flex min-w-0 flex-wrap gap-1"},It={key:0,class:"text-xs text-gray-400"},qt=K({__name:"AvailableChannelsTable",props:{columns:{},rows:{},loading:{type:Boolean},pricingKeyPrefix:{},noPricingLabel:{},noModelsLabel:{},emptyLabel:{},userGroupRates:{}},setup(e){e.userGroupRates;const{t:f}=J();function i(h){return h.groups.filter(g=>g.is_exclusive)}function w(h){return h.groups.filter(g=>!g.is_exclusive)}const z=le();function o(h){return be(h)}function E(h){var g;return ye(h,he((g=z.cachedPublicSettings)==null?void 0:g.server_utc_offset))}function G(h){return f("common.peakRateTooltip",{window:E(h)})+f("common.peakRateImageNote")}return(h,g)=>(t(),a("div",Ne,[l("table",He,[l("thead",null,[l("tr",De,[l("th",Ke,s(e.columns.name),1),l("th",Oe,s(e.columns.description),1),l("th",Ve,s(e.columns.platform),1),l("th",We,s(e.columns.groups),1),l("th",je,s(e.columns.supportedModels),1)])]),e.loading?(t(),a("tbody",Fe,[l("tr",null,[l("td",Ue,[m(k,{name:"refresh",size:"lg",class:"inline-block animate-spin text-gray-400"})])])])):e.rows.length===0?(t(),a("tbody",Qe,[l("tr",null,[l("td",Je,[m(k,{name:"inbox",size:"xl",class:"mx-auto mb-3 h-12 w-12 text-gray-400"}),l("p",Xe,s(e.emptyLabel),1)])])])):(t(!0),a(v,{key:2},C(e.rows,(c,$)=>(t(),a("tbody",{key:`${c.name}-${$}`,class:"border-b-2 border-gray-200 last:border-b-0 dark:border-dark-600"},[(t(!0),a(v,null,C(c.platforms,(u,n)=>(t(),a("tr",{key:`${c.name}-${u.platform}`,class:T(["transition-colors hover:bg-gray-50/40 dark:hover:bg-dark-800/40",{"border-t border-gray-100/70 dark:border-dark-700/50":n>0}])},[n===0?(t(),a("td",{key:0,rowspan:c.platforms.length,class:"px-4 py-3 text-center align-middle font-medium text-gray-900 dark:text-white"},s(c.name),9,Ye)):p("",!0),n===0?(t(),a("td",{key:1,rowspan:c.platforms.length,class:"px-4 py-3 align-middle text-xs text-gray-500 dark:text-gray-400"},[c.description?(t(),a(v,{key:0},[_(s(c.description),1)],64)):(t(),a("span",et,"-"))],8,Ze)):p("",!0),l("td",tt,[l("span",{class:T(["inline-flex items-center gap-1 rounded-md border px-2 py-0.5 text-[11px] font-medium uppercase",r(Q)(u.platform)])},[m(U,{platform:u.platform,size:"xs"},null,8,["platform"]),_(" "+s(u.platform),1)],2)]),l("td",lt,[l("div",at,[i(u).length>0?(t(),a("div",rt,[l("span",{class:"inline-flex items-center gap-0.5 text-[10px] font-medium uppercase text-purple-600 dar
1k:text-purple-400",title:r(f)("availableChannels.exclusiveTooltip")},[m(k,{name:"shield",size:"xs",class:"h-3 w-3"}),_(" "+s(r(f)("availableChannels.exclusive")),1)],8,st),(t(!0),a(v,null,C(i(u),d=>(t(),a("div",{key:`ex-${d.id}`,class:"inline-flex flex-wrap items-center gap-1"},[m(D,{name:d.name,platform:d.platform,"subscription-type":d.subscription_type||"standard","rate-multiplier":d.rate_multiplier,"user-rate-multiplier":e.userGroupRates[d.id]??null,"always-show-rate":""},null,8,["name","platform","subscription-type","rate-multiplier","user-rate-multiplier"]),o(d)?(t(),a("span",{key:0,class:"inline-flex items-center gap-1 rounded-md bg-amber-50 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 dark:bg-amber-900/20 dark:text-amber-300",title:G(d)},[m(k,{name:"clock",size:"xs",class:"h-3 w-3"}),_(" "+s(E(d)),1)],8,it)):p("",!0)]))),128))])):p("",!0),w(u).length>0?(t(),a("div",nt,[l("span",{class:"inline-flex items-center gap-0.5 text-[10px] font-medium uppercase text-gray-500 dark:text-gray-400",title:r(f)("availableChannels.publicTooltip")},[m(k,{name:"globe",size:"xs",class:"h-3 w-3"}),_(" "+s(r(f)("availableChannels.public")),1)],8,ot),(t(!0),a(v,null,C(w(u),d=>(t(),a("div",{key:`pub-${d.id}`,class:"inline-flex flex-wrap items-center gap-1"},[m(D,{name:d.name,platform:d.platform,"subscription-type":d.subscription_type||"standard","rate-multiplier":d.rate_multiplier,"user-rate-multiplier":e.userGroupRates[d.id]??null,"always-show-rate":""},null,8,["name","platform","subscription-type","rate-multiplier","user-rate-multiplier"]),o(d)?(t(),a("span",{key:0,class:"inline-flex items-center gap-1 rounded-md bg-amber-50 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 dark:bg-amber-900/20 dark:text-amber-300",title:G(d)},[m(k,{name:"clock",size:"xs",class:"h-3 w-3"}),_(" "+s(E(d)),1)],8,ut)):p("",!0)]))),128))])):p("",!0),u.groups.length===0?(t(),a("span",ct,"-")):p("",!0)])]),l("td",dt,[l("div",mt,[(t(!0),a(v,null,C(u.supported_models,d=>(t(),L(ee,{key:`${u.platform}-${d.name}`,model:d,"pricing-key-prefix":e.pricingKeyPrefix,"no-pricing-label":e.noPricingLabel,"show-platform":!1,"platform-hint":u.platform},null,8,["model","pricing-key-prefix","no-pricing-label","platform-hint"]))),128)),u.supported_models.length===0?(t(),a("span",pt,s(e.noModelsLabel),1)):p("",!0)])])],2))),128))]))),128))]),l("div",xt,[e.loading?(t(),a("div",ft,[m(k,{name:"refresh",size:"lg",class:"inline-block animate-spin text-gray-400"})])):e.rows.length===0?(t(),a("div",gt,[m(k,{name:"inbox",size:"xl",class:"mx-auto mb-3 h-12 w-12 text-gray-400"}),l("p",bt,s(e.emptyLabel),1)])):(t(!0),a(v,{key:2},C(e.rows,(c,$)=>(t(),a("section",{key:`mobile-${c.name}-${$}`,class:"border-b-2 border-gray-200 px-4 py-4 last:border-b-0 dark:border-dark-600"},[l("header",yt,[l("h3",ht,s(c.name),1),l("p",vt,s(c.description||"-"),1)]),l("div",kt,[(t(!0),a(v,null,C(c.platforms,u=>(t(),a("div",{key:`mobile-${c.name}-${u.platform}`,class:"min-w-0 py-3 first:pt-0 last:pb-0"},[l("span",{class:T(["inline-flex items-center gap-1 rounded-md border px-2 py-0.5 text-[11px] font-medium uppercase",r(Q)(u.platform)])},[m(U,{platform:u.platform,size:"xs"},null,8,["platform"]),_(" "+s(u.platform),1)],2),l("dl",_t,[l("div",wt,[l("dt",$t,s(e.columns.groups),1),l("dd",Pt,[i(u).length>0?(t(),a("div",Ct,[l("span",{class:"inline-flex items-center gap-0.5 text-[10px] font-medium uppercase text-purple-600 dark:text-purple-400",title:r(f)("availableChannels.exclusiveTooltip")},[m(k,{name:"shield",size:"xs",class:"h-3 w-3"}),_(" "+s(r(f)("availableChannels.exclusive")),1)],8,Lt),(t(!0),a(v,null,C(i(u),n=>(t(),a("div",{key:`mobile-ex-${n.id}`,class:"inline-flex max-w-full min-w-0 flex-wrap items-center gap-1"},[m(D,{class:"max-w-full",name:n.name,platform:n.platform,"subscription-type":n.subscription_type||"standard","rate-multiplier":n.rate_multiplier,"user-rate-multiplier":e.userGroupRates[n.id]??null,"always-show-rate":""},null,8,["name","platform","subscription-type","rate-multiplier","user-rate-multiplier"]),o(n)?(t(),a("span",{key:0,class:"inline-flex items-center gap-1 rounded-md bg-amber-50 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 dark:bg-amber-900/20 dark:text-amber-300",title:G
1(n)},[m(k,{name:"clock",size:"xs",class:"h-3 w-3"}),_(" "+s(E(n)),1)],8,Mt)):p("",!0)]))),128))])):p("",!0),w(u).length>0?(t(),a("div",Rt,[l("span",{class:"inline-flex items-center gap-0.5 text-[10px] font-medium uppercase text-gray-500 dark:text-gray-400",title:r(f)("availableChannels.publicTooltip")},[m(k,{name:"globe",size:"xs",class:"h-3 w-3"}),_(" "+s(r(f)("availableChannels.public")),1)],8,zt),(t(!0),a(v,null,C(w(u),n=>(t(),a("div",{key:`mobile-pub-${n.id}`,class:"inline-flex max-w-full min-w-0 flex-wrap items-center gap-1"},[m(D,{class:"max-w-full",name:n.name,platform:n.platform,"subscription-type":n.subscription_type||"standard","rate-multiplier":n.rate_multiplier,"user-rate-multiplier":e.userGroupRates[n.id]??null,"always-show-rate":""},null,8,["name","platform","subscription-type","rate-multiplier","user-rate-multiplier"]),o(n)?(t(),a("span",{key:0,class:"inline-flex items-center gap-1 rounded-md bg-amber-50 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 dark:bg-amber-900/20 dark:text-amber-300",title:G(n)},[m(k,{name:"clock",size:"xs",class:"h-3 w-3"}),_(" "+s(E(n)),1)],8,Et)):p("",!0)]))),128))])):p("",!0),u.groups.length===0?(t(),a("span",Bt,"-")):p("",!0)])]),l("div",Gt,[l("dt",St,s(e.columns.supportedModels),1),l("dd",Tt,[(t(!0),a(v,null,C(u.supported_models,n=>(t(),L(ee,{key:`mobile-${u.platform}-${n.name}`,class:"max-w-full [&>span]:max-w-full [&>span]:truncate",model:n,"pricing-key-prefix":e.pricingKeyPrefix,"no-pricing-label":e.noPricingLabel,"show-platform":!1,"platform-hint":u.platform},null,8,["model","pricing-key-prefix","no-pricing-label","platform-hint"]))),128)),u.supported_models.length===0?(t(),a("span",It,s(e.noModelsLabel),1)):p("",!0)])])])]))),128))])]))),128))])]))}}),At={class:"flex flex-col justify-between gap-4 lg:flex-row lg:items-start"},Nt={class:"flex flex-1 flex-wrap items-center gap-3"},Ht={class:"relative w-full sm:w-80"},Dt=["placeholder"],Kt={class:"flex w-full flex-shrink-0 flex-wrap items-center justify-end gap-3 lg:w-auto"},Ot=["disabled","title"],ol=K({__name:"AvailableChannelsView",setup(e){const{t:x}=J(),f=le(),i=S([]),w=S({}),z=S(!1),o=S(""),E=I(()=>({name:x("availableChannels.columns.name"),description:x("availableChannels.columns.description"),platform:x("availableChannels.columns.platform"),groups:x("availableChannels.columns.groups"),supportedModels:x("availableChannels.columns.supportedModels")})),G=I(()=>{const g=o.value.trim().toLowerCase();return g?i.value.map(c=>{const $=c.name.toLowerCase().includes(g),u=(c.description||"").toLowerCase().includes(g);if($||u)return c;const n=c.platforms.filter(d=>d.platform.toLowerCase().includes(g)||d.groups.some(q=>q.name.toLowerCase().includes(g))||d.supported_models.some(q=>q.name.toLowerCase().includes(g)));return n.length===0?null:{...c,platforms:n}}).filter(c=>c!==null):i.value});async function h(){z.value=!0;try{const[g,c]=await Promise.all([we.getAvailable(),ve.getUserGroupRates().catch($=>(console.error("Failed to load user group rates:",$),{}))]);i.value=g,w.value=c}catch(g){f.showError(ke(g,x("common.error")))}finally{z.value=!1}}return ue(h),(g,c)=>(t(),L(de,null,{default:V(()=>[m(me,null,{filters:V(()=>[l("div",At,[l("div",Nt,[l("div",Ht,[m(k,{name:"search",size:"md",class:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-gray-500"}),te(l("input",{"onUpdate:modelValue":c[0]||(c[0]=$=>o.value=$),type:"text",placeholder:r(x)("availableChannels.searchPlaceholder"),class:"input pl-10"},null,8,Dt),[[ce,o.value]])])]),l("div",Kt,[l("button",{onClick:h,disabled:z.value,class:"btn btn-secondary",title:r(x)("common.refresh","Refresh")},[m(k,{name:"refresh",size:"md",class:T(z.value?"animate-spin":"")},null,8,["class"])],8,Ot)])])]),table:V(()=>[m(qt,{columns:E.value,rows:G.value,loading:z.value,"user-group-rates":w.value,"pricing-key-prefix":"availableChannels.pricing","no-pricing-label":r(x)("availableChannels.noPricing"),"no-models-label":r(x)("availableChannels.noModels"),"empty-label":r(x)("availableChannels.empty")},null,8,["columns","rows","loading","user-group-rates","no-pricing-label","no-models-label","empty-label"])]),_:1})]),_:1}))}});
1export{ol 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.