PageSourceSearch

https://rednote-downloader.online/_next/static/chunks/app/%5Blang%5D/bulk/page-a5d915ffc4d445f3.js

js rednote-downloader.online collected 2026-10-01 15:58:50 UTC 18,918 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[455],{2648:function(e,r,t){Promise.resolve().then(t.bind(t,784))},7658:function(e,r,t){"use strict";let a,n;var o=this&&this.__createBinding||(Object.create?function(e,r,t,a){void 0===a&&(a=t);var n=Object.getOwnPropertyDescriptor(r,t);(!n||("get"in n?!r.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,a,n)}:function(e,r,t,a){void 0===a&&(a=t),e[a]=r[t]}),l=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&o(r,e,t);return l(r,e),r};Object.defineProperty(r,"__esModule",{value:!0}),r.useTurnstile=r.Turnstile=void 0;let i=s(t(2265)),d="undefined"!=typeof globalThis?globalThis:window,c=void 0!==d.turnstile?"ready":"unloaded",u=new Promise((e,r)=>{n={resolve:e,reject:r},"ready"===c&&e(void 0)});{let e="cf__reactTurnstileOnLoad";a=()=>{if("unloaded"===c){c="loading",d[e]=()=>{n.resolve(),c="ready",delete d[e]};let r=`https://challenges.cloudflare.com/turnstile/v0/api.js?onload=${e}&render=explicit`,t=document.createElement("script");t.src=r,t.async=!0,t.addEventListener("error",()=>{n.reject("Failed to load Turnstile."),delete d[e]}),document.head.appendChild(t)}return u}}function m({id:e,className:r,style:t,sitekey:n,action:o,cData:l,theme:s,language:d,tabIndex:u,responseField:m,responseFieldName:h,size:p,fixedSize:g,retry:x,retryInterval:f,refreshExpired:b,appearance:v,execution:w,userRef:j,onVerify:y,onSuccess:N,onLoad:k,onError:_,onExpire:L,onTimeout:E,onAfterInteractive:C,onBeforeInteractive:I,onUnsupported:P}){let D=(0,i.useRef)(null),F=(0,i.useState)({onVerify:y,onSuccess:N,onLoad:k,onError:_,onExpire:L,onTimeout:E,onAfterInteractive:C,onBeforeInteractive:I,onUnsupported:P})[0],S=null!=j?j:D,O=g?{width:"compact"===p?"130px":"flexible"===p?"100%":"300px",height:"compact"===p?"120px":"65px",...t}:t;return(0,i.useEffect)(()=>{if(!S.current)return;let e=!1,r="";return(async()=>{var t,i,g;let j;if("ready"!==c)try{await a()}catch(e){null===(t=F.onError)||void 0===t||t.call(F,e);return}!e&&S.current&&(g=r=window.turnstile.render(S.current,{sitekey:n,action:o,cData:l,theme:s,language:d,tabindex:u,"response-field":m,"response-field-name":h,size:p,retry:x,"retry-interval":f,"refresh-expired":b,appearance:v,execution:w,callback:(e,r)=>{var t,a;null===(t=F.onVerify)||void 0===t||t.call(F,e,j),null===(a=F.onSuccess)||void 0===a||a.call(F,e,r,j)},"error-callback":e=>{var r;return null===(r=F.onError)||void 0===r?void 0:r.call(F,e,j)},"expired-callback":e=>{var r;return null===(r=F.onExpire)||void 0===r?void 0:r.call(F,e,j)},"timeout-callback":()=>{var e;return null===(e=F.onTimeout)||void 0===e?void 0:e.call(F,j)},"after-interactive-callback":()=>{var e;return null===(e=F.onAfterInteractive)||void 0===e?void 0:e.call(F,j)},"before-interactive-callback":()=>{var e;return null===(e=F.onBeforeInteractive)||void 0===e?void 0:e.call(F,j)},"unsupported-callback":()=>{var e;return null===(e=F.onUnsupported)||void 0===e?void 0:e.call(F,j)}}),j={execute:e=>window.turnstile.execute(g,e),reset:()=>window.turnstile.reset(g),getResponse:()=>window.turnstile.getResponse(g),isExpired:()=>window.turnstile.isExpired(g)},null===(i=F.onLoad)||void 0===i||i.call(F,r,j))})(),()=>{e=!0,r&&window.turnstile.remove(r)}},[n,o,l,s,d,u,m,h,p,x,f,b,v,w]),(0,i.useEffect)(()=>{F.onVerify=y,F.onSuccess=N,F.onLoad=k,F.onError=_,F.onExpire=L,F.onTimeout=E,F.onAfterInteractive=C,F.onBeforeInteractive=I,F.onUnsupported=P},[y,N,k,_,L,E,C,I,P]),i.default.createElement("div",{ref:S,id:e,className:r,style:O})}r.Turnstile=m,r.default=m,r.useTurnstile=function(){let[e,r]=(0,i.useState)(c);return(0,i.useEffect)(()=>{"ready"!==c&&u.then(()=>r(c))},[]),d.turnstile}},784:function(e,r,t){"use strict";t.d(r,{default:function(){return d}});var a=t(7437),n=t(2265),o=t(7658),l=t.n(o),s=t(3448);function i(e){let{data:r,noteIndex:t,dict:n,downloadProgress:o,downloadAsset:l}=e,s=n.result,i="n".concat(t);return(0,a.jsxs)("div",{className:"space-y-8",children:[r.coverImage&&(0,a.jsx)("div",{className:"bg-gradient-to-br from-purple-50 to-pink-50 rounded-2xl shadow-lg border border-purple-100 overflow-hidden",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("h3",{className:"text-xl font-bold text-gray-900 mb-4 flex items-center",children:[(0,a.jsx)("span",{className:"mr-3 text-2xl",children:"\uD83D\uDDBC️"}),s.coverImage||"Cover Image"]}),(0,a.jsx)("div",{className:"relative bg-gray-50 rounded-xl overflow-hidden shadow-sm hover:shadow-md transition-all duration-300 group",children:(0,a.jsx)("div",{className:"aspect-video relative",children:(0,a.jsx)("img",{src:r.coverImage,alt:"Cover",className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",referrerPolicy:"no-referrer"})})}),(0,a.jsx)("button",{type:"button",onClick:()=>l(r.coverImage,"".concat(i,"_rednote_cover.jpg"),"image",t),disabled:o["".concat(i,"_image_").concat(i,"_rednote_cover.jpg")],className:"w-full mt-4 px-6 py-3 bg-gradient-to-r from-purple-500 to-pink-500 text-white rounded-xl font-semibold hover:from-purple-600 hover:to-pink-600 transition-all duration-300 flex items-center justify-center shadow-lg hover:shadow-xl transform hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed",children:o["".concat(i,"_image_").concat(i,"_rednote_cover.jpg")]?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),s.processing||"..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"mr-2",children:"⬇️"}),s.downloadImage||"Download"]})})]})}),r.imgList&&r.imgList.length>0&&(0,a.jsx)("div",{className:"bg-gradient-to-br from-blue-50 to-indigo-50 rounded-2xl shadow-lg border border-blue-100 overflow-hidden",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("h3",{className:"text-xl font-bold text-gray-900 mb-6 flex items-center flex-wrap gap-2",children:[(0,a.jsx)("span",{className:"mr-3 text-2xl",children:"\uD83D\uDDBC️"}),s.imageGallery||"Images",(0,a.jsxs)("span",{className:"px-3 py-1 bg-blue-100 text-blue-800 text-sm font-medium rounded-full",children:[r.imgList.length," ",1===r.imgList.length?s.images||"Image":s.images||"Images"]})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:r.imgList.map((e,r)=>{let n="".concat(i,"_rednote_image_").concat(r+1,".jpg"),d="".concat(i,"_image_").concat(n);return(0,a.jsxs)("div",{className:"group relative bg-gray-50 rounded-xl overflow-hidden shadow-sm hover:shadow-lg transition-all duration-300",children:[(0,a.jsx)("div",{className:"aspect-square relative overflow-hidden",children:(0,a.jsx)("img",{src:e,alt:"".concat(s.images||"Image"," ").concat(r+1),className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",referrerPolicy:"no-referrer"})}),(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)("button",{type:"button",onClick:()=>l(e,n,"image",t),disabled:o[d],className:"w-full px-4 py-2.5 bg-gradient-to-r from-purple-500 to-pink-500 text-white rounded-lg text-sm font-semibold hover:from-purple-600 hover:to-pink-600 transition-all duration-300 flex items-center justify-center shadow-md hover:shadow-lg transform hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed",children:o[d]?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-3 w-3 border-b-2 border-white mr-2"}),s.processing||"..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"mr-2",children:"⬇️"}),s.downloadImage||"".concat(s.images||"Image"," ").concat(r+1)]})})})]},"".concat(t,"-img-").concat(r))})})]})}),r.videoList&&r.videoList.length>0&&(0,a.jsx)("div",{className:"bg-gradient-to-br from-blue-50 to-indigo-50 rounded-2xl shadow-lg border border-blue-100 overflow-hidden",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("h3",{className:"text-xl font-bold text-gray-900 mb-6 flex items-center flex-wrap gap-2",children:[(0,a.jsx)("span",{className:"mr-3 text-2xl",children:"\uD83C\uDFA5"}),s.videoInfo||"Video",(0,a.jsxs)("span",{className:"px-3 py-1 bg-green-100 text-green-800 text-sm font-medium rounded-full",children:[r.videoList.length," ",1===r.videoList.length?"Video":"Videos"]})]}),(0,a.jsx)("div",{className:"space-y-4",children:r.videoList.map((e,n)=>{let d="".concat(i,"_rednote_video_").concat(n+1,".mp4"),c="".concat(i,"_video_").concat(d);return(0,a.jsxs)("div",{className:"bg-white rounded-xl p-4 shadow-sm border border-gray-100",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-3",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"text-2xl mr-3",children:"\uD83C\uDFAC"}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h4",{className:"font-semibold text-gray-900",children:[s.downloadMainVideo||"Video"," ",r.videoList.length>1?"".concat(n+1):""]}),(0,a.jsx)("p",{className:"text-sm text-gray-500",children:"MP4"})]})]})}),(0,a.jsx)("button",{type:"button",onClick:()=>l(e,d,"video",t),disabled:o[c],className:"w-full px-6 py-3 bg-gradient-to-r from-green-500 to-emerald-500 text-white rounded-xl font-semibold hover:from-green-600 hover:to-emerald-600 transition-all duration-300 flex items-center justify-center shadow-lg hover:shadow-xl transform hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed",children:o[c]?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-3"}),s.processing||"..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"mr-3 text-lg",children:"⬇️"}),s.downloadMainVideo||"Download"," ",r.videoList.length>1?"".concat(n+1):""]})})]},"".concat(t,"-vid-").concat(n))})})]})})]})}function d(e){var r;let{lang:t,dict:o}=e,d=o.bulk||{}
1,c=o.hero,u=o.result,[m,h]=(0,n.useState)(""),[p,g]=(0,n.useState)(!1),[x,f]=(0,n.useState)(null),[b,v]=(0,n.useState)(""),[w,j]=(0,n.useState)({}),[y,N]=(0,n.useState)(null),[k,_]=(0,n.useState)(!1),L=d.inputLabel||c.inputLabel,E=d.inputPlaceholder||c.inputPlaceholder,C=d.downloadButton||c.downloadButton,I=d.supportText||c.supportText,P=d.downloadZip||"Download all as ZIP",D=d.downloadZipHint||"",F=d.downloadZipPreparing||"…",S=d.downloadZipError||"ZIP failed",O=(0,n.useMemo)(()=>x?function(e){let r=[];for(let t=0;t<e.length;t++){let a=e[t];if(!a.data||a.error)continue;let n=a.data,o="note_".concat(String(t+1).padStart(2,"0"));n.coverImage&&r.push({zipPath:"".concat(o,"/cover.jpg"),url:n.coverImage}),(n.imgList||[]).forEach((e,t)=>{r.push({zipPath:"".concat(o,"/image_").concat(t+1,".jpg"),url:e})}),(n.videoList||[]).forEach((e,t)=>{r.push({zipPath:"".concat(o,"/video_").concat(t+1,".mp4"),url:e})})}return r}(x):[],[x]),T=O.length>0,A=async()=>{if(!m){v(u.errorInvalidUrl);return}g(!0),v(""),f(null);try{let e;let r=await fetch("/api/bulk-check",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:m,token:y})});try{e=await r.json()}catch(e){throw Error(u.errorResponseFormat)}if(!r.ok)throw Error(e.error||u.errorRequestFailed);let t=e.data;if(!Array.isArray(t))throw Error(u.errorResponseFormat);let a=m.split(";").filter(Boolean),n=t.map((e,r)=>{var t;let n=null!==(t=a[r])&&void 0!==t?t:"#".concat(r+1);try{let r;let t=(r=JSON.parse(e),r=JSON.parse(r.data));if(0!==t.code)return{url:n,data:null,error:u.errorRequestFailed};return{url:n,data:t,error:null}}catch(e){return{url:n,data:null,error:u.errorResponseFormat}}});f(n)}catch(e){v(e instanceof Error?e.message:u.errorUnknown)}finally{g(!1)}},R=(e,r,t,a)=>{let n="".concat("n".concat(a),"_").concat(t,"_").concat(r);j(e=>({...e,[n]:!0}));try{let t=document.createElement("a");t.href=e,t.download=r,t.target="_blank",t.rel="noopener noreferrer",document.body.appendChild(t),t.click(),document.body.removeChild(t),setTimeout(()=>{j(e=>({...e,[n]:!1}))},2e3)}catch(e){j(e=>({...e,[n]:!1})),console.error(e)}},B=async()=>{if(x&&T&&!k&&y){_(!0),v("");try{let e=await fetch("/api/bulk-download-zip",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:y,files:O.map(e=>{let{zipPath:r,url:t}=e;return{path:r,url:t}})})});if(!e.ok){let r=S;if((e.headers.get("Content-Type")||"").includes("application/json"))try{let t=await e.json();t.error&&(r=t.error)}catch(e){}throw Error(r)}let r=await e.blob();if(!r.size)throw Error(S);let t="rednote-bulk-".concat(new Date().toISOString().slice(0,10),"-").concat(Date.now(),".zip");!function(e,r){let t=URL.createObjectURL(e),a=document.createElement("a");a.href=t,a.download=r,a.rel="noopener noreferrer",document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(t)}(r,t)}catch(e){v(e instanceof Error?e.message:S)}finally{_(!1)}}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow-lg p-8 max-w-4xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{htmlFor:"bulk-url-input",className:"block text-sm font-medium text-gray-700 mb-2",children:L}),(0,a.jsx)("textarea",{id:"bulk-url-input",rows:6,placeholder:E,value:m,onChange:e=>h(e.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-red-500 focus:border-transparent font-mono text-sm",disabled:p}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:I})]}),b&&(0,a.jsx)("div",{className:"mb-4 p-3 bg-red-100 border border-red-400 text-red-700 rounded",children:b}),(0,a.jsx)(l(),{sitekey:s.Q,onVerify:e=>N(e),theme:"auto"}),(0,a.jsxs)("a",{href:"https://live.bagelpay.io/product/prod_2039614637733941249",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between bg-gradient-to-r from-amber-50 via-orange-50 to-pink-50 border-2 border-amber-200/60 hover:border-amber-300 text-gray-700 px-4 py-3 rounded-xl font-medium text-sm transition-all duration-300 shadow-sm hover:shadow-md hover:scale-[1.01] overflow-hidden w-full",children:[(0,a.jsxs)("span",{className:"relative z-10 flex items-center gap-2.5 flex-1",children:[(0,a.jsx)("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg bg-gradient-to-br from-amber-400 to-orange-500 flex items-center justify-center shadow-sm",children:(0,a.jsx)("svg",{className:"w-4 h-4 text-white",f
1ill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})})}),(0,a.jsx)("span",{className:"text-red-700 text-bold leading-snug flex-1 text-left",children:null===(r=o.bulk)||void 0===r?void 0:r.earlyBirdPro})]}),(0,a.jsx)("svg",{className:"w-4 h-4 text-amber-600 flex-shrink-0 opacity-60 group-hover:opacity-100 group-hover:translate-x-0.5 transition-all duration-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),(0,a.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-amber-100/50 via-orange-100/50 to-pink-100/50 opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),(0,a.jsxs)("button",{type:"button",onClick:A,disabled:p||!y,className:"mt-2 relative w-full overflow-hidden rounded-lg bg-red-600 px-6 py-3 font-semibold text-white transition-all duration-300 hover:bg-red-700 disabled:cursor-not-allowed disabled:opacity-70 disabled:hover:bg-red-600",children:[p&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"absolute inset-0 animate-pulse bg-gradient-to-r from-red-500 via-red-400 to-red-500 opacity-80"}),(0,a.jsx)("span",{className:"animate-shimmer absolute inset-0 bg-gradient-to-r from-transparent via-white/30 to-transparent"})]}),(0,a.jsx)("span",{className:"relative z-10 flex items-center justify-center gap-3",children:p?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"h-5 w-5 animate-spin rounded-full border-2 border-white/30 border-t-white"}),(0,a.jsx)("span",{children:u.processing})]}):(0,a.jsx)("span",{children:C})})]})]}),x&&x.length>0&&(0,a.jsxs)("div",{className:"max-w-4xl mx-auto mt-10 space-y-12",children:[T&&(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow-lg border border-gray-200 p-4 sm:p-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-gray-600 flex-1",children:D}),(0,a.jsxs)("button",{type:"button",onClick:B,disabled:k||!y,className:"relative shrink-0 inline-flex items-center justify-center overflow-hidden rounded-lg bg-gray-900 px-5 py-3 font-semibold text-white transition-all duration-300 hover:bg-gray-800 disabled:cursor-not-allowed disabled:opacity-70 disabled:hover:bg-gray-900",children:[k&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"absolute inset-0 animate-pulse bg-gradient-to-r from-gray-800 via-gray-700 to-gray-800 opacity-90"}),(0,a.jsx)("span",{className:"animate-shimmer absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent"})]}),(0,a.jsx)("span",{className:"relative z-10 inline-flex items-center justify-center gap-2",children:k?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-4 w-4 rounded-full border-2 border-white/30 border-t-white animate-spin"}),F]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{"aria-hidden":!0,children:"\uD83D\uDCE6"}),P]})})]})]}),x.map((e,r)=>(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow-lg p-6 border border-gray-100",children:[(0,a.jsxs)("div",{className:"mb-6 pb-4 border-b border-gray-200",children:[(0,a.jsxs)("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-1",children:[r+1," / ",x.length]}),(0,a.jsx)("p",{className:"text-sm text-gray-800 break-all font-mono",children:e.url})]}),e.error&&(0,a.jsx)("div",{className:"p-4 bg-red-50 border border-red-200 text-red-800 rounded-lg text-sm",children:e.error}),e.data&&(0,a.jsx)(i,{data:e.data,noteIndex:r,dict:o,downloadProgress:w,downloadAsset:R}),!e.error&&e.data&&!e.data.coverImage&&(!e.data.imgList||0===e.data.imgList.length)&&(!e.data.videoList||0===e.data.videoList.length)&&(0,a.jsx)("p",{className:"text-gray-500 text-sm",children:u.errorRequestFailed})]},"".concat(e.url,"-").concat(r)))]})]})}},3448:function(e,r,t){"use strict";t.d(r,{Q:function(){return o},cn:function(){return l}});var a=t(1994),n=t(3335);let o="0x4AAAAAAB6-emcL2P_C3yL5";function l(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return(0,n.m6)((0,a.W)(r))}}},function(e){e.O(0,[137,971,30,744],function(){return e(e.s=2648)}),_N_E=e.O()}]);

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.