import{A as s,d as h,j as d,t as m,g as _,e as $,b as f,w,k as C,r as v,o as u,F as y,f as g,_ as b}from"./index-BHjuZsvK.js";async function V(){return(await s.get("/models")).data.data}async function k(e){return(await s.get(`/models/${e}`)).data.data}async function x(e){return(await s.post("/models",e)).data.data}async function T(e,t){return(await s.put(`/models/${e}`,t)).data.data}async function z(e){await s.delete(`/models/${e}`)}async function B(e){return(await s.get(`/models/${e}/versions`)).data.data}async function F(e,t){return(await s.get(`/models/${e}/versions/${t}`)).data.data}async function N(e,t){return(await s.post(`/models/${e}/versions`,t)).data.data}async function S(e,t,a){return(await s.patch(`/models/${e}/versions/${t}`,a)).data.data}async function A(e){return(await s.post("/models/detect-schema",e)).data.data}async function D(e,t,a){return(await s.put(`/models/${e}/versions/${t}/schema`,a)).data.data}async function E(e,t,a,o){await s.patch(`/models/${e}/versions/${t}/fields/${a}/threshold`,{alert_threshold:o})}async function I(e,t,a){const r={page_size:100};a&&(r.field_name=a);const i=await s.get(`/models/${e}/versions/${t}/drift-results`,{params:r});let c=i.data.data;if(i.data.meta.total>100){const n=Math.ceil(i.data.meta.total/100);for(let l=2;l<=n;l++){const p=await s.get(`/models/${e}/versions/${t}/drift-results`,{params:{...r,page:l,page_size:100}});c=c.concat(p.data.data)}}return c}async function R(e,t,a="day"){return(await s.get(`/models/${e}/versions/${t}/inference-volume`,{params:{bucket:a}})).data.data}const H={list:V,get:k,create:x,update:T,delete:z,listVersions:B,getVersion:F,createVersion:N,updateVersion:S,updateVersionSchema:D,updateFieldThreshold:E,detectSchema:A,getDriftResults:I,getInferenceVolume:R},j=["title"],M={key:0,class:"id-label"},P={class:"id-value"},q=h({__name:"CopyableId",props:{value:{},label:{default:void 0},truncate:{type:Boolean,default:!0}},setup(e){const t=e,a=C(!1);let o=null;function r(){return t.truncate&&t.value.length>12?t.value.slice(0,8)+"…":t.value}async function i(c){c.stopPropagation();try{await navigator.clipboard.writeText(t.value),a.value=!0,o&&clearTimeout(o),o=setTimeout(()=>{a.value=!1},2e3)}catch{const n=document.createElement("textarea");n.value=t.value,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),a.value=!0,o&&clearTimeout(o),o=setTimeout(()=>{a.value=!1},2e3)}}return(c,n)=>{const l=v("v-icon"),p=v("v-tooltip");return u(),d("span",{class:"copyable-id",title:e.value,onClick:i},[e.label?(u(),d("span",M,m(e.label)+":",1)):_("",!0),$("code",P,m(r()),1),f(l,{icon:a.value?"mdi-check":"mdi-content-copy",color:a.value?"success":void 0,size:"14",class:"copy-icon"},null,8,["icon","color"]),f(p,{activator:"parent",location:"top"},{default:w(()=>[a.value?(u(),d(y,{key:0},[g("Copied!")],64)):(u(),d(y,{key:1},[g(m(e.value),1)],64))]),_:1})],8,j)}}}),J=b(q,[["__scopeId","data-v-26d098fe"]]);export{J as C,H as m};
