PageSourceSearch

https://crispro.ai/_next/static/chunks/2572.4a5a7cc4f16dbe58.js

js crispro.ai collected 2026-10-05 15:31:38 UTC 5,987 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2572],{35208:function(e,t,r){r.r(t),r.d(t,{default:function(){return u}});var n=r(3827),i=r(64090),a=r(92083),l=r(9528),s=r(92987),d=r(5654),o=r(49108),c=r(37805);r(56952),r(81820),l.Tu.workerSrc="https://unpkg.com/pdfjs-dist@".concat(l.i8,"/build/pdf.worker.min.mjs");let h=(0,i.forwardRef)(function(e,t){let{pageNumber:r,pageWidth:i,pageHeight:a}=e;return(0,n.jsx)("div",{ref:t,className:"flex items-center justify-center overflow-hidden rounded-sm bg-white shadow-md ring-1 ring-black/[0.06] dark:bg-zinc-900 dark:shadow-black/40 dark:ring-white/[0.08]",style:{width:i,height:a},children:(0,n.jsx)(s.Z,{pageNumber:r,width:i,height:a,renderTextLayer:!0,renderAnnotationLayer:!0})})});function u(e){let{url:t,title:r}=e,l=(0,i.useRef)(null),s=(0,i.useRef)(null),u=(0,i.useRef)(null),[f,m]=(0,i.useState)(0),[x,p]=(0,i.useState)(0),[w,g]=(0,i.useState)({w:420,h:594}),[b,k]=(0,i.useState)(null);(0,i.useLayoutEffect)(()=>{let e;let t=s.current;if(!t)return;let r=()=>{let{width:e}=t.getBoundingClientRect();if(e<200)return;let r=Math.max(200,Math.floor(e-8));g({w:r,h:Math.floor(1.41421356*r)})};r();let n=new ResizeObserver(()=>{e&&clearTimeout(e),e=setTimeout(r,80)});return n.observe(t),()=>{n.disconnect(),e&&clearTimeout(e)}},[f]),(0,i.useEffect)(()=>{m(0),p(0),k(null)},[t]);let v=(0,i.useCallback)(()=>{try{var e,t;null===(t=u.current)||void 0===t||null===(e=t.pageFlip())||void 0===e||e.flipNext()}catch(e){}},[]),y=(0,i.useCallback)(()=>{try{var e,t;null===(t=u.current)||void 0===t||null===(e=t.pageFlip())||void 0===e||e.flipPrev()}catch(e){}},[]);if((0,i.useEffect)(()=>{if(f<=0)return;let e=e=>{let t=e.target;if(null==t?void 0:t.closest('input, textarea, select, [contenteditable="true"]'))return;let r=e.key;if(("ArrowRight"===r||"ArrowDown"===r||"PageDown"===r)&&!e.shiftKey){e.preventDefault(),v();return}"ArrowLeft"!==r&&"ArrowUp"!==r&&"PageUp"!==r||e.shiftKey||(e.preventDefault(),y())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[f,v,y]),b)return(0,n.jsxs)("div",{className:"rounded-xl border border-amber-700/40 bg-amber-950/30 p-6 text-center text-sm text-amber-100 dark:text-amber-200",children:[(0,n.jsx)("p",{className:"mb-3",children:b}),(0,n.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-cyan-300 underline",children:"Open PDF in new tab"})]});let j=f?Math.min(f,x+1):0;return(0,n.jsxs)("div",{ref:l,className:"manuscript-pdf-viewer flex min-h-0 min-w-0 flex-1 flex-col","aria-label":r,children:[(0,n.jsx)("style",{children:"\n        .manuscript-pdf-viewer .react-pdf__Page__textContent,\n        .manuscript-pdf-viewer .react-pdf__Page__annotations {\n          user-select: text !important;\n        }\n        .manuscript-pdf-viewer .use-case-pdf-flipbook {\n          margin-left: auto !important;\n          margin-right: auto !important;\n        }\n      "}),(0,n.jsx)("div",{ref:s,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto [-webkit-overflow-scrolling:touch]",children:(0,n.jsx)(d.Z,{className:"flex w-full min-w-0 shrink-0 flex-col",file:t,loading:(0,n.jsx)("div",{className:"flex min-h-[50vh] flex-1 items-center justify-center py-12 text-center text-sm text-black dark:text-white",children:"Loading manuscript…"}),onLoadSuccess:e=>{let{numPages:t}=e;m(t),p(0),k(null)},onLoadError:e=>k((null==e?void 0:e.message)||"Failed to load PDF"),children:f>0?(0,n.jsx)("div",{className:"flex w-full shrink-0 items-start justify-center py-1",children:(0,n.jsx)("div",{className:"relative mx-auto box-border shrink-0 overflow-x-hidden",style:{width:w.w,maxWidth:"100%",height:w.h},children:(0,n.jsx)(a.Z,{ref:u,className:"use-case-pdf-flipbook",style:{width:w.w,height:w.h},width:w.w,height:w.h,minWidth:w.w,minHeight:w.h,maxWidth:w.w,maxHeight:w.h,size:"fixed",startPage:0,startZIndex:0,autoSize:!1,drawShadow:!0,flippingTime:700,maxShadowOpacity:1,showCover:!1,usePortrait:!0,mobileScrollSupport:!1,clickEventForward:!0,useMouseEvents:!0,swipeDistance:30,showPageCorners:!0,disableFlipByClick:!1,onFlip:e=>{p(Math.max(0,"number"==typeof(null==e?void 0:e.data)?e.data:0))},children:Array.from({length:f},(e,t)=>(0,n.jsx)(h,{pageNumber:t+1,pageWidth:w.w,pageHeight:w.h},t+1))},t)})}):null})}),f>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center justify-center gap-3 bg-white pb-1 pt-1 dark:bg-zinc-950",children:[(0,n.jsxs)("button",{type:"button",onClick:y,disabled:x<=0,className:"inline-flex items-center gap-1 rounded-lg border-0 bg-white px-4 py-2.5 text-sm font-medium text-black shadow-none ring-1 ring-black/[0.06] hover:ring-black/10 disabled:pointer-events-none disabled:opacity-25 dark:bg-zinc-950 dark:text-white dark:ring-white/10 dark:hover:ring-white/20","aria-label":"Previous page",children:[(0,n.jsx)(o.Z,{className:"h-5 w-5","aria-hidden":!0}),"Previous"]}),(0,n.jsxs)("span",{className:"text-sm tabular-nums text-black dark:text-white",children:["Page ",j," / ",f]}
1),(0,n.jsxs)("button",{type:"button",onClick:v,disabled:x>=f-1,className:"inline-flex items-center gap-1 rounded-lg border-0 bg-white px-4 py-2.5 text-sm font-medium text-black shadow-none ring-1 ring-black/[0.06] hover:ring-black/10 disabled:pointer-events-none disabled:opacity-25 dark:bg-zinc-950 dark:text-white dark:ring-white/10 dark:hover:ring-white/20","aria-label":"Next page",children:["Next",(0,n.jsx)(c.Z,{className:"h-5 w-5","aria-hidden":!0})]})]}),(0,n.jsxs)("p",{className:"shrink-0 bg-white px-2 pb-2 text-center text-xs text-black dark:bg-zinc-950 dark:text-white",children:["Drag page corners or edges to turn \xb7 Swipe on the book \xb7 Arrow keys / Page Up/Down \xb7"," ",(0,n.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"underline decoration-black/30 text-black underline-offset-2 dark:decoration-white/30 dark:text-white",children:"Open PDF"})]})]}):null]})}h.displayName="PdfFlipPage"}}]);

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.