1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[97003],{42092:(e,t,n)=>{n.d(t,{cn:()=>h,Si:()=>x,NP:()=>C,Ig:()=>k,Gb:()=>g,JK:()=>f,wu:()=>u,Fr:()=>F,cZ:()=>p,dv:()=>b,IV:()=>y});var r=n(2821),i=n(75889),o=n(18720);let a=e=>{var t,n;if("string"!=typeof e||!e)return"";try{return(null==(t=new URL(e).pathname.split(".").pop())?void 0:t.toLowerCase())||""}catch(t){return(null==(n=e.split("?")[0].split("#")[0].split(".").pop())?void 0:n.toLowerCase())||""}},s=new Set(["jpg","jpeg","png","gif","webp","avif","bmp","tiff","tif","svg","ico"]),l=new Set(["mp4","mov","avi","mkv","webm","flv","wmv","m4v"]),d=new Set(["mp3","wav","m4a","ogg","aac","flac","wma","aiff","au","mid","midi","rmi","opus"]),c=new Set(["glb","gltf"]),u=e=>s.has(a(e)),p=e=>l.has(a(e)),f=e=>d.has(a(e)),g=e=>c.has(a(e));function h(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,i.QP)((0,r.$)(t))}function m(e){try{let t=new URL(e,window.location.href).pathname;try{return decodeURIComponent(t)}catch(e){return t}}catch(e){return""}}function v(e){return m(e).split("/").filter(Boolean).pop()||"download"}function b(e){var t,n;return e?{prediction_uuid:null!=(t=e.uuid)?t:null!=e.id?String(e.id):void 0,inputs:null!=(n=e.inputs)?n:e.input}:{}}function w(e){if("undefined"==typeof document)return;let t=document.createElement("a");t.href=e,t.download=v(e),t.target="_blank",t.rel="noopener",document.body.appendChild(t),t.click(),setTimeout(()=>t.remove(),0)}function y(e,t){if("undefined"==typeof document)return;let n=URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download=t,document.body.appendChild(r),r.click(),setTimeout(()=>{r.remove(),URL.revokeObjectURL(n)},1e3)}function x(e,t,n){return new Promise((r,i)=>{let a=[...e],s=0,l=0,d=0,c=()=>{let u;if(0===a.length){d>0?o.toast.warning(d===e.length?"Cross-origin restrictions blocked in-page download; files were opened with their original filenames.":"Cross-origin restrictions blocked in-page download for ".concat(d," of ").concat(e.length," files; those were opened with their original filenames.")):l>0&&o.toast.warning(l===e.length?"In-page download failed; files were opened directly with their original filenames.":"In-page download failed for ".concat(l," of ").concat(e.length," files; those files were opened directly with their original filenames.")),r();return}let p=a.shift(),f="string"==typeof p?p:null==p?void 0:p.url,g="string"==typeof p?n:{...null!=p?p:{}};if("string"!=typeof f||!f){o.toast.warning("Unsupported data format. You can paste the URL into your browser to download it."),i(Error("Invalid URL"));return}if(!/^https?:\/\//i.test(f)){let r=/^\s*<[a-z!?]/i.test(f),i=r?"html":"txt",o=(null==g?void 0:g.prediction_uuid)?"".concat(g.prediction_uuid).concat(n&&e.length>1?"-".concat(s+1):"",".").concat(i):"output-".concat(Date.now(),".").concat(i);y(new Blob([f],{type:r?"text/html":"text/plain"}),o),t(++s/e.length*100),c();return}if(/\.safetensors?$/i.test(m(f))){w(f),t(++s/e.length*100),c();return}let h=new XMLHttpRequest,b=!1,x=()=>{void 0!==u&&(clearTimeout(u),u=void 0)},k=()=>{x(),u=setTimeout(()=>{C(!1)},9e4)},C=function(){let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];b||(b=!0,x(),h.readyState!==XMLHttpRequest.UNSENT&&h.readyState!==XMLHttpRequest.DONE&&h.abort(),w(f),l++,n&&d++,t(++s/e.length*100),c())};h.onloadstart=k,h.onprogress=n=>{k(),n.lengthComputable&&n.total>0&&t((s+Math.min(n.loaded/n.total,1))/e.length*100)},h.onload=()=>{if(b)return;if(h.status<200||h.status>=300)return void C(0===h.status);let r=h.response;if(!(r instanceof Blob)||0===r.size)return void C(!1);b=!0,x(),y(r,((t,r)=>{var i;let o=v(t),a=o.includes(".")&&null!=(i=o.split(".").pop())?i:"";if(null==r?void 0:r.prediction_uuid){let t=n&&e.length>1?"-".concat(s+1):"";return a?"".concat(r.prediction_uuid).concat(t,".").concat(a):"".concat(r.prediction_uuid).concat(t)}return o})(f,g)),t(++s/e.length*100),c()},h.onerror=()=>C(!0),h.ontimeout=()=>C(!1),h.onabort=()=>C(!1);try{h.open("GET",f,!0),h.responseType="blob",k(),h.send()}catch(e){C(!1)}};c()})}let k=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t?n?"#66666610":"#666666":n?(e=>{switch(e){case"completed":return"#00bc7d26";case"failed":case"rejected":return"#FF000010";case"processing":return"#fe9a0026";case"created":case"pending":case"auditing":return"#FF990010";default:return"#00000010"}})(e):(e=>{switch(e){case"completed":return"#007a55";case"failed":case"rejected":return"#FF0000";case"processing":return"#bb4d00";case"created":case"pending":case"auditing":return"#FF9900";default:return"#000000"}})(e)},C=e=>{let t=["#5755D5","#017AFF","#5AC8FC","#4CDA63","#FE332A","#FF9601","#E6B800","#94939A","#989BDA","#90B9CC"];return t[e%t.length]},F=()=>window.innerWidth<768},97003:(e,t,n)=>{n.d(t,{$:()=>c,r:()=>d});var r=n(95155),i=n(12115),o=n(32467),a=n(83101),s=n(35299),l=n(42092);let d=(0,a.F)("relative inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:opacity-90",neutral:"bg-black text-white shadow-none hover:bg-black/80 dark:bg-white dark:text-black dark:hover:bg-white/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"bg-background shadow-sm text-accent-foreground hover:opacity-90 border-input border",secondary:"bg-secondary text-secondary-foreground shadow-none hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 px-3 text-xs",form:"h-9 px-3 text-xs tracking-[0.3px]",lg:"h-10 px-8",icon:"h-9 w-9"},radius:{default:"rounded-md",sm:"rounded-sm"}}
1,defaultVariants:{variant:"default",size:"default",radius:"default"}}),c=i.forwardRef((e,t)=>{let{className:n,variant:a,size:c,radius:u,asChild:p=!1,loading:f=!1,disabled:g,children:h,...m}=e,v=p?o.DX:"button",b=g||f,w=e=>f?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"inline-flex items-center justify-center gap-2 opacity-0",children:e}),(0,r.jsx)(s.A,{"aria-hidden":"true",className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 animate-spin motion-reduce:animate-none"})]}):e,y=p&&f?i.Children.only(h):null;return(0,r.jsx)(v,{className:(0,l.cn)(d({variant:a,size:c,radius:u,className:n})),ref:t,...m,disabled:b,"aria-disabled":b||m["aria-disabled"],"aria-busy":f||m["aria-busy"],onClickCapture:p&&b?e=>{e.preventDefault(),e.stopPropagation()}:m.onClickCapture,children:y?i.cloneElement(y,void 0,w(y.props.children)):w(h)})});c.displayName="Button"}}]);
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.