PageSourceSearch

https://www.bottlenecksinstitute.com/_next/static/chunks/common-f3…?dpl=dpl_Hyq94bbn4AkBAFKUjwy7qWwH7Hk4

js bottlenecksinstitute.com collected 2026-10-05 08:54:45 UTC 17,804 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[871],{106:(e,r,t)=>{Promise.resolve().then(t.bind(t,89041))},64213:(e,r,t)=>{Promise.resolve().then(t.bind(t,93509))},68463:()=>{},73355:(e,r,t)=>{"use strict";t.d(r,{$:()=>u});var a=t(61929),s=t(189),o=t(63024),n=t(40843);function i(e){let{children:r,fallback:t}=e,{user:s,isLoading:o}=(0,n.h)();return o?(0,a.jsx)("div",{className:"text-sm text-gray-500",children:"Checking permissions..."}):s?(0,a.jsx)(a.Fragment,{children:r}):t||(0,a.jsxs)("div",{className:"text-sm text-gray-500",children:["Bug reporting is available to authenticated users only.",(0,a.jsx)("br",{}),"Please sign in to submit bug reports."]})}function l(e){let{onImageCapture:r,onImageClear:t,existingImage:o}=e,[n,i]=(0,s.useState)(!1),l=(0,s.useRef)(null),d=async e=>{e.preventDefault(),i(!1);let r=e.dataTransfer.files;if(r.length>0){let e=r[0];e.type.startsWith("image/")&&await u(e)}},c=async e=>{var r;let t=null==(r=e.target.files)?void 0:r[0];t&&t.type.startsWith("image/")&&await u(t)},u=async e=>new Promise(t=>{let a=new FileReader;a.onload=()=>{r(a.result),t()},a.readAsDataURL(e)});return(0,a.jsx)("div",{className:"space-y-3",children:o?(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("img",{src:o,alt:"Pasted screenshot",className:"max-w-full h-auto max-h-32 rounded-lg border border-gray-300 dark:border-gray-600 object-contain"}),(0,a.jsx)("button",{type:"button",onClick:t,className:"absolute top-2 right-2 bg-red-500 hover:bg-red-600 text-white rounded-full p-1 shadow-lg transition-colors",children:(0,a.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):(0,a.jsxs)("div",{className:"border-2 border-dashed rounded-lg p-3 md:p-4 text-center transition-colors cursor-pointer ".concat(n?"border-blue-400 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"),onDrop:d,onDragOver:e=>{e.preventDefault(),i(!0)},onDragLeave:e=>{e.preventDefault(),i(!1)},onClick:()=>{var e;return null==(e=l.current)?void 0:e.click()},tabIndex:0,onKeyDown:e=>{if("Enter"===e.key||" "===e.key){var r;null==(r=l.current)||r.click()}},children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,a.jsx)("svg",{className:"h-8 w-8 md:h-10 md:w-10 text-gray-400 dark:text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("p",{className:"text-xs md:text-sm font-medium text-gray-900 dark:text-gray-100",children:"\uD83D\uDCCB Paste Image Anywhere"}),(0,a.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Ctrl/Cmd+V • Click to browse • Drag & drop"}),(0,a.jsx)("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"PNG, JPG, GIF up to 10MB"})]})]}),(0,a.jsx)("input",{ref:l,type:"file",accept:"image/*",onChange:c,className:"hidden"})]})})}class d{initialize(){this.isInitialized||(this.setupConsoleCapture(),this.setupNetworkCapture(),this.setupErrorCapture(),this.isInitialized=!0)}setupConsoleCapture(){var e=this;let r={log:console.log,warn:console.warn,error:console.error};console.log=function(){for(var t=arguments.length,a=Array(t),s=0;s<t;s++)a[s]=arguments[s];e.consoleLogs.push({level:"log",message:a.map(e=>"object"==typeof e?JSON.stringify(e):String(e)).join(" "),timestamp:Date.now()}),r.log.apply(console,a)},console.warn=function(){for(var t=arguments.length,a=Array(t),s=0;s<t;s++)a[s]=arguments[s];e.consoleLogs.push({level:"warn",message:a.map(e=>"object"==typeof e?JSON.stringify(e):String(e)).join(" "),timestamp:Date.now()}),r.warn.apply(console,a)},console.error=function(){for(var t=arguments.length,a=Array(t),s=0;s<t;s++)a[s]=arguments[s];e.consoleLogs.push({level:"error",message:a.map(e=>"object"==typeof e?JSON.stringify(e):String(e)).join(" "),timestamp:Date.now()}),r.error.apply(console,a)}}setupNetworkCapture(){var e=this;let r=window.fetch;window.fetch=async function(){for(var t,a,s=arguments.length,o=Array(s),n=0;n<s;n++)o[n]=arguments[n];let i=Date.now(),l=o[0].toString();try{let a=await r(...o),s=Date.now();return e.networkRequests.push({url:l,method:(null==(t=o[1])?void 0:t.method)||"GET",status:a.status,duration:s-i,timestamp:i}),a}catch(t){let r=Date.now();throw e.networkRequests.push({url:l,method:(null==(a=o[1])?void 0:a.method)||"GET",status:0,duration:r-i,timestamp:i}),t}}}setupErrorCapture(){window.addEventListener("error",e=>{var r;this.jsErrors.push({message:e.message,filename:e.filename,line:e.lineno,stack:null==(r=e.error)?void 0:r.stack,timestamp:Date.now()})}),window.addEventListener("unhandledrejection",e=>{this.jsErrors.push({message:"Unhandled Promise Rejection: "+String(e.reason),timestamp:Date.now()})})}collectLogs(){return{consoleLogs:this.consoleLogs.slice(-30),networkRequests:this.networkRequests.slice(-15),jsErrors:this.jsErrors.slice(-10),browserInfo:this.getBrowserInfo(),performanceMetrics:this.getPerformanceMetrics()}}getBrowserInfo(){if("undefined"==typeof navigator)return{userAgent:"Unknown",browserName:"Unknown",browserVersion:"Unknown",osName:"Unknown",screenResolution:"Unknown",viewportSize:"Unknown",url:"Unknown"};let e=navigator.userAgent;return{userAgent:e,browserName:this.getBrowserName(e),browserVersion:this.getBrowserVersion(e),osName:this.getOSName(e),screenResolution:"".concat(screen.width,"x").concat(screen.height),viewportSize:"".concat(window.innerWidth,"x").concat(window.innerHeight),url:window.location.href}}getBrowserName(e){return e.includes("Chrome/")?"Chrome":e.includes("Firefox/")?"Firefox":e.includes("Safari/")?"Safari":e.includes("Edge/")?"Edge":"Unknown"}getBrowserVersion(e){let r=e.match(/(Chrome|Firefox|Safari|Edge)\/([0-9.]+)/);return r?r[2]:"Unknown"}getOSName(e){return e.includes("Windows NT")?"Windows":e.includes("Mac OS X")?"macOS":e.includes("Linux")?"Linux":e.includes("iPhone")?"iOS":e.includes("Android")?"Android":"Unknown"}getPerformanceMetrics(){var e;if(!("performance"in window))return{};let r=performance.getEntriesByType("navigation")[0],t=performance.getEntriesByType("paint");return{pageLoadTime:r?r.loadEventEnd-r.startTime:0,domContentLoaded:r?r.domContentLoadedEventEnd-r.startTime:0,firstContentfulPaint:null==(e=t.find(e=>"first-contentful-paint"===e.name))?void 0:e.startTime,memoryUsage:performance.memory?{usedJSHeapSize:performance.memory.usedJSHeapSize,totalJSHeapSize:performance.memory.totalJSHeapSize}:void 0}}constructor(){this.consoleLogs=[],this.networkRequests=[],this.jsErrors=[],this.isInitialized=!1,this.initialize()}}let c=new d;function u(e){let{isOpen:r,onClose:t}=e,{user:d}
1=(0,n.h)(),[u,g]=(0,s.useState)(!1),[m,h]=(0,s.useState)(null),x=(0,s.useRef)(null),[p,b]=(0,s.useState)({title:"",whatIDoing:"",whatHappened:"",whatExpected:"",category:"bug",severity:"medium"}),[y,f]=(0,s.useState)(null),w=()=>{b({title:"",whatIDoing:"",whatHappened:"",whatExpected:"",category:"bug",severity:"medium"}),f(null),t()};(0,s.useEffect)(()=>{if(m){let e=setTimeout(()=>{h(null)},3e3);return()=>clearTimeout(e)}},[m]),(0,s.useEffect)(()=>{let e=async e=>{var t;if(!r)return;let a=document.activeElement;if(a&&("INPUT"===a.tagName||"TEXTAREA"===a.tagName||"true"===a.getAttribute("contenteditable")))return;let s=null==(t=e.clipboardData)?void 0:t.items;if(s)for(let r=0;r<s.length;r++){let t=s[r];if(-1!==t.type.indexOf("image")){e.preventDefault();let r=t.getAsFile();if(r){let e=new FileReader;e.onload=()=>{f(e.result)},e.readAsDataURL(r)}break}}};if(r)return document.addEventListener("paste",e),()=>{document.removeEventListener("paste",e)}},[r]);let v=async e=>{e.preventDefault(),g(!0);try{let e=c.collectLogs(),r="bug"===p.category?"## What I was doing\n".concat(p.whatIDoing,"\n\n## What happened\n").concat(p.whatHappened,"\n\n## What I expected\n").concat(p.whatExpected):"## Problem/Need\n".concat(p.whatIDoing,"\n\n## Proposed Solution & Expected Benefit\n").concat(p.whatHappened),t={title:p.title,description:r,category:p.category,severity:p.severity,userEmail:(null==d?void 0:d.email)||"[email protected]",pageUrl:window.location.href,screenshot:y,logs:e,browserInfo:e.browserInfo},a=await fetch("/api/bug-reporting/submit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(a.ok){let e=await a.json();h({message:"Bug report submitted! Issue #".concat(e.issueNumber),type:"success"}),setTimeout(()=>{w()},500)}else{let e="Failed to submit bug report. Please try again.";try{let r=await a.json();r.error?e=r.error:r.details&&(e=r.details)}catch(r){e="Failed to submit bug report (".concat(a.status,": ").concat(a.statusText,")")}throw Error(e)}}catch(e){h({message:e instanceof Error?e.message:"Failed to submit bug report. Please try again.",type:"error"})}finally{g(!1)}};if(!r)return null;let k=window.innerWidth<768,j=(0,a.jsx)(i,{children:(0,a.jsxs)("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-[10000] flex items-start justify-center p-4 py-8 overflow-y-auto",children:[(0,a.jsxs)("div",{ref:x,style:{},className:"bg-white dark:bg-gray-800 rounded-lg shadow-xl w-full max-h-[calc(100vh-4rem)] overflow-hidden flex flex-col ".concat(k?"max-w-sm":"max-w-2xl"),children:[(0,a.jsx)("div",{className:"bg-gray-100 dark:bg-gray-700 rounded-t-lg p-3 md:p-4 border-b border-gray-200 dark:border-gray-600",children:(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-base md:text-lg font-bold text-gray-900 dark:text-white",children:"bug"===p.category?"\uD83D\uDC1B Report a Bug":"\uD83D\uDCA1 Feature Request"}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 mt-2",children:[(0,a.jsxs)("select",{value:p.category,onChange:e=>b(r=>({...r,category:e.target.value})),className:"text-sm p-1 border rounded text-gray-900 dark:text-white bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600",children:[(0,a.jsx)("option",{value:"bug",children:"Bug"}),(0,a.jsx)("option",{value:"feature",children:"Feature Request"})]}),(0,a.jsxs)("select",{value:p.severity,onChange:e=>b(r=>({...r,severity:e.target.value})),className:"text-sm p-1 border rounded text-gray-900 dark:text-white bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600",children:[(0,a.jsx)("option",{value:"low",children:"Low"}),(0,a.jsx)("option",{value:"medium",children:"Medium"}),(0,a.jsx)("option",{value:"high",children:"High"}),(0,a.jsx)("option",{value:"critical",children:"Critical"})]})]})]}),(0,a.jsx)("button",{onClick:w,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 text-xl",children:"\xd7"})]})}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,a.jsxs)("form",{onSubmit:v,className:"flex flex-col h-full",children:[(0,a.jsxs)("div",{className:"flex-1 p-4 md:p-6 space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:["bug"===p.c
1ategory?"Bug Title":"Feature Title"," ","*"]}),(0,a.jsx)("input",{type:"text",placeholder:"bug"===p.category?"Brief summary of the issue":"Brief summary of the feature",value:p.title,onChange:e=>b(r=>({...r,title:e.target.value})),className:"w-full p-2 md:p-3 border rounded-md text-sm md:text-base text-gray-900 dark:text-white bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 focus:ring-2 focus:ring-blue-500 focus:border-transparent",required:!0})]}),"bug"===p.category?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"What were you doing? *"}),(0,a.jsx)("textarea",{placeholder:"Describe what you were trying to do when the bug occurred...",value:p.whatIDoing,onChange:e=>b(r=>({...r,whatIDoing:e.target.value})),className:"w-full p-2 md:p-3 border rounded-md h-16 md:h-20 text-sm md:text-base text-gray-900 dark:text-white bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",required:!0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"What happened? *"}),(0,a.jsx)("textarea",{placeholder:"Describe what actually happened (the bug behavior)...",value:p.whatHappened,onChange:e=>b(r=>({...r,whatHappened:e.target.value})),className:"w-full p-2 md:p-3 border rounded-md h-16 md:h-20 text-sm md:text-base text-gray-900 dark:text-white bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",required:!0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"What did you expect? *"}),(0,a.jsx)("textarea",{placeholder:"Describe what you expected to happen instead...",value:p.whatExpected,onChange:e=>b(r=>({...r,whatExpected:e.target.value})),className:"w-full p-2 md:p-3 border rounded-md h-16 md:h-20 text-sm md:text-base text-gray-900 dark:text-white bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",required:!0})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Problem/Need *"}),(0,a.jsx)("textarea",{placeholder:"What problem does this feature solve? What need does it address?",value:p.whatIDoing,onChange:e=>b(r=>({...r,whatIDoing:e.target.value})),className:"w-full p-2 md:p-3 border rounded-md h-16 md:h-20 text-sm md:text-base text-gray-900 dark:text-white bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",required:!0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Proposed Solution & Expected Benefit *"}),(0,a.jsx)("textarea",{placeholder:"Describe the feature you'd like to see implemented and how it would improve the user experience or workflow...",value:p.whatHappened,onChange:e=>b(r=>({...r,whatHappened:e.target.value})),className:"w-full p-2 md:p-3 border rounded-md h-24 md:h-32 text-sm md:text-base text-gray-900 dark:text-white bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",required:!0})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Image (Optional)"}),(0,a.jsx)(l,{onImageCapture:f,onImageClear:()=>f(null),existingImage:y})]})]}),(0,a.jsx)("div",{className:"border-t border-gray-200 dark:border-gray-600 p-4 md:p-6 bg-gray-50 dark:bg-gray-800 rounded-b-lg",children:(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,a.jsx)("button",{type:"submit",disabled:u,className:"flex-1 bg-blue-500 text-white py-2 md:py-3 px-4 roun
1ded-md hover:bg-blue-600 disabled:opacity-50 disabled:cursor-not-allowed font-medium transition-colors text-sm md:text-base",children:u?"Submitting...":"bug"===p.category?"Submit Bug Report":"Submit Feature Request"}),(0,a.jsx)("button",{type:"button",onClick:w,className:"px-4 md:px-6 py-2 md:py-3 border border-gray-300 dark:border-gray-600 rounded-md hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300 font-medium transition-colors text-sm md:text-base",children:"Cancel"})]})})]})})]}),m&&(0,a.jsx)("div",{className:"fixed top-4 right-4 z-[10001] max-w-md p-4 rounded-lg shadow-lg transform transition-all duration-300 ease-in-out ".concat("success"===m.type?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200 border border-green-200 dark:border-green-700":"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200 border border-red-200 dark:border-red-700"),children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:"success"===m.type?(0,a.jsx)("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}):(0,a.jsx)("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,a.jsx)("p",{className:"text-sm font-medium",children:m.message}),(0,a.jsx)("button",{onClick:()=>h(null),className:"flex-shrink-0 ml-auto -mr-1 p-1 rounded hover:bg-black hover:bg-opacity-10",children:(0,a.jsx)("svg",{className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})]})});return(0,o.createPortal)(j,document.body)}},83930:(e,r,t)=>{Promise.resolve().then(t.bind(t,89041))}}]);

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.