1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7434],{42018:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/control-panel-41A3xB/dashboard/safety-tips",function(){return n(97650)}])},56771:function(e,t,n){"use strict";n.d(t,{w_:function(){return i}});var a=n(67294),s={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},l=a.createContext&&a.createContext(s),r=function(){return(r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},o=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);s<a.length;s++)0>t.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(n[a[s]]=e[a[s]]);return n};function i(e){return function(t){return a.createElement(c,r({attr:r({},e.attr)},t),function e(t){return t&&t.map(function(t,n){return a.createElement(t.tag,r({key:n},t.attr),e(t.child))})}(e.child))}}function c(e){var t=function(t){var n,s=e.attr,l=e.size,i=e.title,c=o(e,["attr","size","title"]),d=l||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),a.createElement("svg",r({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,s,c,{className:n,style:r(r({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),i&&a.createElement("title",null,i),e.children)};return void 0!==l?a.createElement(l.Consumer,null,function(e){return t(e)}):t(s)}},97650:function(e,t,n){"use strict";n.r(t);var a=n(85893),s=n(67294),l=n(9008),r=n.n(l),o=n(669),i=n(35898);n(37677);var c=n(22920),d=n(40898),u=n(94050),p=n(64749),m=n(27680),h=n(13246),f=n(41664),b=n.n(f);n(4641);var g=n(31190),x=n(38837),y=n(31955),v=n(22424);t.default=()=>{let[e,t]=(0,s.useState)(""),[n,l]=(0,s.useState)(""),[f,j]=(0,s.useState)(""),[w,N]=(0,s.useState)("text"),[E,T]=(0,s.useState)(null),[C,k]=(0,s.useState)(!1),[_,O]=(0,s.useState)(!1),[I,L]=(0,s.useState)(!1),[S,R]=(0,s.useState)([]),[z,P]=(0,s.useState)(""),[M,A]=(0,s.useState)(!1),B=e=>{P(e),A(!0)},F=()=>{P(""),A(!1)}
1,[D,$]=(0,s.useState)(!1),[Z,H]=(0,s.useState)(""),[q,Q]=(0,s.useState)(""),[V,W]=(0,s.useState)(""),[U,X]=(0,s.useState)(""),[G,Y]=(0,s.useState)(""),[K,J]=(0,s.useState)(null),[ee,et]=(0,s.useState)(!1),[en,ea]=(0,s.useState)(!1),es=(e,t,n,a,s)=>{H(v.Z.sanitize(e)),Q(v.Z.sanitize(t)),X(v.Z.sanitize(n)),W(v.Z.sanitize(a)),Y(v.Z.sanitize(s)),$(!0)},el=e=>{et(!1);let t=e.target.files[0];if(t){let n=t.name.split(".");if(n.length>2){et(!0),e.target.value="",J(null);return}let a=n.pop().toLowerCase();if(!er.includes(a)){et(!0),e.target.value="",J(null);return}t.size<=5242880?J(t):(et(!0),e.target.value="",J(null))}else J(null)};(0,s.useEffect)(()=>{em()},[]);let er=["jpg","jpeg","png","pdf","doc","docx"],eo=e=>{k(!1);let t=e.target.files[0];if(t){let n=t.name.split(".");if(n.length>2){k(!0),e.target.value="",T(null);return}let a=n.pop().toLowerCase();if(!er.includes(a)){k(!0),e.target.value="",T(null);return}t.size<=5242880?T(t):(k(!0),e.target.value="",T(null))}else T(null)},ei=()=>{c.Am.success("new record created successfully!",{position:"top-right",autoClose:2e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!1,progress:void 0})},ec=()=>{c.Am.success("Record Updated successfully!",{position:"top-right",autoClose:2e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!1,progress:void 0})},ed=()=>{c.Am.warn("oops something went wrong!",{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"dark"})},eu=()=>{c.Am.success("Record Deleted successfully!",{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"dark"})},ep=()=>{c.Am.warn("Fields are required!",{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"dark"})},em=async()=>{try{let e=await fetch("".concat("https://api.pcpc.gov.in","/api/get-alertwall-data?tag=safety"),{method:"GET"}),t=await e.json();t.records?R(t.records):ed()}catch(e){ed()}},eh=async e=>{F();let t=y.Z.get("token");try{let n=await fetch("".concat("https://api.pcpc.gov.in","/api/delete-alertwall-data?id=").concat(e),{method:"DELETE",headers:{Authorization:"Bearer ".concat(t)}}),a=await n.json();!0===a.success?(eu(),em()):ed()}catch(e){ed()}},ef=async()=>{if(!e||!n||("pdf"===w||"image"===w)&&!E||("link"===w||"youtube"===w)&&!f){ep();return}O(!0),L(!1);let a=y.Z.get("token"),s=new FormData;s.append("title",v.Z.sanitize(e)),s.append("title_in_marathi",v.Z.sanitize(n)),s.append("tag","safety"),s.append("file_type",v.Z.sanitize(w)),("link"===w||"youtube"===w)&&s.append("value",v.Z.sanitize(f)),("pdf"===w||"image"===w)&&s.append("file",E);try{let e=await fetch("".concat("https://api.pcpc.gov.in","/api/add-alertwall-data"),{method:"POST",body:s,headers:{Authorization:"Bearer ".concat(a)}});(await e.json()).success?(em(),O(!1),ei(),t(""),l(""),j(""),T(null)):(ed(),O(!1)),L(!0)}catch(e){ed(),O(!1),L(!0)}},eb=async()=>{if(!Z||!q||("link"===U||"youtube"===U)&&!V){ep();return}ea(!0);let e=y.Z.get("token"),t=new FormData;t.append("title",v.Z.sanitize(Z)),t.append("title_in_marathi",v.Z.sanitize(q)),t.append("file_type",v.Z.sanitize(U)),("link"===U||"youtube"===U)&&t.append("value",v.Z.sanitize(V)),("pdf"===U||"image"===U)&&K&&t.append("file",K);try{let n=await fetch("".concat("https://api.pcpc.gov.in","/api/update-alertwall-data?id=").concat(G),{method:"PATCH",body:t,headers:{Authorization:"Bearer ".concat(e)}});(await n.json()).success?(em(),ea(!1),ec(),J(null)):(ed(),ea(!1)),$(!1)}catch(e){ed(),ea(!1),$(!1)}};return(0,a.jsx)(x.Z,{children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r(),{children:(0,a.jsx)("title",{children:"Safety tips | Admin Dashboard"})}),(0,a.jsxs)("main",{className:"bg-gray-100",children:[(0,a.jsx)(o.Z,{}),(0,a.jsx)(c.Ix,{autoClose:2e3}),(0,a.jsxs)("div",{className:"flex flex-row",children:[(0,a.jsx)(i.Z,{}),(0,a.jsx)("div",{className:"hidden lg:block w-1/5"}),(0,a.jsxs)("div",{className:"w-full lg:w-4/5 mt-20 mx-5 bg-white shadow p-5",children:[(0,a.jsxs)("div",{className:"flex flex-row space-x-2 border-b pb-5",children:[(0,a.jsx)("button",{onClick:()=>L(!0),className:"bg-blue-500 text-white px-3 py-1 rounded-md hover:bg-blue-600",children:"Add Record"}),(0,a.jsx)("button",{onClick:()=>{t(""),l(""),j(""),T(null)},className:"bg-blue-500 text-white px-3 py-1 rounded-md hover:bg-blue-600",children:"Reset"}),(0,a.jsx)("button",{onClick:()=>{L(!1),t(""),l(""),j(""),T(null)},className:"bg-blue-500 text-white px-3 py-1 rounded-md hover:bg-blue-600",children:"Cancel"})]}),I&&(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsxs)("div",{className:"flex flex-col mx-3 my-1 space-y-1 mb-5",children:[(0,a.jsx)("label",{htmlFor:"title",className:"mb-1 text-base text-gray-800",children:"* Title"}),(0,a.jsx)("input",{type:"text",id:"title",name:"title",className:"text-base border-b border-b-black px-3 py-2 outline-none focus:border-purple-700 w-full",placeholder:"",value:e,onCh
1ange:e=>t(e.target.value)})]}),(0,a.jsxs)("div",{className:"flex flex-col mx-3 my-1 space-y-1 mb-5",children:[(0,a.jsx)("label",{htmlFor:"title",className:"mb-1 text-base text-gray-800",children:"* Title in Marathi"}),(0,a.jsx)("input",{type:"text",id:"title",name:"title",className:"text-base border-b border-b-black px-3 py-2 outline-none focus:border-purple-700 w-full",placeholder:"",value:n,onChange:e=>l(e.target.value)})]}),(0,a.jsxs)("div",{className:"flex flex-col mx-3 my-1 space-y-1 mb-5",children:[(0,a.jsx)("label",{htmlFor:"date",className:"mb-1 text-base text-gray-800",children:"* type"}),(0,a.jsxs)("select",{id:"locationSelect",name:"location",value:w,onChange:e=>N(e.target.value),className:"text-base border-b border-b-black px-3 py-2 outline-none focus:border-purple-700 w-40",children:[(0,a.jsx)("option",{value:"",children:"Select"}),(0,a.jsx)("option",{value:"text",children:"Text"}),(0,a.jsx)("option",{value:"link",children:"Link"}),(0,a.jsx)("option",{value:"youtube",children:"Youtube Video"}),(0,a.jsx)("option",{value:"pdf",children:"PDF"}),(0,a.jsx)("option",{value:"image",children:"Image"})]})]}),("link"===w||"youtube"===w)&&(0,a.jsxs)("div",{className:"flex flex-col mx-3 my-1 space-y-1 mb-5",children:[(0,a.jsx)("label",{htmlFor:"title",className:"mb-1 text-base text-gray-800",children:"* External link"}),(0,a.jsx)("input",{type:"text",id:"title",name:"title",className:"text-base border-b border-b-black px-3 py-2 outline-none focus:border-purple-700 w-full",placeholder:"",value:f,onChange:e=>j(e.target.value)})]}),("pdf"===w||"image"===w)&&(0,a.jsxs)("div",{className:"flex flex-col mx-3 my-1 space-y-1 mb-5",children:[(0,a.jsx)("label",{htmlFor:"file",className:"mb-1 text-base text-gray-800",children:"* File"}),(0,a.jsx)("input",{type:"file",id:"file",name:"pdf",accept:"pdf"===w?".pdf":".png, .jpg, .jpeg, .webp",className:"text-base border-b border-b-black px-3 py-2 outline-none focus:border-purple-700 w-60",placeholder:"Enter title",onChange:e=>eo(e)}),C&&(0,a.jsx)("p",{className:"text-red-600 text-sm",children:"File size exceeds the limit (5MB). Please choose a smaller file"})]}),(0,a.jsx)("div",{children:(0,a.jsx)("button",{onClick:ef,className:"bg-blue-500 text-white px-3 py-1 rounded-md hover:bg-blue-600",children:"Submit"})})]}),_&&(0,a.jsx)("div",{className:"flex justify-center items-center h-80",children:(0,a.jsx)(d.iT,{height:80,width:80,color:"#3B82F6",wrapperStyle:{},wrapperClass:"",visible:!0,ariaLabel:"oval-loading",secondaryColor:"#b5d1ff",strokeWidth:3,strokeWidthSecondary:3})}),(0,a.jsxs)("div",{className:"mb-52 w-full bg-white",children:[(0,a.jsx)("h1",{className:"font-semibold text-xl mt-10",children:"Safety Tips Records"}),(0,a.jsx)("div",{className:"overflow-x-auto max-w-full",children:(0,a.jsxs)("table",{className:"w-full min-w-[800px] mx-auto mt-5 text-left",children:[(0,a.jsxs)("tr",{className:"border flex flex-row justify-between bg-gray-100",children:[(0,a.jsx)("th",{className:"p-2 w-1/12 border-r",children:"Delete"}),(0,a.jsx)("th",{className:"p-2 w-1/12 border-r",children:"Edit"}),(0,a.jsx)("th",{className:"p-2 w-5/12 border-r",children:"Title"}),(0,a.jsx)("th",{className:"p-2 w-5/12 border-r",children:"Title in Marathi"}),(0,a.jsx)("th",{className:"p-2 w-1/12 border-r",children:"Value"})]}),S.map(e=>{let{title:t,title_in_marathi:n,file_type:s,value:l,_id:r}=e;return(0,a.jsxs)("tr",{className:"border flex flex-row justify-between",children:[(0,a.jsx)("td",{className:"p-1 w-1/12 border-r",children:(0,a.jsx)("button",{className:"bg-red-600 text-white p-3 rounded",onClick:()=>B(r),children:(0,a.jsx)(u.uaR,{})})}),(0,a.jsx)("td",{className:"p-1 w-1/12 border-r",children:(0,a.jsx)("button",{className:"bg-yellow-600 text-white p-3 rounded",onClick:()=>es(t,n,s,l,r),children:(0,a.jsx)(h.QML,{})})}),(0,a.jsx)("td",{className:"p-1 w-5/12 border-r",children:t}),(0,a.jsx)("td",{className:"p-1 w-5/12 border-r",children:n}),(0,a.jsxs)("td",{className:"p-1 w-1/12 border-r",children:[("pdf"===s||"image"===s)&&(0,a.jsx)(b(),{href:l,target:"_blank",rel:"noopener noreferrer",children:(0,a.jsx)("button",{className:"bg-yellow-600 text-white p-3 rounded",children:(0,a.jsx)(p.Ljp,{})})}),("link"===s||"youtube"===s)&&(0,a.jsx)(b(),{href:l,target:"_blank",rel:"noopener noreferrer",children:(0,a.jsx)("button",{className:"bg-yellow-600 text-white p-3 rounded",children:(0,a.jsx)(m.rs1,{})})}),"text"===s&&(0,a.jsx)("div",{children:l})]})]},r)})]})}),(0,a.jsx)(g.u,{open:M,onClose:F,center:!0,children:(0,a.jsxs)("div",{className:"px-5 pt-5",children:[(0,a.jsx)("p",{children:"Are you sure to delete the record ?"}),(0,a.jsxs)("div",{className:"flex flex-row justify-between mt-5",children:[(0,a.jsx)("div",{children:(0,a.jsx)("button",{className:"px-3 py-1 bg-white border rounded",onClick:F,children:"Cancel"})}),(0,a.jsx)("div",{children:(0,a.jsx)("button",{className:"px-3 py-1 bg-red-600 font-semibold text-white border rounded",onClick:()=>eh(z),children:"Delete"})})]})]})}),(0,a.jsx)(g.u,{open:D,onClose:()=>{$(!1)},center:!0,children:(0,a.jsxs)("div",{className:"pt-10 px-5 w-[500px]",children:[(0,a.jsxs)("div",{className:"flex flex-col mx-3 my-1 space-y-1 mb-5",children:[(0,a.jsx)("label",{htmlFor:"title",className:"mb-1 text-base text-gray-800",children:"* Title"}),(0,a.jsx)("input",{type:"text",id:"title",name:"title",className:"text-base border-b border-b-black px-3 py-2 outline-none focus:border-purple-700 w-full",placeholder:"Enter title",value:Z,onChange:e=>H(e.target.value)})]}),(0,a.jsxs)("div",{className:"flex flex-col mx-3 my-1 space-y-1 mb-5",children:[(0,a.jsx)("label",{htmlFor:"titleInMarathi",className:"mb-1 text-base text-gray-800",children:"* Title in Marathi"}),(0,a.jsx)("input",{type:"text",id:"titleInMarathi",name:"titleInMarathi",className:"text-base border-b border-b-black px-3 py-2 outline-none focus:border-purple-700 w-full",placeholder:"Enter title in Marathi",value:q,onChange:e=>Q(e.target.value)})]}),("link"===U||"youtube"===U)&&(0,a.jsxs)("div",{className:"flex flex-col mx-3 my-1 space-y-1 mb-5",children:[(0,a.jsx)("label",{htmlFor:"title",className:"mb-1 text-base text-gray-800",children:"* External link"}),(0,a.jsx)("input",{type:"text",id:"title",name:"title",className:"text-base border-b border-b-black px-3 py-2 outline-none focus:border-purple-700 w-full",placeholder:"",value:V,onChange:e=>W(e.target.value)})]}),(0,a.jsx)("div",{children:("pdf"===U||"image"===U)&&(0,a.jsxs)("div",{className:"py-5",children:[(0,a.jsx)("div",{className:"ml-5",children:"Old file"}),(0,a.jsx)(b(),{href:V,target:"_blank",rel:"noopener noreferrer",children:(0,a.jsx)("button",{className:"bg-yellow-600 text-white p-3 ml-5 rounded",children:(0,a.jsx)(p.Ljp,{})})})]})}),("pdf"===U||"image"===U)&&(0,a.jsxs)("div",{className:"flex flex-col mx-3 my-1 space-y-1 mb-5",children:[(0,a.jsx)("label",{htmlFor:"file",className:"mb-1 text-base text-gray-800",children:"New File (Optional)"}),(0,a.jsx)("input",{type:"file",id:"file",name:"pdf",accept:"pdf"===U?".pdf":".png, .jpg, .jpeg, .webp",className:"text-base border-b border-b-black px-3 py-2 outline-none focus:border-purple-700 w-60",placeholder:"Enter title",onCh
1ange:e=>el(e)}),ee&&(0,a.jsx)("p",{className:"text-red-600 text-sm",children:"File size exceeds the limit (5MB). Please choose a smaller file"})]}),(0,a.jsx)("div",{children:(0,a.jsxs)("button",{onClick:eb,className:"bg-blue-500 flex justify-center items-center text-white px-3 py-1 rounded-md hover:bg-blue-600",children:["Update Record",en&&(0,a.jsx)("div",{className:"ml-2",children:(0,a.jsx)(d.iT,{height:25,width:25,color:"#ffffff",wrapperStyle:{},wrapperClass:"",visible:!0,ariaLabel:"oval-loading",secondaryColor:"#b5d1ff",strokeWidth:5,strokeWidthSecondary:5})})]})})]})})]})]})]})]})]})})}},22920:function(e,t,n){"use strict";n.d(t,{Ix:function(){return w},Am:function(){return I}});var a=n(67294),s=function(){for(var e,t,n=0,a="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,a,s="";if("string"==typeof t||"number"==typeof t)s+=t;else if("object"==typeof t){if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(a=e(t[n]))&&(s&&(s+=" "),s+=a);else for(n in t)t[n]&&(s&&(s+=" "),s+=n)}return s}(e))&&(a&&(a+=" "),a+=t);return a};let l=e=>"number"==typeof e&&!isNaN(e),r=e=>"string"==typeof e,o=e=>"function"==typeof e,i=e=>r(e)||o(e)?e:null,c=e=>(0,a.isValidElement)(e)||r(e)||o(e)||l(e);function d(e){let{enter:t,exit:n,appendPosition:s=!1,collapse:l=!0,collapseDuration:r=300}=e;return function(e){let{children:o,position:i,preventExitTransition:c,done:d,nodeRef:u,isIn:p}=e,m=s?`${t}--${i}`:t,h=s?`${n}--${i}`:n,f=(0,a.useRef)(0);return(0,a.useLayoutEffect)(()=>{let e=u.current,t=m.split(" "),n=a=>{a.target===u.current&&(e.dispatchEvent(new Event("d")),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===f.current&&"animationcancel"!==a.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)},[]),(0,a.useEffect)(()=>{let e=u.current,t=()=>{e.removeEventListener("animationend",t),l?function(e,t,n){void 0===n&&(n=300);let{scrollHeight:a,style:s}=e;requestAnimationFrame(()=>{s.minHeight="initial",s.height=a+"px",s.transition=`all ${n}ms`,requestAnimationFrame(()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(t,n)})})}(e,d,r):d()};p||(c?t():(f.current=1,e.className+=` ${h}`,e.addEventListener("animationend",t)))},[p]),a.createElement(a.Fragment,null,o)}}function u(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}:{}}let p={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){let n=this.list.get(e).filter(e=>e!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){let 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=>{let n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},m=e=>{let{theme:t,type:n,...s}=e;return a.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 a.createElement(m,{...e},a.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 a.createElement(m,{...e},a.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 a.createElement(m,{...e},a.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 a.createElement(m,{...e},a.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 a.createElement("div",{className:"Toastify__spinner"})}};function f(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function b(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function g(e){let{closeToast:t,theme:n,ariaLabel:s="close"}=e;return a.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":s},a.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},a.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 x(e){let{delay:t,isRunning:n,closeToast:l,type:r="default",hide:i,className:c,style:d,controlledProgress:u,progress:p,rtl:m,isIn:h,theme:f}=e,b=i||u&&0===p,g={...d,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:b?0:1};u&&(g.transform=`scaleX(${p})`);let x=s("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${f}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":m}),y=o(c)?c({rtl:m,type:r,defaultClassName:x}):s(x,c);return a.createElement("div",{role:"progressbar","aria-hidden":b?"true":"false","aria-label":"notification timer",className:y,style:g,[u&&p>=1?"onTransitionEnd":"onAnimationEnd"]:u&&p<1?null:()=>
1{h&&l()}})}let y=e=>{let{isRunning:t,preventExitTransition:n,toastRef:l,eventHandlers:r}=function(e){let[t,n]=(0,a.useState)(!1),[s,l]=(0,a.useState)(!1),r=(0,a.useRef)(null),i=(0,a.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,c=(0,a.useRef)(e),{autoClose:d,pauseOnHover:u,closeToast:p,onClick:m,closeOnClick:h}=e;function g(t){if(e.draggable){"touchstart"===t.nativeEvent.type&&t.nativeEvent.preventDefault(),i.didMove=!1,document.addEventListener("mousemove",j),document.addEventListener("mouseup",w),document.addEventListener("touchmove",j),document.addEventListener("touchend",w);let n=r.current;i.canCloseOnClick=!0,i.canDrag=!0,i.boundingRect=n.getBoundingClientRect(),n.style.transition="",i.x=f(t.nativeEvent),i.y=b(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 x(t){if(i.boundingRect){let{top:n,bottom:a,left:s,right:l}=i.boundingRect;"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&i.x>=s&&i.x<=l&&i.y>=n&&i.y<=a?v():y()}}function y(){n(!0)}function v(){n(!1)}function j(n){let a=r.current;i.canDrag&&a&&(i.didMove=!0,t&&v(),i.x=f(n),i.y=b(n),i.delta="x"===e.draggableDirection?i.x-i.start:i.y-i.start,i.start!==i.x&&(i.canCloseOnClick=!1),a.style.transform=`translate${e.draggableDirection}(${i.delta}px)`,a.style.opacity=""+(1-Math.abs(i.delta/i.removalDistance)))}function w(){document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",j),document.removeEventListener("touchend",w);let t=r.current;if(i.canDrag&&i.didMove&&t){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance)return l(!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,a.useEffect)(()=>{c.current=e}),(0,a.useEffect)(()=>(r.current&&r.current.addEventListener("d",y,{once:!0}),o(e.onOpen)&&e.onOpen((0,a.isValidElement)(e.children)&&e.children.props),()=>{let e=c.current;o(e.onClose)&&e.onClose((0,a.isValidElement)(e.children)&&e.children.props)}),[]),(0,a.useEffect)(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||v(),window.addEventListener("focus",y),window.addEventListener("blur",v)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",y),window.removeEventListener("blur",v))}),[e.pauseOnFocusLoss]);let N={onMouseDown:g,onTouchStart:g,onMouseUp:x,onTouchEnd:x};return d&&u&&(N.onMouseEnter=v,N.onMouseLeave=y),h&&(N.onClick=e=>{m&&m(e),i.canCloseOnClick&&p()}),{playToast:y,pauseToast:v,isRunning:t,preventExitTransition:s,toastRef:r,eventHandlers:N}}(e),{closeButton:i,children:c,autoClose:d,onClick:u,type:p,hideProgressBar:m,closeToast:h,transition:y,position:v,className:j,style:w,bodyClassName:N,bodyStyle:E,progressClassName:T,progressStyle:C,updateId:k,role:_,progress:O,rtl:I,toastId:L,deleteToast:S,isIn:R,isLoading:z,iconOut:P,closeOnClick:M,theme:A}=e,B=s("Toastify__toast",`Toastify__toast-theme--${A}`,`Toastify__toast--${p}`,{"Toastify__toast--rtl":I},{"Toastify__toast--close-on-click":M}),F=o(j)?j({rtl:I,position:v,type:p,defaultClassName:B}):s(B,j),D=!!O||!d,$={closeToast:h,type:p,theme:A},Z=null;return!1===i||(Z=o(i)?i($):(0,a.isValidElement)(i)?(0,a.cloneElement)(i,$):g($)),a.createElement(y,{isIn:R,done:S,position:v,preventExitTransition:n,nodeRef:l},a.createElement("div",{id:L,onClick:u,className:F,...r,style:w,ref:l},a.createElement("div",{...R&&{role:_},className:o(N)?N({type:p}):s("Toastify__toast-body",N),style:E},null!=P&&a.createElement("div",{className:s("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!z})},P),a.createElement("div",null,c)),Z,a.createElement(x,{...k&&!D?{key:`pb-${k}`}:{},rtl:I,theme:A,delay:d,isRunning:t,isIn:R,closeToast:h,hide:m,type:p,style:C,className:T,controlledProgress:D,progress:O||0})))}
1,v=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},j=d(v("bounce",!0)),w=(d(v("slide",!0)),d(v("zoom")),d(v("flip")),(0,a.forwardRef)((e,t)=>{let{getToastToRender:n,containerRef:d,isToastActive:m}=function(e){let[,t]=(0,a.useReducer)(e=>e+1,0),[n,s]=(0,a.useState)([]),d=(0,a.useRef)(null),m=(0,a.useRef)(new Map).current,f=e=>-1!==n.indexOf(e),b=(0,a.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:f,getToast:e=>m.get(e)}).current;function g(e){let{containerId:t}=e,{limit:n}=b.props;!n||t&&b.containerId!==t||(b.count-=b.queue.length,b.queue=[])}function x(e){s(t=>null==e?[]:t.filter(t=>t!==e))}function y(){let{toastContent:e,toastProps:t,staleId:n}=b.queue.shift();j(e,t,n)}function v(e,n){var s,f;let{delay:g,staleId:v,...w}=n;if(!c(e)||!d.current||b.props.enableMultiContainer&&w.containerId!==b.props.containerId||m.has(w.toastId)&&null==w.updateId)return;let{toastId:N,updateId:E,data:T}=w,{props:C}=b,k=()=>x(N),_=null==E;_&&b.count++;let O={...C,style:C.toastStyle,key:b.toastKey++,...Object.fromEntries(Object.entries(w).filter(e=>{let[t,n]=e;return null!=n})),toastId:N,updateId:E,data:T,closeToast:k,isIn:!1,className:i(w.className||C.toastClassName),bodyClassName:i(w.bodyClassName||C.bodyClassName),progressClassName:i(w.progressClassName||C.progressClassName),autoClose:!w.isLoading&&(s=w.autoClose,f=C.autoClose,!1===s||l(s)&&s>0?s:f),deleteToast(){let e=u(m.get(N),"removed");
1m.delete(N),p.emit(4,e);let n=b.queue.length;if(b.count=null==N?b.count-b.displayedToast:b.count-1,b.count<0&&(b.count=0),n>0){let e=null==N?b.props.limit:1;if(1===n||1===e)b.displayedToast++,y();else{let t=e>n?n:e;b.displayedToast=t;for(let e=0;e<t;e++)y()}}else t()}};O.iconOut=function(e){let{theme:t,type:n,isLoading:s,icon:i}=e,c=null,d={theme:t,type:n};return!1===i||(o(i)?c=i(d):(0,a.isValidElement)(i)?c=(0,a.cloneElement)(i,d):r(i)||l(i)?c=i:s?c=h.spinner():n in h&&(c=h[n](d))),c}(O),o(w.onOpen)&&(O.onOpen=w.onOpen),o(w.onClose)&&(O.onClose=w.onClose),O.closeButton=C.closeButton,!1===w.closeButton||c(w.closeButton)?O.closeButton=w.closeButton:!0===w.closeButton&&(O.closeButton=!c(C.closeButton)||C.closeButton);let I=e;(0,a.isValidElement)(e)&&!r(e.type)?I=(0,a.cloneElement)(e,{closeToast:k,toastProps:O,data:T}):o(e)&&(I=e({closeToast:k,toastProps:O,data:T})),C.limit&&C.limit>0&&b.count>C.limit&&_?b.queue.push({toastContent:I,toastProps:O,staleId:v}):l(g)?setTimeout(()=>{j(I,O,v)},g):j(I,O,v)}function j(e,t,n){let{toastId:a}=t;n&&m.delete(n);let l={content:e,props:t};m.set(a,l),s(e=>[...e,a].filter(e=>e!==n)),p.emit(4,u(l,null==l.props.updateId?"added":"updated"))}return(0,a.useEffect)(()=>(b.containerId=e.containerId,p.cancelEmit(3).on(0,v).on(1,e=>d.current&&x(e)).on(5,g).emit(2,b),()=>{m.clear(),p.emit(3,b)}),[]),(0,a.useEffect)(()=>{b.props=e,b.isToastActive=f,b.displayedToast=n.length}),{getToastToRender:function(t){let n=new Map,a=Array.from(m.values());return e.newestOnTop&&a.reverse(),a.forEach(e=>{let{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:d,isToastActive:f}}(e),{className:f,style:b,rtl:g,containerId:x}=e;return(0,a.useEffect)(()=>{t&&(t.current=d.current)},[]),a.createElement("div",{ref:d,className:"Toastify",id:x},n((e,t)=>{let n=t.length?{...b}:{...b,pointerEvents:"none"};return a.createElement("div",{className:function(e){let t=s("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":g});return o(f)?f({position:e,rtl:g,defaultClassName:t}):s(t,i(f))}(e),style:n,key:`container-${e}`},t.map((e,n)=>{let{content:s,props:l}=e;return a.createElement(y,{...l,isIn:m(l.toastId),style:{...l.style,"--nth":n+1,"--len":t.length},key:`toast-${l.key}`},s)}))}))}));w.displayName="ToastContainer",w.defaultProps={position:"top-right",transition:j,autoClose:5e3,closeButton:g,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let N,E=new Map,T=[],C=1;function k(e,t){return E.size>0?p.emit(0,e,t):T.push({content:e,options:t}),t.toastId}function _(e,t){return{...t,type:t&&t.type||e,toastId:t&&(r(t.toastId)||l(t.toastId))?t.toastId:""+C++}}function O(e){return(t,n)=>k(t,_(e,n))}function I(e,t){return k(e,_("default",t))}I.loading=(e,t)=>
1k(e,_("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),I.promise=function(e,t,n){let a,{pending:s,error:l,success:i}=t;s&&(a=r(s)?I.loading(s,n):I.loading(s.render,{...n,...s}));let c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(e,t,s)=>{if(null==t)return void I.dismiss(a);let l={type:e,...c,...n,data:s},o=r(t)?{render:t}:t;return a?I.update(a,{...l,...o}):I(o.render,{...l,...o}),s},u=o(e)?e():e;return u.then(e=>d("success",i,e)).catch(e=>d("error",l,e)),u},I.success=O("success"),I.info=O("info"),I.error=O("error"),I.warning=O("warning"),I.warn=I.warning,I.dark=(e,t)=>k(e,_("default",{theme:"dark",...t})),I.dismiss=e=>{E.size>0?p.emit(1,e):T=T.filter(t=>null!=e&&t.options.toastId!==e)},I.clearWaitingQueue=function(e){return void 0===e&&(e={}),p.emit(5,e)},I.isActive=e=>{let t=!1;return E.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},I.update=function(e,t){void 0===t&&(t={}),setTimeout(()=>{let n=function(e,t){let{containerId:n}=t,a=E.get(n||N);return a&&a.getToast(e)}(e,t);if(n){let{props:a,content:s}=n,l={delay:100,...a,...t,toastId:t.toastId||e,updateId:""+C++};l.toastId!==e&&(l.staleId=e);let r=l.render||s;delete l.render,k(r,l)}},0)},I.done=e=>{I.update(e,{progress:1})},I.onChange=e=>(p.on(4,e),()=>{p.off(4,e)}),I.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"},I.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},p.on(2,e=>{N=e.containerId||e,E.set(N,e),T.forEach(e=>{p.emit(0,e.content,e.options)}),T=[]}).on(3,e=>{E.delete(e.containerId||e),0===E.size&&p.off(0).off(1).off(5)})}},function(e){e.O(0,[4617,3874,9866,5937,9814,1339,1190,3362,2888,9774,179],function(){return e(e.s=42018)}),_N_E=e.O()}]);
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.