import{a0 as P,W as f,G as I,B as N,dm as F,bb as C,az as w,ar as x,f0 as L,f1 as m,f2 as S,av as c,bl as E,n as _,f3 as j,bj as q,ak as A,a2 as D,f4 as R,aC as T,f5 as O,f6 as h,f7 as W,ao as B,z as J}from"./index-d6499a22.js";var v=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r,b,$={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},p;function z(e){return v.lastIndex=0,v.test(e)?'"'+e.replace(v,function(t){var s=$[t];return typeof s=="string"?s:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function y(e,t,s){var o,i,l,g,d=r,a,n=t[e];switch(n&&typeof n=="object"&&typeof n.toJSON=="function"&&(n=n.toJSON(e)),typeof p=="function"&&(n=p.call(t,e,n)),typeof n){case"string":return z(n);case"number":return isFinite(n)?String(n):"null";case"boolean":case"null":return String(n);case"object":if(!n)return"null";if(r+=b,a=[],Object.prototype.toString.apply(n)==="[object Array]"){for(g=n.length,o=0;o<g;o+=1)a[o]=y(o,n,s)||"null";return l=a.length===0?"[]":r?r.length+a.join(", ").length+4>s?`[
`+r+a.join(`,
`+r)+`
`+d+"]":"[ "+a.join(", ")+" ]":"["+a.join(",")+"]",r=d,l}if(p&&typeof p=="object")for(g=p.length,o=0;o<g;o+=1)typeof p[o]=="string"&&(i=p[o],l=y(i,n,s),l&&a.push(z(i)+(r?": ":":")+l));else for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(l=y(i,n,s),l&&a.push(z(i)+(r?": ":":")+l));return l=a.length===0?"{}":r?r.length+a.join(", ").length+4>s?`{
`+r+a.join(`,
`+r)+`
`+d+"}":"{ "+a.join(", ")+" }":"{"+a.join(",")+"}",r=d,l}}function M(e,t,s,o){var i;if(r="",b="",o||(o=0),typeof o!="number")throw new Error("beaufifier: limit must be a number");if(typeof s=="number")for(i=0;i<s;i+=1)b+=" ";else typeof s=="string"&&(b=s);if(p=t,t&&typeof t!="function"&&(typeof t!="object"||typeof t.length!="number"))throw new Error("beautifier: wrong replacer parameter");return y("",{"":e},o)}var V=M;const Z=P(V);var u=(e=>(e[e.data=0]="data",e[e.db=1]="db",e[e.file=2]="file",e[e.folder=3]="folder",e[e.image=4]="image",e[e.script=5]="script",e[e.zip=6]="zip",e))(u||{});const k=({isDir:e=!1,fileName:t})=>e?B(".db",t)?"db":"folder":f(c("."),h)(t),H=["csv","data","json","xml","parquet","pickle","tfrecord","orc","npy"],U="db",K=["ipynb","LICENSE","log","md","sum","test"],Q="folder",X=["gif","png","jpg","svg"],Y=["clj","cljs","dockerfile","go","jar","java","Makefile","hoodie_partition_metadata","properties","py","sh","sql","ts","tsx","yml"],G=["gz","tar","tgz","zip","xz","bz2"],ee=[{fileGroup:u.data,extensions:H},{fileGroup:u.db,extensions:U},{fileGroup:u.file,extensions:K},{fileGroup:u.folder,extensions:Q},{fileGroup:u.image,extensions:X},{fileGroup:u.script,extensions:Y},{fileGroup:u.zip,extensions:G}],te=f(e=>N(F(C(e),"extensions"),ee),I(u.file,"fileGroup")),ne=f(k,te),re=f(ne,w(u.zip)),ae=f(k,w("ipynb")),se={cljs:"clojure",clj:"clojure",csv:"excel",data:"excel",dockerfile:"dockerfile",go:"go",ipynb:"xml",java:"java",json:"json",log:"haskell",Makefile:"makefile",md:"markdown",properties:"properties",hoodie_partition_metadata:"properties",py:"python",sh:"shell",test:"excel",ts:"typescript",tsx:"typescript",yml:"yaml"},ie=e=>J(e,se)??"plaintext",fe=(e,t=80)=>{try{return Z(JSON.parse(e),null,2,t)}catch{return e}},le=e=>e.includes(".db")?e.includes("featurestore.db")?"FEATURESTORE":"HIVEDB":null,ue=f(E("/"),c("/"),L((e,t)=>t===".."?m(e):t==="."?e:S(t,e),[]),x("/")),ce=_(2,(e,t)=>f(c("/"),m,S(e),x("/"))(t)),pe=(e,t)=>{const s=f(c("/"),h)(t),o=s===""||!s.match(/^\w+\.\w+/),i=f(E("/"),c("/"),h)(e);return o?`${t}/${i}`:t},ge=f(j("/"),E("/"),c("/"),R(T(["Projects"]),O(2),O(3)),m,q(A,D(["root"])),x("/"),j("/")),de=f(j("/"),E("/"),c("/"),m,x("/")),be=f(c("/"),h),ye=f(j("/"),c("/"),W,w(1)),je=e=>e.slice(0,e.lastIndexOf(".")).replace(/\./g,"_").replace(/[^a-zA-Z0-9_]/g,"");export{u as F,de as a,be as b,k as c,ie as d,re as e,fe as f,ge as g,ae as h,ye as i,le as j,pe as k,ne as l,je as m,ue as r,ce as u};
