PageSourceSearch

https://mygenefood.app/_next/static/chunks/6516-5e6288b162ec2057.js

js mygenefood.app collected 2026-10-05 18:31:53 UTC 8,597 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6516],{8235:(e,r,t)=>{t.d(r,{A:()=>a});var l=t(37876);let a=e=>{let{children:r}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("p",{className:"mt-2 px-2 text-sm text-red-600 dark:text-red-500",children:r})})}},11036:(e,r,t)=>{t.d(r,{Q:()=>n,n:()=>a});var l=t(10832);let a=e=>!(null==e?void 0:e.error)&&"string"==typeof(null==e?void 0:e.uuid)&&e.uuid.trim().length>0&&"string"==typeof(null==e?void 0:e.name)&&e.name.trim().length>0,n=()=>({upload:async e=>{let{...r}=e;await l.A.get("/sanctum/csrf-cookie");let t=new FormData;t.append("upload_file",r.formData);try{return(await l.A.post("/api/upload-file",t)).data}catch(r){var a,n,s,i,d,o,u;let e=(null==r||null==(i=r.response)||null==(s=i.data)||null==(n=s.errors)||null==(a=n.upload_file)?void 0:a[0])||(null==r||null==(o=r.response)||null==(d=o.data)?void 0:d.message);switch(null==r||null==(u=r.response)?void 0:u.status){case 401:return{error:e};case 500:case 422:return r.response.data.errors,{error:e};default:throw r}}}})},22390:(e,r,t)=>{t.d(r,{A:()=>a});var l=t(37876);let a=e=>{let{show:r}=e;return(0,l.jsx)("div",{children:r&&(0,l.jsx)("div",{className:"absolute top-0 left-0 w-full h-full flex items-center justify-center bg-white bg-opacity-70 ",children:(0,l.jsx)("div",{className:"animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-orange-500"})})})}},61727:(e,r,t)=>{t.d(r,{A:()=>n});var l=t(37876),a=t(14232);let n=e=>{let{show:r}=e,[t,n]=(0,a.useState)("");return(0,a.useEffect)(()=>{let e=setInterval(()=>{n(e=>3===e.length?"":e+".")},500);return()=>{clearInterval(e)}},[]),(0,l.jsx)("div",{children:r&&(0,l.jsxs)("div",{className:"fixed inset-0 flex items-center justify-center z-[1000] bg-white bg-opacity-40 ",children:[(0,l.jsx)("div",{className:"fixed inset-0 flex items-center justify-center z-[1000] bg-white bg-opacity-60 ",children:(0,l.jsx)("div",{role:"status",children:(0,l.jsxs)("svg",{"aria-hidden":"true",className:"w-12 h-12 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"orange"}),(0,l.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"white"})]})})}),(0,l.jsxs)("div",{className:"mt-20 font-semibold",children:["Loading",t]})]})})}},66516:(e,r,t)=>{t.d(r,{A:()=>p});var l=t(37876),a=t(61727),n=t(89001),s=t(89099),i=t.n(s),d=t(11036),o=t(22390),u=t(14232),c=t(8235);let m=u.forwardRef(function(e,r){let{title:t,titleId:l,...a}=e;return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":l},a),t?u.createElement("title",{id:l},t):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"}))}),f=u.forwardRef(function(e,r){let{title:t,titleId:l,...a}=e;return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":l},a),t?u.createElement("title",{id:l},t):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))});var h=t(90603);let x=e=>{var r,t,l,a,n,s,i,d,o,u;return(null==e||null==(a=e.response)||null==(l=a.data)||null==(t=l.errors)||null==(r=t["file.uuid"])?void 0:r[0])||(null==e||null==(d=e.response)||null==(i=d.data)||null==(s=i.errors)||null==(n=s["f
1ile.name"])?void 0:n[0])||(null==e||null==(u=e.response)||null==(o=u.data)?void 0:o.message)||(null==e?void 0:e.message)||"We could not upload your file. Please try again."},p=()=>{let{uploadUserFile:e}=(0,n.A)({middleware:"auth"}),[r,t]=(0,u.useState)(null),[s,p]=(0,u.useState)(""),[b,g]=(0,u.useState)(!1),[v,w]=(0,u.useState)(!1),[j,y]=(0,u.useState)(null),N=(0,u.useRef)(!1),C=(0,u.useRef)(!1);(0,u.useEffect)(()=>(C.current=!0,()=>{C.current=!1}),[]);let D=async e=>{if(!e||N.current)return;let r=(0,h.w1)(),l=()=>C.current&&(0,h.w1)()===r;N.current=!0,t(null),p(e.name),y(null),w(!0);try{let r=await (0,d.Q)().upload({formData:e});if(!l())return;if(!(0,d.n)(r))throw Error((null==r?void 0:r.error)||"This file could not be accepted. Please select it again.");t(r)}catch(e){l()&&y(x(e))}finally{N.current=!1,C.current&&w(!1)}},k=async t=>{if(t.preventDefault(),N.current||!(0,d.n)(r))return;let l=(0,h.w1)(),a=()=>C.current&&(0,h.w1)()===l;N.current=!0,y(null),g(!0);try{if(await e({file:{name:r.name,uuid:r.uuid}}),!a())return;await i().push("/upload-user-file/done")}catch(e){a()&&y(x(e))}finally{N.current=!1,C.current&&g(!1)}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.A,{show:b}),(0,l.jsxs)("div",{className:"bg-white rounded-2xl border border-[#D9D6D6] p-6",children:[(0,l.jsx)("h3",{className:"text-[28px] font-semibold text-[#333333] leading-8 mb-2",children:"My Genome File"}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:"Upload your raw DNA data file to see your personalized health reports and genetic analysis."}),(0,l.jsxs)("form",{onSubmit:k,"aria-busy":v||b,children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(o.A,{show:v}),r?(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center w-full min-h-64 p-6 border-2 border-[#50831D] rounded-lg bg-green-50",children:[(0,l.jsx)(f,{className:"w-12 h-12 text-[#50831D] mb-3","aria-hidden":"true"}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-1",children:"Selected file:"}),(0,l.jsx)("p",{className:"max-w-full break-all text-lg font-semibold text-[#333333] mb-3",children:r.name}),(0,l.jsx)("button",{type:"button",disabled:b,onClick:()=>{N.current||(t(null),p(""),y(null))},className:"px-4 py-2 text-sm text-red-600 hover:text-red-700 underline disabled:opacity-50",children:"Remove file"})]}):(0,l.jsxs)("label",{htmlFor:"dropzone-file",onDragOver:e=>e.preventDefault(),onDrop:e=>{var r;e.preventDefault(),D(null==(r=e.dataTransfer.files)?void 0:r[0])},className:"flex flex-col items-center justify-center w-full min-h-64 p-6 border-2 border-dashed border-[#D9D6D6] rounded-lg cursor-pointer hover:border-[#50831D] focus-within:ring-2 focus-within:ring-[#50831D] transition-colors bg-gray-50",children:[(0,l.jsx)(m,{className:"w-12 h-12 text-[#50831D] mb-3","aria-hidden":"true"}),(0,l.jsxs)("p",{className:"text-sm text-gray-600 mb-1",children:[(0,l.jsx)("span",{className:"font-semibold text-[#50831D]",children:"Click to upload"})," ","or drag and drop"]}),(0,l.jsx)("p",{className:"text-xs text-gray-500",children:"Raw DNA data in TXT or ZIP format"}),s&&(0,l.jsxs)("p",{className:"mt-3 max-w-full break-all text-sm text-gray-700",children:["Selected file: ",s]}),(0,l.jsx)("input",{id:"dropzone-file",name:"dropzoneFile",type:"file",disabled:v||b,className:"sr-only",onChange:e=>{var r;let t=null==(r=e.target.files)?void 0:r[0];return e.target.value="",D(t)}})]}),j&&(0,l.jsx)("div",{role:"alert",children:(0,l.jsx)(c.A,{children:j})})]}),(0,l.jsx)("div",{className:"mt-6",children:(0,l.jsx)("button",{type:"submit",disabled:!r||v||b,className:"px-6 py-2 font-semibold rounded-md text-white bg-[#50831D] hover:bg-[#3d6516] disabled:bg-gray-400 disabled:cursor-not-allowed",children:"Upload File"})})]})]})]})}}}]);

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.