import"./useIsJupyterDisabled-W-gx_pSy.js";import{c as o}from"./index-B5BaAmTQ.js";var i=(n=>(n.ALL="all",n.DEPLOYED_ONLY="deployed only",n.MY_ONLY="my models only",n))(i||{});const N={"last created":"CREATED:DESC","first created":"CREATED:ASC",version:"VERSION:DESC","name ascending":"NAME:ASC","name descending":"NAME:DESC"},m=n=>{let s=[];return n.forEach(e=>{const t=s.find(r=>r.name===e.name);t?e.version>t.version&&(s=s.map(r=>e.name===r.name?e:r)):s.push(e)}),s},E=(n,s,e,t)=>s===i.MY_ONLY?n.filter(r=>r.userFullName.toLowerCase()===(e==null?void 0:e.username)):s===i.DEPLOYED_ONLY?t?n.filter(r=>!!t.find(u=>r.name===u.modelName)):[]:n,d=(n,s)=>{if(n.status===o.RUNNING){if(s.status!==o.RUNNING)return-1}else if(s.status===o.RUNNING)return 1;return 0},D=n=>+String(n).slice(0,6);export{i as M,d as a,D as b,m as c,E as f,N as s};
