PageSourceSearch

https://www.euhu.co.uk/_next/static/chunks/9997-218f28dd2c5dbf1b.js

js euhu.co.uk collected 2026-10-04 05:22:11 UTC 12,840 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9997],{31999:function(e,n,t){let a=t(67294),r=a.forwardRef(function(e,n){let{title:t,titleId:r,...l}=e;return a.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",ref:n,"aria-labelledby":r},l),t?a.createElement("title",{id:r},t):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"}))});e.exports=r},89453:function(e,n,t){let a=t(67294),r=a.forwardRef(function(e,n){let{title:t,titleId:r,...l}=e;return a.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",ref:n,"aria-labelledby":r},l),t?a.createElement("title",{id:r},t):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m6.75 12l-3-3m0 0l-3 3m3-3v6m-1.5-15H5.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 00-9-9z"}))});e.exports=r},33507:function(e,n,t){t.d(n,{r:function(){return u}});var a=t(85893),r=t(94184),l=t.n(r),o=t(67294),s=t(90048),i=t(89453),c=t.n(i),d=t(86501),m=t(84849);function u(e){let{buttonTitle:n,showSkeleton:t,onChange:r,disabled:i=!1,className:u="gtm-lesson-dropzone",placeholder:p="Drag files here or browse your device",contentTypes:h,"data-testid":f="file-drop-zone",supportedFormats:v=["AVIF","DOC","DOCX","JPEG","PDF","PNG","PPT","PPTX","WEBP","XLS"],variant:x="normal",multiple:g,maxFileSize:w=52428800}=e,[j,b]=(0,o.useState)(!1),y=(0,o.useRef)(null);function M(e){e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?b(!0):"dragleave"===e.type&&b(!1)}return(0,a.jsxs)("div",{className:l()(u,"relative text-center"),onDragEnter:M,"data-testid":f,children:[(0,a.jsx)("input",{ref:y,type:"file",multiple:g,onChange:function(e){e.preventDefault(),e.stopPropagation(),!i&&e.target.files&&(Array.from(e.target.files).forEach(e=>{e.size<w?r(e):d.Am.error('"'.concat(e.name,'" is too large.'))}),y&&y.current&&(y.current.value=""))},className:"hidden","data-testid":"".concat(f,"-input"),accept:h.join(",")}),(0,a.jsx)("label",{className:l()("flex grow items-center justify-center","overflow-hidden rounded-md border border-dashed border-grey",{"bg-neutral-100 opacity-75":i,"bg-neutral-50":j&&!i,"cursor-pointer bg-neutral-100":!j&&!i}),children:(0,a.jsx)("div",{className:"flex flex-col gap-4 px-2 py-10",children:t?(0,a.jsx)(m.Z,{className:l()({"h-[15rem]":"normal"===x,"h-[8rem]":"compact"===x})}):(0,a.jsxs)(a.Fragment,{children:["normal"===x&&(0,a.jsx)("div",{className:"mb-2 flex justify-center",children:(0,a.jsx)(c(),{className:"h-20 w-20 text-primary"})}),(0,a.jsx)("p",{className:l()("m-0 font-black text-primary",{"text-2xl sm:text-4xl":"normal"===x,"text-xl sm:text-3xl":"compact"===x}),children:p}),(0,a.jsxs)("p",{className:l()("m-0 text-primary sm:mx-16",{"text-base sm:text-lg":"normal"===x,"text-sm sm:text-base":"compact"===x}),children:["Supported formats: ",(null==v?void 0:v.join(", "))||"any",". Max size ",Math.floor(w/1024/1024),"MB."]}),(0,a.jsx)("p",{className:"m-0",children:(0,a.jsx)(s.zx,{className:"gtm-btn-lesson-file-upload",variant:"outline",disabled:i,loader:i,onClick:()=>{!i&&y&&y.current&&y.current.click()},"data-testid":"".concat(f,"-button-upload"),children:null!=n?n:"Upload"})})]})})}),j&&(0,a.jsx)("div",{className:"absolute right-0 top-0 h-full w-full bg-transparent",onDragEnter:M,onDragLeave:M,onDragOver:M,onDrop:function(e){e.preventDefault(),e.stopPropagation(),b(!1),!i&&e.dataTransfer.files&&Array.from(e.dataTransfer.files).forEach(e=>{r(e)})}})]})}},40487:function(e,n,t){t.d(n,{Z:function(){return x}});var a=t(85893),r=t(17847),l=t(90048),o=t(87517),s=t(89982),i=t.n(s),c=t(94184),d=t.n(c);function m(e){let{className:n}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",className:n,children:(0,a.jsx)("path",{fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",d:"M8.5 14.5.5 13V2l8-1.5zM8.5 2.5h7v10h-7M10.5 4.5h-2M10.5 6.5h-2M10.5 8.5h-2M10.5 10.5
1h-2M13.5 4.5h-1M13.5 6.5h-1M13.5 8.5h-1M13.5 10.5h-1M3 5.5l3.5 4M3 9.5 6.5 5"})})}function u(e){let{className:n}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",className:n,children:(0,a.jsxs)("g",{fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",children:[(0,a.jsx)("path",{d:"M8.5 14.5.5 13V2l8-1.5zM8.5 2.5h7v10h-7M13.5 4.5h-5M13.5 6.5h-5M13.5 8.5h-5M13.5 10.5h-5"}),(0,a.jsx)("path",{d:"M2.5 6.5 3 10l1.5-4L6 10l.5-4.5"})]})})}function p(e){let{className:n}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",className:n,children:(0,a.jsxs)("g",{fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",children:[(0,a.jsx)("path",{d:"M8.5 14.5.5 13V2l8-1.5zM8.5 2.5h7v10h-7M13.5 10.5h-5M3.5 5.5v5"}),(0,a.jsx)("path",{d:"M3.5 5.5H5a1.5 1.5 0 0 1 0 3H3.5"}),(0,a.jsx)("circle",{cx:"11.5",cy:"6.5",r:"2"}),(0,a.jsx)("path",{d:"M11.5 4.5v2h2"})]})})}function h(e){let{className:n}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",className:n,children:(0,a.jsxs)("g",{"data-name":"Outline",children:[(0,a.jsx)("path",{d:"M40.535 48.8h-4.716l-4.677-8.86 2.435-4.216a4.13 4.13 0 1 0-7.154 0l2.435 4.216-4.677 8.86h-4.716a4.1 4.1 0 1 0 3.567 6.121l2.335-4.121h9.266l2.335 4.121a4.1 4.1 0 1 0 3.567-6.121zm-19.243 5.135a2.1 2.1 0 1 1-1.827-3.135h3.6zm6.864-19.211a2.13 2.13 0 1 1 3.688 0L30 37.918zM26.442 48.8 30 42.061l3.558 6.739zm15.921 5.135a2.1 2.1 0 0 1-3.655 0L36.932 50.8h3.6a2.1 2.1 0 0 1 1.828 3.135zM15.5 10H12a1 1 0 0 0-1 1v10a1 1 0 0 0 2 0v-4h2.5a3.5 3.5 0 0 0 0-7zm0 5H13v-3h2.5a1.5 1.5 0 0 1 0 3zm8.5-5h-2a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h2a5.006 5.006 0 0 0 5-5v-2a5.006 5.006 0 0 0-5-5zm3 7a3 3 0 0 1-3 3h-1v-8h1a3 3 0 0 1 3 3zm11-7h-6a1 1 0 0 0-1 1v10a1 1 0 0 0 2 0v-4h4a1 1 0 0 0 0-2h-4v-3h5a1 1 0 0 0 0-2z"}),(0,a.jsx)("circle",{cx:"53",cy:"43",r:"1"}),(0,a.jsx)("path",{d:"M57 2H11a1 1 0 0 0-1 1v3H7a1 1 0 0 0-1 1v54a1 1 0 0 0 1 1h46a1 1 0 0 0 1-1v-3h3a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1ZM8 8h34v7a3 3 0 0 0 3 3h7v6H8Zm36 7V9.414L50.586 16H45a1 1 0 0 1-1-1Zm12 41h-2v-9a1 1 0 0 0-2 0v13H8V26h44v13a1 1 0 0 0 2 0V17a1 1 0 0 0-.293-.707l-10-10A1 1 0 0 0 43 6H12V4h44Z"})]})})}function f(e){let{className:n}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:n,children:(0,a.jsx)("path",{d:"M19,2H5A3,3,0,0,0,2,5V19a3,3,0,0,0,3,3H19a2.81,2.81,0,0,0,.49-.05l.3-.07.07,0h0l.05,0,.37-.14.13-.07c.1-.06.21-.11.31-.18a3.79,3.79,0,0,0,.38-.32l.07-.09a2.69,2.69,0,0,0,.27-.32l.09-.13a2.31,2.31,0,0,0,.18-.35,1,1,0,0,0,.07-.15c.05-.12.08-.25.12-.38l0-.15A2.6,2.6,0,0,0,22,19V5A3,3,0,0,0,19,2ZM5,20a1,1,0,0,1-1-1V14.69l3.29-3.3h0a1,1,0,0,1,1.42,0L17.31,20Zm15-1a1,1,0,0,1-.07.36,1,1,0,0,1-.08.14.94.94,0,0,1-.09.12l-5.35-5.35.88-.88a1,1,0,0,1,1.42,0h0L20,16.69Zm0-5.14L18.12,12a3.08,3.08,0,0,0-4.24,0l-.88.88L10.12,10a3.08,3.08,0,0,0-4.24,0L4,11.86V5A1,1,0,0,1,5,4H19a1,1,0,0,1,1,1Z"})})}t(67294);
1var v=t(17376);function x(e){let{id:n,filename:t,mimeType:s,className:c="",onDownload:x,onDelete:g}=e;return(0,a.jsxs)("div",{className:d()(c,"flex w-full items-center gap-1 rounded-md p-1","duration-100 ease-in focus-within:bg-neutral-100 hover:bg-neutral-100","border border-solid border-grey bg-white"),children:[(0,a.jsxs)("button",{type:"button",className:d()("flex grow cursor-pointer items-center self-stretch truncate px-1 py-2"),onClick:()=>{n&&x&&x()},title:t,children:[function(){if(s){if(["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(s))return(0,a.jsx)(u,{className:"mr-2 h-5 w-5"});if(["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"].includes(s))return(0,a.jsx)(m,{className:"mr-2 h-5 w-5"});if(["image/avif","image/bmp","image/gif","image/vnd.microsoft.icon","image/jpeg","image/png","image/svg+xml","image/tiff","image/webp"].includes(s))return(0,a.jsx)(f,{className:"mr-2 h-5 w-5"});if(["application/pdf"].includes(s))return(0,a.jsx)(h,{className:"mr-2 h-5 w-5"});if(["application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation"].includes(s))return(0,a.jsx)(p,{className:"mr-2 h-5 w-5"})}}(),t]}),x&&(0,a.jsx)(l.zx,{onClick:x,size:"custom",className:"gtm-plan-file-view p-2",title:"View File",variant:"outline",children:(0,a.jsx)(i(),{className:"h-4 w-4"})}),g&&(0,a.jsx)("div",{className:"ml-auto",children:(0,a.jsx)(o.Z,{title:'Are you sure you wish to delete file "'.concat(t||"",'"?'),body:(0,a.jsx)(r.Z,{variant:"error",children:"Warning: This cannot be recovered once deleted."}),onConfirmClick:()=>{g(n)},confirmButtonColor:"default",confirmButtonText:"Delete",cancelButtonText:"Cancel",children:e=>{let{handleOpen:n}=e;return(0,a.jsxs)(l.zx,{title:"Delete File",size:"custom",variant:"outline",className:"gtm-plan-file-delete p-2",onClick:e=>{e.preventDefault(),e.stopPropagation(),n()},children:[(0,a.jsx)("span",{className:"sr-only",children:"Delete File"}),(0,a.jsx)(v.Dz,{className:"h-4 w-4"})]})}})})]})}},64065:function(e,n,t){t.d(n,{Z:function(){return j}});var a=t(85893),r=t(77783),l=t(35800),o=t(32810),s=t(11163),i=t(67294),c=t(86501),d=t(17847),m=t(33507),u=t(32562),p=t(83915);let h=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","image/avif","image/gif","image/jpeg","image/png","image/svg+xml","image/tiff","image/webp"];function f(e){let{showSkeleton:n,lessonId:t,onSubmitSuccess:r}=e,l=p.h.lessons.uploadFile.useMutation({trpc:{context:{skipBatch:!0}},onSuccess:e=>{e&&r(e.id||"")}});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.r,{contentTypes:h,onChange:async e=>{let n=await (0,u.l)(e);await c.ZP.promise(l.mutateAsync({lessonId:t,file:{data:n,name:e.name,type:e.type}}),{error:'Uploading "'.concat(e.name,'" failed'),loading:'Uploading file "'.concat(e.name,'"...'),success:'"'.concat(e.name,'" uploaded')})},multiple:!0,variant:"normal",maxFileSize:52428800,showSkeleton:n}),l.error&&(0,a.jsx)(d.Z,{variant:"error",children:l.error.message})]})}var v=t(84849),x=t(1078),g=t(73935),w=t(40487);function j(e){var n,t,d,m;let{lessonId:u,isEdit:h}=e,j=(0,o.w)(),b=(0,s.useRouter)(),y=(0,l.useErrorHandler)(),[M,N]=(0,i.useState)(!1),k=p.h.lessons.getFiles.useQuery({lessonId:u,sharedContentId:j},{enabled:!0,retry:!1,onError:e=>{var n,t;return y(new r.FZ(null===(n=e.data)||void 0===n?void 0:n.httpStatus,null===(t=e.shape)||void 0===t?void 0:t.type))}}),z=p.h.lessons.get.useQuery({lessonId:u,sharedContentId:j},{enabled:!1}),D=p.h.lessons.deleteFile.useMutation({onSuccess:()=>{k.refetch()}});async function L(e){var n,t;if(!e)return;let a=null===(t=k.data)||void 0===t?void 0:null===(n=t.files)||void 0===n?void 0:n.find(n=>n.id===e);if(!a||!a.name){c.ZP.error("File name not found");return}await c.ZP.promise(D.mutateAsync({lessonId:u,lessonFileId:e}
1),{error:'Deletion of "'.concat(null==a?void 0:a.name,'" failed'),loading:'Deleting "'.concat(null==a?void 0:a.name,'"'),success:'"'.concat(null==a?void 0:a.name,'" deleted')})}let Z=[k.isFetching,!b.isReady,k.error].some(Boolean);return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[h&&(0,a.jsx)(f,{showSkeleton:Z,lessonId:u,onSubmitSuccess:()=>k.refetch()}),Z?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.Z,{className:"h-[3rem]"}),(0,a.jsx)(v.Z,{className:"h-[3rem]"}),(0,a.jsx)(v.Z,{className:"h-[3rem]"})]}):(null===(d=k.data)||void 0===d?void 0:null===(t=d.files)||void 0===t?void 0:t.length)===0||void 0===k.data?(0,a.jsx)("p",{className:"text-center",children:"No files are available for download"}):null===(m=k.data.files)||void 0===m?void 0:m.map(e=>(0,a.jsx)(w.Z,{filename:e.name||"",id:e.id||"",mimeType:e.contentType,onDelete:h?L:null,onDownload:()=>{k.data.canDownload?window.open(e.url,"_blank","noopener,noreferrer"):N(!0)}},e.id)),(0,g.createPortal)((0,a.jsx)(x.Z,{show:M,onClose:()=>N(!1),subscriptionProvider:null==z?void 0:null===(n=z.data)||void 0===n?void 0:n.subscriptionProvider}),document.body)]})}},32562:function(e,n,t){t.d(n,{l:function(){return a}});async function a(e){return await new Promise((n,t)=>{let a=new FileReader;a.readAsDataURL(e),a.onload=()=>n(a.result.replace(/^.*;base64,/,"")),a.onerror=e=>t(e)})}}}]);

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.