PageSourceSearch

https://ourhut.netlify.app/_next/static/chunks/pages/admin/publications-a82438ef4e7b2d9d.js

js ourhut.netlify.app collected 2026-10-03 11:14:52 UTC 24,850 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8049],{7718:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/publications",function(){return n(3678)}])},2299:function(e,t,n){"use strict";n.d(t,{_:function(){return d}});var o=n(7568),s=n(7582),r=n(5893),a=n(2920),i=n(6818),c=n(1463),l=n(8442),u=n(2039),d=function(e){var t=e.itemGenericName,n=e.itemToDelete,d=e.questionItem,f=e.deletePath,m=e.onSuccess,p=e.onCancel,h=(0,c.a)().user,v=(0,i.D)({user:h}),g=v.onDelete,y=v.pending,b=function(){var e=(0,o.Z)((function(){var e;return(0,s.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,g(f)];case 1:return n.sent(),a.Am.success("".concat(t," deleted successfully!")),m(),[3,3];case 2:return e=n.sent(),console.error(e),[3,3];case 3:return[2]}}))}));return function(){return e.apply(this,arguments)}}();return n?(0,r.jsx)(u.u,{width:"w-5/12",children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"text-left px-2",children:[(0,r.jsx)("h2",{className:"text-4xl text-admin-primary font-bold py-4 ",children:"Are you sure?"}),(0,r.jsxs)("p",{className:"text-left text-gray-500",children:["Do you really want to delete the item"," ",(0,r.jsxs)("b",{children:['"',d,'"']}),"?",(0,r.jsx)("br",{}),"This action is irreversible."]})]}),(0,r.jsxs)("div",{className:"p-3 mx-2 text-right space-x-4 border-t-2 border-slate-300 mt-4 pt-4",children:[(0,r.jsx)("button",{disabled:y,className:"btn-admin",onClick:p,children:"Cancel"}),(0,r.jsx)("button",{className:"btn-admin btn-danger",disabled:y,onClick:b,children:y?(0,r.jsx)(l.T,{}):"Delete"})]})]})}):null}},2039:function(e,t,n){"use strict";n.d(t,{u:function(){return s}});var o=n(5893),s=function(e){var t=e.width,n=void 0===t?"w-7/12":t,s=e.children;return(0,o.jsxs)("div",{id:"modal-id",className:"w-screen h-screen animated fadeIn faster fixed left-0 top-0 flex justify-center items-center inset-0 z-50 outline-none focus:outline-none bg-no-repeat bg-center bg-cover",children:[(0,o.jsx)("div",{className:"absolute bg-black opacity-80 inset-0 z-0"}),(0,o.jsx)("div",{className:"".concat(n," p-3 relative mx-auto my-auto rounded-xl shadow-lg  bg-white"),children:s})]})}},4586:function(e,t,n){"use strict";n.d(t,{E:function(){return i}});var o=n(9815),s=n(7294),r=n(1463),a=n(7574),i=function(e){var t=e.fetchPath,n=e.parseResponse,i=(0,s.useState)([]),c=i[0],l=i[1],u=(0,s.useState)(-1),d=u[0],f=u[1],m=(0,r.a)().user,p=(0,a.V)({fetchUrlPath:t,user:m}),h=p.data,v=p.loading,g=p.error;(0,s.useEffect)((function(){if(h&&!(c.length>0)){var e=n(h);l(e)}}),[h]);return{items:c,loading:v,error:g,itemToRemoveIndex:d,onWantToRemoveItem:function(e){f(e)},onRemoveConfirmed:function(){var e=(0,o.Z)(c.slice(0,d)).concat((0,o.Z)(c.slice(d+1)));f(-1),l(e)},onRemoveCancelled:function(){f(-1)}}}},6818:function(e,t,n){"use strict";n.d(t,{D:function(){return c}});var o=n(7568),s=n(7582),r=n(7294),a=n(7052),i=n(7533);function c(e){var t=e.user,n=(0,r.useState)(!1),c=n[0],l=n[1],u=(0,r.useState)(),d=u[0],f=u[1],m=function(){var e=(0,o.Z)((function(e){var n,o,r,c,u;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:l(!0),f(void 0),s.label=1;case 1:return s.trys.push([1,3,,4]),o="".concat("https://ourhut.co.uk","/.netlify/functions").concat(e),r={method:i.I.DELETE,token:null===t||void 0===t||null===(n=t.token)||void 0===n?void 0:n.access_token},[4,(0,a.r)(o,r)];case 2:return c=s.sent(),l(!1),[2,c];case 3:return u=s.sent(),f(u),l(!1),[2,void 0];case 4:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}();return{onDelete:m,pending:c,error:d}}},7574:function(e,t,n){"use strict";n.d(t,{V:function(){return i}});var o=n(7568),s=n(7582),r=n(7294),a=n(7052);function i(e){var t=e.fetchUrlPath,n=e.user,i=(0,r.useState)(),c=i[0],l=i[1],u=(0,r.useState)(!0),d=u[0],f=u[1],m=(0,r.useState)(),p=m[0],h=m[1];return(0,r.useEffect)((function(){var e=function(){var e=(0,o.Z)((function(){var e,o,r,i,c;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:f(!0),h(void 0),s.label=1;case 1:return s.trys.push([1,3,4,5]),o="".concat("https://ourhut.co.uk","/.netlify/functions").concat(t),r={token:null===n||void 0===n||null===(e=n.token)||void 0===e?void 0:e.access_token},[4,(0,a.r)(o,r)];case 2:return i=s.sent(),l(i),[3,5];case 3:return c=s.sent(),h(c),[3,5];case 4:return f(!1),[7];case 5:return[2]}}))}));return function(){return e.apply(this,arguments)}}();n&&e()}),[n]),{data:c,loading:d,error:p}}},5474:function(e,t,n){"use strict";n.d(t,{n:function(){return s}});var o=n(5893),s=function(e){var t=e.title,n=e.subtitle,s=e.createItemPath,r=e.itemName,a=e.children;return(0,o.jsxs)("div",{className:"p-4",children:[(0,o.jsxs)("div",{className:"flex justify-between items-center",children:[(0,o.jsx)("h2",{className:"text-gray-600 font-bold",children:t}),(0,o.jsxs)("a",{href:s,className:"btn-admin btn-primary btn-sm text-base",children:["Add New ",r]})]}),(0,o.jsx)("p",{className:"text-gray-600",children:n}),(0,o.jsx)("div",{children:a})]})}},3678:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return m},default:function(){return p}});var o=n(5893),s=n(7294),r=n(7226),a=n(5474),i=n(2299),c=function(e){var t=e.publication,n=e.onWantToRemovePublication;return(0,o.jsxs)("div",{className:"bg-white shadow rounded-lg p-4 flex flex-col",children:[(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsx)("span",{className:"text-xl font-bold text-gray-900",children:t.title}),(0,o.jsxs)("div",{className:"flex items-end mr-4 mb-2 text-sm text-gray-600",children:[t.materials.length," material",t.materials.length>1?"s":""]})]}),(0,o.jsxs)("div",{className:"flex justify-end items-end grow mt-2",children:[(0,o.jsx)("a",{href:"/admin/publications/".concat(t._id),className:"btn-admin btn-primary btn-sm text-base uppercase mr-2",children:"Edit"}),(0,o.jsx)("button",{className:"btn-admin btn-danger btn-sm text-base uppercase",onClick:n,children:"Remove"})]})]})},l=n(8442),u=n(4586),d=n(2920),f=function(){var e=(0,u.E)({fetchPath:"/admin-publications",parseResponse:function(e){return e.publications}}),t=e.items,n=e.loading,r=e.error,a=e.itemToRemoveIndex,f=e.onWantToRemoveItem,m=e.onRemoveConfirmed,p=e.onRemoveCancelled;return(0,s.useEffect)((function(){r&&d.Am.error("Error fetching publications")}),[r]),(0,o.jsxs)("div",{className:"h-screen bg-admin-grey",children:[(0,o.jsx)("div",{className:"flex flex-wrap",children:n?(0,o.jsx)(l.T,{}):(0,o.jsx)("div",{className:"mt-4 w-full grid grid-cols-1 md:grid-cols-3 xl:grid-cols-4 gap-4",children:t.map((function(e,t){return(0,o.jsx)(c,{publication:e,onWantToRemovePublication:function(){return f(t)}},e._id)}))})}),a>-1?(0,o.jsx)(i._,{itemGenericName:"Teaching Resource",itemToDelete:t[a],questionItem:t[a].title,deletePath:"/admin-publications?id=".concat(t[a]._id),onSuccess:m,onCancel:p}):null]})};f.Layout=function(e){var t=e.children;return(0,o.jsx)(r.l,{children:(0,o.jsx)(a.n,{title:"Publications",subtitle:"Here you can manage your publications.",itemName:"Publication",createItemPath:"/admin/publications/new",children:t})})};var m=!0,p=f},993:function(){},943:function(e,t,n){"use strict";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}n.d(t,{Z:function(){return o}})},7568:function(e,t,n){"use strict";function o(e,t,n,o,s,r,a){try{var i=e[r](a),c=i.value}catch(l){return void n(l)}i.done?t(c):Promise.resolve(c).then(o,s)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(s,r){var a=e.apply(t,n);function i(e){o(a,s,r,i,c,"next",e)}function c(e){o(a,s,r,i,c,"throw",e)}i(void 0)}))}}n.d(t,{Z:function(){return s}})},3375:function(e,t,n){"use strict";function o(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{Z:function(){return o}})},9815:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var o=n(943);var s=n(3375);var r=n(1566);function a(e){return function(e){if(Array.isArray(e))return(0,o.Z)(e)}(e)||(0,s.Z)(e)||(0,r.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},1566:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var o=n(943);function s(e,t){if(e){if("string"===typeof e)return(0,o.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,o.Z)(e,t):void 0}}},2920:function(e,t,n){"use strict";n.d(t,{Ix:function(){return C},Am:function(){return D}});var o=n(7294);function s(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=s(e[t]))&&(o&&(o+=" "),o+=n);
1else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}var r=function(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=s(e))&&(o&&(o+=" "),o+=t);return o};const a=e=>"number"==typeof e&&!isNaN(e),i=e=>"string"==typeof e,c=e=>"function"==typeof e,l=e=>i(e)||c(e)?e:null,u=e=>(0,o.isValidElement)(e)||i(e)||c(e)||a(e);function d(e){let{enter:t,exit:n,appendPosition:s=!1,collapse:r=!0,collapseDuration:a=300}=e;return function(e){let{children:i,position:c,preventExitTransition:l,done:u,nodeRef:d,isIn:f}=e;const m=s?`${t}--${c}`:t,p=s?`${n}--${c}`:n,h=(0,o.useRef)(0);return(0,o.useLayoutEffect)((()=>{const e=d.current,t=m.split(" "),n=o=>{o.target===d.current&&(e.dispatchEvent(new Event("d")),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===h.current&&"animationcancel"!==o.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)}),[]),(0,o.useEffect)((()=>{const e=d.current,t=()=>{e.removeEventListener("animationend",t),r?function(e,t,n){void 0===n&&(n=300);const{scrollHeight:o,style:s}=e;requestAnimationFrame((()=>{s.minHeight="initial",s.height=o+"px",s.transition=`all ${n}ms`,requestAnimationFrame((()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(t,n)}))}))}(e,u,a):u()};f||(l?t():(h.current=1,e.className+=` ${p}`,e.addEventListener("animationend",t)))}),[f]),o.createElement(o.Fragment,null,i)}}function f(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const m={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter((e=>e!==t));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach((t=>{const n=setTimeout((()=>{t(...[].slice.call(arguments,1))}),0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)}))}},p=e=>{let{theme:t,type:n,...s}=e;return o.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${n})`,...s})},h={info:function(e){return o.createElement(p,{...e},o.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return o.createElement(p,{...e},o.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return o.createElement(p,{...e},o.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return o.createElement(p,{...e},o.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return o.createElement("div",{className:"Toastify__spinner"})}};function v(e){const[,t]=(0,o.useReducer)((e=>e+1),0),[n,s]=(0,o.useState)([]),r=(0,o.useRef)(null),d=(0,o.useRef)(new Map).current,p=e=>-1!==n.indexOf(e),v=(0,o.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:p,getToast:e=>d.get(e)}).current;
1function g(e){let{containerId:t}=e;const{limit:n}=v.props;!n||t&&v.containerId!==t||(v.count-=v.queue.length,v.queue=[])}function y(e){s((t=>null==e?[]:t.filter((t=>t!==e))))}function b(){const{toastContent:e,toastProps:t,staleId:n}=v.queue.shift();E(e,t,n)}function T(e,n){let{delay:s,staleId:p,...g}=n;if(!u(e)||function(e){return!r.current||v.props.enableMultiContainer&&e.containerId!==v.props.containerId||d.has(e.toastId)&&null==e.updateId}(g))return;const{toastId:T,updateId:x,data:_}=g,{props:N}=v,C=()=>y(T),I=null==x;I&&v.count++;const w={...N,style:N.toastStyle,key:v.toastKey++,...Object.fromEntries(Object.entries(g).filter((e=>{let[t,n]=e;return null!=n}))),toastId:T,updateId:x,data:_,closeToast:C,isIn:!1,className:l(g.className||N.toastClassName),bodyClassName:l(g.bodyClassName||N.bodyClassName),progressClassName:l(g.progressClassName||N.progressClassName),autoClose:!g.isLoading&&(R=g.autoClose,L=N.autoClose,!1===R||a(R)&&R>0?R:L),deleteToast(){const e=f(d.get(T),"removed");d.delete(T),m.emit(4,e);const n=v.queue.length;if(v.count=null==T?v.count-v.displayedToast:v.count-1,v.count<0&&(v.count=0),n>0){const e=null==T?v.props.limit:1;if(1===n||1===e)v.displayedToast++,b();else{const t=e>n?n:e;v.displayedToast=t;for(let e=0;e<t;e++)b()}}else t()}};var R,L;w.iconOut=function(e){let{theme:t,type:n,isLoading:s,icon:r}=e,l=null;const u={theme:t,type:n};return!1===r||(c(r)?l=r(u):(0,o.isValidElement)(r)?l=(0,o.cloneElement)(r,u):i(r)||a(r)?l=r:s?l=h.spinner():(e=>e in h)(n)&&(l=h[n](u))),l}(w),c(g.onOpen)&&(w.onOpen=g.onOpen),c(g.onClose)&&(w.onClose=g.onClose),w.closeButton=N.closeButton,!1===g.closeButton||u(g.closeButton)?w.closeButton=g.closeButton:!0===g.closeButton&&(w.closeButton=!u(N.closeButton)||N.closeButton);let j=e;(0,o.isValidElement)(e)&&!i(e.type)?j=(0,o.cloneElement)(e,{closeToast:C,toastProps:w,data:_}):c(e)&&(j=e({closeToast:C,toastProps:w,data:_})),N.limit&&N.limit>0&&v.count>N.limit&&I?v.queue.push({toastContent:j,toastProps:w,staleId:p}):a(s)?setTimeout((()=>{E(j,w,p)}),s):E(j,w,p)}function E(e,t,n){const{toastId:o}=t;n&&d.delete(n);const r={content:e,props:t};d.set(o,r),s((e=>[...e,o].filter((e=>e!==n)))),m.emit(4,f(r,null==r.props.updateId?"added":"updated"))}return(0,o.useEffect)((()=>(v.containerId=e.containerId,m.cancelEmit(3).on(0,T).on(1,(e=>r.current&&y(e))).on(5,g).emit(2,v),()=>{d.clear(),m.emit(3,v)})),[]),(0,o.useEffect)((()=>{v.props=e,v.isToastActive=p,v.displayedToast=n.length})),{getToastToRender:function(t){const n=new Map,o=Array.from(d.values());return e.newestOnTop&&o.reverse(),o.forEach((e=>{const{position:t}=e.props;n.has(t)||n.set(t,[]),n.get(t).push(e)})),Array.from(n,(e=>t(e[0],e[1])))},containerRef:r,isToastActive:p}}function g(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function y(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function b(e){const[t,n]=(0,o.useState)(!1),[s,r]=(0,o.useState)(!1),a=(0,o.useRef)(null),i=(0,o.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,l=(0,o.useRef)(e),{autoClose:u,pauseOnHover:d,closeToast:f,onClick:m,closeOnClick:p}=e;function h(t){if(e.draggable){"touchstart"===t.nativeEvent.type&&t.nativeEvent.preventDefault(),i.didMove=!1,document.addEventListener("mousemove",E),document.addEventListener("mouseup",x),document.addEventListener("touchmove",E),document.addEventListener("touchend",x);const n=a.current;i.canCloseOnClick=!0,i.canDrag=!0,i.boundingRect=n.getBoundingClientRect(),n.style.transition="",i.x=g(t.nativeEvent),i.y=y(t.nativeEvent),"x"===e.draggableDirection?(i.start=i.x,i.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(i.start=i.y,i.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function v(t){if(i.boundingRect){const{top:n,bottom:o,left:s,right:r}=i.boundingRect;"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&i.x>=s&&i.x<=r&&i.y>=n&&i.y<=o?T():b()}}function b(){n(!0)}function T(){n(!1)}function E(n){const o=a.current;i.canDrag&&o&&(i.didMove=!0,t&&T(),i.x=g(n),i.y=y(n),i.delta="x"===e.draggableDirection?i.x-i.start:i.y-i.start,i.start!==i.x&&(i.canCloseOnClick=!1),o.style.transform=`translate${e.draggableDirection}(${i.delta}px)`,o.style.opacity=""+(1-Math.abs(i.delta/i.removalDistance)))}function x(){document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",x),document.removeEventListener("touchmove",E
1),document.removeEventListener("touchend",x);const t=a.current;if(i.canDrag&&i.didMove&&t){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance)return r(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform=`translate${e.draggableDirection}(0)`,t.style.opacity="1"}}(0,o.useEffect)((()=>{l.current=e})),(0,o.useEffect)((()=>(a.current&&a.current.addEventListener("d",b,{once:!0}),c(e.onOpen)&&e.onOpen((0,o.isValidElement)(e.children)&&e.children.props),()=>{const e=l.current;c(e.onClose)&&e.onClose((0,o.isValidElement)(e.children)&&e.children.props)})),[]),(0,o.useEffect)((()=>(e.pauseOnFocusLoss&&(document.hasFocus()||T(),window.addEventListener("focus",b),window.addEventListener("blur",T)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",b),window.removeEventListener("blur",T))})),[e.pauseOnFocusLoss]);const _={onMouseDown:h,onTouchStart:h,onMouseUp:v,onTouchEnd:v};return u&&d&&(_.onMouseEnter=T,_.onMouseLeave=b),p&&(_.onClick=e=>{m&&m(e),i.canCloseOnClick&&f()}),{playToast:b,pauseToast:T,isRunning:t,preventExitTransition:s,toastRef:a,eventHandlers:_}}function T(e){let{closeToast:t,theme:n,ariaLabel:s="close"}=e;return o.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":s},o.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},o.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function E(e){let{delay:t,isRunning:n,closeToast:s,type:a="default",hide:i,className:l,style:u,controlledProgress:d,progress:f,rtl:m,isIn:p,theme:h}=e;const v=i||d&&0===f,g={...u,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:v?0:1};d&&(g.transform=`scaleX(${f})`);const y=r("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${h}`,`Toastify__progress-bar--${a}`,{"Toastify__progress-bar--rtl":m}),b=c(l)?l({rtl:m,type:a,defaultClassName:y}):r(y,l);return o.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:b,style:g,[d&&f>=1?"onTransitionEnd":"onAnimationEnd"]:d&&f<1?null:()=>{p&&s()}})}const x=e=>{const{isRunning:t,preventExitTransition:n,toastRef:s,eventHandlers:a}=b(e),{closeButton:i,children:l,autoClose:u,onClick:d,type:f,hideProgressBar:m,closeToast:p,transition:h,position:v,className:g,style:y,bodyClassName:x,bodyStyle:_,progressClassName:N,progressStyle:C,updateId:I,role:w,progress:R,rtl:L,toastId:j,deleteToast:O,isIn:k,isLoading:P,iconOut:A,closeOnClick:D,theme:S}=e,M=r("Toastify__toast",`Toastify__toast-theme--${S}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":L},{"Toastify__toast--close-on-click":D}),$=c(g)?g({rtl:L,position:v,type:f,defaultClassName:M}):r(M,g),B=!!R||!u,z={closeToast:p,type:f,theme:S};let Z=null;return!1===i||(Z=c(i)?i(z):(0,o.isValidElement)(i)?(0,o.cloneElement)(i,z):T(z)),o.createElement(h,{isIn:k,done:O,position:v,preventExitTransition:n,nodeRef:s},o.createElement("div",{id:j,onClick:d,className:$,...a,style:y,ref:s},o.createElement("div",{...k&&{role:w},className:c(x)?x({type:f}):r("Toastify__toast-body",x),style:_},null!=A&&o.createElement("div",{className:r("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!P})},A),o.createElement("div",null,l)),Z,o.createElement(E,{...I&&!B?{key:`pb-${I}`}:{},rtl:L,theme:S,delay:u,isRunning:t,isIn:k,closeToast:p,hide:m,type:f,style:C,className:N,controlledProgress:B,progress:R||0})))}
1,_=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},N=d(_("bounce",!0)),C=(d(_("slide",!0)),d(_("zoom")),d(_("flip")),(0,o.forwardRef)(((e,t)=>{const{getToastToRender:n,containerRef:s,isToastActive:a}=v(e),{className:i,style:u,rtl:d,containerId:f}=e;function m(e){const t=r("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":d});return c(i)?i({position:e,rtl:d,defaultClassName:t}):r(t,l(i))}return(0,o.useEffect)((()=>{t&&(t.current=s.current)}),[]),o.createElement("div",{ref:s,className:"Toastify",id:f},n(((e,t)=>{const n=t.length?{...u}:{...u,pointerEvents:"none"};return o.createElement("div",{className:m(e),style:n,key:`container-${e}`},t.map(((e,n)=>{let{content:s,props:r}=e;return o.createElement(x,{...r,isIn:a(r.toastId),style:{...r.style,"--nth":n+1,"--len":t.length},key:`toast-${r.key}`},s)})))})))})));C.displayName="ToastContainer",C.defaultProps={position:"top-right",transition:N,autoClose:5e3,closeButton:T,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let I,w=new Map,R=[],L=1;function j(){return""+L++}function O(e){return e&&(i(e.toastId)||a(e.toastId))?e.toastId:j()}function k(e,t){return w.size>0?m.emit(0,e,t):R.push({content:e,options:t}),t.toastId}function P(e,t){return{...t,type:t&&t.type||e,toastId:O(t)}}function A(e){return(t,n)=>k(t,P(e,n))}function D(e,t){return k(e,P("default",t))}D.loading=(e,t)=>
1k(e,P("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),D.promise=function(e,t,n){let o,{pending:s,error:r,success:a}=t;s&&(o=i(s)?D.loading(s,n):D.loading(s.render,{...n,...s}));const l={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(e,t,s)=>{if(null==t)return void D.dismiss(o);const r={type:e,...l,...n,data:s},a=i(t)?{render:t}:t;return o?D.update(o,{...r,...a}):D(a.render,{...r,...a}),s},d=c(e)?e():e;return d.then((e=>u("success",a,e))).catch((e=>u("error",r,e))),d},D.success=A("success"),D.info=A("info"),D.error=A("error"),D.warning=A("warning"),D.warn=D.warning,D.dark=(e,t)=>k(e,P("default",{theme:"dark",...t})),D.dismiss=e=>{w.size>0?m.emit(1,e):R=R.filter((t=>null!=e&&t.options.toastId!==e))},D.clearWaitingQueue=function(e){return void 0===e&&(e={}),m.emit(5,e)},D.isActive=e=>{let t=!1;return w.forEach((n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},D.update=function(e,t){void 0===t&&(t={}),setTimeout((()=>{const n=function(e,t){let{containerId:n}=t;const o=w.get(n||I);return o&&o.getToast(e)}(e,t);if(n){const{props:o,content:s}=n,r={delay:100,...o,...t,toastId:t.toastId||e,updateId:j()};r.toastId!==e&&(r.staleId=e);const a=r.render||s;delete r.render,k(a,r)}}),0)},D.done=e=>{D.update(e,{progress:1})},D.onChange=e=>(m.on(4,e),()=>{m.off(4,e)}),D.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},D.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},m.on(2,(e=>{I=e.containerId||e,w.set(I,e),R.forEach((e=>{m.emit(0,e.content,e.options)})),R=[]})).on(3,(e=>{w.delete(e.containerId||e),0===w.size&&m.off(0).off(1).off(5)}))}},function(e){e.O(0,[7226,9774,2888,179],(function(){return t=7718,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.