1function L(t,s,n){if(typeof I18n<"u"&&I18n.ready){const a=I18n.t(t,n);return a&&a!==t?a:s||t}return n&&typeof s=="string"?s.replace(/\{(\w+)\}/g,(a,e)=>n[e]!==void 0?String(n[e]):`{${e}}`):s||t}function A(t){if(!t||t===0)return"0 B";const s=1024,n=["B","KB","MB","GB"],a=Math.floor(Math.log(t)/Math.log(s)),e=t/Math.pow(s,a);return(a===0?Math.round(e).toString():e.toFixed(1))+" "+n[a]}function M(t,s,n){if(!t)return"-";let a=s,e=n;typeof s=="object"&&s!==null&&!Array.isArray(s)&&"withSeconds"in s&&(e=s,a=void 0),e=e||{},typeof t=="object"&&t._seconds!==void 0&&(t=new Date(t._seconds*1e3)),typeof t=="object"&&t.seconds!==void 0&&!(t instanceof Date)&&(t=new Date(t.seconds*1e3));const r=new Date(t);if(isNaN(r.getTime()))return"-";a=typeof a=="string"?a:typeof I18n<"u"?I18n.locale:"en-US";const o={day:"numeric",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1};return e.withSeconds&&(o.second="2-digit"),r.toLocaleDateString(a,o)}function $(t){if(!Number.isFinite(t)||t<=0)return"0:00";const s=Math.floor(t/3600),n=Math.floor(t%3600/60),a=Math.floor(t%60);return s>0?`${s}:${String(n).padStart(2,"0")}:${String(a).padStart(2,"0")}`:`${n}:${String(a).padStart(2,"0")}`}function S(t,s){if(!t)return"";const n=t instanceof Date?t:new Date(t);if(isNaN(n.getTime()))return"";const a=typeof I18n<"u"&&I18n.locale?I18n.locale:"en-US",e=n.getTime()-Date.now(),r=Math.round(Math.abs(e)/1e3),o=[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60]];let i="minute",c=Math.max(1,Math.round(r/60));for(const[l,d]of o)if(r>=d){i=l,c=Math.round(r/d);break}const f=e>=0?1:-1;try{if(typeof Intl<"u"&&typeof Intl.RelativeTimeFormat=="function")return new Intl.RelativeTimeFormat(a,{numeric:"auto"}).format(f*c,i)}catch{}return f>=0?`in ${c} ${i}${c===1?"":"s"}`:`${c} ${i}${c===1?"":"s"} ago`}function q(t){return String(t||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function I(t){if(!t||typeof t!="string"||!/[\u00C2-\u00F4][\u0080-\u00BF]/.test(t))return t;let s=!0;for(let n=0;n<t.length;n++)if(t.charCodeAt(n)>255){s=!1;break}if(s){const n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);const a=new TextDecoder("utf-8",{fatal:!1}).decode(n);if(!/\uFFFD/.test(a)&&a.length<=t.length)return a}return t.replace(/[\u00C2-\u00DF][\u0080-\u00BF]/g,n=>{const a=new Uint8Array([n.charCodeAt(0),n.charCodeAt(1)]),e=new TextDecoder("utf-8",{fatal:!0});try{return e.decode(a)}catch{return n}}).replace(/[\u00E0-\u00EF][\u0080-\u00BF][\u0080-\u00BF]/g,n=>{const a=new Uint8Array([n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2)]),e=new TextDecoder("utf-8",{fatal:!0});try{return e.decode(a)}catch{return n}})}const y=/^[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}$|^[A-Za-z0-9]{12}$/,u=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,p=/^[0-9a-f]{32}$/i,g=/^[0-9a-f]{64}$/i;function D(t){if(!t||typeof t!="string")return null;const s=t.trim();if(!s)return null;if(y.test(s))return{short:s.toUpperCase().replace(/-/g,"")};if(u.test(s)||p.test(s))return{rid:s};if(g.test(s))return{hash:s.toLowerCase()};const n=s.replace(/-/g,"").toLowerCase();if(p.test(n)&&s.includes("-"))return{rid:`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`};let a;try{a=new URL(s)}catch{return null}const e=a.searchParams.get("rid");if(e&&(u.test(e)||p.test(e)))return{rid:e};const r=a.pathname.match(/\/c\/([A-Za-z0-9-]{12,16})\/?$/);if(r){const i=r[1].replace(/-/g,"").toUpperCase();if(i.length===12)return{short:i}}const o=a.searchParams.get("hash");return o&&g.test(o)?{hash:o.toLowerCase()}:null}const k={"3gp":"#ff5364","3mf":"#14a085",aac:"#e57e25",adoc:"#e40046",ai:"#c05621",aif:"#7d6599",aiff:"#7d6599",amr:"#7d6599",arrow:"#8697cb",arw:"#2473a6",as:"#cc2244",ass:"#d35400",au:"#7d6599",avi:"#d75e72",avif:"#2473a6",azw3:"#95a5a5",bai:"#3182ce",bam:"#3182ce",bcf:"#805ad5",bed:"#c05621",bib:"#795548",bmp:"#659c35",c:"#555555",caf:"#7d6599",cap:"#0891b2",cc:"#004482",ccd:"#ce3c3b",ccr:"#ce3c3b",cda:"#ce3c3b",cer:"#eeaf4b",cf:"#f48120",cfg:"#546e7a",cfm:"#f48120",cif:"#3182ce",cjs:"#6b5d00",ckpt:"#7d6599",conf:"#546e7a",cp:"#004482",cpp:"#00599c",cr2:"#2473a6",cr3:"#2473a6",crt:"#eeaf4b",cs:"#68217a",css:"#264de4",csv:"#217346",cur:"#659c35",cxx:"#00599c",d2:"#5a67
1d8",db:"#71c285",dbf:"#e96360",dcm:"#e53e3e",dds:"#8e44ad",dff:"#7d6599",dicom:"#e53e3e",diff:"#546e7a",djvu:"#cc4b4c",dmp:"#6366f1",dng:"#2473a6",doc:"#2b579a",dockerfile:"#2496ed",docx:"#2b579a",drawio:"#5a67d8",dsf:"#7d6599",dump:"#71c285",dwg:"#8697cb",dxf:"#5b9a6b",eml:"#1d4ed8",engine:"#7d6599",env:"#4a5568",eps:"#c05621",epsf:"#c05621",epub:"#95a5a5",erl:"#a10539",etl:"#6366f1",evt:"#6366f1",evtx:"#6366f1",exr:"#2473a6",f3d:"#5889c4",fa:"#2d8a4e",fasta:"#2d8a4e",fastq:"#2d8a4e",fbx:"#14a085",feather:"#8697cb",flac:"#90bae1",flv:"#ff5364",fq:"#2d8a4e",gcode:"#e57e25",geojson:"#9777a8",gff:"#276749",gff3:"#276749",gif:"#e57e25",glb:"#14a085",gltf:"#14a085",go:"#00add8",gpx:"#27ae60",graphql:"#e535ab",groovy:"#4298b8",gsm:"#7d6599",gtf:"#276749",h:"#555555",h5:"#7d6599",har:"#0891b2",hcl:"#844fba",hdf5:"#7d6599",hdr:"#2473a6",heic:"#2473a6",heif:"#2473a6",hl7:"#dd6b20",hpp:"#00599c",htm:"#b33a1a",html:"#b33a1a",hxx:"#00599c",ico:"#659c35",icon:"#659c35",ics:"#8b5cf6",ifc:"#556080",iges:"#5889c4",igs:"#5889c4",ini:"#546e7a",ioc:"#ea580c",ipynb:"#f37726",it:"#7d6599",java:"#b07219",jp2:"#2473a6",jpe:"#2473a6",jpeg:"#2473a6",jpf:"#2473a6",jpg:"#2473a6",jpx:"#2473a6",js:"#6b5d00",json:"#9777a8",jsonl:"#805ad5",jsx:"#087ea4",jtd:"#2b579a",jtt:"#2b579a",jxl:"#2473a6",key:"#f37726",kml:"#2ecc71",kmz:"#5b9a6b",kt:"#7f52ff",kts:"#7f52ff",las:"#5b9a6b",latex:"#008080",laz:"#5b9a6b",less:"#1d365d",log:"#546e7a",lua:"#000080",m:"#e44d27",m2ts:"#ff5364",m2v:"#ff5364",m4a:"#7d6599",m4v:"#ff5364",markdown:"#546e7a",md:"#546e7a",mdx:"#4a90d9",mermaid:"#5a67d8",mid:"#7d6599",midi:"#7d6599",mjs:"#6b5d00",mkv:"#ff5364",mmd:"#5a67d8",mml:"#f39c12",mobi:"#95a5a5",mod:"#7d6599",mol:"#319795",mol2:"#319795",mov:"#ff5364",mp2:"#9777a8",mp3:"#7d6599",mp4:"#ff5364",mpeg:"#ff5364",mpg:"#ff5364",msg:"#1d4ed8",mts:"#ff5364",nc:"#e57e25",ndjson:"#805ad5",nef:"#2473a6",nessus:"#ea580c",nii:"#d53f8c",nrrd:"#d53f8c",numbers:"#217346",obj:"#14a085",odp:"#f6712e",ods:"#217346",odt:"#2b579a",ofx:"#217346",ogg:"#7d6599",ogv:"#ff5364",onnx:"#7d6599",opus:"#7d6599",orc:"#8697cb",orf:"#2473a6",otf:"#9777a8",otp:"#c43e1c",p7m:"#eeaf4b",p7s:"#eeaf4b",pages:"#0096e6",pam:"#659c35",parquet:"#8697cb",pas:"#e22837",patch:"#546e7a",pb:"#7d6599",pbm:"#2980b9",pcap:"#0891b2",pcapng:"#0891b2",pdb:"#319795",pdf:"#c0392b",pef:"#2473a6",pem:"#eeaf4b",pf:"#0891b2",pgm:"#2980b9",php:"#4f5d95",pl:"#39457e",plantuml:"#5a67d8",plist:"#a855f7",ply:"#14a085",png:"#659c35",pnm:"#659c35",pot:"#c43e1c",potx:"#c43e1c",ppm:"#2980b9",pps:"#c43e1c",ppsx:"#c43e1c",ppt:"#c43e1c",pptx:"#c43e1c",prj:"#1abc9c",prompt:"#8e44ad",properties:"#546e7a",proto:"#4285f4",ps:"#c0392b",psb:"#5889c4",psd:"#5889c4",pt:"#7d6599",pth:"#7d6599",ptif:"#556080",puml:"#5a67d8",py:"#3776ab",qfx:"#217346",qif:"#217346",r:"#2266b8",ra:"#7d6599",raf:"#2473a6",rb:"#cc342d",ris:"#8d6e63",rm:"#d75e72",rs:"#dea584",rst:"#74a1c9",rtf:"#90bae1",rules:"#0d9488",rw2:"#2473a6",s3m:"#7d6599",safetensors:"#7d6599",sam:"#3182ce",sass:"#cd6799",scala:"#dc322f",scss:"#cd6799",sdd:"#c43e1c",sdf:"#319795",sdw:"#2b579a",shp:"#5b9a6b",shx:"#5b9a6b",sldasm:"#5889c4",sldprt:"#5889c4",sql:"#4299e1",sqlite:"#71c285",srt:"#e67e22",step:"#5889c4",sti:"#c43e1c",stl:"#14a085",stp:"#5889c4",svelte:"#ff3e00",svg:"#c05621",svgz:"#c05621",swift:"#f05138",sxi:"#c43e1c",sxw:"#2b579a",tap:"#e57e25",tex:"#008080",tf:"#844fba",tfvars:"#844fba",tga:"#2473a6",tif:"#556080",tiff:"#556080",toml:"#546e7a",topojson:"#9777a8",ts:"#3178c6",tsr:"#eeaf4b",tsv:"#217346",tsx:"#3178c6",ttf:"#9777a8",txt:"#546e7a",udf:"#2b579a",unknown:"#8a8a8a",uof:"#2b579a",uop:"#c43e1c",uot:"#2b579a",usf:"#2b579a",vb:"#6a40a8",vcf:"#805ad5",vob:"#ff5364",vtt:"#e67e22",vue:"#2c8f6a",warc:"#0d9488",wasm:"#654ff0",wav:"#556080",webm:"#ff5364",webp:"#659c35",wma:"#95a5a5",wmv:"#ff5364",woff:"#9777a8",woff2:"#9777a8",wpd:"#2b579a",wps:"#2b579a",xbrl:"#91cda0",xcf:"#584b53",xhtml:"#b33a1a",xls:"#217346",xlsx:"#217346",xm:"#7d6599",xml:"#f29c1f",xsl:"#ec6630",xslt:"#ec6630",xyz:"#3182ce",yaml:"#546e7a",yar:"#dc2626",yara:"#dc2626",yml:"#546e7a",zeek:"#0d9488",zip:"#8697cb"},j=Date.now(),C={jpg:"jpg",jpeg:"jpeg",jpe:"jpe",jp2:"jp2",jpf:"jpf",jpx:"jpx",png:"png",gif:"gif",svg:"svg",svgz:"svgz",webp:"webp",bmp:"bmp",tiff:"tiff",tif:"tif",ptif:"ptif",ico:"ico",icon:"icon",cur:"cur",heic:"heic",heif:"heif",avif:"avif",jxl:"jxl",psd:"psd",psb:"psb",ai:"ai",eps:"eps",epsf:"epsf",xcf:"xcf",exr:"exr",hdr:"hdr",tga:"tga",dds:"dds",ppm:"ppm",pgm:"pgm",pbm:"pbm",pam:"pam",pnm:"pnm",dng:"dng",cr2:"cr2",cr3:"cr3",nef:"nef",arw:"arw",orf:"orf",raf:"raf",pef:"pef",rw2:"rw2",dcm:"dcm",dicom:"dicom",nii:"nii",nrrd:"nrrd",mp4:"mp4",avi:"avi",webm:"webm",mov:"mov",mkv:"mkv",m4v:"m4v",ogv:"ogv","3gp":"3gp",m2v:"m2v",wmv:"wmv",rm:"rm",mpeg:"mpeg",mpg:"mpg",flv:"flv",mts:"mts",m2ts:"m2ts",vob:"vob",mp3:"mp3",wav:"wav",aac:"aac",flac:"flac",wma:"wma",ogg:"ogg",m4a:"m4a",opus:"opus",mp2:"mp2",au:"au",aif:"aif",aiff:"aiff",gsm:"gsm",ra:"ra",mid:"mid",midi:"midi",amr:"amr",caf:"caf",dsf:"dsf",dff:"dff",mod:"mod",xm:"xm",it:"it",s3m:"s3m",pdf:"pdf",txt:"txt",csv:"csv",json:"json",xml:"xml",html:"html",htm:"htm",xhtml:"xhtml",xsl:"xsl",xslt:"xslt",md:"md",markdown:"markdown",yaml:"yaml",yml:"yml",log:"log",rtf:"rtf",docx:"docx",doc:"doc",odt:"odt",wpd:"wpd",wps:"wps",jtd:"jtd",jtt:"jtt",xlsx:"xlsx",xls:"xls",ods:"ods",pptx:"pptx",ppt:"ppt",odp:"odp",pps:"pps",ppsx:"ppsx",otp:"otp",pot:"pot",potx:"potx",djvu:"djvu",ps:"ps",sdd:"sdd",sti:"sti",sxi:"sxi",sxw:"sxw",uop:"uop",udf:"udf",usf:"usf",gcode:"gcode",stl:"stl","3mf":"3mf",dxf:"dxf",dwg:"dwg",gltf:"gltf",glb:"glb",obj:"obj",ply:"ply",fbx:"fbx",step:"step",stp:"stp",iges:"iges",igs:"igs",sldprt:"sldprt",sldasm:"sldasm",f3d:"f3d",nc:"nc",tap:"tap",ts:"ts",tsx:"tsx",jsx:"jsx",mjs:"mjs",cjs:"cjs",vue:"vue",svelte:"svelte",py:"py",java:"java",c:"c",cpp:"cpp",cxx:"cxx",h:"h",hpp:"hpp",hxx:"hxx",cs:"cs",go:"go",rs:"r
1s",php:"php",rb:"rb",swift:"swift",kt:"kt",kts:"kts",r:"r",scala:"scala",lua:"lua",wasm:"wasm",proto:"proto",graphql:"graphql",as:"as",cf:"cf",cfm:"cfm",pas:"pas",diff:"diff",patch:"patch",erl:"erl",groovy:"groovy",pl:"pl",vb:"vb",m:"m",cc:"cc",cp:"cp",mml:"mml",uof:"uof",uot:"uot",sdw:"sdw",toml:"toml",prompt:"prompt",ipynb:"ipynb",adoc:"adoc",rst:"rst",tex:"tex",latex:"latex",mdx:"mdx",env:"env",ini:"ini",properties:"properties",dockerfile:"dockerfile",tf:"tf",tfvars:"tfvars",hcl:"hcl",tsv:"tsv",parquet:"parquet",arrow:"arrow",feather:"feather",orc:"orc",jsonl:"jsonl",ndjson:"ndjson",geojson:"geojson",topojson:"topojson",mermaid:"mermaid",mmd:"mmd",plantuml:"plantuml",puml:"puml",drawio:"drawio",d2:"d2",onnx:"onnx",pt:"pt",pth:"pth",safetensors:"safetensors",ckpt:"ckpt",h5:"h5",hdf5:"hdf5",pb:"pb",engine:"engine",sqlite:"sqlite",db:"db",sql:"sql",dump:"dump",eml:"eml",msg:"msg",pages:"pages",numbers:"numbers",key:"key",srt:"srt",vtt:"vtt",ass:"ass",p7s:"p7s",p7m:"p7m",cer:"cer",crt:"crt",pem:"pem",tsr:"tsr",epub:"epub",mobi:"mobi",azw3:"azw3",otf:"otf",ttf:"ttf",woff:"woff",woff2:"woff2",gpx:"gpx",bib:"bib",ris:"ris",conf:"conf",cfg:"cfg",css:"css",scss:"scss",sass:"sass",less:"less",js:"js",hl7:"hl7",cda:"cda",ccd:"ccd",ccr:"ccr",ifc:"ifc",bcf:"bcf",xbrl:"xbrl",ofx:"ofx",qfx:"qfx",qif:"qif",kml:"kml",kmz:"kmz",shp:"shp",shx:"shx",dbf:"dbf",prj:"prj",las:"las",laz:"laz",pdb:"pdb",mol:"mol",mol2:"mol2",sdf:"sdf",xyz:"xyz",cif:"cif",fasta:"fasta",fa:"fa",fastq:"fastq",fq:"fq",gff:"gff",gff3:"gff3",gtf:"gtf",bed:"bed",vcf:"vcf",sam:"sam",bam:"bam",bai:"bai",ics:"ics",har:"har",pcap:"pcap",pcapng:"pcapng",cap:"cap",evtx:"evtx",dmp:"dmp",yar:"yar",yara:"yara",rules:"rules",ioc:"ioc",zeek:"zeek",nessus:"nessus",pf:"pf",plist:"plist",etl:"etl",evt:"evt",warc:"warc"};function T(t){const s=t.name||t.original_name||"";if(!s)return"unknown";const n=s.toLowerCase().split(".").pop();return C[n]||"unknown"}function B(t){const s=t.mime_type||t.type||"";if(t.is_link||s==="text/uri-list"){const r=t._linkInfo||{label:"Link"};return`<span class="bcv-file-icon-inner bcv-file-link-icon">${z(r,{linkLabel:""})}</span>`}const n=T(t),a=`/api/file-icons/${n}.svg?_v=${j}`,e=`/file-icons/${n}.svg`;return`<img class="bcv-file-icon-inner bcv-file-icon-svg" src="${a}" onerror="this.onerror=null;this.src='${e}'" onload="this.classList.add('bcv-icon-loaded')" loading="lazy" alt="" role="presentation" />`}function N(t,s,n){const a=s||((o,i)=>i||o),e=(n||"").toLowerCase().split(".").pop()||"";if(!t&&e)return e.toUpperCase();if(!t)return a("fileType.file","File");if(t.startsWith("image/"))return a("fileType.image","Image");if(t.startsWith("video/"))return a("fileType.video","Video");if(t.startsWith("audio/"))return a("fileType.audio","Audio");if(t.includes("pdf"))return"PDF";if(t.includes("wordprocessing")||t.includes("wordprocessingml")||e==="docx"||e==="doc")return a("fileType.wordDoc","Word Document");if(t.includes("spreadsheet")||t.includes("xlsx")||e==="xlsx"||e==="xls")return a("fileType.spreadsheet","Spreadsheet");if(t.includes("presentation")||t.includes("pptx")||e==="pptx"||e==="ppt")return a("fileType.presentation","Presentation");if(t.includes("opendocument.text")||e==="odt")return a("fileType.wordDoc","Text Document");if(t.includes("opendocument.spreadsheet")||e==="ods")return a("fileType.spreadsheet","Spreadsheet");if(t.includes("stl")||t.includes("3mf")||e==="stl"||e==="3mf"||e==="obj"||e==="fbx"||e==="gltf"||e==="glb"||e==="ply"||e==="step"||e==="stp"||e==="iges"||e==="igs"||e==="f3d"||e==="sldprt"||e==="sldasm")return a("fileType.model3d","3D");if(t.includes("dxf")||t.includes("dwg")||t.includes("acad")||e==="dxf"||e==="dwg")return a("fileType.drawing","Drawing");if(t.includes("gcode")||e==="gcode"||e==="nc"||e==="tap")return a("fileType.cnc","CNC Code");if(t.startsWith("text/")||e==="txt"||e==="md")return a("fileType.text","Text");if(t.includes("json")||e==="json")return"JSON";if(t.includes("xml")||e==="xml")return"XML";if(t.includes("csv")||e==="csv")return"CSV";if(t.includes("rtf")||e==="rtf")return"RTF";if(t.includes("epub")||e==="epub"||e==="mobi"||e==="azw3")return"E-Book";if(t.includes("font")||t.includes("woff")||t.includes("ttf")||t.includes("otf")||e==="woff2"||e==="woff"||e==="ttf"||e==="otf")return a("fileType.font","Font");if(t.includes("sql")||t.includes("sqlite")||e==="sql"||e==="db"||e==="sqlite")return a("fileType.database","Database");if(t.includes("zip")||t.includes("tar")||t.includes("gzip")||t.includes("rar")||t.includes("7z"))return a("fileType.archive","Archive");
1if(e==="js"||e==="ts"||e==="py"||e==="java"||e==="c"||e==="cpp"||e==="cs"||e==="go"||e==="rs"||e==="rb"||e==="php"||e==="swift"||e==="kt"||e==="kts")return a("fileType.code","Source Code");if(e==="fig"||e==="sketch"||e==="xd"||e==="psd"||e==="ai"||e==="indd")return a("fileType.design","Design");if(t.includes("dicom")||e==="dcm"||e==="dicom"||e==="nii"||e==="nrrd"||t.includes("hl7")||t.includes("fhir")||e==="hl7"||e==="ccr")return a("fileType.medical","Medical");if(e==="ifc"||e==="bcf"||e==="rvt"||e==="dgn"||e==="nwd"||e==="nwc"||t.includes("x-ifc"))return a("fileType.bim","BIM");if(e==="xbrl"||e==="ofx"||e==="qfx"||e==="qif"||t.includes("xbrl")||t.includes("x-ofx"))return a("fileType.financial","Financial");if(e==="kml"||e==="kmz"||e==="shp"||e==="shx"||e==="dbf"||e==="prj"||e==="las"||e==="laz"||e==="gpx"||t.includes("google-earth")||t.includes("shapefile")||t.includes("vnd.las"))return a("fileType.geographic","Geographic");if(t.startsWith("chemical/")||e==="pdb"||e==="mol"||e==="mol2"||e==="sdf"||e==="cif"||e==="xyz")return a("fileType.molecular","Molecular");if(e==="fasta"||e==="fa"||e==="fastq"||e==="fq"||e==="gff"||e==="gff3"||e==="gtf"||e==="bed"||e==="vcf"||e==="sam"||e==="bam"||e==="bai"||t.includes("x-fasta"))return a("fileType.bioinformatics","Bioinformatics");if(t==="application/octet-stream"&&e)return e.toUpperCase();const r=t.split("/")[1]||"";return r&&r!=="octet-stream"&&r.length<=10?r.toUpperCase():e?e.toUpperCase():a("fileType.file","File")}function w(t){if(!t||typeof t!="string")return"other";const s=t.toLowerCase();return s.includes("pdf")?"pdf":s.startsWith("image/")?"image":s.startsWith("video/")?"video":s.startsWith("audio/")?"audio":s.includes("wordprocessing")||s.includes("document")||s.includes("spreadsheet")||s.includes("sheet")||s.includes("presentation")||s.includes("ms-excel")||s.includes("ms-word")||s.includes("officedocument")?"document":s.startsWith("text/")||s.includes("plain")||s.includes("markdown")||s.includes("json")||s.includes("xml")||s.includes("csv")?"text":s.includes("zip")||s.includes("x-tar")||s.includes("x-gzip")||s.includes("rar")?"archive":"other"}function R(t){const s={pdf:0,image:0,video:0,audio:0,document:0,text:0,archive:0,other:0};if(!t)return{counts:s,total:0};const n=t.length;for(let e=0;e<n;e++){const r=t[e];if(!(r.kind==="file"||typeof File<"u"&&r instanceof File))continue;const i=(r.type||"").toLowerCase(),c=w(i);s[c]!==void 0?s[c]++:s.other++}const a=Object.values(s).reduce((e,r)=>e+r,0);return{counts:s,total:a}}function E(t){if(!t||typeof t!="string")return"";const s=t.replace(/^www\./i,"").toLowerCase();return`https://www.google.com/s2/favicons?domain=${encodeURIComponent(s)}&sz=128`}function H(t){if(!t||typeof t!="string")return"";const s=t.replace(/^www\./i,"").toLowerCase();return`https://icons.duckduckgo.com/ip3/${encodeURIComponent(s)}.ico`}let _=0;function F(){const t="bcv-ig-"+ ++_;return`<svg class="bcv-link-platform-svg" viewBox="0 0 24 24" fill="none" aria-hidden="true"><defs><linearGradient id="${t}" x1="0%" y1="100%" x2="100%" y2="0%"><stop offset="0%" stop-color="#feda75"/><stop offset="25%" stop-color="#fa7e1e"/><stop offset="50%" stop-color="#d62976"/><stop offset="75%" stop-color="#962fbf"/><stop offset="100%" stop-color="#4f5bd5"/></linearGradient></defs><rect x="2" y="2" width="20" height="20" rx="5" fill="url(#${t})"/><circle cx="12" cy="12" r="5" stroke="#fff" stroke-width="2" fill="none"/><circle cx="17.5" cy="6.5" r="1.5" fill="#fff"/></svg>`}const U=["YouTube","X","Instagram","TikTok","LinkedIn","Facebook","Google Maps","VerityRecord","Amazon","Reddit","Spotify","GitHub","Pinterest","eBay","Medium","Wikipedia","IMDb","StackOverflow","Hepsiburada","Vimeo","SoundCloud","Twitch","AliExpress","Trendyol","N11","Sahibinden","EkÅi Sözlük","Yemeksepeti","Ãiçeksepeti","Kitapyurdu","Enuygun","Letgo","Booking","Yelp","Zillow","Craigslist","Walmart","Hürriyet","Sabah","Milliyet","NTV","CNN Türk","Åikayetvar","Akakçe","Transfermarkt","Investing","Nadirkitap","Habertürk","Sözcü","Haberler","BBC","The Guardian","Daily Mail","NYTimes","Bild","Franceinfo","CBC","CNA","Leboncoin","Kleinanzeigen","Marktplaats","Rightmove","Realestate AU","Funda","Idealista","ImmoScout24","Rakuten","Bol.com","Temu","Shopee","Indeed","Glassdoor","Trustpilot","Le Monde","Tagesschau","Gov.uk","Canada.ca","USA.gov"],m={VerityRecord:'<svg class="bcv-link-platform-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><path d="M9 15l2 2 4-4"/></svg>',YouTube:'<svg class="bcv-link-platform-svg" viewBox="0 0 24 24" fill="none" aria-hidden="true"><rect x="3" y="6" width="18" height="12" rx="3" fill="#ff2d2d"/><path d="M10 9l6 3-6 3V9z" fill="#fff"/></svg>',X:'<svg class="bcv-link-platform-svg" viewBox="0 0 24 24" fill="none" aria-hidden="true"><rect x="2" y="2" width="20" height="20" rx="3" fill="#000"/><path d="M13.5 10.1l5.8-6.7h-1.4l-5 5.8-4-5.8H3.3l6.1 8.9-6.1 7h1.4l5.3-6.1 4.3 6.1h5.6l-6.4-9.2zm-1.9 2.2l-.6-.9-4.9-7h2.1l4 5.7.6.9 5.1 7.3h-2.1l-4.2-6z" fill="#fff"/></svg>',get Instagram(){return F()},TikTok:'<svg class="bcv-link-platform-svg" viewBox="0 0 24 24" fill="none" aria-hidden="true"><rect x="2" y="2" width="20" height="20" rx="3" fill="#010101"/><path d="M16.6 8.2a3.8 3.8 0 0 1-2.4-1.1 3.8 3.8 0 0 1-.8-1.6h-2v9.1a2.2 2.2 0 1 1-1.5-2.1V10a4.7 4.7 0 0 0-.5 0 4.2 4.2 0 1 0 4.2 4.2v-4.8a5.8 5.8 0 0 0 3.4 1.1V8.2h-.4z" fill="#fff"/></svg>',LinkedIn:'<svg class="bcv-link-platform-svg" viewBox="0 0 24 24" fill="none" aria-hidden="true"><rect x="2" y="2" width="20" height="20" rx="3" fill="#0A66C2"/><path d="M7 10v7h2.5v-7H7zm1.2-1h0a1.3 1.3 0 1 1 0-2.6 1.3 1.3 0 0 1 0 2.6zM17 17h-2.5v-3.5c0-1-.4-1.7-1.3-1.7a1.4 1.4 0 0 0-1.3 1 1.8 1.8 0 0 0 0 .6V17H9.5v-7H12v1a2.5 2.5 0 0 1 2.3-1.2c1.6 0 2.8 1.1 2.8 3.4V17z" fill="#fff"/></svg>',Facebook:'<svg class="bcv-link-platform-svg" viewBox="0 0 24 24" fill="none" aria-hidden="true"><rect x="2" y="2" width="20" height="20" rx="5" fill="#1877F2"/><path d="M16.5 13l.5-3.5h-3.2V7.5c0-1 .4-1.8 1.8-1.8H17V3.1s-1.2-.2-2.3-.2c-2.4 0-3.9 1.5-3.9 4v2.6H7.5V13h3.3v8.4c.7.1 1.3.1 2 .1s1.4 0 2-.1V13h2.7z" fill="#fff"/></svg>',"Google Maps":'<svg class="bcv-link-platform-svg" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z" fill="#EA4335"/></svg>'}
1,h='<svg class="bcv-link-generic-ic" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.72-1.71"/></svg>';function z(t,s={}){const n=s.linkLabel??"Link",a=t?.label||"Link",e=t?.favicon||"",r=t?._fallbackFavicon||"";if(m[a])return`<span class="bcv-link-icon-wrap bcv-link-platform">${m[a]}</span>`;if(e){const o=e.replace(/"/g,"""),i=r&&r!==e?r.replace(/"/g,"""):"",c=t?._icoFavicon&&t._icoFavicon!==e?t._icoFavicon.replace(/"/g,"""):"",f=t?._ddgFavicon&&t._ddgFavicon!==e?t._ddgFavicon.replace(/"/g,"""):"",l="var s=this.dataset;if(s.fb&&!s.t1){s.t1='1';this.src=s.fb;return;}if(s.ico&&!s.t3){s.t3='1';this.src=s.ico;return;}if(s.ddg&&!s.t2){s.t2='1';this.src=s.ddg;return;}this.style.display='none';var n=this.nextElementSibling;if(n&&n.classList.contains('bcv-link-favicon-fallback'))n.style.display='inline-flex';",d=(i?` data-fb="${i}"`:"")+(c?` data-ico="${c}"`:"")+(f?` data-ddg="${f}"`:"");return`<span class="bcv-link-icon-wrap bcv-link-favicon-wrap"><img class="bcv-link-favicon" src="${o}" alt="" referrerpolicy="no-referrer"${d} onerror="${l}" /><span class="bcv-link-favicon-fallback" style="display:none;align-items:center;justify-content:center;width:100%;height:100%;" aria-hidden="true">${h}</span><span class="bcv-link-label">${n}</span></span>`}return`<span class="bcv-link-icon-wrap bcv-link-label-only">${h}<span class="bcv-link-label">${n}</span></span>`}async function V(t){if(!t||typeof t.arrayBuffer!="function"||!window.crypto?.subtle)return null;try{const s=await t.arrayBuffer(),n=await crypto.subtle.digest("SHA-256",s);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,"0")).join("")}catch{return null}}const b={link:0,image:1,video:2,audio:3,pdf:4,document:5,text:6,archive:7,other:8};function v(t){const n=(t.name||t.original_name||"").toLowerCase().split(".").pop()||"";return k[n]||"#zzz"}function x(t){return t.is_link||(t.mime_type||"")==="text/uri-list"?"link":w(t.mime_type||"")}const G=["original","alpha","size","type","color"];function O(t,s){if(!Array.isArray(t)||t.length<=1)return t;const n=[...t];switch(s){case"alpha":return n.sort((a,e)=>{const r=(a.name||a.original_name||a.url||"").toLowerCase(),o=(e.name||e.original_name||e.url||"").toLowerCase();return r.localeCompare(o,void 0,{numeric:!0})});case"type":return n.sort((a,e)=>{const r=b[x(a)]??9,o=b[x(e)]??9;if(r!==o)return r-o;const i=(a.name||"").toLowerCase().split(".").pop()||"",c=(e.name||"").toLowerCase().split(".").pop()||"";return i!==c?i.localeCompare(c):(a.name||"").localeCompare(e.name||"")});case"size":return n.sort((a,e)=>{const r=a.original_size_bytes||a.size_bytes||0,o=e.original_size_bytes||e.size_bytes||0;return o!==r?o-r:(a.name||"").localeCompare(e.name||"")});case"color":return n.sort((a,e)=>{const r=v(a),o=v(e);return r!==o?r.localeCompare(o):(a.name||"").localeCompare(e.name||"")});default:{const a=e=>!!e?.is_link||(e?.mime_type||"").toLowerCase()==="text/uri-list";return n.sort((e,r)=>{const o=a(e)?1:0,i=a(r)?1:0;return o!==i?o-i:(e.position??Number.MAX_SAFE_INTEGER)-(r.position??Number.MAX_SAFE_INTEGER)})}}}function W(t,s){if(!Array.isArray(t)||!s)return t;let n=t;if(s.type&&s.type!=="all"&&(n=n.filter(a=>{const e=a.is_link||a.mime_type==="text/uri-list";return s.type==="link"?e:!e})),s.platform&&s.platform!=="all"&&(n=n.filter(a=>(a.capture?.platform||a._linkInfo?.label||"").toLowerCase()===s.platform.toLowerCase())),s.status&&s.status!=="all"&&(n=n.filter(a=>{const e=a.capture?.status||"";return s.status==="done"?e==="done":s.status==="pending"?e==="pending"||e==="processing"||e==="queued":s.status==="failed"?e==="failed"||e==="timeout"||e==="error":!0})),s.dateFrom||s.dateTo){const a=s.dateFrom?new Date(s.dateFrom+"T00:00:00Z"):null,e=s.dateTo?new Date(s.dateTo+"T23:59:59Z"):null;n=n.filter(r=>{const o=r.added_at||r.capture?.captured_at||r.created_at||"";if(!o)return!1;const i=o._seconds?new Date(o._seconds*1e3):new Date(o);return!(isNaN(i.getTime())||a&&i<a||e&&i>e)})}if(s.search&&s.search.trim()){const a=s.search.trim().toLowerCase();n=n.filter(e=>{const r=(e.name||e.original_name||"").toLowerCase(),o=(e.url||e._linkUrl||"").toLowerCase(),i=(e.capture?.og?.title||e.capture?.site_data?.title||"").toLowerCase();return r.includes(a)||o.includes(a)||i.includes(a)})}return n}export{G as F,U as L,L as _,A as a,I as b,W as c,E as d,q as e,S as f,R as g,z as h,T as i,B as j,N as k,$ as l,M as m,H as n,V as o,D as p,O as s};
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.