1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5cf8cddf-50fb-4991-8860-944c79d19531",e._sentryDebugIdIdentifier="sentry-dbid-5cf8cddf-50fb-4991-8860-944c79d19531")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1276],{83240:(e,t,n)=>{n.d(t,{Gu:()=>s,KM:()=>o,Ng:()=>h,WX:()=>a,Zk:()=>l,zN:()=>p});var i=n(61320),r=n(67934);let s=[{label:"2K",value:i.z3.RES_2K},{label:"4K",value:i.z3.RES_4K},{label:"6K",value:i.z3.RES_6K}],a=[{label:"720p",value:i.Bt.RES_720P},{label:"1080p",value:i.Bt.RES_1080P}],o=11,l=10,d={[i.bV.IMAGE]:r.hB.IMAGE_ENHANCER,[i.bV.VIDEO]:r.hB.VIDEO_ENHANCER},c={[r.hB.IMAGE_ENHANCER]:r.jk,[r.hB.VIDEO_ENHANCER]:r.F},u={[r.hB.IMAGE_ENHANCER]:{emptyDescription:"Upscale images up to 6K resolution, and add new details.",maxUploadText:"Max 30MB",missingMediaMessage:"Add an image before running Image Enhancer."},[r.hB.VIDEO_ENHANCER]:{emptyDescription:"Upscale videos up to 1080p resolution, and add new details.",maxUploadText:"Max 30MB / 10 seconds",missingMediaMessage:"Add a video before running Video Enhancer."}};function p(e){var t;let n=d[e],i=c[n],r=u[n];return{title:i.title,description:i.description,heroImageSrc:null!==(t=i.image)&&void 0!==t?t:"",emptyDescription:r.emptyDescription,maxUploadText:r.maxUploadText,missingMediaMessage:r.missingMediaMessage}}function h(e){let t=Math.round(10*e)/10;return 1===t?"1 second":"".concat(t,"s")}},84445:(e,t,n)=>{n.d(t,{VV:()=>S,Dm:()=>T,fT:()=>M});var i=n(95155),r=n(57635),s=n(44323),a=n(77567),o=n(21220),l=n(93751),d=n(58887),c=n(69604),u=n(83347),p=n(70112),h=n(26903),m=n(15763),x=n(11352),g=n(38280),f=n(31951),v=n(66766),b=n(28599),y=n(83240),j=n(12115);function E(e){let{beforeSrc:t,afterSrc:n,maxHeight:r,mediaType:s="image"}=e,[a,o]=(0,j.useState)(50),[l,d]=(0,j.useState)(!1),[c,u]=(0,j.use
1State)(!1),p=(0,j.useRef)(null),h=(0,j.useRef)(!1),m=(0,j.useRef)(null),x=(0,j.useRef)(null),g=l&&c,f=e=>{let t=p.current;if(!t)return;let n=t.getBoundingClientRect();o(Math.max(0,Math.min(100,(e-n.left)/n.width*100)))};(0,j.useEffect)(()=>{d(!1),u(!1),o(50)},[n,t,s]),(0,j.useEffect)(()=>{if("video"!==s)return;let e=m.current,t=x.current;if(!e||!t)return;let n=()=>{Math.abs(e.currentTime-t.currentTime)>.08&&(t.currentTime=e.currentTime)},i=()=>{n(),t.playbackRate=e.playbackRate,t.play().catch(()=>{})},r=()=>{t.pause()},a=()=>{t.playbackRate=e.playbackRate},o=()=>{t.muted=e.muted,t.volume=e.volume},l=()=>{t.currentTime=e.currentTime};return e.addEventListener("play",i),e.addEventListener("pause",r),e.addEventListener("seeking",n),e.addEventListener("seeked",n),e.addEventListener("timeupdate",n),e.addEventListener("ratechange",a),e.addEventListener("volumechange",o),e.addEventListener("ended",l),e.readyState>=HTMLMediaElement.HAVE_METADATA&&n(),e.paused||i(),()=>{e.removeEventListener("play",i),e.removeEventListener("pause",r),e.removeEventListener("seeking",n),e.removeEventListener("seeked",n),e.removeEventListener("timeupdate",n),e.removeEventListener("ratechange",a),e.removeEventListener("volumechange",o),e.removeEventListener("ended",l)}},[s,l,c]);let v={display:"block",width:"100%",maxHeight:r,objectFit:"contain",pointerEvents:"none"},b={position:"absolute",inset:0,width:"100%",height:"100%",maxHeight:r,objectFit:"contain",clipPath:"inset(0 ".concat(100-a,"% 0 0)"),pointerEvents:"none"};return(0,i.jsxs)("div",{ref:p,onPointerDown:e=>{h.current=!0,e.target.setPointerCapture(e.pointerId),f(e.clientX)},onPointerMove:e=>{h.current&&f(e.clientX)},onPointerUp:()=>{h.current=!1},style:{position:"relative",width:"100%",minHeight:g?void 0:200,maxHeight:r,overflow:"hidden",cursor:"ew-resize",touchAction:"none",userSelect:"none"},children:["video"===s?(0,i.jsx)("video",{ref:m,src:n,"aria-label":"After",muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onCanPlay:()=>d(!0),style:v}):(0,i.jsx)("img",{src:n,alt:"After",draggable:!1,crossOrigin:"anonymous",onLoad:()=>d(!0),style:v}),"video"===s?(0,i.jsx)("video",{ref:x,src:t,"aria-label":"Before",muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onCanPlay:()=>u(!0),style:b}):(0,i.jsx)("img",{src:t,alt:"Before",draggable:!1,crossOrigin:"anonymous",onLoad:()=>u(!0),style:b}),g&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{position:"absolute",top:0,bottom:0,left:"".concat(a,"%"),width:2,backgroundColor:"white",transform:"translateX(-1px)",pointerEvents:"none"}}),(0,i.jsx)("div",{style:{position:"absolute",top:"50%",left:"".concat(a,"%"),width:32,height:32,borderRadius:"50%",backgroundColor:"white",border:"2px solid rgba(0, 0, 0, 0.3)",transform:"translate(-50%, -50%)",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{opacity:.6},children:[(0,i.jsx)("path",{d:"M5 3L2 8L5 13",stroke:"black",strokeWidth:"1.5"}),(0,i.jsx)("path",{d:"M11 3L14 8L11 13",stroke:"black",strokeWidth:"1.5"})]})}),(0,i.jsx)("div",{style:{position:"absolute",top:8,left:8,padding:"2px 8px",borderRadius:4,backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",fontSize:12,pointerEvents:"none"},children:"Before"}),(0,i.jsx)("div",{style:{position:"absolute",top:8,right:8,padding:"2px 8px",borderRadius:4,backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",fontSize:12,pointerEvents:"none"},children:"After"})]})]})}function k(e){let{title:t,description:n,centered:r=!1,withTopMargin:s=!1}=e;return(0,i.jsxs)(o.Stack,{gap:4,align:r?"center":void 0,children:[(0,i.jsx)(l.Title,{order:3,ta:r?"center":void 0,fw:600,mt:s?"md":void 0,children:t}),(0,i.jsx)(d.Text,{c:"dimmed",ta:r?"center":void 0,size:"sm",maw:480,children:n})]})}function w(e){let{mediaType:t,src:n,isLoading:r,maxHeight:a}=e,o=(0,i.jsx)(s.t,{src:n,alt:"Enhancer input preview",architectureConfig:null,style:{width:"100%",maxHeight:a,objectFit:"contain"}});return"video"===t&&(o=(0,i.jsx)(s.F,{src:n,alt:"Enhancer input preview",architectureConfig:null,wrapperStyle:{width:"100%",maxHeight:a},style:{width:"100%",maxHeight:a,objectFit:"contain"}})),(0,i.jsxs)(c.Box,{p:"sm",bg:"dark.9",style:{borderRadius:12,position:"relative"},children:[o,r?(0,i.jsxs)(c.Box,{style:{position:"absolute",inset:0,borderRadius:12,backgroundColor:"rgba(0, 0, 0, 0.55)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:8,animation:"skeleton-pulse 2s ease-in-out infinite"},children:[(0,i.jsx)(u.Loader,{size:"sm",color:"white"}),(0,i.jsx)(d.Text,{size:"sm",c:"white",children:"Enhancing..."})]}):null]})}
1function T(e){let{copy:t,isDragging:n,isUploading:r,onUploadClick:s,onSelectAsset:l,dragProps:u}=e,{isDesktop:m}=(0,a.VT)("isDesktop");return(0,i.jsxs)(c.Box,{...u,w:"100%",maw:500,style:{borderRadius:12,border:n?"2px dashed var(--mantine-color-orange-5)":"2px dashed var(--mantine-color-dark-7)",backgroundColor:n?"rgba(216, 131, 41, 0.35)":"black",transition:"border 150ms ease, background 150ms ease",overflow:"hidden"},children:[(0,i.jsx)(c.Box,{style:{position:"relative",width:"100%",aspectRatio:"3 / 2"},children:(0,i.jsx)(v.default,{src:t.heroImageSrc,alt:t.title,fill:!0,sizes:"(max-width: 500px) 100vw, 500px",style:{objectFit:"cover"}})}),(0,i.jsxs)(o.Stack,{gap:"md",p:m?"md":"xs",children:[(0,i.jsx)(k,{title:t.title,description:t.emptyDescription,centered:!0}),(0,i.jsxs)(p.Group,{gap:m?"sm":4,grow:!0,children:[(0,i.jsx)(h.Button,{variant:"white",radius:"md",size:m?"md":"sm",color:"black",leftSection:(0,i.jsx)(g.A,{size:16}),onClick:s,loading:r,disabled:r,children:"Upload"}),(0,i.jsx)(h.Button,{variant:"white",radius:"md",size:m?"md":"sm",color:"black",leftSection:(0,i.jsx)(f.A,{size:16}),onClick:l,disabled:r,px:0,children:"Select creation"})]}),(0,i.jsx)(d.Text,{c:"dimmed",size:"xs",ta:"center",children:t.maxUploadText})]})]})}function R(e){let{mediaType:t,mediaUrl:n,resultUrl:r,maxHeight:s}=e;return(0,i.jsx)(c.Box,{p:"sm",bg:"dark.9",style:{borderRadius:12},children:(0,i.jsx)(E,{beforeSrc:n,afterSrc:r,maxHeight:s,mediaType:t})})}function C(e){let{mediaType:t,width:n,height:r,duration:s}=e,a="".concat(n," x ").concat(r);return"video"===t&&null!==s&&(a+=" \xb7 ".concat((0,y.Ng)(s))),(0,i.jsx)(d.Text,{c:"dimmed",size:"sm",children:a})}function M(e){let{mediaType:t,mediaUrl:n,result:r,resultUrl:s,isGenerating:a,previewMaxHeight:l,width:d,height:c,duration:u}=e;return(0,i.jsxs)(o.Stack,{gap:"sm",style:{flex:1,minWidth:0},children:[r&&s?(0,i.jsx)(R,{mediaType:t,mediaUrl:n,resultUrl:s,maxHeight:l}):(0,i.jsx)(w,{mediaType:t,src:n,isLoading:a,maxHeight:l}),r?(0,i.jsx)(b.k,{result:r,children:(0,i.jsx)(b.t,{result:r,resultUrl:s})}):(0,i.jsx)(C,{mediaType:t,width:d,height:c,duration:u})]})}function S(e){let{isDesktop:t,resolutionOptions:n,selectedResolution:s,onResolutionChange:a,onStartNew:l,onGenerate:c,startNewDisabled:u,disableGenerate:g,isGenerating:f,notice:v,customTopSection:b}=e;return(0,i.jsxs)(o.Stack,{gap:"md",w:t?250:"100%",style:t?{flexShrink:0}:void 0,children:[null!=b?b:(0,i.jsxs)(o.Stack,{gap:"sm",children:[(0,i.jsx)(d.Text,{fw:600,children:"Model"}),(0,i.jsx)(m.Select,{data:[{label:"Mage Enhancer",value:"selected-model"}],value:"selected-model",allowDeselect:!1})]}),(0,i.jsxs)(o.Stack,{gap:"sm",children:[(0,i.jsx)(d.Text,{fw:600,children:"Output Resolution"}),(0,i.jsx)(x.SegmentedControl,{fullWidth:!0,size:"sm",value:s,onChange:a,data:n,withItemsBorders:!1})]}),(0,i.jsxs)(p.Group,{gap:"sm",grow:!0,children:[(0,i.jsx)(h.Button,{size:"md",variant:"light",color:"gray",onClick:l,disabled:u,children:"Replace"}),(0,i.jsx)(h.Button,{size:"md",variant:"white",c:"black",onClick:c,disabled:g,loading:f,loaderProps:{color:"black"},styles:{root:{background:r._8,border:"none"}},children:"Enhance"})]}),(0,i.jsx)(d.Text,{c:v.color,size:"sm",ta:"center",children:v.message})]})}},87556:(e,t,n)=>{n.d(t,{r:()=>o});var i=n(95155),r=n(77567),s=n(69604),a=n(8141);function o(e){let{children:t}=e,{isDesktop:n}=(0,r.VT)("isDesktop");return n?(0,i.jsx)(a.Center,{w:"100%",style:{flex:1},children:t}):(0,i.jsx)(s.Box,{p:"xs",children:t})}}}]);
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.