1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6984],{86984:function(e,t,a){a.r(t),a.d(t,{default:function(){return g}});var s=a(57437),n=a(2265),r=a(88589),i=a(83293),l=a(2886),o=a(88433),c=a(71700),d=a(30490),m=a(96735),p=a(3139);let x=async e=>{let{unzip:t}=await a.e(8694).then(a.bind(a,78694)),s=new Uint8Array(await e.arrayBuffer()),n=await new Promise((e,a)=>{t(s,(t,s)=>{t?a(t):e(s)})}),r=[];for(let[e,t]of Object.entries(n)){if(e.endsWith("/")||e.startsWith("__MACOSX/")||e.startsWith("."))continue;let a=e.split("/").pop()||e,s=new File([function(e){if(e.buffer instanceof ArrayBuffer){let{buffer:t,byteOffset:a,byteLength:s}=e;return 0===a&&s===t.byteLength?t:t.slice(a,a+s)}let t=new Uint8Array(e.byteLength);return t.set(e),t.buffer}(t)],a,{type:h(a)});r.push({path:e,size:t.length,data:t,file:s})}return r},h=e=>{var t;let a=null===(t=e.split(".").pop())||void 0===t?void 0:t.toLowerCase();return a&&({xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xls:"application/vnd.ms-excel",csv:"text/csv",tsv:"text/tab-separated-values",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",txt:"text/plain",json:"application/json",html:"text/html",xml:"application/xml",srt:"application/x-subrip",vtt:"text/vtt",po:"text/x-gettext-translation",md:"text/markdown"})[a]||"application/octet-stream"},u=e=>{var t;return!!(null===(t=e.split(".").pop())||void 0===t?void 0:t.toLowerCase())},f=e=>{if(0===e)return"0 Bytes";let t=Math.floor(Math.log(e)/Math.log(1024));return Math.round(e/Math.pow(1024,t)*100)/100+" "+["Bytes","KB","MB","GB"][t]};var g=e=>{let{open:t,onClose:a,file:h,isSubmitting:g,onFileSelect:y}=e,w=(0,d.T)("Uploader"),{isAuthenticated:v}=(0,p.a)(),[b,j]=(0,n.useState)(new Set),[N,k]=(0,n.useState)(new Set),[C,M]=(0,n.useState)(new Map),[S,_]=(0,n.use
1State)(new Map),[F,B]=(0,n.useState)([]),E=(0,n.useRef)(new Set);(0,n.useEffect)(()=>{(async()=>{h&&t&&B(await x(h))})()},[h,t]);let L=async e=>{if(!(!e.file||g||E.current.has(e.path))){E.current.add(e.path),j(t=>new Set(t).add(e.path)),_(t=>{let a=new Map(t);return a.delete(e.path),a});try{let t=await y(e.file);t&&(M(a=>new Map(a).set(e.path,t)),k(t=>new Set(t).add(e.path)))}catch(a){let t=a instanceof Error?a.message:w("upload_failed");_(a=>new Map(a).set(e.path,t))}finally{E.current.delete(e.path),j(t=>{let a=new Set(t);return a.delete(e.path),a})}}};return(0,s.jsx)(r.u,{show:t,as:n.Fragment,children:(0,s.jsxs)(i.Vq,{as:"div",className:"relative z-[60]",onClose:()=>{},children:[(0,s.jsx)(r.x,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),(0,s.jsx)("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:(0,s.jsx)("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:(0,s.jsx)(r.x,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,s.jsxs)(i.EM,{className:"relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-3xl sm:p-6",children:[(0,s.jsx)("div",{className:"absolute right-0 top-0 hidden pr-4 pt-4 sm:block",children:(0,s.jsxs)("button",{type:"button",onClick:a,className:"rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:[(0,s.jsx)("span",{className:"sr-only",children:"Close"}),(0,s.jsx)(l.Z,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,s.jsx)("div",{className:"sm:flex sm:items-start",children:(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)("div",{className:"mt-8 max-h-96 overflow-y-auto",children:(0,s.jsx)("div",{className:"space-y-2",children:F.map(e=>{let t=b.has(e.path),a=N.has(e.path),n=C.get(e.path),r=S.get(e.path),i=u(e.path);return(0,s.jsxs)("div",{className:"flex items-center justify-between rounded-lg border p-3 ".concat(a?"border-green-200 bg-green-50":r?"border-red-200 bg-red-50":i?"border-gray-200 bg-white hover:bg-gray-50":"border-gray-200 bg-gray-50"),children:[(0,s.jsx)("div",{className:"flex items-center space-x-3",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium ".concat(i?"text-gray-900":"text-gray-400"),children:e.path}),(0,s.jsx)("p",{className:"text-xs text-gray-500",children:f(e.size)}),r&&(0,s.jsx)("p",{className:"mt-1 text-xs text-red-600",children:r}),!i&&!r&&(0,s.jsx)("p",{className:"mt-1 text-xs text-gray-400",children:w("unsupported_file_type")})]})}),(0,s.jsx)("div",{children:a&&n?(0,s.jsxs)(m.rU,{href:v?"/my/preview/".concat(n):"/preview/".concat(n),target:"_blank",className:"inline-flex items-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-indigo-500",children:[(0,s.jsx)(o.Z,{className:"mr-1 h-4 w-4"}),w("preview_translation")]}):a?(0,s.jsx)("span",{className:"inline-flex items-center rounded-md bg-green-100 px-2.5 py-1 text-xs font-medium text-green-800",children:w("processed")}):(0,s.jsx)("button",{onClick:()=>L(e),disabled:g||t||!i,className:"inline-flex items-center rounded-md px-3 py-1.5 text-sm font-medium ".concat(g||t||!i?"cursor-not-allowed bg-gray-100 text-gray-400":"bg-indigo-600 text-white hover:bg-indigo-700"),children:t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("svg",{className:"-ml-1 mr-2 h-4 w-4 animate-spin text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),w("processing")]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Z,{className:"mr-1 h-4 w-4"}),w("upload_button")]})})})]},e.path)})})})})}),(0,s.jsx)("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:(0,s.jsx)("button",{type:"button",onClick:a,className:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",children:w("close")})})]})})})})]})})}},88433:function(e,t,a){var s=a(2265);let n=s.forwardRef(function(e,t){let{title:a,titleId:n,...r}=e;return s.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:t,"aria-labelledby":n},r),a?s.createElement("title",{id:n},a):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))});t.Z=n}}]);
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.