(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3450],{6493:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/remove-pdf-pages",function(){return n(7312)}])},3675:function(e,t,n){"use strict";var i=n(5893),a=n(7294),s=n(1983),o=n(7941),r=n(1860),l=n(1657),c=n(386),d=n(2810),g=n.n(d),p=n(3295),h=n(9294),u=n(9272),f=n(5518),m=n(6843),x=n(5697),v=n.n(x),j=n(4575),R=n(7875);const b=a.memo((function(e){let{id:t,blob:n,width:d,height:x,degree:v,order:b,index:P,selectedPages:_,handleClearPageSelection:S,handleRearrangePages:y,handleSetInsertIndex:D,onSelectionChange:I,insertLineOnLeft:T,insertLineOnRight:N,isSelected:w,zoomOnPage:Z,handleDeletePage:C,handleRotatePageLeft:q,handleRotatePageRight:L}=e;const{t:O}=(0,R.$G)(),F=(0,a.useRef)(null),[{isDragging:k},E,A]=(0,h.c)({type:"page",item:e=>{const i={id:t,order:b,outputBlob:n,degree:v,width:d,height:x};let a;_.find((e=>e.id===t))?a=_:(S(),I(P,null),a=[i]);const s=a.concat();s.splice(a.findIndex((e=>e.id===t)),1);const o=[i,...s],r=a.map((e=>e.id));return{pages:a,pagesDragStack:o,draggedPage:i,pagesIDs:r}},isDragging:e=>e.getItem().pagesIDs.includes(t),end:(e,t)=>{y(e)},collect:e=>({isDragging:e.isDragging()})}),[{hovered:B},M]=(0,u.L)({accept:"page",hover:(e,t)=>{var n;const i=P,a=null===(n=F.current)||void 0===n?void 0:n.getBoundingClientRect(),s=a.left+(a.right-a.left)/2,o=t.getClientOffset().x0&&(document.body.scrollLeft=0,document.body.scrollTop=document.body.scrollTop+2),t.getDifferenceFromInitialOffset().y<0&&(document.body.scrollLeft=0,document.body.scrollTop=document.body.scrollTop-2))},collect:e=>({hovered:e.isOver()})});E(M(F));(0,a.useEffect)((()=>{A((0,p.r)(),{captureDraggingState:!0})}),[]);const z=k?.4:1,K=T&&B?"2px solid #7d64ff":null,X=N&&B?"2px solid #7d64ff":null,G=d>x?g().landscape:g().portrait,J=(0,c.td)(n.size,2);return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:"preview ".concat(g().preview," ").concat(w?g().selected:""),ref:F,onClick:e=>{I(P,e.ctrlKey)},style:{opacity:z,borderLeft:K,borderRight:X},id:t,"data-id":t,"data-index":P,"data-page-rotation":v,"data-page-number":"1",children:(0,i.jsx)("div",{className:"d-flex",children:(0,i.jsxs)("div",{className:"file ".concat(g().file),title:"".concat(J),children:[(0,i.jsxs)("div",{className:"".concat(g().file_actions),children:[Z&&(0,i.jsx)(j.Z,{title:"Zoom in",onClick:Z,children:(0,i.jsx)(s.Z,{})}),q&&(0,i.jsx)(j.Z,{title:"Rotate Left",onClick:q,className:"".concat(g().hide_btn_on_mobile),hideOnMobile:!0,children:(0,i.jsx)(o.Z,{})}),L&&(0,i.jsx)(j.Z,{title:"Rotate Right",onClick:L,children:(0,i.jsx)(r.Z,{})}),(0,i.jsx)(j.Z,{title:"Delete",onClick:C,children:(0,i.jsx)(l.Z,{})})]}),(0,i.jsx)("div",{className:"".concat(g().file_canvas," ").concat(G),style:{transform:"rotate(".concat(v,"deg)")},children:(0,i.jsx)(m.Z,{blob:n,width:149,scale:1})}),(0,i.jsx)("div",{className:"".concat(g().file_info),children:(0,i.jsx)("span",{className:"".concat(g().file_info_name),children:b})})]})})})})}));t.Z=b,b.propTypes={id:v().number.isRequired,blob:v().object.isRequired,width:v().number.isRequired,height:v().number.isRequired,degree:v().number.isRequired,order:v().number.isRequired,index:v().number.isRequired,selectedPages:v().array.isRequired,handleClearPageSelection:v().func.isRequired,handleRearrangePages:v().func.isRequired,handleSetInsertIndex:v().func.isRequired,onSelectionChange:v().func.isRequired,insertLineOnLeft:v().bool.isRequired,insertLineOnRight:v().bool.isRequired,zoomOnPage:v().func.isRequired,handleDeletePage:v().func.isRequired,handleRotatePageLeft:v().func.isRequired,handleRotatePageRight:v().func.isRequired}},178:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var i=n(5893),a=n(7294),s=n(6224),o=n(6843),r=n(2810),l=n.n(r),c=n(5697),d=n.n(c);const g=a.memo((function(e){let{pages:t}=e,n=1;return 2===t.length?n=2:t.length>=3&&(n=3),(0,i.jsx)("div",{children:t.slice(0,n).map(((e,n)=>(0,i.jsx)("div",{className:"card ".concat(l().card," ").concat(l().card_dragged," ").concat(l().portrait),style:{zIndex:t.length-n,transform:"rotateZ(".concat(2.5*-n,"deg)")},children:(0,i.jsx)(o.Z,{blob:e.outputBlob,width:149,scale:1})},e.id)))})}));var p=g;g.propTypes={pages:d().array.isRequired};const h={position:"fixed",pointerEvents:"none",zIndex:999,left:0,top:0,right:0,bottom:0},u=e=>{if(!e)return{display:"none"};const{x:t,y:n}=e;return{transform:"translate(".concat(t,"px, ").concat(n,"px)"),filter:"drop-shadow(0 2px 12px rgba(0,0,0,0.45))"}};var f=a.memo((function(){const{itemType:e,isDragging:t,item:n,currentOffset:a}=(0,s.f)((e=>({item:e.getItem(),itemType:e.getItemType(),currentOffset:e.getSourceClientOffset(),isDragging:e.isDragging()})));return t?(0,i.jsx)("div",{style:h,children:(0,i.jsx)("div",{style:u(a),children:((e,t)=>"page"===e?(0,i.jsx)(p,{pages:t.pagesDragStack}):null)(e,n)})}):null}))},41:function(e,t,n){"use strict";n(5893),n(7294),n(7875),n(4223)},7312:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return N}});var i=n(5893),a=n(9008),s=n.n(a),o=n(7294),r=n(5518),l=n(8493),c=n(6963),d=n(9628),g=n(7694),p=n(3675),h=n(178),u=n(1496),f=n(386),m=n(7311),x=n(26),v=n(7984),j=(n(41),n(9072)),R=n(7858),b=n(5593),P=n(4996),_=n(3115),S=n.n(_),y=n(3260),D=n.n(y),I=n(5498),T=n(1163);var N=!0;t.default=e=>{let{myData:t}=e;const n=(0,T.useRouter)().asPath,{RemovePDFPagesTool:a}=(0,P.Z)();const[_,y]=(0,o.useState)(!1),N=(0,o.useRef)(!1),[w,Z]=(0,o.useState)(0),[C,q]=(0,o.useState)({}),[L,O]=(0,o.useState)(null),{pages:F,hoverIndex:k,insertIndex:E,handleAddPage:A,handleRotatePageRight:B,handleRotatePageLeft:M,handleRotateSelectedPagesToRight:z,rotateSelectedPagesToLeft:K,handleDeleteSelectedPages:X,handleSetInsertIndex:G,handleRemovePageSelection:J,handleClearPageSelection:W,handlePageSelection:$,handlePagesSelection:H,handleRearrangePages:Q,handleDeletePage:U}=(0,b.Z)(),V=e=>{(0,f.gT)(e,Z,A,undefined,N,a),e.target.value=null};(0,o.useEffect)((()=>{if(L){W();const e=F.findIndex((e=>e.id===L.id));$(e)}}),[L]),(0,o.useEffect)((()=>(N.current=!0,q({container:document.body,getScrollPosition:()=>[document.body.scrollLeft,document.body.scrollTop],throttleTime:0,threshold:0}),()=>{N.current=!1})),[]),(0,o.useEffect)((()=>{w>0?N.current&&y(!0):N.current&&y(!1)}),[w]);const Y=(0,i.jsx)(l.W,{backend:r.tq?d.zr:c.PD,options:r.tq?{scrollAngleRanges:[{start:30,end:150},{start:210,end:330}]}:null,children:(0,i.jsxs)("div",{className:"previewer_content ".concat(D().previewer_content," d-flex flex-wrap ").concat(D().previewer_content_scrollable),children:[!r.tq&&(0,i.jsx)(g.ZP,{dragContainer:".previewer_content",selectableTargets:[".preview"],selectByClick:!1,selectFromInside:!1,toggleContinueSelect:["ctrl"],boundContainer:!1,hitRate:0,ratio:0,onSelectStart:e=>{F.filter((e=>!0===e.selected)).length>0&&!e.inputEvent.ctrlKey&&W()},onSelect:e=>{e.added.forEach((e=>{const t=parseInt(e.getAttribute("data-index"));$(t)})),e.removed.forEach((t=>{const n=parseInt(t.getAttribute("data-index"));0===e.selected.length?W():J(n)}))},scrollOptions:C,onScroll:e=>{document.body.scrollBy(10*e.direction[0],10*e.direction[1])}}),(0,i.jsx)(h.Z,{}),F.map(((e,t)=>{const n=k===t&&E===t,a=k===t&&E===t+1;return(0,i.jsx)(p.Z,{id:e.id,index:t,order:e.order,degree:e.degree,height:e.height,width:e.width,blob:e.outputBlob,selectedPages:F.filter((e=>!0===e.selected)),handleRearrangePages:Q,handleSetInsertIndex:G,onSelectionChange:H,handleClearPageSelection:W,insertLineOnLeft:n,insertLineOnRight:a,isSelected:e.selected,zoomOnPage:t=>{t.stopPropagation(),O(e)},handleDeletePage:()=>U(e.id),handleRotatePageRight:t=>{t.stopPropagation(),B(e.id)},handleRotatePageLeft:t=>{t.stopPropagation(),M(e.id)}},"page-"+e.id)}))]})});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s(),{children:[(0,i.jsx)("title",{children:t.metaTitle?t.metaTitle:t.title}),(0,i.jsx)("meta",{name:"description",content:t.metaDescription?t.metaDescription:t.shortDescription}),t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("meta",{property:"og:title",content:t.ogTitle}),(0,i.jsx)("meta",{property:"og:description",content:t.ogDescription}),(0,i.jsx)("meta",{property:"og:image",content:t.ogImage}),(0,i.jsx)("meta",{property:"og:image:alt",content:t.ogImageAlt})]}),(0,i.jsx)("meta",{name:"Keywords",content:"remove pdf pages, pdf page remover, delete pdf pages, pdf page delete, online pdf page remover, remove specific pages from pdf, remove pages from pdf online"}),(0,i.jsx)("link",{rel:"canonical",href:"".concat(I.G).concat(n)},"canonical")]}),(0,i.jsxs)("main",{children:[(0,i.jsxs)("header",{className:" mb-0",children:[(0,i.jsx)("h1",{className:"text-center text-[##262323] text-[40px] font-[800]",children:null===t||void 0===t?void 0:t.title}),(0,i.jsx)("p",{className:"text-[##6F6767] text-center text-[16px] leading-[22px] font-[400] mt-[16px]",children:null===t||void 0===t?void 0:t.shortDescription})]}),(0,i.jsx)("section",{className:"page_section mt-0",children:(0,i.jsx)("article",{className:"container ",children:(0,i.jsxs)("section",{className:S().tool_container_wrapper,children:[F.length<=0?(0,i.jsx)(R.Z,{handleChange:V,isSpinnerActive:_,isMultipleInput:!0,acceptedMimeType:a.acceptedInputMimeType}):(0,i.jsx)(x.Z,{acceptedMimeType:a.acceptedInputMimeType,files:F,enableAddingMoreFiles:!0,filesComponents:Y,handleChange:V,isSpinnerActive:_,isMultipleInput:!0,isFilesSelectionActive:!0,isPanelTopSticky:!0,isPanelBottomSticky:!0,positionPanelBottomItems:D().spaced,deleteFiles:X,rotateFilesToLeft:K,rotateFilesToRight:z,action:()=>(0,f.ME)(F,a.newFileNameSuffix),actionTitle:"Save & Download"}),null!==L?(0,i.jsx)(u.Z,{pages:F,currentPage:L,setZoomedPage:O,deletePage:U,handleRotatePageRight:B,handleRotatePageLeft:M}):null]})})}),(0,i.jsx)(j.Z,{title:null===t||void 0===t?void 0:t.stepDescription,stepsArray:(null===t||void 0===t?void 0:t.Steps)&&t.Steps.map(((e,t)=>({number:t+1,description:e.title})))}),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(v.Z,{title:null===t||void 0===t?void 0:t.featuresTitle,featuresArray:(null===t||void 0===t?void 0:t.Features)&&t.Features.map((e=>({title:e.title,description:e.description,icon:e.icon})))})}),(0,i.jsx)("section",{className:" ",children:(0,i.jsx)("article",{className:"mt-[100px] ",children:(0,i.jsxs)("div",{className:"lg:flex ",children:[(0,i.jsx)("header",{className:"",children:(0,i.jsx)("h4",{className:"text-[#262323] lg:w-[200%] text-[32px] font-[600] tracking-wide",children:null===t||void 0===t?void 0:t.longDescriptionTitle})}),(0,i.jsx)("section",{className:"lg:ml-[220px] text-[16px] font-[400] leading-[24px] lg:mt-0 mt-5 text-[##6F6767]",children:(null===t||void 0===t?void 0:t.longDescription)&&(0,m.ZP)(t.longDescription)})]})})})]})]})}},4223:function(e){e.exports={share_btn:"Share_share_btn__x85E6",share_section:"Share_share_section__fXlhp",share_buttons:"Share_share_buttons__LSJjB",share_text:"Share_share_text__8prRc"}}},function(e){e.O(0,[4577,7311,2657,7943,2396,2080,7961,8720,7418,807,2888,9774,179],(function(){return t=6493,e(e.s=t);var t}));var t=e.O();_N_E=t}]);