(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[806],{37474:function(e,t,r){Promise.resolve().then(r.bind(r,44431)),Promise.resolve().then(r.bind(r,90610)),Promise.resolve().then(r.bind(r,62612)),Promise.resolve().then(r.bind(r,23864)),Promise.resolve().then(r.t.bind(r,26196,23))},62612:function(e,t,r){"use strict";r.d(t,{default:function(){return m}});var n=r(20881),o=r(62081),i=r(67274),a=r(15649),s=r(64149),l=r(27525),c=r(87984),u=r(44425),d=r(29681),f=r(48967),p=r(44431);function m(){let e=(0,o.k)(),t=(0,o.x)(),r=(0,l.useRouter)(),m=e.config,[h,g]=(0,s.useState)(""),v=async()=>await (0,d.Y)(t,e,r,[h,g],a.lf,!0);(0,s.useEffect)(()=>{e.clearFile(),e.setConfig({color:"transparent"})},[]);let b=e.isLoading||t.currentCredit<1;return(0,n.jsx)(i.V,{showContent:e.fileObj,children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)("div",{className:"mt-5 flex w-full items-center justify-between rounded-2xl bg-gray-900/10 p-5",children:[(0,n.jsx)("div",{children:(0,n.jsx)(f.Ae,{menuText:"Color: ".concat(null==m?void 0:m.color),explain:"Select the color you want to apply as the new background after removing the original.",color:null==m?void 0:m.color,setColor:t=>{let r=t;"#NaNNaNNaN"===r&&(r="transparent"),e.setConfig({color:r})}})}),(0,n.jsxs)("button",{disabled:b,onClick:v,className:"".concat(c.O9.greenButtonFn(b)," group flex shrink-0 items-center space-x-2 rounded-3xl px-6 py-3 text-lg font-semibold"),children:[(0,n.jsx)(u.Z,{className:"size-7 ".concat(e.isLoading?"animate-spin":"".concat(!b&&"group-hover:animate-spin"))}),(0,n.jsx)("span",{children:"Submit"})]})]}),(0,n.jsx)("div",{className:"mt-3 text-right text-lg font-semibold text-red-500",children:h}),(0,n.jsx)(p.PG,{})]})})}},23864:function(e,t,r){"use strict";r.d(t,{default:function(){return a}});var n=r(20881),o=r(87984),i=r(56539);function a(){return(0,n.jsxs)("div",{className:"mt-16 w-full",children:[(0,n.jsx)("span",{id:"about",className:"sr-only -mt-[130px]"}),(0,n.jsx)("h2",{className:"mb-5 text-3xl font-semibold sm:text-4xl sm:leading-tight",children:"About"}),(0,n.jsx)(o.Pn,{className:"mt-5",children:"Whether you want to make a background transparent (PNG), add a white\n              background, isolate the subject, or create a precise cutout, ImagePro’s\n              AI background remover lets you do it all and more—designed for\n              professionals seeking high-quality results. Boost your image editing for\n              larger-scale projects by utilizing AI photo editing features that go\n              beyond just background removal, with no need for any lines of code.\n              Explore boundless creative possibilities as you refine your images for\n              both professional and personal projects using our AI design tools."}),(0,n.jsx)(o.BB,{className:"mt-8",children:"Remove backgrounds 100% automatically"}),(0,n.jsx)("div",{className:"mt-10 flex justify-center",children:(0,n.jsx)("div",{className:"-ml-1 overflow-hidden rounded-2xl",children:(0,n.jsx)("img",{src:"/img/apps/bg-remove/sample.jpg",alt:"AI Background Remover",title:"AI Background Remover",className:"ml-1 max-w-4xl"})})}),(0,n.jsx)(o.Pn,{className:"mt-16",children:"Remove the background from your images 100% automatically in just a few\n              seconds with our AI-powered tool. No manual editing or complex steps\n              required—simply upload your image, and the AI will accurately detect and\n              remove the background with precision. Perfect for high-volume tasks, our\n              tool saves time and effort, delivering fast, professional results for\n              all your image editing needs."}),(0,n.jsx)(i.ReactCompareSlider,{className:"my-10 h-auto w-full",itemOne:(0,n.jsx)(i.ReactCompareSliderImage,{src:"/img/apps/bg-remove/before.webp",alt:"before",title:"before"}),itemTwo:(0,n.jsx)(i.ReactCompareSliderImage,{src:"/img/apps/bg-remove/after.png",alt:"After",title:"after"})}),(0,n.jsx)(o.Pn,{className:"mt-10",children:"Streamline your workflow by removing backgrounds automatically in\n              seconds. Perfect for uploading products to e-commerce sites, enhancing\n              photos for editing, or even prepping images for video projects, our\n              AI-powered tool saves you time and effort. No manual work, no\n              hassle—just quick, high-quality results that let you focus on what\n              matters most: creating and showcasing your work."})]})}},56539:function(e,t,r){"use strict";let n;r.d(t,{ReactCompareSlider:function(){return x},ReactCompareSliderImage:function(){return w}});var o=r(64149),i=r(20881),a=(0,o.forwardRef)((e,t)=>{let{transition:r,...n}=e;return(0,i.jsx)("div",{...n,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",transition:r?"clip-path ".concat(r):void 0,userSelect:"none",willChange:"clip-path, transition",KhtmlUserSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none"},"data-rcs":"clip-item",ref:t})});a.displayName="ContainerClip";var s=(0,o.forwardRef)((e,t)=>{let{children:r,disabled:n,portrait:o,position:a,transition:s}=e,l={position:"absolute",top:0,width:o?"100%":void 0,height:o?void 0:"100%",background:"none",border:0,padding:0,pointerEvents:"all",appearance:"none",WebkitAppearance:"none",MozAppearance:"none",outline:0,transform:o?"translate3d(0, -50% ,0)":"translate3d(-50%, 0, 0)",transition:s?"".concat(o?"top":"left"," ").concat(s):void 0};return(0,i.jsx)("button",{ref:t,"aria-label":"Drag to move or focus and use arrow keys","aria-orientation":o?"vertical":"horizontal","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,"data-rcs":"handle-container",disabled:n,role:"slider",style:l,children:r})});s.displayName="ThisHandleContainer";var l=e=>{let{flip:t}=e;return(0,i.jsx)("div",{className:"__rcs-handle-arrow",style:{width:0,height:0,borderTop:"8px solid transparent",borderRight:"10px solid",borderBottom:"8px solid transparent",transform:t?"rotate(180deg)":void 0}})},c=e=>{let{className:t="__rcs-handle-root",disabled:r,buttonStyle:n,linesStyle:o,portrait:a,style:s,...c}=e,u={display:"flex",flexDirection:a?"row":"column",placeItems:"center",height:"100%",cursor:r?"not-allowed":a?"ns-resize":"ew-resize",pointerEvents:"none",color:"#fff",...s},d={flexGrow:1,height:a?2:"100%",width:a?"100%":2,backgroundColor:"currentColor",pointerEvents:"auto",boxShadow:"0 0 4px rgba(0,0,0,.5)",...o},f={display:"grid",gridAutoFlow:"column",gap:8,placeContent:"center",flexShrink:0,width:56,height:56,borderRadius:"50%",borderStyle:"solid",borderWidth:2,pointerEvents:"auto",backdropFilter:"blur(7px)",WebkitBackdropFilter:"blur(7px)",backgroundColor:"rgba(0, 0, 0, 0.125)",boxShadow:"0 0 4px rgba(0,0,0,.35)",transform:a?"rotate(90deg)":void 0,...n};return(0,i.jsxs)("div",{...c,className:t,style:u,children:[(0,i.jsx)("div",{className:"__rcs-handle-line",style:d}),(0,i.jsxs)("div",{className:"__rcs-handle-button",style:f,children:[(0,i.jsx)(l,{}),(0,i.jsx)(l,{flip:!0})]}),(0,i.jsx)("div",{className:"__rcs-handle-line",style:d})]})},u=((n=u||{}).ARROW_LEFT="ArrowLeft",n.ARROW_RIGHT="ArrowRight",n.ARROW_UP="ArrowUp",n.ARROW_DOWN="ArrowDown",n),d=function(){let{boxSizing:e="border-box",objectFit:t="cover",objectPosition:r="center center",...n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{display:"block",width:"100%",height:"100%",maxWidth:"100%",boxSizing:e,objectFit:t,objectPosition:r,...n}},f=e=>{let t=(0,o.useRef)(e);return(0,o.useEffect)(()=>{t.current=e}),t.current},p=(e,t,r,n)=>{let i=(0,o.useRef)();(0,o.useEffect)(()=>{i.current=t},[t]),(0,o.useEffect)(()=>{if(!(r&&r.addEventListener))return;let t=e=>i.current&&i.current(e);return r.addEventListener(e,t,n),()=>{r.removeEventListener(e,t,n)}},[e,r,n])},m="u">typeof window&&"u">typeof window.document&&"u">typeof window.document.createElement?o.useLayoutEffect:o.useEffect,h=(e,t)=>{let r=(0,o.useRef)(),n=(0,o.useCallback)(()=>{e.current&&r.current&&r.current.observe(e.current)},[e]);m(()=>(r.current=new ResizeObserver(e=>{let[r]=e;return t(r.contentRect)}),n(),()=>{r.current&&r.current.disconnect()}),[t,n])},g={capture:!1,passive:!0},v={capture:!0,passive:!1},b=e=>{e.preventDefault(),e.currentTarget.focus()},x=(0,o.forwardRef)((e,t)=>{let{boundsPadding:r=0,browsingContext:n=globalThis,changePositionOnHover:l=!1,disabled:d=!1,handle:m,itemOne:x,itemTwo:w,keyboardIncrement:y="5%",onlyHandleDraggable:j=!1,onPositionChange:k,portrait:R=!1,position:C=50,style:N,transition:E,...S}=e,A=(0,o.useRef)(null),P=(0,o.useRef)(null),_=(0,o.useRef)(null),I=(0,o.useRef)(C),[L,O]=(0,o.useState)(!1),[B,z]=(0,o.useState)(!0),W=(0,o.useRef)(!1),[M,U]=(0,o.useState)(),D=f(C),F=(0,o.useCallback)(function(e){let{x:t,y:o,isOffset:i}=e,a=A.current,s=_.current,l=P.current,{width:c,height:u,left:d,top:f}=a.getBoundingClientRect();if(0===c||0===u)return;let p=Math.min(Math.max((R?i?o-f-n.scrollY:o:i?t-d-n.scrollX:t)/(R?u:c)*100,0),100),m=R?u/(a.offsetHeight||1):c/(a.offsetWidth||1),h=r*m/(R?u:c)*100,g=Math.min(Math.max(p,h*m),100-h*m);I.current=p,s.setAttribute("aria-valuenow","".concat(Math.round(I.current))),s.style.top=R?"".concat(g,"%"):"0",s.style.left=R?"0":"".concat(g,"%"),l.style.clipPath=R?"inset(".concat(g,"% 0 0 0)"):"inset(0 0 0 ".concat(g,"%)"),k&&k(I.current)},[r,k,R,n]);(0,o.useEffect)(()=>{let{width:e,height:t}=A.current.getBoundingClientRect(),r=C===D?I.current:C;F({x:e/100*r,y:t/100*r})},[r,C,R,D,F]);let T=(0,o.useCallback)(e=>{e.preventDefault(),d||0!==e.button||(F({isOffset:!0,x:e.pageX,y:e.pageY}),O(!0),z(!0))},[d,F]),H=(0,o.useCallback)(function(e){F({isOffset:!0,x:e.pageX,y:e.pageY}),z(!1)},[F]),q=(0,o.useCallback)(()=>{O(!1),z(!0)},[]),G=(0,o.useCallback)(e=>{let{width:t,height:r}=e,{width:n,height:o}=A.current.getBoundingClientRect();F({x:t/100*I.current*n/t,y:r/100*I.current*o/r})},[F]),Y=(0,o.useCallback)(e=>{if(!Object.values(u).includes(e.key))return;e.preventDefault(),z(!0);let{top:t,left:r}=_.current.getBoundingClientRect(),{width:n,height:o}=A.current.getBoundingClientRect(),i="string"==typeof y?parseFloat(y):y/n*100,a=Math.min(Math.max((R?"ArrowLeft"===e.key||"ArrowDown"===e.key:"ArrowRight"===e.key||"ArrowUp"===e.key)?I.current+i:I.current-i,0),100);F({x:R?r:n*a/100,y:R?o*a/100:t})},[y,R,F]);(0,o.useEffect)(()=>{U(j?_.current:A.current)},[j]),(0,o.useEffect)(()=>{let e=A.current,t=()=>{L||q()};return l&&(e.addEventListener("pointermove",H,g),e.addEventListener("pointerleave",t,g)),()=>{e.removeEventListener("pointermove",H),e.removeEventListener("pointerleave",t)}},[l,H,q,L]),(0,o.useEffect)(()=>(L&&!W.current&&(n.addEventListener("pointermove",H,g),n.addEventListener("pointerup",q,g),W.current=!0),()=>{W.current&&(n.removeEventListener("pointermove",H),n.removeEventListener("pointerup",q),W.current=!1)}),[H,q,L,n]),(0,o.useImperativeHandle)(t,()=>({rootContainer:A.current,handleContainer:_.current,setPosition(e){let{width:t,height:r}=A.current.getBoundingClientRect();F({x:t/100*e,y:r/100*e})}}),[F]),h(A,G),p("keydown",Y,_.current,v),p("click",b,_.current,v),p("pointerdown",T,M,v);let X=m||(0,i.jsx)(c,{disabled:d,portrait:R}),K=B?E:void 0,V={position:"relative",display:"flex",overflow:"hidden",cursor:L?R?"ns-resize":"ew-resize":void 0,touchAction:"none",userSelect:"none",KhtmlUserSelect:"none",msUserSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",...N};return(0,i.jsxs)("div",{...S,ref:A,style:V,"data-rcs":"root",children:[x,(0,i.jsx)(a,{ref:P,transition:K,children:w}),(0,i.jsx)(s,{disabled:d,portrait:R,position:Math.round(I.current),ref:_,transition:K,children:X})]})});x.displayName="ReactCompareSlider";var w=(0,o.forwardRef)((e,t)=>{let{style:r,...n}=e,o=d(r);return(0,i.jsx)("img",{ref:t,...n,style:o,"data-rcs":"image"})});w.displayName="ReactCompareSliderImage"}},function(e){e.O(0,[3918,2999,3969,6717,4885,9732,773,2657,6582,4242,4899,6196,9382,4716,3812,3463,8760,2877,2447,6701,2894,8985,5999,1744],function(){return e(e.s=37474)}),_N_E=e.O()}]);