diff --git a/client/dist/assets/ChatPage-4a812c6c.js b/client/dist/assets/ChatPage-3cc6f6c5.js similarity index 99% rename from client/dist/assets/ChatPage-4a812c6c.js rename to client/dist/assets/ChatPage-3cc6f6c5.js index e46a202..3426ea8 100644 --- a/client/dist/assets/ChatPage-4a812c6c.js +++ b/client/dist/assets/ChatPage-3cc6f6c5.js @@ -1,4 +1,4 @@ -import{Z as hooks,j as jsxRuntimeExports,C as CONSTANTS_COMMON,u as useSelector,r as reactExports,a as useDispatch,Q,T as TOAST_ACTION,v as setSelectedChat,_ as setFetchUserChatsAgain,c as react,$ as ChatLoading,a0 as searchUsers,k,A as AiOutlineCloseCircle,L as Link,a1 as ConfirmDeleteToast,a2 as setChats,a3 as commonjsGlobal,a4 as getDefaultExportFromCjs,a5 as React,a6 as getAllMessagesFromChat,E as classnames,a7 as InputEmojiWithRef,a8 as ImAttachment,a9 as sendMessageWithImg,aa as sendMessage,ab as setJoinVideoRoom,ac as FaArrowLeft,w as setOpenVideoCall,t as MdVideoCall,ad as SlOptionsVertical,ae as BiSearchAlt,af as AiOutlinePlusCircle,n as useNavigate,d as getUserInfo,s as store,e as setCredentials,U as isAxiosError}from"./index-0b7b17fe.js";import{u as updateGroupChat,a as addGroupDp,r as removeFromGroup,g as groupRemove,f as fetchOtherUserChat,c as createGroupChat,b as fetchChats}from"./index-cf9a37b0.js";const getSender=(e,r)=>r[0]._id===e?r[1]:r[0],groupByDate=e=>e.reduce((r,s)=>{const d=hooks(s.createdAt).format("LL");return r[d]||(r[d]=[]),r[d].push(s),r},{}),truncate=(e,r)=>{if(!(!e||typeof e!="string"))return e.length<=r?e:e.slice(0,r)+"..."},UserCard=({user:e})=>jsxRuntimeExports.jsx("div",{className:`flex w-full px-4 py-2 mb-5 items-center justify-between transition duration-100 +import{Z as hooks,j as jsxRuntimeExports,C as CONSTANTS_COMMON,u as useSelector,r as reactExports,a as useDispatch,Q,T as TOAST_ACTION,v as setSelectedChat,_ as setFetchUserChatsAgain,c as react,$ as ChatLoading,a0 as searchUsers,k,A as AiOutlineCloseCircle,L as Link,a1 as ConfirmDeleteToast,a2 as setChats,a3 as commonjsGlobal,a4 as getDefaultExportFromCjs,a5 as React,a6 as getAllMessagesFromChat,E as classnames,a7 as InputEmojiWithRef,a8 as ImAttachment,a9 as sendMessageWithImg,aa as sendMessage,ab as setJoinVideoRoom,ac as FaArrowLeft,w as setOpenVideoCall,t as MdVideoCall,ad as SlOptionsVertical,ae as BiSearchAlt,af as AiOutlinePlusCircle,n as useNavigate,d as getUserInfo,s as store,e as setCredentials,U as isAxiosError}from"./index-f946f455.js";import{u as updateGroupChat,a as addGroupDp,r as removeFromGroup,g as groupRemove,f as fetchOtherUserChat,c as createGroupChat,b as fetchChats}from"./index-fece1ea8.js";const getSender=(e,r)=>r[0]._id===e?r[1]:r[0],groupByDate=e=>e.reduce((r,s)=>{const d=hooks(s.createdAt).format("LL");return r[d]||(r[d]=[]),r[d].push(s),r},{}),truncate=(e,r)=>{if(!(!e||typeof e!="string"))return e.length<=r?e:e.slice(0,r)+"..."},UserCard=({user:e})=>jsxRuntimeExports.jsx("div",{className:`flex w-full px-4 py-2 mb-5 items-center justify-between transition duration-100 ease-in-out rounded-lg shadow-md hover:scale-95 hover:rounded-lg cursor-pointer bg-[#E8E8E8] hover:bg-blue-gray-600 group`,children:jsxRuntimeExports.jsxs("div",{className:"s) => setLimt-3 flex items-center space-x-2",children:[jsxRuntimeExports.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:e.dp?e.dp:CONSTANTS_COMMON.DEFAULT_IMG,alt:"user dp"}),jsxRuntimeExports.jsxs("span",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{className:"text-[14px] font-medium text-gray-900 group-hover:text-white group-hover:font-bold",children:e.name}),jsxRuntimeExports.jsxs("span",{className:"text-[11px] font-medium text-gray-500 group-hover:text-white group-hover:font-bold",children:["@",e.username]})]})]})}),AdminGroupEdit=({updateGroup:e,setUpdateGroup:r,handleOpenOptions:s,setDisableUpdate:d,socket:f})=>{const _=useSelector(cE=>cE.chat.selectedChat),C=useSelector(cE=>{var _E;return(_E=cE.auth.user)==null?void 0:_E._id}),[P,x]=reactExports.useState((_==null?void 0:_.chatName)??""),[B,_t]=reactExports.useState(""),[ue,Wt]=reactExports.useState((_==null?void 0:_.users)??[]),[_e,_i]=reactExports.useState(),[Ei,_a]=reactExports.useState([]),[Di,_o]=reactExports.useState(!1),[_s,_c]=reactExports.useState(new FormData),[_m,Qm]=reactExports.useState(new FormData),tE=useDispatch();reactExports.useEffect(()=>{(_==null?void 0:_.chatName)===P&&(_==null?void 0:_.users)===ue?d(!0):d(!1),_e&&d(!1)},[P,ue,_e]),reactExports.useEffect(()=>{let cE;const _E=async()=>{try{_o(!0);const iE=await searchUsers(B);_o(!1),_a(iE.users)}catch{Q.dismiss(),Q.error("Failed to load search results",TOAST_ACTION)}};return B.length>0&&(cE=setTimeout(_E,500)),()=>{clearTimeout(cE)}},[B]),reactExports.useEffect(()=>{e&&aE()},[r,e]);const aE=async()=>{if(P.trim().length===0&&ue.length===0){Q.dismiss(),Q.error("Group name and members cannot be empty",TOAST_ACTION);return}if(P!==(_==null?void 0:_.chatName)&&_s.append("chatName",P),ue!==(_==null?void 0:_.users)){const cE=ue.map(_E=>_E._id);_s.append("users",JSON.stringify(cE))}_e&&_m.append("groupDp",_e);try{let cE;Q.info("Updating group...",{...TOAST_ACTION,autoClose:!1}),(P!==(_==null?void 0:_.chatName)||ue!==(_==null?void 0:_.users))&&(cE=_&&await updateGroupChat(_==null?void 0:_._id,_s)),_e&&(cE=_&&await addGroupDp(_._id,_m)),cE&&tE(setSelectedChat(cE.groupChat)),tE(setFetchUserChatsAgain(!0)),cE&&f.emit("group updation",cE.groupChat),Q.dismiss(),r(!1),Q.success("Group updated successfully",TOAST_ACTION),Qm(new FormData),_c(new FormData),s()}catch{Q.dismiss(),Q.error("Failed to update group",TOAST_ACTION)}},CE=cE=>{Wt(ue.filter(_E=>_E!==cE))},lE=cE=>{if(ue.some(_E=>_E._id===cE._id)){Q.dismiss(),Q.warn("User already added",TOAST_ACTION);return}else Wt([...ue,cE])},gE=cE=>{cE.target.files&&cE.target.files.length>0&&_i(cE.target.files[0])};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(react.Typography,{className:"-mb-2",variant:"h6",children:"Add Image"}),jsxRuntimeExports.jsxs("div",{className:"mx-auto",children:[jsxRuntimeExports.jsx("input",{type:"file",accept:"image/*",id:"newGroup-image",className:"hidden",onChange:gE}),jsxRuntimeExports.jsx("label",{htmlFor:"newGroup-image",children:jsxRuntimeExports.jsx("img",{src:_e instanceof File?URL.createObjectURL(_e):_==null?void 0:_.groupDp,className:"h-36 w-36 rounded-full border-4 border-gray-500 border-dashed bg-white m-2 flex items-center justify-center cursor-pointer p-2"})})]}),jsxRuntimeExports.jsx(react.Typography,{className:"-mb-2",variant:"h6",children:"Group Name"}),jsxRuntimeExports.jsx(react.Input,{label:"Enter the name",size:"lg",value:P,onChange:cE=>x(cE.target.value)}),jsxRuntimeExports.jsx(react.Typography,{className:"-mb-2",variant:"h6",children:"Add Members"}),jsxRuntimeExports.jsx(react.Input,{label:"Enter the members",size:"lg",onChange:cE=>_t(cE.target.value)}),jsxRuntimeExports.jsx("div",{className:"max-h-36 overflow-y-scroll flex items-center justify-center flex-wrap gap-2 no-scrollbar",children:ue.map(cE=>cE._id!==C&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(react.Chip,{variant:"ghost",animate:{mount:{y:0},unmount:{y:50}},value:cE.name,onClose:()=>CE(cE),className:"rounded-full",color:"green"})},`selected-${cE._id}`))}),Di?jsxRuntimeExports.jsx("div",{className:"overflow-y-hidden flex flex-col gap-4",children:Array(3).fill(0).map((cE,_E)=>jsxRuntimeExports.jsx(ChatLoading,{},_E))}):jsxRuntimeExports.jsx("div",{className:"max-h-64 overflow-y-scroll overflow-x-hidden no-scrollbar mx-4",children:Ei==null?void 0:Ei.slice(0,4).map(cE=>cE._id!==C&&jsxRuntimeExports.jsx("div",{className:"w-full",onClick:()=>lE(cE),children:jsxRuntimeExports.jsx(UserCard,{user:cE})},`search-${cE._id}`))})]})},OptionsDialog=({openOptions:e,handleOpenOptions:r,socket:s})=>{const d=useSelector(Ei=>Ei.chat.selectedChat),f=useSelector(Ei=>{var _a;return(_a=Ei.auth.user)==null?void 0:_a._id}),_=useSelector(Ei=>Ei.chat.chats),[C,P]=reactExports.useState(!1),[x,B]=reactExports.useState(!1),_t=useDispatch(),ue=async()=>{Q.dismiss(),Q(jsxRuntimeExports.jsx(ConfirmDeleteToast,{onDelete:Wt,message:"Are you sure you want to leave this Group?"}),{...TOAST_ACTION,closeButton:!1})},Wt=async()=>{const Ei=d&&f&&await removeFromGroup(d==null?void 0:d._id,f);Ei&&(Ei==null?void 0:Ei.status)==="success"&&(Q.dismiss(),_t(setSelectedChat("")),_t(setChats(_.filter(_a=>_a._id!==(d==null?void 0:d._id)))),Q.success("Successfully left the group"),r())},_e=async()=>{Q.dismiss(),Q(jsxRuntimeExports.jsx(ConfirmDeleteToast,{onDelete:_i,message:"Are you sure you want to delete this group?"}),{...TOAST_ACTION,closeButton:!1})},_i=async()=>{const Ei=d&&await groupRemove(d==null?void 0:d._id);Ei&&(Ei==null?void 0:Ei.status)==="success"&&(Q.dismiss(),_t(setSelectedChat("")),_t(setChats(_.filter(_a=>_a._id!==(d==null?void 0:d._id)))),Q.success("Successfully deleted the group"),r())};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(react.Dialog,{size:"xs",dismiss:{enabled:!1},open:e,handler:r,className:"bg-transparent shadow-none",children:[jsxRuntimeExports.jsx(k,{}),jsxRuntimeExports.jsxs(react.Card,{className:"mx-auto w-full ",children:[jsxRuntimeExports.jsxs(react.CardBody,{className:"flex flex-col gap-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-medium text-black",children:d!=null&&d.isGroupChat?d.chatName:"User Info"}),jsxRuntimeExports.jsx(AiOutlineCloseCircle,{className:"text-3xl cursor-pointer text-black",onClick:Ei=>{Ei.stopPropagation(),r()}})]}),d&&!d.isGroupChat?jsxRuntimeExports.jsxs("div",{className:"relative h-60 md:h-80 w-60 md:w-80 rounded-md mx-auto overflow-hidden",children:[jsxRuntimeExports.jsx("img",{src:f&&getSender(f,d.users).dp?getSender(f,d.users).dp:CONSTANTS_COMMON.DEFAULT_IMG,alt:"user dp",className:"z-0 h-full w-full rounded-md object-cover"}),jsxRuntimeExports.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-gray-900 to-transparent"}),jsxRuntimeExports.jsxs("div",{className:"absolute bottom-4 left-4 text-left",children:[jsxRuntimeExports.jsx("h1",{className:"text-lg font-semibold text-white",children:f&&getSender(f,d.users).name}),jsxRuntimeExports.jsxs("h1",{className:"text-xs font-light text-white",children:["@",f&&getSender(f,d.users).username]}),jsxRuntimeExports.jsx(Link,{to:`/profile/${f&&getSender(f,d.users)._id}`,children:jsxRuntimeExports.jsx("button",{className:"mt-2 inline-flex cursor-pointer items-center text-sm font-semibold text-white",children:"View Profile →"})})]})]}):(d==null?void 0:d.groupAdmin._id)===f?jsxRuntimeExports.jsx(AdminGroupEdit,{updateGroup:C,setUpdateGroup:P,handleOpenOptions:r,setDisableUpdate:B,socket:s}):jsxRuntimeExports.jsxs("div",{className:"max-h-96 overflow-y-scroll overflow-x-hidden no-scrollbar mx-4",children:[jsxRuntimeExports.jsx("img",{src:d==null?void 0:d.groupDp,className:"h-48 w-48 rounded-full border-4 border-gray-500 border-dashed bg-white mx-auto flex items-center justify-center p-2"}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[jsxRuntimeExports.jsx("h1",{className:"text-lg font-medium",children:"Admin"}),jsxRuntimeExports.jsx("span",{className:`inline-flex items-center justify-center px-2 py-1 mr-2 text-xs font-bold leading-none text-white bg-socioverse-400 rounded-full`,children:d&&(d==null?void 0:d.users.filter(Ei=>Ei._id===d.groupAdmin._id).length)})]}),d==null?void 0:d.users.map(Ei=>Ei._id===d.groupAdmin._id&&jsxRuntimeExports.jsx(UserCard,{user:Ei},Ei._id)),jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[jsxRuntimeExports.jsx("h1",{className:"text-lg font-medium",children:"Members"}),jsxRuntimeExports.jsx("span",{className:`inline-flex items-center justify-center px-2 py-1 mr-2 text-xs diff --git a/client/dist/assets/HomePage-1d8eb5c7.js b/client/dist/assets/HomePage-59e1c019.js similarity index 99% rename from client/dist/assets/HomePage-1d8eb5c7.js rename to client/dist/assets/HomePage-59e1c019.js index 9a7bee9..3e507a0 100644 --- a/client/dist/assets/HomePage-1d8eb5c7.js +++ b/client/dist/assets/HomePage-59e1c019.js @@ -1,3 +1,3 @@ -import{u as H,r as n,a as O,g as te,b as ae,j as e,k as E,H as ge,L as B,C as A,R as ne,c as l,A as V,d as J,s as X,e as Y,f as pe,Q as w,T as M,h as fe,i as je,l as ve,m as be,n as Z,o as Q,p as we,M as le,q as re,B as G,t as W,v as oe,w as Ne,G as ye,x as ke,y as Ce,z as Se,D as _e,E as ie,F as Ue,I as Ie,J as De,K as Fe,N as Me,O as Ae,P as Le,S as Be,U as me,V as ce,W as Oe,X as Te,Y as Ee}from"./index-0b7b17fe.js";import{T as de}from"./index.esm-5bd1b457.js";import{f as xe}from"./index-cf9a37b0.js";import{u as He,I as Ve}from"./ImageCropper-a7aa6f9b.js";function ze({handleFollowingAdd:c,handleFollowingRemove:f}){const g=H(t=>{var d;return(d=t==null?void 0:t.auth)==null?void 0:d.user}),[h,j]=n.useState(null),[a,p]=n.useState(),[u,o]=n.useState([]),[b,x]=n.useState(!1),S=()=>x(!b),y=O();n.useEffect(()=>{const t=async()=>{if(!g){const r=await d();j(r)}},d=async()=>{const{user:r}=await J(),{accessToken:m}=X.getState().auth;return y(Y({user:r,accessToken:m})),r};t(),te().then(r=>{r.suggestions.length===0?ae().then(m=>o(m.users)):o(r.suggestions)})},[]),n.useEffect(()=>{g&&p(g.following)},[g]);const _=(t,d)=>{pe(t).then(()=>{c(!0),w.dismiss(),w.success(`Following ${d}`,{...M,position:"bottom-left"})}),!(a!=null&&a.includes(t))&&p([...a,t]),y(fe(t))},U=(t,d)=>{je(t).then(()=>{f(!0),w.dismiss(),w.success(`Unfollowed ${d}`,{...M,position:"bottom-left"})}),p(a==null?void 0:a.filter(r=>r!==t)),y(ve(t))},k=()=>{te().then(t=>{t.suggestions.length===0?ae().then(d=>o(d.users)):o(t.suggestions)})};return e.jsxs(e.Fragment,{children:[e.jsx(E,{}),e.jsx("div",{className:"flex max-w-2xl flex-col rounded-lg border shadow-lg p-2",children:e.jsx("div",{children:e.jsx("div",{className:"p-4",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"text-2xl",children:e.jsx(ge,{})}),e.jsx("h1",{className:"inline-flex items-center text-lg font-semibold",children:"People you may know"})]}),e.jsx("div",{className:"flex flex-col gap-2 ",children:u.slice(0,5).map(t=>{var d,r;return e.jsxs("div",{className:"flex p-2 items-center justify-between transition duration-100 ease-in-out hover:shadow-md hover:scale-105 hover:rounded-lg",children:[e.jsx(B,{to:`/profile/${t._id}`,children:e.jsxs("div",{className:"s) => setLimt-3 flex items-center space-x-2",children:[e.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:t.dp?t.dp:A.DEFAULT_IMG,alt:"user dp"}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:t==null?void 0:t.name}),e.jsx("span",{className:"text-[11px] font-medium text-gray-500",children:t.username?`@${t.username}`:"@ -"})]})]})}),a!=null&&a.includes(t._id)||g&&((d=t.followers)!=null&&d.includes(g._id))||h&&((r=t.followers)!=null&&r.includes(h._id))?e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-500 rounded-full cursor-pointer border-2 border-blue-gray-700 hover:border-red-700 hover:bg-white hover:border-3 group",onClick:()=>U(t._id,t.name),children:e.jsx(ne,{className:"text-xl text-white group-hover:text-red-500"})}):e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:bg-white hover:border-3 group",onClick:()=>_(t._id,t.name),children:e.jsx(de,{className:"text-xl text-socioverse-500 group-hover:text-blue-gray-500"})})]},t._id)})}),e.jsx("div",{className:"inline-block",children:e.jsxs(l.Button,{variant:"text",className:"flex items-center gap-2 text-black capitalize shadow-none text-sm font-semibold",onClick:()=>{k(),S()},disabled:u.length<=5,children:["View More",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"h-4 w-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3"})})]})})]})})})}),e.jsxs(l.Dialog,{open:b,size:"xs",handler:S,animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[e.jsx(l.DialogHeader,{children:e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"People you may know"}),e.jsx("div",{children:e.jsx(V,{className:"text-3xl cursor-pointer",onClick:S})})]})}),e.jsx(E,{}),e.jsx(l.DialogBody,{className:"flex flex-col gap-4 lg:mx-4 lg:my-0 m-2 max-h-[20.5rem] overflow-y-scroll",children:e.jsx("div",{className:"flex flex-col gap-2 ",children:u.map(t=>{var d,r;return e.jsxs("div",{className:"flex p-2 items-center justify-between transition duration-100 ease-in-out hover:shadow-md hover:scale-105 hover:rounded-lg",children:[e.jsx(B,{to:`/profile/${t._id}`,children:e.jsxs("div",{className:"mt-3 flex items-center space-x-2",children:[e.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:t.dp?t.dp:A.DEFAULT_IMG,alt:"user dp"}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:t==null?void 0:t.name}),e.jsx("span",{className:"text-[11px] font-medium text-gray-500",children:t.username?`@${t.username}`:"@ -"})]})]})}),a!=null&&a.includes(t._id)||g&&((d=t.followers)!=null&&d.includes(g._id))||h&&((r=t.followers)!=null&&r.includes(h._id))?e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-500 rounded-full cursor-pointer border-2 border-blue-gray-700 hover:border-red-700 hover:bg-white hover:border-3 group",onClick:()=>U(t._id,t.name),children:e.jsx(ne,{className:"text-xl text-white group-hover:text-red-500"})}):e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:bg-white hover:border-3 group",onClick:()=>_(t._id,t.name),children:e.jsx(de,{className:"text-xl text-socioverse-500 group-hover:text-blue-gray-500"})})]},t._id)})})}),e.jsx(l.DialogFooter,{children:void 0})]})]})}function $e({newFollowing:c,handleFollowingAdd:f,removeFollowing:g,handleFollowingRemove:h,socket:j}){const a=O(),p=be(),u=Z(),[o,b]=n.useState([]),[x,S]=n.useState([]),[y,_]=n.useState(!1),[U,k]=n.useState(!1),t=()=>_(!y),d=()=>k(!U),r=H(s=>s.auth.user);n.useEffect(()=>{r&&(Q(r._id).then(s=>{b(s.following)}),we(r._id).then(s=>{S(s.followers)}))},[r]);const[m,L]=n.useState(1),T=s=>L(m===s?0:s);c&&(r&&Q(r._id).then(s=>{b(s.following)}),f(!1)),g&&(r&&Q(r._id).then(s=>{b(s.following)}),h(!1));const C=async s=>{const I=await xe(s);a(oe(I.chat)),p.pathname!=="/message"&&u("/message")},F=async s=>{const I=await xe(s);a(oe(I.chat)),j&&j.emit("call-user",r,I.chat),a(Ne(!0)),p.pathname!=="/message"&&u("/message")};return e.jsxs(e.Fragment,{children:[e.jsxs(l.Accordion,{open:m===2,className:"mb-5 rounded-lg border px-2 shadow-lg",children:[e.jsxs("div",{onClick:()=>T(2),className:`border-b-0 transition-colors flex items-center justify-between p-4 cursor-pointer +import{u as H,r as n,a as O,g as te,b as ae,j as e,k as E,H as ge,L as B,C as A,R as ne,c as l,A as V,d as J,s as X,e as Y,f as pe,Q as w,T as M,h as fe,i as je,l as ve,m as be,n as Z,o as Q,p as we,M as le,q as re,B as G,t as W,v as oe,w as Ne,G as ye,x as ke,y as Ce,z as Se,D as _e,E as ie,F as Ue,I as Ie,J as De,K as Fe,N as Me,O as Ae,P as Le,S as Be,U as me,V as ce,W as Oe,X as Te,Y as Ee}from"./index-f946f455.js";import{T as de}from"./index.esm-57e7230c.js";import{f as xe}from"./index-fece1ea8.js";import{u as He,I as Ve}from"./ImageCropper-e8994465.js";function ze({handleFollowingAdd:c,handleFollowingRemove:f}){const g=H(t=>{var d;return(d=t==null?void 0:t.auth)==null?void 0:d.user}),[h,j]=n.useState(null),[a,p]=n.useState(),[u,o]=n.useState([]),[b,x]=n.useState(!1),S=()=>x(!b),y=O();n.useEffect(()=>{const t=async()=>{if(!g){const r=await d();j(r)}},d=async()=>{const{user:r}=await J(),{accessToken:m}=X.getState().auth;return y(Y({user:r,accessToken:m})),r};t(),te().then(r=>{r.suggestions.length===0?ae().then(m=>o(m.users)):o(r.suggestions)})},[]),n.useEffect(()=>{g&&p(g.following)},[g]);const _=(t,d)=>{pe(t).then(()=>{c(!0),w.dismiss(),w.success(`Following ${d}`,{...M,position:"bottom-left"})}),!(a!=null&&a.includes(t))&&p([...a,t]),y(fe(t))},U=(t,d)=>{je(t).then(()=>{f(!0),w.dismiss(),w.success(`Unfollowed ${d}`,{...M,position:"bottom-left"})}),p(a==null?void 0:a.filter(r=>r!==t)),y(ve(t))},k=()=>{te().then(t=>{t.suggestions.length===0?ae().then(d=>o(d.users)):o(t.suggestions)})};return e.jsxs(e.Fragment,{children:[e.jsx(E,{}),e.jsx("div",{className:"flex max-w-2xl flex-col rounded-lg border shadow-lg p-2",children:e.jsx("div",{children:e.jsx("div",{className:"p-4",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"text-2xl",children:e.jsx(ge,{})}),e.jsx("h1",{className:"inline-flex items-center text-lg font-semibold",children:"People you may know"})]}),e.jsx("div",{className:"flex flex-col gap-2 ",children:u.slice(0,5).map(t=>{var d,r;return e.jsxs("div",{className:"flex p-2 items-center justify-between transition duration-100 ease-in-out hover:shadow-md hover:scale-105 hover:rounded-lg",children:[e.jsx(B,{to:`/profile/${t._id}`,children:e.jsxs("div",{className:"s) => setLimt-3 flex items-center space-x-2",children:[e.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:t.dp?t.dp:A.DEFAULT_IMG,alt:"user dp"}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:t==null?void 0:t.name}),e.jsx("span",{className:"text-[11px] font-medium text-gray-500",children:t.username?`@${t.username}`:"@ -"})]})]})}),a!=null&&a.includes(t._id)||g&&((d=t.followers)!=null&&d.includes(g._id))||h&&((r=t.followers)!=null&&r.includes(h._id))?e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-500 rounded-full cursor-pointer border-2 border-blue-gray-700 hover:border-red-700 hover:bg-white hover:border-3 group",onClick:()=>U(t._id,t.name),children:e.jsx(ne,{className:"text-xl text-white group-hover:text-red-500"})}):e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:bg-white hover:border-3 group",onClick:()=>_(t._id,t.name),children:e.jsx(de,{className:"text-xl text-socioverse-500 group-hover:text-blue-gray-500"})})]},t._id)})}),e.jsx("div",{className:"inline-block",children:e.jsxs(l.Button,{variant:"text",className:"flex items-center gap-2 text-black capitalize shadow-none text-sm font-semibold",onClick:()=>{k(),S()},disabled:u.length<=5,children:["View More",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"h-4 w-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3"})})]})})]})})})}),e.jsxs(l.Dialog,{open:b,size:"xs",handler:S,animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[e.jsx(l.DialogHeader,{children:e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"People you may know"}),e.jsx("div",{children:e.jsx(V,{className:"text-3xl cursor-pointer",onClick:S})})]})}),e.jsx(E,{}),e.jsx(l.DialogBody,{className:"flex flex-col gap-4 lg:mx-4 lg:my-0 m-2 max-h-[20.5rem] overflow-y-scroll",children:e.jsx("div",{className:"flex flex-col gap-2 ",children:u.map(t=>{var d,r;return e.jsxs("div",{className:"flex p-2 items-center justify-between transition duration-100 ease-in-out hover:shadow-md hover:scale-105 hover:rounded-lg",children:[e.jsx(B,{to:`/profile/${t._id}`,children:e.jsxs("div",{className:"mt-3 flex items-center space-x-2",children:[e.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:t.dp?t.dp:A.DEFAULT_IMG,alt:"user dp"}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:t==null?void 0:t.name}),e.jsx("span",{className:"text-[11px] font-medium text-gray-500",children:t.username?`@${t.username}`:"@ -"})]})]})}),a!=null&&a.includes(t._id)||g&&((d=t.followers)!=null&&d.includes(g._id))||h&&((r=t.followers)!=null&&r.includes(h._id))?e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-500 rounded-full cursor-pointer border-2 border-blue-gray-700 hover:border-red-700 hover:bg-white hover:border-3 group",onClick:()=>U(t._id,t.name),children:e.jsx(ne,{className:"text-xl text-white group-hover:text-red-500"})}):e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:bg-white hover:border-3 group",onClick:()=>_(t._id,t.name),children:e.jsx(de,{className:"text-xl text-socioverse-500 group-hover:text-blue-gray-500"})})]},t._id)})})}),e.jsx(l.DialogFooter,{children:void 0})]})]})}function $e({newFollowing:c,handleFollowingAdd:f,removeFollowing:g,handleFollowingRemove:h,socket:j}){const a=O(),p=be(),u=Z(),[o,b]=n.useState([]),[x,S]=n.useState([]),[y,_]=n.useState(!1),[U,k]=n.useState(!1),t=()=>_(!y),d=()=>k(!U),r=H(s=>s.auth.user);n.useEffect(()=>{r&&(Q(r._id).then(s=>{b(s.following)}),we(r._id).then(s=>{S(s.followers)}))},[r]);const[m,L]=n.useState(1),T=s=>L(m===s?0:s);c&&(r&&Q(r._id).then(s=>{b(s.following)}),f(!1)),g&&(r&&Q(r._id).then(s=>{b(s.following)}),h(!1));const C=async s=>{const I=await xe(s);a(oe(I.chat)),p.pathname!=="/message"&&u("/message")},F=async s=>{const I=await xe(s);a(oe(I.chat)),j&&j.emit("call-user",r,I.chat),a(Ne(!0)),p.pathname!=="/message"&&u("/message")};return e.jsxs(e.Fragment,{children:[e.jsxs(l.Accordion,{open:m===2,className:"mb-5 rounded-lg border px-2 shadow-lg",children:[e.jsxs("div",{onClick:()=>T(2),className:`border-b-0 transition-colors flex items-center justify-between p-4 cursor-pointer `,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h1",{className:"text-lg font-semibold",children:"Followers"}),e.jsx(l.Chip,{value:x==null?void 0:x.length,size:"sm",variant:"ghost",color:"blue-gray",className:"rounded-full"})]}),e.jsx("div",{className:"text-2xl",children:m===2?e.jsx(le,{}):e.jsx(re,{})})]}),e.jsx(l.AccordionBody,{className:"pt-0 text-base font-normal",children:e.jsxs("div",{className:"flex flex-col gap-4 px-4",children:[e.jsx("div",{className:"flex flex-col gap-2 ",children:x!=null&&x.length&&x?x.slice(0,5).map((s,I)=>e.jsxs("div",{className:"flex p-2 items-center justify-between transition duration-100 ease-in-out rounded-lg hover:shadow-md hover:scale-105 hover:rounded-lg",children:[e.jsx(B,{to:`/profile/${s._id}`,children:e.jsxs("div",{className:"mt-3 flex items-center space-x-2",children:[e.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:s.dp?s.dp:A.DEFAULT_IMG,alt:"user dp"}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:s.name}),e.jsxs("span",{className:"text-[11px] font-medium text-gray-500",children:["@",s.username]})]})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:border-green-500 hover:bg-white hover:border-3 group",onClick:()=>C(s._id),children:e.jsx(G,{className:"text-md text-socioverse-500 group-hover:text-green-500"})}),e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:border-green-500 hover:bg-white hover:border-3 group",onClick:()=>F(s._id),children:e.jsx(W,{className:"text-xl text-socioverse-500 group-hover:text-green-500"})})]})]},I)):e.jsx("div",{children:"No followers"})}),x!=null&&x.length?e.jsx("div",{className:"inline-block",children:e.jsxs(l.Button,{variant:"text",className:"flex items-center gap-2 text-black capitalize shadow-none text-sm font-semibold",onClick:t,disabled:(x==null?void 0:x.length)<6,children:["View All",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"h-4 w-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3"})})]})}):""]})})]}),e.jsxs(l.Accordion,{open:m===3,className:"mb-5 rounded-lg border px-2 shadow-lg",children:[e.jsxs("div",{onClick:()=>T(3),className:`border-b-0 transition-colors flex items-center justify-between p-4 cursor-pointer `,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h1",{className:"text-lg font-semibold",children:"Following"}),e.jsx(l.Chip,{value:o==null?void 0:o.length,size:"sm",variant:"ghost",color:"blue-gray",className:"rounded-full"})]}),e.jsx("div",{className:"text-2xl",children:m===3?e.jsx(le,{}):e.jsx(re,{})})]}),e.jsx(l.AccordionBody,{className:"pt-0 text-base font-normal",children:e.jsxs("div",{className:"flex flex-col gap-4 px-4",children:[e.jsx("div",{className:"flex flex-col gap-2 ",children:o!=null&&o.length&&o?o.slice(0,5).map(s=>e.jsxs("div",{className:"flex p-2 items-center justify-between transition duration-100 ease-in-out hover:shadow-md hover:scale-105 hover:rounded-lg",children:[e.jsx(B,{to:`/profile/${s._id}`,children:e.jsxs("div",{className:"mt-3 flex items-center space-x-2",children:[e.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:s.dp?s.dp:A.DEFAULT_IMG,alt:"user dp"}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:s.name}),e.jsxs("span",{className:"text-[11px] font-medium text-gray-500",children:["@",s.username]})]})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:border-green-500 hover:bg-white hover:border-3 group",children:e.jsx(G,{className:"text-md text-socioverse-500 group-hover:text-green-500",onClick:()=>C(s._id)})}),e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:border-green-500 hover:bg-white hover:border-3 group",onClick:()=>F(s._id),children:e.jsx(W,{className:"text-xl text-socioverse-500 group-hover:text-green-500"})})]})]},s._id)):e.jsx("div",{children:"No following"})}),o!=null&&o.length?e.jsx("div",{className:"inline-block",children:e.jsxs(l.Button,{variant:"text",className:"flex items-center gap-2 text-black capitalize shadow-none text-sm font-semibold",onClick:d,disabled:(o==null?void 0:o.length)<6,children:["View All",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"h-4 w-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3"})})]})}):""]})})]}),e.jsxs(l.Dialog,{open:y,size:"xs",handler:t,animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[e.jsx(l.DialogHeader,{children:e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Followers List"}),e.jsx("div",{children:e.jsx(V,{className:"text-3xl cursor-pointer",onClick:t})})]})}),e.jsx(E,{}),e.jsx(l.DialogBody,{className:"flex flex-col gap-4 lg:mx-4 lg:my-0 m-2 max-h-[20.5rem] overflow-y-scroll",children:e.jsx("div",{className:"flex flex-col gap-2 ",children:x.map(s=>e.jsxs("div",{className:"flex p-2 items-center justify-between transition duration-100 ease-in-out hover:shadow-md hover:scale-105 hover:rounded-lg",children:[e.jsx(B,{to:`/profile/${s._id}`,children:e.jsxs("div",{className:"mt-3 flex items-center space-x-2",children:[e.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:s.dp?s.dp:A.DEFAULT_IMG,alt:"user dp"}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:s==null?void 0:s.name}),e.jsx("span",{className:"text-[11px] font-medium text-gray-500",children:s.username?`@${s.username}`:"@ -"})]})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:border-green-500 hover:bg-white hover:border-3 group",onClick:()=>C(s._id),children:e.jsx(G,{className:"text-md text-socioverse-500 group-hover:text-green-500"})}),e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:border-green-500 hover:bg-white hover:border-3 group",onClick:()=>F(s._id),children:e.jsx(W,{className:"text-xl text-socioverse-500 group-hover:text-green-500"})})]})]},s._id))})}),e.jsx(l.DialogFooter,{children:void 0})]}),e.jsxs(l.Dialog,{open:U,size:"xs",handler:d,animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[e.jsx(l.DialogHeader,{children:e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Following List"}),e.jsx("div",{children:e.jsx(V,{className:"text-3xl cursor-pointer",onClick:d})})]})}),e.jsx(E,{}),e.jsx(l.DialogBody,{className:"flex flex-col gap-4 lg:mx-4 lg:my-0 m-2 max-h-[20.5rem] overflow-y-scroll",children:e.jsx("div",{className:"flex flex-col gap-2 ",children:o.map(s=>e.jsxs("div",{className:"flex p-2 items-center justify-between transition duration-100 ease-in-out hover:shadow-md hover:scale-105 hover:rounded-lg",children:[e.jsx(B,{to:`/profile/${s._id}`,children:e.jsxs("div",{className:"mt-3 flex items-center space-x-2",children:[e.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:s.dp?s.dp:A.DEFAULT_IMG,alt:"user dp"}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:s==null?void 0:s.name}),e.jsx("span",{className:"text-[11px] font-medium text-gray-500",children:s.username?`@${s.username}`:"@ -"})]})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:border-green-500 hover:bg-white hover:border-3 group",onClick:()=>C(s._id),children:e.jsx(G,{className:"text-md text-socioverse-500 group-hover:text-green-500"})}),e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:border-green-500 hover:bg-white hover:border-3 group",onClick:()=>F(s._id),children:e.jsx(W,{className:"text-xl text-socioverse-500 group-hover:text-green-500"})})]})]},s._id))})}),e.jsx(l.DialogFooter,{children:void 0})]})]})}function Re(){return e.jsxs("div",{className:"flex w-full flex-row items-center gap-2 rounded-[99px] border shadow-md border-black/40 bg-blue-gray-100/30 p-1 md:p-2",children:[e.jsx(l.Textarea,{rows:1,resize:!1,placeholder:"Start your post here...",className:"min-h-full !border-0 focus:border-transparent",containerProps:{className:"grid h-full"},labelProps:{className:"before:content-none after:content-none"}}),e.jsx("div",{children:e.jsx(l.IconButton,{variant:"text",className:"rounded-full text-blue-gray-700",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"h-5 w-5",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})})})})]})}function Ge(c){return ye({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}},{tag:"circle",attr:{cx:"12",cy:"13",r:"4"}}]})(c)}const We=()=>{const c=O();return He(async f=>await Ce(f),{onSuccess:f=>{c(ke(f))}})},qe=({open:c,handleOpen:f,setIsLastPage:g,setPostCreated:h})=>{const j=H(i=>i.auth.user),[a,p]=n.useState(!1),[u,o]=n.useState(null),[b,x]=n.useState(null),[S,y]=n.useState(!1),[_,U]=n.useState(null),[k,t]=n.useState(new FormData),[d,r]=n.useState([]),m=H(i=>i.post.image),L=O(),T=()=>p(!a),C=()=>y(!S),F=We(),s=async(i,N)=>{if(i.length>0)try{i.forEach((D,K)=>{N.append("files",D,`image${K}.jpg`)})}catch(D){console.error("Upload error:",D)}},I=i=>{r(N=>[...N,{blob:i,image:URL.createObjectURL(i)}]),C()},z=i=>{var N;if((N=i.target.files)!=null&&N.length&&i.target.files[0]){const D=i.target.files[0];D.type.startsWith("image/")?(U(D),y(!0)):w.warn("Only image files are allowed!",M)}},$=async()=>{if(m&&m.length>0){const i=d.map(N=>N.blob);await s(i,k)}if(u&&k.append("description",u),b&&k.append("hashtags",b),!u&&!b&&(!m||m.length===0))w.dismiss(),w.error("All the fields cannot be empty!",M);else try{const i=F.mutateAsync(k);w.promise(i,{pending:"Uploading the post...",success:"Post uploaded successfully",error:"Upload failed!"},{...M,position:"bottom-left",closeButton:!1}),await(i||F.isSuccess)?(g(!1),w.dismiss(),h((await i).post)):w.dismiss(),f(),x(null),o(null),U(null),L(Ie()),r([])}catch{w.dismiss(),w.error("Upload failed!",{...M,position:"bottom-left"})}t(new FormData)},q=i=>{L(De(i)),r(N=>N.filter(D=>D.image!==i))};return e.jsxs(e.Fragment,{children:[e.jsxs(l.Dialog,{open:c,size:"md",handler:f,dismiss:{enabled:!1},animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[e.jsx(E,{}),e.jsx(l.DialogHeader,{children:e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsx("div",{className:"flex items-center justify-between gap-5 transition-transform duration-300 mx-1 px-2 pb-3 rounded-lg cursor-pointer hover:bg-gray-200 hover:scale-105",children:j&&e.jsx(B,{to:`/profile/${j._id}`,children:e.jsxs("div",{className:"mt-3 flex items-center space-x-2",children:[e.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:j.dp?j.dp:A.DEFAULT_IMG,alt:"user dp"}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[14px] font-bold text-gray-900",children:j.name}),e.jsx("span",{className:"text-[11px] font-bold text-green-500",children:"Post to Connections"})]})]})})}),e.jsx("div",{children:e.jsx(V,{className:"text-3xl cursor-pointer",onClick:f})})]})}),e.jsxs(l.DialogBody,{className:"flex flex-col gap-4 lg:mx-4 my-0 mx-2 px-4 py-0 md:px-4 md:py-4 max-h-[20.5rem] overflow-y-scroll",children:[e.jsx("div",{className:"w-full mb-20 sm:mb-12",children:e.jsx(Se,{textValue:u,setTextValue:o})}),a&&e.jsx("div",{className:"w-full",children:e.jsx(l.Input,{label:"Hashtags",value:b||"",onChange:i=>x(i.target.value)})}),m&&m.length>0&&e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("div",{className:"border border-black/20 py-5 md:py-10 flex flex-col gap-2 md:gap-5",children:m.map((i,N)=>e.jsx("div",{className:"h-56 md:h-[19rem] w-full relative",style:{backgroundImage:`url(${i})`,backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"center"},children:e.jsx("div",{className:"absolute flex gap-3 bottom-5 right-4 md:bottom-3 md:right-16",children:e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-500 rounded-full cursor-pointer border-2 border-blue-gray-700 hover:border-red-700 hover:bg-white hover:border-3 group opacity-70 hover:opacity-100",children:e.jsx(_e,{className:"text-xl text-white group-hover:text-red-500",onClick:()=>q(i)})})})},N))}),m.length===5&&e.jsx("em",{className:"text-sm font-light text-right pr-1",children:"* Max of 5 images are allowed!"})]})]}),e.jsx(l.DialogFooter,{children:e.jsxs("div",{className:"float-left mx-4 mb-4 flex justify-between items-center w-full",children:[e.jsxs("div",{className:"flex justify-between items-center gap-3 mx-2",children:[e.jsx("div",{className:ie("flex justify-center items-center border-2 w-8 h-8 rounded-full cursor-pointer hover:border-socioverse-500 group",{"border-socioverse-500":a},{"border-black":!a}),onClick:T,children:e.jsx(Ue,{className:ie("text-2xl group-hover:text-socioverse-500",{"text-socioverse-500":a},{"text-black":!a})})}),e.jsx("input",{type:"file",accept:"image/*",id:"image-input",className:"hidden",onChange:z,disabled:(m==null?void 0:m.length)===5}),e.jsx("label",{htmlFor:"image-input",className:"flex justify-center items-center text-black border-black border-2 w-8 h-8 rounded-full cursor-pointer hover:border-socioverse-500 group",children:e.jsx(Ge,{className:"text-xl group-hover:text-socioverse-500"})})]}),e.jsx(l.Button,{size:"sm",className:"rounded-full bg-socioverse-500",onClick:$,children:"Post"})]})})]}),e.jsxs(l.Dialog,{open:S,size:"lg",handler:C,animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[e.jsx(l.DialogHeader,{children:e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsx("div",{className:"text-2xl",children:"Image"}),e.jsx("div",{children:e.jsx(V,{className:"text-3xl cursor-pointer",onClick:C})})]})}),e.jsx(l.DialogBody,{className:"lg:m-4 m-2",children:_?e.jsx("div",{className:"w-auto lg:h-[28rem] h-96 ",children:e.jsx(Ve,{image:URL.createObjectURL(_),getImage:I,aspectRatio:1.5/1})}):" "})]})]})},Ke=({handleUsernameInputPopup:c,usernameInputPopupOpen:f,setIsUsernameAvailable:g})=>{const h=O(),j=Fe().shape({username:Me().trim().matches(/^\S+$/,"Username cannot contain whitespace characters").min(3,"Username should be atleast 3 characters").required("Username is required")}),a=Ae({initialValues:{username:""},validationSchema:j,onSubmit:async p=>{try{const u=await Le(p.username);u.status==="success"?(h(Be(p.username)),g(!0),w.success("Username added successfully",{...M,position:"bottom-left"}),g(!0),c()):w.error(u.message,M)}catch(u){if(me(u)){const o=u;if(o.response&&o.response.status>=400&&o.response.status<=500){const b=o.response.data.message;w.error(b,M)}}}}});return e.jsxs(l.Dialog,{open:f,size:"md",handler:c,dismiss:{enabled:!1},animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[e.jsx(l.DialogHeader,{children:e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsx("div",{className:"text-2xl",children:"User Info"}),e.jsx("div",{})]})}),e.jsx(E,{}),e.jsx(l.DialogBody,{className:"mx-4 mb-8",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"text-md mb-6 border-2 p-4 rounded-lg bg-green-50 border-green-500",children:"Enter your username to continue, it should be unique!"}),e.jsxs("form",{onSubmit:a.handleSubmit,className:"flex items-start gap-5 justify-center",children:[e.jsx("div",{className:"w-[20rem]",children:e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(l.Input,{type:"text",label:"Username",name:"username",value:a.values.username,onChange:a.handleChange,onBlur:a.handleBlur}),a.touched.username&&a.errors.username&&e.jsx("div",{className:"text-red-500 mt-[0.5rem] text-sm inline",children:a.errors.username})]})}),e.jsx(l.Button,{size:"lg",className:"bg-socioverse-500 hover:scale-105 text-white px-4 py-2 rounded-lg",disabled:!a.values.username,type:"submit",children:"Continue"})]})]})})]})},Qe=({user:c,socket:f})=>{const g=O(),[h,j]=n.useState([]),[a,p]=n.useState(!1),[u,o]=n.useState(1),[b,x]=n.useState(!1),[S,y]=n.useState(null),[_,U]=n.useState(null),[k,t]=n.useState(null),[d,r]=n.useState(null),[m,L]=n.useState(!0),[T,C]=n.useState(!1),F=Z();n.useEffect(()=>{c&&L(!!c.username)},[c]),n.useEffect(()=>{c&&C(!m)},[m,c]);const s=()=>{C(v=>!v)},I=async()=>{const v=await ce(u);j(v.posts),o(u+1),p(!1)};n.useEffect(()=>{I()},[]),n.useEffect(()=>{const v=document.getElementById("sentinel"),R=new IntersectionObserver(async ue=>{if(ue[0].isIntersecting&&!a&&!b){p(!0);const se=await ce(u);if(se.posts.length===0){x(!0),p(!1);return}else x(!1);j([...h,...se.posts]),o(u+1),p(!1)}});return R.observe(v),()=>{R.unobserve(v)}},[a,h,u,b]),n.useEffect(()=>{c||J().then(v=>{g(Y({user:v.user,accessToken:X.getState().auth.accessToken}))})},[g,c]);const[z,$]=n.useState(!1),q=()=>$(!z),i=()=>{$(!0)},[N,D]=n.useState(!1),[K,he]=n.useState(!1),P=v=>{D(v)},ee=v=>{he(v)};return S&&(j(h.filter(v=>v._id!==S)),y(null)),n.useEffect(()=>{_&&(j(h.filter(v=>v._id!==_)),U(null))},[h,_]),n.useEffect(()=>{k&&(j([{...k,newPostCreated:!0},...h]),t(null))},[k,h]),n.useEffect(()=>{d&&(j(h.map(v=>v._id===d._id?d:v)),r(null))},[d,h]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"lg:flex gap-3 items-start justify-between h-[80vh] lg:h-[85vh]",children:[e.jsx("aside",{className:"hidden lg:block w-3/12 px-3 sticky top-28 overflow-y-auto h-[80vh] no-scrollbar",children:e.jsx($e,{newFollowing:N,handleFollowingAdd:P,removeFollowing:K,handleFollowingRemove:ee,socket:f})}),e.jsxs("main",{className:"w-full lg:w-6/12 px-3 md:px-6 overflow-x-hidden overflow-y-auto h-[85vh] no-scrollbar flex flex-col items-center p-2",children:[e.jsxs("div",{className:"flex items-center justify-between w-full md:p-2 mb-8 gap-3 md:gap-5 sticky top-0 z-40",children:[e.jsx(l.Avatar,{variant:"circular",alt:"user dp",className:"border h-12 w-12 md:h-14 md:w-14 border-gray-500 p-0.5 cursor-pointer",src:c&&c.dp?c.dp:A.DEFAULT_IMG,onClick:()=>F(`/profile/${c&&c._id}`)}),e.jsx("div",{className:"w-full",onClick:i,children:e.jsx(Re,{})})]}),e.jsxs("div",{className:" overflow-y-auto h-[85vh] w-full no-scrollbar flex flex-col items-center",children:[e.jsxs("div",{className:"mb-10 max-w-[30rem] w-full",children:[h.map((v,R)=>e.jsx("div",{className:"mb-10 w-full",children:e.jsx(Oe,{postData:v,setDeletedPostId:y,setReportedPostId:U,setPostEdited:r})},R)),a&&e.jsx("div",{className:"w-full px-2",children:e.jsx(Te,{})}),e.jsx(qe,{open:z,handleOpen:q,setIsLastPage:x,setPostCreated:t})]}),b&&e.jsx("div",{children:" No posts..."}),e.jsx("div",{id:"sentinel",style:{height:"1px"},className:"w-full mb-4",children:!b&&e.jsx("div",{children:e.jsx("img",{src:Ee,className:"w-20 h-20 mx-auto mt-2 lg:mt-4"})})})]})]}),e.jsx("aside",{className:"hidden lg:block w-3/12 px-3 pb-5 sticky top-28 overflow-hidden",children:e.jsx(ze,{handleFollowingAdd:P,handleFollowingRemove:ee})})]}),e.jsx(Ke,{handleUsernameInputPopup:s,usernameInputPopupOpen:T,setIsUsernameAvailable:L})]})},Je=({user:c,socket:f})=>e.jsx(e.Fragment,{children:e.jsx(Qe,{user:c,socket:f})}),es=({socket:c})=>{const f=H(a=>a.auth),g=Z(),h=O();n.useEffect(()=>{f.isAuthenticated||j()||g("/error")},[f]);const j=async()=>{try{const{user:a}=await J(),{accessToken:p}=X.getState().auth;return h(Y({user:a,accessToken:p})),a}catch(a){if(me(a)){const p=a;p.response&&p.response.status>=400&&p.response.status<=500&&g("/login")}}};return e.jsx(e.Fragment,{children:e.jsx(Je,{user:f.user,socket:c})})};export{es as default}; diff --git a/client/dist/assets/ImageCropper-a7aa6f9b.js b/client/dist/assets/ImageCropper-e8994465.js similarity index 99% rename from client/dist/assets/ImageCropper-a7aa6f9b.js rename to client/dist/assets/ImageCropper-e8994465.js index 975f6bb..aca59d6 100644 --- a/client/dist/assets/ImageCropper-a7aa6f9b.js +++ b/client/dist/assets/ImageCropper-e8994465.js @@ -1,4 +1,4 @@ -import{az as dt,aA as ft,aB as vt,aC as et,aD as mt,aE as gt,aF as wt,r as w,a4 as Ct,a5 as b,a as yt,aG as xt,j as g,c as L,E as bt}from"./index-0b7b17fe.js";class Rt extends dt{constructor(r,t){super(),this.client=r,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var t;const e=this.options;this.options=this.client.defaultMutationOptions(r),ft(e,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(t=this.currentMutation)==null||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var r;(r=this.currentMutation)==null||r.removeObserver(this)}}onMutationUpdate(r){this.updateResult();const t={listeners:!0};r.type==="success"?t.onSuccess=!0:r.type==="error"&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(r,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof r<"u"?r:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const r=this.currentMutation?this.currentMutation.state:vt(),t={...r,isLoading:r.status==="loading",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(r){et.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(r.onSuccess){var t,e,n,i;(t=(e=this.mutateOptions).onSuccess)==null||t.call(e,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(n=(i=this.mutateOptions).onSettled)==null||n.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(r.onError){var a,s,c,u;(a=(s=this.mutateOptions).onError)==null||a.call(s,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(c=(u=this.mutateOptions).onSettled)==null||c.call(u,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}r.listeners&&this.listeners.forEach(({listener:h})=>{h(this.currentResult)})})}}const St=mt.useSyncExternalStore;function Et(o,r){return typeof o=="function"?o(...r):!!o}function ee(o,r,t){const e=gt(o,r,t),n=wt({context:e.context}),[i]=w.useState(()=>new Rt(n,e));w.useEffect(()=>{i.setOptions(e)},[i,e]);const a=St(w.useCallback(c=>i.subscribe(et.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=w.useCallback((c,u)=>{i.mutate(c,u).catch(Mt)},[i]);if(a.error&&Et(i.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:s,mutateAsync:a.mutate}}function Mt(){}/*! ***************************************************************************** +import{az as dt,aA as ft,aB as vt,aC as et,aD as mt,aE as gt,aF as wt,r as w,a4 as Ct,a5 as b,a as yt,aG as xt,j as g,c as L,E as bt}from"./index-f946f455.js";class Rt extends dt{constructor(r,t){super(),this.client=r,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var t;const e=this.options;this.options=this.client.defaultMutationOptions(r),ft(e,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(t=this.currentMutation)==null||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var r;(r=this.currentMutation)==null||r.removeObserver(this)}}onMutationUpdate(r){this.updateResult();const t={listeners:!0};r.type==="success"?t.onSuccess=!0:r.type==="error"&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(r,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof r<"u"?r:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const r=this.currentMutation?this.currentMutation.state:vt(),t={...r,isLoading:r.status==="loading",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(r){et.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(r.onSuccess){var t,e,n,i;(t=(e=this.mutateOptions).onSuccess)==null||t.call(e,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(n=(i=this.mutateOptions).onSettled)==null||n.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(r.onError){var a,s,c,u;(a=(s=this.mutateOptions).onError)==null||a.call(s,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(c=(u=this.mutateOptions).onSettled)==null||c.call(u,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}r.listeners&&this.listeners.forEach(({listener:h})=>{h(this.currentResult)})})}}const St=mt.useSyncExternalStore;function Et(o,r){return typeof o=="function"?o(...r):!!o}function ee(o,r,t){const e=gt(o,r,t),n=wt({context:e.context}),[i]=w.useState(()=>new Rt(n,e));w.useEffect(()=>{i.setOptions(e)},[i,e]);const a=St(w.useCallback(c=>i.subscribe(et.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=w.useCallback((c,u)=>{i.mutate(c,u).catch(Mt)},[i]);if(a.error&&Et(i.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:s,mutateAsync:a.mutate}}function Mt(){}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any diff --git a/client/dist/assets/PeoplePage-a2d62a8f.js b/client/dist/assets/PeoplePage-dff990e3.js similarity index 97% rename from client/dist/assets/PeoplePage-a2d62a8f.js rename to client/dist/assets/PeoplePage-dff990e3.js index cff117f..1ad8d3a 100644 --- a/client/dist/assets/PeoplePage-a2d62a8f.js +++ b/client/dist/assets/PeoplePage-dff990e3.js @@ -1 +1 @@ -import{a as T,n as _,u as C,r as c,o as O,p as E,g as B,b as D,j as e,k as M,c as u,C as v,L as V,B as R,t as $,R as G,v as j,w as H,i as L,Q as x,T as y,l as Q,f as q,h as z,d as I,s as J,e as K,U as W}from"./index-0b7b17fe.js";import{f as N}from"./index-cf9a37b0.js";import{T as X}from"./index.esm-5bd1b457.js";const Y=({socket:g})=>{const l=T(),d=_(),o=C(s=>s.auth.user),[h,r]=c.useState([]),[i,S]=c.useState([]),[f,b]=c.useState([]),[n,m]=c.useState();c.useEffect(()=>{o&&(O(o._id).then(s=>{S(s.following)}),E(o._id).then(s=>{r(s.followers)}),B().then(s=>{s.suggestions.length===0?D().then(a=>b(a.users)):b(s.suggestions)}))},[o,l]),c.useEffect(()=>{o&&m(o.following)},[o]);const p=[{label:"Followers",value:"followers",desc:h.length>0?h:"No followers yet..."},{label:"Following",value:"following",desc:i.length>0?i:"No following yet..."},{label:"Suggested",value:"suggested",desc:f.length>0?f:"No suggestions available..."}],A=async s=>{const a=await N(s);l(j(a.chat)),location.pathname!=="/message"&&d("/message")},U=async s=>{const a=await N(s);l(j(a.chat)),g&&g.emit("call-user",o,a.chat),l(H(!0)),location.pathname!=="/message"&&d("/message")},k=(s,a)=>{L(s).then(()=>{x.dismiss(),x.success(`Unfollowed ${a}`,y)}),m(n==null?void 0:n.filter(t=>t!==s)),l(Q(s))},F=(s,a)=>{q(s).then(()=>{x.dismiss(),x.success(`Following ${a}`,y)}),!(n!=null&&n.includes(s))&&m([...n,s]),l(z(s))};return e.jsxs(e.Fragment,{children:[e.jsx(M,{}),e.jsxs(u.Tabs,{id:"custom-animation",value:"followers",children:[e.jsx(u.TabsHeader,{className:"sticky",children:p.map(({label:s,value:a})=>e.jsx(u.Tab,{value:a,children:s},a))}),e.jsx(u.TabsBody,{animate:{initial:{y:250},mount:{y:0},unmount:{y:250}},className:"overflow-y-auto h-[75vh] md:no-scrollbar",children:p.map(({value:s,desc:a})=>e.jsx(u.TabPanel,{value:s,children:typeof a=="string"?e.jsxs("div",{className:"flex flex-col items-center justify-center mt-4",children:[e.jsx("div",{className:"w-80 mx-auto",children:e.jsx("img",{src:v.NO_DATA_AVAILABLE_SVG,alt:"no data available"})}),e.jsx("h1",{children:a})]}):e.jsx("div",{className:"flex flex-col gap-4 max-w-[24rem] mx-auto mt-4",children:a.map(t=>{var w;return e.jsxs("div",{className:"flex bg-gray-100 rounded-lg p-2 items-center justify-between transition duration-100 ease-in-out shadow-md ",children:[e.jsx(V,{to:`/profile/${t._id}`,children:e.jsxs("div",{className:"mt-3 flex items-center space-x-2",children:[e.jsx("img",{className:"inline-block h-10 w-10 rounded-full",src:t.dp?t.dp:v.DEFAULT_IMG,alt:"user dp"}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:t==null?void 0:t.name}),e.jsx("span",{className:"text-[11px] font-medium text-gray-500",children:t.username?`@${t.username}`:"@ -"})]})]})}),s!=="suggested"?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:border-green-500 hover:bg-white hover:border-3 group",onClick:()=>A(t._id),children:e.jsx(R,{className:"text-md text-socioverse-500 group-hover:text-green-500"})}),e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:border-green-500 hover:bg-white hover:border-3 group",onClick:()=>U(t._id),children:e.jsx($,{className:"text-xl text-socioverse-500 group-hover:text-green-500"})})]}):n!=null&&n.includes(t._id)||o&&((w=t.followers)!=null&&w.includes(o._id))?e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-500 rounded-full cursor-pointer border-2 border-blue-gray-700 hover:border-red-700 hover:bg-white hover:border-3 group",onClick:()=>k(t._id,t.name),children:e.jsx(G,{className:"text-xl text-white group-hover:text-red-500"})}):e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:bg-white hover:border-3 group",onClick:()=>F(t._id,t.name),children:e.jsx(X,{className:"text-xl text-socioverse-500 group-hover:text-blue-gray-500"})})]},t._id)})})},s))})]})]})},se=({socket:g})=>{const l=T(),d=_(),o=C(r=>r.auth.user);c.useEffect(()=>{o||h()||d("/error")},[o]);const h=async()=>{try{const{user:r}=await I(),{accessToken:i}=J.getState().auth;return l(K({user:r,accessToken:i})),r}catch(r){if(W(r)){const i=r;i.response&&i.response.status>=400&&i.response.status<=500&&d("/login")}}};return e.jsx("div",{className:"lg:hidden block",children:e.jsx(Y,{socket:g})})};export{se as default}; +import{a as T,n as _,u as C,r as c,o as O,p as E,g as B,b as D,j as e,k as M,c as u,C as v,L as V,B as R,t as $,R as G,v as j,w as H,i as L,Q as x,T as y,l as Q,f as q,h as z,d as I,s as J,e as K,U as W}from"./index-f946f455.js";import{f as N}from"./index-fece1ea8.js";import{T as X}from"./index.esm-57e7230c.js";const Y=({socket:g})=>{const l=T(),d=_(),o=C(s=>s.auth.user),[h,r]=c.useState([]),[i,S]=c.useState([]),[f,b]=c.useState([]),[n,m]=c.useState();c.useEffect(()=>{o&&(O(o._id).then(s=>{S(s.following)}),E(o._id).then(s=>{r(s.followers)}),B().then(s=>{s.suggestions.length===0?D().then(a=>b(a.users)):b(s.suggestions)}))},[o,l]),c.useEffect(()=>{o&&m(o.following)},[o]);const p=[{label:"Followers",value:"followers",desc:h.length>0?h:"No followers yet..."},{label:"Following",value:"following",desc:i.length>0?i:"No following yet..."},{label:"Suggested",value:"suggested",desc:f.length>0?f:"No suggestions available..."}],A=async s=>{const a=await N(s);l(j(a.chat)),location.pathname!=="/message"&&d("/message")},U=async s=>{const a=await N(s);l(j(a.chat)),g&&g.emit("call-user",o,a.chat),l(H(!0)),location.pathname!=="/message"&&d("/message")},k=(s,a)=>{L(s).then(()=>{x.dismiss(),x.success(`Unfollowed ${a}`,y)}),m(n==null?void 0:n.filter(t=>t!==s)),l(Q(s))},F=(s,a)=>{q(s).then(()=>{x.dismiss(),x.success(`Following ${a}`,y)}),!(n!=null&&n.includes(s))&&m([...n,s]),l(z(s))};return e.jsxs(e.Fragment,{children:[e.jsx(M,{}),e.jsxs(u.Tabs,{id:"custom-animation",value:"followers",children:[e.jsx(u.TabsHeader,{className:"sticky",children:p.map(({label:s,value:a})=>e.jsx(u.Tab,{value:a,children:s},a))}),e.jsx(u.TabsBody,{animate:{initial:{y:250},mount:{y:0},unmount:{y:250}},className:"overflow-y-auto h-[75vh] md:no-scrollbar",children:p.map(({value:s,desc:a})=>e.jsx(u.TabPanel,{value:s,children:typeof a=="string"?e.jsxs("div",{className:"flex flex-col items-center justify-center mt-4",children:[e.jsx("div",{className:"w-80 mx-auto",children:e.jsx("img",{src:v.NO_DATA_AVAILABLE_SVG,alt:"no data available"})}),e.jsx("h1",{children:a})]}):e.jsx("div",{className:"flex flex-col gap-4 max-w-[24rem] mx-auto mt-4",children:a.map(t=>{var w;return e.jsxs("div",{className:"flex bg-gray-100 rounded-lg p-2 items-center justify-between transition duration-100 ease-in-out shadow-md ",children:[e.jsx(V,{to:`/profile/${t._id}`,children:e.jsxs("div",{className:"mt-3 flex items-center space-x-2",children:[e.jsx("img",{className:"inline-block h-10 w-10 rounded-full",src:t.dp?t.dp:v.DEFAULT_IMG,alt:"user dp"}),e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:t==null?void 0:t.name}),e.jsx("span",{className:"text-[11px] font-medium text-gray-500",children:t.username?`@${t.username}`:"@ -"})]})]})}),s!=="suggested"?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:border-green-500 hover:bg-white hover:border-3 group",onClick:()=>A(t._id),children:e.jsx(R,{className:"text-md text-socioverse-500 group-hover:text-green-500"})}),e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:border-green-500 hover:bg-white hover:border-3 group",onClick:()=>U(t._id),children:e.jsx($,{className:"text-xl text-socioverse-500 group-hover:text-green-500"})})]}):n!=null&&n.includes(t._id)||o&&((w=t.followers)!=null&&w.includes(o._id))?e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-500 rounded-full cursor-pointer border-2 border-blue-gray-700 hover:border-red-700 hover:bg-white hover:border-3 group",onClick:()=>k(t._id,t.name),children:e.jsx(G,{className:"text-xl text-white group-hover:text-red-500"})}):e.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-100 rounded-full cursor-pointer border-2 border-blue-gray-500 hover:bg-white hover:border-3 group",onClick:()=>F(t._id,t.name),children:e.jsx(X,{className:"text-xl text-socioverse-500 group-hover:text-blue-gray-500"})})]},t._id)})})},s))})]})]})},se=({socket:g})=>{const l=T(),d=_(),o=C(r=>r.auth.user);c.useEffect(()=>{o||h()||d("/error")},[o]);const h=async()=>{try{const{user:r}=await I(),{accessToken:i}=J.getState().auth;return l(K({user:r,accessToken:i})),r}catch(r){if(W(r)){const i=r;i.response&&i.response.status>=400&&i.response.status<=500&&d("/login")}}};return e.jsx("div",{className:"lg:hidden block",children:e.jsx(Y,{socket:g})})};export{se as default}; diff --git a/client/dist/assets/ProfilePage-33f742bb.js b/client/dist/assets/ProfilePage-34412648.js similarity index 96% rename from client/dist/assets/ProfilePage-33f742bb.js rename to client/dist/assets/ProfilePage-34412648.js index acc5587..410e021 100644 --- a/client/dist/assets/ProfilePage-33f742bb.js +++ b/client/dist/assets/ProfilePage-34412648.js @@ -1,7 +1,7 @@ -import{G as Lt,ai as w,r as i,a5 as Mt,a as Ze,u as fe,e as Ae,aj as It,Q as A,T as K,j as r,k as Ee,ak as zt,c as x,A as Fe,n as vt,o as $t,p as Bt,ad as Ht,C as Ve,d as Be,s as He,al as yt,U as bt,D as Je,a1 as Qe,am as Kt,f as Ut,h as Wt,i as Gt,l as Yt,an as Zt,ao as qt,ap as Vt,aq as Jt,ar as Xe,as as et,at as tt,au as nt,W as Qt,X as Xt,Y as en,av as rt,m as tn,aw as nn,E as st,ax as rn,ay as sn}from"./index-0b7b17fe.js";import{u as on,I as wt}from"./ImageCropper-a7aa6f9b.js";function ot(e){return Lt({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M16 9C16 11.2091 14.2091 13 12 13C9.79086 13 8 11.2091 8 9C8 6.79086 9.79086 5 12 5C14.2091 5 16 6.79086 16 9ZM14 9C14 10.1046 13.1046 11 12 11C10.8954 11 10 10.1046 10 9C10 7.89543 10.8954 7 12 7C13.1046 7 14 7.89543 14 9Z",fill:"currentColor"}},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1ZM3 12C3 14.0902 3.71255 16.014 4.90798 17.5417C6.55245 15.3889 9.14627 14 12.0645 14C14.9448 14 17.5092 15.3531 19.1565 17.4583C20.313 15.9443 21 14.0524 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12ZM12 21C9.84977 21 7.87565 20.2459 6.32767 18.9878C7.59352 17.1812 9.69106 16 12.0645 16C14.4084 16 16.4833 17.1521 17.7538 18.9209C16.1939 20.2191 14.1881 21 12 21Z",fill:"currentColor"}}]})(e)}function he(e,t,n,s){function o(a){return a instanceof n?a:new n(function(c){c(a)})}return new(n||(n=Promise))(function(a,c){function f(v){try{l(s.next(v))}catch(j){c(j)}}function g(v){try{l(s.throw(v))}catch(j){c(j)}}function l(v){v.done?a(v.value):o(v.value).then(f,g)}l((s=s.apply(e,t||[])).next())})}function xe(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,o,a,c;return c={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function f(l){return function(v){return g([l,v])}}function g(l){if(s)throw new TypeError("Generator is already executing.");for(;c&&(c=0,l[0]&&(n=0)),n;)try{if(s=1,o&&(a=l[0]&2?o.return:l[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,l[1])).done)return a;switch(o=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]0)&&!(o=s.next()).done;)a.push(o.value)}catch(f){c={error:f}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(c)throw c.error}}return a}function it(e,t,n){if(n||arguments.length===2)for(var s=0,o=t.length,a;s0?s:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function ln(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var s=t.split(".").pop().toLowerCase(),o=an.get(s);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var cn=[".DS_Store","Thumbs.db"];function un(e){return he(this,void 0,void 0,function(){return xe(this,function(t){return Oe(e)&&fn(e.dataTransfer)?[2,gn(e.dataTransfer,e.type)]:dn(e)?[2,pn(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,mn(e)]:[2,[]]})})}function fn(e){return Oe(e)}function dn(e){return Oe(e)&&Oe(e.target)}function Oe(e){return typeof e=="object"&&e!==null}function pn(e){return Ke(e.target.files).map(function(t){return De(t)})}function mn(e){return he(this,void 0,void 0,function(){var t;return xe(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(s){return s.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(s){return De(s)})]}})})}function gn(e,t){return he(this,void 0,void 0,function(){var n,s;return xe(this,function(o){switch(o.label){case 0:return e.items?(n=Ke(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(hn))]):[3,2];case 1:return s=o.sent(),[2,lt(jt(s))];case 2:return[2,lt(Ke(e.files).map(function(a){return De(a)}))]}})})}function lt(e){return e.filter(function(t){return cn.indexOf(t.name)===-1})}function Ke(e){if(e===null)return[];for(var t=[],n=0;n0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]0)&&!(o=s.next()).done;)a.push(o.value)}catch(f){c={error:f}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(c)throw c.error}}return a}function it(e,t,n){if(n||arguments.length===2)for(var s=0,o=t.length,a;s0?s:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function ln(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var s=t.split(".").pop().toLowerCase(),o=an.get(s);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var cn=[".DS_Store","Thumbs.db"];function un(e){return he(this,void 0,void 0,function(){return xe(this,function(t){return Oe(e)&&fn(e.dataTransfer)?[2,gn(e.dataTransfer,e.type)]:dn(e)?[2,pn(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,mn(e)]:[2,[]]})})}function fn(e){return Oe(e)}function dn(e){return Oe(e)&&Oe(e.target)}function Oe(e){return typeof e=="object"&&e!==null}function pn(e){return Ke(e.target.files).map(function(t){return De(t)})}function mn(e){return he(this,void 0,void 0,function(){var t;return xe(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(s){return s.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(s){return De(s)})]}})})}function gn(e,t){return he(this,void 0,void 0,function(){var n,s;return xe(this,function(o){switch(o.label){case 0:return e.items?(n=Ke(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(hn))]):[3,2];case 1:return s=o.sent(),[2,lt(jt(s))];case 2:return[2,lt(Ke(e.files).map(function(a){return De(a)}))]}})})}function lt(e){return e.filter(function(t){return cn.indexOf(t.name)===-1})}function Ke(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,s=new Array(t);nn)return[!1,pt(n)];if(e.sizen)return[!1,pt(n)]}return[!0,null]}function ue(e){return e!=null}function kn(e){var t=e.files,n=e.accept,s=e.minSize,o=e.maxSize,a=e.multiple,c=e.maxFiles,f=e.validator;return!a&&t.length>1||a&&c>=1&&t.length>c?!1:t.every(function(g){var l=Et(g,n),v=je(l,1),j=v[0],D=Ft(g,s,o),k=je(D,1),N=k[0],M=f?f(g):null;return j&&N&&!M})}function Ne(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ce(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function gt(e){e.preventDefault()}function _n(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Tn(e){return e.indexOf("Edge/")!==-1}function Rn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return _n(e)||Tn(e)}function Q(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),c=1;ce.length)&&(t=e.length);for(var n=0,s=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function Qn(e,t){if(e==null)return{};var n={},s=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var qe=i.forwardRef(function(e,t){var n=e.children,s=Se(e,Bn),o=kt(s),a=o.open,c=Se(o,Hn);return i.useImperativeHandle(t,function(){return{open:a}},[a]),Mt.createElement(i.Fragment,null,n(C(C({},c),{},{open:a})))});qe.displayName="Dropzone";var St={disabled:!1,getFilesFromEvent:un,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};qe.defaultProps=St;qe.propTypes={children:w.func,accept:w.objectOf(w.arrayOf(w.string)),multiple:w.bool,preventDropOnDocument:w.bool,noClick:w.bool,noKeyboard:w.bool,noDrag:w.bool,noDragEventsBubbling:w.bool,minSize:w.number,maxSize:w.number,maxFiles:w.number,disabled:w.bool,getFilesFromEvent:w.func,onFileDialogCancel:w.func,onFileDialogOpen:w.func,useFsAccessApi:w.bool,autoFocus:w.bool,onDragEnter:w.func,onDragLeave:w.func,onDragOver:w.func,onDrop:w.func,onDropAccepted:w.func,onDropRejected:w.func,onError:w.func,validator:w.func};var Ye={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function kt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=C(C({},St),e),n=t.accept,s=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,c=t.minSize,f=t.multiple,g=t.maxFiles,l=t.onDragEnter,v=t.onDragLeave,j=t.onDragOver,D=t.onDrop,k=t.onDropAccepted,N=t.onDropRejected,M=t.onFileDialogCancel,$=t.onFileDialogOpen,Y=t.useFsAccessApi,U=t.autoFocus,ne=t.preventDropOnDocument,Z=t.noClick,S=t.noKeyboard,q=t.noDrag,E=t.noDragEventsBubbling,I=t.onError,W=t.validator,L=i.useMemo(function(){return In(n)},[n]),X=i.useMemo(function(){return Mn(n)},[n]),V=i.useMemo(function(){return typeof $=="function"?$:xt},[$]),ee=i.useMemo(function(){return typeof M=="function"?M:xt},[M]),F=i.useRef(null),_=i.useRef(null),te=i.useReducer(Xn,Ye),de=$e(te,2),se=de[0],T=de[1],ve=se.isFocused,pe=se.isFileDialogActive,B=i.useRef(typeof window<"u"&&window.isSecureContext&&Y&&Ln()),oe=function(){!B.current&&pe&&setTimeout(function(){if(_.current){var p=_.current.files;p.length||(T({type:"closeDialog"}),ee())}},300)};i.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[_,pe,ee,B]);var G=i.useRef([]),ae=function(p){F.current&&F.current.contains(p.target)||(p.preventDefault(),G.current=[])};i.useEffect(function(){return ne&&(document.addEventListener("dragover",gt,!1),document.addEventListener("drop",ae,!1)),function(){ne&&(document.removeEventListener("dragover",gt),document.removeEventListener("drop",ae))}},[F,ne]),i.useEffect(function(){return!s&&U&&F.current&&F.current.focus(),function(){}},[F,U,s]);var z=i.useCallback(function(u){I?I(u):console.error(u)},[I]),J=i.useCallback(function(u){u.preventDefault(),u.persist(),ce(u),G.current=[].concat(Wn(G.current),[u.target]),Ce(u)&&Promise.resolve(o(u)).then(function(p){if(!(Ne(u)&&!E)){var O=p.length,R=O>0&&kn({files:p,accept:L,minSize:c,maxSize:a,multiple:f,maxFiles:g,validator:W}),H=O>0&&!R;T({isDragAccept:R,isDragReject:H,isDragActive:!0,type:"setDraggedFiles"}),l&&l(u)}}).catch(function(p){return z(p)})},[o,l,z,E,L,c,a,f,g,W]),m=i.useCallback(function(u){u.preventDefault(),u.persist(),ce(u);var p=Ce(u);if(p&&u.dataTransfer)try{u.dataTransfer.dropEffect="copy"}catch{}return p&&j&&j(u),!1},[j,E]),h=i.useCallback(function(u){u.preventDefault(),u.persist(),ce(u);var p=G.current.filter(function(R){return F.current&&F.current.contains(R)}),O=p.indexOf(u.target);O!==-1&&p.splice(O,1),G.current=p,!(p.length>0)&&(T({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ce(u)&&v&&v(u))},[F,v,E]),b=i.useCallback(function(u,p){var O=[],R=[];u.forEach(function(H){var we=Et(H,L),ge=$e(we,2),_e=ge[0],Te=ge[1],Re=Ft(H,c,a),Pe=$e(Re,2),Le=Pe[0],Me=Pe[1],Ie=W?W(H):null;if(_e&&Le&&!Ie)O.push(H);else{var ze=[Te,Me];Ie&&(ze=ze.concat(Ie)),R.push({file:H,errors:ze.filter(function(Rt){return Rt})})}}),(!f&&O.length>1||f&&g>=1&&O.length>g)&&(O.forEach(function(H){R.push({file:H,errors:[Sn]})}),O.splice(0)),T({acceptedFiles:O,fileRejections:R,type:"setFiles"}),D&&D(O,R,p),R.length>0&&N&&N(R,p),O.length>0&&k&&k(O,p)},[T,f,L,c,a,g,D,k,N,W]),ie=i.useCallback(function(u){u.preventDefault(),u.persist(),ce(u),G.current=[],Ce(u)&&Promise.resolve(o(u)).then(function(p){Ne(u)&&!E||b(p,u)}).catch(function(p){return z(p)}),T({type:"reset"})},[o,b,z,E]),d=i.useCallback(function(){if(B.current){T({type:"openDialog"}),V();var u={multiple:f,types:X};window.showOpenFilePicker(u).then(function(p){return o(p)}).then(function(p){b(p,null),T({type:"closeDialog"})}).catch(function(p){zn(p)?(ee(p),T({type:"closeDialog"})):$n(p)?(B.current=!1,_.current?(_.current.value=null,_.current.click()):z(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):z(p)});return}_.current&&(T({type:"openDialog"}),V(),_.current.value=null,_.current.click())},[T,V,ee,Y,b,z,X,f]),y=i.useCallback(function(u){!F.current||!F.current.isEqualNode(u.target)||(u.key===" "||u.key==="Enter"||u.keyCode===32||u.keyCode===13)&&(u.preventDefault(),d())},[F,d]),P=i.useCallback(function(){T({type:"focus"})},[]),le=i.useCallback(function(){T({type:"blur"})},[]),ye=i.useCallback(function(){Z||(Rn()?setTimeout(d,0):d())},[Z,d]),re=function(p){return s?null:p},be=function(p){return S?null:re(p)},me=function(p){return q?null:re(p)},ce=function(p){E&&p.stopPropagation()},ke=i.useMemo(function(){return function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=u.refKey,O=p===void 0?"ref":p,R=u.role,H=u.onKeyDown,we=u.onFocus,ge=u.onBlur,_e=u.onClick,Te=u.onDragEnter,Re=u.onDragOver,Pe=u.onDragLeave,Le=u.onDrop,Me=Se(u,Kn);return C(C(Ge({onKeyDown:be(Q(H,y)),onFocus:be(Q(we,P)),onBlur:be(Q(ge,le)),onClick:re(Q(_e,ye)),onDragEnter:me(Q(Te,J)),onDragOver:me(Q(Re,m)),onDragLeave:me(Q(Pe,h)),onDrop:me(Q(Le,ie)),role:typeof R=="string"&&R!==""?R:"presentation"},O,F),!s&&!S?{tabIndex:0}:{}),Me)}},[F,y,P,le,ye,J,m,h,ie,S,q,s]),_t=i.useCallback(function(u){u.stopPropagation()},[]),Tt=i.useMemo(function(){return function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=u.refKey,O=p===void 0?"ref":p,R=u.onChange,H=u.onClick,we=Se(u,Un),ge=Ge({accept:L,multiple:f,type:"file",style:{display:"none"},onChange:re(Q(R,ie)),onClick:re(Q(H,_t)),tabIndex:-1},O,_);return C(C({},ge),we)}},[_,n,f,ie,s]);return C(C({},se),{},{isFocused:ve&&!s,getRootProps:ke,getInputProps:Tt,rootRef:F,inputRef:_,open:re(d)})}function Xn(e,t){switch(t.type){case"focus":return C(C({},e),{},{isFocused:!0});case"blur":return C(C({},e),{},{isFocused:!1});case"openDialog":return C(C({},Ye),{},{isFileDialogActive:!0});case"closeDialog":return C(C({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return C(C({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return C(C({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return C({},Ye);default:return e}}function xt(){}const er=()=>{const e=Ze(),t=fe(s=>s.auth.user),n=fe(s=>s.auth.accessToken);return on(async s=>await It(s),{onSuccess:s=>{e(Ae({user:{...t,coverPhoto:s.coverPhoto},accessToken:n}))}})},tr=()=>{const[e,t]=i.useState(null),[n,s]=i.useState(!1),o=er();i.useEffect(()=>{A.dismiss(),o.isLoading?A.warn("Uploading...",K):o.isSuccess?A.success("Cover photo updated successfully",K):o.isError&&A.error("Updation failed!",K)},[o.isLoading,o.isSuccess,o.isError]);const a=async D=>{if(D)try{const k=new FormData,N=new FileReader;N.onload=M=>{var $;if(($=M.target)!=null&&$.result){const Y=M.target.result,U=new Blob([Y],{type:D.type});k.append("file",U,"image.jpg"),o.mutate(k)}},N.readAsArrayBuffer(D)}catch(k){console.error("Upload error:",k)}},c=D=>{a(D),f()},f=()=>s(!n),g=i.useCallback(D=>{(D==null?void 0:D.length)===0?A.error("Invalid action!",K):(t(D[0]),s(!0))},[e]),{getRootProps:l,getInputProps:v,isDragActive:j}=kt({onDrop:g,maxFiles:1,accept:{"image/*":[]}});return r.jsxs(r.Fragment,{children:[r.jsx(Ee,{}),r.jsxs("div",{...l(),children:[r.jsx("input",{...v()}),!j&&r.jsxs("div",{className:" h-44 md:h-60 lg:h-80 px-1 cursor-pointer rounded-lg w-full bg-white lg:border-4 border-2 border-gray-500 border-dashed flex items-center justify-center gap-10",children:[r.jsx(zt,{className:"lg:text-9xl text-6xl text-gray-500"}),r.jsxs("div",{className:"flex flex-col justify-center items-start",children:[r.jsx("h1",{className:"lg:text-[1.125rem] text-base",children:"Drag the image here or click to select the file"}),r.jsx("p",{className:"text-gray-500 font-light lg:text-base text-sm",children:"Multiple files are not allowed"})]})]})]}),r.jsxs(x.Dialog,{open:n,size:"lg",handler:f,animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[r.jsx(x.DialogHeader,{children:r.jsxs("div",{className:"flex justify-between items-center w-full",children:[r.jsx("div",{className:"text-2xl",children:"Cover Photo"}),r.jsx("div",{children:r.jsx(Fe,{className:"text-3xl cursor-pointer",onClick:f})})]})}),r.jsx(x.DialogBody,{className:"lg:m-4 m-2",children:e?r.jsx("div",{className:"w-auto lg:h-[28rem] h-96 ",children:r.jsx(wt,{image:URL.createObjectURL(e),getImage:c,aspectRatio:4/1})}):" "})]})]})},nr=({id:e,ifOtherUser:t})=>{var m,h,b,ie;const n=fe(d=>{var y;return(y=d==null?void 0:d.auth)==null?void 0:y.user}),[s,o]=i.useState(null),[a,c]=i.useState(null),[f,g]=i.useState(!1),[l,v]=i.useState(null),[j,D]=i.useState(!1),[k,N]=i.useState(!1),[M,$]=i.useState(!1),[Y,U]=i.useState([]),[ne,Z]=i.useState([]),S=Ze(),q=vt();i.useEffect(()=>{const d=async()=>{if(n)e===(n==null?void 0:n._id)&&(o((n==null?void 0:n.coverPhoto)||null),c((n==null?void 0:n.dp)||null));else{const P=await y();e===(P==null?void 0:P._id)&&(P!=null&&P.coverPhoto&&o(P.coverPhoto),P!=null&&P.dp&&c(P.dp))}},y=async()=>{const{user:P}=await Be(),{accessToken:le}=He.getState().auth;return S(Ae({user:P,accessToken:le})),P};d()},[S,e,n]);const E=async d=>{try{const{otherUser:y}=await yt(d);v(y),y!=null&&y.coverPhoto?o(y.coverPhoto):o(null),y!=null&&y.dp?c(y.dp):c(null)}catch(y){if(bt(y)){const P=y;P.response&&P.response.status>=400&&P.response.status<=500}}};i.useEffect(()=>{var d;e!==(n==null?void 0:n._id)?(g(!0),t(!0),E(e),(d=n==null?void 0:n.following)!=null&&d.includes(e)?D(!0):D(!1)):(g(!1),t(!1))},[e,t,n]),i.useEffect(()=>{e&&$t(e).then(d=>{U(d.following)})},[e,k]),i.useEffect(()=>{e&&Bt(e).then(d=>{Z(d.followers)})},[e,M]);const[I,W]=i.useState(!1),L=()=>W(!I),[X,V]=i.useState(null),ee=async d=>{if(d)try{const y=new FileReader;y.onload=async P=>{var le;if((le=P.target)!=null&&le.result){const ye=new FormData,re=P.target.result,be=new Blob([re],{type:d.type});ye.append("file",be,"image.jpg");const me=qt(ye);await A.promise(me,{pending:"Image is uploading.....",success:"Successfully updated Profile Photo",error:"Failed to update Profile Photo"},K).then(async ce=>{if(ce){c(ce.dp);const{user:ke}=await Be();S(Ae({user:ke,accessToken:He.getState().auth.accessToken}))}})}},y.readAsArrayBuffer(d)}catch(y){console.error("Upload error:",y)}},F=d=>{ee(d),L()},_=d=>{d.target.files&&d.target.files.length>0&&(V(d.target.files[0]),W(!0))},te=()=>{A.dismiss(),A(r.jsx(Qe,{onDelete:()=>de(),message:"Are you sure you want to delete this DP?"}),K)},de=async()=>{(await Zt()).status==="success"?(A.dismiss(),A.success("DP deleted successfully",K)):(A.dismiss(),A.error("Error deleting the DP",K))},se=()=>s?r.jsxs(r.Fragment,{children:[r.jsx("img",{src:s,className:"h-full rounded-lg w-full object-fit relative"}),!f&&r.jsx("div",{className:"absolute bottom-2 lg:bottom-4 right-4 lg:right-20",children:r.jsx("div",{className:"flex gap-3",children:r.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-500 rounded-full cursor-pointer border-2 border-blue-gray-700 hover:border-red-700 hover:bg-white hover:border-3 group opacity-70 hover:opacity-100",children:r.jsx(Je,{className:"text-xl text-white group-hover:text-red-500",onClick:ve})})})})]}):f?r.jsx("div",{className:"h-full w-full bg-gray-300 rounded-lg"}):r.jsx(tr,{}),T=()=>a?r.jsxs("div",{className:"absolute -bottom-24 lg:left-14 p-4 hover:scale-105 group",children:[r.jsx("img",{className:"h-32 w-32 md:h-36 md:w-36 lg:h-40 lg:w-40 rounded-full border-4 border-white",src:a}),!f&&r.jsx("div",{className:"absolute bottom-7 left-16 md:left-[4.5rem] lg:left-[5rem]",children:r.jsx("div",{className:"flex gap-3",children:r.jsx("div",{className:`flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-500 rounded-full cursor-pointer border-2 +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nt(e,t){if(e){if(typeof e=="string")return We(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return We(e,t)}}function We(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function Qn(e,t){if(e==null)return{};var n={},s=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var qe=i.forwardRef(function(e,t){var n=e.children,s=Se(e,Bn),o=kt(s),a=o.open,c=Se(o,Hn);return i.useImperativeHandle(t,function(){return{open:a}},[a]),Mt.createElement(i.Fragment,null,n(C(C({},c),{},{open:a})))});qe.displayName="Dropzone";var St={disabled:!1,getFilesFromEvent:un,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};qe.defaultProps=St;qe.propTypes={children:w.func,accept:w.objectOf(w.arrayOf(w.string)),multiple:w.bool,preventDropOnDocument:w.bool,noClick:w.bool,noKeyboard:w.bool,noDrag:w.bool,noDragEventsBubbling:w.bool,minSize:w.number,maxSize:w.number,maxFiles:w.number,disabled:w.bool,getFilesFromEvent:w.func,onFileDialogCancel:w.func,onFileDialogOpen:w.func,useFsAccessApi:w.bool,autoFocus:w.bool,onDragEnter:w.func,onDragLeave:w.func,onDragOver:w.func,onDrop:w.func,onDropAccepted:w.func,onDropRejected:w.func,onError:w.func,validator:w.func};var Ye={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function kt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=C(C({},St),e),n=t.accept,s=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,c=t.minSize,f=t.multiple,g=t.maxFiles,l=t.onDragEnter,v=t.onDragLeave,j=t.onDragOver,D=t.onDrop,k=t.onDropAccepted,N=t.onDropRejected,M=t.onFileDialogCancel,$=t.onFileDialogOpen,Y=t.useFsAccessApi,U=t.autoFocus,ne=t.preventDropOnDocument,Z=t.noClick,S=t.noKeyboard,q=t.noDrag,E=t.noDragEventsBubbling,I=t.onError,W=t.validator,L=i.useMemo(function(){return In(n)},[n]),X=i.useMemo(function(){return Mn(n)},[n]),V=i.useMemo(function(){return typeof $=="function"?$:xt},[$]),ee=i.useMemo(function(){return typeof M=="function"?M:xt},[M]),F=i.useRef(null),_=i.useRef(null),te=i.useReducer(Xn,Ye),de=$e(te,2),se=de[0],T=de[1],ve=se.isFocused,pe=se.isFileDialogActive,B=i.useRef(typeof window<"u"&&window.isSecureContext&&Y&&Ln()),oe=function(){!B.current&&pe&&setTimeout(function(){if(_.current){var p=_.current.files;p.length||(T({type:"closeDialog"}),ee())}},300)};i.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[_,pe,ee,B]);var G=i.useRef([]),ae=function(p){F.current&&F.current.contains(p.target)||(p.preventDefault(),G.current=[])};i.useEffect(function(){return ne&&(document.addEventListener("dragover",gt,!1),document.addEventListener("drop",ae,!1)),function(){ne&&(document.removeEventListener("dragover",gt),document.removeEventListener("drop",ae))}},[F,ne]),i.useEffect(function(){return!s&&U&&F.current&&F.current.focus(),function(){}},[F,U,s]);var z=i.useCallback(function(u){I?I(u):console.error(u)},[I]),J=i.useCallback(function(u){u.preventDefault(),u.persist(),ce(u),G.current=[].concat(Wn(G.current),[u.target]),Ce(u)&&Promise.resolve(o(u)).then(function(p){if(!(Ne(u)&&!E)){var O=p.length,R=O>0&&kn({files:p,accept:L,minSize:c,maxSize:a,multiple:f,maxFiles:g,validator:W}),H=O>0&&!R;T({isDragAccept:R,isDragReject:H,isDragActive:!0,type:"setDraggedFiles"}),l&&l(u)}}).catch(function(p){return z(p)})},[o,l,z,E,L,c,a,f,g,W]),m=i.useCallback(function(u){u.preventDefault(),u.persist(),ce(u);var p=Ce(u);if(p&&u.dataTransfer)try{u.dataTransfer.dropEffect="copy"}catch{}return p&&j&&j(u),!1},[j,E]),h=i.useCallback(function(u){u.preventDefault(),u.persist(),ce(u);var p=G.current.filter(function(R){return F.current&&F.current.contains(R)}),O=p.indexOf(u.target);O!==-1&&p.splice(O,1),G.current=p,!(p.length>0)&&(T({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ce(u)&&v&&v(u))},[F,v,E]),b=i.useCallback(function(u,p){var O=[],R=[];u.forEach(function(H){var we=Et(H,L),ge=$e(we,2),_e=ge[0],Te=ge[1],Re=Ft(H,c,a),Pe=$e(Re,2),Le=Pe[0],Me=Pe[1],Ie=W?W(H):null;if(_e&&Le&&!Ie)O.push(H);else{var ze=[Te,Me];Ie&&(ze=ze.concat(Ie)),R.push({file:H,errors:ze.filter(function(Rt){return Rt})})}}),(!f&&O.length>1||f&&g>=1&&O.length>g)&&(O.forEach(function(H){R.push({file:H,errors:[Sn]})}),O.splice(0)),T({acceptedFiles:O,fileRejections:R,type:"setFiles"}),D&&D(O,R,p),R.length>0&&N&&N(R,p),O.length>0&&k&&k(O,p)},[T,f,L,c,a,g,D,k,N,W]),ie=i.useCallback(function(u){u.preventDefault(),u.persist(),ce(u),G.current=[],Ce(u)&&Promise.resolve(o(u)).then(function(p){Ne(u)&&!E||b(p,u)}).catch(function(p){return z(p)}),T({type:"reset"})},[o,b,z,E]),d=i.useCallback(function(){if(B.current){T({type:"openDialog"}),V();var u={multiple:f,types:X};window.showOpenFilePicker(u).then(function(p){return o(p)}).then(function(p){b(p,null),T({type:"closeDialog"})}).catch(function(p){zn(p)?(ee(p),T({type:"closeDialog"})):$n(p)?(B.current=!1,_.current?(_.current.value=null,_.current.click()):z(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):z(p)});return}_.current&&(T({type:"openDialog"}),V(),_.current.value=null,_.current.click())},[T,V,ee,Y,b,z,X,f]),y=i.useCallback(function(u){!F.current||!F.current.isEqualNode(u.target)||(u.key===" "||u.key==="Enter"||u.keyCode===32||u.keyCode===13)&&(u.preventDefault(),d())},[F,d]),P=i.useCallback(function(){T({type:"focus"})},[]),le=i.useCallback(function(){T({type:"blur"})},[]),ye=i.useCallback(function(){Z||(Rn()?setTimeout(d,0):d())},[Z,d]),re=function(p){return s?null:p},be=function(p){return S?null:re(p)},me=function(p){return q?null:re(p)},ce=function(p){E&&p.stopPropagation()},ke=i.useMemo(function(){return function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=u.refKey,O=p===void 0?"ref":p,R=u.role,H=u.onKeyDown,we=u.onFocus,ge=u.onBlur,_e=u.onClick,Te=u.onDragEnter,Re=u.onDragOver,Pe=u.onDragLeave,Le=u.onDrop,Me=Se(u,Kn);return C(C(Ge({onKeyDown:be(Q(H,y)),onFocus:be(Q(we,P)),onBlur:be(Q(ge,le)),onClick:re(Q(_e,ye)),onDragEnter:me(Q(Te,J)),onDragOver:me(Q(Re,m)),onDragLeave:me(Q(Pe,h)),onDrop:me(Q(Le,ie)),role:typeof R=="string"&&R!==""?R:"presentation"},O,F),!s&&!S?{tabIndex:0}:{}),Me)}},[F,y,P,le,ye,J,m,h,ie,S,q,s]),_t=i.useCallback(function(u){u.stopPropagation()},[]),Tt=i.useMemo(function(){return function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=u.refKey,O=p===void 0?"ref":p,R=u.onChange,H=u.onClick,we=Se(u,Un),ge=Ge({accept:L,multiple:f,type:"file",style:{display:"none"},onChange:re(Q(R,ie)),onClick:re(Q(H,_t)),tabIndex:-1},O,_);return C(C({},ge),we)}},[_,n,f,ie,s]);return C(C({},se),{},{isFocused:ve&&!s,getRootProps:ke,getInputProps:Tt,rootRef:F,inputRef:_,open:re(d)})}function Xn(e,t){switch(t.type){case"focus":return C(C({},e),{},{isFocused:!0});case"blur":return C(C({},e),{},{isFocused:!1});case"openDialog":return C(C({},Ye),{},{isFileDialogActive:!0});case"closeDialog":return C(C({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return C(C({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return C(C({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return C({},Ye);default:return e}}function xt(){}const er=()=>{const e=Ze(),t=fe(s=>s.auth.user),n=fe(s=>s.auth.accessToken);return on(async s=>await It(s),{onSuccess:s=>{e(Ae({user:{...t,coverPhoto:s.coverPhoto},accessToken:n}))}})},tr=()=>{const[e,t]=i.useState(null),[n,s]=i.useState(!1),o=er();i.useEffect(()=>{A.dismiss(),o.isLoading?A.warn("Uploading...",K):o.isSuccess?A.success("Cover photo updated successfully",K):o.isError&&A.error("Updation failed!",K)},[o.isLoading,o.isSuccess,o.isError]);const a=async D=>{if(D)try{const k=new FormData,N=new FileReader;N.onload=M=>{var $;if(($=M.target)!=null&&$.result){const Y=M.target.result,U=new Blob([Y],{type:D.type});k.append("file",U,"image.jpg"),o.mutate(k)}},N.readAsArrayBuffer(D)}catch(k){console.error("Upload error:",k)}},c=D=>{a(D),f()},f=()=>s(!n),g=i.useCallback(D=>{(D==null?void 0:D.length)===0?A.error("Invalid action!",K):(t(D[0]),s(!0))},[e]),{getRootProps:l,getInputProps:v,isDragActive:j}=kt({onDrop:g,maxFiles:1,accept:{"image/*":[]}});return r.jsxs(r.Fragment,{children:[r.jsx(Ee,{}),r.jsxs("div",{...l(),children:[r.jsx("input",{...v()}),!j&&r.jsxs("div",{className:" h-44 md:h-60 lg:h-80 px-1 cursor-pointer rounded-lg w-full bg-white lg:border-4 border-2 border-gray-500 border-dashed flex items-center justify-center gap-10",children:[r.jsx(zt,{className:"lg:text-9xl text-6xl text-gray-500"}),r.jsxs("div",{className:"flex flex-col justify-center items-start",children:[r.jsx("h1",{className:"lg:text-[1.125rem] text-base",children:"Drag the image here or click to select the file"}),r.jsx("p",{className:"text-gray-500 font-light lg:text-base text-sm",children:"Multiple files are not allowed"})]})]})]}),r.jsxs(x.Dialog,{open:n,size:"lg",handler:f,animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[r.jsx(x.DialogHeader,{children:r.jsxs("div",{className:"flex justify-between items-center w-full",children:[r.jsx("div",{className:"text-2xl",children:"Cover Photo"}),r.jsx("div",{children:r.jsx(Fe,{className:"text-3xl cursor-pointer",onClick:f})})]})}),r.jsx(x.DialogBody,{className:"lg:m-4 m-2",children:e?r.jsx("div",{className:"w-auto lg:h-[28rem] h-96 ",children:r.jsx(wt,{image:URL.createObjectURL(e),getImage:c,aspectRatio:4/1})}):" "})]})]})},nr=({id:e,ifOtherUser:t})=>{var m,h,b,ie;const n=fe(d=>{var y;return(y=d==null?void 0:d.auth)==null?void 0:y.user}),[s,o]=i.useState(null),[a,c]=i.useState(null),[f,g]=i.useState(!1),[l,v]=i.useState(null),[j,D]=i.useState(!1),[k,N]=i.useState(!1),[M,$]=i.useState(!1),[Y,U]=i.useState([]),[ne,Z]=i.useState([]),S=Ze(),q=vt();i.useEffect(()=>{const d=async()=>{if(n)e===(n==null?void 0:n._id)&&(o((n==null?void 0:n.coverPhoto)||null),c((n==null?void 0:n.dp)||null));else{const P=await y();e===(P==null?void 0:P._id)&&(P!=null&&P.coverPhoto&&o(P.coverPhoto),P!=null&&P.dp&&c(P.dp))}},y=async()=>{const{user:P}=await Be(),{accessToken:le}=He.getState().auth;return S(Ae({user:P,accessToken:le})),P};d()},[S,e,n]);const E=async d=>{try{const{otherUser:y}=await yt(d);v(y),y!=null&&y.coverPhoto?o(y.coverPhoto):o(null),y!=null&&y.dp?c(y.dp):c(null)}catch(y){if(bt(y)){const P=y;P.response&&P.response.status>=400&&P.response.status<=500}}};i.useEffect(()=>{var d;e!==(n==null?void 0:n._id)?(g(!0),t(!0),E(e),(d=n==null?void 0:n.following)!=null&&d.includes(e)?D(!0):D(!1)):(g(!1),t(!1))},[e,t,n]),i.useEffect(()=>{e&&$t(e).then(d=>{U(d.following)})},[e,k]),i.useEffect(()=>{e&&Bt(e).then(d=>{Z(d.followers)})},[e,M]);const[I,W]=i.useState(!1),L=()=>W(!I),[X,V]=i.useState(null),ee=async d=>{if(d)try{const y=new FileReader;y.onload=async P=>{var le;if((le=P.target)!=null&&le.result){const ye=new FormData,re=P.target.result,be=new Blob([re],{type:d.type});ye.append("file",be,"image.jpg");const me=qt(ye);await A.promise(me,{pending:"Image is uploading.....",success:"Successfully updated Profile Photo",error:"Failed to update Profile Photo"},K).then(async ce=>{if(ce){c(ce.dp);const{user:ke}=await Be();S(Ae({user:ke,accessToken:He.getState().auth.accessToken}))}})}},y.readAsArrayBuffer(d)}catch(y){console.error("Upload error:",y)}},F=d=>{ee(d),L()},_=d=>{d.target.files&&d.target.files.length>0&&(V(d.target.files[0]),W(!0))},te=()=>{A.dismiss(),A(r.jsx(Qe,{onDelete:()=>de(),message:"Are you sure you want to delete this DP?"}),K)},de=async()=>{(await Zt()).status==="success"?(A.dismiss(),A.success("DP deleted successfully",K),c(null)):(A.dismiss(),A.error("Error deleting the DP",K))},se=()=>s?r.jsxs(r.Fragment,{children:[r.jsx("img",{src:s,className:"h-full rounded-lg w-full object-fit relative"}),!f&&r.jsx("div",{className:"absolute bottom-2 lg:bottom-4 right-4 lg:right-20",children:r.jsx("div",{className:"flex gap-3",children:r.jsx("div",{className:"flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-500 rounded-full cursor-pointer border-2 border-blue-gray-700 hover:border-red-700 hover:bg-white hover:border-3 group opacity-70 hover:opacity-100",children:r.jsx(Je,{className:"text-xl text-white group-hover:text-red-500",onClick:ve})})})})]}):f?r.jsx("div",{className:"h-full w-full bg-gray-300 rounded-lg"}):r.jsx(tr,{}),T=()=>a?r.jsxs("div",{className:"absolute -bottom-24 lg:left-14 p-4 hover:scale-105 group",children:[r.jsx("img",{className:"h-32 w-32 md:h-36 md:w-36 lg:h-40 lg:w-40 rounded-full border-4 border-white",src:a}),!f&&r.jsx("div",{className:"absolute bottom-7 left-16 md:left-[4.5rem] lg:left-[5rem]",children:r.jsx("div",{className:"flex gap-3",children:r.jsx("div",{className:`flex justify-center items-center w-8 h-8 transition duration-300 ease-in-out bg-blue-gray-500 rounded-full cursor-pointer border-2 border-blue-gray-700 hover:border-red-700 hover:bg-white group-hover:border-3 opacity-0 group-hover:opacity-100`,children:r.jsx(Je,{className:"text-xl text-white hover:text-red-500",onClick:te})})})})]}):f?r.jsx("div",{className:"absolute -bottom-24 lg:left-14 p-4 ",children:r.jsx("div",{className:"h-32 w-32 md:h-36 md:w-36 lg:h-40 lg:w-40 rounded-full border-2 lg:border-4 border-gray-500 border-dashed bg-white m-2 flex items-center justify-center",children:r.jsx(ot,{className:"text-5xl text-gray-500 inline-flex"})})}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"absolute -bottom-24 lg:left-14 p-4 ",children:[r.jsx("input",{type:"file",accept:"image/*",id:"image-input",className:"hidden",onChange:_}),r.jsx("label",{htmlFor:"image-input",className:"h-32 w-32 md:h-36 md:w-36 lg:h-40 lg:w-40 rounded-full border-4 border-gray-500 border-dashed bg-white m-2 flex items-center justify-center cursor-pointer",children:r.jsx(ot,{className:"text-5xl text-gray-500 inline-flex"})})]}),r.jsxs(x.Dialog,{open:I,size:"lg",handler:L,animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[r.jsx(x.DialogHeader,{children:r.jsxs("div",{className:"flex justify-between items-center w-full",children:[r.jsx("div",{className:"text-2xl",children:"Profile Photo"}),r.jsx("div",{children:r.jsx(Fe,{className:"text-3xl cursor-pointer",onClick:L})})]})}),r.jsx(x.DialogBody,{className:"lg:m-4 m-2",children:X?r.jsx("div",{className:"w-auto lg:h-[28rem] h-96 ",children:r.jsx(wt,{image:URL.createObjectURL(X),getImage:F,aspectRatio:4/4})}):" "})]})]}),ve=()=>{A.dismiss(),A(r.jsx(Qe,{onDelete:pe,message:"Are you sure you want to delete the cover photo?"}),K)},pe=async()=>{(await Kt()).status==="success"?(A.dismiss(),A.success("Cover photo deleted successfully",K),o(null)):(A.dismiss(),A.error("Error deleting cover photo",K))},B=()=>{q(`/profile/${n==null?void 0:n._id}/settings`)},oe=()=>{q(`/profile/${n==null?void 0:n._id}/edit-profile`)},G=async(d,y)=>{Ut(d).then(()=>{D(!1),A.dismiss(),A.success(`Following ${y}`,{...K,position:"bottom-left"}),S(Wt(d))})},ae=async(d,y)=>{Gt(d).then(()=>{D(!1),A.dismiss(),A.success(`Unfollowed ${y}`,{...K,position:"bottom-left"}),S(Yt(d))})},z=()=>N(!k),J=()=>$(!M);return r.jsxs(r.Fragment,{children:[r.jsx(Ee,{}),r.jsxs("div",{className:"relative w-full h-44 md:h-60 lg:h-80 px-1 lg:px-10",children:[se(),T(),r.jsxs("div",{className:"flex flex-col justify-between items-start absolute left-40 md:left-44 lg:left-64 -bottom-16",children:[r.jsxs("div",{className:"flex md:flex-row flex-col md:items-center md:gap-2",children:[r.jsx("h2",{className:"mt-2 lg:text-xl text-base font-bold text-black inline",children:f?l==null?void 0:l.name:n==null?void 0:n.name}),r.jsxs("p",{className:"text-sm font-light text-gray-600 md:mt-2",children:["@",f?l==null?void 0:l.username:n==null?void 0:n.username]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("span",{className:"lg:text-sm text-xs font-bold text-socioverse-500 cursor-pointer",onClick:z,children:[f?(m=l==null?void 0:l.following)==null?void 0:m.length:(h=n==null?void 0:n.following)==null?void 0:h.length," ","following"]}),r.jsxs("span",{className:"lg:text-sm text-xs font-bold text-socioverse-500 cursor-pointer",onClick:J,children:[f?(b=l==null?void 0:l.followers)==null?void 0:b.length:(ie=n==null?void 0:n.followers)==null?void 0:ie.length," ","followers"]})]})]}),r.jsx("div",{className:"md:flex items-center justify-between gap-5 absolute hidden md:-bottom-14 md:right-20",children:f?r.jsx(r.Fragment,{children:j?r.jsx(x.Button,{variant:"outlined",className:"rounded-full text-black border-black",onClick:()=>ae(e,l==null?void 0:l.name),children:"Following"}):r.jsx(x.Button,{className:"rounded-full bg-socioverse-500",onClick:()=>G(e,l==null?void 0:l.name),children:"Follow"})}):r.jsxs(r.Fragment,{children:[r.jsx(x.Button,{variant:"outlined",className:"rounded-full text-black border-black",onClick:B,children:"Settings"}),r.jsx(x.Button,{className:"rounded-full bg-socioverse-500",onClick:oe,children:"Edit Profile"})]})}),r.jsx("div",{className:"flex md:hidden absolute right-0 -bottom-14",children:r.jsxs(x.Menu,{placement:"bottom-start",children:[r.jsx(x.MenuHandler,{children:r.jsx(x.Button,{color:"blue-gray",size:"sm",variant:"text",className:"focus:outline-none",children:r.jsx(Ht,{className:"text-lg transition duration-150 ease-in-out hover:scale-105"})})}),r.jsx(x.MenuList,{className:"z-50",children:f?j?r.jsx(x.MenuItem,{onClick:()=>ae(e,l==null?void 0:l.name),className:"hover:bg-blue-gray-50",children:"Unfollow"}):r.jsx(x.MenuItem,{onClick:()=>G(e,l==null?void 0:l.name),className:"hover:bg-blue-gray-50",children:"Follow"}):r.jsxs(r.Fragment,{children:[r.jsx(x.MenuItem,{onClick:B,className:"hover:bg-blue-gray-50",children:"Settings"}),r.jsx(x.MenuItem,{onClick:oe,className:"hover:bg-blue-gray-50",children:"Edit Profile"})]})})]})})]}),r.jsxs(x.Dialog,{open:k,size:"xs",handler:z,animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[r.jsx(x.DialogHeader,{children:r.jsxs("div",{className:"flex justify-between items-center w-full",children:[r.jsx("h1",{className:"text-xl font-semibold",children:"Following List"}),r.jsx("div",{children:r.jsx(Fe,{className:"text-3xl cursor-pointer",onClick:z})})]})}),r.jsx(Ee,{}),r.jsx(x.DialogBody,{className:"flex flex-col gap-4 lg:mx-4 lg:my-0 m-2 max-h-[20.5rem] overflow-y-scroll",children:r.jsx("div",{className:"flex flex-col gap-2 ",children:Y.map(d=>r.jsx("div",{className:"flex p-2 items-center justify-between transition duration-100 ease-in-out hover:shadow-md hover:scale-105 hover:rounded-lg",children:r.jsxs("div",{className:"mt-3 flex items-center space-x-2",onClick:()=>{z(),q(`/profile/${d._id}`)},children:[r.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:d.dp?d.dp:Ve.DEFAULT_IMG,alt:"user dp"}),r.jsxs("span",{className:"flex flex-col",children:[r.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:d==null?void 0:d.name}),r.jsx("span",{className:"text-[11px] font-medium text-gray-500",children:d.username?`@${d.username}`:"@ -"})]})]})},d._id))})}),r.jsx(x.DialogFooter,{children:void 0})]}),r.jsxs(x.Dialog,{open:M,size:"xs",handler:J,animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[r.jsx(x.DialogHeader,{children:r.jsxs("div",{className:"flex justify-between items-center w-full",children:[r.jsx("h1",{className:"text-xl font-semibold",children:"Followers List"}),r.jsx("div",{children:r.jsx(Fe,{className:"text-3xl cursor-pointer",onClick:J})})]})}),r.jsx(Ee,{}),r.jsx(x.DialogBody,{className:"flex flex-col gap-4 lg:mx-4 lg:my-0 m-2 max-h-[20.5rem] overflow-y-scroll",children:r.jsx("div",{className:"flex flex-col gap-2 ",children:ne.map(d=>r.jsx("div",{className:"flex p-2 items-center justify-between transition duration-100 ease-in-out hover:shadow-md hover:scale-105 hover:rounded-lg",children:r.jsxs("div",{className:"mt-3 flex items-center space-x-2",onClick:()=>{J(),q(`/profile/${d._id}`)},children:[r.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:d.dp?d.dp:Ve.DEFAULT_IMG,alt:"user dp"}),r.jsxs("span",{className:"flex flex-col",children:[r.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:d==null?void 0:d.name}),r.jsx("span",{className:"text-[11px] font-medium text-gray-500",children:d.username?`@${d.username}`:"@ -"})]})]})},d._id))})}),r.jsx(x.DialogFooter,{children:void 0})]})]})},rr=({id:e,otherUser:t})=>{const n=fe(a=>{var c;return(c=a==null?void 0:a.auth)==null?void 0:c.user}),[s,o]=i.useState(null);return i.useEffect(()=>{t&&e&&yt(e).then(a=>{o(a.otherUser)})},[e,t]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex flex-col w-full h-fit justify-start shadow-lg rounded-lg px-5 py-5 border overflow-auto whitespace-normal",children:[r.jsx("h2",{className:" lg:text-xl text-base font-bold text-black inline",children:"Bio"}),r.jsx("p",{className:"text-sm font-light text-gray-600 mt-2",children:t&&s?s==null?void 0:s.bio:n==null?void 0:n.bio})]}),r.jsxs("div",{className:`flex flex-col w-full h-fit justify-start shadow-lg rounded-lg px-5 py-5 border mt-8 overflow-auto whitespace-normal`,children:[r.jsx("h2",{className:" lg:text-xl text-base font-bold text-black inline mb-3",children:"Contact"}),r.jsxs("div",{className:"flex flex-col items-start justify-start gap-4",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-gray-100/50 flex items-center justify-center",children:r.jsx(Vt,{className:"text-xl text-socioverse-500"})}),r.jsx("p",{className:"text-sm font-light text-gray-600",children:t&&s?s==null?void 0:s.email:n==null?void 0:n.email})]}),r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-gray-100/50 flex items-center justify-center",children:r.jsx(Jt,{className:"text-xl text-socioverse-500"})}),r.jsx("p",{className:"text-sm font-light text-gray-600",children:t&&s?s==null?void 0:s.phoneNumber:n==null?void 0:n.phoneNumber})]})]})]})]})};function sr({userId:e}){const t=fe(m=>{var h,b;return(b=(h=m==null?void 0:m.auth)==null?void 0:h.user)==null?void 0:b._id}),[n,s]=i.useState([]),[o,a]=i.useState([]),[c,f]=i.useState([]),[g,l]=i.useState([]),[v,j]=i.useState(null),[D,k]=i.useState(null),[N,M]=i.useState(null),[$,Y]=i.useState(null),[U,ne]=i.useState(null),[Z,S]=i.useState(!1),[q,E]=i.useState(!1),[I,W]=i.useState(1),[L,X]=i.useState(1),[V,ee]=i.useState(1),[F,_]=i.useState(1),[te,de]=i.useState("myPosts"),[se,T]=i.useState(!1),[ve,pe]=i.useState(!1),B=i.useRef(null);i.useEffect(()=>{e&&(X(1),a([]))},[e]),i.useEffect(()=>{S(!1)},[e]),i.useEffect(()=>{I===1&&e===t&&(E(!0),oe(),E(!1))},[I,e,t]),i.useEffect(()=>{L===1&&e&&e!==t&&(E(!0),G(),E(!1))},[L,e,t]),i.useEffect(()=>{v&&(s(n.filter(m=>m._id!==v)),f(c.filter(m=>m._id!==v)),l(g.filter(m=>m._id!==v)),j(null)),D&&k(null),N&&(s(n.map(m=>m._id===N._id?N:m)),f(c.map(m=>m._id===N._id?N:m)),l(g.map(m=>m._id===N._id?N:m)),M(null))},[v,D,N]),i.useEffect(()=>{$&&((async()=>{if($.action){const h=await rt($.postId);f([h.post,...c])}else f(c.filter(h=>h._id!==$.postId));Y(null)})(),Y(null)),U&&((async()=>{if(U.action){const h=await rt(U.postId);l([h.post,...g])}else l(g.filter(h=>h._id!==U.postId))})(),ne(null))},[$,U]),i.useEffect(()=>{S(!1)},[te]);const oe=async()=>{const m=await Xe(I);s(m.posts),W(I+1),m.posts.length<3&&S(!0)},G=async()=>{if(e&&e!==t){const m=await et(e,I);a(m.posts),X(L+1),m.posts.length<3&&S(!0)}},ae=async m=>{if(E(!0),m==="saved"&&!ve){const h=await tt(F);l(h.posts),_(F+1),pe(!0)}else if(m==="liked"&&!se){const h=await nt(V);f(h.posts),ee(V+1),T(!0)}E(!1)},z=[{label:"My Posts",value:"myPosts",desc:n.length>0?n:"No posts yet posted by the user"},{label:"Liked",value:"liked",desc:c.length>0?c:"No posts yet liked by the user"},{label:"Saved",value:"saved",desc:g.length>0?g:"No posts yet saved by the user"}],J=[{label:"Posts",value:"myPosts",desc:o.length>0?o:"No posts yet posted by the user"}];return i.useEffect(()=>{const m=new IntersectionObserver(async h=>{if(h[0].isIntersecting&&!q&&!Z){if(E(!0),e===t){if(te==="myPosts"){const b=await Xe(I);if(b.posts.length===0){E(!1),S(!0);return}s([...n,...b.posts]),W(I+1)}else if(te==="saved"){const b=await tt(F);if(b.posts.length===0){E(!1),S(!0);return}l([...g,...b.posts]),_(F+1)}else if(te==="liked"){const b=await nt(V);if(b.posts.length===0){E(!1),S(!0);return}f([...c,...b.posts]),ee(V+1)}}else{const b=e&&await et(e,L);if(b&&b.posts.length===0){E(!1),S(!0);return}b&&a([...o,...b.posts]),X(L+1)}E(!1)}},{threshold:1});return B.current&&m.observe(B.current),()=>{B.current&&m.unobserve(B.current)}},[q,I,Z,te,e,L]),r.jsxs(x.Tabs,{id:"custom-animation",value:"myPosts",children:[r.jsx(x.TabsHeader,{className:"sticky overflow-y-hidden",children:(t===e?z:J).map(({label:m,value:h})=>r.jsx(x.Tab,{value:h,onClick:()=>{ae(h),de(h)},children:r.jsx("h4",{className:"lg:text-base text-sm",children:m})},h))}),r.jsx(x.TabsBody,{animate:{initial:{y:250},mount:{y:0},unmount:{y:250}},className:"overflow-y-auto h-[80vh] no-scrollbar",children:(t===e?z:J).map(({value:m,desc:h})=>r.jsx(x.TabPanel,{value:m,className:"mx-auto",children:typeof h=="string"?r.jsx("h1",{className:"",children:h}):r.jsxs("div",{className:"flex flex-col gap-5 lg:w-[30rem] md:w-96 w-80 mx-auto",children:[h.map(b=>r.jsx(r.Fragment,{children:r.jsx(Qt,{postData:b,setDeletedPostId:j,setReportedPostId:k,setPostEdited:M,setSavedPostId:ne,setLikedPostId:Y},b._id+m)})),!Z&&r.jsx("div",{className:"w-full px-2 mt-5",children:r.jsx(Xt,{})}),Z&&r.jsx("div",{className:"text-center mt-5",children:" No posts..."}),r.jsx("div",{id:"sentinel",style:{height:"1px"},className:"mt-10 mb-20",ref:B,children:!Z&&r.jsx("img",{src:en,className:"w-20 h-20 mx-auto"})})]})},m))})]})}const or=()=>{const e=tn(),t=fe(c=>{var f;return(f=c==null?void 0:c.auth)==null?void 0:f.user}),{userId:n}=nn(),[s,o]=i.useState(!1),a=c=>{o(c)};return r.jsx(r.Fragment,{children:r.jsxs("div",{className:"flex flex-col justify-evenly items-start lg:mx-5 ",children:[r.jsx("div",{className:" no-scrollbar overflow-y-hidden w-full lg:h-[26rem] md:h-80 h-64",children:r.jsx(nr,{id:n||null,ifOtherUser:a})}),r.jsxs("div",{className:"flex flex-col md:flex-row items-start w-full gap-5 md:h-[85vh] lg:h-[90vh]",children:[r.jsx("div",{className:st("flex flex-col lg:px-10 px-2 w-full md:w-4/12 mt-8 sticky overflow-y-hidden md:h-[85vh]",{"hidden md:block":e.pathname===`/profile/${t==null?void 0:t._id}/settings`||e.pathname===`/profile/${t==null?void 0:t._id}/edit-profile`}),children:r.jsx(rr,{id:n||null,otherUser:s})}),r.jsx("div",{className:st("flex flex-col lg:pr-10 w-full md:w-8/12 mt-8 sticky overflow-y-auto",{"h-[55vh] md:h-[60vh]":e.pathname===`/profile/${t==null?void 0:t._id}/settings`},{"h-[95vh] md:h-[90vh]":e.pathname===`/profile/${t==null?void 0:t._id}/edit-profile`},{"h-[80vh]":e.pathname===`/profile/${t==null?void 0:t._id}`}),children:e.pathname===`/profile/${t==null?void 0:t._id}/settings`&&t?r.jsx(rn,{}):e.pathname===`/profile/${t==null?void 0:t._id}/edit-profile`&&t?r.jsx("div",{className:"mb-10 overflow-y-hidden",children:r.jsx(sn,{})}):r.jsx("div",{className:"overflow-y-hidden no-scrollbar",children:r.jsx(sr,{userId:n})})})]})]})})},lr=()=>{const e=fe(o=>o.auth),t=Ze(),n=vt();i.useEffect(()=>{e.isAuthenticated||s()||n("/error")},[e]);const s=async()=>{try{const{user:o}=await Be(),{accessToken:a}=He.getState().auth;return t(Ae({user:o,accessToken:a})),o}catch(o){if(bt(o)){const a=o;a.response&&a.response.status>=400&&a.response.status<=500&&n("/login")}}};return r.jsx(r.Fragment,{children:r.jsx(or,{})})};export{lr as default}; diff --git a/client/dist/assets/SharedPostPage-2fad1a1d.js b/client/dist/assets/SharedPostPage-f740ce47.js similarity index 96% rename from client/dist/assets/SharedPostPage-2fad1a1d.js rename to client/dist/assets/SharedPostPage-f740ce47.js index 0816929..bfccb64 100644 --- a/client/dist/assets/SharedPostPage-2fad1a1d.js +++ b/client/dist/assets/SharedPostPage-f740ce47.js @@ -1,2 +1,2 @@ -import{n as m,a as x,j as e,c as i,C as v,aH as N,u as b,aw as w,r as o,aI as u,d as S,s as y,e as D,U as I,av as P,W as A}from"./index-0b7b17fe.js";const E=({openAlert:a,handleOpenAlert:n,postId:l})=>{const r=m(),c=x();return e.jsxs(i.Dialog,{open:a,size:"md",handler:n,dismiss:{enabled:!1},animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[e.jsx(i.DialogHeader,{children:e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsx("div",{className:"text-2xl",children:"Login Alert"}),e.jsx("div",{})]})}),e.jsx(i.DialogBody,{className:"mx-4 mb-8",children:e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:"text-md w-full border-2 p-4 rounded-lg bg-red-50 border-red-500",children:"Inorder to view the post, user must be logged in."}),e.jsx("div",{className:"w-96 h-96 mb-4 px-4 md:px-0",children:e.jsx("img",{src:v.LOGIN_ALERT_SVG,alt:"login alert svg"})}),e.jsx(i.Button,{className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded ml-auto ",onClick:()=>{c(N(l)),r("/login")},children:"Login"})]})})]})},O=()=>{const a=x(),n=m(),l=b(s=>s.auth.user),{postId:r}=w(),[c,f]=o.useState(null),[h,d]=o.useState(!1),g=()=>{d(s=>!s)};o.useEffect(()=>(a(u(!0)),()=>{a(u(!1))}),[]),o.useEffect(()=>{j(r)},[r]),o.useEffect(()=>{l||p()||n("/error")},[l]);const p=async()=>{try{const{user:s}=await S(),{accessToken:t}=y.getState().auth;return a(D({user:s,accessToken:t})),s}catch(s){if(I(s)){const t=s;t.response&&t.response.status>=400&&t.response.status<=500&&d(!0)}}},j=async s=>{const t=await P(s);t.post?f(t.post):n("/error")};return e.jsxs(e.Fragment,{children:[c&&e.jsx("div",{className:`flex items-center justify-center lg:w-[30rem] +import{n as m,a as x,j as e,c as i,C as v,aH as N,u as b,aw as w,r as o,aI as u,d as S,s as y,e as D,U as I,av as P,W as A}from"./index-f946f455.js";const E=({openAlert:a,handleOpenAlert:n,postId:l})=>{const r=m(),c=x();return e.jsxs(i.Dialog,{open:a,size:"md",handler:n,dismiss:{enabled:!1},animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[e.jsx(i.DialogHeader,{children:e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsx("div",{className:"text-2xl",children:"Login Alert"}),e.jsx("div",{})]})}),e.jsx(i.DialogBody,{className:"mx-4 mb-8",children:e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:"text-md w-full border-2 p-4 rounded-lg bg-red-50 border-red-500",children:"Inorder to view the post, user must be logged in."}),e.jsx("div",{className:"w-96 h-96 mb-4 px-4 md:px-0",children:e.jsx("img",{src:v.LOGIN_ALERT_SVG,alt:"login alert svg"})}),e.jsx(i.Button,{className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded ml-auto ",onClick:()=>{c(N(l)),r("/login")},children:"Login"})]})})]})},O=()=>{const a=x(),n=m(),l=b(s=>s.auth.user),{postId:r}=w(),[c,f]=o.useState(null),[h,d]=o.useState(!1),g=()=>{d(s=>!s)};o.useEffect(()=>(a(u(!0)),()=>{a(u(!1))}),[]),o.useEffect(()=>{j(r)},[r]),o.useEffect(()=>{l||p()||n("/error")},[l]);const p=async()=>{try{const{user:s}=await S(),{accessToken:t}=y.getState().auth;return a(D({user:s,accessToken:t})),s}catch(s){if(I(s)){const t=s;t.response&&t.response.status>=400&&t.response.status<=500&&d(!0)}}},j=async s=>{const t=await P(s);t.post?f(t.post):n("/error")};return e.jsxs(e.Fragment,{children:[c&&e.jsx("div",{className:`flex items-center justify-center lg:w-[30rem] md:w-96 w-80 mx-auto mt-8`,children:e.jsx(A,{postData:c})}),e.jsx(E,{openAlert:h,handleOpenAlert:g,postId:r})]})};export{O as default}; diff --git a/client/dist/assets/index-0b7b17fe.js b/client/dist/assets/index-0b7b17fe.js deleted file mode 100644 index 1760bf6..0000000 --- a/client/dist/assets/index-0b7b17fe.js +++ /dev/null @@ -1,2701 +0,0 @@ -var Bre=Object.defineProperty;var Vre=(e,t,r)=>t in e?Bre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var yt=(e,t,r)=>(Vre(e,typeof t!="symbol"?t+"":t,r),r);function Hre(e,t){for(var r=0;rn[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();var fo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function El(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Wc(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){if(this instanceof n){var o=[null];o.push.apply(o,arguments);var a=Function.bind.apply(t,o);return new a}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var W$={exports:{}},j3={},q$={exports:{}},Ct={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var b1=Symbol.for("react.element"),Ure=Symbol.for("react.portal"),Wre=Symbol.for("react.fragment"),qre=Symbol.for("react.strict_mode"),Gre=Symbol.for("react.profiler"),Kre=Symbol.for("react.provider"),Yre=Symbol.for("react.context"),Xre=Symbol.for("react.forward_ref"),Zre=Symbol.for("react.suspense"),Qre=Symbol.for("react.memo"),Jre=Symbol.for("react.lazy"),TT=Symbol.iterator;function ene(e){return e===null||typeof e!="object"?null:(e=TT&&e[TT]||e["@@iterator"],typeof e=="function"?e:null)}var G$={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},K$=Object.assign,Y$={};function lf(e,t,r){this.props=e,this.context=t,this.refs=Y$,this.updater=r||G$}lf.prototype.isReactComponent={};lf.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};lf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function X$(){}X$.prototype=lf.prototype;function SE(e,t,r){this.props=e,this.context=t,this.refs=Y$,this.updater=r||G$}var TE=SE.prototype=new X$;TE.constructor=SE;K$(TE,lf.prototype);TE.isPureReactComponent=!0;var PT=Array.isArray,Z$=Object.prototype.hasOwnProperty,PE={current:null},Q$={key:!0,ref:!0,__self:!0,__source:!0};function J$(e,t,r){var n,o={},a=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)Z$.call(t,n)&&!Q$.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1>>1,W=q[$];if(0>>1;$o(Z,F))Uo(J,Z)?(q[$]=J,q[U]=F,$=U):(q[$]=Z,q[Q]=F,$=Q);else if(Uo(J,F))q[$]=J,q[U]=F,$=U;else break e}}return z}function o(q,z){var F=q.sortIndex-z.sortIndex;return F!==0?F:q.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var l=[],c=[],u=1,p=null,h=3,v=!1,_=!1,w=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(q){for(var z=r(c);z!==null;){if(z.callback===null)n(c);else if(z.startTime<=q)n(c),z.sortIndex=z.expirationTime,t(l,z);else break;z=r(c)}}function d(q){if(w=!1,b(q),!_)if(r(l)!==null)_=!0,B(x);else{var z=r(c);z!==null&&V(d,z.startTime-q)}}function x(q,z){_=!1,w&&(w=!1,m(k),k=-1),v=!0;var F=h;try{for(b(z),p=r(l);p!==null&&(!(p.expirationTime>z)||q&&!T());){var $=p.callback;if(typeof $=="function"){p.callback=null,h=p.priorityLevel;var W=$(p.expirationTime<=z);z=e.unstable_now(),typeof W=="function"?p.callback=W:p===r(l)&&n(l),b(z)}else n(l);p=r(l)}if(p!==null)var G=!0;else{var Q=r(c);Q!==null&&V(d,Q.startTime-z),G=!1}return G}finally{p=null,h=F,v=!1}}var E=!1,C=null,k=-1,S=5,R=-1;function T(){return!(e.unstable_now()-Rq||125$?(q.sortIndex=F,t(c,q),r(l)===null&&q===r(c)&&(w?(m(k),k=-1):w=!0,V(d,F-$))):(q.sortIndex=W,t(l,q),_||v||(_=!0,B(x))),q},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(q){var z=h;return function(){var F=h;h=z;try{return q.apply(this,arguments)}finally{h=F}}}})(nD);rD.exports=nD;var dne=rD.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var oD=g,yo=dne;function Ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$_=Object.prototype.hasOwnProperty,fne=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,AT={},jT={};function hne(e){return $_.call(jT,e)?!0:$_.call(AT,e)?!1:fne.test(e)?jT[e]=!0:(AT[e]=!0,!1)}function pne(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mne(e,t,r,n){if(t===null||typeof t>"u"||pne(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function In(e,t,r,n,o,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var cn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){cn[e]=new In(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];cn[t]=new In(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){cn[e]=new In(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){cn[e]=new In(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){cn[e]=new In(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){cn[e]=new In(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){cn[e]=new In(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){cn[e]=new In(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){cn[e]=new In(e,5,!1,e.toLowerCase(),null,!1,!1)});var jE=/[\-:]([a-z])/g;function IE(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(jE,IE);cn[t]=new In(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(jE,IE);cn[t]=new In(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(jE,IE);cn[t]=new In(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){cn[e]=new In(e,1,!1,e.toLowerCase(),null,!1,!1)});cn.xlinkHref=new In("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){cn[e]=new In(e,1,!1,e.toLowerCase(),null,!0,!0)});function LE(e,t,r,n){var o=cn.hasOwnProperty(t)?cn[t]:null;(o!==null?o.type!==0:n||!(2s||o[i]!==a[s]){var l=` -`+o[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{A6=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?R0(e):""}function gne(e){switch(e.tag){case 5:return R0(e.type);case 16:return R0("Lazy");case 13:return R0("Suspense");case 19:return R0("SuspenseList");case 0:case 2:case 15:return e=j6(e.type,!1),e;case 11:return e=j6(e.type.render,!1),e;case 1:return e=j6(e.type,!0),e;default:return""}}function B_(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Fu:return"Fragment";case Du:return"Portal";case D_:return"Profiler";case NE:return"StrictMode";case F_:return"Suspense";case z_:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case sD:return(e.displayName||"Context")+".Consumer";case iD:return(e._context.displayName||"Context")+".Provider";case $E:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case DE:return t=e.displayName||null,t!==null?t:B_(e.type)||"Memo";case Es:t=e._payload,e=e._init;try{return B_(e(t))}catch{}}return null}function vne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B_(t);case 8:return t===NE?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function fl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function cD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bne(e){var t=cD(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){n=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function S5(e){e._valueTracker||(e._valueTracker=bne(e))}function uD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=cD(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Dy(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function V_(e,t){var r=t.checked;return kr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function LT(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=fl(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function dD(e,t){t=t.checked,t!=null&&LE(e,"checked",t,!1)}function H_(e,t){dD(e,t);var r=fl(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?U_(e,t.type,r):t.hasOwnProperty("defaultValue")&&U_(e,t.type,fl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function NT(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function U_(e,t,r){(t!=="number"||Dy(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var S0=Array.isArray;function cd(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=T5.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xp(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Hh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yne=["Webkit","ms","Moz","O"];Object.keys(Hh).forEach(function(e){yne.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Hh[t]=Hh[e]})});function mD(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Hh.hasOwnProperty(e)&&Hh[e]?(""+t).trim():t+"px"}function gD(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=mD(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var wne=kr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function G_(e,t){if(t){if(wne[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ie(62))}}function K_(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Y_=null;function FE(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var X_=null,ud=null,dd=null;function FT(e){if(e=x1(e)){if(typeof X_!="function")throw Error(Ie(280));var t=e.stateNode;t&&(t=D3(t),X_(e.stateNode,e.type,t))}}function vD(e){ud?dd?dd.push(e):dd=[e]:ud=e}function bD(){if(ud){var e=ud,t=dd;if(dd=ud=null,FT(e),t)for(e=0;e>>=0,e===0?32:31-(Mne(e)/Ane|0)|0}var P5=64,M5=4194304;function T0(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Vy(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,a=e.pingedLanes,i=r&268435455;if(i!==0){var s=i&~o;s!==0?n=T0(s):(a&=i,a!==0&&(n=T0(a)))}else i=r&~o,i!==0?n=T0(i):a!==0&&(n=T0(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,a=t&-t,o>=a||o===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function y1(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ya(t),e[t]=r}function Nne(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Wh),KT=String.fromCharCode(32),YT=!1;function DD(e,t){switch(e){case"keyup":return uoe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function FD(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zu=!1;function foe(e,t){switch(e){case"compositionend":return FD(t);case"keypress":return t.which!==32?null:(YT=!0,KT);case"textInput":return e=t.data,e===KT&&YT?null:e;default:return null}}function hoe(e,t){if(zu)return e==="compositionend"||!GE&&DD(e,t)?(e=ND(),Lm=UE=js=null,zu=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=JT(r)}}function HD(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?HD(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function UD(){for(var e=window,t=Dy();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Dy(e.document)}return t}function KE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function _oe(e){var t=UD(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&HD(r.ownerDocument.documentElement,r)){if(n!==null&&KE(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,a=Math.min(n.start,o);n=n.end===void 0?a:Math.min(n.end,o),!e.extend&&a>n&&(o=n,n=a,a=o),o=eP(r,a);var i=eP(r,n);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Bu=null,r8=null,Gh=null,n8=!1;function tP(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;n8||Bu==null||Bu!==Dy(n)||(n=Bu,"selectionStart"in n&&KE(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Gh&&Rp(Gh,n)||(Gh=n,n=Wy(r8,"onSelect"),0Uu||(e.current=c8[Uu],c8[Uu]=null,Uu--)}function nr(e,t){Uu++,c8[Uu]=e.current,e.current=t}var hl={},_n=Ol(hl),Zn=Ol(!1),Sc=hl;function jd(e,t){var r=e.type.contextTypes;if(!r)return hl;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in r)o[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Qn(e){return e=e.childContextTypes,e!=null}function Gy(){sr(Zn),sr(_n)}function lP(e,t,r){if(_n.current!==hl)throw Error(Ie(168));nr(_n,t),nr(Zn,r)}function JD(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(Ie(108,vne(e)||"Unknown",o));return kr({},r,n)}function Ky(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hl,Sc=_n.current,nr(_n,e),nr(Zn,Zn.current),!0}function cP(e,t,r){var n=e.stateNode;if(!n)throw Error(Ie(169));r?(e=JD(e,t,Sc),n.__reactInternalMemoizedMergedChildContext=e,sr(Zn),sr(_n),nr(_n,e)):sr(Zn),nr(Zn,r)}var xi=null,F3=!1,G6=!1;function eF(e){xi===null?xi=[e]:xi.push(e)}function Ioe(e){F3=!0,eF(e)}function kl(){if(!G6&&xi!==null){G6=!0;var e=0,t=Wt;try{var r=xi;for(Wt=1;e>=i,o-=i,Oi=1<<32-ya(t)+o|r<k?(S=C,C=null):S=C.sibling;var R=h(m,C,b[k],d);if(R===null){C===null&&(C=S);break}e&&C&&R.alternate===null&&t(m,C),f=a(R,f,k),E===null?x=R:E.sibling=R,E=R,C=S}if(k===b.length)return r(m,C),gr&&Jl(m,k),x;if(C===null){for(;kk?(S=C,C=null):S=C.sibling;var T=h(m,C,R.value,d);if(T===null){C===null&&(C=S);break}e&&C&&T.alternate===null&&t(m,C),f=a(T,f,k),E===null?x=T:E.sibling=T,E=T,C=S}if(R.done)return r(m,C),gr&&Jl(m,k),x;if(C===null){for(;!R.done;k++,R=b.next())R=p(m,R.value,d),R!==null&&(f=a(R,f,k),E===null?x=R:E.sibling=R,E=R);return gr&&Jl(m,k),x}for(C=n(m,C);!R.done;k++,R=b.next())R=v(C,m,k,R.value,d),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?k:R.key),f=a(R,f,k),E===null?x=R:E.sibling=R,E=R);return e&&C.forEach(function(P){return t(m,P)}),gr&&Jl(m,k),x}function y(m,f,b,d){if(typeof b=="object"&&b!==null&&b.type===Fu&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case R5:e:{for(var x=b.key,E=f;E!==null;){if(E.key===x){if(x=b.type,x===Fu){if(E.tag===7){r(m,E.sibling),f=o(E,b.props.children),f.return=m,m=f;break e}}else if(E.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Es&&gP(x)===E.type){r(m,E.sibling),f=o(E,b.props),f.ref=n0(m,E,b),f.return=m,m=f;break e}r(m,E);break}else t(m,E);E=E.sibling}b.type===Fu?(f=wc(b.props.children,m.mode,d,b.key),f.return=m,m=f):(d=Hm(b.type,b.key,b.props,null,m.mode,d),d.ref=n0(m,f,b),d.return=m,m=d)}return i(m);case Du:e:{for(E=b.key;f!==null;){if(f.key===E)if(f.tag===4&&f.stateNode.containerInfo===b.containerInfo&&f.stateNode.implementation===b.implementation){r(m,f.sibling),f=o(f,b.children||[]),f.return=m,m=f;break e}else{r(m,f);break}else t(m,f);f=f.sibling}f=tx(b,m.mode,d),f.return=m,m=f}return i(m);case Es:return E=b._init,y(m,f,E(b._payload),d)}if(S0(b))return _(m,f,b,d);if(Qf(b))return w(m,f,b,d);D5(m,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,f!==null&&f.tag===6?(r(m,f.sibling),f=o(f,b),f.return=m,m=f):(r(m,f),f=ex(b,m.mode,d),f.return=m,m=f),i(m)):r(m,f)}return y}var Ld=lF(!0),cF=lF(!1),_1={},Ua=Ol(_1),Mp=Ol(_1),Ap=Ol(_1);function hc(e){if(e===_1)throw Error(Ie(174));return e}function nC(e,t){switch(nr(Ap,t),nr(Mp,e),nr(Ua,_1),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:q_(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=q_(t,e)}sr(Ua),nr(Ua,t)}function Nd(){sr(Ua),sr(Mp),sr(Ap)}function uF(e){hc(Ap.current);var t=hc(Ua.current),r=q_(t,e.type);t!==r&&(nr(Mp,e),nr(Ua,r))}function oC(e){Mp.current===e&&(sr(Ua),sr(Mp))}var _r=Ol(0);function e7(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var K6=[];function aC(){for(var e=0;er?r:4,e(!0);var n=Y6.transition;Y6.transition={};try{e(!1),t()}finally{Wt=r,Y6.transition=n}}function kF(){return Yo().memoizedState}function Doe(e,t,r){var n=Xs(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},RF(e))SF(t,r);else if(r=oF(e,t,r,n),r!==null){var o=An();wa(r,e,n,o),TF(r,t,n)}}function Foe(e,t,r){var n=Xs(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(RF(e))SF(t,o);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,s=a(i,r);if(o.hasEagerState=!0,o.eagerState=s,xa(s,i)){var l=t.interleaved;l===null?(o.next=o,tC(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=oF(e,t,o,n),r!==null&&(o=An(),wa(r,e,n,o),TF(r,t,n))}}function RF(e){var t=e.alternate;return e===Or||t!==null&&t===Or}function SF(e,t){Kh=t7=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function TF(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,BE(e,r)}}var r7={readContext:Ko,useCallback:hn,useContext:hn,useEffect:hn,useImperativeHandle:hn,useInsertionEffect:hn,useLayoutEffect:hn,useMemo:hn,useReducer:hn,useRef:hn,useState:hn,useDebugValue:hn,useDeferredValue:hn,useTransition:hn,useMutableSource:hn,useSyncExternalStore:hn,useId:hn,unstable_isNewReconciler:!1},zoe={readContext:Ko,useCallback:function(e,t){return La().memoizedState=[e,t===void 0?null:t],e},useContext:Ko,useEffect:bP,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Fm(4194308,4,xF.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Fm(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fm(4,2,e,t)},useMemo:function(e,t){var r=La();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=La();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Doe.bind(null,Or,e),[n.memoizedState,e]},useRef:function(e){var t=La();return e={current:e},t.memoizedState=e},useState:vP,useDebugValue:uC,useDeferredValue:function(e){return La().memoizedState=e},useTransition:function(){var e=vP(!1),t=e[0];return e=$oe.bind(null,e[1]),La().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Or,o=La();if(gr){if(r===void 0)throw Error(Ie(407));r=r()}else{if(r=t(),Zr===null)throw Error(Ie(349));Pc&30||hF(n,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,bP(mF.bind(null,n,a,e),[e]),n.flags|=2048,Lp(9,pF.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=La(),t=Zr.identifierPrefix;if(gr){var r=ki,n=Oi;r=(n&~(1<<32-ya(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=jp++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[za]=t,e[Pp]=n,DF(e,t,!1,!1),t.stateNode=e;e:{switch(i=K_(r,n),r){case"dialog":or("cancel",e),or("close",e),o=n;break;case"iframe":case"object":case"embed":or("load",e),o=n;break;case"video":case"audio":for(o=0;oDd&&(t.flags|=128,n=!0,o0(a,!1),t.lanes=4194304)}else{if(!n)if(e=e7(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),o0(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!gr)return pn(t),null}else 2*Pr()-a.renderingStartTime>Dd&&r!==1073741824&&(t.flags|=128,n=!0,o0(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(r=a.last,r!==null?r.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Pr(),t.sibling=null,r=_r.current,nr(_r,n?r&1|2:r&1),t):(pn(t),null);case 22:case 23:return gC(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?lo&1073741824&&(pn(t),t.subtreeFlags&6&&(t.flags|=8192)):pn(t),null;case 24:return null;case 25:return null}throw Error(Ie(156,t.tag))}function Koe(e,t){switch(XE(t),t.tag){case 1:return Qn(t.type)&&Gy(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nd(),sr(Zn),sr(_n),aC(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return oC(t),null;case 13:if(sr(_r),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ie(340));Id()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return sr(_r),null;case 4:return Nd(),null;case 10:return eC(t.type._context),null;case 22:case 23:return gC(),null;case 24:return null;default:return null}}var z5=!1,wn=!1,Yoe=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function Ku(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Rr(e,t,n)}else r.current=null}function x8(e,t,r){try{r()}catch(n){Rr(e,t,n)}}var RP=!1;function Xoe(e,t){if(o8=Hy,e=UD(),KE(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var i=0,s=-1,l=-1,c=0,u=0,p=e,h=null;t:for(;;){for(var v;p!==r||o!==0&&p.nodeType!==3||(s=i+o),p!==a||n!==0&&p.nodeType!==3||(l=i+n),p.nodeType===3&&(i+=p.nodeValue.length),(v=p.firstChild)!==null;)h=p,p=v;for(;;){if(p===e)break t;if(h===r&&++c===o&&(s=i),h===a&&++u===n&&(l=i),(v=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=v}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(a8={focusedElem:e,selectionRange:r},Hy=!1,Ue=t;Ue!==null;)if(t=Ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ue=e;else for(;Ue!==null;){t=Ue;try{var _=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var w=_.memoizedProps,y=_.memoizedState,m=t.stateNode,f=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:sa(t.type,w),y);m.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ie(163))}}catch(d){Rr(t,t.return,d)}if(e=t.sibling,e!==null){e.return=t.return,Ue=e;break}Ue=t.return}return _=RP,RP=!1,_}function Yh(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,a!==void 0&&x8(t,r,a)}o=o.next}while(o!==n)}}function V3(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function _8(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function BF(e){var t=e.alternate;t!==null&&(e.alternate=null,BF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[za],delete t[Pp],delete t[l8],delete t[Aoe],delete t[joe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function VF(e){return e.tag===5||e.tag===3||e.tag===4}function SP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||VF(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function E8(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=qy));else if(n!==4&&(e=e.child,e!==null))for(E8(e,t,r),e=e.sibling;e!==null;)E8(e,t,r),e=e.sibling}function C8(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(C8(e,t,r),e=e.sibling;e!==null;)C8(e,t,r),e=e.sibling}var on=null,ca=!1;function ms(e,t,r){for(r=r.child;r!==null;)HF(e,t,r),r=r.sibling}function HF(e,t,r){if(Ha&&typeof Ha.onCommitFiberUnmount=="function")try{Ha.onCommitFiberUnmount(I3,r)}catch{}switch(r.tag){case 5:wn||Ku(r,t);case 6:var n=on,o=ca;on=null,ms(e,t,r),on=n,ca=o,on!==null&&(ca?(e=on,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):on.removeChild(r.stateNode));break;case 18:on!==null&&(ca?(e=on,r=r.stateNode,e.nodeType===8?q6(e.parentNode,r):e.nodeType===1&&q6(e,r),Op(e)):q6(on,r.stateNode));break;case 4:n=on,o=ca,on=r.stateNode.containerInfo,ca=!0,ms(e,t,r),on=n,ca=o;break;case 0:case 11:case 14:case 15:if(!wn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var a=o,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&x8(r,t,i),o=o.next}while(o!==n)}ms(e,t,r);break;case 1:if(!wn&&(Ku(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Rr(r,t,s)}ms(e,t,r);break;case 21:ms(e,t,r);break;case 22:r.mode&1?(wn=(n=wn)||r.memoizedState!==null,ms(e,t,r),wn=n):ms(e,t,r);break;default:ms(e,t,r)}}function TP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Yoe),t.forEach(function(n){var o=aae.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function ra(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=i),n&=~a}if(n=o,n=Pr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Qoe(n/1960))-n,10e?16:e,Is===null)var n=!1;else{if(e=Is,Is=null,a7=0,It&6)throw Error(Ie(331));var o=It;for(It|=4,Ue=e.current;Ue!==null;){var a=Ue,i=a.child;if(Ue.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lPr()-pC?yc(e,0):hC|=r),Jn(e,t)}function ZF(e,t){t===0&&(e.mode&1?(t=M5,M5<<=1,!(M5&130023424)&&(M5=4194304)):t=1);var r=An();e=Wi(e,t),e!==null&&(y1(e,t,r),Jn(e,r))}function oae(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),ZF(e,r)}function aae(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Ie(314))}n!==null&&n.delete(t),ZF(e,r)}var QF;QF=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Zn.current)Kn=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Kn=!1,qoe(e,t,r);Kn=!!(e.flags&131072)}else Kn=!1,gr&&t.flags&1048576&&tF(t,Xy,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;zm(e,t),e=t.pendingProps;var o=jd(t,_n.current);hd(t,r),o=sC(null,t,n,e,o,r);var a=lC();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qn(n)?(a=!0,Ky(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,rC(t),o.updater=z3,t.stateNode=o,o._reactInternals=t,p8(t,n,e,r),t=v8(null,t,n,!0,a,r)):(t.tag=0,gr&&a&&YE(t),Pn(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(zm(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=sae(n),e=sa(n,e),o){case 0:t=g8(null,t,n,e,r);break e;case 1:t=CP(null,t,n,e,r);break e;case 11:t=_P(null,t,n,e,r);break e;case 14:t=EP(null,t,n,sa(n.type,e),r);break e}throw Error(Ie(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:sa(n,o),g8(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:sa(n,o),CP(e,t,n,o,r);case 3:e:{if(LF(t),e===null)throw Error(Ie(387));n=t.pendingProps,a=t.memoizedState,o=a.element,aF(e,t),Jy(t,n,null,r);var i=t.memoizedState;if(n=i.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=$d(Error(Ie(423)),t),t=OP(e,t,n,r,o);break e}else if(n!==o){o=$d(Error(Ie(424)),t),t=OP(e,t,n,r,o);break e}else for(ho=Gs(t.stateNode.containerInfo.firstChild),vo=t,gr=!0,fa=null,r=cF(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Id(),n===o){t=qi(e,t,r);break e}Pn(e,t,n,r)}t=t.child}return t;case 5:return uF(t),e===null&&d8(t),n=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,i=o.children,i8(n,o)?i=null:a!==null&&i8(n,a)&&(t.flags|=32),IF(e,t),Pn(e,t,i,r),t.child;case 6:return e===null&&d8(t),null;case 13:return NF(e,t,r);case 4:return nC(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ld(t,null,n,r):Pn(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:sa(n,o),_P(e,t,n,o,r);case 7:return Pn(e,t,t.pendingProps,r),t.child;case 8:return Pn(e,t,t.pendingProps.children,r),t.child;case 12:return Pn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,nr(Zy,n._currentValue),n._currentValue=i,a!==null)if(xa(a.value,i)){if(a.children===o.children&&!Zn.current){t=qi(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){i=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=ji(-1,r&-r),l.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),f8(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(Ie(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),f8(i,r,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}Pn(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,hd(t,r),o=Ko(o),n=n(o),t.flags|=1,Pn(e,t,n,r),t.child;case 14:return n=t.type,o=sa(n,t.pendingProps),o=sa(n.type,o),EP(e,t,n,o,r);case 15:return AF(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:sa(n,o),zm(e,t),t.tag=1,Qn(n)?(e=!0,Ky(t)):e=!1,hd(t,r),sF(t,n,o),p8(t,n,o,r),v8(null,t,n,!0,e,r);case 19:return $F(e,t,r);case 22:return jF(e,t,r)}throw Error(Ie(156,t.tag))};function JF(e,t){return OD(e,t)}function iae(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vo(e,t,r,n){return new iae(e,t,r,n)}function bC(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sae(e){if(typeof e=="function")return bC(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$E)return 11;if(e===DE)return 14}return 2}function Zs(e,t){var r=e.alternate;return r===null?(r=Vo(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Hm(e,t,r,n,o,a){var i=2;if(n=e,typeof e=="function")bC(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Fu:return wc(r.children,o,a,t);case NE:i=8,o|=8;break;case D_:return e=Vo(12,r,t,o|2),e.elementType=D_,e.lanes=a,e;case F_:return e=Vo(13,r,t,o),e.elementType=F_,e.lanes=a,e;case z_:return e=Vo(19,r,t,o),e.elementType=z_,e.lanes=a,e;case lD:return U3(r,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case iD:i=10;break e;case sD:i=9;break e;case $E:i=11;break e;case DE:i=14;break e;case Es:i=16,n=null;break e}throw Error(Ie(130,e==null?e:typeof e,""))}return t=Vo(i,r,t,o),t.elementType=e,t.type=n,t.lanes=a,t}function wc(e,t,r,n){return e=Vo(7,e,n,t),e.lanes=r,e}function U3(e,t,r,n){return e=Vo(22,e,n,t),e.elementType=lD,e.lanes=r,e.stateNode={isHidden:!1},e}function ex(e,t,r){return e=Vo(6,e,null,t),e.lanes=r,e}function tx(e,t,r){return t=Vo(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lae(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=L6(0),this.expirationTimes=L6(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=L6(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function yC(e,t,r,n,o,a,i,s,l){return e=new lae(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Vo(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},rC(a),e}function cae(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nz)}catch(e){console.error(e)}}nz(),tD.exports=Eo;var Xo=tD.exports;const pae=El(Xo);var $P=Xo;N_.createRoot=$P.createRoot,N_.hydrateRoot=$P.hydrateRoot;/** - * @remix-run/router v1.7.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function pr(){return pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Fd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gae(){return Math.random().toString(36).substr(2,8)}function FP(e,t){return{usr:e.state,key:e.key,idx:t}}function $p(e,t,r,n){return r===void 0&&(r=null),pr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ji(t):t,{state:r,key:t&&t.key||n||gae()})}function jc(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ji(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function vae(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:a=!1}=n,i=o.history,s=Lr.Pop,l=null,c=u();c==null&&(c=0,i.replaceState(pr({},i.state,{idx:c}),""));function u(){return(i.state||{idx:null}).idx}function p(){s=Lr.Pop;let y=u(),m=y==null?null:y-c;c=y,l&&l({action:s,location:w.location,delta:m})}function h(y,m){s=Lr.Push;let f=$p(w.location,y,m);r&&r(f,y),c=u()+1;let b=FP(f,c),d=w.createHref(f);try{i.pushState(b,"",d)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;o.location.assign(d)}a&&l&&l({action:s,location:w.location,delta:1})}function v(y,m){s=Lr.Replace;let f=$p(w.location,y,m);r&&r(f,y),c=u();let b=FP(f,c),d=w.createHref(f);i.replaceState(b,"",d),a&&l&&l({action:s,location:w.location,delta:0})}function _(y){let m=o.location.origin!=="null"?o.location.origin:o.location.href,f=typeof y=="string"?y:jc(y);return wt(m,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,m)}let w={get action(){return s},get location(){return e(o,i)},listen(y){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(DP,p),l=y,()=>{o.removeEventListener(DP,p),l=null}},createHref(y){return t(o,y)},createURL:_,encodeLocation(y){let m=_(y);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:v,go(y){return i.go(y)}};return w}var Fr;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Fr||(Fr={}));const bae=new Set(["lazy","caseSensitive","path","id","index","children"]);function yae(e){return e.index===!0}function T8(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((o,a)=>{let i=[...r,a],s=typeof o.id=="string"?o.id:i.join("-");if(wt(o.index!==!0||!o.children,"Cannot specify children on an index route"),wt(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),yae(o)){let l=pr({},o,t(o),{id:s});return n[s]=l,l}else{let l=pr({},o,t(o),{id:s,children:void 0});return n[s]=l,o.children&&(l.children=T8(o.children,t,i,n)),l}})}function Xu(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Ji(t):t,o=df(n.pathname||"/",r);if(o==null)return null;let a=oz(e);wae(a);let i=null;for(let s=0;i==null&&s{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};l.relativePath.startsWith("/")&&(wt(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Ii([n,l.relativePath]),u=r.concat(l);a.children&&a.children.length>0&&(wt(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),oz(a.children,t,u,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:Rae(c,a.index),routesMeta:u})};return e.forEach((a,i)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))o(a,i);else for(let l of az(a.path))o(a,i,l)}),t}function az(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return o?[a,""]:[a];let i=az(n.join("/")),s=[];return s.push(...i.map(l=>l===""?a:[a,l].join("/"))),o&&s.push(...i),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function wae(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Sae(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const xae=/^:\w+$/,_ae=3,Eae=2,Cae=1,Oae=10,kae=-2,zP=e=>e==="*";function Rae(e,t){let r=e.split("/"),n=r.length;return r.some(zP)&&(n+=kae),t&&(n+=Eae),r.filter(o=>!zP(o)).reduce((o,a)=>o+(xae.test(a)?_ae:a===""?Cae:Oae),n)}function Sae(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function Tae(e,t){let{routesMeta:r}=e,n={},o="/",a=[];for(let i=0;i{if(u==="*"){let h=s[p]||"";i=a.slice(0,a.length-h.length).replace(/(.)\/+$/,"$1")}return c[u]=jae(s[p]||"",u),c},{}),pathname:a,pathnameBase:i,pattern:e}}function Mae(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Fd(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(i,s)=>(n.push(s),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function Aae(e){try{return decodeURI(e)}catch(t){return Fd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function jae(e,t){try{return decodeURIComponent(e)}catch(r){return Fd(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function df(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Iae(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Ji(e):e;return{pathname:r?r.startsWith("/")?r:Lae(r,t):t,search:$ae(n),hash:Dae(o)}}function Lae(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function rx(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function E1(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Y3(e,t,r,n){n===void 0&&(n=!1);let o;typeof e=="string"?o=Ji(e):(o=pr({},e),wt(!o.pathname||!o.pathname.includes("?"),rx("?","pathname","search",o)),wt(!o.pathname||!o.pathname.includes("#"),rx("#","pathname","hash",o)),wt(!o.search||!o.search.includes("#"),rx("#","search","hash",o)));let a=e===""||o.pathname==="",i=a?"/":o.pathname,s;if(n||i==null)s=r;else{let p=t.length-1;if(i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),p-=1;o.pathname=h.join("/")}s=p>=0?t[p]:"/"}let l=Iae(o,s),c=i&&i!=="/"&&i.endsWith("/"),u=(a||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Ii=e=>e.join("/").replace(/\/\/+/g,"/"),Nae=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$ae=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Dae=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class EC{constructor(t,r,n,o){o===void 0&&(o=!1),this.status=t,this.statusText=r||"",this.internal=o,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function iz(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const sz=["post","put","patch","delete"],Fae=new Set(sz),zae=["get",...sz],Bae=new Set(zae),Vae=new Set([301,302,303,307,308]),Hae=new Set([307,308]),nx={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Uae={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},i0={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},lz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Wae=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function qae(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;wt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let me=e.detectErrorBoundary;o=ge=>({hasErrorBoundary:me(ge)})}else o=Wae;let a={},i=T8(e.routes,o,void 0,a),s,l=e.basename||"/",c=pr({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),u=null,p=new Set,h=null,v=null,_=null,w=e.hydrationData!=null,y=Xu(i,e.history.location,l),m=null;if(y==null){let me=Lo(404,{pathname:e.history.location.pathname}),{matches:ge,route:Me}=KP(i);y=ge,m={[Me.id]:me}}let f=!y.some(me=>me.route.lazy)&&(!y.some(me=>me.route.loader)||e.hydrationData!=null),b,d={historyAction:e.history.action,location:e.history.location,matches:y,initialized:f,navigation:nx,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||m,fetchers:new Map,blockers:new Map},x=Lr.Pop,E=!1,C,k=!1,S=!1,R=[],T=[],P=new Map,j=0,L=-1,D=new Map,B=new Set,V=new Map,q=new Map,z=new Map,F=!1;function $(){return u=e.history.listen(me=>{let{action:ge,location:Me,delta:Ve}=me;if(F){F=!1;return}Fd(z.size===0||Ve!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let tt=et({currentLocation:d.location,nextLocation:Me,historyAction:ge});if(tt&&Ve!=null){F=!0,e.history.go(Ve*-1),ze(tt,{state:"blocked",location:Me,proceed(){ze(tt,{state:"proceeding",proceed:void 0,reset:void 0,location:Me}),e.history.go(Ve)},reset(){let it=new Map(d.blockers);it.set(tt,i0),Q({blockers:it})}});return}return oe(ge,Me)}),d.initialized||oe(Lr.Pop,d.location),b}function W(){u&&u(),p.clear(),C&&C.abort(),d.fetchers.forEach((me,ge)=>ve(ge)),d.blockers.forEach((me,ge)=>_e(ge))}function G(me){return p.add(me),()=>p.delete(me)}function Q(me){d=pr({},d,me),p.forEach(ge=>ge(d))}function Z(me,ge){var Me,Ve;let tt=d.actionData!=null&&d.navigation.formMethod!=null&&ua(d.navigation.formMethod)&&d.navigation.state==="loading"&&((Me=me.state)==null?void 0:Me._isRedirect)!==!0,it;ge.actionData?Object.keys(ge.actionData).length>0?it=ge.actionData:it=null:tt?it=d.actionData:it=null;let ct=ge.loaderData?GP(d.loaderData,ge.loaderData,ge.matches||[],ge.errors):d.loaderData,Ye=d.blockers;Ye.size>0&&(Ye=new Map(Ye),Ye.forEach((Mt,Lt)=>Ye.set(Lt,i0)));let Ge=E===!0||d.navigation.formMethod!=null&&ua(d.navigation.formMethod)&&((Ve=me.state)==null?void 0:Ve._isRedirect)!==!0;s&&(i=s,s=void 0),k||x===Lr.Pop||(x===Lr.Push?e.history.push(me,me.state):x===Lr.Replace&&e.history.replace(me,me.state)),Q(pr({},ge,{actionData:it,loaderData:ct,historyAction:x,location:me,initialized:!0,navigation:nx,revalidation:"idle",restoreScrollPosition:Nn(me,ge.matches||d.matches),preventScrollReset:Ge,blockers:Ye})),x=Lr.Pop,E=!1,k=!1,S=!1,R=[],T=[]}async function U(me,ge){if(typeof me=="number"){e.history.go(me);return}let Me=P8(d.location,d.matches,l,c.v7_prependBasename,me,ge==null?void 0:ge.fromRouteId,ge==null?void 0:ge.relative),{path:Ve,submission:tt,error:it}=BP(c.v7_normalizeFormMethod,!1,Me,ge),ct=d.location,Ye=$p(d.location,Ve,ge&&ge.state);Ye=pr({},Ye,e.history.encodeLocation(Ye));let Ge=ge&&ge.replace!=null?ge.replace:void 0,Mt=Lr.Push;Ge===!0?Mt=Lr.Replace:Ge===!1||tt!=null&&ua(tt.formMethod)&&tt.formAction===d.location.pathname+d.location.search&&(Mt=Lr.Replace);let Lt=ge&&"preventScrollReset"in ge?ge.preventScrollReset===!0:void 0,Ot=et({currentLocation:ct,nextLocation:Ye,historyAction:Mt});if(Ot){ze(Ot,{state:"blocked",location:Ye,proceed(){ze(Ot,{state:"proceeding",proceed:void 0,reset:void 0,location:Ye}),U(me,ge)},reset(){let Jt=new Map(d.blockers);Jt.set(Ot,i0),Q({blockers:Jt})}});return}return await oe(Mt,Ye,{submission:tt,pendingError:it,preventScrollReset:Lt,replace:ge&&ge.replace})}function J(){if(je(),Q({revalidation:"loading"}),d.navigation.state!=="submitting"){if(d.navigation.state==="idle"){oe(d.historyAction,d.location,{startUninterruptedRevalidation:!0});return}oe(x||d.historyAction,d.navigation.location,{overrideNavigation:d.navigation})}}async function oe(me,ge,Me){C&&C.abort(),C=null,x=me,k=(Me&&Me.startUninterruptedRevalidation)===!0,Pt(d.location,d.matches),E=(Me&&Me.preventScrollReset)===!0;let Ve=s||i,tt=Me&&Me.overrideNavigation,it=Xu(Ve,ge,l);if(!it){let Jt=Lo(404,{pathname:ge.pathname}),{matches:wr,route:dn}=KP(Ve);We(),Z(ge,{matches:wr,loaderData:{},errors:{[dn.id]:Jt}});return}if(d.initialized&&!S&&Zae(d.location,ge)&&!(Me&&Me.submission&&ua(Me.submission.formMethod))){Z(ge,{matches:it});return}C=new AbortController;let ct=l0(e.history,ge,C.signal,Me&&Me.submission),Ye,Ge;if(Me&&Me.pendingError)Ge={[Zu(it).route.id]:Me.pendingError};else if(Me&&Me.submission&&ua(Me.submission.formMethod)){let Jt=await ee(ct,ge,Me.submission,it,{replace:Me.replace});if(Jt.shortCircuited)return;Ye=Jt.pendingActionData,Ge=Jt.pendingActionError,tt=H5(ge,Me.submission),ct=new Request(ct.url,{signal:ct.signal})}let{shortCircuited:Mt,loaderData:Lt,errors:Ot}=await ie(ct,ge,it,tt,Me&&Me.submission,Me&&Me.fetcherSubmission,Me&&Me.replace,Ye,Ge);Mt||(C=null,Z(ge,pr({matches:it},Ye?{actionData:Ye}:{},{loaderData:Lt,errors:Ot})))}async function ee(me,ge,Me,Ve,tt){tt===void 0&&(tt={}),je();let it=rie(ge,Me);Q({navigation:it});let ct,Ye=A8(Ve,ge);if(!Ye.route.action&&!Ye.route.lazy)ct={type:Fr.error,error:Lo(405,{method:me.method,pathname:ge.pathname,routeId:Ye.route.id})};else if(ct=await s0("action",me,Ye,Ve,a,o,l),me.signal.aborted)return{shortCircuited:!0};if(md(ct)){let Ge;return tt&&tt.replace!=null?Ge=tt.replace:Ge=ct.location===d.location.pathname+d.location.search,await Re(d,ct,{submission:Me,replace:Ge}),{shortCircuited:!0}}if(Qh(ct)){let Ge=Zu(Ve,Ye.route.id);return(tt&&tt.replace)!==!0&&(x=Lr.Push),{pendingActionData:{},pendingActionError:{[Ge.route.id]:ct.error}}}if(pc(ct))throw Lo(400,{type:"defer-action"});return{pendingActionData:{[Ye.route.id]:ct.data}}}async function ie(me,ge,Me,Ve,tt,it,ct,Ye,Ge){let Mt=Ve||H5(ge,tt),Lt=tt||it||ZP(Mt),Ot=s||i,[Jt,wr]=VP(e.history,d,Me,Lt,ge,S,R,T,V,B,Ot,l,Ye,Ge);if(We(Nt=>!(Me&&Me.some(nn=>nn.route.id===Nt))||Jt&&Jt.some(nn=>nn.route.id===Nt)),L=++j,Jt.length===0&&wr.length===0){let Nt=se();return Z(ge,pr({matches:Me,loaderData:{},errors:Ge||null},Ye?{actionData:Ye}:{},Nt?{fetchers:new Map(d.fetchers)}:{})),{shortCircuited:!0}}if(!k){wr.forEach(nn=>{let zn=d.fetchers.get(nn.key),jl=c0(void 0,zn?zn.data:void 0);d.fetchers.set(nn.key,jl)});let Nt=Ye||d.actionData;Q(pr({navigation:Mt},Nt?Object.keys(Nt).length===0?{actionData:null}:{actionData:Nt}:{},wr.length>0?{fetchers:new Map(d.fetchers)}:{}))}wr.forEach(Nt=>{P.has(Nt.key)&&Oe(Nt.key),Nt.controller&&P.set(Nt.key,Nt.controller)});let dn=()=>wr.forEach(Nt=>Oe(Nt.key));C&&C.signal.addEventListener("abort",dn);let{results:no,loaderResults:rn,fetcherResults:Sa}=await Te(d.matches,Me,Jt,wr,me);if(me.signal.aborted)return{shortCircuited:!0};C&&C.signal.removeEventListener("abort",dn),wr.forEach(Nt=>P.delete(Nt.key));let fn=YP(no);if(fn){if(fn.idx>=Jt.length){let Nt=wr[fn.idx-Jt.length].key;B.add(Nt)}return await Re(d,fn.result,{replace:ct}),{shortCircuited:!0}}let{loaderData:Dn,errors:ea}=qP(d,Me,Jt,rn,Ge,wr,Sa,q);q.forEach((Nt,nn)=>{Nt.subscribe(zn=>{(zn||Nt.done)&&q.delete(nn)})});let Fn=se(),Al=we(L),di=Fn||Al||wr.length>0;return pr({loaderData:Dn,errors:ea},di?{fetchers:new Map(d.fetchers)}:{})}function ce(me){return d.fetchers.get(me)||Uae}function ye(me,ge,Me,Ve){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");P.has(me)&&Oe(me);let tt=s||i,it=P8(d.location,d.matches,l,c.v7_prependBasename,Me,ge,Ve==null?void 0:Ve.relative),ct=Xu(tt,it,l);if(!ct){pe(me,ge,Lo(404,{pathname:it}));return}let{path:Ye,submission:Ge,error:Mt}=BP(c.v7_normalizeFormMethod,!0,it,Ve);if(Mt){pe(me,ge,Mt);return}let Lt=A8(ct,Ye);if(E=(Ve&&Ve.preventScrollReset)===!0,Ge&&ua(Ge.formMethod)){Ce(me,ge,Ye,Lt,ct,Ge);return}V.set(me,{routeId:ge,path:Ye}),Se(me,ge,Ye,Lt,ct,Ge)}async function Ce(me,ge,Me,Ve,tt,it){if(je(),V.delete(me),!Ve.route.action&&!Ve.route.lazy){let $t=Lo(405,{method:it.formMethod,pathname:Me,routeId:ge});pe(me,ge,$t);return}let ct=d.fetchers.get(me),Ye=nie(it,ct);d.fetchers.set(me,Ye),Q({fetchers:new Map(d.fetchers)});let Ge=new AbortController,Mt=l0(e.history,Me,Ge.signal,it);P.set(me,Ge);let Lt=j,Ot=await s0("action",Mt,Ve,tt,a,o,l);if(Mt.signal.aborted){P.get(me)===Ge&&P.delete(me);return}if(md(Ot))if(P.delete(me),L>Lt){let $t=Eu(void 0);d.fetchers.set(me,$t),Q({fetchers:new Map(d.fetchers)});return}else{B.add(me);let $t=c0(it);return d.fetchers.set(me,$t),Q({fetchers:new Map(d.fetchers)}),Re(d,Ot,{submission:it,isFetchActionRedirect:!0})}if(Qh(Ot)){pe(me,ge,Ot.error);return}if(pc(Ot))throw Lo(400,{type:"defer-action"});let Jt=d.navigation.location||d.location,wr=l0(e.history,Jt,Ge.signal),dn=s||i,no=d.navigation.state!=="idle"?Xu(dn,d.navigation.location,l):d.matches;wt(no,"Didn't find any matches after fetcher action");let rn=++j;D.set(me,rn);let Sa=c0(it,Ot.data);d.fetchers.set(me,Sa);let[fn,Dn]=VP(e.history,d,no,it,Jt,S,R,T,V,B,dn,l,{[Ve.route.id]:Ot.data},void 0);Dn.filter($t=>$t.key!==me).forEach($t=>{let Ro=$t.key,Il=d.fetchers.get(Ro),Ll=c0(void 0,Il?Il.data:void 0);d.fetchers.set(Ro,Ll),P.has(Ro)&&Oe(Ro),$t.controller&&P.set(Ro,$t.controller)}),Q({fetchers:new Map(d.fetchers)});let ea=()=>Dn.forEach($t=>Oe($t.key));Ge.signal.addEventListener("abort",ea);let{results:Fn,loaderResults:Al,fetcherResults:di}=await Te(d.matches,no,fn,Dn,wr);if(Ge.signal.aborted)return;Ge.signal.removeEventListener("abort",ea),D.delete(me),P.delete(me),Dn.forEach($t=>P.delete($t.key));let Nt=YP(Fn);if(Nt){if(Nt.idx>=fn.length){let $t=Dn[Nt.idx-fn.length].key;B.add($t)}return Re(d,Nt.result)}let{loaderData:nn,errors:zn}=qP(d,d.matches,fn,Al,void 0,Dn,di,q);if(d.fetchers.has(me)){let $t=Eu(Ot.data);d.fetchers.set(me,$t)}let jl=we(rn);d.navigation.state==="loading"&&rn>L?(wt(x,"Expected pending action"),C&&C.abort(),Z(d.navigation.location,{matches:no,loaderData:nn,errors:zn,fetchers:new Map(d.fetchers)})):(Q(pr({errors:zn,loaderData:GP(d.loaderData,nn,no,zn)},jl||Dn.length>0?{fetchers:new Map(d.fetchers)}:{})),S=!1)}async function Se(me,ge,Me,Ve,tt,it){let ct=d.fetchers.get(me),Ye=c0(it,ct?ct.data:void 0);d.fetchers.set(me,Ye),Q({fetchers:new Map(d.fetchers)});let Ge=new AbortController,Mt=l0(e.history,Me,Ge.signal);P.set(me,Ge);let Lt=j,Ot=await s0("loader",Mt,Ve,tt,a,o,l);if(pc(Ot)&&(Ot=await dz(Ot,Mt.signal,!0)||Ot),P.get(me)===Ge&&P.delete(me),Mt.signal.aborted)return;if(md(Ot))if(L>Lt){let wr=Eu(void 0);d.fetchers.set(me,wr),Q({fetchers:new Map(d.fetchers)});return}else{B.add(me),await Re(d,Ot);return}if(Qh(Ot)){let wr=Zu(d.matches,ge);d.fetchers.delete(me),Q({fetchers:new Map(d.fetchers),errors:{[wr.route.id]:Ot.error}});return}wt(!pc(Ot),"Unhandled fetcher deferred data");let Jt=Eu(Ot.data);d.fetchers.set(me,Jt),Q({fetchers:new Map(d.fetchers)})}async function Re(me,ge,Me){let{submission:Ve,replace:tt,isFetchActionRedirect:it}=Me===void 0?{}:Me;ge.revalidate&&(S=!0);let ct=$p(me.location,ge.location,pr({_isRedirect:!0},it?{_isFetchActionRedirect:!0}:{}));if(wt(ct,"Expected a location on the redirect navigation"),lz.test(ge.location)&&r){let Mt=e.history.createURL(ge.location),Lt=df(Mt.pathname,l)==null;if(t.location.origin!==Mt.origin||Lt){tt?t.location.replace(ge.location):t.location.assign(ge.location);return}}C=null;let Ye=tt===!0?Lr.Replace:Lr.Push,Ge=Ve||ZP(me.navigation);if(Hae.has(ge.status)&&Ge&&ua(Ge.formMethod))await oe(Ye,ct,{submission:pr({},Ge,{formAction:ge.location}),preventScrollReset:E});else if(it)await oe(Ye,ct,{overrideNavigation:H5(ct),fetcherSubmission:Ge,preventScrollReset:E});else{let Mt=H5(ct,Ge);await oe(Ye,ct,{overrideNavigation:Mt,preventScrollReset:E})}}async function Te(me,ge,Me,Ve,tt){let it=await Promise.all([...Me.map(Ge=>s0("loader",tt,Ge,ge,a,o,l)),...Ve.map(Ge=>Ge.matches&&Ge.match&&Ge.controller?s0("loader",l0(e.history,Ge.path,Ge.controller.signal),Ge.match,Ge.matches,a,o,l):{type:Fr.error,error:Lo(404,{pathname:Ge.path})})]),ct=it.slice(0,Me.length),Ye=it.slice(Me.length);return await Promise.all([XP(me,Me,ct,ct.map(()=>tt.signal),!1,d.loaderData),XP(me,Ve.map(Ge=>Ge.match),Ye,Ve.map(Ge=>Ge.controller?Ge.controller.signal:null),!0)]),{results:it,loaderResults:ct,fetcherResults:Ye}}function je(){S=!0,R.push(...We()),V.forEach((me,ge)=>{P.has(ge)&&(T.push(ge),Oe(ge))})}function pe(me,ge,Me){let Ve=Zu(d.matches,ge);ve(me),Q({errors:{[Ve.route.id]:Me},fetchers:new Map(d.fetchers)})}function ve(me){let ge=d.fetchers.get(me);P.has(me)&&!(ge&&ge.state==="loading"&&D.has(me))&&Oe(me),V.delete(me),D.delete(me),B.delete(me),d.fetchers.delete(me)}function Oe(me){let ge=P.get(me);wt(ge,"Expected fetch controller: "+me),ge.abort(),P.delete(me)}function Ae(me){for(let ge of me){let Me=ce(ge),Ve=Eu(Me.data);d.fetchers.set(ge,Ve)}}function se(){let me=[],ge=!1;for(let Me of B){let Ve=d.fetchers.get(Me);wt(Ve,"Expected fetcher: "+Me),Ve.state==="loading"&&(B.delete(Me),me.push(Me),ge=!0)}return Ae(me),ge}function we(me){let ge=[];for(let[Me,Ve]of D)if(Ve0}function xe(me,ge){let Me=d.blockers.get(me)||i0;return z.get(me)!==ge&&z.set(me,ge),Me}function _e(me){d.blockers.delete(me),z.delete(me)}function ze(me,ge){let Me=d.blockers.get(me)||i0;wt(Me.state==="unblocked"&&ge.state==="blocked"||Me.state==="blocked"&&ge.state==="blocked"||Me.state==="blocked"&&ge.state==="proceeding"||Me.state==="blocked"&&ge.state==="unblocked"||Me.state==="proceeding"&&ge.state==="unblocked","Invalid blocker state transition: "+Me.state+" -> "+ge.state);let Ve=new Map(d.blockers);Ve.set(me,ge),Q({blockers:Ve})}function et(me){let{currentLocation:ge,nextLocation:Me,historyAction:Ve}=me;if(z.size===0)return;z.size>1&&Fd(!1,"A router only supports one blocker at a time");let tt=Array.from(z.entries()),[it,ct]=tt[tt.length-1],Ye=d.blockers.get(it);if(!(Ye&&Ye.state==="proceeding")&&ct({currentLocation:ge,nextLocation:Me,historyAction:Ve}))return it}function We(me){let ge=[];return q.forEach((Me,Ve)=>{(!me||me(Ve))&&(Me.cancel(),ge.push(Ve),q.delete(Ve))}),ge}function Ar(me,ge,Me){if(h=me,_=ge,v=Me||null,!w&&d.navigation===nx){w=!0;let Ve=Nn(d.location,d.matches);Ve!=null&&Q({restoreScrollPosition:Ve})}return()=>{h=null,_=null,v=null}}function Rt(me,ge){return v&&v(me,ge.map(Ve=>tie(Ve,d.loaderData)))||me.key}function Pt(me,ge){if(h&&_){let Me=Rt(me,ge);h[Me]=_()}}function Nn(me,ge){if(h){let Me=Rt(me,ge),Ve=h[Me];if(typeof Ve=="number")return Ve}return null}function $n(me){a={},s=T8(me,o,void 0,a)}return b={get basename(){return l},get state(){return d},get routes(){return i},initialize:$,subscribe:G,enableScrollRestoration:Ar,navigate:U,fetch:ye,revalidate:J,createHref:me=>e.history.createHref(me),encodeLocation:me=>e.history.encodeLocation(me),getFetcher:ce,deleteFetcher:ve,dispose:W,getBlocker:xe,deleteBlocker:_e,_internalFetchControllers:P,_internalActiveDeferreds:q,_internalSetRoutes:$n},b}function Gae(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function P8(e,t,r,n,o,a,i){let s,l;if(a!=null&&i!=="path"){s=[];for(let u of t)if(s.push(u),u.route.id===a){l=u;break}}else s=t,l=t[t.length-1];let c=Y3(o||".",E1(s).map(u=>u.pathnameBase),df(e.pathname,r)||e.pathname,i==="path");return o==null&&(c.search=e.search,c.hash=e.hash),(o==null||o===""||o===".")&&l&&l.route.index&&!CC(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(c.pathname=c.pathname==="/"?r:Ii([r,c.pathname])),jc(c)}function BP(e,t,r,n){if(!n||!Gae(n))return{path:r};if(n.formMethod&&!eie(n.formMethod))return{path:r,error:Lo(405,{method:n.formMethod})};let o=()=>({path:r,error:Lo(400,{type:"invalid-body"})}),a=n.formMethod||"get",i=e?a.toUpperCase():a.toLowerCase(),s=uz(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!ua(i))return o();let h=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((v,_)=>{let[w,y]=_;return""+v+w+"="+y+` -`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!ua(i))return o();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:s,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return o()}}}wt(typeof FormData=="function","FormData is not available in this environment");let l,c;if(n.formData)l=M8(n.formData),c=n.formData;else if(n.body instanceof FormData)l=M8(n.body),c=n.body;else if(n.body instanceof URLSearchParams)l=n.body,c=WP(l);else if(n.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(n.body),c=WP(l)}catch{return o()}let u={formMethod:i,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(ua(u.formMethod))return{path:r,submission:u};let p=Ji(r);return t&&p.search&&CC(p.search)&&l.append("index",""),p.search="?"+l,{path:jc(p),submission:u}}function Kae(e,t){let r=e;if(t){let n=e.findIndex(o=>o.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function VP(e,t,r,n,o,a,i,s,l,c,u,p,h,v){let _=v?Object.values(v)[0]:h?Object.values(h)[0]:void 0,w=e.createURL(t.location),y=e.createURL(o),m=v?Object.keys(v)[0]:void 0,b=Kae(r,m).filter((x,E)=>{if(x.route.lazy)return!0;if(x.route.loader==null)return!1;if(Yae(t.loaderData,t.matches[E],x)||i.some(S=>S===x.route.id))return!0;let C=t.matches[E],k=x;return HP(x,pr({currentUrl:w,currentParams:C.params,nextUrl:y,nextParams:k.params},n,{actionResult:_,defaultShouldRevalidate:a||w.pathname+w.search===y.pathname+y.search||w.search!==y.search||cz(C,k)}))}),d=[];return l.forEach((x,E)=>{if(!r.some(T=>T.route.id===x.routeId))return;let C=Xu(u,x.path,p);if(!C){d.push({key:E,routeId:x.routeId,path:x.path,matches:null,match:null,controller:null});return}let k=t.fetchers.get(E),S=A8(C,x.path),R=!1;c.has(E)?R=!1:s.includes(E)?R=!0:k&&k.state!=="idle"&&k.data===void 0?R=a:R=HP(S,pr({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},n,{actionResult:_,defaultShouldRevalidate:a})),R&&d.push({key:E,routeId:x.routeId,path:x.path,matches:C,match:S,controller:new AbortController})}),[b,d]}function Yae(e,t,r){let n=!t||r.route.id!==t.route.id,o=e[r.route.id]===void 0;return n||o}function cz(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function HP(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function UP(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let o=r[e.id];wt(o,"No route found in manifest");let a={};for(let i in n){let l=o[i]!==void 0&&i!=="hasErrorBoundary";Fd(!l,'Route "'+o.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!l&&!bae.has(i)&&(a[i]=n[i])}Object.assign(o,a),Object.assign(o,pr({},t(o),{lazy:void 0}))}async function s0(e,t,r,n,o,a,i,s){s===void 0&&(s={});let l,c,u,p=_=>{let w,y=new Promise((m,f)=>w=f);return u=()=>w(),t.signal.addEventListener("abort",u),Promise.race([_({request:t,params:r.params,context:s.requestContext}),y])};try{let _=r.route[e];if(r.route.lazy)if(_)c=(await Promise.all([p(_),UP(r.route,a,o)]))[0];else if(await UP(r.route,a,o),_=r.route[e],_)c=await p(_);else if(e==="action"){let w=new URL(t.url),y=w.pathname+w.search;throw Lo(405,{method:t.method,pathname:y,routeId:r.route.id})}else return{type:Fr.data,data:void 0};else if(_)c=await p(_);else{let w=new URL(t.url),y=w.pathname+w.search;throw Lo(404,{pathname:y})}wt(c!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(_){l=Fr.error,c=_}finally{u&&t.signal.removeEventListener("abort",u)}if(Jae(c)){let _=c.status;if(Vae.has(_)){let m=c.headers.get("Location");if(wt(m,"Redirects returned/thrown from loaders/actions must have a Location header"),!lz.test(m))m=P8(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,m);else if(!s.isStaticRequest){let f=new URL(t.url),b=m.startsWith("//")?new URL(f.protocol+m):new URL(m),d=df(b.pathname,i)!=null;b.origin===f.origin&&d&&(m=b.pathname+b.search+b.hash)}if(s.isStaticRequest)throw c.headers.set("Location",m),c;return{type:Fr.redirect,status:_,location:m,revalidate:c.headers.get("X-Remix-Revalidate")!==null}}if(s.isRouteRequest)throw{type:l||Fr.data,response:c};let w,y=c.headers.get("Content-Type");return y&&/\bapplication\/json\b/.test(y)?w=await c.json():w=await c.text(),l===Fr.error?{type:l,error:new EC(_,c.statusText,w),headers:c.headers}:{type:Fr.data,data:w,statusCode:c.status,headers:c.headers}}if(l===Fr.error)return{type:l,error:c};if(Qae(c)){var h,v;return{type:Fr.deferred,deferredData:c,statusCode:(h=c.init)==null?void 0:h.status,headers:((v=c.init)==null?void 0:v.headers)&&new Headers(c.init.headers)}}return{type:Fr.data,data:c}}function l0(e,t,r,n){let o=e.createURL(uz(t)).toString(),a={signal:r};if(n&&ua(n.formMethod)){let{formMethod:i,formEncType:s}=n;a.method=i.toUpperCase(),s==="application/json"?(a.headers=new Headers({"Content-Type":s}),a.body=JSON.stringify(n.json)):s==="text/plain"?a.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?a.body=M8(n.formData):a.body=n.formData}return new Request(o,a)}function M8(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function WP(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Xae(e,t,r,n,o){let a={},i=null,s,l=!1,c={};return r.forEach((u,p)=>{let h=t[p].route.id;if(wt(!md(u),"Cannot handle redirect results in processLoaderData"),Qh(u)){let v=Zu(e,h),_=u.error;n&&(_=Object.values(n)[0],n=void 0),i=i||{},i[v.route.id]==null&&(i[v.route.id]=_),a[h]=void 0,l||(l=!0,s=iz(u.error)?u.error.status:500),u.headers&&(c[h]=u.headers)}else pc(u)?(o.set(h,u.deferredData),a[h]=u.deferredData.data):a[h]=u.data,u.statusCode!=null&&u.statusCode!==200&&!l&&(s=u.statusCode),u.headers&&(c[h]=u.headers)}),n&&(i=n,a[Object.keys(n)[0]]=void 0),{loaderData:a,errors:i,statusCode:s||200,loaderHeaders:c}}function qP(e,t,r,n,o,a,i,s){let{loaderData:l,errors:c}=Xae(t,r,n,o,s);for(let u=0;un.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function KP(e){let t=e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Lo(e,t){let{pathname:r,routeId:n,method:o,type:a}=t===void 0?{}:t,i="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(i="Bad Request",o&&r&&n?s="You made a "+o+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":a==="defer-action"?s="defer() is not supported in actions":a==="invalid-body"&&(s="Unable to encode submission body")):e===403?(i="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):e===404?(i="Not Found",s='No route matches URL "'+r+'"'):e===405&&(i="Method Not Allowed",o&&r&&n?s="You made a "+o.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new EC(e||500,i,new Error(s),!0)}function YP(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(md(r))return{result:r,idx:t}}}function uz(e){let t=typeof e=="string"?Ji(e):e;return jc(pr({},t,{hash:""}))}function Zae(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function pc(e){return e.type===Fr.deferred}function Qh(e){return e.type===Fr.error}function md(e){return(e&&e.type)===Fr.redirect}function Qae(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Jae(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function eie(e){return Bae.has(e.toLowerCase())}function ua(e){return Fae.has(e.toLowerCase())}async function XP(e,t,r,n,o,a){for(let i=0;ip.route.id===l.route.id),u=c!=null&&!cz(c,l)&&(a&&a[l.route.id])!==void 0;if(pc(s)&&(o||u)){let p=n[i];wt(p,"Expected an AbortSignal for revalidating fetcher deferred result"),await dz(s,p,o).then(h=>{h&&(r[i]=h||r[i])})}}}async function dz(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:Fr.data,data:e.deferredData.unwrappedData}}catch(o){return{type:Fr.error,error:o}}return{type:Fr.data,data:e.deferredData.data}}}function CC(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function tie(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],handle:r.handle}}function A8(e,t){let r=typeof t=="string"?Ji(t).search:t.search;if(e[e.length-1].route.index&&CC(r||""))return e[e.length-1];let n=E1(e);return n[n.length-1]}function ZP(e){let{formMethod:t,formAction:r,formEncType:n,text:o,formData:a,json:i}=e;if(!(!t||!r||!n)){if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:o};if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:a,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function H5(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function rie(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function c0(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function nie(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}function Eu(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}/** - * React Router v6.14.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function l7(){return l7=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),i=g.useRef(!1);return pz(()=>{i.current=!0}),g.useCallback(function(l,c){if(c===void 0&&(c={}),!i.current)return;if(typeof l=="number"){r.go(l);return}let u=Y3(l,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Ii([t,u.pathname])),(c.replace?r.replace:r.push)(u,c.state,c)},[t,r,a,o,e])}const iie=g.createContext(null);function sie(e){let t=g.useContext(oi).outlet;return t&&g.createElement(iie.Provider,{value:e},t)}function OC(){let{matches:e}=g.useContext(oi),t=e[e.length-1];return t?t.params:{}}function mz(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=g.useContext(oi),{pathname:o}=ai(),a=JSON.stringify(E1(n).map(i=>i.pathnameBase));return g.useMemo(()=>Y3(e,JSON.parse(a),o,r==="path"),[e,a,o,r])}function lie(e,t,r){hf()||wt(!1);let{navigator:n}=g.useContext(ff),{matches:o}=g.useContext(oi),a=o[o.length-1],i=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:"/";a&&a.route;let l=ai(),c;if(t){var u;let w=typeof t=="string"?Ji(t):t;s==="/"||(u=w.pathname)!=null&&u.startsWith(s)||wt(!1),c=w}else c=l;let p=c.pathname||"/",h=s==="/"?p:p.slice(s.length)||"/",v=Xu(e,{pathname:h}),_=hie(v&&v.map(w=>Object.assign({},w,{params:Object.assign({},i,w.params),pathname:Ii([s,n.encodeLocation?n.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?s:Ii([s,n.encodeLocation?n.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,r);return t&&_?g.createElement(Z3.Provider,{value:{location:l7({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Lr.Pop}},_):_}function cie(){let e=vie(),t=iz(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:o},r):null,a)}const uie=g.createElement(cie,null);class die extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?g.createElement(oi.Provider,{value:this.props.routeContext},g.createElement(hz.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fie(e){let{routeContext:t,match:r,children:n}=e,o=g.useContext(X3);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement(oi.Provider,{value:t},n)}function hie(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let a=e,i=(n=r)==null?void 0:n.errors;if(i!=null){let s=a.findIndex(l=>l.route.id&&(i==null?void 0:i[l.route.id]));s>=0||wt(!1),a=a.slice(0,Math.min(a.length,s+1))}return a.reduceRight((s,l,c)=>{let u=l.route.id?i==null?void 0:i[l.route.id]:null,p=null;r&&(p=l.route.errorElement||uie);let h=t.concat(a.slice(0,c+1)),v=()=>{let _;return u?_=p:l.route.Component?_=g.createElement(l.route.Component,null):l.route.element?_=l.route.element:_=s,g.createElement(fie,{match:l,routeContext:{outlet:s,matches:h,isDataRoute:r!=null},children:_})};return r&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?g.createElement(die,{location:r.location,revalidation:r.revalidation,component:p,error:u,children:v(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):v()},null)}var j8;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(j8||(j8={}));var Dp;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(Dp||(Dp={}));function pie(e){let t=g.useContext(X3);return t||wt(!1),t}function mie(e){let t=g.useContext(fz);return t||wt(!1),t}function gie(e){let t=g.useContext(oi);return t||wt(!1),t}function gz(e){let t=gie(),r=t.matches[t.matches.length-1];return r.route.id||wt(!1),r.route.id}function vie(){var e;let t=g.useContext(hz),r=mie(Dp.UseRouteError),n=gz(Dp.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function bie(){let{router:e}=pie(j8.UseNavigateStable),t=gz(Dp.UseNavigateStable),r=g.useRef(!1);return pz(()=>{r.current=!0}),g.useCallback(function(o,a){a===void 0&&(a={}),r.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,l7({fromRouteId:t},a)))},[e,t])}const yie="startTransition",QP=AE[yie];function wie(e){let{fallbackElement:t,router:r,future:n}=e,[o,a]=g.useState(r.state),{v7_startTransition:i}=n||{},s=g.useCallback(p=>{i&&QP?QP(()=>a(p)):a(p)},[a,i]);g.useLayoutEffect(()=>r.subscribe(s),[r,s]);let l=g.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:p=>r.navigate(p),push:(p,h,v)=>r.navigate(p,{state:h,preventScrollReset:v==null?void 0:v.preventScrollReset}),replace:(p,h,v)=>r.navigate(p,{replace:!0,state:h,preventScrollReset:v==null?void 0:v.preventScrollReset})}),[r]),c=r.basename||"/",u=g.useMemo(()=>({router:r,navigator:l,static:!1,basename:c}),[r,l,c]);return g.createElement(g.Fragment,null,g.createElement(X3.Provider,{value:u},g.createElement(fz.Provider,{value:o},g.createElement(_ie,{basename:c,location:o.location,navigationType:o.historyAction,navigator:l},o.initialized?g.createElement(xie,{routes:r.routes,state:o}):t))),null)}function xie(e){let{routes:t,state:r}=e;return lie(t,void 0,r)}function u0(e){let{to:t,replace:r,state:n,relative:o}=e;hf()||wt(!1);let{matches:a}=g.useContext(oi),{pathname:i}=ai(),s=Ln(),l=Y3(t,E1(a).map(u=>u.pathnameBase),i,o==="path"),c=JSON.stringify(l);return g.useEffect(()=>s(JSON.parse(c),{replace:r,state:n,relative:o}),[s,c,o,r,n]),null}function kC(e){return sie(e.context)}function _ie(e){let{basename:t="/",children:r=null,location:n,navigationType:o=Lr.Pop,navigator:a,static:i=!1}=e;hf()&&wt(!1);let s=t.replace(/^\/*/,"/"),l=g.useMemo(()=>({basename:s,navigator:a,static:i}),[s,a,i]);typeof n=="string"&&(n=Ji(n));let{pathname:c="/",search:u="",hash:p="",state:h=null,key:v="default"}=n,_=g.useMemo(()=>{let w=df(c,s);return w==null?null:{location:{pathname:w,search:u,hash:p,state:h,key:v},navigationType:o}},[s,c,u,p,h,v,o]);return _==null?null:g.createElement(ff.Provider,{value:l},g.createElement(Z3.Provider,{children:r,value:_}))}var JP;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(JP||(JP={}));new Promise(()=>{});function Eie(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:g.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:g.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** - * React Router DOM v6.14.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Fp(){return Fp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[o]=e[o]);return r}function Oie(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kie(e,t){return e.button===0&&(!t||t==="_self")&&!Oie(e)}const Rie=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function Sie(e,t){return qae({basename:t==null?void 0:t.basename,future:Fp({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:mae({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Tie(),routes:e,mapRouteProperties:Eie}).initialize()}function Tie(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Fp({},t,{errors:Pie(t.errors)})),t}function Pie(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,o]of t)if(o&&o.__type==="RouteErrorResponse")r[n]=new EC(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let a=window[o.__subType];if(typeof a=="function")try{let i=new a(o.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let a=new Error(o.message);a.stack="",r[n]=a}}else r[n]=o;return r}const Mie=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Aie=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sn=g.forwardRef(function(t,r){let{onClick:n,relative:o,reloadDocument:a,replace:i,state:s,target:l,to:c,preventScrollReset:u}=t,p=Cie(t,Rie),{basename:h}=g.useContext(ff),v,_=!1;if(typeof c=="string"&&Aie.test(c)&&(v=c,Mie))try{let f=new URL(window.location.href),b=c.startsWith("//")?new URL(f.protocol+c):new URL(c),d=df(b.pathname,h);b.origin===f.origin&&d!=null?c=d+b.search+b.hash:_=!0}catch{}let w=oie(c,{relative:o}),y=jie(c,{replace:i,state:s,target:l,preventScrollReset:u,relative:o});function m(f){n&&n(f),f.defaultPrevented||y(f)}return g.createElement("a",Fp({},p,{href:v||w,onClick:_||a?n:m,ref:r,target:l}))});var eM;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(eM||(eM={}));var tM;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(tM||(tM={}));function jie(e,t){let{target:r,replace:n,state:o,preventScrollReset:a,relative:i}=t===void 0?{}:t,s=Ln(),l=ai(),c=mz(e,{relative:i});return g.useCallback(u=>{if(kie(u,r)){u.preventDefault();let p=n!==void 0?n:jc(l)===jc(c);s(e,{replace:p,state:o,preventScrollReset:a,relative:i})}},[l,s,c,n,o,r,e,a,i])}var vz={exports:{}},bz={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var zd=g;function Iie(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lie=typeof Object.is=="function"?Object.is:Iie,Nie=zd.useState,$ie=zd.useEffect,Die=zd.useLayoutEffect,Fie=zd.useDebugValue;function zie(e,t){var r=t(),n=Nie({inst:{value:r,getSnapshot:t}}),o=n[0].inst,a=n[1];return Die(function(){o.value=r,o.getSnapshot=t,ox(o)&&a({inst:o})},[e,r,t]),$ie(function(){return ox(o)&&a({inst:o}),e(function(){ox(o)&&a({inst:o})})},[e]),Fie(r),r}function ox(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Lie(e,r)}catch{return!0}}function Bie(e,t){return t()}var Vie=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Bie:zie;bz.useSyncExternalStore=zd.useSyncExternalStore!==void 0?zd.useSyncExternalStore:Vie;vz.exports=bz;var Hie=vz.exports,yz={exports:{}},wz={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Q3=g,Uie=Hie;function Wie(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qie=typeof Object.is=="function"?Object.is:Wie,Gie=Uie.useSyncExternalStore,Kie=Q3.useRef,Yie=Q3.useEffect,Xie=Q3.useMemo,Zie=Q3.useDebugValue;wz.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var a=Kie(null);if(a.current===null){var i={hasValue:!1,value:null};a.current=i}else i=a.current;a=Xie(function(){function l(v){if(!c){if(c=!0,u=v,v=n(v),o!==void 0&&i.hasValue){var _=i.value;if(o(_,v))return p=_}return p=v}if(_=p,qie(u,v))return _;var w=n(v);return o!==void 0&&o(_,w)?_:(u=v,p=w)}var c=!1,u,p,h=r===void 0?null:r;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,r,n,o]);var s=Gie(e,a[0],a[1]);return Yie(function(){i.hasValue=!0,i.value=s},[s]),Zie(s),s};yz.exports=wz;var Qie=yz.exports;function Jie(e){e()}let xz=Jie;const ese=e=>xz=e,tse=()=>xz,rM=Symbol.for(`react-redux-context-${g.version}`),nM=globalThis;function rse(){let e=nM[rM];return e||(e=g.createContext(null),nM[rM]=e),e}const pl=new Proxy({},new Proxy({},{get(e,t){const r=rse();return(n,...o)=>Reflect[t](r,...o)}}));function RC(e=pl){return function(){return g.useContext(e)}}const _z=RC(),nse=()=>{throw new Error("uSES not initialized!")};let Ez=nse;const ose=e=>{Ez=e},ase=(e,t)=>e===t;function ise(e=pl){const t=e===pl?_z:RC(e);return function(n,o={}){const{equalityFn:a=ase,stabilityCheck:i=void 0,noopCheck:s=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:c,getServerState:u,stabilityCheck:p,noopCheck:h}=t();g.useRef(!0);const v=g.useCallback({[n.name](w){return n(w)}}[n.name],[n,p,i]),_=Ez(c.addNestedSub,l.getState,u||l.getState,v,a);return g.useDebugValue(_),_}}const Qr=ise();var Cz={exports:{}},qt={};/** @license React v16.13.1 - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var en=typeof Symbol=="function"&&Symbol.for,SC=en?Symbol.for("react.element"):60103,TC=en?Symbol.for("react.portal"):60106,J3=en?Symbol.for("react.fragment"):60107,ew=en?Symbol.for("react.strict_mode"):60108,tw=en?Symbol.for("react.profiler"):60114,rw=en?Symbol.for("react.provider"):60109,nw=en?Symbol.for("react.context"):60110,PC=en?Symbol.for("react.async_mode"):60111,ow=en?Symbol.for("react.concurrent_mode"):60111,aw=en?Symbol.for("react.forward_ref"):60112,iw=en?Symbol.for("react.suspense"):60113,sse=en?Symbol.for("react.suspense_list"):60120,sw=en?Symbol.for("react.memo"):60115,lw=en?Symbol.for("react.lazy"):60116,lse=en?Symbol.for("react.block"):60121,cse=en?Symbol.for("react.fundamental"):60117,use=en?Symbol.for("react.responder"):60118,dse=en?Symbol.for("react.scope"):60119;function Oo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case SC:switch(e=e.type,e){case PC:case ow:case J3:case tw:case ew:case iw:return e;default:switch(e=e&&e.$$typeof,e){case nw:case aw:case lw:case sw:case rw:return e;default:return t}}case TC:return t}}}function Oz(e){return Oo(e)===ow}qt.AsyncMode=PC;qt.ConcurrentMode=ow;qt.ContextConsumer=nw;qt.ContextProvider=rw;qt.Element=SC;qt.ForwardRef=aw;qt.Fragment=J3;qt.Lazy=lw;qt.Memo=sw;qt.Portal=TC;qt.Profiler=tw;qt.StrictMode=ew;qt.Suspense=iw;qt.isAsyncMode=function(e){return Oz(e)||Oo(e)===PC};qt.isConcurrentMode=Oz;qt.isContextConsumer=function(e){return Oo(e)===nw};qt.isContextProvider=function(e){return Oo(e)===rw};qt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===SC};qt.isForwardRef=function(e){return Oo(e)===aw};qt.isFragment=function(e){return Oo(e)===J3};qt.isLazy=function(e){return Oo(e)===lw};qt.isMemo=function(e){return Oo(e)===sw};qt.isPortal=function(e){return Oo(e)===TC};qt.isProfiler=function(e){return Oo(e)===tw};qt.isStrictMode=function(e){return Oo(e)===ew};qt.isSuspense=function(e){return Oo(e)===iw};qt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===J3||e===ow||e===tw||e===ew||e===iw||e===sse||typeof e=="object"&&e!==null&&(e.$$typeof===lw||e.$$typeof===sw||e.$$typeof===rw||e.$$typeof===nw||e.$$typeof===aw||e.$$typeof===cse||e.$$typeof===use||e.$$typeof===dse||e.$$typeof===lse)};qt.typeOf=Oo;Cz.exports=qt;var fse=Cz.exports,kz=fse,hse={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},pse={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Rz={};Rz[kz.ForwardRef]=hse;Rz[kz.Memo]=pse;var Yt={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var MC=Symbol.for("react.element"),AC=Symbol.for("react.portal"),cw=Symbol.for("react.fragment"),uw=Symbol.for("react.strict_mode"),dw=Symbol.for("react.profiler"),fw=Symbol.for("react.provider"),hw=Symbol.for("react.context"),mse=Symbol.for("react.server_context"),pw=Symbol.for("react.forward_ref"),mw=Symbol.for("react.suspense"),gw=Symbol.for("react.suspense_list"),vw=Symbol.for("react.memo"),bw=Symbol.for("react.lazy"),gse=Symbol.for("react.offscreen"),Sz;Sz=Symbol.for("react.module.reference");function Zo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case MC:switch(e=e.type,e){case cw:case dw:case uw:case mw:case gw:return e;default:switch(e=e&&e.$$typeof,e){case mse:case hw:case pw:case bw:case vw:case fw:return e;default:return t}}case AC:return t}}}Yt.ContextConsumer=hw;Yt.ContextProvider=fw;Yt.Element=MC;Yt.ForwardRef=pw;Yt.Fragment=cw;Yt.Lazy=bw;Yt.Memo=vw;Yt.Portal=AC;Yt.Profiler=dw;Yt.StrictMode=uw;Yt.Suspense=mw;Yt.SuspenseList=gw;Yt.isAsyncMode=function(){return!1};Yt.isConcurrentMode=function(){return!1};Yt.isContextConsumer=function(e){return Zo(e)===hw};Yt.isContextProvider=function(e){return Zo(e)===fw};Yt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===MC};Yt.isForwardRef=function(e){return Zo(e)===pw};Yt.isFragment=function(e){return Zo(e)===cw};Yt.isLazy=function(e){return Zo(e)===bw};Yt.isMemo=function(e){return Zo(e)===vw};Yt.isPortal=function(e){return Zo(e)===AC};Yt.isProfiler=function(e){return Zo(e)===dw};Yt.isStrictMode=function(e){return Zo(e)===uw};Yt.isSuspense=function(e){return Zo(e)===mw};Yt.isSuspenseList=function(e){return Zo(e)===gw};Yt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===cw||e===dw||e===uw||e===mw||e===gw||e===gse||typeof e=="object"&&e!==null&&(e.$$typeof===bw||e.$$typeof===vw||e.$$typeof===fw||e.$$typeof===hw||e.$$typeof===pw||e.$$typeof===Sz||e.getModuleId!==void 0)};Yt.typeOf=Zo;function vse(){const e=tse();let t=null,r=null;return{clear(){t=null,r=null},notify(){e(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){let n=[],o=t;for(;o;)n.push(o),o=o.next;return n},subscribe(n){let o=!0,a=r={callback:n,next:null,prev:r};return a.prev?a.prev.next=a:t=a,function(){!o||t===null||(o=!1,a.next?a.next.prev=a.prev:r=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}const oM={notify(){},get:()=>[]};function bse(e,t){let r,n=oM;function o(p){return l(),n.subscribe(p)}function a(){n.notify()}function i(){u.onStateChange&&u.onStateChange()}function s(){return!!r}function l(){r||(r=t?t.addNestedSub(i):e.subscribe(i),n=vse())}function c(){r&&(r(),r=void 0,n.clear(),n=oM)}const u={addNestedSub:o,notifyNestedSubs:a,handleChangeWrapper:i,isSubscribed:s,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>n};return u}const yse=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",wse=yse?g.useLayoutEffect:g.useEffect;function xse({store:e,context:t,children:r,serverState:n,stabilityCheck:o="once",noopCheck:a="once"}){const i=g.useMemo(()=>{const c=bse(e);return{store:e,subscription:c,getServerState:n?()=>n:void 0,stabilityCheck:o,noopCheck:a}},[e,n,o,a]),s=g.useMemo(()=>e.getState(),[e]);wse(()=>{const{subscription:c}=i;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==e.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[i,s]);const l=t||pl;return De.createElement(l.Provider,{value:i},r)}function Tz(e=pl){const t=e===pl?_z:RC(e);return function(){const{store:n}=t();return n}}const _se=Tz();function Ese(e=pl){const t=e===pl?_se:Tz(e);return function(){return t().dispatch}}const ro=Ese();ose(Qie.useSyncExternalStoreWithSelector);ese(Xo.unstable_batchedUpdates);var ae={},Pz={},Mz={exports:{}};/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],o=0;oe&&(t=0,n=r,r=new Map)}return{get:function(a){var i=r.get(a);return i!==void 0?i:(i=n.get(a))!==void 0?(o(a,i),i):void 0},set:function(a,i){r.has(a)?r.set(a,i):o(a,i)}}}var Lz="!";function kse(e){var t=e.separator||":",r=t.length===1,n=t[0],o=t.length;return function(a){for(var i,s=[],l=0,c=0,u=0;uc?i-c:void 0}}}var Rse=/\s+/;function L8(){for(var e=arguments.length,t=new Array(e),r=0;r1?t-1:0),n=1;nl.length)&&(c=l.length);for(var u=0,p=new Array(c);uy.length)&&(m=y.length);for(var f=0,b=new Array(m);ff.length)&&(b=f.length);for(var d=0,x=new Array(b);df.length)&&(b=f.length);for(var d=0,x=new Array(b);dC.length)&&(k=C.length);for(var S=0,R=new Array(k);Sd.length)&&(x=d.length);for(var E=0,C=new Array(x);Em.length)&&(f=m.length);for(var b=0,d=new Array(f);bx.length)&&(E=x.length);for(var C=0,k=new Array(E);Cb.length)&&(d=b.length);for(var x=0,E=new Array(d);xv.length)&&(_=v.length);for(var w=0,y=new Array(_);w<_;w++)y[w]=v[w];return y}function a(v){if(Array.isArray(v))return o(v)}function i(v){return v&&v.__esModule?v:{default:v}}function s(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(v){return a(v)||s(v)||u(v)||l()}function u(v,_){if(v){if(typeof v=="string")return o(v,_);var w=Object.prototype.toString.call(v).slice(8,-1);if(w==="Object"&&v.constructor&&(w=v.constructor.name),w==="Map"||w==="Set")return Array.from(w);if(w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w))return o(v,_)}}var p=["white"].concat(c(n.propTypesColors)),h=r.default.string})(XC);var VV={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});var t={white:{color:"text-white"},"blue-gray":{color:"text-blue-gray-500"},gray:{color:"text-gray-500"},brown:{color:"text-brown-500"},"deep-orange":{color:"text-deep-orange-500"},orange:{color:"text-orange-500"},amber:{color:"text-amber-500"},yellow:{color:"text-yellow-500"},lime:{color:"text-lime-500"},"light-green":{color:"text-light-green-500"},green:{color:"text-green-500"},teal:{color:"text-teal-500"},cyan:{color:"text-cyan-500"},"light-blue":{color:"text-light-blue-500"},blue:{color:"text-blue-500"},indigo:{color:"text-indigo-500"},"deep-purple":{color:"text-deep-purple-500"},purple:{color:"text-purple-500"},pink:{color:"text-pink-500"},red:{color:"text-red-500"}},r=t})(VV);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s,l){for(var c in l)Object.defineProperty(s,c,{enumerable:!0,get:l[c]})}t(e,{spinner:function(){return a},default:function(){return i}});var r=XC,n=o(VV);function o(s){return s&&s.__esModule?s:{default:s}}var a={defaultProps:{color:"blue",className:""},valid:{colors:r.propTypesColor},styles:{base:{color:"text-blue-gray-100",animation:"animate-spin"},colors:n.default}},i=a})(BV);var HV={},UV={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{timeline:function(){return r},default:function(){return n}});var r={styles:{base:{display:"w-full",position:"flex",flexDirection:"flex-col"}}},n=r})(UV);var WV={},es={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(w,y){for(var m in y)Object.defineProperty(w,m,{enumerable:!0,get:y[m]})}t(e,{propTypeClassName:function(){return p},propTypeChildren:function(){return h},propTypeColor:function(){return v},propTypeVariant:function(){return _}});var r=i(Je),n=cr;function o(w,y){(y==null||y>w.length)&&(y=w.length);for(var m=0,f=new Array(y);m"u"?s[c]=i.cloneUnlessOtherwiseSpecified(l,i):i.isMergeableObject(l)?s[c]=(0,t.default)(o[c],l,i):o.indexOf(l)===-1&&s.push(l)}),s}})(sH);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,_){for(var w in _)Object.defineProperty(v,w,{enumerable:!0,get:_[w]})}t(e,{MaterialTailwindTheme:function(){return u},ThemeProvider:function(){return p},useTheme:function(){return h}});var r=c(g),n=s(Je),o=s(un),a=s(LC),i=s(sH);function s(v){return v&&v.__esModule?v:{default:v}}function l(v){if(typeof WeakMap!="function")return null;var _=new WeakMap,w=new WeakMap;return(l=function(y){return y?w:_})(v)}function c(v,_){if(!_&&v&&v.__esModule)return v;if(v===null||typeof v!="object"&&typeof v!="function")return{default:v};var w=l(_);if(w&&w.has(v))return w.get(v);var y={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in v)if(f!=="default"&&Object.prototype.hasOwnProperty.call(v,f)){var b=m?Object.getOwnPropertyDescriptor(v,f):null;b&&(b.get||b.set)?Object.defineProperty(y,f,b):y[f]=v[f]}return y.default=v,w&&w.set(v,y),y}var u=(0,r.createContext)(a.default);u.displayName="MaterialTailwindThemeProvider";function p(v){var _=v.value,w=_===void 0?a.default:_,y=v.children,m=(0,o.default)(a.default,w,{arrayMerge:i.default});return r.default.createElement(u.Provider,{value:m},y)}var h=function(){return(0,r.useContext)(u)};p.propTypes={value:n.default.instanceOf(Object),children:n.default.node.isRequired}})(Ke);var _w={},k1={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(h,v){for(var _ in v)Object.defineProperty(h,_,{enumerable:!0,get:v[_]})}t(e,{propTypesOpen:function(){return a},propTypesIcon:function(){return i},propTypesAnimate:function(){return s},propTypesDisabled:function(){return l},propTypesClassName:function(){return c},propTypesValue:function(){return u},propTypesChildren:function(){return p}});var r=o(Je),n=cr;function o(h){return h&&h.__esModule?h:{default:h}}var a=r.default.bool.isRequired,i=r.default.node,s=n.propTypesAnimation,l=r.default.bool,c=r.default.string,u=r.default.instanceOf(Object).isRequired,p=r.default.node.isRequired})(k1);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,c){for(var u in c)Object.defineProperty(l,u,{enumerable:!0,get:c[u]})}t(e,{AccordionContext:function(){return a},useAccordion:function(){return i},AccordionContextProvider:function(){return s}});var r=o(g),n=k1;function o(l){return l&&l.__esModule?l:{default:l}}var a=r.default.createContext(null);a.displayName="MaterialTailwind.AccordionContext";function i(){var l=r.default.useContext(a);if(!l)throw new Error("useAccordion() must be used within an Accordion. It happens when you use AccordionHeader or AccordionBody components outside the Accordion component.");return l}var s=function(l){var c=l.value,u=l.children;return r.default.createElement(a.Provider,{value:c},u)};s.propTypes={value:n.propTypesValue,children:n.propTypesChildren},s.displayName="MaterialTailwind.AccordionContextProvider"})(_w);var lH={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(y,m){for(var f in m)Object.defineProperty(y,f,{enumerable:!0,get:m[f]})}t(e,{AccordionHeader:function(){return _},default:function(){return w}});var r=p(g),n=p(lt),o=Qe,a=p(Xe),i=_w,s=Ke,l=k1;function c(y,m,f){return m in y?Object.defineProperty(y,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):y[m]=f,y}function u(){return u=Object.assign||function(y){for(var m=1;m=0)&&Object.prototype.propertyIsEnumerable.call(y,b)&&(f[b]=y[b])}return f}function v(y,m){if(y==null)return{};var f={},b=Object.keys(y),d,x;for(x=0;x=0)&&(f[d]=y[d]);return f}var _=r.default.forwardRef(function(y,m){var f=y.className,b=y.children,d=h(y,["className","children"]),x=(0,i.useAccordion)(),E=x.open,C=x.icon,k=x.disabled,S=(0,s.useTheme)().accordion,R=S.styles.base;f=f??"";var T=(0,o.twMerge)((0,n.default)((0,a.default)(R.header.initial),c({},(0,a.default)(R.header.active),E)),f),P=(0,n.default)((0,a.default)(R.header.icon));return r.default.createElement("button",u({},d,{ref:m,type:"button",disabled:k,className:T}),b,r.default.createElement("span",{className:P},C??(E?r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},r.default.createElement("path",{fillRule:"evenodd",d:"M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z",clipRule:"evenodd"})):r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},r.default.createElement("path",{fillRule:"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z",clipRule:"evenodd"})))))});_.propTypes={className:l.propTypesClassName,children:l.propTypesChildren},_.displayName="MaterialTailwind.AccordionHeader";var w=_})(lH);var cH={},tn={},N8=function(e,t){return N8=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},N8(e,t)};function uH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");N8(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var u7=function(){return u7=Object.assign||function(t){for(var r,n=1,o=arguments.length;n=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function hH(e,t){return function(r,n){t(r,n,e)}}function OPe(e,t,r,n,o,a){function i(m){if(m!==void 0&&typeof m!="function")throw new TypeError("Function expected");return m}for(var s=n.kind,l=s==="getter"?"get":s==="setter"?"set":"value",c=!t&&e?n.static?e:e.prototype:null,u=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),p,h=!1,v=r.length-1;v>=0;v--){var _={};for(var w in n)_[w]=w==="access"?{}:n[w];for(var w in n.access)_.access[w]=n.access[w];_.addInitializer=function(m){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(m||null))};var y=(0,r[v])(s==="accessor"?{get:u.get,set:u.set}:u[l],_);if(s==="accessor"){if(y===void 0)continue;if(y===null||typeof y!="object")throw new TypeError("Object expected");(p=i(y.get))&&(u.get=p),(p=i(y.set))&&(u.set=p),(p=i(y.init))&&o.unshift(p)}else(p=i(y))&&(s==="field"?o.unshift(p):u[l]=p)}c&&Object.defineProperty(c,n.name,u),h=!0}function kPe(e,t,r){for(var n=arguments.length>2,o=0;o0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ZC(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],i;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a}function bH(){for(var e=[],t=0;t1||s(h,v)})})}function s(h,v){try{l(n[h](v))}catch(_){p(a[0][3],_)}}function l(h){h.value instanceof Vd?Promise.resolve(h.value.v).then(c,u):p(a[0][2],h)}function c(h){s("next",h)}function u(h){s("throw",h)}function p(h,v){h(v),a.shift(),a.length&&s(a[0][0],a[0][1])}}function _H(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,a){t[o]=e[o]?function(i){return(r=!r)?{value:Vd(e[o](i)),done:!1}:a?a(i):i}:a}}function EH(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof d7=="function"?d7(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(i){return new Promise(function(s,l){i=e[a](i),o(s,l,i.done,i.value)})}}function o(a,i,s,l){Promise.resolve(l).then(function(c){a({value:c,done:s})},i)}}function CH(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var TPe=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function OH(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Ew(t,e,r);return TPe(t,e),t}function kH(e){return e&&e.__esModule?e:{default:e}}function RH(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function SH(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function TH(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function PH(e,t,r){if(t!=null){if(typeof t!="object")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var PPe=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function MH(e){function t(n){e.error=e.hasError?new PPe(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(a){return t(a),r()})}catch(a){t(a)}}if(e.hasError)throw e.error}return r()}const MPe={__extends:uH,__assign:u7,__rest:dH,__decorate:fH,__param:hH,__metadata:pH,__awaiter:mH,__generator:gH,__createBinding:Ew,__exportStar:vH,__values:d7,__read:ZC,__spread:bH,__spreadArrays:yH,__spreadArray:wH,__await:Vd,__asyncGenerator:xH,__asyncDelegator:_H,__asyncValues:EH,__makeTemplateObject:CH,__importStar:OH,__importDefault:kH,__classPrivateFieldGet:RH,__classPrivateFieldSet:SH,__classPrivateFieldIn:TH,__addDisposableResource:PH,__disposeResources:MH},APe=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:PH,get __assign(){return u7},__asyncDelegator:_H,__asyncGenerator:xH,__asyncValues:EH,__await:Vd,__awaiter:mH,__classPrivateFieldGet:RH,__classPrivateFieldIn:TH,__classPrivateFieldSet:SH,__createBinding:Ew,__decorate:fH,__disposeResources:MH,__esDecorate:OPe,__exportStar:vH,__extends:uH,__generator:gH,__importDefault:kH,__importStar:OH,__makeTemplateObject:CH,__metadata:pH,__param:hH,__propKey:RPe,__read:ZC,__rest:dH,__runInitializers:kPe,__setFunctionName:SPe,__spread:bH,__spreadArray:wH,__spreadArrays:yH,__values:d7,default:MPe},Symbol.toStringTag,{value:"Module"})),jPe=Wc(APe);var IPe=function(){},AH=function(){};const LPe=Object.freeze(Object.defineProperty({__proto__:null,invariant:AH,warning:IPe},Symbol.toStringTag,{value:"Module"})),jH=Wc(LPe);var Wr={};Object.defineProperty(Wr,"__esModule",{value:!0});const IH=(e,t)=>r=>Math.max(Math.min(r,t),e),Jh=e=>e%1?Number(e.toFixed(5)):e,Bp=/(-)?([\d]*\.?[\d])+/g,$8=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,NPe=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function R1(e){return typeof e=="string"}const S1={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},QC=Object.assign(Object.assign({},S1),{transform:IH(0,1)}),$Pe=Object.assign(Object.assign({},S1),{default:1}),T1=e=>({test:t=>R1(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),DPe=T1("deg"),gd=T1("%"),FPe=T1("px"),zPe=T1("vh"),BPe=T1("vw"),VPe=Object.assign(Object.assign({},gd),{parse:e=>gd.parse(e)/100,transform:e=>gd.transform(e*100)}),JC=(e,t)=>r=>!!(R1(r)&&NPe.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),LH=(e,t,r)=>n=>{if(!R1(n))return n;const[o,a,i,s]=n.match(Bp);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}},jh={test:JC("hsl","hue"),parse:LH("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+gd.transform(Jh(t))+", "+gd.transform(Jh(r))+", "+Jh(QC.transform(n))+")"},HPe=IH(0,255),ty=Object.assign(Object.assign({},S1),{transform:e=>Math.round(HPe(e))}),Ju={test:JC("rgb","red"),parse:LH("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+ty.transform(e)+", "+ty.transform(t)+", "+ty.transform(r)+", "+Jh(QC.transform(n))+")"};function UPe(e){let t="",r="",n="",o="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),o=e.substr(4,1),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}const D8={test:JC("#"),parse:UPe,transform:Ju.transform},eO={test:e=>Ju.test(e)||D8.test(e)||jh.test(e),parse:e=>Ju.test(e)?Ju.parse(e):jh.test(e)?jh.parse(e):D8.parse(e),transform:e=>R1(e)?e:e.hasOwnProperty("red")?Ju.transform(e):jh.transform(e)},NH="${c}",$H="${n}";function WPe(e){var t,r,n,o;return isNaN(e)&&R1(e)&&((r=(t=e.match(Bp))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((o=(n=e.match($8))===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)>0}function DH(e){typeof e=="number"&&(e=`${e}`);const t=[];let r=0;const n=e.match($8);n&&(r=n.length,e=e.replace($8,NH),t.push(...n.map(eO.parse)));const o=e.match(Bp);return o&&(e=e.replace(Bp,$H),t.push(...o.map(S1.parse))),{values:t,numColors:r,tokenised:e}}function FH(e){return DH(e).values}function zH(e){const{values:t,numColors:r,tokenised:n}=DH(e),o=t.length;return a=>{let i=n;for(let s=0;stypeof e=="number"?0:e;function GPe(e){const t=FH(e);return zH(e)(t.map(qPe))}const BH={test:WPe,parse:FH,createTransformer:zH,getAnimatableNone:GPe},KPe=new Set(["brightness","contrast","saturate","opacity"]);function YPe(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Bp)||[];if(!n)return e;const o=r.replace(n,"");let a=KPe.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}const XPe=/([a-z-]*)\(.*?\)/g,ZPe=Object.assign(Object.assign({},BH),{getAnimatableNone:e=>{const t=e.match(XPe);return t?t.map(YPe).join(" "):e}});Wr.alpha=QC;Wr.color=eO;Wr.complex=BH;Wr.degrees=DPe;Wr.filter=ZPe;Wr.hex=D8;Wr.hsla=jh;Wr.number=S1;Wr.percent=gd;Wr.progressPercentage=VPe;Wr.px=FPe;Wr.rgbUnit=ty;Wr.rgba=Ju;Wr.scale=$Pe;Wr.vh=zPe;Wr.vw=BPe;var at={},F8=function(e,t){return F8=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},F8(e,t)};function VH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");F8(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var f7=function(){return f7=Object.assign||function(t){for(var r,n=1,o=arguments.length;n=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function WH(e,t){return function(r,n){t(r,n,e)}}function QPe(e,t,r,n,o,a){function i(m){if(m!==void 0&&typeof m!="function")throw new TypeError("Function expected");return m}for(var s=n.kind,l=s==="getter"?"get":s==="setter"?"set":"value",c=!t&&e?n.static?e:e.prototype:null,u=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),p,h=!1,v=r.length-1;v>=0;v--){var _={};for(var w in n)_[w]=w==="access"?{}:n[w];for(var w in n.access)_.access[w]=n.access[w];_.addInitializer=function(m){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(m||null))};var y=(0,r[v])(s==="accessor"?{get:u.get,set:u.set}:u[l],_);if(s==="accessor"){if(y===void 0)continue;if(y===null||typeof y!="object")throw new TypeError("Object expected");(p=i(y.get))&&(u.get=p),(p=i(y.set))&&(u.set=p),(p=i(y.init))&&o.unshift(p)}else(p=i(y))&&(s==="field"?o.unshift(p):u[l]=p)}c&&Object.defineProperty(c,n.name,u),h=!0}function JPe(e,t,r){for(var n=arguments.length>2,o=0;o0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function tO(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],i;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a}function XH(){for(var e=[],t=0;t1||s(h,v)})})}function s(h,v){try{l(n[h](v))}catch(_){p(a[0][3],_)}}function l(h){h.value instanceof Hd?Promise.resolve(h.value.v).then(c,u):p(a[0][2],h)}function c(h){s("next",h)}function u(h){s("throw",h)}function p(h,v){h(v),a.shift(),a.length&&s(a[0][0],a[0][1])}}function eU(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,a){t[o]=e[o]?function(i){return(r=!r)?{value:Hd(e[o](i)),done:!1}:a?a(i):i}:a}}function tU(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof h7=="function"?h7(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(i){return new Promise(function(s,l){i=e[a](i),o(s,l,i.done,i.value)})}}function o(a,i,s,l){Promise.resolve(l).then(function(c){a({value:c,done:s})},i)}}function rU(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var rMe=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function nU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Cw(t,e,r);return rMe(t,e),t}function oU(e){return e&&e.__esModule?e:{default:e}}function aU(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function iU(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function sU(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function lU(e,t,r){if(t!=null){if(typeof t!="object")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var nMe=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function cU(e){function t(n){e.error=e.hasError?new nMe(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(a){return t(a),r()})}catch(a){t(a)}}if(e.hasError)throw e.error}return r()}const oMe={__extends:VH,__assign:f7,__rest:HH,__decorate:UH,__param:WH,__metadata:qH,__awaiter:GH,__generator:KH,__createBinding:Cw,__exportStar:YH,__values:h7,__read:tO,__spread:XH,__spreadArrays:ZH,__spreadArray:QH,__await:Hd,__asyncGenerator:JH,__asyncDelegator:eU,__asyncValues:tU,__makeTemplateObject:rU,__importStar:nU,__importDefault:oU,__classPrivateFieldGet:aU,__classPrivateFieldSet:iU,__classPrivateFieldIn:sU,__addDisposableResource:lU,__disposeResources:cU},aMe=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:lU,get __assign(){return f7},__asyncDelegator:eU,__asyncGenerator:JH,__asyncValues:tU,__await:Hd,__awaiter:GH,__classPrivateFieldGet:aU,__classPrivateFieldIn:sU,__classPrivateFieldSet:iU,__createBinding:Cw,__decorate:UH,__disposeResources:cU,__esDecorate:QPe,__exportStar:YH,__extends:VH,__generator:KH,__importDefault:oU,__importStar:nU,__makeTemplateObject:rU,__metadata:qH,__param:WH,__propKey:eMe,__read:tO,__rest:HH,__runInitializers:JPe,__setFunctionName:tMe,__spread:XH,__spreadArray:QH,__spreadArrays:ZH,__values:h7,default:oMe},Symbol.toStringTag,{value:"Module"})),iMe=Wc(aMe);var Qc={};Object.defineProperty(Qc,"__esModule",{value:!0});const uU=1/60*1e3,sMe=typeof performance<"u"?()=>performance.now():()=>Date.now(),dU=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(sMe()),uU);function lMe(e){let t=[],r=[],n=0,o=!1,a=!1;const i=new WeakSet,s={schedule:(l,c=!1,u=!1)=>{const p=u&&o,h=p?t:r;return c&&i.add(l),h.indexOf(l)===-1&&(h.push(l),p&&o&&(n=t.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),i.delete(l)},process:l=>{if(o){a=!0;return}if(o=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let c=0;c(e[t]=lMe(()=>Vp=!0),e),{}),uMe=P1.reduce((e,t)=>{const r=Ow[t];return e[t]=(n,o=!1,a=!1)=>(Vp||pMe(),r.schedule(n,o,a)),e},{}),dMe=P1.reduce((e,t)=>(e[t]=Ow[t].cancel,e),{}),fMe=P1.reduce((e,t)=>(e[t]=()=>Ow[t].process(vd),e),{}),hMe=e=>Ow[e].process(vd),fU=e=>{Vp=!1,vd.delta=z8?uU:Math.max(Math.min(e-vd.timestamp,cMe),1),vd.timestamp=e,B8=!0,P1.forEach(hMe),B8=!1,Vp&&(z8=!1,dU(fU))},pMe=()=>{Vp=!0,z8=!0,B8||dU(fU)},mMe=()=>vd;Qc.cancelSync=dMe;Qc.default=uMe;Qc.flushSync=fMe;Qc.getFrameData=mMe;Object.defineProperty(at,"__esModule",{value:!0});var hU=iMe,Ud=jH,ma=Wr,kw=Qc;function gMe(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var vMe=gMe(kw);const Hp=(e,t,r)=>Math.min(Math.max(r,e),t),ax=.001,bMe=.01,uM=10,yMe=.05,wMe=1;function xMe({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let o,a;Ud.warning(e<=uM*1e3,"Spring duration must be 10 seconds or less");let i=1-t;i=Hp(yMe,wMe,i),e=Hp(bMe,uM,e/1e3),i<1?(o=c=>{const u=c*i,p=u*e,h=u-r,v=V8(c,i),_=Math.exp(-p);return ax-h/v*_},a=c=>{const p=c*i*e,h=p*r+r,v=Math.pow(i,2)*Math.pow(c,2)*e,_=Math.exp(-p),w=V8(Math.pow(c,2),i);return(-o(c)+ax>0?-1:1)*((h-v)*_)/w}):(o=c=>{const u=Math.exp(-c*e),p=(c-r)*e+1;return-ax+u*p},a=c=>{const u=Math.exp(-c*e),p=(r-c)*(e*e);return u*p});const s=5/e,l=EMe(o,a,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:i*2*Math.sqrt(n*c),duration:e}}}const _Me=12;function EMe(e,t,r){let n=r;for(let o=1;o<_Me;o++)n=n-e(n)/t(n);return n}function V8(e,t){return e*Math.sqrt(1-t*t)}const CMe=["duration","bounce"],OMe=["stiffness","damping","mass"];function dM(e,t){return t.some(r=>e[r]!==void 0)}function kMe(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!dM(e,OMe)&&dM(e,CMe)){const r=xMe(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Rw(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:o}=e,a=hU.__rest(e,["from","to","restSpeed","restDelta"]);const i={done:!1,value:t};let{stiffness:s,damping:l,mass:c,velocity:u,duration:p,isResolvedFromDuration:h}=kMe(a),v=fM,_=fM;function w(){const y=u?-(u/1e3):0,m=r-t,f=l/(2*Math.sqrt(s*c)),b=Math.sqrt(s/c)/1e3;if(o===void 0&&(o=Math.min(Math.abs(r-t)/100,.4)),f<1){const d=V8(b,f);v=x=>{const E=Math.exp(-f*b*x);return r-E*((y+f*b*m)/d*Math.sin(d*x)+m*Math.cos(d*x))},_=x=>{const E=Math.exp(-f*b*x);return f*b*E*(Math.sin(d*x)*(y+f*b*m)/d+m*Math.cos(d*x))-E*(Math.cos(d*x)*(y+f*b*m)-d*m*Math.sin(d*x))}}else if(f===1)v=d=>r-Math.exp(-b*d)*(m+(y+b*m)*d);else{const d=b*Math.sqrt(f*f-1);v=x=>{const E=Math.exp(-f*b*x),C=Math.min(d*x,300);return r-E*((y+f*b*m)*Math.sinh(C)+d*m*Math.cosh(C))/d}}}return w(),{next:y=>{const m=v(y);if(h)i.done=y>=p;else{const f=_(y)*1e3,b=Math.abs(f)<=n,d=Math.abs(r-m)<=o;i.done=b&&d}return i.value=i.done?r:m,i},flipTarget:()=>{u=-u,[t,r]=[r,t],w()}}}Rw.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const fM=e=>0,rO=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},Sw=(e,t,r)=>-r*e+r*t+e;function ix(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function hM({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,a=0,i=0;if(!t)o=a=i=r;else{const s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=ix(l,s,e+1/3),a=ix(l,s,e),i=ix(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}const RMe=(e,t,r)=>{const n=e*e,o=t*t;return Math.sqrt(Math.max(0,r*(o-n)+n))},SMe=[ma.hex,ma.rgba,ma.hsla],pM=e=>SMe.find(t=>t.test(e)),mM=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,nO=(e,t)=>{let r=pM(e),n=pM(t);Ud.invariant(!!r,mM(e)),Ud.invariant(!!n,mM(t));let o=r.parse(e),a=n.parse(t);r===ma.hsla&&(o=hM(o),r=ma.rgba),n===ma.hsla&&(a=hM(a),n=ma.rgba);const i=Object.assign({},o);return s=>{for(const l in i)l!=="alpha"&&(i[l]=RMe(o[l],a[l],s));return i.alpha=Sw(o.alpha,a.alpha,s),r.transform(i)}},TMe={x:0,y:0,z:0},H8=e=>typeof e=="number",PMe=(e,t)=>r=>t(e(r)),oO=(...e)=>e.reduce(PMe);function pU(e,t){return H8(e)?r=>Sw(e,t,r):ma.color.test(e)?nO(e,t):aO(e,t)}const mU=(e,t)=>{const r=[...e],n=r.length,o=e.map((a,i)=>pU(a,t[i]));return a=>{for(let i=0;i{const r=Object.assign(Object.assign({},e),t),n={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=pU(e[o],t[o]));return o=>{for(const a in n)r[a]=n[a](o);return r}};function gM(e){const t=ma.complex.parse(e),r=t.length;let n=0,o=0,a=0;for(let i=0;i{const r=ma.complex.createTransformer(t),n=gM(e),o=gM(t);return n.numHSL===o.numHSL&&n.numRGB===o.numRGB&&n.numNumbers>=o.numNumbers?oO(mU(n.parsed,o.parsed),r):(Ud.warning(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),i=>`${i>0?t:e}`)},AMe=(e,t)=>r=>Sw(e,t,r);function jMe(e){if(typeof e=="number")return AMe;if(typeof e=="string")return ma.color.test(e)?nO:aO;if(Array.isArray(e))return mU;if(typeof e=="object")return MMe}function IMe(e,t,r){const n=[],o=r||jMe(e[0]),a=e.length-1;for(let i=0;ir(rO(e,t,n))}function NMe(e,t){const r=e.length,n=r-1;return o=>{let a=0,i=!1;if(o<=e[0]?i=!0:o>=e[n]&&(a=n-1,i=!0),!i){let l=1;for(;lo||l===n);l++);a=l-1}const s=rO(e[a],e[a+1],o);return t[a](s)}}function iO(e,t,{clamp:r=!0,ease:n,mixer:o}={}){const a=e.length;Ud.invariant(a===t.length,"Both input and output ranges must be the same length"),Ud.invariant(!n||!Array.isArray(n)||n.length===a-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[a-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const i=IMe(t,n,o),s=a===2?LMe(e,i):NMe(e,i);return r?l=>s(Hp(e[0],e[a-1],l)):s}const M1=e=>t=>1-e(1-t),Tw=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gU=e=>t=>Math.pow(t,e),sO=e=>t=>t*t*((e+1)*t-e),vU=e=>{const t=sO(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))},bU=1.525,$Me=4/11,DMe=8/11,FMe=9/10,yU=e=>e,lO=gU(2),zMe=M1(lO),wU=Tw(lO),xU=e=>1-Math.sin(Math.acos(e)),_U=M1(xU),BMe=Tw(_U),cO=sO(bU),VMe=M1(cO),HMe=Tw(cO),UMe=vU(bU),WMe=4356/361,qMe=35442/1805,GMe=16061/1805,p7=e=>{if(e===1||e===0)return e;const t=e*e;return e<$Me?7.5625*t:ee<.5?.5*(1-p7(1-e*2)):.5*p7(e*2-1)+.5;function XMe(e,t){return e.map(()=>t||wU).splice(0,e.length-1)}function ZMe(e){const t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function QMe(e,t){return e.map(r=>r*t)}function ep({from:e=0,to:t=1,ease:r,offset:n,duration:o=300}){const a={done:!1,value:e},i=Array.isArray(t)?t:[e,t],s=QMe(n&&n.length===i.length?n:ZMe(i),o);function l(){return iO(s,i,{ease:Array.isArray(r)?r:XMe(i,r)})}let c=l();return{next:u=>(a.value=c(u),a.done=u>=o,a),flipTarget:()=>{i.reverse(),c=l()}}}function EU({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:o=.5,modifyTarget:a}){const i={done:!1,value:t};let s=r*e;const l=t+s,c=a===void 0?l:a(l);return c!==l&&(s=c-t),{next:u=>{const p=-s*Math.exp(-u/n);return i.done=!(p>o||p<-o),i.value=i.done?c:c+p,i},flipTarget:()=>{}}}const vM={keyframes:ep,spring:Rw,decay:EU};function JMe(e){if(Array.isArray(e.to))return ep;if(vM[e.type])return vM[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?ep:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Rw:ep}function CU(e,t,r=0){return e-t-r}function eAe(e,t,r=0,n=!0){return n?CU(t+-e,t,r):t-(e-t)+r}function tAe(e,t,r,n){return n?e>=t+r:e<=-r}const rAe=e=>{const t=({delta:r})=>e(r);return{start:()=>vMe.default.update(t,!0),stop:()=>kw.cancelSync.update(t)}};function OU(e){var t,r,{from:n,autoplay:o=!0,driver:a=rAe,elapsed:i=0,repeat:s=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:p,onComplete:h,onRepeat:v,onUpdate:_}=e,w=hU.__rest(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:y}=w,m,f=0,b=w.duration,d,x=!1,E=!0,C;const k=JMe(w);!((r=(t=k).needsInterpolation)===null||r===void 0)&&r.call(t,n,y)&&(C=iO([0,100],[n,y],{clamp:!1}),n=0,y=100);const S=k(Object.assign(Object.assign({},w),{from:n,to:y}));function R(){f++,l==="reverse"?(E=f%2===0,i=eAe(i,b,c,E)):(i=CU(i,b,c),l==="mirror"&&S.flipTarget()),x=!1,v&&v()}function T(){m.stop(),h&&h()}function P(L){if(E||(L=-L),i+=L,!x){const D=S.next(Math.max(0,i));d=D.value,C&&(d=C(d)),x=E?D.done:i<=0}_==null||_(d),x&&(f===0&&(b??(b=i)),f{p==null||p(),m.stop()}}}function kU(e,t){return t?e*(1e3/t):0}function nAe({from:e=0,velocity:t=0,min:r,max:n,power:o=.8,timeConstant:a=750,bounceStiffness:i=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:p,onComplete:h,onStop:v}){let _;function w(b){return r!==void 0&&bn}function y(b){return r===void 0?n:n===void 0||Math.abs(r-b){var x;p==null||p(d),(x=b.onUpdate)===null||x===void 0||x.call(b,d)},onComplete:h,onStop:v}))}function f(b){m(Object.assign({type:"spring",stiffness:i,damping:s,restDelta:l},b))}if(w(e))f({from:e,velocity:t,to:y(e)});else{let b=o*t+e;typeof c<"u"&&(b=c(b));const d=y(b),x=d===r?-1:1;let E,C;const k=S=>{E=C,C=S,t=kU(S-E,kw.getFrameData().delta),(x===1&&S>d||x===-1&&S_==null?void 0:_.stop()}}const RU=e=>e*180/Math.PI,oAe=(e,t=TMe)=>RU(Math.atan2(t.y-e.y,t.x-e.x)),aAe=(e,t)=>{let r=!0;return t===void 0&&(t=e,r=!1),n=>r?n-e+t:(e=n,r=!0,t)},iAe=e=>e,uO=(e=iAe)=>(t,r,n)=>{const o=r-n,a=-(0-t+1)*(0-e(Math.abs(o)));return o<=0?r+a:r-a},sAe=uO(),lAe=uO(Math.sqrt),SU=e=>e*Math.PI/180,m7=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),U8=e=>m7(e)&&e.hasOwnProperty("z"),U5=(e,t)=>Math.abs(e-t);function cAe(e,t){if(H8(e)&&H8(t))return U5(e,t);if(m7(e)&&m7(t)){const r=U5(e.x,t.x),n=U5(e.y,t.y),o=U8(e)&&U8(t)?U5(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}}const uAe=(e,t,r)=>(t=SU(t),{x:r*Math.cos(t)+e.x,y:r*Math.sin(t)+e.y}),TU=(e,t=2)=>(t=Math.pow(10,t),Math.round(e*t)/t),PU=(e,t,r,n=0)=>TU(e+r*(t-e)/Math.max(n,r)),dAe=(e=50)=>{let t=0,r=0;return n=>{const o=kw.getFrameData().timestamp,a=o!==r?o-r:0,i=a?PU(t,n,a,e):t;return r=o,t=i,i}},fAe=e=>{if(typeof e=="number")return t=>Math.round(t/e)*e;{let t=0;const r=e.length;return n=>{let o=Math.abs(e[0]-n);for(t=1;to)return e[t-1];if(t===r-1)return a;o=i}}}};function hAe(e,t){return e/(1e3/t)}const pAe=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e},MU=(e,t)=>1-3*t+3*e,AU=(e,t)=>3*t-6*e,jU=e=>3*e,g7=(e,t,r)=>((MU(t,r)*e+AU(t,r))*e+jU(t))*e,IU=(e,t,r)=>3*MU(t,r)*e*e+2*AU(t,r)*e+jU(t),mAe=1e-7,gAe=10;function vAe(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=g7(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>mAe&&++s=yAe?wAe(i,p,e,r):h===0?p:vAe(i,s,s+W5,e,r)}return i=>i===0||i===1?i:g7(a(i),t,n)}const _Ae=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,o=t==="end"?Math.floor(n):Math.ceil(n);return Hp(0,1,o/e)};at.angle=oAe;at.animate=OU;at.anticipate=UMe;at.applyOffset=aAe;at.attract=sAe;at.attractExpo=lAe;at.backIn=cO;at.backInOut=HMe;at.backOut=VMe;at.bounceIn=KMe;at.bounceInOut=YMe;at.bounceOut=p7;at.circIn=xU;at.circInOut=BMe;at.circOut=_U;at.clamp=Hp;at.createAnticipate=vU;at.createAttractor=uO;at.createBackIn=sO;at.createExpoIn=gU;at.cubicBezier=xAe;at.decay=EU;at.degreesToRadians=SU;at.distance=cAe;at.easeIn=lO;at.easeInOut=wU;at.easeOut=zMe;at.inertia=nAe;at.interpolate=iO;at.isPoint=m7;at.isPoint3D=U8;at.keyframes=ep;at.linear=yU;at.mirrorEasing=Tw;at.mix=Sw;at.mixColor=nO;at.mixComplex=aO;at.pipe=oO;at.pointFromVector=uAe;at.progress=rO;at.radiansToDegrees=RU;at.reverseEasing=M1;at.smooth=dAe;at.smoothFrame=PU;at.snap=fAe;at.spring=Rw;at.steps=_Ae;at.toDecimal=TU;at.velocityPerFrame=hAe;at.velocityPerSecond=kU;at.wrap=pAe;let EAe=class{setAnimation(t){this.animation=t,t==null||t.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}};const sx=new WeakMap;function dO(e){return sx.has(e)||sx.set(e,{transforms:[],values:new Map}),sx.get(e)}function CAe(e,t){return e.has(t)||e.set(t,new EAe),e.get(t)}function LU(e,t){e.indexOf(t)===-1&&e.push(t)}function NU(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const $U=(e,t,r)=>Math.min(Math.max(r,e),t),qn={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},Gi=e=>typeof e=="number",Up=e=>Array.isArray(e)&&!Gi(e[0]),OAe=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e};function DU(e,t){return Up(e)?e[OAe(0,e.length,t)]:e}const fO=(e,t,r)=>-r*e+r*t+e,hO=()=>{},Li=e=>e,Pw=(e,t,r)=>t-e===0?1:(r-e)/(t-e);function pO(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=Pw(0,t,n);e.push(fO(r,1,o))}}function mO(e){const t=[0];return pO(t,e-1),t}function FU(e,t=mO(e.length),r=Li){const n=e.length,o=n-t.length;return o>0&&pO(t,o),a=>{let i=0;for(;iArray.isArray(e)&&Gi(e[0]),v7=e=>typeof e=="object"&&!!e.createAnimation,kAe=e=>typeof e=="function",gO=e=>typeof e=="string",xc={ms:e=>e*1e3,s:e=>e/1e3};function BU(e,t){return t?e*(1e3/t):0}const RAe=["","X","Y","Z"],SAe=["translate","scale","rotate","skew"],Wd={x:"translateX",y:"translateY",z:"translateZ"},bM={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},TAe={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:bM,scale:{syntax:"",initialValue:1,toDefaultUnit:Li},skew:bM},qd=new Map,Mw=e=>`--motion-${e}`,b7=["x","y","z"];SAe.forEach(e=>{RAe.forEach(t=>{b7.push(e+t),qd.set(Mw(e+t),TAe[e])})});const PAe=(e,t)=>b7.indexOf(e)-b7.indexOf(t),MAe=new Set(b7),Aw=e=>MAe.has(e),AAe=(e,t)=>{Wd[t]&&(t=Wd[t]);const{transforms:r}=dO(e);LU(r,t),e.style.transform=VU(r)},VU=e=>e.sort(PAe).reduce(jAe,"").trim(),jAe=(e,t)=>`${e} ${t}(var(${Mw(t)}))`,W8=e=>e.startsWith("--"),yM=new Set;function IAe(e){if(!yM.has(e)){yM.add(e);try{const{syntax:t,initialValue:r}=qd.has(e)?qd.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch{}}}const HU=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,LAe=1e-7,NAe=12;function $Ae(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=HU(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>LAe&&++s$Ae(a,0,1,e,r);return a=>a===0||a===1?a:HU(o(a),t,n)}const DAe=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,o=t==="end"?Math.floor(n):Math.ceil(n);return $U(0,1,o/e)},wM={ease:Ih(.25,.1,.25,1),"ease-in":Ih(.42,0,1,1),"ease-in-out":Ih(.42,0,.58,1),"ease-out":Ih(0,0,.58,1)},FAe=/\((.*?)\)/;function q8(e){if(kAe(e))return e;if(zU(e))return Ih(...e);if(wM[e])return wM[e];if(e.startsWith("steps")){const t=FAe.exec(e);if(t){const r=t[1].split(",");return DAe(parseFloat(r[0]),r[1].trim())}}return Li}let zAe=class{constructor(t,r=[0,1],{easing:n,duration:o=qn.duration,delay:a=qn.delay,endDelay:i=qn.endDelay,repeat:s=qn.repeat,offset:l,direction:c="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=Li,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((p,h)=>{this.resolve=p,this.reject=h}),n=n||qn.easing,v7(n)){const p=n.createAnimation(r);n=p.easing,r=p.keyframes||r,o=p.duration||o}this.repeat=s,this.easing=Up(n)?Li:q8(n),this.updateDuration(o);const u=FU(r,l,Up(n)?n.map(q8):Li);this.tick=p=>{var h;a=a;let v=0;this.pauseTime!==void 0?v=this.pauseTime:v=(p-this.startTime)*this.rate,this.t=v,v/=1e3,v=Math.max(v-a,0),this.playState==="finished"&&this.pauseTime===void 0&&(v=this.totalDuration);const _=v/this.duration;let w=Math.floor(_),y=_%1;!y&&_>=1&&(y=1),y===1&&w--;const m=w%2;(c==="reverse"||c==="alternate"&&m||c==="alternate-reverse"&&!m)&&(y=1-y);const f=v>=this.totalDuration?1:Math.min(y,1),b=u(this.easing(f));t(b),this.pauseTime===void 0&&(this.playState==="finished"||v>=this.totalDuration+i)?(this.playState="finished",(h=this.resolve)===null||h===void 0||h.call(this,b)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}};const xM=e=>zU(e)?BAe(e):e,BAe=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,_M=e=>document.createElement("div").animate(e,{duration:.001}),EM={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{_M({opacity:[1]})}catch{return!1}return!0},finished:()=>!!_M({opacity:[0,1]}).finished},lx={},ny={};for(const e in EM)ny[e]=()=>(lx[e]===void 0&&(lx[e]=EM[e]()),lx[e]);function VAe(e,t){for(let r=0;rArray.isArray(e)?e:[e];function y7(e){return Wd[e]&&(e=Wd[e]),Aw(e)?Mw(e):e}const ed={get:(e,t)=>{t=y7(t);let r=W8(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&r!==0){const n=qd.get(t);n&&(r=n.initialValue)}return r},set:(e,t,r)=>{t=y7(t),W8(t)?e.style.setProperty(t,r):e.style[t]=r}};function WU(e,t=!0){if(!(!e||e.playState==="finished"))try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}function HAe(){return window.__MOTION_DEV_TOOLS_RECORD}function jw(e,t,r,n={}){const o=HAe(),a=n.record!==!1&&o;let i,{duration:s=qn.duration,delay:l=qn.delay,endDelay:c=qn.endDelay,repeat:u=qn.repeat,easing:p=qn.easing,direction:h,offset:v,allowWebkitAcceleration:_=!1}=n;const w=dO(e);let y=ny.waapi();const m=Aw(t);m&&AAe(e,t);const f=y7(t),b=CAe(w.values,f),d=qd.get(f);return WU(b.animation,!(v7(p)&&b.generator)&&n.record!==!1),()=>{const x=()=>{var C,k;return(k=(C=ed.get(e,f))!==null&&C!==void 0?C:d==null?void 0:d.initialValue)!==null&&k!==void 0?k:0};let E=VAe(UU(r),x);if(v7(p)){const C=p.createAnimation(E,x,m,f,b);p=C.easing,C.keyframes!==void 0&&(E=C.keyframes),C.duration!==void 0&&(s=C.duration)}if(W8(f)&&(ny.cssRegisterProperty()?IAe(f):y=!1),y){d&&(E=E.map(S=>Gi(S)?d.toDefaultUnit(S):S)),E.length===1&&(!ny.partialKeyframes()||a)&&E.unshift(x());const C={delay:xc.ms(l),duration:xc.ms(s),endDelay:xc.ms(c),easing:Up(p)?void 0:xM(p),direction:h,iterations:u+1,fill:"both"};i=e.animate({[f]:E,offset:v,easing:Up(p)?p.map(xM):void 0},C),i.finished||(i.finished=new Promise((S,R)=>{i.onfinish=S,i.oncancel=R}));const k=E[E.length-1];i.finished.then(()=>{ed.set(e,f,k),i.cancel()}).catch(hO),_||(i.playbackRate=1.000001)}else if(m){E=E.map(k=>typeof k=="string"?parseFloat(k):k),E.length===1&&E.unshift(parseFloat(x()));const C=k=>{d&&(k=d.toDefaultUnit(k)),ed.set(e,f,k)};i=new zAe(C,E,Object.assign(Object.assign({},n),{duration:s,easing:p}))}else{const C=E[E.length-1];ed.set(e,f,d&&Gi(C)?d.toDefaultUnit(C):C)}return a&&o(e,t,E,{duration:s,delay:l,easing:p,repeat:u,offset:v},"motion-one"),b.setAnimation(i),i}}const vO=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function Iw(e,t){var r;return typeof e=="string"?t?((r=t[e])!==null&&r!==void 0||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}const UAe=e=>e(),bO=(e,t,r=qn.duration)=>new Proxy({animations:e.map(UAe).filter(Boolean),duration:r,options:t},qAe),WAe=e=>e.animations[0],qAe={get:(e,t)=>{const r=WAe(e);switch(t){case"duration":return e.duration;case"currentTime":return xc.s((r==null?void 0:r[t])||0);case"playbackRate":case"playState":return r==null?void 0:r[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(GAe)).catch(hO)),e.finished;case"stop":return()=>{e.animations.forEach(n=>WU(n))};case"forEachNative":return n=>{e.animations.forEach(o=>n(o,e))};default:return typeof(r==null?void 0:r[t])>"u"?void 0:()=>e.animations.forEach(n=>n[t]())}},set:(e,t,r)=>{switch(t){case"currentTime":r=xc.ms(r);case"currentTime":case"playbackRate":for(let n=0;ne.finished;function KAe(e=.1,{start:t=0,from:r=0,easing:n}={}){return(o,a)=>{const i=Gi(r)?r:YAe(r,a),s=Math.abs(i-o);let l=e*s;if(n){const c=a*e;l=q8(n)(l/c)*c}return t+l}}function YAe(e,t){if(e==="first")return 0;{const r=t-1;return e==="last"?r:r/2}}function qU(e,t,r){return typeof e=="function"?e(t,r):e}function XAe(e,t,r={}){e=Iw(e);const n=e.length,o=[];for(let a=0;at&&o.atjw(...a)).filter(Boolean);return bO(o,t,(r=n[0])===null||r===void 0?void 0:r[3].duration)}function tje(e,t={}){var{defaultOptions:r={}}=t,n=Lw(t,["defaultOptions"]);const o=[],a=new Map,i={},s=new Map;let l=0,c=0,u=0;for(let p=0;p"0",V);T=q.easing,q.keyframes!==void 0&&(k=q.keyframes),q.duration!==void 0&&(R=q.duration)}const P=qU(w.delay,b,f)||0,j=c+P,L=j+R;let{offset:D=mO(k.length)}=S;D.length===1&&D[0]===0&&(D[1]=1);const B=length-k.length;B>0&&pO(D,B),k.length===1&&k.unshift(null),QAe(C,k,T,D,j,L),y=Math.max(P+R,y),u=Math.max(L,u)}}l=c,c+=y}return a.forEach((p,h)=>{for(const v in p){const _=p[v];_.sort(JAe);const w=[],y=[],m=[];for(let f=0;f<_.length;f++){const{at:b,value:d,easing:x}=_[f];w.push(d),y.push(Pw(0,u,b)),m.push(x||qn.easing)}y[0]!==0&&(y.unshift(0),w.unshift(w[0]),m.unshift("linear")),y[y.length-1]!==1&&(y.push(1),w.push(null)),o.push([h,v,w,Object.assign(Object.assign(Object.assign({},r),{duration:u,easing:m,offset:y}),n)])}}),o}function rje(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function nje(e,t){return t[e]||(t[e]=[]),t[e]}const oje=5;function yO(e,t,r){const n=Math.max(t-oje,0);return BU(r-e(n),t-n)}const bd={stiffness:100,damping:10,mass:1},aje=(e=bd.stiffness,t=bd.damping,r=bd.mass)=>t/(2*Math.sqrt(e*r));function ije(e,t,r){return e=t||e>t&&r<=t}const GU=({stiffness:e=bd.stiffness,damping:t=bd.damping,mass:r=bd.mass,from:n=0,to:o=1,velocity:a=0,restSpeed:i=2,restDistance:s=.5}={})=>{a=a?xc.s(a):0;const l={done:!1,hasReachedTarget:!1,current:n,target:o},c=o-n,u=Math.sqrt(e/r)/1e3,p=aje(e,t,r);let h;if(p<1){const v=u*Math.sqrt(1-p*p);h=_=>o-Math.exp(-p*u*_)*((-a+p*u*c)/v*Math.sin(v*_)+c*Math.cos(v*_))}else h=v=>o-Math.exp(-u*v)*(c+(-a+u*c)*v);return v=>{l.current=h(v);const _=v===0?a:yO(h,v,l.current),w=Math.abs(_)<=i,y=Math.abs(o-l.current)<=s;return l.done=w&&y,l.hasReachedTarget=ije(n,o,l.current),l}},sje=({from:e=0,velocity:t=0,power:r=.8,decay:n=.325,bounceDamping:o,bounceStiffness:a,changeTarget:i,min:s,max:l,restDistance:c=.5,restSpeed:u})=>{n=xc.ms(n);const p={hasReachedTarget:!1,done:!1,current:e,target:e},h=C=>s!==void 0&&Cl,v=C=>s===void 0?l:l===void 0||Math.abs(s-C)-_*Math.exp(-C/n),f=C=>y+m(C),b=C=>{const k=m(C),S=f(C);p.done=Math.abs(k)<=c,p.current=p.done?y:S};let d,x;const E=C=>{h(p.current)&&(d=C,x=GU({from:p.current,to:v(p.current),velocity:yO(f,C,p.current),damping:o,stiffness:a,restDistance:c,restSpeed:u}))};return E(0),C=>{let k=!1;return!x&&d===void 0&&(k=!0,b(C),E(C)),d!==void 0&&C>d?(p.hasReachedTarget=!0,x(C-d)):(p.hasReachedTarget=!1,!k&&b(C),p)}},cx=10,lje=1e4;function cje(e,t=Li){let r,n=cx,o=e(0);const a=[t(o.current)];for(;!o.done&&n{const n=new Map,o=(i=0,s=100,l=0,c=!1)=>{const u=`${i}-${s}-${l}-${c}`;return n.has(u)||n.set(u,e(Object.assign({from:i,to:s,velocity:l,restSpeed:c?.05:2,restDistance:c?.01:.5},r))),n.get(u)},a=i=>(t.has(i)||t.set(i,cje(i)),t.get(i));return{createAnimation:(i,s,l,c,u)=>{var p,h;let v;const _=i.length;if(l&&_<=2&&i.every(uje)){const y=i[_-1],m=_===1?null:i[0];let f=0,b=0;const d=u==null?void 0:u.generator;if(d){const{animation:C,generatorStartTime:k}=u,S=(C==null?void 0:C.startTime)||k||0,R=(C==null?void 0:C.currentTime)||performance.now()-S,T=d(R).current;b=(p=m)!==null&&p!==void 0?p:T,(_===1||_===2&&i[0]===null)&&(f=yO(P=>d(P).current,R,T))}else b=(h=m)!==null&&h!==void 0?h:parseFloat(s());const x=o(b,y,f,c==null?void 0:c.includes("scale")),E=a(x);v=Object.assign(Object.assign({},E),{easing:"linear"}),u&&(u.generator=x,u.generatorStartTime=performance.now())}else v={easing:"ease",duration:a(o(0,100)).overshootDuration};return v}}}}const uje=e=>typeof e!="string",dje=KU(GU),fje=KU(sje),hje={any:0,all:1};function YU(e,t,{root:r,margin:n,amount:o="any"}={}){if(typeof IntersectionObserver>"u")return()=>{};const a=Iw(e),i=new WeakMap,s=c=>{c.forEach(u=>{const p=i.get(u.target);if(u.isIntersecting!==!!p)if(u.isIntersecting){const h=t(u);typeof h=="function"?i.set(u.target,h):l.unobserve(u.target)}else p&&(p(u),i.delete(u.target))})},l=new IntersectionObserver(s,{root:r,rootMargin:n,threshold:typeof o=="number"?o:hje[o]});return a.forEach(c=>l.observe(c)),()=>l.disconnect()}const oy=new WeakMap;let ys;function pje(e,t){if(t){const{inlineSize:r,blockSize:n}=t[0];return{width:r,height:n}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function mje({target:e,contentRect:t,borderBoxSize:r}){var n;(n=oy.get(e))===null||n===void 0||n.forEach(o=>{o({target:e,contentSize:t,get size(){return pje(e,r)}})})}function gje(e){e.forEach(mje)}function vje(){typeof ResizeObserver>"u"||(ys=new ResizeObserver(gje))}function bje(e,t){ys||vje();const r=Iw(e);return r.forEach(n=>{let o=oy.get(n);o||(o=new Set,oy.set(n,o)),o.add(t),ys==null||ys.observe(n)}),()=>{r.forEach(n=>{const o=oy.get(n);o==null||o.delete(t),o!=null&&o.size||ys==null||ys.unobserve(n)})}}const ay=new Set;let tp;function yje(){tp=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};ay.forEach(r=>r(t))},window.addEventListener("resize",tp)}function wje(e){return ay.add(e),tp||yje(),()=>{ay.delete(e),!ay.size&&tp&&(tp=void 0)}}function XU(e,t){return typeof e=="function"?wje(e):bje(e,t)}const xje=50,OM=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),_je=()=>({time:0,x:OM(),y:OM()}),Eje={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function kM(e,t,r,n){const o=r[t],{length:a,position:i}=Eje[t],s=o.current,l=r.time;o.current=e["scroll"+i],o.scrollLength=e["scroll"+a]-e["client"+a],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=Pw(0,o.scrollLength,o.current);const c=n-l;o.velocity=c>xje?0:BU(o.current-s,c)}function Cje(e,t,r){kM(e,"x",t,r),kM(e,"y",t,r),t.time=r}function Oje(e,t){let r={x:0,y:0},n=e;for(;n&&n!==t;)if(n instanceof HTMLElement)r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;else if(n instanceof SVGGraphicsElement&&"getBBox"in n){const{top:o,left:a}=n.getBBox();for(r.x+=a,r.y+=o;n&&n.tagName!=="svg";)n=n.parentNode}return r}const ZU={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},G8={start:0,center:.5,end:1};function RM(e,t,r=0){let n=0;if(G8[e]!==void 0&&(e=G8[e]),gO(e)){const o=parseFloat(e);e.endsWith("px")?n=o:e.endsWith("%")?e=o/100:e.endsWith("vw")?n=o/100*document.documentElement.clientWidth:e.endsWith("vh")?n=o/100*document.documentElement.clientHeight:e=o}return Gi(e)&&(n=t*e),r+n}const kje=[0,0];function Rje(e,t,r,n){let o=Array.isArray(e)?e:kje,a=0,i=0;return Gi(e)?o=[e,e]:gO(e)&&(e=e.trim(),e.includes(" ")?o=e.split(" "):o=[e,G8[e]?e:"0"]),a=RM(o[0],r,n),i=RM(o[1],t),a-i}const Sje={x:0,y:0};function Tje(e,t,r){let{offset:n=ZU.All}=r;const{target:o=e,axis:a="y"}=r,i=a==="y"?"height":"width",s=o!==e?Oje(o,e):Sje,l=o===e?{width:e.scrollWidth,height:e.scrollHeight}:{width:o.clientWidth,height:o.clientHeight},c={width:e.clientWidth,height:e.clientHeight};t[a].offset.length=0;let u=!t[a].interpolate;const p=n.length;for(let h=0;hPje(e,n.target,r),update:a=>{Cje(e,r,a),(n.offset||n.target)&&Tje(e,r,n)},notify:typeof t=="function"?()=>t(r):Aje(t,r[o])}}function Aje(e,t){return e.pause(),e.forEachNative((r,{easing:n})=>{var o,a;if(r.updateDuration)n||(r.easing=Li),r.updateDuration(1);else{const i={duration:1e3};n||(i.easing="linear"),(a=(o=r.effect)===null||o===void 0?void 0:o.updateTiming)===null||a===void 0||a.call(o,i)}}),()=>{e.currentTime=t.progress}}const d0=new WeakMap,SM=new WeakMap,ux=new WeakMap,TM=e=>e===document.documentElement?window:e;function jje(e,t={}){var{container:r=document.documentElement}=t,n=Lw(t,["container"]);let o=ux.get(r);o||(o=new Set,ux.set(r,o));const a=_je(),i=Mje(r,e,a,n);if(o.add(i),!d0.has(r)){const c=()=>{const p=performance.now();for(const h of o)h.measure();for(const h of o)h.update(p);for(const h of o)h.notify()};d0.set(r,c);const u=TM(r);window.addEventListener("resize",c,{passive:!0}),r!==document.documentElement&&SM.set(r,XU(r,c)),u.addEventListener("scroll",c,{passive:!0})}const s=d0.get(r),l=requestAnimationFrame(s);return()=>{var c;typeof e!="function"&&e.stop(),cancelAnimationFrame(l);const u=ux.get(r);if(!u||(u.delete(i),u.size))return;const p=d0.get(r);d0.delete(r),p&&(TM(r).removeEventListener("scroll",p),(c=SM.get(r))===null||c===void 0||c(),window.removeEventListener("resize",p))}}function Ije(e,t){return typeof e!=typeof t?!0:Array.isArray(e)&&Array.isArray(t)?!Lje(e,t):e!==t}function Lje(e,t){const r=t.length;if(r!==e.length)return!1;for(let n=0;ne.getDepth()-t.getDepth(),zje=e=>e.animateUpdates(),MM=e=>e.next(),AM=(e,t)=>new CustomEvent(e,{detail:{target:t}});function K8(e,t,r){e.dispatchEvent(new CustomEvent(t,{detail:{originalEvent:r}}))}function jM(e,t,r){e.dispatchEvent(new CustomEvent(t,{detail:{originalEntry:r}}))}const Bje={isActive:e=>!!e.inView,subscribe:(e,{enable:t,disable:r},{inViewOptions:n={}})=>{const{once:o}=n,a=Lw(n,["once"]);return YU(e,i=>{if(t(),jM(e,"viewenter",i),!o)return s=>{r(),jM(e,"viewleave",s)}},a)}},IM=(e,t,r)=>n=>{n.pointerType&&n.pointerType!=="mouse"||(r(),K8(e,t,n))},Vje={isActive:e=>!!e.hover,subscribe:(e,{enable:t,disable:r})=>{const n=IM(e,"hoverstart",t),o=IM(e,"hoverend",r);return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",o),()=>{e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",o)}}},Hje={isActive:e=>!!e.press,subscribe:(e,{enable:t,disable:r})=>{const n=a=>{r(),K8(e,"pressend",a),window.removeEventListener("pointerup",n)},o=a=>{t(),K8(e,"pressstart",a),window.addEventListener("pointerup",n)};return e.addEventListener("pointerdown",o),()=>{e.removeEventListener("pointerdown",o),window.removeEventListener("pointerup",n)}}},iy={inView:Bje,hover:Vje,press:Hje},LM=["initial","animate",...Object.keys(iy),"exit"],Y8=new WeakMap;function Uje(e={},t){let r,n=t?t.getDepth()+1:0;const o={initial:!0,animate:!0},a={},i={};for(const w of LM)i[w]=typeof e[w]=="string"?e[w]:t==null?void 0:t.getContext()[w];const s=e.initial===!1?"animate":"initial";let l=PM(e[s]||i[s],e.variants)||{},c=Lw(l,["transition"]);const u=Object.assign({},c);function*p(){var w,y;const m=c;c={};const f={};for(const C of LM){if(!o[C])continue;const k=PM(e[C]);if(k)for(const S in k)S!=="transition"&&(c[S]=k[S],f[S]=vO((y=(w=k.transition)!==null&&w!==void 0?w:e.transition)!==null&&y!==void 0?y:{},S))}const b=new Set([...Object.keys(c),...Object.keys(m)]),d=[];b.forEach(C=>{var k;c[C]===void 0&&(c[C]=u[C]),Ije(m[C],c[C])&&((k=u[C])!==null&&k!==void 0||(u[C]=ed.get(r,C)),d.push(jw(r,C,c[C],f[C])))}),yield;const x=d.map(C=>C()).filter(Boolean);if(!x.length)return;const E=c;r.dispatchEvent(AM("motionstart",E)),Promise.all(x.map(C=>C.finished)).then(()=>{r.dispatchEvent(AM("motioncomplete",E))}).catch(hO)}const h=(w,y)=>()=>{o[w]=y,dx(_)},v=()=>{for(const w in iy){const y=iy[w].isActive(e),m=a[w];y&&!m?a[w]=iy[w].subscribe(r,{enable:h(w,!0),disable:h(w,!1)},e):!y&&m&&(m(),delete a[w])}},_={update:w=>{r&&(e=w,v(),dx(_))},setActive:(w,y)=>{r&&(o[w]=y,dx(_))},animateUpdates:p,getDepth:()=>n,getTarget:()=>c,getOptions:()=>e,getContext:()=>i,mount:w=>(r=w,Y8.set(r,_),v(),()=>{Y8.delete(r),Dje(_);for(const y in a)a[y]()}),isMounted:()=>!!r};return _}function QU(e){const t={},r=[];for(let n in e){const o=e[n];Aw(n)&&(Wd[n]&&(n=Wd[n]),r.push(n),n=Mw(n));let a=Array.isArray(o)?o[0]:o;const i=qd.get(n);i&&(a=Gi(o)?i.toDefaultUnit(o):o),t[n]=a}return r.length&&(t.transform=VU(r)),t}const Wje=e=>`-${e.toLowerCase()}`,qje=e=>e.replace(/[A-Z]/g,Wje);function Gje(e={}){const t=QU(e);let r="";for(const n in t)r+=n.startsWith("--")?n:qje(n),r+=`: ${t[n]}; `;return r}const Kje=Object.freeze(Object.defineProperty({__proto__:null,ScrollOffset:ZU,animate:XAe,animateStyle:jw,createMotionState:Uje,createStyleString:Gje,createStyles:QU,getAnimationData:dO,getStyleName:y7,glide:fje,inView:YU,mountedStates:Y8,resize:XU,scroll:jje,spring:dje,stagger:KAe,style:ed,timeline:eje,withControls:bO},Symbol.toStringTag,{value:"Module"})),Yje=Wc(Kje);function Xje(e){var t={};return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Zje=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Qje=Xje(function(e){return Zje.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});const Jje=Object.freeze(Object.defineProperty({__proto__:null,default:Qje},Symbol.toStringTag,{value:"Module"})),eIe=Wc(Jje);(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=jPe,r=g,n=jH,o=Wr,a=at,i=Qc,s=Yje;function l(O){return O&&typeof O=="object"&&"default"in O?O:{default:O}}function c(O){if(O&&O.__esModule)return O;var A=Object.create(null);return O&&Object.keys(O).forEach(function(I){if(I!=="default"){var N=Object.getOwnPropertyDescriptor(O,I);Object.defineProperty(A,I,N.get?N:{enumerable:!0,get:function(){return O[I]}})}}),A.default=O,Object.freeze(A)}var u=c(r),p=l(r),h=l(i),v="production",_=typeof process>"u"||process.env===void 0?v:"production",w=function(O){return{isEnabled:function(A){return O.some(function(I){return!!A[I]})}}},y={measureLayout:w(["layout","layoutId","drag"]),animation:w(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:w(["exit"]),drag:w(["drag","dragControls"]),focus:w(["whileFocus"]),hover:w(["whileHover","onHoverStart","onHoverEnd"]),tap:w(["whileTap","onTap","onTapStart","onTapCancel"]),pan:w(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:w(["whileInView","onViewportEnter","onViewportLeave"])};function m(O){for(var A in O)O[A]!==null&&(A==="projectionNodeConstructor"?y.projectionNodeConstructor=O[A]:y[A].Component=O[A])}var f=r.createContext({strict:!1}),b=Object.keys(y),d=b.length;function x(O,A,I){var N=[],H=r.useContext(f);if(!A)return null;_!=="production"&&I&&H.strict&&n.invariant(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(var Y=0;Y"u")return A;var I=new Map;return new Proxy(A,{get:function(N,H){return I.has(H)||I.set(H,A(H)),I.get(H)}})}var se=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function we(O){return typeof O!="string"||O.includes("-")?!1:!!(se.indexOf(O)>-1||/[A-Z]/.test(O))}var xe={};function _e(O){Object.assign(xe,O)}var ze=["","X","Y","Z"],et=["translate","scale","rotate","skew"],We=["transformPerspective","x","y","z"];et.forEach(function(O){return ze.forEach(function(A){return We.push(O+A)})});function Ar(O,A){return We.indexOf(O)-We.indexOf(A)}var Rt=new Set(We);function Pt(O){return Rt.has(O)}var Nn=new Set(["originX","originY","originZ"]);function $n(O){return Nn.has(O)}function me(O,A){var I=A.layout,N=A.layoutId;return Pt(O)||$n(O)||(I||N!==void 0)&&(!!xe[O]||O==="opacity")}var ge=function(O){return!!(O!==null&&typeof O=="object"&&O.getVelocity)},Me={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Ve(O,A,I,N){var H=O.transform,Y=O.transformKeys,X=A.enableHardwareAcceleration,K=X===void 0?!0:X,re=A.allowTransformNone,ne=re===void 0?!0:re,le="";Y.sort(Ar);for(var ue=!1,de=Y.length,fe=0;fe"u"?ree:tee;ne(re,K.current,A,X)}var eee={some:0,all:1};function tee(O,A,I,N){var H=N.root,Y=N.margin,X=N.amount,K=X===void 0?"some":X,re=N.once;r.useEffect(function(){if(O){var ne={root:H==null?void 0:H.current,rootMargin:Y,threshold:typeof K=="number"?K:eee[K]},le=function(ue){var de,fe=ue.isIntersecting;if(A.isInView!==fe&&(A.isInView=fe,!(re&&!fe&&A.hasEnteredView))){fe&&(A.hasEnteredView=!0),(de=I.animationState)===null||de===void 0||de.setActive(e.AnimationType.InView,fe);var he=I.getProps(),be=fe?he.onViewportEnter:he.onViewportLeave;be==null||be(ue)}};return QJ(I.getInstance(),ne,le)}},[O,H,Y,K])}function ree(O,A,I,N){var H=N.fallback,Y=H===void 0?!0:H;r.useEffect(function(){!O||!Y||(_!=="production"&&Z4(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var X;A.hasEnteredView=!0;var K=I.getProps().onViewportEnter;K==null||K(null),(X=I.animationState)===null||X===void 0||X.setActive(e.AnimationType.InView,!0)}))},[O])}var ls=function(O){return function(A){return O(A),null}},KR={inView:ls(JJ),tap:ls(KJ),focus:ls(jr),hover:ls(GJ)},nee=0,oee=function(){return nee++},YR=function(){return ce(oee)};function e6(){var O=r.useContext(S);if(O===null)return[!0,null];var A=O.isPresent,I=O.onExitComplete,N=O.register,H=YR();r.useEffect(function(){return N(H)},[]);var Y=function(){return I==null?void 0:I(H)};return!A&&I?[!1,Y]:[!0]}function aee(){return iee(r.useContext(S))}function iee(O){return O===null?!0:O.isPresent}function XR(O,A){if(!Array.isArray(A))return!1;var I=A.length;if(I!==O.length)return!1;for(var N=0;N-1&&O.splice(I,1)}function yee(O,A,I){var N=t.__read(O),H=N.slice(0),Y=A<0?H.length+A:A;if(Y>=0&&YZe&&To,ps=Array.isArray(fr)?fr:[fr],Po=ps.reduce(Y,{});Rn===!1&&(Po={});var Xf=At.prevResolvedValues,gu=Xf===void 0?{}:Xf,C5=t.__assign(t.__assign({},gu),Po),vu=function(ut){hs=!0,Ne.delete(ut),At.needsAnimating[ut]=!0};for(var Bn in C5){var Bt=Po[Bn],qe=gu[Bn];Be.hasOwnProperty(Bn)||(Bt!==qe?Nl(Bt)&&Nl(qe)?!XR(Bt,qe)||fs?vu(Bn):At.protectedKeys[Bn]=!0:Bt!==void 0?vu(Bn):Ne.add(Bn):Bt!==void 0&&Ne.has(Bn)?vu(Bn):At.protectedKeys[Bn]=!0)}At.prevProp=fr,At.prevResolvedValues=Po,At.isActive&&(Be=t.__assign(t.__assign({},Be),Po)),H&&O.blockInitialAnimation&&(hs=!1),hs&&!oo&&be.push.apply(be,t.__spreadArray([],t.__read(ps.map(function(ut){return{animation:ut,options:t.__assign({type:bt},le)}})),!1))},pt=0;pt=3;if(!(!fe&&!he)){var be=de.point,Ne=i.getFrameData().timestamp;H.history.push(t.__assign(t.__assign({},be),{timestamp:Ne}));var Be=H.handlers,Ze=Be.onStart,ft=Be.onMove;fe||(Ze&&Ze(H.lastMoveEvent,de),H.startEvent=H.lastMoveEvent),ft&&ft(H.lastMoveEvent,de)}}},this.handlePointerMove=function(de,fe){if(H.lastMoveEvent=de,H.lastMoveEventInfo=m6(fe,H.transformPagePoint),xr(de)&&de.buttons===0){H.handlePointerUp(de,fe);return}h.default.update(H.updatePoint,!0)},this.handlePointerUp=function(de,fe){H.end();var he=H.handlers,be=he.onEnd,Ne=he.onSessionEnd,Be=g6(m6(fe,H.transformPagePoint),H.history);H.startEvent&&be&&be(de,Be),Ne&&Ne(de,Be)},!(Ta(A)&&A.touches.length>1)){this.handlers=I,this.transformPagePoint=X;var K=K4(A),re=m6(K,this.transformPagePoint),ne=re.point,le=i.getFrameData().timestamp;this.history=[t.__assign(t.__assign({},ne),{timestamp:le})];var ue=I.onSessionStart;ue&&ue(A,g6(re,this.history)),this.removeListeners=a.pipe(zl(window,"pointermove",this.handlePointerMove),zl(window,"pointerup",this.handlePointerUp),zl(window,"pointercancel",this.handlePointerUp))}}return O.prototype.updateHandlers=function(A){this.handlers=A},O.prototype.end=function(){this.removeListeners&&this.removeListeners(),i.cancelSync.update(this.updatePoint)},O}();function m6(O,A){return A?{point:A(O.point)}:O}function uS(O,A){return{x:O.x-A.x,y:O.y-A.y}}function g6(O,A){var I=O.point;return{point:I,delta:uS(I,dS(A)),offset:uS(I,$ee(A)),velocity:Dee(A,.1)}}function $ee(O){return O[0]}function dS(O){return O[O.length-1]}function Dee(O,A){if(O.length<2)return{x:0,y:0};for(var I=O.length-1,N=null,H=dS(O);I>=0&&(N=O[I],!(H.timestamp-N.timestamp>p5(A)));)I--;if(!N)return{x:0,y:0};var Y=(H.timestamp-N.timestamp)/1e3;if(Y===0)return{x:0,y:0};var X={x:(H.x-N.x)/Y,y:(H.y-N.y)/Y};return X.x===1/0&&(X.x=0),X.y===1/0&&(X.y=0),X}function Pa(O){return O.max-O.min}function fS(O,A,I){return A===void 0&&(A=0),I===void 0&&(I=.01),a.distance(O,A)H&&(O=I?a.mix(H,O,I.max):Math.min(O,H)),O}function gS(O,A,I){return{min:A!==void 0?O.min+A:void 0,max:I!==void 0?O.max+I-(O.max-O.min):void 0}}function Bee(O,A){var I=A.top,N=A.left,H=A.bottom,Y=A.right;return{x:gS(O.x,N,Y),y:gS(O.y,I,H)}}function vS(O,A){var I,N=A.min-O.min,H=A.max-O.max;return A.max-A.minN?I=a.progress(A.min,A.max-N,O.min):N>H&&(I=a.progress(O.min,O.max-H,A.min)),a.clamp(0,1,I)}function Uee(O,A){var I={};return A.min!==void 0&&(I.min=A.min-O.min),A.max!==void 0&&(I.max=A.max-O.min),I}var v6=.35;function Wee(O){return O===void 0&&(O=v6),O===!1?O=0:O===!0&&(O=v6),{x:bS(O,"left","right"),y:bS(O,"top","bottom")}}function bS(O,A,I){return{min:yS(O,A),max:yS(O,I)}}function yS(O,A){var I;return typeof O=="number"?O:(I=O[A])!==null&&I!==void 0?I:0}var wS=function(){return{translate:0,scale:1,origin:0,originPoint:0}},Kf=function(){return{x:wS(),y:wS()}},xS=function(){return{min:0,max:0}},Gr=function(){return{x:xS(),y:xS()}};function Ma(O){return[O("x"),O("y")]}function _S(O){var A=O.top,I=O.left,N=O.right,H=O.bottom;return{x:{min:I,max:N},y:{min:A,max:H}}}function qee(O){var A=O.x,I=O.y;return{top:I.min,right:A.max,bottom:I.max,left:A.min}}function Gee(O,A){if(!A)return O;var I=A({x:O.left,y:O.top}),N=A({x:O.right,y:O.bottom});return{top:I.y,left:I.x,bottom:N.y,right:N.x}}function b6(O){return O===void 0||O===1}function ES(O){var A=O.scale,I=O.scaleX,N=O.scaleY;return!b6(A)||!b6(I)||!b6(N)}function cs(O){return ES(O)||CS(O.x)||CS(O.y)||O.z||O.rotate||O.rotateX||O.rotateY}function CS(O){return O&&O!=="0%"}function v5(O,A,I){var N=O-I,H=A*N;return I+H}function OS(O,A,I,N,H){return H!==void 0&&(O=v5(O,H,N)),v5(O,I,N)+A}function y6(O,A,I,N,H){A===void 0&&(A=0),I===void 0&&(I=1),O.min=OS(O.min,A,I,N,H),O.max=OS(O.max,A,I,N,H)}function kS(O,A){var I=A.x,N=A.y;y6(O.x,I.translate,I.scale,I.originPoint),y6(O.y,N.translate,N.scale,N.originPoint)}function Kee(O,A,I,N){var H,Y;N===void 0&&(N=!1);var X=I.length;if(X){A.x=A.y=1;for(var K,re,ne=0;neA?I="y":Math.abs(O.x)>A&&(I="x"),I}function tte(O){var A=O.dragControls,I=O.visualElement,N=ce(function(){return new Jee(I)});r.useEffect(function(){return A&&A.subscribe(N)},[N,A]),r.useEffect(function(){return N.addListeners()},[N])}function rte(O){var A=O.onPan,I=O.onPanStart,N=O.onPanEnd,H=O.onPanSessionStart,Y=O.visualElement,X=A||I||N||H,K=r.useRef(null),re=r.useContext(E).transformPagePoint,ne={onSessionStart:H,onStart:I,onMove:A,onEnd:function(ue,de){K.current=null,N&&N(ue,de)}};r.useEffect(function(){K.current!==null&&K.current.updateHandlers(ne)});function le(ue){K.current=new cS(ue,ne,{transformPagePoint:re})}f5(Y,"pointerdown",X&&le),h5(function(){return K.current&&K.current.end()})}var TS={pan:ls(rte),drag:ls(tte)},y5=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function nte(){var O=y5.map(function(){return new Uf}),A={},I={clearAllListeners:function(){return O.forEach(function(N){return N.clear()})},updatePropListeners:function(N){y5.forEach(function(H){var Y,X="on"+H,K=N[X];(Y=A[H])===null||Y===void 0||Y.call(A),K&&(A[H]=I[X](K))})}};return O.forEach(function(N,H){I["on"+y5[H]]=function(Y){return N.add(Y)},I["notify"+y5[H]]=function(){for(var Y=[],X=0;X=0?window.pageYOffset:null,ne=pte(A,O,K);return Y.length&&Y.forEach(function(le){var ue=t.__read(le,2),de=ue[0],fe=ue[1];O.getValue(de).set(fe)}),O.syncRender(),re!==null&&window.scrollTo({top:re}),{target:ne,transitionEnd:N}}else return{target:A,transitionEnd:N}};function gte(O,A,I,N){return ute(A)?mte(O,A,I,N):{target:A,transitionEnd:N}}var vte=function(O,A,I,N){var H=lte(O,A,N);return A=H.target,N=H.transitionEnd,gte(O,A,I,N)};function bte(O){return window.getComputedStyle(O)}var DS={treeType:"dom",readValueFromInstance:function(O,A){if(Pt(A)){var I=r6(A);return I&&I.default||0}else{var N=bte(O);return(it(A)?N.getPropertyValue(A):N[A])||0}},sortNodePosition:function(O,A){return O.compareDocumentPosition(A)&2?1:-1},getBaseTarget:function(O,A){var I;return(I=O.style)===null||I===void 0?void 0:I[A]},measureViewportBox:function(O,A){var I=A.transformPagePoint;return SS(O,I)},resetTransform:function(O,A,I){var N=I.transformTemplate;A.style.transform=N?N({},""):"none",O.scheduleRender()},restoreTransform:function(O,A){O.style.transform=A.style.transform},removeValueFromRenderState:function(O,A){var I=A.vars,N=A.style;delete I[O],delete N[O]},makeTargetAnimatable:function(O,A,I,N){var H=I.transformValues;N===void 0&&(N=!0);var Y=A.transition,X=A.transitionEnd,K=t.__rest(A,["transition","transitionEnd"]),re=sS(K,Y||{},O);if(H&&(X&&(X=H(X)),K&&(K=H(K)),re&&(re=H(re))),N){d6(O,K,re);var ne=vte(O,K,re,X);X=ne.transitionEnd,K=ne.target}return t.__assign({transition:Y,transitionEnd:X},K)},scrapeMotionValuesFromProps:$f,build:function(O,A,I,N,H){O.isVisible!==void 0&&(A.style.visibility=O.isVisible?"visible":"hidden"),Mt(A,I,N,H.transformTemplate)},render:c5},yte=w5(DS),wte=w5(t.__assign(t.__assign({},DS),{getBaseTarget:function(O,A){return O[A]},readValueFromInstance:function(O,A){var I;return Pt(A)?((I=r6(A))===null||I===void 0?void 0:I.default)||0:(A=Lf.has(A)?A:Ll(A),O.getAttribute(A))},scrapeMotionValuesFromProps:Df,build:function(O,A,I,N,H){nn(A,I,N,H.transformTemplate)},render:Nf})),_6=function(O,A){return we(O)?wte(A,{enableHardwareAcceleration:!1}):yte(A,{enableHardwareAcceleration:!0})};function FS(O,A){return A.max===A.min?0:O/(A.max-A.min)*100}var Yf={correct:function(O,A){if(!A.target)return O;if(typeof O=="string")if(o.px.test(O))O=parseFloat(O);else return O;var I=FS(O,A.target.x),N=FS(O,A.target.y);return"".concat(I,"% ").concat(N,"%")}},zS="_$css",xte={correct:function(O,A){var I=A.treeScale,N=A.projectionDelta,H=O,Y=O.includes("var("),X=[];Y&&(O=O.replace(MS,function(be){return X.push(be),zS}));var K=o.complex.parse(O);if(K.length>5)return H;var re=o.complex.createTransformer(O),ne=typeof K[0]!="number"?1:0,le=N.x.scale*I.x,ue=N.y.scale*I.y;K[0+ne]/=le,K[1+ne]/=ue;var de=a.mix(le,ue,.5);typeof K[2+ne]=="number"&&(K[2+ne]/=de),typeof K[3+ne]=="number"&&(K[3+ne]/=de);var fe=re(K);if(Y){var he=0;fe=fe.replace(zS,function(){var be=X[he];return he++,be})}return fe}},_te=function(O){t.__extends(A,O);function A(){return O!==null&&O.apply(this,arguments)||this}return A.prototype.componentDidMount=function(){var I=this,N=this.props,H=N.visualElement,Y=N.layoutGroup,X=N.switchLayoutGroup,K=N.layoutId,re=H.projection;_e(Cte),re&&(Y!=null&&Y.group&&Y.group.add(re),X!=null&&X.register&&K&&X.register(re),re.root.didUpdate(),re.addEventListener("animationComplete",function(){I.safeToRemove()}),re.setOptions(t.__assign(t.__assign({},re.options),{onExitComplete:function(){return I.safeToRemove()}}))),ye.hasEverUpdated=!0},A.prototype.getSnapshotBeforeUpdate=function(I){var N=this,H=this.props,Y=H.layoutDependency,X=H.visualElement,K=H.drag,re=H.isPresent,ne=X.projection;return ne&&(ne.isPresent=re,K||I.layoutDependency!==Y||Y===void 0?ne.willUpdate():this.safeToRemove(),I.isPresent!==re&&(re?ne.promote():ne.relegate()||h.default.postRender(function(){var le;!((le=ne.getStack())===null||le===void 0)&&le.members.length||N.safeToRemove()}))),null},A.prototype.componentDidUpdate=function(){var I=this.props.visualElement.projection;I&&(I.root.didUpdate(),!I.currentAnimation&&I.isLead()&&this.safeToRemove())},A.prototype.componentWillUnmount=function(){var I=this.props,N=I.visualElement,H=I.layoutGroup,Y=I.switchLayoutGroup,X=N.projection;X&&(X.scheduleCheckAfterUnmount(),H!=null&&H.group&&H.group.remove(X),Y!=null&&Y.deregister&&Y.deregister(X))},A.prototype.safeToRemove=function(){var I=this.props.safeToRemove;I==null||I()},A.prototype.render=function(){return null},A}(p.default.Component);function Ete(O){var A=t.__read(e6(),2),I=A[0],N=A[1],H=r.useContext(Re);return p.default.createElement(_te,t.__assign({},O,{layoutGroup:H,switchLayoutGroup:r.useContext(Te),isPresent:I,safeToRemove:N}))}var Cte={borderRadius:t.__assign(t.__assign({},Yf),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Yf,borderTopRightRadius:Yf,borderBottomLeftRadius:Yf,borderBottomRightRadius:Yf,boxShadow:xte},BS={measureLayout:Ete};function VS(O,A,I){I===void 0&&(I={});var N=ge(O)?O:So(O);return i6("",N,A,I),{stop:function(){return N.stop()},isAnimating:function(){return N.isAnimating()}}}var HS=["TopLeft","TopRight","BottomLeft","BottomRight"],Ote=HS.length,US=function(O){return typeof O=="string"?parseFloat(O):O},WS=function(O){return typeof O=="number"||o.px.test(O)};function kte(O,A,I,N,H,Y){var X,K,re,ne;H?(O.opacity=a.mix(0,(X=I.opacity)!==null&&X!==void 0?X:1,Rte(N)),O.opacityExit=a.mix((K=A.opacity)!==null&&K!==void 0?K:1,0,Ste(N))):Y&&(O.opacity=a.mix((re=A.opacity)!==null&&re!==void 0?re:1,(ne=I.opacity)!==null&&ne!==void 0?ne:1,N));for(var le=0;leA?1:I(a.progress(O,A,N))}}function KS(O,A){O.min=A.min,O.max=A.max}function ta(O,A){KS(O.x,A.x),KS(O.y,A.y)}function YS(O,A,I,N,H){return O-=A,O=v5(O,1/I,N),H!==void 0&&(O=v5(O,1/H,N)),O}function Tte(O,A,I,N,H,Y,X){if(A===void 0&&(A=0),I===void 0&&(I=1),N===void 0&&(N=.5),Y===void 0&&(Y=O),X===void 0&&(X=O),o.percent.test(A)){A=parseFloat(A);var K=a.mix(X.min,X.max,A/100);A=K-X.min}if(typeof A=="number"){var re=a.mix(Y.min,Y.max,N);O===Y&&(re-=A),O.min=YS(O.min,A,I,re,H),O.max=YS(O.max,A,I,re,H)}}function XS(O,A,I,N,H){var Y=t.__read(I,3),X=Y[0],K=Y[1],re=Y[2];Tte(O,A[X],A[K],A[re],A.scale,N,H)}var Pte=["x","scaleX","originX"],Mte=["y","scaleY","originY"];function ZS(O,A,I,N){XS(O.x,A,Pte,I==null?void 0:I.x,N==null?void 0:N.x),XS(O.y,A,Mte,I==null?void 0:I.y,N==null?void 0:N.y)}function QS(O){return O.translate===0&&O.scale===1}function JS(O){return QS(O.x)&&QS(O.y)}function eT(O,A){return O.x.min===A.x.min&&O.x.max===A.x.max&&O.y.min===A.y.min&&O.y.max===A.y.max}var Ate=function(){function O(){this.members=[]}return O.prototype.add=function(A){s6(this.members,A),A.scheduleRender()},O.prototype.remove=function(A){if(l6(this.members,A),A===this.prevLead&&(this.prevLead=void 0),A===this.lead){var I=this.members[this.members.length-1];I&&this.promote(I)}},O.prototype.relegate=function(A){var I=this.members.findIndex(function(X){return A===X});if(I===0)return!1;for(var N,H=I;H>=0;H--){var Y=this.members[H];if(Y.isPresent!==!1){N=Y;break}}return N?(this.promote(N),!0):!1},O.prototype.promote=function(A,I){var N,H=this.lead;if(A!==H&&(this.prevLead=H,this.lead=A,A.show(),H)){H.instance&&H.scheduleRender(),A.scheduleRender(),A.resumeFrom=H,I&&(A.resumeFrom.preserveOpacity=!0),H.snapshot&&(A.snapshot=H.snapshot,A.snapshot.latestValues=H.animationValues||H.latestValues,A.snapshot.isShared=!0),!((N=A.root)===null||N===void 0)&&N.isUpdating&&(A.isLayoutDirty=!0);var Y=A.options.crossfade;Y===!1&&H.hide()}},O.prototype.exitAnimationComplete=function(){this.members.forEach(function(A){var I,N,H,Y,X;(N=(I=A.options).onExitComplete)===null||N===void 0||N.call(I),(X=(H=A.resumingFrom)===null||H===void 0?void 0:(Y=H.options).onExitComplete)===null||X===void 0||X.call(Y)})},O.prototype.scheduleRender=function(){this.members.forEach(function(A){A.instance&&A.scheduleRender(!1)})},O.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},O}(),jte="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function tT(O,A,I){var N=O.x.translate/A.x,H=O.y.translate/A.y,Y="translate3d(".concat(N,"px, ").concat(H,"px, 0) ");if(Y+="scale(".concat(1/A.x,", ").concat(1/A.y,") "),I){var X=I.rotate,K=I.rotateX,re=I.rotateY;X&&(Y+="rotate(".concat(X,"deg) ")),K&&(Y+="rotateX(".concat(K,"deg) ")),re&&(Y+="rotateY(".concat(re,"deg) "))}var ne=O.x.scale*A.x,le=O.y.scale*A.y;return Y+="scale(".concat(ne,", ").concat(le,")"),Y===jte?"none":Y}var Ite=function(O,A){return O.depth-A.depth},rT=function(){function O(){this.children=[],this.isDirty=!1}return O.prototype.add=function(A){s6(this.children,A),this.isDirty=!0},O.prototype.remove=function(A){l6(this.children,A),this.isDirty=!0},O.prototype.forEach=function(A){this.isDirty&&this.children.sort(Ite),this.isDirty=!1,this.children.forEach(A)},O}(),nT=1e3;function oT(O){var A=O.attachResizeListener,I=O.defaultParent,N=O.measureScroll,H=O.checkIsScrollRoot,Y=O.resetTransform;return function(){function X(K,re,ne){var le=this;re===void 0&&(re={}),ne===void 0&&(ne=I==null?void 0:I()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){le.isUpdating&&(le.isUpdating=!1,le.clearAllSnapshots())},this.updateProjection=function(){le.nodes.forEach(zte),le.nodes.forEach(Bte)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=K,this.latestValues=re,this.root=ne?ne.root||ne:this,this.path=ne?t.__spreadArray(t.__spreadArray([],t.__read(ne.path),!1),[ne],!1):[],this.parent=ne,this.depth=ne?ne.depth+1:0,K&&this.root.registerPotentialNode(K,this);for(var ue=0;ue=0;N--)if(O.path[N].instance){I=O.path[N];break}var H=I&&I!==O.root?I.instance:document,Y=H.querySelector('[data-projection-id="'.concat(A,'"]'));Y&&O.mount(Y,!0)}function lT(O){O.min=Math.round(O.min),O.max=Math.round(O.max)}function cT(O){lT(O.x),lT(O.y)}var Kte=oT({attachResizeListener:function(O,A){return Dl(O,"resize",A)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Hl={current:void 0},E6=oT({measureScroll:function(O){return{x:O.scrollLeft,y:O.scrollTop}},defaultParent:function(){if(!Hl.current){var O=new Kte(0,{});O.mount(window),O.setOptions({layoutScroll:!0}),Hl.current=O}return Hl.current},resetTransform:function(O,A){O.style.transform=A??"none"},checkIsScrollRoot:function(O){return window.getComputedStyle(O).position==="fixed"}}),uT=t.__assign(t.__assign(t.__assign(t.__assign({},p6),KR),TS),BS),C6=Ae(function(O,A){return Vf(O,A,uT,_6,E6)});function Yte(O){return ve(Vf(O,{forwardMotionProps:!1},uT,_6,E6))}var Xte=Ae(Vf);function dT(){var O=r.useRef(!1);return T(function(){return O.current=!0,function(){O.current=!1}},[]),O}function _5(){var O=dT(),A=t.__read(r.useState(0),2),I=A[0],N=A[1],H=r.useCallback(function(){O.current&&N(I+1)},[I]),Y=r.useCallback(function(){return h.default.postRender(H)},[H]);return[Y,I]}var O6=function(O){var A=O.children,I=O.initial,N=O.isPresent,H=O.onExitComplete,Y=O.custom,X=O.presenceAffectsLayout,K=ce(Zte),re=YR(),ne=r.useMemo(function(){return{id:re,initial:I,isPresent:N,custom:Y,onExitComplete:function(le){var ue,de;K.set(le,!0);try{for(var fe=t.__values(K.values()),he=fe.next();!he.done;he=fe.next()){var be=he.value;if(!be)return}}catch(Ne){ue={error:Ne}}finally{try{he&&!he.done&&(de=fe.return)&&de.call(fe)}finally{if(ue)throw ue.error}}H==null||H()},register:function(le){return K.set(le,!1),function(){return K.delete(le)}}}},X?void 0:[N]);return r.useMemo(function(){K.forEach(function(le,ue){return K.set(ue,!1)})},[N]),u.useEffect(function(){!N&&!K.size&&(H==null||H())},[N]),u.createElement(S.Provider,{value:ne},A)};function Zte(){return new Map}var mu=function(O){return O.key||""};function Qte(O,A){O.forEach(function(I){var N=mu(I);A.set(N,I)})}function Jte(O){var A=[];return r.Children.forEach(O,function(I){r.isValidElement(I)&&A.push(I)}),A}var ere=function(O){var A=O.children,I=O.custom,N=O.initial,H=N===void 0?!0:N,Y=O.onExitComplete,X=O.exitBeforeEnter,K=O.presenceAffectsLayout,re=K===void 0?!0:K,ne=t.__read(_5(),1),le=ne[0],ue=r.useContext(Re).forceRender;ue&&(le=ue);var de=dT(),fe=Jte(A),he=fe,be=new Set,Ne=r.useRef(he),Be=r.useRef(new Map).current,Ze=r.useRef(!0);if(T(function(){Ze.current=!1,Qte(fe,Be),Ne.current=he}),h5(function(){Ze.current=!0,Be.clear(),be.clear()}),Ze.current)return u.createElement(u.Fragment,null,he.map(function(bt){return u.createElement(O6,{key:mu(bt),isPresent:!0,initial:H?void 0:!1,presenceAffectsLayout:re},bt)}));he=t.__spreadArray([],t.__read(he),!1);for(var ft=Ne.current.map(mu),pt=fe.map(mu),mt=ft.length,Gt=0;Gt1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),u.createElement(u.Fragment,null,be.size?he:he.map(function(bt){return r.cloneElement(bt)}))},fT=r.createContext(null),tre=function(O){return!O.isLayoutDirty&&O.willUpdate(!1)};function hT(){var O=new Set,A=new WeakMap,I=function(){return O.forEach(tre)};return{add:function(N){O.add(N),A.set(N,N.addEventListener("willUpdate",I))},remove:function(N){var H;O.delete(N),(H=A.get(N))===null||H===void 0||H(),A.delete(N),I()},dirty:I}}var pT=function(O){return O===!0},rre=function(O){return pT(O===!0)||O==="id"},mT=function(O){var A,I,N=O.children,H=O.id,Y=O.inheritId,X=O.inherit,K=X===void 0?!0:X;Y!==void 0&&(K=Y);var re=r.useContext(Re),ne=r.useContext(fT),le=t.__read(_5(),2),ue=le[0],de=le[1],fe=r.useRef(null),he=(A=re.id)!==null&&A!==void 0?A:ne;fe.current===null&&(rre(K)&&he&&(H=H?he+"-"+H:he),fe.current={id:H,group:pT(K)&&(I=re==null?void 0:re.group)!==null&&I!==void 0?I:hT()});var be=r.useMemo(function(){return t.__assign(t.__assign({},fe.current),{forceRender:ue})},[de]);return u.createElement(Re.Provider,{value:be},N)},nre=0,ore=function(O){var A=O.children;return u.useEffect(function(){n.warning(!1,"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations")},[]),u.createElement(mT,{id:ce(function(){return"asl-".concat(nre++)})},A)};function are(O){var A=O.children,I=O.isValidProp,N=t.__rest(O,["children","isValidProp"]);I&&fn(I),N=t.__assign(t.__assign({},r.useContext(E)),N),N.isStatic=ce(function(){return N.isStatic});var H=r.useMemo(function(){return N},[JSON.stringify(N.transition),N.transformPagePoint,N.reducedMotion]);return u.createElement(E.Provider,{value:H},A)}function ire(O){var A=O.children,I=O.features,N=O.strict,H=N===void 0?!1:N,Y=t.__read(r.useState(!k6(I)),2),X=Y[1],K=r.useRef(void 0);if(!k6(I)){var re=I.renderer,ne=t.__rest(I,["renderer"]);K.current=re,m(ne)}return r.useEffect(function(){k6(I)&&I().then(function(le){var ue=le.renderer,de=t.__rest(le,["renderer"]);m(de),K.current=ue,X(!0)})},[]),u.createElement(f.Provider,{value:{renderer:K.current,strict:H}},A)}function k6(O){return typeof O=="function"}var gT=r.createContext(null);function sre(O,A,I,N){if(!N)return O;var H=O.findIndex(function(le){return le.value===A});if(H===-1)return O;var Y=N>0?1:-1,X=O[H+Y];if(!X)return O;var K=O[H],re=X.layout,ne=a.mix(re.min,re.max,.5);return Y===1&&K.layout.max+I>ne||Y===-1&&K.layout.min+I.001?1/O:Fre},ST=!1;function zre(O){var A=ds(1),I=ds(1),N=k();n.invariant(!!(O||N),"If no scale values are provided, useInvertedScale must be used within a child of another motion component."),n.warning(ST,"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."),ST=!0,O?(A=O.scaleX||A,I=O.scaleY||I):N&&(A=N.getValue("scaleX",1),I=N.getValue("scaleY",1));var H=E5(A,RT),Y=E5(I,RT);return{scaleX:H,scaleY:Y}}e.AnimatePresence=ere,e.AnimateSharedLayout=ore,e.DeprecatedLayoutGroupContext=fT,e.DragControls=OT,e.FlatTree=rT,e.LayoutGroup=mT,e.LayoutGroupContext=Re,e.LazyMotion=ire,e.MotionConfig=are,e.MotionConfigContext=E,e.MotionContext=C,e.MotionValue=oS,e.PresenceContext=S,e.Reorder=bre,e.SwitchLayoutGroupContext=Te,e.addPointerEvent=zl,e.addScaleCorrector=_e,e.animate=VS,e.animateVisualElement=g5,e.animationControls=ET,e.animations=p6,e.calcLength=Pa,e.checkTargetForNewValues=d6,e.createBox=Gr,e.createDomMotionComponent=Yte,e.createMotionComponent=ve,e.domAnimation=xT,e.domMax=yre,e.filterProps=Dn,e.isBrowser=R,e.isDragActive=X4,e.isMotionValue=ge,e.isValidMotionProp=rn,e.m=Xte,e.makeUseVisualState=hu,e.motion=C6,e.motionValue=So,e.resolveMotionValue=$l,e.transform=vT,e.useAnimation=Sre,e.useAnimationControls=CT,e.useAnimationFrame=_T,e.useCycle=Tre,e.useDeprecatedAnimatedState=Dre,e.useDeprecatedInvertedScale=zre,e.useDomEvent=dr,e.useDragControls=Are,e.useElementScroll=Cre,e.useForceUpdate=_5,e.useInView=Pre,e.useInstantLayoutTransition=kT,e.useInstantTransition=Ire,e.useIsPresent=aee,e.useIsomorphicLayoutEffect=T,e.useMotionTemplate=wre,e.useMotionValue=ds,e.usePresence=e6,e.useReducedMotion=D,e.useReducedMotionConfig=B,e.useResetProjection=Lre,e.useScroll=R6,e.useSpring=xre,e.useTime=Rre,e.useTransform=E5,e.useUnmountEffect=h5,e.useVelocity=_re,e.useViewportScroll=Ore,e.useVisualElementContext=k,e.visualElement=w5,e.wrapHandler=Y4})(tn);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(m,f){for(var b in f)Object.defineProperty(m,b,{enumerable:!0,get:f[b]})}t(e,{AccordionBody:function(){return w},default:function(){return y}});var r=h(g),n=tn,o=h(lt),a=h(un),i=h(Xe),s=Qe,l=_w,c=Ke,u=k1;function p(){return p=Object.assign||function(m){for(var f=1;f=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=r.default.forwardRef(function(m,f){var b=m.className,d=m.children,x=v(m,["className","children"]),E=(0,l.useAccordion)(),C=E.open,k=E.animate,S=(0,c.useTheme)().accordion,R=S.styles.base;b=b??"";var T=(0,s.twMerge)((0,o.default)((0,i.default)(R.body)),b),P={unmount:{height:"0px",transition:{duration:.2,times:[.4,0,.2,1]}},mount:{height:"auto",transition:{duration:.2,times:[.4,0,.2,1]}}},j={unmount:{transition:{duration:.3,ease:"linear"}},mount:{transition:{duration:.3,ease:"linear"}}},L=(0,a.default)(j,k);return r.default.createElement(n.LazyMotion,{features:n.domAnimation},r.default.createElement(n.m.div,{className:"overflow-hidden",initial:"unmount",exit:"unmount",animate:C?"mount":"unmount",variants:P},r.default.createElement(n.m.div,p({},x,{ref:f,className:T,initial:"unmount",exit:"unmount",animate:C?"mount":"unmount",variants:L}),d)))});w.propTypes={className:u.propTypesClassName,children:u.propTypesChildren},w.displayName="MaterialTailwind.AccordionBody";var y=w})(cH);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(f,b){for(var d in b)Object.defineProperty(f,d,{enumerable:!0,get:b[d]})}t(e,{Accordion:function(){return y},AccordionHeader:function(){return c.AccordionHeader},AccordionBody:function(){return u.AccordionBody},useAccordion:function(){return s.useAccordion},default:function(){return m}});var r=v(g),n=v(lt),o=Qe,a=v(Xe),i=Ke,s=_w,l=k1,c=lH,u=cH;function p(f,b,d){return b in f?Object.defineProperty(f,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):f[b]=d,f}function h(){return h=Object.assign||function(f){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(f,x)&&(d[x]=f[x])}return d}function w(f,b){if(f==null)return{};var d={},x=Object.keys(f),E,C;for(C=0;C=0)&&(d[E]=f[E]);return d}var y=r.default.forwardRef(function(f,b){var d=f.open,x=f.icon,E=f.animate,C=f.className,k=f.disabled,S=f.children,R=_(f,["open","icon","animate","className","disabled","children"]),T=(0,i.useTheme)().accordion,P=T.defaultProps,j=T.styles.base;x=x??P.icon,E=E??P.animate,C=C??P.className,k=k??P.disabled;var L=(0,o.twMerge)((0,n.default)((0,a.default)(j.container),p({},(0,a.default)(j.disabled),k)),C),D=r.default.useMemo(function(){return{open:d,icon:x,animate:E,disabled:k}},[d,x,E,k]);return r.default.createElement(s.AccordionContextProvider,{value:D},r.default.createElement("div",h({},R,{ref:b,className:L}),S))});y.propTypes={open:l.propTypesOpen,icon:l.propTypesIcon,animate:l.propTypesAnimate,disabled:l.propTypesDisabled,className:l.propTypesClassName,children:l.propTypesChildren},y.displayName="MaterialTailwind.Accordion";var m=Object.assign(y,{Header:c.AccordionHeader,Body:u.AccordionBody})})(Pz);var JU={},yr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});function t(n,o,a){var i=n.findIndex(function(s){return s===o});return i>=0?o:a}var r=t})(yr);var Nw={},mf=class{constructor(){this.x=0,this.y=0,this.z=0}findFurthestPoint(t,r,n,o,a,i){return this.x=t-n>r/2?0:r,this.y=o-i>a/2?0:a,this.z=Math.hypot(this.x-(t-n),this.y-(o-i)),this.z}appyStyles(t,r,n,o,a){t.classList.add("ripple"),t.style.backgroundColor=r==="dark"?"rgba(0,0,0, 0.2)":"rgba(255,255,255, 0.3)",t.style.borderRadius="50%",t.style.pointerEvents="none",t.style.position="absolute",t.style.left=a.clientX-n.left-o+"px",t.style.top=a.clientY-n.top-o+"px",t.style.width=t.style.height=o*2+"px"}applyAnimation(t){t.animate([{transform:"scale(0)",opacity:1},{transform:"scale(1.5)",opacity:0}],{duration:500,easing:"linear"})}create(t,r){const n=t.currentTarget;n.style.position="relative",n.style.overflow="hidden";const o=n.getBoundingClientRect(),a=this.findFurthestPoint(t.clientX,n.offsetWidth,o.left,t.clientY,n.offsetHeight,o.top),i=document.createElement("span");this.appyStyles(i,r,o,a,t),this.applyAnimation(i),n.appendChild(i),setTimeout(()=>i.remove(),500)}};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(m,f){for(var b in f)Object.defineProperty(m,b,{enumerable:!0,get:f[b]})}t(e,{IconButton:function(){return w},default:function(){return y}});var r=h(g),n=h(Je),o=h(mf),a=h(lt),i=Qe,s=h(yr),l=h(Xe),c=Ke,u=Yc;function p(){return p=Object.assign||function(m){for(var f=1;f=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=r.default.forwardRef(function(m,f){var b=m.variant,d=m.size,x=m.color,E=m.ripple,C=m.className,k=m.children;m.fullWidth;var S=v(m,["variant","size","color","ripple","className","children","fullWidth"]),R=(0,c.useTheme)().iconButton,T=R.valid,P=R.defaultProps,j=R.styles,L=j.base,D=j.variants,B=j.sizes;b=b??P.variant,d=d??P.size,x=x??P.color,E=E??P.ripple,C=C??P.className;var V=E!==void 0&&new o.default,q=(0,l.default)(L),z=(0,l.default)(D[(0,s.default)(T.variants,b,"filled")][(0,s.default)(T.colors,x,"blue")]),F=(0,l.default)(B[(0,s.default)(T.sizes,d,"md")]),$=(0,i.twMerge)((0,a.default)(q,F,z),C);return r.default.createElement("button",p({},S,{ref:f,className:$,type:S.type||"button",onMouseDown:function(W){var G=S==null?void 0:S.onMouseDown;return E&&V.create(W,(b==="filled"||b==="gradient")&&x!=="white"?"light":"dark"),typeof G=="function"&&G(W)}}),r.default.createElement("span",{className:"absolute top-1/2 left-1/2 transform -translate-y-1/2 -translate-x-1/2"},k))});w.propTypes={variant:n.default.oneOf(u.propTypesVariant),size:n.default.oneOf(u.propTypesSize),color:n.default.oneOf(u.propTypesColor),ripple:u.propTypesRipple,className:u.propTypesClassName,children:u.propTypesChildren},w.displayName="MaterialTailwind.IconButton";var y=w})(Nw);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,x){for(var E in x)Object.defineProperty(d,E,{enumerable:!0,get:x[E]})}t(e,{Alert:function(){return f},default:function(){return b}});var r=w(g),n=w(Je),o=tn,a=xw,i=w(lt),s=w(un),l=Qe,c=w(yr),u=w(Xe),p=Ke,h=NC,v=w(Nw);function _(){return _=Object.assign||function(d){for(var x=1;x=0)&&Object.prototype.propertyIsEnumerable.call(d,C)&&(E[C]=d[C])}return E}function m(d,x){if(d==null)return{};var E={},C=Object.keys(d),k,S;for(S=0;S=0)&&(E[k]=d[k]);return E}var f=r.default.forwardRef(function(d,x){var E=d.variant,C=d.color,k=d.icon,S=d.open,R=d.action,T=d.onClose,P=d.animate,j=d.className,L=d.children,D=y(d,["variant","color","icon","open","action","onClose","animate","className","children"]),B=(0,p.useTheme)().alert,V=B.defaultProps,q=B.valid,z=B.styles,F=z.base,$=z.variants;E=E??V.variant,C=C??V.color,j=j??V.className,P=P??V.animate,S=S??V.open,R=R??V.action,T=T??V.onClose;var W=(0,u.default)(F.alert),G=(0,u.default)(F.action),Q=(0,u.default)($[(0,c.default)(q.variants,E,"filled")][(0,c.default)(q.colors,C,"blue")]),Z=(0,l.twMerge)((0,i.default)(W,Q),j),U=(0,i.default)(G),J={unmount:{opacity:0},mount:{opacity:1}},oe=(0,s.default)(J,P),ee=r.default.createElement("div",{className:"shrink-0"},k),ie=o.AnimatePresence;return r.default.createElement(o.LazyMotion,{features:o.domAnimation},r.default.createElement(ie,null,S&&r.default.createElement(o.m.div,_({},D,{ref:x,role:"alert",className:"".concat(Z," flex"),initial:"unmount",exit:"unmount",animate:S?"mount":"unmount",variants:oe}),k&&ee,r.default.createElement("div",{className:"".concat(k?"ml-3":""," mr-12")},L),T&&!R&&r.default.createElement(v.default,{onClick:T,size:"sm",variant:"text",color:E==="outlined"||E==="ghost"?C:"white",className:U},r.default.createElement(a.XMarkIcon,{className:"h-6 w-6",strokeWidth:2})),R||null)))});f.propTypes={variant:n.default.oneOf(h.propTypesVariant),color:n.default.oneOf(h.propTypesColor),icon:h.propTypesIcon,open:h.propTypesOpen,action:h.propTypesAction,onClose:h.propTypesOnClose,animate:h.propTypesAnimate,className:h.propTypesClassName,children:h.propTypesChildren},f.displayName="MaterialTailwind.Alert";var b=f})(JU);var eW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(m,f){for(var b in f)Object.defineProperty(m,b,{enumerable:!0,get:f[b]})}t(e,{Avatar:function(){return w},default:function(){return y}});var r=h(g),n=h(Je),o=h(lt),a=Qe,i=h(yr),s=h(Xe),l=Ke,c=$C;function u(m,f,b){return f in m?Object.defineProperty(m,f,{value:b,enumerable:!0,configurable:!0,writable:!0}):m[f]=b,m}function p(){return p=Object.assign||function(m){for(var f=1;f=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=r.default.forwardRef(function(m,f){var b=m.variant,d=m.size,x=m.className,E=m.color,C=m.withBorder,k=v(m,["variant","size","className","color","withBorder"]),S=(0,l.useTheme)().avatar,R=S.valid,T=S.defaultProps,P=S.styles,j=P.base,L=P.variants,D=P.sizes,B=P.borderColor;b=b??T.variant,d=d??T.size,x=x??T.className,C=C??T.withBorder,E=E??T.color;var V=(0,s.default)(L[(0,i.default)(R.variants,b,"rounded")]),q=(0,s.default)(D[(0,i.default)(R.sizes,d,"md")]),z=(0,s.default)(B[(0,i.default)(R.colors,E,"blue")]),F,$=(0,a.twMerge)((0,o.default)((0,s.default)(j.initial),V,q,(F={},u(F,(0,s.default)(j.withBorder),C),u(F,z,C),F)),x);return r.default.createElement("img",p({},k,{ref:f,className:$}))});w.propTypes={variant:n.default.oneOf(c.propTypesVariant),size:n.default.oneOf(c.propTypesSize),className:c.propTypesClassName,withBorder:c.propTypesWithBorder,color:n.default.oneOf(c.propTypesColor)},w.displayName="MaterialTailwind.Avatar";var y=w})(eW);var tW={},rW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,c){for(var u in c)Object.defineProperty(l,u,{enumerable:!0,get:c[u]})}t(e,{propTypesSeparator:function(){return o},propTypesFullWidth:function(){return a},propTypesClassName:function(){return i},propTypesChildren:function(){return s}});var r=n(Je);function n(l){return l&&l.__esModule?l:{default:l}}var o=r.default.node,a=r.default.bool,i=r.default.string,s=r.default.node.isRequired})(rW);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(m,f){for(var b in f)Object.defineProperty(m,b,{enumerable:!0,get:f[b]})}t(e,{Breadcrumbs:function(){return w},default:function(){return y}});var r=h(g),n=u(lt),o=Qe,a=u(Xe),i=Ke,s=rW;function l(m,f,b){return f in m?Object.defineProperty(m,f,{value:b,enumerable:!0,configurable:!0,writable:!0}):m[f]=b,m}function c(){return c=Object.assign||function(m){for(var f=1;f=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=(0,r.forwardRef)(function(m,f){var b=m.separator,d=m.fullWidth,x=m.className,E=m.children,C=v(m,["separator","fullWidth","className","children"]),k=(0,i.useTheme)().breadcrumbs,S=k.defaultProps,R=k.styles.base;b=b??S.separator,d=d??S.fullWidth,x=x??S.className;var T=(0,n.default)((0,a.default)(R.root.initial),l({},(0,a.default)(R.root.fullWidth),d)),P=(0,o.twMerge)((0,n.default)((0,a.default)(R.list)),x),j=(0,n.default)((0,a.default)(R.item.initial)),L=(0,n.default)((0,a.default)(R.separator));return r.default.createElement("nav",{"aria-label":"breadcrumb",className:T},r.default.createElement("ol",c({},C,{ref:f,className:P}),r.Children.map(E,function(D,B){if((0,r.isValidElement)(D)){var V;return r.default.createElement("li",{className:(0,n.default)(j,l({},(0,a.default)(R.item.disabled),D==null||(V=D.props)===null||V===void 0?void 0:V.disabled))},D,B!==r.Children.count(E)-1&&r.default.createElement("span",{className:L},b))}return null})))});w.propTypes={separator:s.propTypesSeparator,fullWidth:s.propTypesFullWidth,className:s.propTypesClassName,children:s.propTypesChildren},w.displayName="MaterialTailwind.Breadcrumbs";var y=w})(tW);var nW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(f,b){for(var d in b)Object.defineProperty(f,d,{enumerable:!0,get:b[d]})}t(e,{Button:function(){return y},default:function(){return m}});var r=v(g),n=v(Je),o=v(mf),a=v(lt),i=Qe,s=v(yr),l=v(Xe),c=Ke,u=Yc;function p(f,b,d){return b in f?Object.defineProperty(f,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):f[b]=d,f}function h(){return h=Object.assign||function(f){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(f,x)&&(d[x]=f[x])}return d}function w(f,b){if(f==null)return{};var d={},x=Object.keys(f),E,C;for(C=0;C=0)&&(d[E]=f[E]);return d}var y=r.default.forwardRef(function(f,b){var d=f.variant,x=f.size,E=f.color,C=f.fullWidth,k=f.ripple,S=f.className,R=f.children,T=_(f,["variant","size","color","fullWidth","ripple","className","children"]),P=(0,c.useTheme)().button,j=P.valid,L=P.defaultProps,D=P.styles,B=D.base,V=D.variants,q=D.sizes;d=d??L.variant,x=x??L.size,E=E??L.color,C=C??L.fullWidth,k=k??L.ripple,S=S??L.className;var z=k!==void 0&&new o.default,F=(0,l.default)(B.initial),$=(0,l.default)(V[(0,s.default)(j.variants,d,"filled")][(0,s.default)(j.colors,E,"blue")]),W=(0,l.default)(q[(0,s.default)(j.sizes,x,"md")]),G=(0,i.twMerge)((0,a.default)(F,W,$,p({},(0,l.default)(B.fullWidth),C)),S);return r.default.createElement("button",h({},T,{ref:b,className:G,type:T.type||"button",onMouseDown:function(Q){var Z=T==null?void 0:T.onMouseDown;return k&&z.create(Q,(d==="filled"||d==="gradient")&&E!=="white"?"light":"dark"),typeof Z=="function"&&Z(Q)}}),R)});y.propTypes={variant:n.default.oneOf(u.propTypesVariant),size:n.default.oneOf(u.propTypesSize),color:n.default.oneOf(u.propTypesColor),fullWidth:u.propTypesFullWidth,ripple:u.propTypesRipple,className:u.propTypesClassName,children:u.propTypesChildren},y.displayName="MaterialTailwind.Button";var m=y})(nW);var oW={},aW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(m,f){for(var b in f)Object.defineProperty(m,b,{enumerable:!0,get:f[b]})}t(e,{CardHeader:function(){return w},default:function(){return y}});var r=h(g),n=h(Je),o=h(lt),a=Qe,i=h(yr),s=h(Xe),l=Ke,c=Xc;function u(m,f,b){return f in m?Object.defineProperty(m,f,{value:b,enumerable:!0,configurable:!0,writable:!0}):m[f]=b,m}function p(){return p=Object.assign||function(m){for(var f=1;f=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=r.default.forwardRef(function(m,f){var b=m.variant,d=m.color,x=m.shadow,E=m.floated,C=m.className,k=m.children,S=v(m,["variant","color","shadow","floated","className","children"]),R=(0,l.useTheme)().cardHeader,T=R.defaultProps,P=R.styles,j=R.valid,L=P.base,D=P.variants;b=b??T.variant,d=d??T.color,x=x??T.shadow,E=E??T.floated,C=C??T.className;var B=(0,s.default)(L.initial),V=(0,s.default)(D[(0,i.default)(j.variants,b,"filled")][(0,i.default)(j.colors,d,"white")]),q=(0,a.twMerge)((0,o.default)(B,V,u({},(0,s.default)(L.shadow),x),u({},(0,s.default)(L.floated),E)),C);return r.default.createElement("div",p({},S,{ref:f,className:q}),k)});w.propTypes={variant:n.default.oneOf(c.propTypesVariant),color:n.default.oneOf(c.propTypesColor),shadow:c.propTypesShadow,floated:c.propTypesFloated,className:c.propTypesClassName,children:c.propTypesChildren},w.displayName="MaterialTailwind.CardHeader";var y=w})(aW);var iW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,w){for(var y in w)Object.defineProperty(_,y,{enumerable:!0,get:w[y]})}t(e,{CardBody:function(){return h},default:function(){return v}});var r=c(g),n=c(lt),o=Qe,a=c(Xe),i=Ke,s=Xc;function l(){return l=Object.assign||function(_){for(var w=1;w=0)&&Object.prototype.propertyIsEnumerable.call(_,m)&&(y[m]=_[m])}return y}function p(_,w){if(_==null)return{};var y={},m=Object.keys(_),f,b;for(b=0;b=0)&&(y[f]=_[f]);return y}var h=r.default.forwardRef(function(_,w){var y=_.className,m=_.children,f=u(_,["className","children"]),b=(0,i.useTheme)().cardBody,d=b.defaultProps,x=b.styles.base;y=y??d.className;var E=(0,o.twMerge)((0,n.default)((0,a.default)(x)),y);return r.default.createElement("div",l({},f,{ref:w,className:E}),m)});h.propTypes={className:s.propTypesClassName,children:s.propTypesChildren},h.displayName="MaterialTailwind.CardBody";var v=h})(iW);var sW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(w,y){for(var m in y)Object.defineProperty(w,m,{enumerable:!0,get:y[m]})}t(e,{CardFooter:function(){return v},default:function(){return _}});var r=u(g),n=u(lt),o=Qe,a=u(Xe),i=Ke,s=Xc;function l(w,y,m){return y in w?Object.defineProperty(w,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):w[y]=m,w}function c(){return c=Object.assign||function(w){for(var y=1;y=0)&&Object.prototype.propertyIsEnumerable.call(w,f)&&(m[f]=w[f])}return m}function h(w,y){if(w==null)return{};var m={},f=Object.keys(w),b,d;for(d=0;d=0)&&(m[b]=w[b]);return m}var v=r.default.forwardRef(function(w,y){var m=w.divider,f=w.className,b=w.children,d=p(w,["divider","className","children"]),x=(0,i.useTheme)().cardFooter,E=x.defaultProps,C=x.styles.base;f=f??E.className,m=m??E.divider;var k=(0,o.twMerge)((0,n.default)((0,a.default)(C.initial),l({},(0,a.default)(C.divider),m)),f);return r.default.createElement("div",c({},d,{ref:y,className:k}),b)});v.propTypes={divider:s.propTypesDivider,className:s.propTypesClassName,children:s.propTypesChildren},v.displayName="MaterialTailwind.CardFooter";var _=v})(sW);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,x){for(var E in x)Object.defineProperty(d,E,{enumerable:!0,get:x[E]})}t(e,{Card:function(){return f},CardHeader:function(){return c.CardHeader},CardBody:function(){return u.CardBody},CardFooter:function(){return p.CardFooter},default:function(){return b}});var r=w(g),n=w(Je),o=w(lt),a=Qe,i=w(yr),s=w(Xe),l=Ke,c=aW,u=iW,p=sW,h=Xc;function v(d,x,E){return x in d?Object.defineProperty(d,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):d[x]=E,d}function _(){return _=Object.assign||function(d){for(var x=1;x=0)&&Object.prototype.propertyIsEnumerable.call(d,C)&&(E[C]=d[C])}return E}function m(d,x){if(d==null)return{};var E={},C=Object.keys(d),k,S;for(S=0;S=0)&&(E[k]=d[k]);return E}var f=r.default.forwardRef(function(d,x){var E=d.variant,C=d.color,k=d.shadow,S=d.className,R=d.children,T=y(d,["variant","color","shadow","className","children"]),P=(0,l.useTheme)().card,j=P.defaultProps,L=P.styles,D=P.valid,B=L.base,V=L.variants;E=E??j.variant,C=C??j.color,k=k??j.shadow,S=S??j.className;var q=(0,s.default)(B.initial),z=(0,s.default)(V[(0,i.default)(D.variants,E,"filled")][(0,i.default)(D.colors,C,"white")]),F=(0,a.twMerge)((0,o.default)(q,z,v({},(0,s.default)(B.shadow),k)),S);return r.default.createElement("div",_({},T,{ref:x,className:F}),R)});f.propTypes={variant:n.default.oneOf(h.propTypesVariant),color:n.default.oneOf(h.propTypesColor),shadow:h.propTypesShadow,className:h.propTypesClassName,children:h.propTypesChildren},f.displayName="MaterialTailwind.Card";var b=Object.assign(f,{Header:c.CardHeader,Body:u.CardBody,Footer:p.CardFooter})})(oW);var lW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(f,b){for(var d in b)Object.defineProperty(f,d,{enumerable:!0,get:b[d]})}t(e,{Checkbox:function(){return y},default:function(){return m}});var r=v(g),n=v(Je),o=v(mf),a=v(lt),i=Qe,s=v(yr),l=v(Xe),c=Ke,u=Zc;function p(f,b,d){return b in f?Object.defineProperty(f,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):f[b]=d,f}function h(){return h=Object.assign||function(f){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(f,x)&&(d[x]=f[x])}return d}function w(f,b){if(f==null)return{};var d={},x=Object.keys(f),E,C;for(C=0;C=0)&&(d[E]=f[E]);return d}var y=r.default.forwardRef(function(f,b){var d=f.color,x=f.label,E=f.icon,C=f.ripple,k=f.className,S=f.disabled,R=f.containerProps,T=f.labelProps,P=f.iconProps,j=f.inputRef,L=_(f,["color","label","icon","ripple","className","disabled","containerProps","labelProps","iconProps","inputRef"]),D=(0,c.useTheme)().checkbox,B=D.defaultProps,V=D.valid,q=D.styles,z=q.base,F=q.colors,$=r.default.useId();d=d??B.color,x=x??B.label,E=E??B.icon,C=C??B.ripple,k=k??B.className,S=S??B.disabled,R=R??B.containerProps,T=T??B.labelProps,P=P??B.iconProps;var W=C!==void 0&&new o.default,G=(0,a.default)((0,l.default)(z.root),p({},(0,l.default)(z.disabled),S)),Q=(0,i.twMerge)((0,a.default)((0,l.default)(z.container)),R==null?void 0:R.className),Z=(0,i.twMerge)((0,a.default)((0,l.default)(z.input),(0,l.default)(F[(0,s.default)(V.colors,d,"blue")])),k),U=(0,i.twMerge)((0,a.default)((0,l.default)(z.label)),T==null?void 0:T.className),J=(0,i.twMerge)((0,a.default)((0,l.default)(z.icon)),P==null?void 0:P.className);return r.default.createElement("div",{ref:b,className:G},r.default.createElement("label",h({},R,{className:Q,htmlFor:L.id||$,onMouseDown:function(oe){var ee=R==null?void 0:R.onMouseDown;return C&&W.create(oe,"dark"),typeof ee=="function"&&ee(oe)}}),r.default.createElement("input",h({},L,{ref:j,type:"checkbox",disabled:S,className:Z,id:L.id||$})),r.default.createElement("span",{className:J},E||r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor",strokeWidth:1},r.default.createElement("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})))),x&&r.default.createElement("label",h({},T,{className:U,htmlFor:L.id||$}),x))});y.propTypes={color:n.default.oneOf(u.propTypesColor),label:u.propTypesLabel,icon:u.propTypesIcon,ripple:u.propTypesRipple,className:u.propTypesClassName,disabled:u.propTypesDisabled,containerProps:u.propTypesObject,labelProps:u.propTypesObject},y.displayName="MaterialTailwind.Checkbox";var m=y})(lW);var cW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,x){for(var E in x)Object.defineProperty(d,E,{enumerable:!0,get:x[E]})}t(e,{Chip:function(){return f},default:function(){return b}});var r=w(g),n=w(Je),o=tn,a=xw,i=w(lt),s=w(un),l=Qe,c=w(yr),u=w(Xe),p=Ke,h=UC,v=w(Nw);function _(){return _=Object.assign||function(d){for(var x=1;x=0)&&Object.prototype.propertyIsEnumerable.call(d,C)&&(E[C]=d[C])}return E}function m(d,x){if(d==null)return{};var E={},C=Object.keys(d),k,S;for(S=0;S=0)&&(E[k]=d[k]);return E}var f=r.default.forwardRef(function(d,x){var E=d.variant,C=d.size,k=d.color,S=d.icon,R=d.open,T=d.onClose,P=d.action,j=d.animate,L=d.className,D=d.value,B=y(d,["variant","size","color","icon","open","onClose","action","animate","className","value"]),V=(0,p.useTheme)().chip,q=V.defaultProps,z=V.valid,F=V.styles,$=F.base,W=F.variants,G=F.sizes;E=E??q.variant,C=C??q.size,k=k??q.color,L=L??q.className,j=j??q.animate,R=R??q.open,P=P??q.action,T=T??q.onClose;var Q=(0,u.default)($.chip),Z=(0,u.default)($.action),U=(0,u.default)($.icon),J=(0,u.default)(W[(0,c.default)(z.variants,E,"filled")][(0,c.default)(z.colors,k,"blue")]),oe=(0,u.default)(G[(0,c.default)(z.sizes,C,"md")].chip),ee=(0,u.default)(G[(0,c.default)(z.sizes,C,"md")].action),ie=(0,u.default)(G[(0,c.default)(z.sizes,C,"md")].icon),ce=(0,l.twMerge)((0,i.default)(Q,J,oe),L),ye=(0,i.default)(Z,ee),Ce=(0,i.default)(U,ie),Se=(0,i.default)({"ml-4":S&&C==="sm","ml-[18px]":S&&C==="md","ml-5":S&&C==="lg","mr-5":T}),Re={unmount:{opacity:0},mount:{opacity:1}},Te=(0,s.default)(Re,j),je=r.default.createElement("div",{className:Ce},S),pe=o.AnimatePresence;return r.default.createElement(o.LazyMotion,{features:o.domAnimation},r.default.createElement(pe,null,R&&r.default.createElement(o.m.div,_({},B,{ref:x,className:ce,initial:"unmount",exit:"unmount",animate:R?"mount":"unmount",variants:Te}),S&&je,r.default.createElement("span",{className:Se},D),T&&!P&&r.default.createElement(v.default,{onClick:T,size:"sm",variant:"text",color:E==="outlined"||E==="ghost"?k:"white",className:ye},r.default.createElement(a.XMarkIcon,{className:(0,i.default)({"h-3.5 w-3.5":C==="sm","h-4 w-4":C==="md","h-5 w-5":C==="lg"}),strokeWidth:2})),P||null)))});f.propTypes={variant:n.default.oneOf(h.propTypesVariant),size:n.default.oneOf(h.propTypesSize),color:n.default.oneOf(h.propTypesColor),icon:h.propTypesIcon,open:h.propTypesOpen,onClose:h.propTypesOnClose,action:h.propTypesAction,animate:h.propTypesAnimate,className:h.propTypesClassName,value:h.propTypesValue},f.displayName="MaterialTailwind.Chip";var b=f})(cW);var uW={},tIe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},yu=new WeakMap,q5=new WeakMap,G5={},fx=0,dW=function(e){return e&&(e.host||dW(e.parentNode))},rIe=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=dW(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},nIe=function(e,t,r,n){var o=rIe(t,Array.isArray(e)?e:[e]);G5[r]||(G5[r]=new WeakMap);var a=G5[r],i=[],s=new Set,l=new Set(o),c=function(p){!p||s.has(p)||(s.add(p),c(p.parentNode))};o.forEach(c);var u=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(h){if(s.has(h))u(h);else{var v=h.getAttribute(n),_=v!==null&&v!=="false",w=(yu.get(h)||0)+1,y=(a.get(h)||0)+1;yu.set(h,w),a.set(h,y),i.push(h),w===1&&_&&q5.set(h,!0),y===1&&h.setAttribute(r,"true"),_||h.setAttribute(n,"true")}})};return u(t),s.clear(),fx++,function(){i.forEach(function(p){var h=yu.get(p)-1,v=a.get(p)-1;yu.set(p,h),a.set(p,v),h||(q5.has(p)||p.removeAttribute(n),q5.delete(p)),v||p.removeAttribute(r)}),fx--,fx||(yu=new WeakMap,yu=new WeakMap,q5=new WeakMap,G5={})}},oIe=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||tIe(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),nIe(n,o,r,"aria-hidden")):function(){return null}};/*! -* tabbable 6.2.0 -* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE -*/var aIe=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],X8=aIe.join(","),fW=typeof Element>"u",Wp=fW?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,w7=!fW&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},x7=function e(t,r){var n;r===void 0&&(r=!0);var o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),a=o===""||o==="true",i=a||r&&t&&e(t.parentNode);return i},iIe=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},sIe=function(t,r,n){if(x7(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(X8));return r&&Wp.call(t,X8)&&o.unshift(t),o=o.filter(n),o},lIe=function e(t,r,n){for(var o=[],a=Array.from(t);a.length;){var i=a.shift();if(!x7(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),l=s.length?s:i.children,c=e(l,!0,n);n.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=Wp.call(i,X8);u&&n.filter(i)&&(r||!t.includes(i))&&o.push(i);var p=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),h=!x7(p,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(p&&h){var v=e(p===!0?i.children:p.children,!0,n);n.flatten?o.push.apply(o,v):o.push({scopeParent:i,candidates:v})}else a.unshift.apply(a,i.children)}}return o},hW=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},pW=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||iIe(t))&&!hW(t)?0:t.tabIndex},cIe=function(t,r){var n=pW(t);return n<0&&r&&!hW(t)?0:n},uIe=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},mW=function(t){return t.tagName==="INPUT"},dIe=function(t){return mW(t)&&t.type==="hidden"},fIe=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},hIe=function(t,r){for(var n=0;nsummary:first-of-type"),i=a?t.parentElement:t;if(Wp.call(i,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=w7(t);if(l&&!l.shadowRoot&&o(l)===!0)return NM(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(vIe(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return NM(t);return!1},yIe=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n=0)},_Ie=function e(t){var r=[],n=[];return t.forEach(function(o,a){var i=!!o.scopeParent,s=i?o.scopeParent:o,l=cIe(s,i),c=i?e(o.candidates):s;l===0?i?r.push.apply(r,c):r.push(s):n.push({documentOrder:a,tabIndex:l,item:o,isScope:i,content:c})}),n.sort(uIe).reduce(function(o,a){return a.isScope?o.push.apply(o,a.content):o.push(a.content),o},[]).concat(r)},_7=function(t,r){r=r||{};var n;return r.getShadowRoot?n=lIe([t],r.includeContainer,{filter:$M.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:xIe}):n=sIe(t,r.includeContainer,$M.bind(null,r)),_Ie(n)};function ha(e){return e.split("-")[1]}function wO(e){return e==="y"?"height":"width"}function bo(e){return e.split("-")[0]}function Rl(e){return["top","bottom"].includes(bo(e))?"x":"y"}function DM(e,t,r){let{reference:n,floating:o}=e;const a=n.x+n.width/2-o.width/2,i=n.y+n.height/2-o.height/2,s=Rl(t),l=wO(s),c=n[l]/2-o[l]/2,u=s==="x";let p;switch(bo(t)){case"top":p={x:a,y:n.y-o.height};break;case"bottom":p={x:a,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:i};break;case"left":p={x:n.x-o.width,y:i};break;default:p={x:n.x,y:n.y}}switch(ha(t)){case"start":p[s]-=c*(r&&u?-1:1);break;case"end":p[s]+=c*(r&&u?-1:1)}return p}const EIe=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:p}=DM(c,n,l),h=n,v={},_=0;for(let w=0;w({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:s}=t,{element:l,padding:c=0}=_a(e,t)||{};if(l==null)return{};const u=xO(c),p={x:r,y:n},h=Rl(o),v=wO(h),_=await i.getDimensions(l),w=h==="y",y=w?"top":"left",m=w?"bottom":"right",f=w?"clientHeight":"clientWidth",b=a.reference[v]+a.reference[h]-p[h]-a.floating[v],d=p[h]-a.reference[h],x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let E=x?x[f]:0;E&&await(i.isElement==null?void 0:i.isElement(x))||(E=s.floating[f]||a.floating[v]);const C=b/2-d/2,k=E/2-_[v]/2-1,S=ml(u[y],k),R=ml(u[m],k),T=S,P=E-_[v]-R,j=E/2-_[v]/2+C,L=Z8(T,j,P),D=ha(o)!=null&&j!=L&&a.reference[v]/2-(je.concat(t,t+"-start",t+"-end"),[]),CIe={left:"right",right:"left",bottom:"top",top:"bottom"};function E7(e){return e.replace(/left|right|bottom|top/g,t=>CIe[t])}function vW(e,t,r){r===void 0&&(r=!1);const n=ha(e),o=Rl(e),a=wO(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=E7(i)),{main:i,cross:E7(i)}}const OIe={start:"end",end:"start"};function sy(e){return e.replace(/start|end/g,t=>OIe[t])}const kIe=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,o;const{rects:a,middlewareData:i,placement:s,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:p,allowedPlacements:h=zM,autoAlignment:v=!0,..._}=_a(e,t),w=p!==void 0||h===zM?function(R,T,P){return(R?[...P.filter(j=>ha(j)===R),...P.filter(j=>ha(j)!==R)]:P.filter(j=>bo(j)===j)).filter(j=>!R||ha(j)===R||!!T&&sy(j)!==j)}(p||null,v,h):h,y=await Wa(t,_),m=((r=i.autoPlacement)==null?void 0:r.index)||0,f=w[m];if(f==null)return{};const{main:b,cross:d}=vW(f,a,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(s!==f)return{reset:{placement:w[0]}};const x=[y[bo(f)],y[b],y[d]],E=[...((n=i.autoPlacement)==null?void 0:n.overflows)||[],{placement:f,overflows:x}],C=w[m+1];if(C)return{data:{index:m+1,overflows:E},reset:{placement:C}};const k=E.map(R=>{const T=ha(R.placement);return[R.placement,T&&u?R.overflows.slice(0,2).reduce((P,j)=>P+j,0):R.overflows[0],R.overflows]}).sort((R,T)=>R[1]-T[1]),S=((o=k.filter(R=>R[2].slice(0,ha(R[0])?2:3).every(T=>T<=0))[0])==null?void 0:o[0])||k[0][0];return S!==s?{data:{index:m+1,overflows:E},reset:{placement:S}}:{}}}},RIe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:o,rects:a,initialPlacement:i,platform:s,elements:l}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:_=!0,...w}=_a(e,t),y=bo(n),m=bo(i)===i,f=await(s.isRTL==null?void 0:s.isRTL(l.floating)),b=p||(m||!_?[E7(i)]:function(T){const P=E7(T);return[sy(T),P,sy(P)]}(i));p||v==="none"||b.push(...function(T,P,j,L){const D=ha(T);let B=function(V,q,z){const F=["left","right"],$=["right","left"],W=["top","bottom"],G=["bottom","top"];switch(V){case"top":case"bottom":return z?q?$:F:q?F:$;case"left":case"right":return q?W:G;default:return[]}}(bo(T),j==="start",L);return D&&(B=B.map(V=>V+"-"+D),P&&(B=B.concat(B.map(sy)))),B}(i,_,v,f));const d=[i,...b],x=await Wa(t,w),E=[];let C=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&E.push(x[y]),u){const{main:T,cross:P}=vW(n,a,f);E.push(x[T],x[P])}if(C=[...C,{placement:n,overflows:E}],!E.every(T=>T<=0)){var k,S;const T=(((k=o.flip)==null?void 0:k.index)||0)+1,P=d[T];if(P)return{data:{index:T,overflows:C},reset:{placement:P}};let j=(S=C.filter(L=>L.overflows[0]<=0).sort((L,D)=>L.overflows[1]-D.overflows[1])[0])==null?void 0:S.placement;if(!j)switch(h){case"bestFit":{var R;const L=(R=C.map(D=>[D.placement,D.overflows.filter(B=>B>0).reduce((B,V)=>B+V,0)]).sort((D,B)=>D[1]-B[1])[0])==null?void 0:R[0];L&&(j=L);break}case"initialPlacement":j=i}if(n!==j)return{reset:{placement:j}}}return{}}}};function BM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function VM(e){return gW.some(t=>e[t]>=0)}const SIe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=_a(e,t);switch(n){case"referenceHidden":{const a=BM(await Wa(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:VM(a)}}}case"escaped":{const a=BM(await Wa(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:a,escaped:VM(a)}}}default:return{}}}}};function HM(e){const t=ml(...e.map(n=>n.left)),r=ml(...e.map(n=>n.top));return{x:t,y:r,width:Fa(...e.map(n=>n.right))-t,height:Fa(...e.map(n=>n.bottom))-r}}const TIe=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:n,rects:o,platform:a,strategy:i}=t,{padding:s=2,x:l,y:c}=_a(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(n.reference))||[]),p=function(w){const y=w.slice().sort((b,d)=>b.y-d.y),m=[];let f=null;for(let b=0;bf.height/2?m.push([d]):m[m.length-1].push(d),f=d}return m.map(b=>Gd(HM(b)))}(u),h=Gd(HM(u)),v=xO(s),_=await a.getElementRects({reference:{getBoundingClientRect:function(){if(p.length===2&&p[0].left>p[1].right&&l!=null&&c!=null)return p.find(w=>l>w.left-v.left&&lw.top-v.top&&c=2){if(Rl(r)==="x"){const x=p[0],E=p[p.length-1],C=bo(r)==="top",k=x.top,S=E.bottom,R=C?x.left:E.left,T=C?x.right:E.right;return{top:k,bottom:S,left:R,right:T,width:T-R,height:S-k,x:R,y:k}}const w=bo(r)==="left",y=Fa(...p.map(x=>x.right)),m=ml(...p.map(x=>x.left)),f=p.filter(x=>w?x.left===m:x.right===y),b=f[0].top,d=f[f.length-1].bottom;return{top:b,bottom:d,left:m,right:y,width:y-m,height:d-b,x:m,y:b}}return h}},floating:n.floating,strategy:i});return o.reference.x!==_.reference.x||o.reference.y!==_.reference.y||o.reference.width!==_.reference.width||o.reference.height!==_.reference.height?{reset:{rects:_}}:{}}}},bW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(a,i){const{placement:s,platform:l,elements:c}=a,u=await(l.isRTL==null?void 0:l.isRTL(c.floating)),p=bo(s),h=ha(s),v=Rl(s)==="x",_=["left","top"].includes(p)?-1:1,w=u&&v?-1:1,y=_a(i,a);let{mainAxis:m,crossAxis:f,alignmentAxis:b}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return h&&typeof b=="number"&&(f=h==="end"?-1*b:b),v?{x:f*w,y:m*_}:{x:m*_,y:f*w}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function yW(e){return e==="x"?"y":"x"}const PIe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:y=>{let{x:m,y:f}=y;return{x:m,y:f}}},...l}=_a(e,t),c={x:r,y:n},u=await Wa(t,l),p=Rl(bo(o)),h=yW(p);let v=c[p],_=c[h];if(a){const y=p==="y"?"bottom":"right";v=Z8(v+u[p==="y"?"top":"left"],v,v-u[y])}if(i){const y=h==="y"?"bottom":"right";_=Z8(_+u[h==="y"?"top":"left"],_,_-u[y])}const w=s.fn({...t,[p]:v,[h]:_});return{...w,data:{x:w.x-r,y:w.y-n}}}}},MIe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=_a(e,t),u={x:r,y:n},p=Rl(o),h=yW(p);let v=u[p],_=u[h];const w=_a(s,t),y=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const b=p==="y"?"height":"width",d=a.reference[p]-a.floating[b]+y.mainAxis,x=a.reference[p]+a.reference[b]-y.mainAxis;vx&&(v=x)}if(c){var m,f;const b=p==="y"?"width":"height",d=["top","left"].includes(bo(o)),x=a.reference[h]-a.floating[b]+(d&&((m=i.offset)==null?void 0:m[h])||0)+(d?0:y.crossAxis),E=a.reference[h]+a.reference[b]+(d?0:((f=i.offset)==null?void 0:f[h])||0)-(d?y.crossAxis:0);_E&&(_=E)}return{[p]:v,[h]:_}}}},AIe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:a}=t,{apply:i=()=>{},...s}=_a(e,t),l=await Wa(t,s),c=bo(r),u=ha(r),p=Rl(r)==="x",{width:h,height:v}=n.floating;let _,w;c==="top"||c==="bottom"?(_=c,w=u===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(w=c,_=u==="end"?"top":"bottom");const y=v-l[_],m=h-l[w],f=!t.middlewareData.shift;let b=y,d=m;if(p){const E=h-l.left-l.right;d=u||f?ml(m,E):E}else{const E=v-l.top-l.bottom;b=u||f?ml(y,E):E}if(f&&!u){const E=Fa(l.left,0),C=Fa(l.right,0),k=Fa(l.top,0),S=Fa(l.bottom,0);p?d=h-2*(E!==0||C!==0?E+C:Fa(l.left,l.right)):b=v-2*(k!==0||S!==0?k+S:Fa(l.top,l.bottom))}await i({...t,availableWidth:d,availableHeight:b});const x=await o.getDimensions(a.floating);return h!==x.width||v!==x.height?{reset:{rects:!0}}:{}}}};function mo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qa(e){return mo(e).getComputedStyle(e)}function wW(e){return e instanceof mo(e).Node}function gl(e){return wW(e)?(e.nodeName||"").toLowerCase():"#document"}function Ea(e){return e instanceof HTMLElement||e instanceof mo(e).HTMLElement}function UM(e){return typeof ShadowRoot<"u"&&(e instanceof mo(e).ShadowRoot||e instanceof ShadowRoot)}function qp(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Qa(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function jIe(e){return["table","td","th"].includes(gl(e))}function Q8(e){const t=_O(),r=Qa(e);return r.transform!=="none"||r.perspective!=="none"||!!r.containerType&&r.containerType!=="normal"||!t&&!!r.backdropFilter&&r.backdropFilter!=="none"||!t&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function _O(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $w(e){return["html","body","#document"].includes(gl(e))}const J8=Math.min,yd=Math.max,C7=Math.round,K5=Math.floor,vl=e=>({x:e,y:e});function xW(e){const t=Qa(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ea(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,s=C7(r)!==a||C7(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function Ni(e){return e instanceof Element||e instanceof mo(e).Element}function EO(e){return Ni(e)?e:e.contextElement}function wd(e){const t=EO(e);if(!Ea(t))return vl(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=xW(t);let i=(a?C7(r.width):r.width)/n,s=(a?C7(r.height):r.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const IIe=vl(0);function _W(e){const t=mo(e);return _O()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:IIe}function Ic(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=EO(e);let i=vl(1);t&&(n?Ni(n)&&(i=wd(n)):i=wd(e));const s=function(h,v,_){return v===void 0&&(v=!1),!(!_||v&&_!==mo(h))&&v}(a,r,n)?_W(a):vl(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,p=o.height/i.y;if(a){const h=mo(a),v=n&&Ni(n)?mo(n):n;let _=h.frameElement;for(;_&&n&&v!==h;){const w=wd(_),y=_.getBoundingClientRect(),m=getComputedStyle(_),f=y.left+(_.clientLeft+parseFloat(m.paddingLeft))*w.x,b=y.top+(_.clientTop+parseFloat(m.paddingTop))*w.y;l*=w.x,c*=w.y,u*=w.x,p*=w.y,l+=f,c+=b,_=mo(_).frameElement}}return Gd({width:u,height:p,x:l,y:c})}function Dw(e){return Ni(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function $i(e){var t;return(t=(wW(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function EW(e){return Ic($i(e)).left+Dw(e).scrollLeft}function Kd(e){if(gl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||UM(e)&&e.host||$i(e);return UM(t)?t.host:t}function CW(e){const t=Kd(e);return $w(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ea(t)&&qp(t)?t:CW(t)}function Js(e,t){var r;t===void 0&&(t=[]);const n=CW(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),a=mo(n);return o?t.concat(a,a.visualViewport||[],qp(n)?n:[]):t.concat(n,Js(n))}function WM(e,t,r){let n;if(t==="viewport")n=function(o,a){const i=mo(o),s=$i(o),l=i.visualViewport;let c=s.clientWidth,u=s.clientHeight,p=0,h=0;if(l){c=l.width,u=l.height;const v=_O();(!v||v&&a==="fixed")&&(p=l.offsetLeft,h=l.offsetTop)}return{width:c,height:u,x:p,y:h}}(e,r);else if(t==="document")n=function(o){const a=$i(o),i=Dw(o),s=o.ownerDocument.body,l=yd(a.scrollWidth,a.clientWidth,s.scrollWidth,s.clientWidth),c=yd(a.scrollHeight,a.clientHeight,s.scrollHeight,s.clientHeight);let u=-i.scrollLeft+EW(o);const p=-i.scrollTop;return Qa(s).direction==="rtl"&&(u+=yd(a.clientWidth,s.clientWidth)-l),{width:l,height:c,x:u,y:p}}($i(e));else if(Ni(t))n=function(o,a){const i=Ic(o,!0,a==="fixed"),s=i.top+o.clientTop,l=i.left+o.clientLeft,c=Ea(o)?wd(o):vl(1);return{width:o.clientWidth*c.x,height:o.clientHeight*c.y,x:l*c.x,y:s*c.y}}(t,r);else{const o=_W(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return Gd(n)}function OW(e,t){const r=Kd(e);return!(r===t||!Ni(r)||$w(r))&&(Qa(r).position==="fixed"||OW(r,t))}function LIe(e,t,r){const n=Ea(t),o=$i(t),a=r==="fixed",i=Ic(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=vl(0);if(n||!n&&!a)if((gl(t)!=="body"||qp(o))&&(s=Dw(t)),Ea(t)){const c=Ic(t,!0,a,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=EW(o));return{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function qM(e,t){return Ea(e)&&Qa(e).position!=="fixed"?t?t(e):e.offsetParent:null}function GM(e,t){const r=mo(e);if(!Ea(e))return r;let n=qM(e,t);for(;n&&jIe(n)&&Qa(n).position==="static";)n=qM(n,t);return n&&(gl(n)==="html"||gl(n)==="body"&&Qa(n).position==="static"&&!Q8(n))?r:n||function(o){let a=Kd(o);for(;Ea(a)&&!$w(a);){if(Q8(a))return a;a=Kd(a)}return null}(e)||r}const kW={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Ea(r),a=$i(r);if(r===a)return t;let i={scrollLeft:0,scrollTop:0},s=vl(1);const l=vl(0);if((o||!o&&n!=="fixed")&&((gl(r)!=="body"||qp(a))&&(i=Dw(r)),Ea(r))){const c=Ic(r);s=wd(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-i.scrollLeft*s.x+l.x,y:t.y*s.y-i.scrollTop*s.y+l.y}},getDocumentElement:$i,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?function(l,c){const u=c.get(l);if(u)return u;let p=Js(l).filter(w=>Ni(w)&&gl(w)!=="body"),h=null;const v=Qa(l).position==="fixed";let _=v?Kd(l):l;for(;Ni(_)&&!$w(_);){const w=Qa(_),y=Q8(_);y||w.position!=="fixed"||(h=null),(v?!y&&!h:!y&&w.position==="static"&&h&&["absolute","fixed"].includes(h.position)||qp(_)&&!y&&OW(l,_))?p=p.filter(m=>m!==_):h=w,_=Kd(_)}return c.set(l,p),p}(t,this._c):[].concat(r),n],i=a[0],s=a.reduce((l,c)=>{const u=WM(t,c,o);return l.top=yd(u.top,l.top),l.right=J8(u.right,l.right),l.bottom=J8(u.bottom,l.bottom),l.left=yd(u.left,l.left),l},WM(t,i,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:GM,getElementRects:async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||GM,a=this.getDimensions;return{reference:LIe(t,await o(r),n),floating:{x:0,y:0,...await a(r)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return xW(e)},getScale:wd,isElement:Ni,isRTL:function(e){return getComputedStyle(e).direction==="rtl"}};function NIe(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=EO(e),u=o||a?[...c?Js(c):[],...Js(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const p=c&&s?function(y,m){let f,b=null;const d=$i(y);function x(){clearTimeout(f),b&&b.disconnect(),b=null}return function E(C,k){C===void 0&&(C=!1),k===void 0&&(k=1),x();const{left:S,top:R,width:T,height:P}=y.getBoundingClientRect();if(C||m(),!T||!P)return;const j={rootMargin:-K5(R)+"px "+-K5(d.clientWidth-(S+T))+"px "+-K5(d.clientHeight-(R+P))+"px "+-K5(S)+"px",threshold:yd(0,J8(1,k))||1};let L=!0;function D(B){const V=B[0].intersectionRatio;if(V!==k){if(!L)return E();V?E(!1,V):f=setTimeout(()=>{E(!1,1e-7)},100)}L=!1}try{b=new IntersectionObserver(D,{...j,root:d.ownerDocument})}catch{b=new IntersectionObserver(D,j)}b.observe(y)}(!0),x}(c,r):null;let h,v=-1,_=null;i&&(_=new ResizeObserver(y=>{let[m]=y;m&&m.target===c&&_&&(_.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{_&&_.observe(t)})),r()}),c&&!l&&_.observe(c),_.observe(t));let w=l?Ic(e):null;return l&&function y(){const m=Ic(e);!w||m.x===w.x&&m.y===w.y&&m.width===w.width&&m.height===w.height||r(),w=m,h=requestAnimationFrame(y)}(),r(),()=>{u.forEach(y=>{o&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),p&&p(),_&&_.disconnect(),_=null,l&&cancelAnimationFrame(h)}}const RW=(e,t,r)=>{const n=new Map,o={platform:kW,...r},a={...o.platform,_c:n};return EIe(e,t,{...o,platform:a})},$Ie=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?FM({element:t.current,padding:r}).fn(o):{}:t?FM({element:t,padding:r}).fn(o):{}}}};var ly=typeof document<"u"?g.useLayoutEffect:g.useEffect;function O7(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!O7(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!O7(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function KM(e){const t=g.useRef(e);return ly(()=>{t.current=e}),t}function DIe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,whileElementsMounted:a,open:i}=e,[s,l]=g.useState({x:null,y:null,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[c,u]=g.useState(n);O7(c,n)||u(n);const p=g.useRef(null),h=g.useRef(null),v=g.useRef(s),_=KM(a),w=KM(o),[y,m]=g.useState(null),[f,b]=g.useState(null),d=g.useCallback(R=>{p.current!==R&&(p.current=R,m(R))},[]),x=g.useCallback(R=>{h.current!==R&&(h.current=R,b(R))},[]),E=g.useCallback(()=>{if(!p.current||!h.current)return;const R={placement:t,strategy:r,middleware:c};w.current&&(R.platform=w.current),RW(p.current,h.current,R).then(T=>{const P={...T,isPositioned:!0};C.current&&!O7(v.current,P)&&(v.current=P,Xo.flushSync(()=>{l(P)}))})},[c,t,r,w]);ly(()=>{i===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,l(R=>({...R,isPositioned:!1})))},[i]);const C=g.useRef(!1);ly(()=>(C.current=!0,()=>{C.current=!1}),[]),ly(()=>{if(y&&f){if(_.current)return _.current(y,f,E);E()}},[y,f,E,_]);const k=g.useMemo(()=>({reference:p,floating:h,setReference:d,setFloating:x}),[d,x]),S=g.useMemo(()=>({reference:y,floating:f}),[y,f]);return g.useMemo(()=>({...s,update:E,refs:k,elements:S,reference:d,floating:x}),[s,E,k,S,d,x])}var Er=typeof document<"u"?g.useLayoutEffect:g.useEffect;let hx=!1,FIe=0;const YM=()=>"floating-ui-"+FIe++;function zIe(){const[e,t]=g.useState(()=>hx?YM():void 0);return Er(()=>{e==null&&t(YM())},[]),g.useEffect(()=>{hx||(hx=!0)},[]),e}const BIe=AE["useId".toString()],Gp=BIe||zIe;function SW(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){e.set(t,(e.get(t)||[]).filter(n=>n!==r))}}}const TW=g.createContext(null),PW=g.createContext(null),gf=()=>{var e;return((e=g.useContext(TW))==null?void 0:e.id)||null},Jc=()=>g.useContext(PW),VIe=e=>{const t=Gp(),r=Jc(),n=gf(),o=e||n;return Er(()=>{const a={id:t,parentId:o};return r==null||r.addNode(a),()=>{r==null||r.removeNode(a)}},[r,t,o]),t},HIe=e=>{let{children:t,id:r}=e;const n=gf();return g.createElement(TW.Provider,{value:g.useMemo(()=>({id:r,parentId:n}),[r,n])},t)},UIe=e=>{let{children:t}=e;const r=g.useRef([]),n=g.useCallback(i=>{r.current=[...r.current,i]},[]),o=g.useCallback(i=>{r.current=r.current.filter(s=>s!==i)},[]),a=g.useState(()=>SW())[0];return g.createElement(PW.Provider,{value:g.useMemo(()=>({nodesRef:r,addNode:n,removeNode:o,events:a}),[r,n,o,a])},t)};function Yn(e){return(e==null?void 0:e.ownerDocument)||document}function CO(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function MW(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function OO(e){return Yn(e).defaultView||window}function Ho(e){return e?e instanceof OO(e).Element:!1}function Lc(e){return e?e instanceof OO(e).HTMLElement:!1}function WIe(e){if(typeof ShadowRoot>"u")return!1;const t=OO(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function AW(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(CO())||t.test(MW()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function jW(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function e9(){return/apple/i.test(navigator.vendor)}function IW(){return CO().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function k7(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function Uo(e){const t=g.useRef(e);return Er(()=>{t.current=e}),t}const XM="data-floating-ui-safe-polygon";function cy(e,t,r){return r&&!k7(r)?0:typeof e=="number"?e:e==null?void 0:e[t]}const qIe=function(e,t){let{enabled:r=!0,delay:n=0,handleClose:o=null,mouseOnly:a=!1,restMs:i=0,move:s=!0}=t===void 0?{}:t;const{open:l,onOpenChange:c,dataRef:u,events:p,elements:{domReference:h,floating:v},refs:_}=e,w=Jc(),y=gf(),m=Uo(o),f=Uo(n),b=g.useRef(),d=g.useRef(),x=g.useRef(),E=g.useRef(),C=g.useRef(!0),k=g.useRef(!1),S=g.useRef(()=>{}),R=g.useCallback(()=>{var L;const D=(L=u.current.openEvent)==null?void 0:L.type;return(D==null?void 0:D.includes("mouse"))&&D!=="mousedown"},[u]);g.useEffect(()=>{if(!r)return;function L(){clearTimeout(d.current),clearTimeout(E.current),C.current=!0}return p.on("dismiss",L),()=>{p.off("dismiss",L)}},[r,p]),g.useEffect(()=>{if(!r||!m.current||!l)return;function L(){R()&&c(!1)}const D=Yn(v).documentElement;return D.addEventListener("mouseleave",L),()=>{D.removeEventListener("mouseleave",L)}},[v,l,c,r,m,u,R]);const T=g.useCallback(function(L){L===void 0&&(L=!0);const D=cy(f.current,"close",b.current);D&&!x.current?(clearTimeout(d.current),d.current=setTimeout(()=>c(!1),D)):L&&(clearTimeout(d.current),c(!1))},[f,c]),P=g.useCallback(()=>{S.current(),x.current=void 0},[]),j=g.useCallback(()=>{if(k.current){const L=Yn(_.floating.current).body;L.style.pointerEvents="",L.removeAttribute(XM),k.current=!1}},[_]);return g.useEffect(()=>{if(!r)return;function L(){return u.current.openEvent?["click","mousedown"].includes(u.current.openEvent.type):!1}function D(q){if(clearTimeout(d.current),C.current=!1,a&&!k7(b.current)||i>0&&cy(f.current,"open")===0)return;u.current.openEvent=q;const z=cy(f.current,"open",b.current);z?d.current=setTimeout(()=>{c(!0)},z):c(!0)}function B(q){if(L())return;S.current();const z=Yn(v);if(clearTimeout(E.current),m.current){l||clearTimeout(d.current),x.current=m.current({...e,tree:w,x:q.clientX,y:q.clientY,onClose(){j(),P(),T()}});const F=x.current;z.addEventListener("mousemove",F),S.current=()=>{z.removeEventListener("mousemove",F)};return}T()}function V(q){L()||m.current==null||m.current({...e,tree:w,x:q.clientX,y:q.clientY,onClose(){j(),P(),T()}})(q)}if(Ho(h)){const q=h;return l&&q.addEventListener("mouseleave",V),v==null||v.addEventListener("mouseleave",V),s&&q.addEventListener("mousemove",D,{once:!0}),q.addEventListener("mouseenter",D),q.addEventListener("mouseleave",B),()=>{l&&q.removeEventListener("mouseleave",V),v==null||v.removeEventListener("mouseleave",V),s&&q.removeEventListener("mousemove",D),q.removeEventListener("mouseenter",D),q.removeEventListener("mouseleave",B)}}},[h,v,r,e,a,i,s,T,P,j,c,l,w,f,m,u]),Er(()=>{var L;if(r&&l&&(L=m.current)!=null&&L.__options.blockPointerEvents&&R()){const V=Yn(v).body;if(V.setAttribute(XM,""),V.style.pointerEvents="none",k.current=!0,Ho(h)&&v){var D,B;const q=h,z=w==null||(D=w.nodesRef.current.find(F=>F.id===y))==null||(B=D.context)==null?void 0:B.elements.floating;return z&&(z.style.pointerEvents=""),q.style.pointerEvents="auto",v.style.pointerEvents="auto",()=>{q.style.pointerEvents="",v.style.pointerEvents=""}}}},[r,l,y,v,h,w,m,u,R]),Er(()=>{l||(b.current=void 0,P(),j())},[l,P,j]),g.useEffect(()=>()=>{P(),clearTimeout(d.current),clearTimeout(E.current),j()},[r,P,j]),g.useMemo(()=>{if(!r)return{};function L(D){b.current=D.pointerType}return{reference:{onPointerDown:L,onPointerEnter:L,onMouseMove(){l||i===0||(clearTimeout(E.current),E.current=setTimeout(()=>{C.current||c(!0)},i))}},floating:{onMouseEnter(){clearTimeout(d.current)},onMouseLeave(){p.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),T(!1)}}}},[p,r,i,l,c,T])},LW=g.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),NW=()=>g.useContext(LW),GIe=e=>{let{children:t,delay:r,timeoutMs:n=0}=e;const[o,a]=g.useReducer((l,c)=>({...l,...c}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),i=g.useRef(null),s=g.useCallback(l=>{a({currentId:l})},[]);return Er(()=>{o.currentId?i.current===null?i.current=o.currentId:a({isInstantPhase:!0}):(a({isInstantPhase:!1}),i.current=null)},[o.currentId]),g.createElement(LW.Provider,{value:g.useMemo(()=>({...o,setState:a,setCurrentId:s}),[o,a,s])},t)},KIe=(e,t)=>{let{open:r,onOpenChange:n}=e,{id:o}=t;const{currentId:a,setCurrentId:i,initialDelay:s,setState:l,timeoutMs:c}=NW();g.useEffect(()=>{a&&(l({delay:{open:1,close:cy(s,"close")}}),a!==o&&n(!1))},[o,n,l,a,s]),g.useEffect(()=>{function u(){n(!1),l({delay:s,currentId:null})}if(!r&&a===o)if(c){const p=window.setTimeout(u,c);return()=>{clearTimeout(p)}}else u()},[r,l,a,o,n,s,c]),g.useEffect(()=>{r&&i(o)},[r,i,o])};function Kp(){return Kp=Object.assign||function(e){for(var t=1;te==null?void 0:e.focus({preventScroll:r});o?a():ZM=requestAnimationFrame(a)}function YIe(e,t){var r;let n=[],o=(r=e.find(a=>a.id===t))==null?void 0:r.parentId;for(;o;){const a=e.find(i=>i.id===o);o=a==null?void 0:a.parentId,a&&(n=n.concat(a))}return n}function rp(e,t){let r=e.filter(o=>{var a;return o.parentId===t&&((a=o.context)==null?void 0:a.open)})||[],n=r;for(;n.length;)n=e.filter(o=>{var a;return(a=n)==null?void 0:a.some(i=>{var s;return o.parentId===i.id&&((s=o.context)==null?void 0:s.open)})})||[],r=r.concat(n);return r}function Fw(e){return"composedPath"in e?e.composedPath()[0]:e.target}const XIe="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function $W(e){return Lc(e)&&e.matches(XIe)}function No(e){e.preventDefault(),e.stopPropagation()}const R7=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function DW(e,t){const r=_7(e,R7());t==="prev"&&r.reverse();const n=r.indexOf(Nc(Yn(e)));return r.slice(n+1)[0]}function FW(){return DW(document.body,"next")}function zW(){return DW(document.body,"prev")}function np(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!Un(r,n)}function ZIe(e){_7(e,R7()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function QIe(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{const n=r.dataset.tabindex;delete r.dataset.tabindex,n?r.setAttribute("tabindex",n):r.removeAttribute("tabindex")})}const JIe=AE["useInsertionEffect".toString()],eLe=JIe||(e=>e());function vf(e){const t=g.useRef(()=>{});return eLe(()=>{t.current=e}),g.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o(e9()&&a("button"),document.addEventListener("keydown",QM),()=>{document.removeEventListener("keydown",QM)}),[]),g.createElement("span",Kp({},t,{ref:r,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,"data-floating-ui-focus-guard":"",style:kO,onFocus:i=>{e9()&&IW()&&!tLe(i)?(i.persist(),RO=window.setTimeout(()=>{n(i)},50)):n(i)}}))}),BW=g.createContext(null),VW=function(e){let{id:t,enabled:r=!0}=e===void 0?{}:e;const[n,o]=g.useState(null),a=Gp(),i=HW();return Er(()=>{if(!r)return;const s=t?document.getElementById(t):null;if(s)s.setAttribute("data-floating-ui-portal",""),o(s);else{const l=document.createElement("div");t!==""&&(l.id=t||a),l.setAttribute("data-floating-ui-portal",""),o(l);const c=(i==null?void 0:i.portalNode)||document.body;return c.appendChild(l),()=>{c.removeChild(l)}}},[t,i,a,r]),n},rLe=e=>{let{children:t,id:r,root:n=null,preserveTabOrder:o=!0}=e;const a=VW({id:r,enabled:!n}),[i,s]=g.useState(null),l=g.useRef(null),c=g.useRef(null),u=g.useRef(null),p=g.useRef(null),h=!!i&&!i.modal&&!!(n||a)&&o;return g.useEffect(()=>{if(!a||!o||i!=null&&i.modal)return;function v(_){a&&np(_)&&(_.type==="focusin"?QIe:ZIe)(a)}return a.addEventListener("focusin",v,!0),a.addEventListener("focusout",v,!0),()=>{a.removeEventListener("focusin",v,!0),a.removeEventListener("focusout",v,!0)}},[a,o,i==null?void 0:i.modal]),g.createElement(BW.Provider,{value:g.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:p,portalNode:a,setFocusManagerState:s}),[o,a])},h&&a&&g.createElement(S7,{"data-type":"outside",ref:l,onFocus:v=>{if(np(v,a)){var _;(_=u.current)==null||_.focus()}else{const w=zW()||(i==null?void 0:i.refs.domReference.current);w==null||w.focus()}}}),h&&a&&g.createElement("span",{"aria-owns":a.id,style:kO}),n?Xo.createPortal(t,n):a?Xo.createPortal(t,a):null,h&&a&&g.createElement(S7,{"data-type":"outside",ref:c,onFocus:v=>{if(np(v,a)){var _;(_=p.current)==null||_.focus()}else{const w=FW()||(i==null?void 0:i.refs.domReference.current);w==null||w.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1))}}}))},HW=()=>g.useContext(BW),nLe=g.forwardRef(function(t,r){return g.createElement("button",Kp({},t,{type:"button",ref:r,tabIndex:-1,style:kO}))});function oLe(e){let{context:t,children:r,order:n=["content"],guards:o=!0,initialFocus:a=0,returnFocus:i=!0,modal:s=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:c=!0}=e;const{refs:u,nodeId:p,onOpenChange:h,events:v,dataRef:_,elements:{domReference:w,floating:y}}=t,m=Uo(n),f=Jc(),b=HW(),[d,x]=g.useState(null),E=typeof a=="number"&&a<0,C=g.useRef(null),k=g.useRef(null),S=g.useRef(!1),R=g.useRef(null),T=g.useRef(!1),P=b!=null,j=w&&w.getAttribute("role")==="combobox"&&$W(w),L=g.useCallback(function(q){return q===void 0&&(q=y),q?_7(q,R7()):[]},[y]),D=g.useCallback(q=>{const z=L(q);return m.current.map(F=>w&&F==="reference"?w:y&&F==="floating"?y:z).filter(Boolean).flat()},[w,y,m,L]);g.useEffect(()=>{if(!s)return;function q(F){if(F.key==="Tab"){L().length===0&&!j&&No(F);const $=D(),W=Fw(F);m.current[0]==="reference"&&W===w&&(No(F),F.shiftKey?ws($[$.length-1]):ws($[1])),m.current[1]==="floating"&&W===y&&F.shiftKey&&(No(F),ws($[0]))}}const z=Yn(y);return z.addEventListener("keydown",q),()=>{z.removeEventListener("keydown",q)}},[w,y,s,m,u,j,L,D]),g.useEffect(()=>{if(!c)return;function q(){T.current=!0,setTimeout(()=>{T.current=!1})}function z(F){const $=F.relatedTarget,W=!(Un(w,$)||Un(y,$)||Un($,y)||Un(b==null?void 0:b.portalNode,$)||$!=null&&$.hasAttribute("data-floating-ui-focus-guard")||f&&(rp(f.nodesRef.current,p).find(G=>{var Q,Z;return Un((Q=G.context)==null?void 0:Q.elements.floating,$)||Un((Z=G.context)==null?void 0:Z.elements.domReference,$)})||YIe(f.nodesRef.current,p).find(G=>{var Q,Z;return((Q=G.context)==null?void 0:Q.elements.floating)===$||((Z=G.context)==null?void 0:Z.elements.domReference)===$})));$&&W&&!T.current&&$!==R.current&&(S.current=!0,setTimeout(()=>h(!1)))}if(y&&Lc(w))return w.addEventListener("focusout",z),w.addEventListener("pointerdown",q),!s&&y.addEventListener("focusout",z),()=>{w.removeEventListener("focusout",z),w.removeEventListener("pointerdown",q),!s&&y.removeEventListener("focusout",z)}},[w,y,s,p,f,b,h,c]),g.useEffect(()=>{var q;const z=Array.from((b==null||(q=b.portalNode)==null?void 0:q.querySelectorAll("[data-floating-ui-portal]"))||[]);function F(){return[C.current,k.current].filter(Boolean)}if(y&&s){const $=[y,...z,...F()],W=oIe(m.current.includes("reference")||j?$.concat(w||[]):$);return()=>{W()}}},[w,y,s,m,b,j]),g.useEffect(()=>{if(s&&!o&&y){const q=[],z=R7(),F=_7(Yn(y).body,z),$=D(),W=F.filter(G=>!$.includes(G));return W.forEach((G,Q)=>{q[Q]=G.getAttribute("tabindex"),G.setAttribute("tabindex","-1")}),()=>{W.forEach((G,Q)=>{const Z=q[Q];Z==null?G.removeAttribute("tabindex"):G.setAttribute("tabindex",Z)})}}},[y,s,o,D]),Er(()=>{if(!y)return;const q=Yn(y);let z=i,F=!1;const $=Nc(q),W=_.current;R.current=$;const G=D(y),Q=(typeof a=="number"?G[a]:a.current)||y;!E&&ws(Q,{preventScroll:Q===y});function Z(U){if(U.type==="escapeKey"&&u.domReference.current&&(R.current=u.domReference.current),["referencePress","escapeKey"].includes(U.type))return;const J=U.data.returnFocus;typeof J=="object"?(z=!0,F=J.preventScroll):z=J}return v.on("dismiss",Z),()=>{if(v.off("dismiss",Z),Un(y,Nc(q))&&u.domReference.current&&(R.current=u.domReference.current),z&&Lc(R.current)&&!S.current)if(!u.domReference.current||T.current)ws(R.current,{cancelPrevious:!1,preventScroll:F});else{var U;W.__syncReturnFocus=!0,(U=R.current)==null||U.focus({preventScroll:F}),setTimeout(()=>{delete W.__syncReturnFocus})}}},[y,D,a,i,_,u,v,E]),Er(()=>{if(b)return b.setFocusManagerState({...t,modal:s,closeOnFocusOut:c}),()=>{b.setFocusManagerState(null)}},[b,s,c,t]),Er(()=>{if(E||!y)return;function q(){x(L().length)}if(q(),typeof MutationObserver=="function"){const z=new MutationObserver(q);return z.observe(y,{childList:!0,subtree:!0}),()=>{z.disconnect()}}},[y,L,E,u]);const B=o&&(P||s)&&!j;function V(q){return l&&s?g.createElement(nLe,{ref:q==="start"?C:k,onClick:()=>h(!1)},typeof l=="string"?l:"Dismiss"):null}return g.createElement(g.Fragment,null,B&&g.createElement(S7,{"data-type":"inside",ref:b==null?void 0:b.beforeInsideRef,onFocus:q=>{if(s){const F=D();ws(n[0]==="reference"?F[0]:F[F.length-1])}else if(b!=null&&b.preserveTabOrder&&b.portalNode)if(S.current=!1,np(q,b.portalNode)){const F=FW()||w;F==null||F.focus()}else{var z;(z=b.beforeOutsideRef.current)==null||z.focus()}}}),j?null:V("start"),g.cloneElement(r,d===0||n.includes("floating")?{tabIndex:0}:{}),V("end"),B&&g.createElement(S7,{"data-type":"inside",ref:b==null?void 0:b.afterInsideRef,onFocus:q=>{if(s)ws(D()[0]);else if(b!=null&&b.preserveTabOrder&&b.portalNode)if(S.current=!0,np(q,b.portalNode)){const F=zW()||w;F==null||F.focus()}else{var z;(z=b.afterOutsideRef.current)==null||z.focus()}}}))}const Y5="data-floating-ui-scroll-lock",aLe=g.forwardRef(function(t,r){let{lockScroll:n=!1,...o}=t;return Er(()=>{var a,i;if(!n||document.body.hasAttribute(Y5))return;document.body.setAttribute(Y5,"");const c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth;if(!/iP(hone|ad|od)|iOS/.test(CO()))return Object.assign(document.body.style,{overflow:"hidden",[c]:u+"px"}),()=>{document.body.removeAttribute(Y5),Object.assign(document.body.style,{overflow:"",[c]:""})};const p=((a=window.visualViewport)==null?void 0:a.offsetLeft)||0,h=((i=window.visualViewport)==null?void 0:i.offsetTop)||0,v=window.pageXOffset,_=window.pageYOffset;return Object.assign(document.body.style,{position:"fixed",overflow:"hidden",top:-(_-Math.floor(h))+"px",left:-(v-Math.floor(p))+"px",right:"0",[c]:u+"px"}),()=>{Object.assign(document.body.style,{position:"",overflow:"",top:"",left:"",right:"",[c]:""}),document.body.removeAttribute(Y5),window.scrollTo(v,_)}},[n]),g.createElement("div",Kp({ref:r},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function JM(e){return Lc(e.target)&&e.target.tagName==="BUTTON"}function eA(e){return $W(e)}const iLe=function(e,t){let{open:r,onOpenChange:n,dataRef:o,elements:{domReference:a}}=e,{enabled:i=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t===void 0?{}:t;const p=g.useRef();return g.useMemo(()=>i?{reference:{onPointerDown(h){p.current=h.pointerType},onMouseDown(h){h.button===0&&(k7(p.current,!0)&&c||s!=="click"&&(r?l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")&&n(!1):(h.preventDefault(),n(!0)),o.current.openEvent=h.nativeEvent))},onClick(h){if(!o.current.__syncReturnFocus){if(s==="mousedown"&&p.current){p.current=void 0;return}k7(p.current,!0)&&c||(r?l&&(!o.current.openEvent||o.current.openEvent.type==="click")&&n(!1):n(!0),o.current.openEvent=h.nativeEvent)}},onKeyDown(h){p.current=void 0,u&&(JM(h)||(h.key===" "&&!eA(a)&&h.preventDefault(),h.key==="Enter"&&(r?l&&n(!1):n(!0))))},onKeyUp(h){u&&(JM(h)||eA(a)||h.key===" "&&(r?l&&n(!1):n(!0)))}}}:{},[i,o,s,c,u,a,l,r,n])};function uy(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}const sLe={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},lLe={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},cLe=function(e){var t,r;return e===void 0&&(e=!0),{escapeKeyBubbles:typeof e=="boolean"?e:(t=e.escapeKey)!=null?t:!0,outsidePressBubbles:typeof e=="boolean"?e:(r=e.outsidePress)!=null?r:!0}},uLe=function(e,t){let{open:r,onOpenChange:n,events:o,nodeId:a,elements:{reference:i,domReference:s,floating:l},dataRef:c}=e,{enabled:u=!0,escapeKey:p=!0,outsidePress:h=!0,outsidePressEvent:v="pointerdown",referencePress:_=!1,referencePressEvent:w="pointerdown",ancestorScroll:y=!1,bubbles:m=!0}=t===void 0?{}:t;const f=Jc(),b=gf()!=null,d=vf(typeof h=="function"?h:()=>!1),x=typeof h=="function"?d:h,E=g.useRef(!1),{escapeKeyBubbles:C,outsidePressBubbles:k}=cLe(m);return g.useEffect(()=>{if(!r||!u)return;c.current.__escapeKeyBubbles=C,c.current.__outsidePressBubbles=k;function S(L){if(L.key==="Escape"){const D=f?rp(f.nodesRef.current,a):[];if(D.length>0){let B=!0;if(D.forEach(V=>{var q;if((q=V.context)!=null&&q.open&&!V.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1)}}function R(L){const D=E.current;if(E.current=!1,D||typeof x=="function"&&!x(L))return;const B=Fw(L);if(Lc(B)&&l){const z=l.ownerDocument.defaultView||window,F=B.scrollWidth>B.clientWidth,$=B.scrollHeight>B.clientHeight;let W=$&&L.offsetX>B.clientWidth;if($&&z.getComputedStyle(B).direction==="rtl"&&(W=L.offsetX<=B.offsetWidth-B.clientWidth),W||F&&L.offsetY>B.clientHeight)return}const V=f&&rp(f.nodesRef.current,a).some(z=>{var F;return uy(L,(F=z.context)==null?void 0:F.elements.floating)});if(uy(L,l)||uy(L,s)||V)return;const q=f?rp(f.nodesRef.current,a):[];if(q.length>0){let z=!0;if(q.forEach(F=>{var $;if(($=F.context)!=null&&$.open&&!F.context.dataRef.current.__outsidePressBubbles){z=!1;return}}),!z)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:AW(L)||jW(L)}}),n(!1)}function T(){n(!1)}const P=Yn(l);p&&P.addEventListener("keydown",S),x&&P.addEventListener(v,R);let j=[];return y&&(Ho(s)&&(j=Js(s)),Ho(l)&&(j=j.concat(Js(l))),!Ho(i)&&i&&i.contextElement&&(j=j.concat(Js(i.contextElement)))),j=j.filter(L=>{var D;return L!==((D=P.defaultView)==null?void 0:D.visualViewport)}),j.forEach(L=>{L.addEventListener("scroll",T,{passive:!0})}),()=>{p&&P.removeEventListener("keydown",S),x&&P.removeEventListener(v,R),j.forEach(L=>{L.removeEventListener("scroll",T)})}},[c,l,s,i,p,x,v,o,f,a,r,n,y,u,C,k,b]),g.useEffect(()=>{E.current=!1},[x,v]),g.useMemo(()=>u?{reference:{[sLe[w]]:()=>{_&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1))}},floating:{[lLe[v]]:()=>{E.current=!0}}}:{},[u,o,_,v,w,n])},dLe=function(e,t){let{open:r,onOpenChange:n,dataRef:o,events:a,refs:i,elements:{floating:s,domReference:l}}=e,{enabled:c=!0,keyboardOnly:u=!0}=t===void 0?{}:t;const p=g.useRef(""),h=g.useRef(!1),v=g.useRef();return g.useEffect(()=>{if(!c)return;const w=Yn(s).defaultView||window;function y(){!r&&Lc(l)&&l===Nc(Yn(l))&&(h.current=!0)}return w.addEventListener("blur",y),()=>{w.removeEventListener("blur",y)}},[s,l,r,c]),g.useEffect(()=>{if(!c)return;function _(w){(w.type==="referencePress"||w.type==="escapeKey")&&(h.current=!0)}return a.on("dismiss",_),()=>{a.off("dismiss",_)}},[a,c]),g.useEffect(()=>()=>{clearTimeout(v.current)},[]),g.useMemo(()=>c?{reference:{onPointerDown(_){let{pointerType:w}=_;p.current=w,h.current=!!(w&&u)},onMouseLeave(){h.current=!1},onFocus(_){var w;h.current||_.type==="focus"&&((w=o.current.openEvent)==null?void 0:w.type)==="mousedown"&&o.current.openEvent&&uy(o.current.openEvent,l)||(o.current.openEvent=_.nativeEvent,n(!0))},onBlur(_){h.current=!1;const w=_.relatedTarget,y=Ho(w)&&w.hasAttribute("data-floating-ui-focus-guard")&&w.getAttribute("data-type")==="outside";v.current=setTimeout(()=>{Un(i.floating.current,w)||Un(l,w)||y||n(!1)})}}}:{},[c,u,l,i,o,n])};let tA=!1;const SO="ArrowUp",zw="ArrowDown",Yd="ArrowLeft",A1="ArrowRight";function X5(e,t,r){return Math.floor(e/t)!==r}function f0(e,t){return t<0||t>=e.current.length}function mn(e,t){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:o,amount:a=1}=t===void 0?{}:t;const i=e.current;let s=r;do{var l,c;s=s+(n?-a:a)}while(s>=0&&s<=i.length-1&&(o?o.includes(s):i[s]==null||(l=i[s])!=null&&l.hasAttribute("disabled")||((c=i[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function Bw(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function rA(e,t){return Bw(t,e===SO||e===zw,e===Yd||e===A1)}function px(e,t,r){return Bw(t,e===zw,r?e===Yd:e===A1)||e==="Enter"||e==" "||e===""}function fLe(e,t,r){return Bw(t,r?e===Yd:e===A1,e===zw)}function hLe(e,t,r){return Bw(t,r?e===A1:e===Yd,e===SO)}function mx(e,t){return mn(e,{disabledIndices:t})}function nA(e,t){return mn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}const pLe=function(e,t){let{open:r,onOpenChange:n,refs:o,elements:{domReference:a}}=e,{listRef:i,activeIndex:s,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:p=!1,loop:h=!1,nested:v=!1,rtl:_=!1,virtual:w=!1,focusItemOnOpen:y="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:f=!0,disabledIndices:b=void 0,orientation:d="vertical",cols:x=1,scrollItemIntoView:E=!0}=t===void 0?{listRef:{current:[]},activeIndex:null,onNavigate:()=>{}}:t;const C=gf(),k=Jc(),S=vf(l),R=g.useRef(y),T=g.useRef(u??-1),P=g.useRef(null),j=g.useRef(!0),L=g.useRef(S),D=g.useRef(r),B=g.useRef(!1),V=g.useRef(!1),q=Uo(b),z=Uo(r),F=Uo(E),[$,W]=g.useState(),G=g.useCallback(function(U,J,oe){oe===void 0&&(oe=!1);const ee=U.current[J.current];w?W(ee==null?void 0:ee.id):ws(ee,{preventScroll:!0,sync:IW()&&e9()?tA||B.current:!1}),requestAnimationFrame(()=>{const ie=F.current;ie&&ee&&(oe||!j.current)&&(ee.scrollIntoView==null||ee.scrollIntoView(typeof ie=="boolean"?{block:"nearest",inline:"nearest"}:ie))})},[w,F]);Er(()=>{document.createElement("div").focus({get preventScroll(){return tA=!0,!1}})},[]),Er(()=>{c&&(r?R.current&&u!=null&&(V.current=!0,S(u)):D.current&&(T.current=-1,L.current(null)))},[c,r,u,S]),Er(()=>{if(c&&r)if(s==null){if(B.current=!1,u!=null)return;D.current&&(T.current=-1,G(i,T)),!D.current&&R.current&&(P.current!=null||R.current===!0&&P.current==null)&&(T.current=P.current==null||px(P.current,d,_)||v?mx(i,q.current):nA(i,q.current),S(T.current))}else f0(i,s)||(T.current=s,G(i,T,V.current),V.current=!1)},[c,r,s,u,v,i,d,_,S,G,q]),Er(()=>{if(c&&D.current&&!r){var U,J;const oe=k==null||(U=k.nodesRef.current.find(ee=>ee.id===C))==null||(J=U.context)==null?void 0:J.elements.floating;oe&&!Un(oe,Nc(Yn(oe)))&&oe.focus({preventScroll:!0})}},[c,r,k,C]),Er(()=>{P.current=null,L.current=S,D.current=r});const Q=s!=null,Z=g.useMemo(()=>{function U(oe){if(!r)return;const ee=i.current.indexOf(oe);ee!==-1&&S(ee)}return{onFocus(oe){let{currentTarget:ee}=oe;U(ee)},onClick:oe=>{let{currentTarget:ee}=oe;return ee.focus({preventScroll:!0})},...m&&{onMouseMove(oe){let{currentTarget:ee}=oe;U(ee)},onPointerLeave(){if(j.current&&(T.current=-1,G(i,T),Xo.flushSync(()=>S(null)),!w)){var oe;(oe=o.floating.current)==null||oe.focus({preventScroll:!0})}}}}},[r,o,G,m,i,S,w]);return g.useMemo(()=>{if(!c)return{};const U=q.current;function J(ce){if(j.current=!1,B.current=!0,!z.current&&ce.currentTarget===o.floating.current)return;if(v&&hLe(ce.key,d,_)){No(ce),n(!1),Lc(a)&&a.focus();return}const ye=T.current,Ce=mx(i,U),Se=nA(i,U);if(ce.key==="Home"&&(T.current=Ce,S(T.current)),ce.key==="End"&&(T.current=Se,S(T.current)),x>1){const Re=T.current;if(ce.key===SO){if(No(ce),Re===-1)T.current=Se;else if(T.current=mn(i,{startingIndex:Re,amount:x,decrement:!0,disabledIndices:U}),h&&(Re-xTe?pe:pe-x}f0(i,T.current)&&(T.current=Re),S(T.current)}if(ce.key===zw&&(No(ce),Re===-1?T.current=Ce:(T.current=mn(i,{startingIndex:Re,amount:x,disabledIndices:U}),h&&Re+x>Se&&(T.current=mn(i,{startingIndex:Re%x-x,amount:x,disabledIndices:U}))),f0(i,T.current)&&(T.current=Re),S(T.current)),d==="both"){const Te=Math.floor(Re/x);ce.key===A1&&(No(ce),Re%x!==x-1?(T.current=mn(i,{startingIndex:Re,disabledIndices:U}),h&&X5(T.current,x,Te)&&(T.current=mn(i,{startingIndex:Re-Re%x-1,disabledIndices:U}))):h&&(T.current=mn(i,{startingIndex:Re-Re%x-1,disabledIndices:U})),X5(T.current,x,Te)&&(T.current=Re)),ce.key===Yd&&(No(ce),Re%x!==0?(T.current=mn(i,{startingIndex:Re,disabledIndices:U,decrement:!0}),h&&X5(T.current,x,Te)&&(T.current=mn(i,{startingIndex:Re+(x-Re%x),decrement:!0,disabledIndices:U}))):h&&(T.current=mn(i,{startingIndex:Re+(x-Re%x),decrement:!0,disabledIndices:U})),X5(T.current,x,Te)&&(T.current=Re));const je=Math.floor(Se/x)===Te;f0(i,T.current)&&(h&&je?T.current=ce.key===Yd?Se:mn(i,{startingIndex:Re-Re%x-1,disabledIndices:U}):T.current=Re),S(T.current);return}}if(rA(ce.key,d)){if(No(ce),r&&!w&&Nc(ce.currentTarget.ownerDocument)===ce.currentTarget){T.current=px(ce.key,d,_)?Ce:Se,S(T.current);return}px(ce.key,d,_)?h?T.current=ye>=Se?p&&ye!==i.current.length?-1:Ce:mn(i,{startingIndex:ye,disabledIndices:U}):T.current=Math.min(Se,mn(i,{startingIndex:ye,disabledIndices:U})):h?T.current=ye<=Ce?p&&ye!==-1?i.current.length:Se:mn(i,{startingIndex:ye,decrement:!0,disabledIndices:U}):T.current=Math.max(Ce,mn(i,{startingIndex:ye,decrement:!0,disabledIndices:U})),f0(i,T.current)?S(null):S(T.current)}}function oe(ce){y==="auto"&&AW(ce.nativeEvent)&&(R.current=!0)}function ee(ce){R.current=y,y==="auto"&&jW(ce.nativeEvent)&&(R.current=!0)}const ie=w&&r&&Q&&{"aria-activedescendant":$};return{reference:{...ie,onKeyDown(ce){j.current=!1;const ye=ce.key.indexOf("Arrow")===0;if(w&&r)return J(ce);if(!r&&!f&&ye)return;if((ye||ce.key==="Enter"||ce.key===" "||ce.key==="")&&(P.current=ce.key),v){fLe(ce.key,d,_)&&(No(ce),r?(T.current=mx(i,U),S(T.current)):n(!0));return}rA(ce.key,d)&&(u!=null&&(T.current=u),No(ce),!r&&f?n(!0):J(ce),r&&S(T.current))},onFocus(){r&&S(null)},onPointerDown:ee,onMouseDown:oe,onClick:oe},floating:{"aria-orientation":d==="both"?void 0:d,...ie,onKeyDown:J,onPointerMove(){j.current=!0}},item:Z}},[a,o,$,q,z,i,c,d,_,w,r,Q,v,u,f,p,x,h,y,S,n,Z])};function mLe(e){return g.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})},e)}const gLe=function(e,t){let{open:r}=e,{enabled:n=!0,role:o="dialog"}=t===void 0?{}:t;const a=Gp(),i=Gp();return g.useMemo(()=>{const s={id:a,role:o};return n?o==="tooltip"?{reference:{"aria-describedby":r?a:void 0},floating:s}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":r?a:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:i}},floating:{...s,...o==="menu"&&{"aria-labelledby":i}}}:{}},[n,o,r,a,i])},oA=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r?"-":"")+t.toLowerCase());function vLe(e,t){const[r,n]=g.useState(e);return e&&!r&&n(!0),g.useEffect(()=>{if(!e){const o=setTimeout(()=>n(!1),t);return()=>clearTimeout(o)}},[e,t]),r}function UW(e,t){let{open:r,elements:{floating:n}}=e,{duration:o=250}=t===void 0?{}:t;const i=(typeof o=="number"?o:o.close)||0,[s,l]=g.useState(!1),[c,u]=g.useState("unmounted"),p=vLe(r,i);return Er(()=>{s&&!p&&u("unmounted")},[s,p]),Er(()=>{if(n)if(r){u("initial");const h=requestAnimationFrame(()=>{u("open")});return()=>{cancelAnimationFrame(h)}}else l(!0),u("close")},[r,n]),{isMounted:p,status:c}}function bLe(e,t){let{initial:r={opacity:0},open:n,close:o,common:a,duration:i=250}=t===void 0?{}:t;const s=e.placement,l=s.split("-")[0],[c,u]=g.useState({}),{isMounted:p,status:h}=UW(e,{duration:i}),v=Uo(r),_=Uo(n),w=Uo(o),y=Uo(a),m=typeof i=="number",f=(m?i:i.open)||0,b=(m?i:i.close)||0;return Er(()=>{const d={side:l,placement:s},x=v.current,E=w.current,C=_.current,k=y.current,S=typeof x=="function"?x(d):x,R=typeof E=="function"?E(d):E,T=typeof k=="function"?k(d):k,P=(typeof C=="function"?C(d):C)||Object.keys(S).reduce((j,L)=>(j[L]="",j),{});if((h==="initial"||h==="unmounted")&&u(j=>({transitionProperty:j.transitionProperty,...T,...S})),h==="open"&&u({transitionProperty:Object.keys(P).map(oA).join(","),transitionDuration:f+"ms",...T,...P}),h==="close"){const j=R||S;u({transitionProperty:Object.keys(j).map(oA).join(","),transitionDuration:b+"ms",...T,...j})}},[l,s,b,w,v,_,y,f,h]),{isMounted:p,styles:c}}const yLe=function(e,t){var r;let{open:n,dataRef:o,refs:a}=e,{listRef:i,activeIndex:s,onMatch:l=()=>{},enabled:c=!0,findMatch:u=null,resetMs:p=1e3,ignoreKeys:h=[],selectedIndex:v=null}=t===void 0?{listRef:{current:[]},activeIndex:null}:t;const _=g.useRef(),w=g.useRef(""),y=g.useRef((r=v??s)!=null?r:-1),m=g.useRef(null),f=vf(l),b=Uo(u),d=Uo(h);return Er(()=>{n&&(clearTimeout(_.current),m.current=null,w.current="")},[n]),Er(()=>{if(n&&w.current===""){var x;y.current=(x=v??s)!=null?x:-1}},[n,v,s]),g.useMemo(()=>{if(!c)return{};function x(E){var C;const k=Fw(E.nativeEvent);if(Ho(k)&&(Nc(Yn(k))!==E.currentTarget?(C=a.floating.current)!=null&&C.contains(k)&&k.closest('[role="dialog"],[role="menu"],[role="listbox"],[role="tree"],[role="grid"]')!==E.currentTarget:!E.currentTarget.contains(k)))return;w.current.length>0&&w.current[0]!==" "&&(o.current.typing=!0,E.key===" "&&No(E));const S=i.current;if(S==null||d.current.includes(E.key)||E.key.length!==1||E.ctrlKey||E.metaKey||E.altKey)return;S.every(D=>{var B,V;return D?((B=D[0])==null?void 0:B.toLocaleLowerCase())!==((V=D[1])==null?void 0:V.toLocaleLowerCase()):!0})&&w.current===E.key&&(w.current="",y.current=m.current),w.current+=E.key,clearTimeout(_.current),_.current=setTimeout(()=>{w.current="",y.current=m.current,o.current.typing=!1},p);const T=y.current,P=[...S.slice((T||0)+1),...S.slice(0,(T||0)+1)],j=b.current?b.current(P,w.current):P.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(w.current.toLocaleLowerCase()))===0),L=j?S.indexOf(j):-1;L!==-1&&(f(L),m.current=L)}return{reference:{onKeyDown:x},floating:{onKeyDown:x}}},[c,o,i,p,d,b,f,a])};function aA(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const wLe=e=>({name:"inner",options:e,async fn(t){const{listRef:r,overflowRef:n,onFallbackChange:o,offset:a=0,index:i=0,minItemsVisible:s=4,referenceOverflowThreshold:l=0,scrollRef:c,...u}=e,{rects:p,elements:{floating:h}}=t,v=r.current[i];if(!v)return{};const _={...t,...await bW(-v.offsetTop-p.reference.height/2-v.offsetHeight/2-a).fn(t)},w=(c==null?void 0:c.current)||h,y=await Wa(aA(_,w.scrollHeight),u),m=await Wa(_,{...u,elementContext:"reference"}),f=Math.max(0,y.top),b=_.y+f,d=Math.max(0,w.scrollHeight-f-Math.max(0,y.bottom));return w.style.maxHeight=d+"px",w.scrollTop=f,o&&(w.offsetHeight=-l||m.bottom>=-l?Xo.flushSync(()=>o(!0)):Xo.flushSync(()=>o(!1))),n&&(n.current=await Wa(aA({..._,y:b},w.offsetHeight),u)),{y:b}}}),xLe=(e,t)=>{let{open:r,elements:n}=e,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=t;const l=vf(s),c=g.useRef(!1),u=g.useRef(null),p=g.useRef(null);return g.useEffect(()=>{if(!o)return;function h(_){if(_.ctrlKey||!v||a.current==null)return;const w=_.deltaY,y=a.current.top>=-.5,m=a.current.bottom>=-.5,f=v.scrollHeight-v.clientHeight,b=w<0?-1:1,d=w<0?"max":"min";v.scrollHeight<=v.clientHeight||(!y&&w>0||!m&&w<0?(_.preventDefault(),Xo.flushSync(()=>{l(x=>x+Math[d](w,f*b))})):/firefox/i.test(MW())&&(v.scrollTop+=w))}const v=(i==null?void 0:i.current)||n.floating;if(r&&v)return v.addEventListener("wheel",h),requestAnimationFrame(()=>{u.current=v.scrollTop,a.current!=null&&(p.current={...a.current})}),()=>{u.current=null,p.current=null,v.removeEventListener("wheel",h)}},[o,r,n.floating,a,i,l]),g.useMemo(()=>o?{floating:{onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const h=(i==null?void 0:i.current)||n.floating;if(!(!a.current||!h||!c.current)){if(u.current!==null){const v=h.scrollTop-u.current;(a.current.bottom<-.5&&v<-1||a.current.top<-.5&&v>1)&&Xo.flushSync(()=>l(_=>_+v))}requestAnimationFrame(()=>{u.current=h.scrollTop})}}}}:{},[o,a,n.floating,i,l])};function _Le(e,t){const[r,n]=e;let o=!1;const a=t.length;for(let i=0,s=a-1;i=n!=p>=n&&r<=(u-l)*(n-c)/(p-c)+l&&(o=!o)}return o}function ELe(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function CLe(e){let{restMs:t=0,buffer:r=.5,blockPointerEvents:n=!1}=e===void 0?{}:e,o,a=!1,i=!1;const s=l=>{let{x:c,y:u,placement:p,elements:h,onClose:v,nodeId:_,tree:w}=l;return function(m){function f(){clearTimeout(o),v()}if(clearTimeout(o),!h.domReference||!h.floating||p==null||c==null||u==null)return;const{clientX:b,clientY:d}=m,x=[b,d],E=Fw(m),C=m.type==="mouseleave",k=Un(h.floating,E),S=Un(h.domReference,E),R=h.domReference.getBoundingClientRect(),T=h.floating.getBoundingClientRect(),P=p.split("-")[0],j=c>T.right-T.width/2,L=u>T.bottom-T.height/2,D=ELe(x,R);if(k&&(i=!0,!C))return;if(S&&(i=!1),S&&!C){i=!0;return}if(C&&Ho(m.relatedTarget)&&Un(h.floating,m.relatedTarget)||w&&rp(w.nodesRef.current,_).some(z=>{let{context:F}=z;return F==null?void 0:F.open}))return;if(P==="top"&&u>=R.bottom-1||P==="bottom"&&u<=R.top+1||P==="left"&&c>=R.right-1||P==="right"&&c<=R.left+1)return f();let B=[];switch(P){case"top":B=[[T.left,R.top+1],[T.left,T.bottom-1],[T.right,T.bottom-1],[T.right,R.top+1]],a=b>=T.left&&b<=T.right&&d>=T.top&&d<=R.top+1;break;case"bottom":B=[[T.left,T.top+1],[T.left,R.bottom-1],[T.right,R.bottom-1],[T.right,T.top+1]],a=b>=T.left&&b<=T.right&&d>=R.bottom-1&&d<=T.bottom;break;case"left":B=[[T.right-1,T.bottom],[T.right-1,T.top],[R.left+1,T.top],[R.left+1,T.bottom]],a=b>=T.left&&b<=R.left+1&&d>=T.top&&d<=T.bottom;break;case"right":B=[[R.right-1,T.bottom],[R.right-1,T.top],[T.left+1,T.top],[T.left+1,T.bottom]],a=b>=R.right-1&&b<=T.right&&d>=T.top&&d<=T.bottom;break}function V(z){let[F,$]=z;const W=T.width>R.width,G=T.height>R.height;switch(P){case"top":{const Q=[W?F+r/2:j?F+r*4:F-r*4,$+r+1],Z=[W?F-r/2:j?F+r*4:F-r*4,$+r+1],U=[[T.left,j||W?T.bottom-r:T.top],[T.right,j?W?T.bottom-r:T.top:T.bottom-r]];return[Q,Z,...U]}case"bottom":{const Q=[W?F+r/2:j?F+r*4:F-r*4,$-r],Z=[W?F-r/2:j?F+r*4:F-r*4,$-r],U=[[T.left,j||W?T.top+r:T.bottom],[T.right,j?W?T.top+r:T.bottom:T.top+r]];return[Q,Z,...U]}case"left":{const Q=[F+r+1,G?$+r/2:L?$+r*4:$-r*4],Z=[F+r+1,G?$-r/2:L?$+r*4:$-r*4];return[...[[L||G?T.right-r:T.left,T.top],[L?G?T.right-r:T.left:T.right-r,T.bottom]],Q,Z]}case"right":{const Q=[F-r,G?$+r/2:L?$+r*4:$-r*4],Z=[F-r,G?$-r/2:L?$+r*4:$-r*4],U=[[L||G?T.left+r:T.right,T.top],[L?G?T.left+r:T.right:T.left+r,T.bottom]];return[Q,Z,...U]}}}const q=a?B:V([c,u]);if(!a){if(i&&!D)return f();_Le([b,d],q)?t&&!i&&(o=setTimeout(f,t)):f()}}};return s.__options={blockPointerEvents:n},s}function OLe(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:r,nodeId:n}=e,o=DIe(e),a=Jc(),i=g.useRef(null),s=g.useRef({}),l=g.useState(()=>SW())[0],[c,u]=g.useState(null),p=g.useCallback(m=>{const f=Ho(m)?{getBoundingClientRect:()=>m.getBoundingClientRect(),contextElement:m}:m;o.refs.setReference(f)},[o.refs]),h=g.useCallback(m=>{(Ho(m)||m===null)&&(i.current=m,u(m)),(Ho(o.refs.reference.current)||o.refs.reference.current===null||m!==null&&!Ho(m))&&o.refs.setReference(m)},[o.refs]),v=g.useMemo(()=>({...o.refs,setReference:h,setPositionReference:p,domReference:i}),[o.refs,h,p]),_=g.useMemo(()=>({...o.elements,domReference:c}),[o.elements,c]),w=vf(r),y=g.useMemo(()=>({...o,refs:v,elements:_,dataRef:s,nodeId:n,events:l,open:t,onOpenChange:w}),[o,n,l,t,w,v,_]);return Er(()=>{const m=a==null?void 0:a.nodesRef.current.find(f=>f.id===n);m&&(m.context=y)}),g.useMemo(()=>({...o,context:y,refs:v,reference:h,positionReference:p}),[o,v,y,h,p])}function gx(e,t,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[r]:null).concat(e).reduce((o,a)=>(a&&Object.entries(a).forEach(i=>{let[s,l]=i;if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof l=="function"){var c;(c=n.get(s))==null||c.push(l),o[s]=function(){for(var u,p=arguments.length,h=new Array(p),v=0;v_(...h))}}}else o[s]=l}),o),{})}}const kLe=function(e){e===void 0&&(e=[]);const t=e,r=g.useCallback(a=>gx(a,e,"reference"),t),n=g.useCallback(a=>gx(a,e,"floating"),t),o=g.useCallback(a=>gx(a,e,"item"),e.map(a=>a==null?void 0:a.item));return g.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])},RLe=Object.freeze(Object.defineProperty({__proto__:null,FloatingDelayGroup:GIe,FloatingFocusManager:oLe,FloatingNode:HIe,FloatingOverlay:aLe,FloatingPortal:rLe,FloatingTree:UIe,arrow:$Ie,autoPlacement:kIe,autoUpdate:NIe,computePosition:RW,detectOverflow:Wa,flip:RIe,getOverflowAncestors:Js,hide:SIe,inline:TIe,inner:wLe,limitShift:MIe,offset:bW,platform:kW,safePolygon:CLe,shift:PIe,size:AIe,useClick:iLe,useDelayGroup:KIe,useDelayGroupContext:NW,useDismiss:uLe,useFloating:OLe,useFloatingNodeId:VIe,useFloatingParentNodeId:gf,useFloatingPortalNode:VW,useFloatingTree:Jc,useFocus:dLe,useHover:qIe,useId:Gp,useInnerOffset:xLe,useInteractions:kLe,useListNavigation:pLe,useMergeRefs:mLe,useRole:gLe,useTransitionStatus:UW,useTransitionStyles:bLe,useTypeahead:yLe},Symbol.toStringTag,{value:"Module"})),qr=Wc(RLe);var WW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,w){for(var y in w)Object.defineProperty(_,y,{enumerable:!0,get:w[y]})}t(e,{DialogHeader:function(){return h},default:function(){return v}});var r=c(g),n=c(lt),o=Qe,a=c(Xe),i=Ke,s=pf;function l(){return l=Object.assign||function(_){for(var w=1;w=0)&&Object.prototype.propertyIsEnumerable.call(_,m)&&(y[m]=_[m])}return y}function p(_,w){if(_==null)return{};var y={},m=Object.keys(_),f,b;for(b=0;b=0)&&(y[f]=_[f]);return y}var h=r.default.forwardRef(function(_,w){var y=_.className,m=_.children,f=u(_,["className","children"]),b=(0,i.useTheme)().dialogHeader,d=b.defaultProps,x=b.styles.base;y=y??d.className;var E=(0,o.twMerge)((0,n.default)((0,a.default)(x)),y);return r.default.createElement("div",l({},f,{ref:w,className:E}),m)});h.propTypes={className:s.propTypesClassName,children:s.propTypesChildren},h.displayName="MaterialTailwind.DialogHeader";var v=h})(WW);var qW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(w,y){for(var m in y)Object.defineProperty(w,m,{enumerable:!0,get:y[m]})}t(e,{DialogBody:function(){return v},default:function(){return _}});var r=u(g),n=u(lt),o=Qe,a=u(Xe),i=Ke,s=pf;function l(w,y,m){return y in w?Object.defineProperty(w,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):w[y]=m,w}function c(){return c=Object.assign||function(w){for(var y=1;y=0)&&Object.prototype.propertyIsEnumerable.call(w,f)&&(m[f]=w[f])}return m}function h(w,y){if(w==null)return{};var m={},f=Object.keys(w),b,d;for(d=0;d=0)&&(m[b]=w[b]);return m}var v=r.default.forwardRef(function(w,y){var m=w.divider,f=w.className,b=w.children,d=p(w,["divider","className","children"]),x=(0,i.useTheme)().dialogBody,E=x.defaultProps,C=x.styles.base;f=f??E.className;var k=(0,o.twMerge)((0,n.default)((0,a.default)(C.initial),l({},(0,a.default)(C.divider),m)),f);return r.default.createElement("div",c({},d,{ref:y,className:k}),b)});v.propTypes={divider:s.propTypesDivider,className:s.propTypesClassName,children:s.propTypesChildren},v.displayName="MaterialTailwind.DialogBody";var _=v})(qW);var GW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,w){for(var y in w)Object.defineProperty(_,y,{enumerable:!0,get:w[y]})}t(e,{DialogFooter:function(){return h},default:function(){return v}});var r=c(g),n=c(lt),o=Qe,a=c(Xe),i=Ke,s=pf;function l(){return l=Object.assign||function(_){for(var w=1;w=0)&&Object.prototype.propertyIsEnumerable.call(_,m)&&(y[m]=_[m])}return y}function p(_,w){if(_==null)return{};var y={},m=Object.keys(_),f,b;for(b=0;b=0)&&(y[f]=_[f]);return y}var h=r.default.forwardRef(function(_,w){var y=_.className,m=_.children,f=u(_,["className","children"]),b=(0,i.useTheme)().dialogFooter,d=b.defaultProps,x=b.styles.base;y=y??d.className;var E=(0,o.twMerge)((0,n.default)((0,a.default)(x)),y);return r.default.createElement("div",l({},f,{ref:w,className:E}),m)});h.propTypes={className:s.propTypesClassName,children:s.propTypesChildren},h.displayName="MaterialTailwind.DialogFooter";var v=h})(GW);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(R,T){for(var P in T)Object.defineProperty(R,P,{enumerable:!0,get:T[P]})}t(e,{Dialog:function(){return k},DialogHeader:function(){return v.DialogHeader},DialogBody:function(){return _.DialogBody},DialogFooter:function(){return w.DialogFooter},default:function(){return S}});var r=f(g),n=f(Je),o=qr,a=tn,i=f(lt),s=f(un),l=Qe,c=f(yr),u=f(Xe),p=Ke,h=pf,v=WW,_=qW,w=GW;function y(R,T,P){return T in R?Object.defineProperty(R,T,{value:P,enumerable:!0,configurable:!0,writable:!0}):R[T]=P,R}function m(){return m=Object.assign||function(R){for(var T=1;T=0)&&Object.prototype.propertyIsEnumerable.call(R,j)&&(P[j]=R[j])}return P}function C(R,T){if(R==null)return{};var P={},j=Object.keys(R),L,D;for(D=0;D=0)&&(P[L]=R[L]);return P}var k=r.default.forwardRef(function(R,T){var P=R.open,j=R.handler,L=R.size,D=R.dismiss,B=R.animate,V=R.className,q=R.children,z=E(R,["open","handler","size","dismiss","animate","className","children"]),F=(0,p.useTheme)().dialog,$=F.defaultProps,W=F.valid,G=F.styles,Q=G.base,Z=G.sizes;j=j??void 0,L=L??$.size,D=D??$.dismiss,B=B??$.animate,V=V??$.className;var U=(0,i.default)((0,u.default)(Q.backdrop)),J=(0,l.twMerge)((0,i.default)((0,u.default)(Q.container),(0,u.default)(Z[(0,c.default)(W.sizes,L,"md")])),V),oe={unmount:{opacity:0,y:-50,transition:{duration:.3}},mount:{opacity:1,y:0,transition:{duration:.3}}},ee={unmount:{opacity:0,transition:{delay:.2}},mount:{opacity:1}},ie=(0,s.default)(oe,B),ce=(0,o.useFloating)({open:P,onOpenChange:j}),ye=ce.floating,Ce=ce.context,Se=(0,o.useId)(),Re="".concat(Se,"-label"),Te="".concat(Se,"-description"),je=(0,o.useInteractions)([(0,o.useClick)(Ce),(0,o.useRole)(Ce),(0,o.useDismiss)(Ce,D)]).getFloatingProps,pe=(0,o.useMergeRefs)([T,ye]),ve=a.AnimatePresence;return r.default.createElement(a.LazyMotion,{features:a.domAnimation},r.default.createElement(o.FloatingPortal,null,r.default.createElement(ve,null,P&&r.default.createElement(o.FloatingOverlay,{style:{zIndex:9999},lockScroll:!0},r.default.createElement(o.FloatingFocusManager,{context:Ce},r.default.createElement(a.m.div,{className:L==="xxl"?"":U,initial:"unmount",exit:"unmount",animate:P?"mount":"unmount",variants:ee,transition:{duration:.2}},r.default.createElement(a.m.div,m({},je(x(b({},z),{ref:pe,className:J,"aria-labelledby":Re,"aria-describedby":Te})),{initial:"unmount",exit:"unmount",animate:P?"mount":"unmount",variants:ie}),q)))))))});k.propTypes={open:h.propTypesOpen,handler:h.propTypesHandler,size:n.default.oneOf(h.propTypesSize),dismiss:h.propTypesDismiss,animate:h.propTypesAnimate,className:h.propTypesClassName,children:h.propTypesChildren},k.displayName="MaterialTailwind.Dialog";var S=Object.assign(k,{Header:v.DialogHeader,Body:_.DialogBody,Footer:w.DialogFooter})})(uW);var KW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(y,m){for(var f in m)Object.defineProperty(y,f,{enumerable:!0,get:m[f]})}t(e,{Input:function(){return _},default:function(){return w}});var r=p(g),n=p(Je),o=p(lt),a=p(yr),i=p(Xe),s=Ke,l=C1;function c(y,m,f){return m in y?Object.defineProperty(y,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):y[m]=f,y}function u(){return u=Object.assign||function(y){for(var m=1;m=0)&&Object.prototype.propertyIsEnumerable.call(y,b)&&(f[b]=y[b])}return f}function v(y,m){if(y==null)return{};var f={},b=Object.keys(y),d,x;for(x=0;x=0)&&(f[d]=y[d]);return f}var _=r.default.forwardRef(function(y,m){var f=y.variant,b=y.color,d=y.size,x=y.label,E=y.error,C=y.success,k=y.icon,S=y.containerProps,R=y.labelProps,T=y.className,P=y.shrink,j=y.inputRef,L=h(y,["variant","color","size","label","error","success","icon","containerProps","labelProps","className","shrink","inputRef"]),D=(0,s.useTheme)().input,B=D.defaultProps,V=D.valid,q=D.styles,z=q.base,F=q.variants;f=f??B.variant,d=d??B.size,b=b??B.color,x=x??B.label,R=R??B.labelProps,S=S??B.containerProps,T=T??B.className,P=P??B.shrink,k=k??B.icon;var $=F[(0,a.default)(V.variants,f,"outlined")],W=$.sizes[(0,a.default)(V.sizes,d,"md")],G=(0,i.default)($.error.input),Q=(0,i.default)($.success.input),Z=(0,i.default)($.shrink.input),U=(0,i.default)($.colors.input[(0,a.default)(V.colors,b,"blue")]),J=(0,i.default)($.error.label),oe=(0,i.default)($.success.label),ee=(0,i.default)($.shrink.label),ie=(0,i.default)($.colors.label[(0,a.default)(V.colors,b,"blue")]),ce=(0,o.default)((0,i.default)(z.container),(0,i.default)(W.container),S==null?void 0:S.className),ye=(0,o.default)((0,i.default)(z.input),(0,i.default)($.base.input),(0,i.default)(W.input),c({},(0,i.default)($.base.inputWithIcon),k),c({},U,!E&&!C),c({},G,E),c({},Q,C),c({},Z,P),T),Ce=(0,o.default)((0,i.default)(z.label),(0,i.default)($.base.label),(0,i.default)(W.label),c({},ie,!E&&!C),c({},J,E),c({},oe,C),c({},ee,P),R==null?void 0:R.className),Se=(0,o.default)((0,i.default)(z.icon),(0,i.default)($.base.icon),(0,i.default)(W.icon)),Re=(0,o.default)((0,i.default)(z.asterisk));return r.default.createElement("div",u({},S,{ref:m,className:ce}),k&&r.default.createElement("div",{className:Se},k),r.default.createElement("input",u({},L,{ref:j,className:ye,placeholder:(L==null?void 0:L.placeholder)||" "})),r.default.createElement("label",u({},R,{className:Ce}),x," ",L.required?r.default.createElement("span",{className:Re},"*"):""))});_.propTypes={variant:n.default.oneOf(l.propTypesVariant),size:n.default.oneOf(l.propTypesSize),color:n.default.oneOf(l.propTypesColor),label:l.propTypesLabel,error:l.propTypesError,success:l.propTypesSuccess,icon:l.propTypesIcon,labelProps:l.propTypesLabelProps,containerProps:l.propTypesContainerProps,shrink:l.propTypesShrink,className:l.propTypesClassName},_.displayName="MaterialTailwind.Input";var w=_})(KW);var YW={},j1={},bf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,x){for(var E in x)Object.defineProperty(d,E,{enumerable:!0,get:x[E]})}t(e,{propTypesOpen:function(){return c},propTypesHandler:function(){return u},propTypesPlacement:function(){return p},propTypesOffset:function(){return h},propTypesDismiss:function(){return v},propTypesAnimate:function(){return _},propTypesLockScroll:function(){return w},propTypesDisabled:function(){return y},propTypesClassName:function(){return m},propTypesChildren:function(){return f},propTypesContextValue:function(){return b}});var r=a(Je),n=cr;function o(d,x,E){return x in d?Object.defineProperty(d,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):d[x]=E,d}function a(d){return d&&d.__esModule?d:{default:d}}function i(d){for(var x=1;xf.length)&&(b=f.length);for(var d=0,x=new Array(b);d=0)&&Object.prototype.propertyIsEnumerable.call(w,f)&&(m[f]=w[f])}return m}function h(w,y){if(w==null)return{};var m={},f=Object.keys(w),b,d;for(d=0;d=0)&&(m[b]=w[b]);return m}var v=r.default.forwardRef(function(w,y){var m=w.children,f=p(w,["children"]),b=(0,o.useMenu)(),d=b.getReferenceProps,x=b.reference,E=b.nested,C=(0,n.useMergeRefs)([y,x]);return r.default.cloneElement(m,l({},d(l(u(l({},f),{ref:C,onClick:function(S){S.stopPropagation()}}),E&&{role:"menuitem"}))))});v.propTypes={children:a.propTypesChildren},v.displayName="MaterialTailwind.MenuHandler";var _=v})(ZW);var QW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(m,f){for(var b in f)Object.defineProperty(m,b,{enumerable:!0,get:f[b]})}t(e,{MenuList:function(){return w},default:function(){return y}});var r=h(g),n=qr,o=tn,a=h(lt),i=Qe,s=h(Xe),l=Ke,c=j1,u=bf;function p(){return p=Object.assign||function(m){for(var f=1;f=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=r.default.forwardRef(function(m,f){var b=m.children,d=m.className,x=v(m,["children","className"]),E=(0,l.useTheme)().menu,C=E.styles.base,k=(0,c.useMenu)(),S=k.open,R=k.handler,T=k.strategy,P=k.x,j=k.y,L=k.floating,D=k.listItemsRef,B=k.getFloatingProps,V=k.getItemProps,q=k.appliedAnimation,z=k.lockScroll,F=k.context,$=k.activeIndex,W=k.tree,G=k.allowHover,Q=k.internalAllowHover,Z=k.setActiveIndex,U=k.nested;d=d??"";var J=(0,i.twMerge)((0,a.default)((0,s.default)(C.menu)),d),oe=(0,n.useMergeRefs)([f,L]),ee=o.AnimatePresence,ie=r.default.createElement(o.m.div,p({},x,{ref:oe,style:{position:T,top:j??0,left:P??0},className:J},B({onKeyDown:function(ye){ye.key==="Tab"&&(R(!1),ye.shiftKey&&ye.preventDefault())}}),{initial:"unmount",exit:"unmount",animate:S?"mount":"unmount",variants:q}),r.default.Children.map(b,function(ce,ye){return r.default.isValidElement(ce)&&r.default.cloneElement(ce,V({tabIndex:$===ye?0:-1,role:"menuitem",className:ce.props.className,ref:function(Se){D.current[ye]=Se},onClick:function(Se){if(ce.props.onClick){var Re,Te;(Te=(Re=ce.props).onClick)===null||Te===void 0||Te.call(Re,Se)}W==null||W.events.emit("click")},onMouseEnter:function(){(G&&S||Q&&S)&&Z(ye)}}))}));return r.default.createElement(o.LazyMotion,{features:o.domAnimation},r.default.createElement(n.FloatingPortal,null,r.default.createElement(ee,null,S&&r.default.createElement(r.default.Fragment,null,z?r.default.createElement(n.FloatingOverlay,{lockScroll:!0},r.default.createElement(n.FloatingFocusManager,{context:F,modal:!U,initialFocus:U?-1:0,returnFocus:!U,visuallyHiddenDismiss:!0},ie)):r.default.createElement(n.FloatingFocusManager,{context:F,modal:!U,initialFocus:U?-1:0,returnFocus:!U,visuallyHiddenDismiss:!0},ie)))))});w.propTypes={className:u.propTypesClassName,children:u.propTypesChildren},w.displayName="MaterialTailwind.MenuList";var y=w})(QW);var JW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(w,y){for(var m in y)Object.defineProperty(w,m,{enumerable:!0,get:y[m]})}t(e,{MenuItem:function(){return v},default:function(){return _}});var r=u(g),n=u(lt),o=Qe,a=u(Xe),i=Ke,s=bf;function l(w,y,m){return y in w?Object.defineProperty(w,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):w[y]=m,w}function c(){return c=Object.assign||function(w){for(var y=1;y=0)&&Object.prototype.propertyIsEnumerable.call(w,f)&&(m[f]=w[f])}return m}function h(w,y){if(w==null)return{};var m={},f=Object.keys(w),b,d;for(d=0;d=0)&&(m[b]=w[b]);return m}var v=r.default.forwardRef(function(w,y){var m=w.className,f=m===void 0?"":m,b=w.disabled,d=b===void 0?!1:b,x=w.children,E=p(w,["className","disabled","children"]),C=(0,i.useTheme)().menu,k=C.styles.base,S=(0,o.twMerge)((0,n.default)((0,a.default)(k.item.initial),l({},(0,a.default)(k.item.disabled),d)),f);return r.default.createElement("button",c({},E,{ref:y,role:"menuitem",className:S}),x)});v.propTypes={className:s.propTypesClassName,disabled:s.propTypesDisabled,children:s.propTypesChildren},v.displayName="MaterialTailwind.MenuItem";var _=v})(JW);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,_){for(var w in _)Object.defineProperty(v,w,{enumerable:!0,get:_[w]})}t(e,{Menu:function(){return p},MenuHandler:function(){return i.MenuHandler},MenuList:function(){return s.MenuList},MenuItem:function(){return l.MenuItem},useMenu:function(){return o.useMenu},default:function(){return h}});var r=u(g),n=qr,o=j1,a=XW,i=ZW,s=QW,l=JW;function c(){return c=Object.assign||function(v){for(var _=1;_=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=r.default.forwardRef(function(m,f){var b=m.open,d=m.animate,x=m.className,E=m.children,C=v(m,["open","animate","className","children"]),k;console.error(` will be deprecated in the future versions of @material-tailwind/react use instead. - -More details: https://www.material-tailwind.com/docs/react/collapse - `);var S=r.default.useRef(null),R=(0,c.useTheme)().navbar,T=R.styles,P=T.base.mobileNav;d=d??{},x=x??"";var j=(0,s.twMerge)((0,i.default)((0,l.default)(P)),x),L={unmount:{height:0,opacity:0,transition:{duration:.3,times:"[0.4, 0, 0.2, 1]"}},mount:{opacity:1,height:"".concat((k=S.current)===null||k===void 0?void 0:k.scrollHeight,"px"),transition:{duration:.3,times:"[0.4, 0, 0.2, 1]"}}},D=(0,a.default)(L,d),B=n.AnimatePresence,V=(0,o.useMergeRefs)([f,S]);return r.default.createElement(n.LazyMotion,{features:n.domAnimation},r.default.createElement(B,null,r.default.createElement(n.m.div,p({},C,{ref:V,className:j,initial:"unmount",exit:"unmount",animate:b?"mount":"unmount",variants:D}),E)))});w.displayName="MaterialTailwind.MobileNav",w.propTypes={open:u.propTypesOpen,animate:u.propTypesAnimate,className:u.propTypesClassName,children:u.propTypesChildren};var y=w})(tq);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(f,b){for(var d in b)Object.defineProperty(f,d,{enumerable:!0,get:b[d]})}t(e,{Navbar:function(){return y},MobileNav:function(){return c.MobileNav},default:function(){return m}});var r=v(g),n=v(Je),o=v(lt),a=Qe,i=v(yr),s=v(Xe),l=Ke,c=tq,u=yw;function p(f,b,d){return b in f?Object.defineProperty(f,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):f[b]=d,f}function h(){return h=Object.assign||function(f){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(f,x)&&(d[x]=f[x])}return d}function w(f,b){if(f==null)return{};var d={},x=Object.keys(f),E,C;for(C=0;C=0)&&(d[E]=f[E]);return d}var y=r.default.forwardRef(function(f,b){var d=f.variant,x=f.color,E=f.shadow,C=f.blurred,k=f.fullWidth,S=f.className,R=f.children,T=_(f,["variant","color","shadow","blurred","fullWidth","className","children"]),P=(0,l.useTheme)().navbar,j=P.defaultProps,L=P.valid,D=P.styles,B=D.base,V=D.variants;d=d??j.variant,x=x??j.color,E=E??j.shadow,C=C??j.blurred,k=k??j.fullWidth,S=S??j.className;var q,z=(0,o.default)((0,s.default)(B.navbar.initial),(q={},p(q,(0,s.default)(B.navbar.shadow),E),p(q,(0,s.default)(B.navbar.blurred),C&&x==="white"),p(q,(0,s.default)(B.navbar.fullWidth),k),q)),F=(0,o.default)((0,s.default)(V[(0,i.default)(L.variants,d,"filled")][(0,i.default)(L.colors,x,"white")])),$=(0,a.twMerge)((0,o.default)(z,F),S);return r.default.createElement("nav",h({},T,{ref:b,className:$}),R)});y.propTypes={variant:n.default.oneOf(u.propTypesVariant),color:n.default.oneOf(u.propTypesColor),shadow:u.propTypesShadow,blurred:u.propTypesBlurred,fullWidth:u.propTypesFullWidth,className:u.propTypesClassName,children:u.propTypesChildren},y.displayName="MaterialTailwind.Navbar";var m=Object.assign(y,{MobileNav:c.MobileNav})})(eq);var rq={},Vw={},yf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(y,m){for(var f in m)Object.defineProperty(y,f,{enumerable:!0,get:m[f]})}t(e,{propTypesOpen:function(){return a},propTypesHandler:function(){return i},propTypesPlacement:function(){return s},propTypesOffset:function(){return l},propTypesDismiss:function(){return c},propTypesAnimate:function(){return u},propTypesContent:function(){return p},propTypesInteractive:function(){return h},propTypesClassName:function(){return v},propTypesChildren:function(){return _},propTypesContextValue:function(){return w}});var r=o(Je),n=cr;function o(y){return y&&y.__esModule?y:{default:y}}var a=r.default.bool,i=r.default.func,s=n.propTypesPlacements,l=n.propTypesOffsetType,c=n.propTypesDismissType,u=n.propTypesAnimation,p=r.default.node,h=r.default.bool,v=r.default.string,_=r.default.node.isRequired,w=r.default.shape({open:r.default.bool.isRequired,strategy:r.default.oneOf(["fixed","absolute"]).isRequired,x:r.default.number,y:r.default.number,context:r.default.instanceOf(Object).isRequired,reference:r.default.func.isRequired,floating:r.default.func.isRequired,getReferenceProps:r.default.func.isRequired,getFloatingProps:r.default.func.isRequired,appliedAnimation:u.isRequired,labelId:r.default.string.isRequired,descriptionId:r.default.string.isRequired}).isRequired})(yf);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,c){for(var u in c)Object.defineProperty(l,u,{enumerable:!0,get:c[u]})}t(e,{PopoverContext:function(){return a},usePopover:function(){return i},PopoverContextProvider:function(){return s}});var r=o(g),n=yf;function o(l){return l&&l.__esModule?l:{default:l}}var a=r.default.createContext(null);a.displayName="MaterialTailwind.PopoverContext";function i(){var l=r.default.useContext(a);if(!l)throw new Error("usePopover() must be used within a Popover. It happens when you use PopoverHandler or PopoverContent components outside the Popover component.");return l}var s=function(l){var c=l.value,u=l.children;return r.default.createElement(a.Provider,{value:c},u)};s.propTypes={value:n.propTypesContextValue,children:n.propTypesChildren},s.displayName="MaterialTailwind.PopoverContextProvider"})(Vw);var nq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(w,y){for(var m in y)Object.defineProperty(w,m,{enumerable:!0,get:y[m]})}t(e,{PopoverHandler:function(){return v},default:function(){return _}});var r=s(g),n=qr,o=Vw,a=yf;function i(w,y,m){return y in w?Object.defineProperty(w,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):w[y]=m,w}function s(w){return w&&w.__esModule?w:{default:w}}function l(w){for(var y=1;y=0)&&Object.prototype.propertyIsEnumerable.call(w,f)&&(m[f]=w[f])}return m}function h(w,y){if(w==null)return{};var m={},f=Object.keys(w),b,d;for(d=0;d=0)&&(m[b]=w[b]);return m}var v=r.default.forwardRef(function(w,y){var m=w.children,f=p(w,["children"]),b=(0,o.usePopover)(),d=b.getReferenceProps,x=b.reference,E=(0,n.useMergeRefs)([y,x]);return r.default.cloneElement(m,l({},d(u(l({},f),{ref:E}))))});v.propTypes={children:a.propTypesChildren},v.displayName="MaterialTailwind.PopoverHandler";var _=v})(nq);var oq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(x,E){for(var C in E)Object.defineProperty(x,C,{enumerable:!0,get:E[C]})}t(e,{PopoverContent:function(){return b},default:function(){return d}});var r=v(g),n=qr,o=tn,a=v(lt),i=Qe,s=v(Xe),l=Ke,c=Vw,u=yf;function p(x,E,C){return E in x?Object.defineProperty(x,E,{value:C,enumerable:!0,configurable:!0,writable:!0}):x[E]=C,x}function h(){return h=Object.assign||function(x){for(var E=1;E=0)&&Object.prototype.propertyIsEnumerable.call(x,k)&&(C[k]=x[k])}return C}function f(x,E){if(x==null)return{};var C={},k=Object.keys(x),S,R;for(R=0;R=0)&&(C[S]=x[S]);return C}var b=r.default.forwardRef(function(x,E){var C=x.children,k=x.className,S=m(x,["children","className"]),R=(0,l.useTheme)().popover,T=R.defaultProps,P=R.styles.base,j=(0,c.usePopover)(),L=j.open,D=j.strategy,B=j.x,V=j.y,q=j.context,z=j.floating,F=j.getFloatingProps,$=j.appliedAnimation,W=j.labelId,G=j.descriptionId;k=k??T.className;var Q=(0,i.twMerge)((0,a.default)((0,s.default)(P)),k),Z=(0,n.useMergeRefs)([E,z]),U=o.AnimatePresence;return r.default.createElement(o.LazyMotion,{features:o.domAnimation},r.default.createElement(n.FloatingPortal,null,r.default.createElement(U,null,L&&r.default.createElement(n.FloatingFocusManager,{context:q},r.default.createElement(o.m.div,h({},F(y(_({},S),{ref:Z,className:Q,style:{position:D,top:V??"",left:B??""},"aria-labelledby":W,"aria-describedby":G})),{initial:"unmount",exit:"unmount",animate:L?"mount":"unmount",variants:$}),C)))))});b.propTypes={className:u.propTypesClassName,children:u.propTypesChildren},b.displayName="MaterialTailwind.PopoverContent";var d=b})(oq);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,x){for(var E in x)Object.defineProperty(d,E,{enumerable:!0,get:x[E]})}t(e,{Popover:function(){return f},PopoverHandler:function(){return c.PopoverHandler},PopoverContent:function(){return u.PopoverContent},usePopover:function(){return s.usePopover},default:function(){return b}});var r=v(g),n=v(Je),o=qr,a=v(un),i=Ke,s=Vw,l=yf,c=nq,u=oq;function p(d,x){(x==null||x>d.length)&&(x=d.length);for(var E=0,C=new Array(x);E=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=r.default.forwardRef(function(m,f){var b=m.variant,d=m.color,x=m.size,E=m.value,C=m.label,k=m.className,S=m.barProps,R=v(m,["variant","color","size","value","label","className","barProps"]),T=(0,l.useTheme)().progress,P=T.defaultProps,j=T.valid,L=T.styles,D=L.base,B=L.variants,V=L.sizes;b=b??P.variant,d=d??P.color,x=x??P.size,C=C??P.label,k=k??P.className,S=S??P.barProps;var q=(0,s.default)(B[(0,i.default)(j.variants,b,"filled")][(0,i.default)(j.colors,d,"blue")]),z=(0,s.default)(V[(0,i.default)(j.sizes,x,"md")].container.initial),F=(0,o.default)((0,s.default)(D.container.initial),z),$=(0,s.default)(V[(0,i.default)(j.sizes,x,"md")].container.withLabel),W=(0,o.default)((0,s.default)(D.container.withLabel),$),G=(0,s.default)(V[(0,i.default)(j.sizes,x,"md")].bar),Q=(0,o.default)((0,s.default)(D.bar),G),Z=(0,a.twMerge)((0,o.default)(F,u({},W,C)),k),U=(0,a.twMerge)((0,o.default)(Q,q),S==null?void 0:S.className);return r.default.createElement("div",p({},R,{ref:f,className:Z}),r.default.createElement("div",p({},S,{className:U,style:{width:"".concat(E,"%")}}),C&&"".concat(E,"% ").concat(typeof C=="string"?C:"")))});w.propTypes={variant:n.default.oneOf(c.propTypesVariant),color:n.default.oneOf(c.propTypesColor),size:n.default.oneOf(c.propTypesSize),value:c.propTypesValue,label:c.propTypesLabel,barProps:c.propTypesBarProps,className:c.propTypesClassName},w.displayName="MaterialTailwind.Progress";var y=w})(aq);var iq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(f,b){for(var d in b)Object.defineProperty(f,d,{enumerable:!0,get:b[d]})}t(e,{Radio:function(){return y},default:function(){return m}});var r=v(g),n=v(Je),o=v(mf),a=v(lt),i=Qe,s=v(yr),l=v(Xe),c=Ke,u=Zc;function p(f,b,d){return b in f?Object.defineProperty(f,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):f[b]=d,f}function h(){return h=Object.assign||function(f){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(f,x)&&(d[x]=f[x])}return d}function w(f,b){if(f==null)return{};var d={},x=Object.keys(f),E,C;for(C=0;C=0)&&(d[E]=f[E]);return d}var y=r.default.forwardRef(function(f,b){var d=f.color,x=f.label,E=f.icon,C=f.ripple,k=f.className,S=f.disabled,R=f.containerProps,T=f.labelProps,P=f.iconProps,j=f.inputRef,L=_(f,["color","label","icon","ripple","className","disabled","containerProps","labelProps","iconProps","inputRef"]),D=(0,c.useTheme)().radio,B=D.defaultProps,V=D.valid,q=D.styles,z=q.base,F=q.colors,$=r.default.useId();d=d??B.color,x=x??B.label,E=E??B.icon,C=C??B.ripple,k=k??B.className,S=S??B.disabled,R=R??B.containerProps,T=T??B.labelProps,P=P??B.iconProps;var W=C!==void 0&&new o.default,G=(0,a.default)((0,l.default)(z.root),p({},(0,l.default)(z.disabled),S)),Q=(0,i.twMerge)((0,a.default)((0,l.default)(z.container)),R==null?void 0:R.className),Z=(0,i.twMerge)((0,a.default)((0,l.default)(z.input),(0,l.default)(F[(0,s.default)(V.colors,d,"blue")])),k),U=(0,i.twMerge)((0,a.default)((0,l.default)(z.label)),T==null?void 0:T.className),J=(0,a.default)((0,a.default)((0,l.default)(z.icon)),F[(0,s.default)(V.colors,d,"blue")].color,P==null?void 0:P.className);return r.default.createElement("div",{ref:b,className:G},r.default.createElement("label",h({},R,{className:Q,htmlFor:L.id||$,onMouseDown:function(oe){var ee=R==null?void 0:R.onMouseDown;return C&&W.create(oe,"dark"),typeof ee=="function"&&ee(oe)}}),r.default.createElement("input",h({},L,{ref:j,type:"radio",disabled:S,className:Z,id:L.id||$})),r.default.createElement("span",{className:J},E||r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3.5 w-3.5",viewBox:"0 0 16 16",fill:"currentColor"},r.default.createElement("circle",{"data-name":"ellipse",cx:"8",cy:"8",r:"8"})))),x&&r.default.createElement("label",h({},T,{className:U,htmlFor:L.id||$}),x))});y.propTypes={color:n.default.oneOf(u.propTypesColor),label:u.propTypesLabel,icon:u.propTypesIcon,ripple:u.propTypesRipple,className:u.propTypesClassName,disabled:u.propTypesDisabled,containerProps:u.propTypesObject,labelProps:u.propTypesObject},y.displayName="MaterialTailwind.Radio";var m=y})(iq);var sq={},TO={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,p){for(var h in p)Object.defineProperty(u,h,{enumerable:!0,get:p[h]})}t(e,{SelectContext:function(){return i},useSelect:function(){return s},usePrevious:function(){return l},SelectContextProvider:function(){return c}});var r=a(g),n=tn,o=O1;function a(u){return u&&u.__esModule?u:{default:u}}var i=r.default.createContext(null);i.displayName="MaterialTailwind.SelectContext";function s(){var u=r.default.useContext(i);if(u===null)throw new Error("useSelect() must be used within a Select. It happens when you use SelectOption component outside the Select component.");return u}function l(u){var p=r.default.useRef();return(0,n.useIsomorphicLayoutEffect)(function(){p.current=u},[u]),p.current}var c=function(u){var p=u.value,h=u.children;return r.default.createElement(i.Provider,{value:p},h)};c.propTypes={value:o.propTypesContextValue,children:o.propTypesChildren},c.displayName="MaterialTailwind.SelectContextProvider"})(TO);var lq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(y,m){for(var f in m)Object.defineProperty(y,f,{enumerable:!0,get:m[f]})}t(e,{SelectOption:function(){return _},default:function(){return w}});var r=p(g),n=p(lt),o=Qe,a=p(Xe),i=Ke,s=TO,l=O1;function c(y,m,f){return m in y?Object.defineProperty(y,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):y[m]=f,y}function u(){return u=Object.assign||function(y){for(var m=1;m=0)&&Object.prototype.propertyIsEnumerable.call(y,b)&&(f[b]=y[b])}return f}function v(y,m){if(y==null)return{};var f={},b=Object.keys(y),d,x;for(x=0;x=0)&&(f[d]=y[d]);return f}var _=function(y){var m=function(){q(E),$(d),F(!1),G(null)},f=function(ye){(ye.key==="Enter"||ye.key===" "&&!Z.current.typing)&&(ye.preventDefault(),m())},b=y.value,d=b===void 0?"":b,x=y.index,E=x===void 0?0:x,C=y.disabled,k=C===void 0?!1:C,S=y.className,R=S===void 0?"":S,T=y.children,P=h(y,["value","index","disabled","className","children"]),j=(0,i.useTheme)().select,L=j.styles,D=L.base,B=(0,s.useSelect)(),V=B.selectedIndex,q=B.setSelectedIndex,z=B.listRef,F=B.setOpen,$=B.onChange,W=B.activeIndex,G=B.setActiveIndex,Q=B.getItemProps,Z=B.dataRef,U=(0,a.default)(D.option.initial),J=(0,a.default)(D.option.active),oe=(0,a.default)(D.option.disabled),ee,ie=(0,o.twMerge)((0,n.default)(U,(ee={},c(ee,J,V===E),c(ee,oe,k),ee)),R??"");return r.default.createElement("li",u({},P,{role:"option",ref:function(ce){return z.current[E]=ce},className:ie,disabled:k,tabIndex:W===E?0:1,"aria-selected":W===E&&V===E,"data-selected":V===E},Q({onClick:function(ce){var ye=P==null?void 0:P.onClick;typeof ye=="function"&&(ye(ce),m()),m()},onKeyDown:function(ce){var ye=P==null?void 0:P.onKeyDown;typeof ye=="function"&&(ye(ce),f(ce)),f(ce)}})),T)};_.propTypes={value:l.propTypesValue,index:l.propTypesIndex,disabled:l.propTypesDisabled,className:l.propTypesClassName,children:l.propTypesChildren},_.displayName="MaterialTailwind.SelectOption";var w=_})(lq);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(z,F){for(var $ in F)Object.defineProperty(z,$,{enumerable:!0,get:F[$]})}t(e,{Select:function(){return V},Option:function(){return _.SelectOption},useSelect:function(){return h.useSelect},usePrevious:function(){return h.usePrevious},default:function(){return q}});var r=d(g),n=d(Je),o=qr,a=tn,i=d(lt),s=Qe,l=d(un),c=d(yr),u=d(Xe),p=Ke,h=TO,v=O1,_=lq;function w(z,F){(F==null||F>z.length)&&(F=z.length);for(var $=0,W=new Array(F);$=0)&&Object.prototype.propertyIsEnumerable.call(z,W)&&($[W]=z[W])}return $}function j(z,F){if(z==null)return{};var $={},W=Object.keys(z),G,Q;for(Q=0;Q=0)&&($[G]=z[G]);return $}function L(z,F){return y(z)||E(z,F)||B(z,F)||C()}function D(z){return m(z)||x(z)||B(z)||k()}function B(z,F){if(z){if(typeof z=="string")return w(z,F);var $=Object.prototype.toString.call(z).slice(8,-1);if($==="Object"&&z.constructor&&($=z.constructor.name),$==="Map"||$==="Set")return Array.from($);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return w(z,F)}}var V=r.default.forwardRef(function(z,F){var $=z.variant,W=z.color,G=z.size,Q=z.label,Z=z.error,U=z.success,J=z.arrow,oe=z.value,ee=z.onChange,ie=z.selected,ce=z.offset,ye=z.dismiss,Ce=z.animate,Se=z.lockScroll,Re=z.labelProps,Te=z.menuProps,je=z.className,pe=z.disabled,ve=z.name,Oe=z.children,Ae=z.containerProps,se=P(z,["variant","color","size","label","error","success","arrow","value","onChange","selected","offset","dismiss","animate","lockScroll","labelProps","menuProps","className","disabled","name","children","containerProps"]),we,xe=(0,p.useTheme)().select,_e=xe.defaultProps,ze=xe.valid,et=xe.styles,We=et.base,Ar=et.variants,Rt=L(r.default.useState("close"),2),Pt=Rt[0],Nn=Rt[1];$=$??_e.variant,W=W??_e.color,G=G??_e.size,Q=Q??_e.label,Z=Z??_e.error,U=U??_e.success,J=J??_e.arrow,oe=oe??_e.value,ee=ee??_e.onChange,ie=ie??_e.selected,ce=ce??_e.offset,ye=ye??_e.dismiss,Ce=Ce??_e.animate,Re=Re??_e.labelProps,Te=Te??_e.menuProps;var $n;Ae=($n=(0,l.default)(Ae,(_e==null?void 0:_e.containerProps)||{}))!==null&&$n!==void 0?$n:_e.containerProps,je=je??_e.className;var me=r.default.useRef([]),ge,Me=r.default.useRef(D((ge=r.default.Children.map(Oe,function(dr){var jr=dr.props;return jr==null?void 0:jr.value}))!==null&&ge!==void 0?ge:[])),Ve=L(r.default.useState(!1),2),tt=Ve[0],it=Ve[1],ct=L(r.default.useState(null),2),Ye=ct[0],Ge=ct[1],Mt=L(r.default.useState(0),2),Lt=Mt[0],Ot=Mt[1],Jt=L(r.default.useState(!1),2),wr=Jt[0],dn=Jt[1],no=(0,h.usePrevious)(Ye),rn=(0,o.useFloating)({placement:"bottom-start",open:tt,onOpenChange:it,whileElementsMounted:o.autoUpdate,middleware:[(0,o.offset)(5),(0,o.flip)({padding:10}),(0,o.size)({apply:function(jr){var xr=jr.rects,Ta=jr.elements,Fl,ss;Object.assign(Ta==null||(Fl=Ta.floating)===null||Fl===void 0?void 0:Fl.style,{width:"".concat(xr==null||(ss=xr.reference)===null||ss===void 0?void 0:ss.width,"px"),zIndex:99})},padding:20})]}),Sa=rn.x,fn=rn.y,Dn=rn.strategy,ea=rn.refs,Fn=rn.context;r.default.useEffect(function(){Ot(Math.max(0,Me.current.indexOf(oe)+1))},[oe]);var Al=ea.floating,di=(0,o.useInteractions)([(0,o.useClick)(Fn),(0,o.useRole)(Fn,{role:"listbox"}),(0,o.useDismiss)(Fn,S({},ye)),(0,o.useListNavigation)(Fn,{listRef:me,activeIndex:Ye,selectedIndex:Lt,onNavigate:Ge,loop:!0}),(0,o.useTypeahead)(Fn,{listRef:Me,activeIndex:Ye,selectedIndex:Lt,onMatch:tt?Ge:Ot})]),Nt=di.getReferenceProps,nn=di.getFloatingProps,zn=di.getItemProps;(0,a.useIsomorphicLayoutEffect)(function(){var dr=Al.current;if(tt&&wr&&dr){var jr=Ye!=null?me.current[Ye]:Lt!=null?me.current[Lt]:null;if(jr&&no!=null){var xr,Ta,Fl=(Ta=(xr=me.current[no])===null||xr===void 0?void 0:xr.offsetHeight)!==null&&Ta!==void 0?Ta:0,ss=dr.offsetHeight,Hf=jr.offsetTop,d5=Hf+Fl;Hfss+dr.scrollTop&&(dr.scrollTop+=d5-ss-dr.scrollTop+5)}}},[tt,wr,no,Ye]);var jl=r.default.useMemo(function(){return{selectedIndex:Lt,setSelectedIndex:Ot,listRef:me,setOpen:it,onChange:ee||function(){},activeIndex:Ye,setActiveIndex:Ge,getItemProps:zn,dataRef:Fn.dataRef}},[Lt,ee,Ye,zn,Fn.dataRef]);r.default.useEffect(function(){Nn(tt?"open":!tt&&Lt||!tt&&oe?"withValue":"close")},[tt,oe,Lt,ie]);var $t=Ar[(0,c.default)(ze.variants,$,"outlined")],Ro=$t.sizes[(0,c.default)(ze.sizes,G,"md")],Il=$t.error.select,Ll=$t.success.select,c5=$t.colors.select[(0,c.default)(ze.colors,W,"blue")],Lf=$t.error.label,Nf=$t.success.label,$f=$t.colors.label[(0,c.default)(ze.colors,W,"blue")],Df=$t.states[Pt],Ff=(0,i.default)((0,u.default)(We.container),(0,u.default)(Ro.container),Ae==null?void 0:Ae.className),Nl=(0,s.twMerge)((0,i.default)((0,u.default)(We.select),(0,u.default)($t.base.select),(0,u.default)(Df.select),(0,u.default)(Ro.select),f({},(0,u.default)(c5[Pt]),!Z&&!U),f({},(0,u.default)(Il.initial),Z),f({},(0,u.default)(Il.states[Pt]),Z),f({},(0,u.default)(Ll.initial),U),f({},(0,u.default)(Ll.states[Pt]),U)),je),zf,u5=(0,s.twMerge)((0,i.default)((0,u.default)(We.label),(0,u.default)($t.base.label),(0,u.default)(Df.label),(0,u.default)(Ro.label.initial),(0,u.default)(Ro.label.states[Pt]),f({},(0,u.default)($f[Pt]),!Z&&!U),f({},(0,u.default)(Lf.initial),Z),f({},(0,u.default)(Lf.states[Pt]),Z),f({},(0,u.default)(Nf.initial),U),f({},(0,u.default)(Nf.states[Pt]),U)),(zf=Re.className)!==null&&zf!==void 0?zf:""),$l=(0,i.default)((0,u.default)(We.arrow.initial),f({},(0,u.default)(We.arrow.active),tt)),fu,hu=(0,s.twMerge)((0,i.default)((0,u.default)(We.menu)),(fu=Te.className)!==null&&fu!==void 0?fu:""),Bf=(0,i.default)("absolute top-2/4 -translate-y-2/4",$==="outlined"?"left-3 pt-0.5":"left-0 pt-3"),q4={unmount:{opacity:0,transformOrigin:"top",transform:"scale(0.95)",transition:{duration:.2,times:[.4,0,.2,1]}},mount:{opacity:1,transformOrigin:"top",transform:"scale(1)",transition:{duration:.2,times:[.4,0,.2,1]}}},G4=(0,l.default)(q4,Ce),Vf=a.AnimatePresence;r.default.useEffect(function(){oe&&!ee&&console.error("Warning: You provided a `value` prop to a select component without an `onChange` handler. This will render a read-only select. If the field should be mutable use `onChange` handler with `value` together.")},[oe,ee]);var Dl=r.default.createElement(o.FloatingFocusManager,{context:Fn,modal:!1},r.default.createElement(a.m.ul,b({},nn(T(S({},Te),{ref:ea.setFloating,role:"listbox",className:hu,style:{position:Dn,top:fn??0,left:Sa??0,overflow:"auto"},onPointerEnter:function(jr){var xr=Te==null?void 0:Te.onPointerEnter;typeof xr=="function"&&(xr(jr),dn(!1)),dn(!1)},onPointerMove:function(jr){var xr=Te==null?void 0:Te.onPointerMove;typeof xr=="function"&&(xr(jr),dn(!1)),dn(!1)},onKeyDown:function(jr){var xr=Te==null?void 0:Te.onKeyDown;typeof xr=="function"&&(xr(jr),dn(!0)),dn(!0)}})),{initial:"unmount",exit:"unmount",animate:tt?"mount":"unmount",variants:G4}),r.default.Children.map(Oe,function(dr,jr){var xr;return r.default.isValidElement(dr)&&r.default.cloneElement(dr,T(S({},dr.props),{index:((xr=dr.props)===null||xr===void 0?void 0:xr.index)||jr+1,id:"material-tailwind-select-".concat(jr)}))})));return r.default.createElement(h.SelectContextProvider,{value:jl},r.default.createElement("div",b({},Ae,{ref:F,className:Ff}),r.default.createElement("button",b({type:"button"},Nt(T(S({},se),{ref:ea.setReference,className:Nl,disabled:pe,name:ve}))),typeof ie=="function"?r.default.createElement("span",{className:Bf},ie(Oe[Lt-1],Lt-1)):oe&&!ee?r.default.createElement("span",{className:Bf},oe):r.default.createElement("span",b({},(we=Oe[Lt-1])===null||we===void 0?void 0:we.props,{className:Bf})),r.default.createElement("div",{className:$l},J??r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},r.default.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})))),r.default.createElement("label",b({},Re,{className:u5}),Q),r.default.createElement(a.LazyMotion,{features:a.domAnimation},r.default.createElement(Vf,null,tt&&r.default.createElement(r.default.Fragment,null,Se?r.default.createElement(o.FloatingOverlay,{lockScroll:!0},Dl):Dl)))))});V.propTypes={variant:n.default.oneOf(v.propTypesVariant),color:n.default.oneOf(v.propTypesColor),size:n.default.oneOf(v.propTypesSize),label:v.propTypesLabel,error:v.propTypesError,success:v.propTypesSuccess,arrow:v.propTypesArrow,value:v.propTypesValue,onChange:v.propTypesOnChange,selected:v.propTypesSelected,offset:v.propTypesOffset,dismiss:v.propTypesDismiss,animate:v.propTypesAnimate,lockScroll:v.propTypesLockScroll,labelProps:v.propTypesLabelProps,menuProps:v.propTypesMenuProps,className:v.propTypesClassName,disabled:v.propTypesDisabled,name:v.propTypesName,children:v.propTypesChildren,containerProps:v.propTypesContainerProps},V.displayName="MaterialTailwind.Select";var q=Object.assign(V,{Option:_.SelectOption})})(sq);var cq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(f,b){for(var d in b)Object.defineProperty(f,d,{enumerable:!0,get:b[d]})}t(e,{Switch:function(){return y},default:function(){return m}});var r=v(g),n=v(Je),o=v(mf),a=v(lt),i=Qe,s=v(yr),l=v(Xe),c=Ke,u=Zc;function p(f,b,d){return b in f?Object.defineProperty(f,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):f[b]=d,f}function h(){return h=Object.assign||function(f){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(f,x)&&(d[x]=f[x])}return d}function w(f,b){if(f==null)return{};var d={},x=Object.keys(f),E,C;for(C=0;C=0)&&(d[E]=f[E]);return d}var y=r.default.forwardRef(function(f,b){var d=f.color,x=f.label,E=f.ripple,C=f.className,k=f.disabled,S=f.containerProps,R=f.circleProps,T=f.labelProps,P=f.inputRef,j=_(f,["color","label","ripple","className","disabled","containerProps","circleProps","labelProps","inputRef"]),L=(0,c.useTheme)(),D=L.switch,B=D.defaultProps,V=D.valid,q=D.styles,z=q.base,F=q.colors,$=r.default.useId();d=d??B.color,E=E??B.ripple,C=C??B.className,k=k??B.disabled,S=S??B.containerProps,T=T??B.labelProps,R=R??B.circleProps;var W=E!==void 0&&new o.default,G=(0,a.default)((0,l.default)(z.root),p({},(0,l.default)(z.disabled),k)),Q=(0,i.twMerge)((0,a.default)((0,l.default)(z.container)),S==null?void 0:S.className),Z=(0,i.twMerge)((0,a.default)((0,l.default)(z.input),(0,l.default)(F[(0,s.default)(V.colors,d,"blue")])),C),U=(0,i.twMerge)((0,a.default)((0,l.default)(z.circle),F[(0,s.default)(V.colors,d,"blue")].circle,F[(0,s.default)(V.colors,d,"blue")].before),R==null?void 0:R.className),J=(0,a.default)((0,l.default)(z.ripple)),oe=(0,i.twMerge)((0,a.default)((0,l.default)(z.label)),T==null?void 0:T.className);return r.default.createElement("div",{ref:b,className:G},r.default.createElement("div",h({},S,{className:Q}),r.default.createElement("input",h({},j,{ref:P,type:"checkbox",disabled:k,id:j.id||$,className:Z})),r.default.createElement("label",h({},R,{htmlFor:j.id||$,className:U}),E&&r.default.createElement("div",{className:J,onMouseDown:function(ee){var ie=S==null?void 0:S.onMouseDown;return E&&W.create(ee,"dark"),typeof ie=="function"&&ie(ee)}}))),x&&r.default.createElement("label",h({},T,{htmlFor:j.id||$,className:oe}),x))});y.propTypes={color:n.default.oneOf(u.propTypesColor),label:u.propTypesLabel,ripple:u.propTypesRipple,className:u.propTypesClassName,disabled:u.propTypesDisabled,containerProps:u.propTypesObject,labelProps:u.propTypesObject,circleProps:u.propTypesObject},y.displayName="MaterialTailwind.Switch";var m=y})(cq);var uq={},wf={},eu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,_){for(var w in _)Object.defineProperty(v,w,{enumerable:!0,get:_[w]})}t(e,{propTypesId:function(){return a},propTypesValue:function(){return i},propTypesAnimate:function(){return s},propTypesDisabled:function(){return l},propTypesClassName:function(){return c},propTypesOrientation:function(){return u},propTypesIndicator:function(){return p},propTypesChildren:function(){return h}});var r=o(Je),n=cr;function o(v){return v&&v.__esModule?v:{default:v}}var a=r.default.string,i=r.default.oneOfType([r.default.string,r.default.number]).isRequired,s=n.propTypesAnimation,l=r.default.bool,c=r.default.string,u=r.default.oneOf(["horizontal","vertical"]),p=r.default.instanceOf(Object),h=r.default.node.isRequired})(eu);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(S,R){for(var T in R)Object.defineProperty(S,T,{enumerable:!0,get:R[T]})}t(e,{TabsContext:function(){return y},useTabs:function(){return m},TabsContextProvider:function(){return f},setId:function(){return b},setActive:function(){return d},setAnimation:function(){return x},setIndicator:function(){return E},setIsInitial:function(){return C},setOrientation:function(){return k}});var r=s(g),n=eu;function o(S,R){(R==null||R>S.length)&&(R=S.length);for(var T=0,P=new Array(R);T=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=r.default.forwardRef(function(m,f){var b=m.value,d=m.className,x=m.activeClassName,E=m.disabled,C=m.children,k=v(m,["value","className","activeClassName","disabled","children"]),S=(0,s.useTheme)(),R=S.tab,T=R.defaultProps,P=R.styles.base,j=(0,l.useTabs)(),L=j.state,D=j.dispatch,B=L.id,V=L.active,q=L.indicatorProps;d=d??T.className,x=x??T.activeClassName,E=E??T.disabled;var z,F=(0,a.twMerge)((0,o.default)((0,i.default)(P.tab.initial),(z={},u(z,(0,i.default)(P.tab.disabled),E),u(z,x,V===b),z)),d),$,W=(0,a.twMerge)((0,o.default)((0,i.default)(P.indicator)),($=q==null?void 0:q.className)!==null&&$!==void 0?$:"");return r.default.createElement("li",p({},k,{ref:f,role:"tab",className:F,onClick:function(G){var Q=k==null?void 0:k.onClick;typeof Q=="function"&&((0,l.setActive)(D,b),(0,l.setIsInitial)(D,!1),Q(G)),(0,l.setIsInitial)(D,!1),(0,l.setActive)(D,b)},"data-value":b}),r.default.createElement("div",{className:"z-20 text-inherit"},C),V===b&&r.default.createElement(n.motion.div,p({},q,{transition:{duration:.5},className:W,layoutId:B})))});w.propTypes={value:c.propTypesValue,className:c.propTypesClassName,disabled:c.propTypesDisabled,children:c.propTypesChildren},w.displayName="MaterialTailwind.Tab";var y=w})(dq);var fq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(m,f){for(var b in f)Object.defineProperty(m,b,{enumerable:!0,get:f[b]})}t(e,{TabsBody:function(){return w},default:function(){return y}});var r=h(g),n=tn,o=h(un),a=h(lt),i=Qe,s=h(Xe),l=Ke,c=wf,u=eu;function p(){return p=Object.assign||function(m){for(var f=1;f=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=r.default.forwardRef(function(m,f){var b=m.animate,d=m.className,x=m.children,E=v(m,["animate","className","children"]),C=(0,l.useTheme)().tabsBody,k=C.defaultProps,S=C.styles.base,R=(0,c.useTabs)().dispatch;d=d??k.className,b=b??k.animate;var T=(0,i.twMerge)((0,a.default)((0,s.default)(S)),d),P=r.default.useMemo(function(){return{initial:{opacity:0,position:"absolute",top:"0",left:"0",zIndex:1,transition:{duration:0}},unmount:{opacity:0,position:"absolute",top:"0",left:"0",zIndex:1,transition:{duration:.5,times:[.4,0,.2,1]}},mount:{opacity:1,position:"relative",zIndex:2,transition:{duration:.5,times:[.4,0,.2,1]}}}},[]),j=r.default.useMemo(function(){return(0,o.default)(P,b)},[b,P]);return(0,n.useIsomorphicLayoutEffect)(function(){(0,c.setAnimation)(R,j)},[j,R]),r.default.createElement("div",p({},E,{ref:f,className:T}),x)});w.propTypes={animate:u.propTypesAnimate,className:u.propTypesClassName,children:u.propTypesChildren},w.displayName="MaterialTailwind.TabsBody";var y=w})(fq);var hq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(y,m){for(var f in m)Object.defineProperty(y,f,{enumerable:!0,get:m[f]})}t(e,{TabsHeader:function(){return _},default:function(){return w}});var r=p(g),n=p(lt),o=Qe,a=p(Xe),i=Ke,s=wf,l=eu;function c(y,m,f){return m in y?Object.defineProperty(y,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):y[m]=f,y}function u(){return u=Object.assign||function(y){for(var m=1;m=0)&&Object.prototype.propertyIsEnumerable.call(y,b)&&(f[b]=y[b])}return f}function v(y,m){if(y==null)return{};var f={},b=Object.keys(y),d,x;for(x=0;x=0)&&(f[d]=y[d]);return f}var _=r.default.forwardRef(function(y,m){var f=y.indicatorProps,b=y.className,d=y.children,x=h(y,["indicatorProps","className","children"]),E=(0,i.useTheme)().tabsHeader,C=E.defaultProps,k=E.styles,S=(0,s.useTabs)(),R=S.state,T=S.dispatch,P=R.orientation;r.default.useEffect(function(){(0,s.setIndicator)(T,f)},[T,f]),b=b??C.className;var j=(0,o.twMerge)((0,n.default)((0,a.default)(k.base),c({},k[P]&&(0,a.default)(k[P]),P)),b);return r.default.createElement("nav",null,r.default.createElement("ul",u({},x,{ref:m,role:"tablist",className:j}),d))});_.propTypes={indicatorProps:l.propTypesIndicator,className:l.propTypesClassName,children:l.propTypesChildren},_.displayName="MaterialTailwind.TabsHeader";var w=_})(hq);var pq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(y,m){for(var f in m)Object.defineProperty(y,f,{enumerable:!0,get:m[f]})}t(e,{TabPanel:function(){return _},default:function(){return w}});var r=p(g),n=tn,o=p(lt),a=Qe,i=p(Xe),s=Ke,l=wf,c=eu;function u(){return u=Object.assign||function(y){for(var m=1;m=0)&&Object.prototype.propertyIsEnumerable.call(y,b)&&(f[b]=y[b])}return f}function v(y,m){if(y==null)return{};var f={},b=Object.keys(y),d,x;for(x=0;x=0)&&(f[d]=y[d]);return f}var _=r.default.forwardRef(function(y,m){var f=y.value,b=y.className,d=y.children,x=h(y,["value","className","children"]),E=(0,s.useTheme)().tabPanel,C=E.defaultProps,k=E.styles.base,S=(0,l.useTabs)().state,R=S.active,T=S.appliedAnimation,P=S.isInitial;b=b??C.className;var j=(0,a.twMerge)((0,o.default)((0,i.default)(k)),b),L=n.AnimatePresence;return r.default.createElement(n.LazyMotion,{features:n.domAnimation},r.default.createElement(L,{exitBeforeEnter:!0},r.default.createElement(n.m.div,u({},x,{ref:m,role:"tabpanel",className:j,initial:"unmount",exit:"unmount",animate:R===f?"mount":P?"initial":"unmount",variants:T,"data-value":f}),d)))});_.propTypes={value:c.propTypesValue,className:c.propTypesClassName,children:c.propTypesChildren},_.displayName="MaterialTailwind.TabPanel";var w=_})(pq);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,x){for(var E in x)Object.defineProperty(d,E,{enumerable:!0,get:x[E]})}t(e,{Tabs:function(){return f},Tab:function(){return l.Tab},TabsBody:function(){return c.TabsBody},TabsHeader:function(){return u.TabsHeader},TabPanel:function(){return p.TabPanel},useTabs:function(){return s.useTabs},default:function(){return b}});var r=w(g),n=w(lt),o=Qe,a=w(Xe),i=Ke,s=wf,l=dq,c=fq,u=hq,p=pq,h=eu;function v(d,x,E){return x in d?Object.defineProperty(d,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):d[x]=E,d}function _(){return _=Object.assign||function(d){for(var x=1;x=0)&&Object.prototype.propertyIsEnumerable.call(d,C)&&(E[C]=d[C])}return E}function m(d,x){if(d==null)return{};var E={},C=Object.keys(d),k,S;for(S=0;S=0)&&(E[k]=d[k]);return E}var f=r.default.forwardRef(function(d,x){var E=d.value,C=d.className,k=d.orientation,S=d.children,R=y(d,["value","className","orientation","children"]),T=(0,i.useTheme)().tabs,P=T.defaultProps,j=T.styles,L=r.default.useId();C=C??P.className,k=k??P.orientation;var D=(0,o.twMerge)((0,n.default)((0,a.default)(j.base),v({},j[k]&&(0,a.default)(j[k]),k)),C);return r.default.createElement(s.TabsContextProvider,{id:L,value:E,orientation:k},r.default.createElement("div",_({},R,{ref:x,className:D}),S))});f.propTypes={id:h.propTypesId,value:h.propTypesValue,className:h.propTypesClassName,orientation:h.propTypesOrientation,children:h.propTypesChildren},f.displayName="MaterialTailwind.Tabs";var b=Object.assign(f,{Tab:l.Tab,Body:c.TabsBody,Header:u.TabsHeader,Panel:p.TabPanel})})(uq);var mq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(y,m){for(var f in m)Object.defineProperty(y,f,{enumerable:!0,get:m[f]})}t(e,{Textarea:function(){return _},default:function(){return w}});var r=p(g),n=p(Je),o=p(lt),a=p(yr),i=p(Xe),s=Ke,l=C1;function c(y,m,f){return m in y?Object.defineProperty(y,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):y[m]=f,y}function u(){return u=Object.assign||function(y){for(var m=1;m=0)&&Object.prototype.propertyIsEnumerable.call(y,b)&&(f[b]=y[b])}return f}function v(y,m){if(y==null)return{};var f={},b=Object.keys(y),d,x;for(x=0;x=0)&&(f[d]=y[d]);return f}var _=r.default.forwardRef(function(y,m){var f=y.variant,b=y.color,d=y.size,x=y.label,E=y.error,C=y.success,k=y.resize,S=y.labelProps,R=y.containerProps,T=y.shrink,P=y.className,j=h(y,["variant","color","size","label","error","success","resize","labelProps","containerProps","shrink","className"]),L=(0,s.useTheme)().textarea,D=L.defaultProps,B=L.valid,V=L.styles,q=V.base,z=V.variants;f=f??D.variant,d=d??D.size,b=b??D.color,x=x??D.label,S=S??D.labelProps,R=R??D.containerProps,T=T??D.shrink,P=P??D.className;var F=z[(0,a.default)(B.variants,f,"outlined")],$=(0,i.default)(F.error.textarea),W=(0,i.default)(F.success.textarea),G=(0,i.default)(F.shrink.textarea),Q=(0,i.default)(F.colors.textarea[(0,a.default)(B.colors,b,"blue")]),Z=(0,i.default)(F.error.label),U=(0,i.default)(F.success.label),J=(0,i.default)(F.shrink.label),oe=(0,i.default)(F.colors.label[(0,a.default)(B.colors,b,"blue")]),ee=(0,o.default)((0,i.default)(q.container),R==null?void 0:R.className),ie=(0,o.default)((0,i.default)(q.textarea),(0,i.default)(F.base.textarea),(0,i.default)(F.sizes[(0,a.default)(B.sizes,d,"md")].textarea),c({},Q,!E&&!C),c({},$,E),c({},W,C),c({},G,T),k?"":"!resize-none",P),ce=(0,o.default)((0,i.default)(q.label),(0,i.default)(F.base.label),(0,i.default)(F.sizes[(0,a.default)(B.sizes,d,"md")].label),c({},oe,!E&&!C),c({},Z,E),c({},U,C),c({},J,T),S==null?void 0:S.className);return r.default.createElement("div",{ref:m,className:ee},r.default.createElement("textarea",u({},j,{className:ie,placeholder:(j==null?void 0:j.placeholder)||" "})),r.default.createElement("label",{className:ce},x))});_.propTypes={variant:n.default.oneOf(l.propTypesVariant),size:n.default.oneOf(l.propTypesSize),color:n.default.oneOf(l.propTypesColor),label:l.propTypesLabel,error:l.propTypesError,success:l.propTypesSuccess,resize:l.propTypesResize,labelProps:l.propTypesLabelProps,containerProps:l.propTypesContainerProps,shrink:l.propTypesShrink,className:l.propTypesClassName},_.displayName="MaterialTailwind.Textarea";var w=_})(mq);var gq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(P,j){for(var L in j)Object.defineProperty(P,L,{enumerable:!0,get:j[L]})}t(e,{Tooltip:function(){return R},default:function(){return T}});var r=y(g),n=y(Je),o=qr,a=tn,i=y(lt),s=Qe,l=y(un),c=y(Xe),u=Ke,p=yf;function h(P,j){(j==null||j>P.length)&&(j=P.length);for(var L=0,D=new Array(j);L=0)&&Object.prototype.propertyIsEnumerable.call(P,D)&&(L[D]=P[D])}return L}function C(P,j){if(P==null)return{};var L={},D=Object.keys(P),B,V;for(V=0;V=0)&&(L[B]=P[B]);return L}function k(P,j){return v(P)||m(P,j)||S(P,j)||f()}function S(P,j){if(P){if(typeof P=="string")return h(P,j);var L=Object.prototype.toString.call(P).slice(8,-1);if(L==="Object"&&P.constructor&&(L=P.constructor.name),L==="Map"||L==="Set")return Array.from(L);if(L==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(L))return h(P,j)}}var R=r.default.forwardRef(function(P,j){var L=P.open,D=P.handler,B=P.content,V=P.interactive,q=P.placement,z=P.offset,F=P.dismiss,$=P.animate,W=P.className,G=P.children,Q=E(P,["open","handler","content","interactive","placement","offset","dismiss","animate","className","children"]),Z=(0,u.useTheme)().tooltip,U=Z.defaultProps,J=Z.styles.base,oe=k(r.default.useState(!1),2),ee=oe[0],ie=oe[1];L=L??ee,D=D??ie,V=V??U.interactive,q=q??U.placement,z=z??U.offset,F=F??U.dismiss,$=$??U.animate,W=W??U.className;var ce=(0,s.twMerge)((0,i.default)((0,c.default)(J)),W),ye={unmount:{opacity:0},mount:{opacity:1}},Ce=(0,l.default)(ye,$),Se=(0,o.useFloating)({open:L,onOpenChange:D,middleware:[(0,o.offset)(z),(0,o.flip)(),(0,o.shift)()],placement:q}),Re=Se.x,Te=Se.y,je=Se.reference,pe=Se.floating,ve=Se.strategy,Oe=Se.refs,Ae=Se.update,se=Se.context,we=(0,o.useInteractions)([(0,o.useClick)(se,{enabled:V}),(0,o.useFocus)(se),(0,o.useHover)(se),(0,o.useRole)(se,{role:"tooltip"}),(0,o.useDismiss)(se,F)]),xe=we.getReferenceProps,_e=we.getFloatingProps;r.default.useEffect(function(){if(Oe.reference.current&&Oe.floating.current&&L)return(0,o.autoUpdate)(Oe.reference.current,Oe.floating.current,Ae)},[L,Ae,Oe.reference,Oe.floating]);var ze=(0,o.useMergeRefs)([j,pe]),et=(0,o.useMergeRefs)([j,je]),We=a.AnimatePresence;return r.default.createElement(r.default.Fragment,null,typeof G=="string"?r.default.createElement("span",w({},xe({ref:et})),G):r.default.cloneElement(G,b({},xe(x(b({},G==null?void 0:G.props),{ref:et})))),r.default.createElement(a.LazyMotion,{features:a.domAnimation},r.default.createElement(o.FloatingPortal,null,r.default.createElement(We,null,L&&r.default.createElement(a.m.div,w({},_e(x(b({},Q),{ref:ze,className:ce,style:{position:ve,top:Te??"",left:Re??""}})),{initial:"unmount",exit:"unmount",animate:L?"mount":"unmount",variants:Ce}),B)))))});R.propTypes={open:p.propTypesOpen,handler:p.propTypesHandler,content:p.propTypesContent,interactive:p.propTypesInteractive,placement:n.default.oneOf(p.propTypesPlacement),offset:p.propTypesOffset,dismiss:p.propTypesDismiss,animate:p.propTypesAnimate,className:p.propTypesClassName,children:p.propTypesChildren},R.displayName="MaterialTailwind.Tooltip";var T=R})(gq);var vq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,d){for(var x in d)Object.defineProperty(b,x,{enumerable:!0,get:d[x]})}t(e,{Typography:function(){return m},default:function(){return f}});var r=p(g),n=p(Je),o=p(lt),a=Qe,i=p(yr),s=p(Xe),l=Ke,c=qC;function u(b,d,x){return d in b?Object.defineProperty(b,d,{value:x,enumerable:!0,configurable:!0,writable:!0}):b[d]=x,b}function p(b){return b&&b.__esModule?b:{default:b}}function h(b){for(var d=1;d=0)&&Object.prototype.propertyIsEnumerable.call(b,E)&&(x[E]=b[E])}return x}function y(b,d){if(b==null)return{};var x={},E=Object.keys(b),C,k;for(k=0;k=0)&&(x[C]=b[C]);return x}var m=r.default.forwardRef(function(b,d){var x=b.variant,E=b.color,C=b.textGradient,k=b.as,S=b.className,R=b.children,T=w(b,["variant","color","textGradient","as","className","children"]),P=(0,l.useTheme)().typography,j=P.defaultProps,L=P.valid,D=P.styles,B=D.variants,V=D.colors,q=D.textGradient;x=x??j.variant,E=E??j.color,C=C||j.textGradient,k=k??void 0,S=S??j.className;var z=(0,s.default)(B[(0,i.default)(L.variants,x,"paragraph")]),F=V[(0,i.default)(L.colors,E,"inherit")],$=(0,s.default)(q),W=(0,a.twMerge)((0,o.default)(z,u({},F.color,!C),u({},$,C),u({},F.gradient,C)),S),G;switch(x){case"h1":G=r.default.createElement(k||"h1",_(h({},T),{ref:d,className:W}),R);break;case"h2":G=r.default.createElement(k||"h2",_(h({},T),{ref:d,className:W}),R);break;case"h3":G=r.default.createElement(k||"h3",_(h({},T),{ref:d,className:W}),R);break;case"h4":G=r.default.createElement(k||"h4",_(h({},T),{ref:d,className:W}),R);break;case"h5":G=r.default.createElement(k||"h5",_(h({},T),{ref:d,className:W}),R);break;case"h6":G=r.default.createElement(k||"h6",_(h({},T),{ref:d,className:W}),R);break;case"lead":G=r.default.createElement(k||"p",_(h({},T),{ref:d,className:W}),R);break;case"paragraph":G=r.default.createElement(k||"p",_(h({},T),{ref:d,className:W}),R);break;case"small":G=r.default.createElement(k||"p",_(h({},T),{ref:d,className:W}),R);break;default:G=r.default.createElement(k||"p",_(h({},T),{ref:d,className:W}),R);break}return G});m.propTypes={variant:n.default.oneOf(c.propTypesVariant),color:n.default.oneOf(c.propTypesColor),as:c.propTypesAs,textGradient:c.propTypesTextGradient,className:c.propTypesClassName,children:c.propTypesChildren},m.displayName="MaterialTailwind.Typography";var f=m})(vq);var bq={},yq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var p in u)Object.defineProperty(c,p,{enumerable:!0,get:u[p]})}t(e,{propTypesClassName:function(){return a},propTypesChildren:function(){return i},propTypesOpen:function(){return s},propTypesAnimate:function(){return l}});var r=o(Je),n=cr;function o(c){return c&&c.__esModule?c:{default:c}}var a=r.default.string,i=r.default.node.isRequired,s=r.default.bool.isRequired,l=n.propTypesAnimation})(yq);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(m,f){for(var b in f)Object.defineProperty(m,b,{enumerable:!0,get:f[b]})}t(e,{Collapse:function(){return w},default:function(){return y}});var r=h(g),n=tn,o=qr,a=h(un),i=h(lt),s=Qe,l=h(Xe),c=Ke,u=yq;function p(){return p=Object.assign||function(m){for(var f=1;f=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=r.default.forwardRef(function(m,f){var b=m.open,d=m.animate,x=m.className,E=m.children,C=v(m,["open","animate","className","children"]),k=r.default.useRef(null),S=(0,c.useTheme)().collapse,R=S.styles,T=R.base;d=d??{},x=x??"";var P=(0,s.twMerge)((0,i.default)((0,l.default)(T)),x),j={unmount:{height:"0px",transition:{duration:.3,times:[.4,0,.2,1]}},mount:{height:"auto",transition:{duration:.3,times:[.4,0,.2,1]}}},L=(0,a.default)(j,d),D=n.AnimatePresence,B=(0,o.useMergeRefs)([f,k]);return r.default.createElement(n.LazyMotion,{features:n.domAnimation},r.default.createElement(D,null,r.default.createElement(n.m.div,p({},C,{ref:B,className:P,initial:"unmount",exit:"unmount",animate:b?"mount":"unmount",variants:L}),E)))});w.displayName="MaterialTailwind.Collapse",w.propTypes={open:u.propTypesOpen,animate:u.propTypesAnimate,className:u.propTypesClassName,children:u.propTypesChildren};var y=w})(bq);var wq={},I1={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var p in u)Object.defineProperty(c,p,{enumerable:!0,get:u[p]})}t(e,{propTypesClassName:function(){return o},propTypesDisabled:function(){return a},propTypesSelected:function(){return i},propTypesRipple:function(){return s},propTypesChildren:function(){return l}});var r=n(Je);function n(c){return c&&c.__esModule?c:{default:c}}var o=r.default.string,a=r.default.bool,i=r.default.bool,s=r.default.bool,l=r.default.node.isRequired})(I1);var xq={},PO={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,w){for(var y in w)Object.defineProperty(_,y,{enumerable:!0,get:w[y]})}t(e,{ListItemPrefix:function(){return h},default:function(){return v}});var r=c(g),n=Ke,o=c(lt),a=Qe,i=c(Xe),s=I1;function l(){return l=Object.assign||function(_){for(var w=1;w=0)&&Object.prototype.propertyIsEnumerable.call(_,m)&&(y[m]=_[m])}return y}function p(_,w){if(_==null)return{};var y={},m=Object.keys(_),f,b;for(b=0;b=0)&&(y[f]=_[f]);return y}var h=r.default.forwardRef(function(_,w){var y=_.className,m=_.children,f=u(_,["className","children"]),b=(0,n.useTheme)().list,d=b.styles.base,x=(0,a.twMerge)((0,o.default)((0,i.default)(d.itemPrefix)),y);return r.default.createElement("div",l({},f,{ref:w,className:x}),m)});h.propTypes={className:s.propTypesClassName,children:s.propTypesChildren},h.displayName="MaterialTailwind.ListItemPrefix";var v=h})(PO);var MO={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,w){for(var y in w)Object.defineProperty(_,y,{enumerable:!0,get:w[y]})}t(e,{ListItemSuffix:function(){return h},default:function(){return v}});var r=c(g),n=Ke,o=c(lt),a=Qe,i=c(Xe),s=I1;function l(){return l=Object.assign||function(_){for(var w=1;w=0)&&Object.prototype.propertyIsEnumerable.call(_,m)&&(y[m]=_[m])}return y}function p(_,w){if(_==null)return{};var y={},m=Object.keys(_),f,b;for(b=0;b=0)&&(y[f]=_[f]);return y}var h=r.default.forwardRef(function(_,w){var y=_.className,m=_.children,f=u(_,["className","children"]),b=(0,n.useTheme)().list,d=b.styles.base,x=(0,a.twMerge)((0,o.default)((0,i.default)(d.itemSuffix)),y);return r.default.createElement("div",l({},f,{ref:w,className:x}),m)});h.propTypes={className:s.propTypesClassName,children:s.propTypesChildren},h.displayName="MaterialTailwind.ListItemSuffix";var v=h})(MO);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(f,b){for(var d in b)Object.defineProperty(f,d,{enumerable:!0,get:b[d]})}t(e,{ListItem:function(){return y},ListItemPrefix:function(){return c.ListItemPrefix},ListItemSuffix:function(){return u.ListItemSuffix},default:function(){return m}});var r=v(g),n=Ke,o=v(mf),a=v(lt),i=Qe,s=v(Xe),l=I1,c=PO,u=MO;function p(f,b,d){return b in f?Object.defineProperty(f,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):f[b]=d,f}function h(){return h=Object.assign||function(f){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(f,x)&&(d[x]=f[x])}return d}function w(f,b){if(f==null)return{};var d={},x=Object.keys(f),E,C;for(C=0;C=0)&&(d[E]=f[E]);return d}var y=r.default.forwardRef(function(f,b){var d=f.className,x=f.disabled,E=f.selected,C=f.ripple,k=f.children,S=_(f,["className","disabled","selected","ripple","children"]),R=(0,n.useTheme)().list,T=R.defaultProps,P=R.styles.base;C=C??T.ripple;var j=C!==void 0&&new o.default,L,D=(0,i.twMerge)((0,a.default)((0,s.default)(P.item.initial),(L={},p(L,(0,s.default)(P.item.disabled),x),p(L,(0,s.default)(P.item.selected),E&&!x),L)),d);return r.default.createElement("div",h({},S,{ref:b,role:"button",tabIndex:0,className:D,onMouseDown:function(B){var V=S==null?void 0:S.onMouseDown;return C&&j.create(B,"dark"),typeof V=="function"&&V(B)}}),k)});y.propTypes={className:l.propTypesClassName,selected:l.propTypesSelected,disabled:l.propTypesDisabled,ripple:l.propTypesRipple,children:l.propTypesChildren},y.displayName="MaterialTailwind.ListItem";var m=Object.assign(y,{Prefix:c.ListItemPrefix,Suffix:u.ListItemSuffix})})(xq);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(m,f){for(var b in f)Object.defineProperty(m,b,{enumerable:!0,get:f[b]})}t(e,{List:function(){return w},ListItem:function(){return l.ListItem},ListItemPrefix:function(){return c.ListItemPrefix},ListItemSuffix:function(){return u.ListItemSuffix},default:function(){return y}});var r=h(g),n=Ke,o=h(lt),a=Qe,i=h(Xe),s=I1,l=xq,c=PO,u=MO;function p(){return p=Object.assign||function(m){for(var f=1;f=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=r.default.forwardRef(function(m,f){var b=m.className,d=m.children,x=v(m,["className","children"]),E=(0,n.useTheme)().list,C=E.defaultProps,k=E.styles.base;b=b??C.className;var S=(0,a.twMerge)((0,o.default)((0,i.default)(k.list)),b);return r.default.createElement("nav",p({},x,{ref:f,className:S}),d)});w.propTypes={className:s.propTypesClassName,children:s.propTypesChildren},w.displayName="MaterialTailwind.List";var y=Object.assign(w,{Item:l.ListItem,ItemPrefix:c.ListItemPrefix,ItemSuffix:u.ListItemSuffix})})(wq);var _q={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(m,f){for(var b in f)Object.defineProperty(m,b,{enumerable:!0,get:f[b]})}t(e,{ButtonGroup:function(){return w},default:function(){return y}});var r=h(g),n=h(Je),o=h(lt),a=Qe,i=h(yr),s=h(Xe),l=Ke,c=Yc;function u(m,f,b){return f in m?Object.defineProperty(m,f,{value:b,enumerable:!0,configurable:!0,writable:!0}):m[f]=b,m}function p(){return p=Object.assign||function(m){for(var f=1;f=0)&&Object.prototype.propertyIsEnumerable.call(m,d)&&(b[d]=m[d])}return b}function _(m,f){if(m==null)return{};var b={},d=Object.keys(m),x,E;for(E=0;E=0)&&(b[x]=m[x]);return b}var w=r.default.forwardRef(function(m,f){var b=m.variant,d=m.size,x=m.color,E=m.fullWidth,C=m.ripple,k=m.className,S=m.children,R=v(m,["variant","size","color","fullWidth","ripple","className","children"]),T=(0,l.useTheme)().buttonGroup,P=T.defaultProps,j=T.styles,L=T.valid,D=j.base,B=j.dividerColor;b=b??P.variant,d=d??P.size,x=x??P.color,C=C??P.ripple,E=E??P.fullWidth,k=k??P.className;var V,q=(0,a.twMerge)((0,o.default)((0,s.default)(D.initial),(V={},u(V,(0,s.default)(D.fullWidth),E),u(V,"divide-x",b!=="outlined"),u(V,(0,s.default)(B[(0,i.default)(L.colors,x,"blue")]),b!=="outlined"),V)),k);return r.default.createElement("div",p({},R,{ref:f,className:q}),r.default.Children.map(S,function(z,F){var $;return r.default.isValidElement(z)&&r.default.cloneElement(z,{variant:b,size:d,color:x,ripple:C,fullWidth:E,className:(0,a.twMerge)((0,o.default)({"rounded-r-none":F!==r.default.Children.count(S)-1,"border-r-0":F!==r.default.Children.count(S)-1,"rounded-l-none":F!==0}),($=z.props)===null||$===void 0?void 0:$.className)})}))});w.propTypes={variant:n.default.oneOf(c.propTypesVariant),size:n.default.oneOf(c.propTypesSize),color:n.default.oneOf(c.propTypesColor),fullWidth:c.propTypesFullWidth,ripple:c.propTypesRipple,className:c.propTypesClassName,children:c.propTypesChildren},w.displayName="MaterialTailwind.ButtonGroup";var y=w})(_q);var Eq={},Cq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,w){for(var y in w)Object.defineProperty(_,y,{enumerable:!0,get:w[y]})}t(e,{propTypesClassName:function(){return o},propTypesPrevArrow:function(){return a},propTypesNextArrow:function(){return i},propTypesNavigation:function(){return s},propTypesAutoplay:function(){return l},propTypesAutoplayDelay:function(){return c},propTypesTransition:function(){return u},propTypesLoop:function(){return p},propTypesChildren:function(){return h},propTypesSlideRef:function(){return v}});var r=n(Je);function n(_){return _&&_.__esModule?_:{default:_}}var o=r.default.string,a=r.default.func,i=r.default.func,s=r.default.func,l=r.default.bool,c=r.default.number,u=r.default.object,p=r.default.bool,h=r.default.node.isRequired,v=r.default.oneOfType([r.default.func,r.default.shape({current:r.default.any})])})(Cq);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(E,C){for(var k in C)Object.defineProperty(E,k,{enumerable:!0,get:C[k]})}t(e,{Carousel:function(){return d},default:function(){return x}});var r=v(g),n=tn,o=qr,a=v(lt),i=Qe,s=v(Xe),l=Ke,c=Cq;function u(E,C){(C==null||C>E.length)&&(C=E.length);for(var k=0,S=new Array(C);k=0)&&Object.prototype.propertyIsEnumerable.call(E,S)&&(k[S]=E[S])}return k}function m(E,C){if(E==null)return{};var k={},S=Object.keys(E),R,T;for(T=0;T=0)&&(k[R]=E[R]);return k}function f(E,C){return p(E)||_(E,C)||b(E,C)||w()}function b(E,C){if(E){if(typeof E=="string")return u(E,C);var k=Object.prototype.toString.call(E).slice(8,-1);if(k==="Object"&&E.constructor&&(k=E.constructor.name),k==="Map"||k==="Set")return Array.from(k);if(k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k))return u(E,C)}}var d=r.default.forwardRef(function(E,C){var k=E.children,S=E.prevArrow,R=E.nextArrow,T=E.navigation,P=E.autoplay,j=E.autoplayDelay,L=E.transition,D=E.loop,B=E.className,V=E.slideRef,q=y(E,["children","prevArrow","nextArrow","navigation","autoplay","autoplayDelay","transition","loop","className","slideRef"]),z=(0,l.useTheme)().carousel,F=z.defaultProps,$=z.styles.base,W=(0,n.useMotionValue)(0),G=r.default.useRef(null),Q=f(r.default.useState(0),2),Z=Q[0],U=Q[1],J=r.default.Children.toArray(k);B=B??F.className,S=S??F.prevArrow,R=R??F.nextArrow,T=T??F.navigation,P=P??F.autoplay,j=j??F.autoplayDelay,L=L??F.transition,D=D??F.loop;var oe=(0,i.twMerge)((0,a.default)((0,s.default)($.carousel)),B),ee=(0,i.twMerge)((0,a.default)((0,s.default)($.slide))),ie=r.default.useCallback(function(){var Se;return-Z*(((Se=G.current)===null||Se===void 0?void 0:Se.clientWidth)||0)},[Z]),ce=r.default.useCallback(function(){var Se=D?0:Z;U(Z+1===J.length?Se:Z+1)},[Z,D,J.length]),ye=function(){var Se=D?J.length-1:0;U(Z-1<0?Se:Z-1)};r.default.useEffect(function(){var Se=(0,n.animate)(W,ie(),L);return Se.stop},[ie,Z,W,L]),r.default.useEffect(function(){window.addEventListener("resize",function(){(0,n.animate)(W,ie(),L)})},[ie,L,W]),r.default.useEffect(function(){if(P){var Se=setInterval(function(){return ce()},j);return function(){return clearInterval(Se)}}},[P,ce,j]);var Ce=(0,o.useMergeRefs)([G,C]);return r.default.createElement("div",h({},q,{ref:Ce,className:oe}),J.map(function(Se,Re){return r.default.createElement(n.LazyMotion,{key:Re,features:n.domAnimation},r.default.createElement(n.m.div,{ref:V,className:ee,style:{x:W,left:"".concat(Re*100,"%"),right:"".concat(Re*100,"%")}},Se))}),S&&S({loop:D,handlePrev:ye,activeIndex:Z,firstIndex:Z===0}),R&&R({loop:D,handleNext:ce,activeIndex:Z,lastIndex:Z===J.length-1}),T&&T({setActiveIndex:U,activeIndex:Z,length:J.length}))});d.propTypes={className:c.propTypesClassName,children:c.propTypesChildren,nextArrow:c.propTypesNextArrow,prevArrow:c.propTypesPrevArrow,navigation:c.propTypesNavigation,autoplay:c.propTypesAutoplay,autoplayDelay:c.propTypesAutoplayDelay,transition:c.propTypesTransition,loop:c.propTypesLoop,slideRef:c.propTypesSlideRef},d.displayName="MaterialTailwind.Carousel";var x=d})(Eq);var Oq={},kq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(y,m){for(var f in m)Object.defineProperty(y,f,{enumerable:!0,get:m[f]})}t(e,{propTypesOpen:function(){return a},propTypesSize:function(){return i},propTypesOverlay:function(){return s},propTypesChildren:function(){return l},propTypesPlacement:function(){return c},propTypesOverlayProps:function(){return u},propTypesClassName:function(){return p},propTypesOnClose:function(){return h},propTypesDismiss:function(){return v},propTypesTransition:function(){return _},propTypesOverlayRef:function(){return w}});var r=o(Je),n=cr;function o(y){return y&&y.__esModule?y:{default:y}}var a=r.default.bool.isRequired,i=r.default.number,s=r.default.bool,l=r.default.node.isRequired,c=["top","right","bottom","left"],u=r.default.object,p=r.default.string,h=r.default.func,v=n.propTypesDismissType,_=r.default.object,w=r.default.oneOfType([r.default.func,r.default.shape({current:r.default.any})])})(kq);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,x){for(var E in x)Object.defineProperty(d,E,{enumerable:!0,get:x[E]})}t(e,{Drawer:function(){return f},default:function(){return b}});var r=_(g),n=_(Je),o=tn,a=qr,i=_(un),s=_(lt),l=Qe,c=_(Xe),u=Ke,p=kq;function h(d,x,E){return x in d?Object.defineProperty(d,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):d[x]=E,d}function v(){return v=Object.assign||function(d){for(var x=1;x=0)&&Object.prototype.propertyIsEnumerable.call(d,C)&&(E[C]=d[C])}return E}function m(d,x){if(d==null)return{};var E={},C=Object.keys(d),k,S;for(S=0;S=0)&&(E[k]=d[k]);return E}var f=r.default.forwardRef(function(d,x){var E=d.open,C=d.size,k=d.overlay,S=d.children,R=d.placement,T=d.overlayProps,P=d.className,j=d.onClose,L=d.dismiss,D=d.transition,B=d.overlayRef,V=y(d,["open","size","overlay","children","placement","overlayProps","className","onClose","dismiss","transition","overlayRef"]),q=(0,u.useTheme)().drawer,z=q.defaultProps,F=q.styles.base,$=(0,o.useAnimation)();C=C??z.size,k=k??z.overlay,R=R??z.placement,P=P??z.className,T=T??z.overlayProps,j=j??z.onClose;var W;L=(W=(0,i.default)(z.dismiss,L||{}))!==null&&W!==void 0?W:z.dismiss,D=D??z.transition;var G=(0,l.twMerge)((0,s.default)((0,c.default)(F.drawer),{"top-0 right-0":R==="right","bottom-0 left-0":R==="bottom","top-0 left-0":R==="top"||R==="left"}),P),Q=(0,l.twMerge)((0,s.default)((0,c.default)(F.overlay)),T==null?void 0:T.className),Z=(0,a.useFloating)({open:E,onOpenChange:j}).context,U=(0,a.useInteractions)([(0,a.useDismiss)(Z,L)]).getFloatingProps;r.default.useEffect(function(){$.start(E?"open":"close")},[E,$,R]);var J={open:{x:0,y:0},close:{x:R==="left"?-C:R==="right"?C:0,y:R==="top"?-C:R==="bottom"?C:0}},oe={unmount:{opacity:0,transition:{delay:.3}},mount:{opacity:1}};return r.default.createElement(r.default.Fragment,null,r.default.createElement(o.LazyMotion,{features:o.domAnimation},r.default.createElement(o.AnimatePresence,null,k&&E&&r.default.createElement(o.m.div,{ref:B,className:Q,initial:"unmount",exit:"unmount",animate:E?"mount":"unmount",variants:oe,transition:{duration:.3}})),r.default.createElement(o.m.div,v({},U(w({ref:x},V)),{className:G,style:{maxWidth:R==="left"||R==="right"?C:"100%",maxHeight:R==="top"||R==="bottom"?C:"100%",height:R==="left"||R==="right"?"100vh":"100%"},initial:"close",animate:$,variants:J,transition:D}),S)))});f.propTypes={open:p.propTypesOpen,size:p.propTypesSize,overlay:p.propTypesOverlay,children:p.propTypesChildren,placement:n.default.oneOf(p.propTypesPlacement),overlayProps:p.propTypesOverlayProps,className:p.propTypesClassName,onClose:p.propTypesOnClose,dismiss:p.propTypesDismiss,transition:p.propTypesTransition,overlayRef:p.propTypesOverlayRef},f.displayName="MaterialTailwind.Drawer";var b=f})(Oq);var Rq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(f,b){for(var d in b)Object.defineProperty(f,d,{enumerable:!0,get:b[d]})}t(e,{Badge:function(){return y},default:function(){return m}});var r=v(g),n=v(Je),o=v(un),a=v(lt),i=Qe,s=v(yr),l=v(Xe),c=Ke,u=GC;function p(f,b,d){return b in f?Object.defineProperty(f,b,{value:d,enumerable:!0,configurable:!0,writable:!0}):f[b]=d,f}function h(){return h=Object.assign||function(f){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(f,x)&&(d[x]=f[x])}return d}function w(f,b){if(f==null)return{};var d={},x=Object.keys(f),E,C;for(C=0;C=0)&&(d[E]=f[E]);return d}var y=r.default.forwardRef(function(f,b){var d=f.color,x=f.invisible,E=f.withBorder,C=f.overlap,k=f.placement,S=f.className,R=f.content,T=f.children,P=f.containerProps,j=f.containerRef,L=_(f,["color","invisible","withBorder","overlap","placement","className","content","children","containerProps","containerRef"]),D=(0,c.useTheme)().badge,B=D.valid,V=D.defaultProps,q=D.styles,z=q.base,F=q.placements,$=q.colors;d=d??V.color,x=x??V.invisible,E=E??V.withBorder,C=C??V.overlap,k=k??V.placement;var W;S=(W=(0,a.default)(S,V.className))!==null&&W!==void 0?W:V.className;var G;P=(G=(0,o.default)(P,V.containerProps||{}))!==null&&G!==void 0?G:V.containerProps;var Q=(0,l.default)(z.badge.initial),Z=(0,l.default)(z.badge.withBorder),U=(0,l.default)(z.badge.withContent),J=(0,l.default)($[(0,s.default)(B.colors,d,"red")]),oe=(0,l.default)(F[(0,s.default)(B.placements,k,"top-end")][(0,s.default)(B.overlaps,C,"square")]),ee,ie=(0,i.twMerge)((0,a.default)(Q,oe,J,(ee={},p(ee,Z,E),p(ee,U,R),ee)),S),ce=(0,i.twMerge)((0,a.default)((0,l.default)(z.container),P==null?void 0:P.className));return r.default.createElement("div",h({ref:j},P,{className:ce}),T,!x&&r.default.createElement("span",h({},L,{ref:b,className:ie}),R))});y.propTypes={color:n.default.oneOf(u.propTypesColor),invisible:u.propTypesInvisible,withBorder:u.propTypesWithBorder,overlap:u.propTypesOverlap,className:u.propTypesClassName,content:u.propTypesContent,children:u.propTypesChildren,placement:u.propTypesPlacement,containerProps:u.propTypesContainerProps,containerRef:u.propTypesContainerRef},y.displayName="MaterialTailwind.Badge";var m=y})(Rq);var Sq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(R,T){for(var P in T)Object.defineProperty(R,P,{enumerable:!0,get:T[P]})}t(e,{Rating:function(){return k},default:function(){return S}});var r=_(g),n=_(Je),o=_(lt),a=Qe,i=_(yr),s=_(Xe),l=Ke,c=KC;function u(R,T){(T==null||T>R.length)&&(T=R.length);for(var P=0,j=new Array(T);P=0)&&Object.prototype.propertyIsEnumerable.call(R,j)&&(P[j]=R[j])}return P}function d(R,T){if(R==null)return{};var P={},j=Object.keys(R),L,D;for(D=0;D=0)&&(P[L]=R[L]);return P}function x(R,T){return p(R)||y(R,T)||C(R,T)||m()}function E(R){return h(R)||w(R)||C(R)||f()}function C(R,T){if(R){if(typeof R=="string")return u(R,T);var P=Object.prototype.toString.call(R).slice(8,-1);if(P==="Object"&&R.constructor&&(P=R.constructor.name),P==="Map"||P==="Set")return Array.from(P);if(P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P))return u(R,T)}}var k=r.default.forwardRef(function(R,T){var P=R.count,j=R.value,L=R.ratedIcon,D=R.unratedIcon,B=R.ratedColor,V=R.unratedColor,q=R.className,z=R.onChange,F=R.readonly,$=b(R,["count","value","ratedIcon","unratedIcon","ratedColor","unratedColor","className","onChange","readonly"]),W,G,Q=(0,l.useTheme)().rating,Z=Q.valid,U=Q.defaultProps,J=Q.styles,oe=J.base,ee=J.colors;P=P??U.count,j=j??U.value,L=L??U.ratedIcon,L=L??U.ratedIcon,D=D??U.unratedIcon,B=B??U.ratedColor,V=V??U.unratedColor,q=q??U.className,z=z??U.onChange,F=F??U.readonly;var ie=x(r.default.useState(function(){return E(Array(j).fill("rated")).concat(E(Array(P-j).fill("un_rated")))}),2),ce=ie[0],ye=ie[1],Ce=x(r.default.useState(function(){return E(Array(P).fill("un_rated"))}),2),Se=Ce[0],Re=Ce[1],Te=x(r.default.useState(!1),2),je=Te[0],pe=Te[1],ve=(0,s.default)(ee[(0,i.default)(Z.colors,B,"yellow")]),Oe=(0,s.default)(ee[(0,i.default)(Z.colors,V,"blue-gray")]),Ae=(0,a.twMerge)((0,o.default)((0,s.default)(oe.rating),q)),se=(0,s.default)(oe.icon),we=L,xe=D,_e=r.default.isValidElement(L)&&r.default.cloneElement(we,{className:(0,a.twMerge)((0,o.default)(se,ve,we==null||(W=we.props)===null||W===void 0?void 0:W.className))}),ze=r.default.isValidElement(L)&&r.default.cloneElement(xe,{className:(0,a.twMerge)((0,o.default)(se,Oe,xe==null||(G=xe.props)===null||G===void 0?void 0:G.className))}),et=!r.default.isValidElement(L)&&r.default.createElement(L,{className:(0,a.twMerge)((0,o.default)(se,ve))}),We=!r.default.isValidElement(L)&&r.default.createElement(D,{className:(0,a.twMerge)((0,o.default)(se,Oe))}),Ar=function(Rt){return Rt.map(function(Pt,Nn){return r.default.createElement("span",{key:Nn,onClick:function(){if(!F){var $n=ce.map(function(me,ge){return ge<=Nn?"rated":"un_rated"});ye($n),z&&typeof z=="function"&&z($n.filter(function(me){return me==="rated"}).length)}},onMouseEnter:function(){if(!F){var $n=Se.map(function(me,ge){return ge<=Nn?"rated":"un_rated"});pe(!0),Re($n)}},onMouseLeave:function(){return!F&&pe(!1)}},r.default.isValidElement(Pt==="rated"?L:D)?Pt==="rated"?_e:ze:Pt==="rated"?et:We)})};return r.default.createElement("div",v({},$,{ref:T,className:Ae}),Ar(je?Se:ce))});k.propTypes={count:c.propTypesCount,value:c.propTypesValue,ratedIcon:c.propTypesRatedIcon,unratedIcon:c.propTypesUnratedIcon,ratedColor:n.default.oneOf(c.propTypesColor),unratedColor:n.default.oneOf(c.propTypesColor),className:c.propTypesClassName,onChange:c.propTypesOnChange,readonly:c.propTypesReadonly},k.displayName="MaterialTailwind.Rating";var S=k})(Sq);var Tq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(C,k){for(var S in k)Object.defineProperty(C,S,{enumerable:!0,get:k[S]})}t(e,{Slider:function(){return x},default:function(){return E}});var r=_(g),n=_(Je),o=_(un),a=_(lt),i=Qe,s=_(yr),l=_(Xe),c=Ke,u=YC;function p(C,k){(k==null||k>C.length)&&(k=C.length);for(var S=0,R=new Array(k);S=0)&&Object.prototype.propertyIsEnumerable.call(C,R)&&(S[R]=C[R])}return S}function f(C,k){if(C==null)return{};var S={},R=Object.keys(C),T,P;for(P=0;P=0)&&(S[T]=C[T]);return S}function b(C,k){return h(C)||w(C,k)||d(C,k)||y()}function d(C,k){if(C){if(typeof C=="string")return p(C,k);var S=Object.prototype.toString.call(C).slice(8,-1);if(S==="Object"&&C.constructor&&(S=C.constructor.name),S==="Map"||S==="Set")return Array.from(S);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return p(C,k)}}var x=r.default.forwardRef(function(C,k){var S=C.color,R=C.size,T=C.className,P=C.trackClassName,j=C.thumbClassName,L=C.barClassName,D=C.value,B=C.defaultValue,V=C.onChange,q=C.min,z=C.max,F=C.step,$=C.inputRef,W=C.inputProps,G=m(C,["color","size","className","trackClassName","thumbClassName","barClassName","value","defaultValue","onChange","min","max","step","inputRef","inputProps"]),Q=(0,c.useTheme)().slider,Z=Q.valid,U=Q.defaultProps,J=Q.styles,oe=J.base,ee=J.sizes,ie=J.colors,ce=b(r.default.useState(B||0),2),ye=ce[0],Ce=ce[1];r.default.useMemo(function(){B&&Ce(B)},[B]),S=S??U.color,R=R??U.size,q=q??U.min,z=z??U.max,F=F??U.step;var Se;T=(Se=(0,a.default)(U.className,T))!==null&&Se!==void 0?Se:U.className;var Re;j=(Re=(0,a.default)(U.thumbClassName,j))!==null&&Re!==void 0?Re:U.thumbClassName;var Te;P=(Te=(0,a.default)(U.trackClassName,P))!==null&&Te!==void 0?Te:U.trackClassName;var je;L=(je=(0,a.default)(U.barClassName,L))!==null&&je!==void 0?je:U.barClassName;var pe;W=(pe=(0,o.default)(W,(U==null?void 0:U.inputProps)||{}))!==null&&pe!==void 0?pe:U.inputProps;var ve=(0,i.twMerge)((0,a.default)((0,l.default)(oe.container),(0,l.default)(ie[(0,s.default)(Z.colors,S,"blue")]),(0,l.default)(ee[(0,s.default)(Z.sizes,R,"md")].container),T)),Oe=(0,i.twMerge)((0,a.default)((0,l.default)(oe.bar),L)),Ae=(0,a.default)((0,l.default)(oe.track),(0,l.default)(ee[(0,s.default)(Z.sizes,R,"md")].track)),se=(0,a.default)((0,l.default)(oe.thumb),(0,l.default)(ee[(0,s.default)(Z.sizes,R,"md")].thumb)),we=(0,a.default)((0,l.default)(oe.slider),(0,i.twMerge)(Ae,P),(0,i.twMerge)(se,j));return r.default.createElement("div",v({},G,{ref:k,className:ve}),r.default.createElement("label",{className:Oe,style:{width:"".concat(D||ye,"%")}}),r.default.createElement("input",v({ref:$,type:"range",max:z,min:q,step:F,className:we},D?{value:D}:null,{defaultValue:B,onChange:function(xe){return V?V(xe):Ce(Number(xe.target.value))}})))});x.propTypes={color:n.default.oneOf(u.propTypesColor),size:n.default.oneOf(u.propTypesSize),className:u.propTypesClassName,trackClassName:u.propTypesTrackClassName,thumbClassName:u.propTypesThumbClassName,barClassName:u.propTypesBarClassName,defaultValue:u.propTypesDefaultValue,value:u.propTypesValue,onChange:u.propTypesOnChange,min:u.propTypesMin,max:u.propTypesMax,step:u.propTypesStep,inputRef:u.propTypesInputRef,inputProps:u.propTypesInputProps},x.displayName="MaterialTailwind.Slider";var E=x})(Tq);var Pq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(f,b){for(var d in b)Object.defineProperty(f,d,{enumerable:!0,get:b[d]})}t(e,{Spinner:function(){return y},default:function(){return m}});var r=p(Je),n=v(g),o=p(lt),a=Qe,i=p(yr),s=p(Xe),l=Ke,c=XC;function u(){return u=Object.assign||function(f){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(f,x)&&(d[x]=f[x])}return d}function w(f,b){if(f==null)return{};var d={},x=Object.keys(f),E,C;for(C=0;C=0)&&(d[E]=f[E]);return d}var y=(0,n.forwardRef)(function(f,b){var d=f.color,x=f.className,E=_(f,["color","className"]),C=(0,l.useTheme)().spinner,k=C.defaultProps,S=C.valid,R=C.styles,T=R.base,P=R.colors;d=d??k.color;var j;x=(j=(0,o.default)(k.className,x))!==null&&j!==void 0?j:k.className;var L=(0,s.default)(P[(0,i.default)(S.colors,d,"blue")]),D=(0,a.twMerge)((0,o.default)((0,s.default)(T)),x),B,V;return n.default.createElement("svg",u({},E,{ref:b,className:D,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:(B=E==null?void 0:E.width)!==null&&B!==void 0?B:24,height:(V=E==null?void 0:E.height)!==null&&V!==void 0?V:24}),n.default.createElement("path",{d:"M32 3C35.8083 3 39.5794 3.75011 43.0978 5.20749C46.6163 6.66488 49.8132 8.80101 52.5061 11.4939C55.199 14.1868 57.3351 17.3837 58.7925 20.9022C60.2499 24.4206 61 28.1917 61 32C61 35.8083 60.2499 39.5794 58.7925 43.0978C57.3351 46.6163 55.199 49.8132 52.5061 52.5061C49.8132 55.199 46.6163 57.3351 43.0978 58.7925C39.5794 60.2499 35.8083 61 32 61C28.1917 61 24.4206 60.2499 20.9022 58.7925C17.3837 57.3351 14.1868 55.199 11.4939 52.5061C8.801 49.8132 6.66487 46.6163 5.20749 43.0978C3.7501 39.5794 3 35.8083 3 32C3 28.1917 3.75011 24.4206 5.2075 20.9022C6.66489 17.3837 8.80101 14.1868 11.4939 11.4939C14.1868 8.80099 17.3838 6.66487 20.9022 5.20749C24.4206 3.7501 28.1917 3 32 3L32 3Z",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),n.default.createElement("path",{d:"M32 3C36.5778 3 41.0906 4.08374 45.1692 6.16256C49.2477 8.24138 52.7762 11.2562 55.466 14.9605C58.1558 18.6647 59.9304 22.9531 60.6448 27.4748C61.3591 31.9965 60.9928 36.6232 59.5759 40.9762",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round",className:L}))});y.propTypes={color:r.default.oneOf(c.propTypesColor),className:c.propTypesClassName},y.displayName="MaterialTailwind.Spinner";var m=y})(Pq);var Mq={},L1={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(x,E){for(var C in E)Object.defineProperty(x,C,{enumerable:!0,get:E[C]})}t(e,{useTimelineItem:function(){return f},TimelineItem:function(){return b},default:function(){return d}});var r=u(g),n=Qe,o=u(Xe),a=Ke,i=es;function s(x,E){(E==null||E>x.length)&&(E=x.length);for(var C=0,k=new Array(E);C=0)&&Object.prototype.propertyIsEnumerable.call(x,k)&&(C[k]=x[k])}return C}function _(x,E){if(x==null)return{};var C={},k=Object.keys(x),S,R;for(R=0;R=0)&&(C[S]=x[S]);return C}function w(x,E){return l(x)||p(x,E)||y(x,E)||h()}function y(x,E){if(x){if(typeof x=="string")return s(x,E);var C=Object.prototype.toString.call(x).slice(8,-1);if(C==="Object"&&x.constructor&&(C=x.constructor.name),C==="Map"||C==="Set")return Array.from(C);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return s(x,E)}}var m=r.default.createContext(0);m.displayName="MaterialTailwind.TimelineItemContext";function f(){var x=r.default.useContext(m);if(!x)throw new Error("useTimelineItemContext() must be used within a TimelineItem. It happens when you use TimelineIcon, TimelineConnector or TimelineBody components outside the TimelineItem component.");return x}var b=r.default.forwardRef(function(x,E){var C=x.className,k=x.children,S=v(x,["className","children"]),R=(0,a.useTheme)().timelineItem,T=R.styles,P=T.base,j=w(r.default.useState(0),2),L=j[0],D=j[1],B=r.default.useMemo(function(){return[L,D]},[L,D]),V=(0,n.twMerge)((0,o.default)(P),C);return r.default.createElement(m.Provider,{value:B},r.default.createElement("li",c({ref:E},S,{className:V}),k))});b.propTypes={className:i.propTypeClassName,children:i.propTypeChildren.isRequired},b.displayName="MaterialTailwind.TimelineItem";var d=b})(L1);var Aq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(C,k){for(var S in k)Object.defineProperty(C,S,{enumerable:!0,get:k[S]})}t(e,{TimelineIcon:function(){return x},default:function(){return E}});var r=_(g),n=_(Je),o=qr,a=Qe,i=_(yr),s=_(Xe),l=Ke,c=L1,u=es;function p(C,k){(k==null||k>C.length)&&(k=C.length);for(var S=0,R=new Array(k);S=0)&&Object.prototype.propertyIsEnumerable.call(C,R)&&(S[R]=C[R])}return S}function f(C,k){if(C==null)return{};var S={},R=Object.keys(C),T,P;for(P=0;P=0)&&(S[T]=C[T]);return S}function b(C,k){return h(C)||w(C,k)||d(C,k)||y()}function d(C,k){if(C){if(typeof C=="string")return p(C,k);var S=Object.prototype.toString.call(C).slice(8,-1);if(S==="Object"&&C.constructor&&(S=C.constructor.name),S==="Map"||S==="Set")return Array.from(S);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return p(C,k)}}var x=r.default.forwardRef(function(C,k){var S=C.color,R=C.variant,T=C.className,P=C.children,j=m(C,["color","variant","className","children"]),L=(0,l.useTheme)().timelineIcon,D=L.styles,B=L.valid,V=D.base,q=D.variants,z=b((0,c.useTimelineItem)(),2),F=z[1],$=r.default.useRef(null),W=(0,o.useMergeRefs)([k,$]);r.default.useEffect(function(){var Z=$.current;if(Z){var U=Z.getBoundingClientRect().width;return F(U),function(){F(0)}}},[F,T,P]);var G=(0,s.default)(q[(0,i.default)(B.variants,R,"filled")][(0,i.default)(B.colors,S,"blue")]),Q=(0,a.twMerge)((0,s.default)(V),G,T);return r.default.createElement("span",v({ref:W},j,{className:Q}),P)});x.propTypes={children:u.propTypeChildren,className:u.propTypeClassName,color:n.default.oneOf(u.propTypeColor),variant:n.default.oneOf(u.propTypeVariant)},x.displayName="MaterialTailwind.TimelineIcon";var E=x})(Aq);var jq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,x){for(var E in x)Object.defineProperty(d,E,{enumerable:!0,get:x[E]})}t(e,{TimelineHeader:function(){return f},default:function(){return b}});var r=p(g),n=Qe,o=p(Xe),a=Ke,i=L1,s=es;function l(d,x){(x==null||x>d.length)&&(x=d.length);for(var E=0,C=new Array(x);E=0)&&Object.prototype.propertyIsEnumerable.call(d,C)&&(E[C]=d[C])}return E}function w(d,x){if(d==null)return{};var E={},C=Object.keys(d),k,S;for(S=0;S=0)&&(E[k]=d[k]);return E}function y(d,x){return c(d)||h(d,x)||m(d,x)||v()}function m(d,x){if(d){if(typeof d=="string")return l(d,x);var E=Object.prototype.toString.call(d).slice(8,-1);if(E==="Object"&&d.constructor&&(E=d.constructor.name),E==="Map"||E==="Set")return Array.from(E);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return l(d,x)}}var f=r.default.forwardRef(function(d,x){var E=d.className,C=d.children,k=_(d,["className","children"]),S=(0,a.useTheme)().timelineBody,R=S.styles,T=R.base,P=y((0,i.useTimelineItem)(),1),j=P[0],L=(0,n.twMerge)((0,o.default)(T),E);return r.default.createElement("div",u({},k,{ref:x,className:L}),r.default.createElement("span",{className:"pointer-events-none invisible h-full flex-shrink-0",style:{width:"".concat(j,"px")}}),r.default.createElement("div",null,C))});f.propTypes={children:s.propTypeChildren,className:s.propTypeClassName},f.displayName="MaterialTailwind.TimelineHeader";var b=f})(jq);var Iq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,_){for(var w in _)Object.defineProperty(v,w,{enumerable:!0,get:_[w]})}t(e,{TimelineHeader:function(){return p},default:function(){return h}});var r=l(g),n=Qe,o=l(Xe),a=Ke,i=es;function s(){return s=Object.assign||function(v){for(var _=1;_=0)&&Object.prototype.propertyIsEnumerable.call(v,y)&&(w[y]=v[y])}return w}function u(v,_){if(v==null)return{};var w={},y=Object.keys(v),m,f;for(f=0;f=0)&&(w[m]=v[m]);return w}var p=r.default.forwardRef(function(v,_){var w=v.className,y=v.children,m=c(v,["className","children"]),f=(0,a.useTheme)().timelineHeader,b=f.styles,d=b.base,x=(0,n.twMerge)((0,o.default)(d),w);return r.default.createElement("div",s({},m,{ref:_,className:x}),y)});p.propTypes={children:i.propTypeChildren,className:i.propTypeClassName},p.displayName="MaterialTailwind.TimelineHeader";var h=p})(Iq);var Lq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(d,x){for(var E in x)Object.defineProperty(d,E,{enumerable:!0,get:x[E]})}t(e,{TimelineConnector:function(){return f},default:function(){return b}});var r=p(g),n=Qe,o=p(Xe),a=Ke,i=L1,s=es;function l(d,x){(x==null||x>d.length)&&(x=d.length);for(var E=0,C=new Array(x);E=0)&&Object.prototype.propertyIsEnumerable.call(d,C)&&(E[C]=d[C])}return E}function w(d,x){if(d==null)return{};var E={},C=Object.keys(d),k,S;for(S=0;S=0)&&(E[k]=d[k]);return E}function y(d,x){return c(d)||h(d,x)||m(d,x)||v()}function m(d,x){if(d){if(typeof d=="string")return l(d,x);var E=Object.prototype.toString.call(d).slice(8,-1);if(E==="Object"&&d.constructor&&(E=d.constructor.name),E==="Map"||E==="Set")return Array.from(E);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return l(d,x)}}var f=r.default.forwardRef(function(d,x){var E=d.className,C=d.children,k=_(d,["className","children"]),S,R=(0,a.useTheme)().timelineConnector,T=R.styles,P=T.base,j=y((0,i.useTimelineItem)(),1),L=j[0],D=(0,o.default)(P.line),B=(0,n.twMerge)((0,o.default)(P.container),E);return r.default.createElement("span",u({},k,{ref:x,className:B,style:{top:"".concat(L,"px"),width:"".concat(L,"px"),opacity:L?1:0,height:"calc(100% - ".concat(L,"px)")}}),C&&r.default.isValidElement(C)?r.default.cloneElement(C,{className:(0,n.twMerge)(D,(S=C.props)===null||S===void 0?void 0:S.className)}):r.default.createElement("span",{className:D}))});f.propTypes={children:s.propTypeChildren,className:s.propTypeClassName},f.displayName="MaterialTailwind.TimelineConnector";var b=f})(Lq);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(f,b){for(var d in b)Object.defineProperty(f,d,{enumerable:!0,get:b[d]})}t(e,{Timeline:function(){return y},TimelineItem:function(){return s.default},TimelineIcon:function(){return l.default},TimelineBody:function(){return c.default},TimelineHeader:function(){return u.default},TimelineConnector:function(){return p.default},default:function(){return m}});var r=v(g),n=Qe,o=v(Xe),a=Ke,i=es,s=v(L1),l=v(Aq),c=v(jq),u=v(Iq),p=v(Lq);function h(){return h=Object.assign||function(f){for(var b=1;b=0)&&Object.prototype.propertyIsEnumerable.call(f,x)&&(d[x]=f[x])}return d}function w(f,b){if(f==null)return{};var d={},x=Object.keys(f),E,C;for(C=0;C=0)&&(d[E]=f[E]);return d}var y=r.default.forwardRef(function(f,b){var d=f.className,x=f.children,E=_(f,["className","children"]),C=(0,a.useTheme)().timeline,k=C.styles,S=k.base,R=(0,n.twMerge)((0,o.default)(S),d);return r.default.createElement("ul",h({ref:b},E,{className:R}),x)});y.propTypes={className:i.propTypeClassName,children:i.propTypeChildren},y.displayName="MaterialTailwind.Timeline";var m=Object.assign(y,{Item:s.default,Icon:l.default,Header:u.default,Body:c.default,Connector:p.default})})(Mq);var Nq={},$q={},AO={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,u){for(var p in u)Object.defineProperty(c,p,{enumerable:!0,get:u[p]})}t(e,{propTypesActiveStep:function(){return o},propTypesIsLastStep:function(){return a},propTypesIsFirstStep:function(){return i},propTypesChildren:function(){return s},propTypesClassName:function(){return l}});var r=n(Je);function n(c){return c&&c.__esModule?c:{default:c}}var o=r.default.number,a=r.default.func,i=r.default.func,s=r.default.node,l=r.default.string})(AO);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,_){for(var w in _)Object.defineProperty(v,w,{enumerable:!0,get:_[w]})}t(e,{Step:function(){return p},default:function(){return h}});var r=l(g),n=Qe,o=l(Xe),a=Ke,i=AO;function s(){return s=Object.assign||function(v){for(var _=1;_=0)&&Object.prototype.propertyIsEnumerable.call(v,y)&&(w[y]=v[y])}return w}function u(v,_){if(v==null)return{};var w={},y=Object.keys(v),m,f;for(f=0;f=0)&&(w[m]=v[m]);return w}var p=r.default.forwardRef(function(v,_){var w=v.className;v.activeClassName,v.completedClassName;var y=v.children,m=c(v,["className","activeClassName","completedClassName","children"]),f=(0,a.useTheme)().step,b=f.styles.base,d=(0,n.twMerge)((0,o.default)(b.initial),w);return r.default.createElement("div",s({},m,{ref:_,className:d}),y)});p.propTypes={className:i.propTypesClassName,activeClassName:i.propTypesClassName,completedClassName:i.propTypesClassName,children:i.propTypesChildren},p.displayName="MaterialTailwind.Step";var h=p})($q);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(S,R){for(var T in R)Object.defineProperty(S,T,{enumerable:!0,get:R[T]})}t(e,{Stepper:function(){return C},Step:function(){return s.default},default:function(){return k}});var r=v(g),n=qr,o=Qe,a=v(Xe),i=Ke,s=v($q),l=AO;function c(S,R){(R==null||R>S.length)&&(R=S.length);for(var T=0,P=new Array(R);T=0)&&Object.prototype.propertyIsEnumerable.call(S,P)&&(T[P]=S[P])}return T}function d(S,R){if(S==null)return{};var T={},P=Object.keys(S),j,L;for(L=0;L=0)&&(T[j]=S[j]);return T}function x(S,R){return u(S)||_(S,R)||E(S,R)||w()}function E(S,R){if(S){if(typeof S=="string")return c(S,R);var T=Object.prototype.toString.call(S).slice(8,-1);if(T==="Object"&&S.constructor&&(T=S.constructor.name),T==="Map"||T==="Set")return Array.from(T);if(T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))return c(S,R)}}var C=r.default.forwardRef(function(S,R){var T=S.activeStep,P=S.isFirstStep,j=S.isLastStep,L=S.className,D=S.lineClassName,B=S.activeLineClassName,V=S.children,q=b(S,["activeStep","isFirstStep","isLastStep","className","lineClassName","activeLineClassName","children"]),z=(0,i.useTheme)(),F=z.stepper,$=z.step,W=F.styles.base,G=$.styles,Q=G.base,Z=r.default.useRef(null),U=x(r.default.useState(0),2),J=U[0],oe=U[1],ee=T===0,ie=Array.isArray(V)&&T===V.length-1,ce=Array.isArray(V)&&T>V.length-1;r.default.useEffect(function(){if(Z.current){var pe=V,ve=Z.current.getBoundingClientRect().width,Oe=ve/(pe.length-1);oe(Oe)}},[V]);var ye=r.default.useMemo(function(){if(!ce)return J*T},[T,ce,J]);(0,n.useMergeRefs)([R,Z]);var Ce=(0,o.twMerge)((0,a.default)(W.stepper),L),Se=(0,o.twMerge)((0,a.default)(W.line.initial),D),Re=(0,o.twMerge)(Se,(0,a.default)(W.line.active),B),Te=(0,a.default)(Q.active),je=(0,a.default)(Q.completed);return r.default.useEffect(function(){j&&typeof j=="function"&&j(ie),P&&typeof P=="function"&&P(ee)},[P,ee,j,ie]),r.default.createElement("div",h({},q,{ref:Z,className:Ce}),r.default.createElement("div",{className:Se}),r.default.createElement("div",{className:Re,style:{width:"".concat(ye,"px")}}),Array.isArray(V)?V.map(function(pe,ve){var Oe,Ae;return r.default.cloneElement(pe,f(y({key:ve},pe.props),{className:(0,o.twMerge)(pe.props.className,ve===T?(0,o.twMerge)(Te,(Oe=pe.props)===null||Oe===void 0?void 0:Oe.activeClassName):ve=0)&&Object.prototype.propertyIsEnumerable.call(y,b)&&(f[b]=y[b])}return f}function v(y,m){if(y==null)return{};var f={},b=Object.keys(y),d,x;for(x=0;x=0)&&(f[d]=y[d]);return f}var _=r.default.forwardRef(function(y,m){var f=y.children,b=h(y,["children"]),d,x=(0,o.useSpeedDial)(),E=x.getReferenceProps,C=x.refs,k=(0,n.useMergeRefs)([m,C.setReference]);return r.default.cloneElement(f,c({},E(p(c({},b),{ref:k,className:(0,a.twMerge)(f==null||(d=f.props)===null||d===void 0?void 0:d.className,b==null?void 0:b.className)}))))});_.propTypes={children:i.propTypesChildren},_.displayName="MaterialTailwind.SpeedDialHandler";var w=_}(bx)),bx}var yx={},sA;function TLe(){return sA||(sA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(y,m){for(var f in m)Object.defineProperty(y,f,{enumerable:!0,get:m[f]})}t(e,{SpeedDialContent:function(){return _},default:function(){return w}});var r=p(g),n=tn,o=qr,a=jO(),i=Ke,s=Qe,l=p(Xe),c=N1;function u(){return u=Object.assign||function(y){for(var m=1;m=0)&&Object.prototype.propertyIsEnumerable.call(y,b)&&(f[b]=y[b])}return f}function v(y,m){if(y==null)return{};var f={},b=Object.keys(y),d,x;for(x=0;x=0)&&(f[d]=y[d]);return f}var _=r.default.forwardRef(function(y,m){var f=y.children,b=y.className,d=h(y,["children","className"]),x=(0,i.useTheme)(),E=x.speedDialContent.styles,C=(0,a.useSpeedDial)(),k=C.x,S=C.y,R=C.refs,T=C.open,P=C.strategy,j=C.getFloatingProps,L=C.animation,D=(0,o.useMergeRefs)([m,R.setFloating]),B=(0,s.twMerge)((0,l.default)(E),b),V=n.AnimatePresence;return r.default.createElement(n.LazyMotion,{features:n.domAnimation},r.default.createElement(V,null,T&&r.default.createElement("div",u({},d,{ref:D,className:B,style:{position:P,top:S??0,left:k??0}},j()),r.default.Children.map(f,function(q){return r.default.createElement(n.m.div,{initial:"unmount",exit:"unmount",animate:T?"mount":"unmount",variants:L},q)}))))});_.propTypes={children:c.propTypesChildren,className:c.propTypesClassName},_.displayName="MaterialTailwind.SpeedDialContent";var w=_}(yx)),yx}var Dq={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,p){for(var h in p)Object.defineProperty(u,h,{enumerable:!0,get:p[h]})}t(e,{SpeedDialAction:function(){return l},default:function(){return c}});var r=s(g),n=Ke,o=Qe,a=s(Xe),i=N1;function s(u){return u&&u.__esModule?u:{default:u}}var l=r.default.forwardRef(function(u,p){var h=u.className,v=u.children,_=(0,n.useTheme)(),w=_.speedDialAction.styles,y=(0,o.twMerge)((0,a.default)(w),h);return r.default.createElement("button",{ref:p,className:y},v)});l.propTypes={children:i.propTypesChildren,className:i.propTypesClassName},l.displayName="SpeedDialAction";var c=l})(Dq);var lA;function jO(){return lA||(lA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(x,E){for(var C in E)Object.defineProperty(x,C,{enumerable:!0,get:E[C]})}t(e,{SpeedDialContext:function(){return m},useSpeedDial:function(){return f},SpeedDial:function(){return b},SpeedDialHandler:function(){return s.default},SpeedDialContent:function(){return l.default},SpeedDialAction:function(){return c.default},default:function(){return d}});var r=h(g),n=qr,o=Ke,a=h(un),i=N1,s=h(SLe()),l=h(TLe()),c=h(Dq);function u(x,E){(E==null||E>x.length)&&(E=x.length);for(var C=0,k=new Array(E);C.");return x}function b(x){var E=x.open,C=x.handler,k=x.placement,S=x.offset,R=x.dismiss,T=x.animate,P=x.children,j=(0,o.useTheme)(),L=j.speedDial.defaultProps,D=w(r.default.useState(!1),2),B=D[0],V=D[1];E=E??B,C=C??V,k=k??L.placement,S=S??L.offset,R=R??L.dismiss,T=T??L.animate;var q={unmount:{opacity:0,transform:"scale(0.5)",transition:{duration:.2,times:[.4,0,.2,1]}},mount:{opacity:1,transform:"scale(1)",transition:{duration:.2,times:[.4,0,.2,1]}}},z=(0,a.default)(q,T),F=(0,n.useFloatingNodeId)(),$=(0,n.useFloating)({open:E,nodeId:F,placement:k,onOpenChange:C,whileElementsMounted:n.autoUpdate,middleware:[(0,n.offset)(S),(0,n.flip)(),(0,n.shift)()]}),W=$.x,G=$.y,Q=$.strategy,Z=$.refs,U=$.context,J=(0,n.useInteractions)([(0,n.useHover)(U,{handleClose:(0,n.safePolygon)()}),(0,n.useDismiss)(U,R)]),oe=J.getReferenceProps,ee=J.getFloatingProps,ie=r.default.useMemo(function(){return{x:W,y:G,strategy:Q,refs:Z,open:E,context:U,getReferenceProps:oe,getFloatingProps:ee,animation:z}},[U,ee,oe,Z,Q,W,G,E,z]);return r.default.createElement(m.Provider,{value:ie},r.default.createElement("div",{className:"group"},r.default.createElement(n.FloatingNode,{id:F},P)))}b.propTypes={open:i.propTypesOpen,handler:i.propTypesHanlder,placement:i.propTypesPlacement,offset:i.propTypesOffset,dismiss:i.propTypesDismiss,className:i.propTypesClassName,children:i.propTypesChildren,animate:i.propTypesAnimate},b.displayName="MaterialTailwind.SpeedDial";var d=Object.assign(b,{Handler:s.default,Content:l.default,Action:c.default})}(vx)),vx}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),t(Pz,e),t(JU,e),t(eW,e),t(tW,e),t(nW,e),t(oW,e),t(lW,e),t(cW,e),t(uW,e),t(Nw,e),t(KW,e),t(YW,e),t(eq,e),t(rq,e),t(aq,e),t(iq,e),t(sq,e),t(cq,e),t(uq,e),t(mq,e),t(gq,e),t(vq,e),t(bq,e),t(wq,e),t(_q,e),t(Eq,e),t(Oq,e),t(Rq,e),t(Sq,e),t(Tq,e),t(Pq,e),t(Mq,e),t(Nq,e),t(jO(),e),t(Ke,e),t(LC,e);function t(r,n){return Object.keys(r).forEach(function(o){o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:function(){return r[o]}})}),r}})(ae);function pa(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:IO(e)?2:LO(e)?3:0}function xd(e,t){return xf(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function PLe(e,t){return xf(e)===2?e.get(t):e[t]}function Fq(e,t,r){var n=xf(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function zq(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function IO(e){return NLe&&e instanceof Map}function LO(e){return $Le&&e instanceof Set}function rc(e){return e.o||e.t}function NO(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Vq(e);delete t[mr];for(var r=_d(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=MLe),Object.freeze(e),t&&$c(e,function(r,n){return $O(n,!0)},!0)),e}function MLe(){pa(2)}function DO(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function qa(e){var t=a9[e];return t||pa(18,e),t}function ALe(e,t){a9[e]||(a9[e]=t)}function r9(){return Yp}function wx(e,t){t&&(qa("Patches"),e.u=[],e.s=[],e.v=t)}function T7(e){n9(e),e.p.forEach(jLe),e.p=null}function n9(e){e===Yp&&(Yp=e.l)}function cA(e){return Yp={p:[],l:Yp,h:e,m:!0,_:0}}function jLe(e){var t=e[mr];t.i===0||t.i===1?t.j():t.g=!0}function xx(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||qa("ES5").S(t,e,n),n?(r[mr].P&&(T7(t),pa(4)),Ki(e)&&(e=P7(t,e),t.l||M7(t,e)),t.u&&qa("Patches").M(r[mr].t,e,t.u,t.s)):e=P7(t,r,[]),T7(t),t.u&&t.v(t.u,t.s),e!==Bq?e:void 0}function P7(e,t,r){if(DO(t))return t;var n=t[mr];if(!n)return $c(t,function(s,l){return uA(e,n,t,s,l,r)},!0),t;if(n.A!==e)return t;if(!n.P)return M7(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=n.i===4||n.i===5?n.o=NO(n.k):n.o,a=o,i=!1;n.i===3&&(a=new Set(o),o.clear(),i=!0),$c(a,function(s,l){return uA(e,n,o,s,l,r,i)}),M7(e,o,!1),r&&e.u&&qa("Patches").N(n,r,e.u,e.s)}return n.o}function uA(e,t,r,n,o,a,i){if(bl(o)){var s=P7(e,o,a&&t&&t.i!==3&&!xd(t.R,n)?a.concat(n):void 0);if(Fq(r,n,s),!bl(s))return;e.m=!1}else i&&r.add(o);if(Ki(o)&&!DO(o)){if(!e.h.D&&e._<1)return;P7(e,o),t&&t.A.l||M7(e,o)}}function M7(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&$O(t,r)}function _x(e,t){var r=e[mr];return(r?rc(r):e)[t]}function dA(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Ts(e){e.P||(e.P=!0,e.l&&Ts(e.l))}function Ex(e){e.o||(e.o=NO(e.t))}function o9(e,t,r){var n=IO(t)?qa("MapSet").F(t,r):LO(t)?qa("MapSet").T(t,r):e.O?function(o,a){var i=Array.isArray(o),s={i:i?1:0,A:a?a.A:r9(),P:!1,I:!1,R:{},l:a,t:o,k:null,o:null,j:null,C:!1},l=s,c=Xp;i&&(l=[s],c=Lh);var u=Proxy.revocable(l,c),p=u.revoke,h=u.proxy;return s.k=h,s.j=p,h}(t,r):qa("ES5").J(t,r);return(r?r.A:r9()).p.push(n),n}function ILe(e){return bl(e)||pa(22,e),function t(r){if(!Ki(r))return r;var n,o=r[mr],a=xf(r);if(o){if(!o.P&&(o.i<4||!qa("ES5").K(o)))return o.t;o.I=!0,n=fA(r,a),o.I=!1}else n=fA(r,a);return $c(n,function(i,s){o&&PLe(o.t,i)===s||Fq(n,i,t(s))}),a===3?new Set(n):n}(e)}function fA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return NO(e)}function LLe(){function e(a,i){var s=o[a];return s?s.enumerable=i:o[a]=s={configurable:!0,enumerable:i,get:function(){var l=this[mr];return Xp.get(l,a)},set:function(l){var c=this[mr];Xp.set(c,a,l)}},s}function t(a){for(var i=a.length-1;i>=0;i--){var s=a[i][mr];if(!s.P)switch(s.i){case 5:n(s)&&Ts(s);break;case 4:r(s)&&Ts(s)}}}function r(a){for(var i=a.t,s=a.k,l=_d(s),c=l.length-1;c>=0;c--){var u=l[c];if(u!==mr){var p=i[u];if(p===void 0&&!xd(i,u))return!0;var h=s[u],v=h&&h[mr];if(v?v.t!==p:!zq(h,p))return!0}}var _=!!i[mr];return l.length!==_d(i).length+(_?0:1)}function n(a){var i=a.k;if(i.length!==a.t.length)return!0;var s=Object.getOwnPropertyDescriptor(i,i.length-1);if(s&&!s.get)return!0;for(var l=0;l1?m-1:0),b=1;b1?u-1:0),h=1;h=0;o--){var a=n[o];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}o>-1&&(n=n.slice(o+1));var i=qa("Patches").$;return bl(r)?i(r,n):this.produce(r,function(s){return i(s,n)})},e}(),wo=new FLe,Hq=wo.produce;wo.produceWithPatches.bind(wo);wo.setAutoFreeze.bind(wo);wo.setUseProxies.bind(wo);wo.applyPatches.bind(wo);wo.createDraft.bind(wo);wo.finishDraft.bind(wo);function Zp(e){"@babel/helpers - typeof";return Zp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zp(e)}function zLe(e,t){if(Zp(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zp(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BLe(e){var t=zLe(e,"string");return Zp(t)==="symbol"?t:String(t)}function VLe(e,t,r){return t=BLe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function vA(e){for(var t=1;t"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(vn(1));return r(Uq)(e,t)}if(typeof e!="function")throw new Error(vn(2));var o=e,a=t,i=[],s=i,l=!1;function c(){s===i&&(s=i.slice())}function u(){if(l)throw new Error(vn(3));return a}function p(w){if(typeof w!="function")throw new Error(vn(4));if(l)throw new Error(vn(5));var y=!0;return c(),s.push(w),function(){if(y){if(l)throw new Error(vn(6));y=!1,c();var f=s.indexOf(w);s.splice(f,1),i=null}}}function h(w){if(!HLe(w))throw new Error(vn(7));if(typeof w.type>"u")throw new Error(vn(8));if(l)throw new Error(vn(9));try{l=!0,a=o(a,w)}finally{l=!1}for(var y=i=s,m=0;m"u")throw new Error(vn(12));if(typeof r(void 0,{type:A7.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(vn(13))})}function WLe(e){for(var t=Object.keys(e),r={},n=0;n"u")throw c&&c.type,new Error(vn(14));p[v]=y,u=u||y!==w}return u=u||a.length!==Object.keys(l).length,u?p:l}}function j7(){for(var e=arguments.length,t=new Array(e),r=0;r0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]{const{user:r,accessToken:n}=t.payload;e.user=r,e.accessToken=n,e.isAuthenticated=!0},logout:e=>{e.isAuthenticated=!1,e.user=null,e.accessToken=null},removeFollower:(e,t)=>{var r,n,o,a;(a=(r=e.user)==null?void 0:r.following)==null||a.splice((o=(n=e.user)==null?void 0:n.following)==null?void 0:o.indexOf(t.payload),1)},addFollower:(e,t)=>{var r,n,o,a;(n=(r=e.user)==null?void 0:r.following)!=null&&n.includes(t.payload)||(a=(o=e.user)==null?void 0:o.following)==null||a.push(t.payload)},updateUsername:(e,t)=>{e.user&&(e.user.username=t.payload)}}}),{setCredentials:Qp,logout:s9,removeFollower:X5t,addFollower:Z5t,updateUsername:Q5t}=Yq.actions,yNe=Yq.reducer;var Xq={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},CA=De.createContext&&De.createContext(Xq),rl=globalThis&&globalThis.__assign||function(){return rl=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt=>{const r=CNe.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ii=e=>(e=e.toLowerCase(),t=>Hw(t)===e),Uw=e=>t=>typeof t===e,{isArray:_f}=Array,Jp=Uw("undefined");function ONe(e){return e!==null&&!Jp(e)&&e.constructor!==null&&!Jp(e.constructor)&&Go(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rG=ii("ArrayBuffer");function kNe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rG(e.buffer),t}const RNe=Uw("string"),Go=Uw("function"),nG=Uw("number"),Ww=e=>e!==null&&typeof e=="object",SNe=e=>e===!0||e===!1,dy=e=>{if(Hw(e)!=="object")return!1;const t=BO(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},TNe=ii("Date"),PNe=ii("File"),MNe=ii("Blob"),ANe=ii("FileList"),jNe=e=>Ww(e)&&Go(e.pipe),INe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Go(e.append)&&((t=Hw(e))==="formdata"||t==="object"&&Go(e.toString)&&e.toString()==="[object FormData]"))},LNe=ii("URLSearchParams"),NNe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function D1(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),_f(e))for(n=0,o=e.length;n0;)if(o=r[n],t===o.toLowerCase())return o;return null}const aG=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),iG=e=>!Jp(e)&&e!==aG;function l9(){const{caseless:e}=iG(this)&&this||{},t={},r=(n,o)=>{const a=e&&oG(t,o)||o;dy(t[a])&&dy(n)?t[a]=l9(t[a],n):dy(n)?t[a]=l9({},n):_f(n)?t[a]=n.slice():t[a]=n};for(let n=0,o=arguments.length;n(D1(t,(o,a)=>{r&&Go(o)?e[a]=tG(o,r):e[a]=o},{allOwnKeys:n}),e),DNe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),FNe=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},zNe=(e,t,r,n)=>{let o,a,i;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!n||n(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=r!==!1&&BO(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},BNe=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},VNe=e=>{if(!e)return null;if(_f(e))return e;let t=e.length;if(!nG(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},HNe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&BO(Uint8Array)),UNe=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},WNe=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},qNe=ii("HTMLFormElement"),GNe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),OA=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),KNe=ii("RegExp"),sG=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};D1(r,(o,a)=>{t(o,a,e)!==!1&&(n[a]=o)}),Object.defineProperties(e,n)},YNe=e=>{sG(e,(t,r)=>{if(Go(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Go(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},XNe=(e,t)=>{const r={},n=o=>{o.forEach(a=>{r[a]=!0})};return _f(e)?n(e):n(String(e).split(t)),r},ZNe=()=>{},QNe=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Rx="abcdefghijklmnopqrstuvwxyz",kA="0123456789",lG={DIGIT:kA,ALPHA:Rx,ALPHA_DIGIT:Rx+Rx.toUpperCase()+kA},JNe=(e=16,t=lG.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function e$e(e){return!!(e&&Go(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const t$e=e=>{const t=new Array(10),r=(n,o)=>{if(Ww(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const a=_f(n)?[]:{};return D1(n,(i,s)=>{const l=r(i,o+1);!Jp(l)&&(a[s]=l)}),t[o]=void 0,a}}return n};return r(e,0)},r$e=ii("AsyncFunction"),n$e=e=>e&&(Ww(e)||Go(e))&&Go(e.then)&&Go(e.catch),ke={isArray:_f,isArrayBuffer:rG,isBuffer:ONe,isFormData:INe,isArrayBufferView:kNe,isString:RNe,isNumber:nG,isBoolean:SNe,isObject:Ww,isPlainObject:dy,isUndefined:Jp,isDate:TNe,isFile:PNe,isBlob:MNe,isRegExp:KNe,isFunction:Go,isStream:jNe,isURLSearchParams:LNe,isTypedArray:HNe,isFileList:ANe,forEach:D1,merge:l9,extend:$Ne,trim:NNe,stripBOM:DNe,inherits:FNe,toFlatObject:zNe,kindOf:Hw,kindOfTest:ii,endsWith:BNe,toArray:VNe,forEachEntry:UNe,matchAll:WNe,isHTMLForm:qNe,hasOwnProperty:OA,hasOwnProp:OA,reduceDescriptors:sG,freezeMethods:YNe,toObjectSet:XNe,toCamelCase:GNe,noop:ZNe,toFiniteNumber:QNe,findKey:oG,global:aG,isContextDefined:iG,ALPHABET:lG,generateString:JNe,isSpecCompliantForm:e$e,toJSONObject:t$e,isAsyncFn:r$e,isThenable:n$e};function jt(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}ke.inherits(jt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ke.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const cG=jt.prototype,uG={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{uG[e]={value:e}});Object.defineProperties(jt,uG);Object.defineProperty(cG,"isAxiosError",{value:!0});jt.from=(e,t,r,n,o,a)=>{const i=Object.create(cG);return ke.toFlatObject(e,i,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),jt.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const o$e=null;function c9(e){return ke.isPlainObject(e)||ke.isArray(e)}function dG(e){return ke.endsWith(e,"[]")?e.slice(0,-2):e}function RA(e,t,r){return e?e.concat(t).map(function(o,a){return o=dG(o),!r&&a?"["+o+"]":o}).join(r?".":""):t}function a$e(e){return ke.isArray(e)&&!e.some(c9)}const i$e=ke.toFlatObject(ke,{},null,function(t){return/^is[A-Z]/.test(t)});function qw(e,t,r){if(!ke.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=ke.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,y){return!ke.isUndefined(y[w])});const n=r.metaTokens,o=r.visitor||u,a=r.dots,i=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&ke.isSpecCompliantForm(t);if(!ke.isFunction(o))throw new TypeError("visitor must be a function");function c(_){if(_===null)return"";if(ke.isDate(_))return _.toISOString();if(!l&&ke.isBlob(_))throw new jt("Blob is not supported. Use a Buffer instead.");return ke.isArrayBuffer(_)||ke.isTypedArray(_)?l&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function u(_,w,y){let m=_;if(_&&!y&&typeof _=="object"){if(ke.endsWith(w,"{}"))w=n?w:w.slice(0,-2),_=JSON.stringify(_);else if(ke.isArray(_)&&a$e(_)||(ke.isFileList(_)||ke.endsWith(w,"[]"))&&(m=ke.toArray(_)))return w=dG(w),m.forEach(function(b,d){!(ke.isUndefined(b)||b===null)&&t.append(i===!0?RA([w],d,a):i===null?w:w+"[]",c(b))}),!1}return c9(_)?!0:(t.append(RA(y,w,a),c(_)),!1)}const p=[],h=Object.assign(i$e,{defaultVisitor:u,convertValue:c,isVisitable:c9});function v(_,w){if(!ke.isUndefined(_)){if(p.indexOf(_)!==-1)throw Error("Circular reference detected in "+w.join("."));p.push(_),ke.forEach(_,function(m,f){(!(ke.isUndefined(m)||m===null)&&o.call(t,m,ke.isString(f)?f.trim():f,w,h))===!0&&v(m,w?w.concat(f):[f])}),p.pop()}}if(!ke.isObject(e))throw new TypeError("data must be an object");return v(e),t}function SA(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function VO(e,t){this._pairs=[],e&&qw(e,this,t)}const fG=VO.prototype;fG.append=function(t,r){this._pairs.push([t,r])};fG.toString=function(t){const r=t?function(n){return t.call(this,n,SA)}:SA;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function s$e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function hG(e,t,r){if(!t)return e;const n=r&&r.encode||s$e,o=r&&r.serialize;let a;if(o?a=o(t,r):a=ke.isURLSearchParams(t)?t.toString():new VO(t,r).toString(n),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class l$e{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ke.forEach(this.handlers,function(n){n!==null&&t(n)})}}const TA=l$e,pG={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},c$e=typeof URLSearchParams<"u"?URLSearchParams:VO,u$e=typeof FormData<"u"?FormData:null,d$e=typeof Blob<"u"?Blob:null,f$e=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),h$e=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Va={isBrowser:!0,classes:{URLSearchParams:c$e,FormData:u$e,Blob:d$e},isStandardBrowserEnv:f$e,isStandardBrowserWebWorkerEnv:h$e,protocols:["http","https","file","blob","url","data"]};function p$e(e,t){return qw(e,new Va.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,a){return Va.isNode&&ke.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function m$e(e){return ke.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function g$e(e){const t={},r=Object.keys(e);let n;const o=r.length;let a;for(n=0;n=r.length;return i=!i&&ke.isArray(o)?o.length:i,l?(ke.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!s):((!o[i]||!ke.isObject(o[i]))&&(o[i]=[]),t(r,n,o[i],a)&&ke.isArray(o[i])&&(o[i]=g$e(o[i])),!s)}if(ke.isFormData(e)&&ke.isFunction(e.entries)){const r={};return ke.forEachEntry(e,(n,o)=>{t(m$e(n),o,r,0)}),r}return null}const v$e={"Content-Type":void 0};function b$e(e,t,r){if(ke.isString(e))try{return(t||JSON.parse)(e),ke.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Gw={transitional:pG,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,a=ke.isObject(t);if(a&&ke.isHTMLForm(t)&&(t=new FormData(t)),ke.isFormData(t))return o&&o?JSON.stringify(mG(t)):t;if(ke.isArrayBuffer(t)||ke.isBuffer(t)||ke.isStream(t)||ke.isFile(t)||ke.isBlob(t))return t;if(ke.isArrayBufferView(t))return t.buffer;if(ke.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return p$e(t,this.formSerializer).toString();if((s=ke.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return qw(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||o?(r.setContentType("application/json",!1),b$e(t)):t}],transformResponse:[function(t){const r=this.transitional||Gw.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&ke.isString(t)&&(n&&!this.responseType||o)){const i=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?jt.from(s,jt.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Va.classes.FormData,Blob:Va.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ke.forEach(["delete","get","head"],function(t){Gw.headers[t]={}});ke.forEach(["post","put","patch"],function(t){Gw.headers[t]=ke.merge(v$e)});const HO=Gw,y$e=ke.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),w$e=e=>{const t={};let r,n,o;return e&&e.split(` -`).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&y$e[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},PA=Symbol("internals");function h0(e){return e&&String(e).trim().toLowerCase()}function fy(e){return e===!1||e==null?e:ke.isArray(e)?e.map(fy):String(e)}function x$e(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const _$e=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Sx(e,t,r,n,o){if(ke.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!ke.isString(t)){if(ke.isString(n))return t.indexOf(n)!==-1;if(ke.isRegExp(n))return n.test(t)}}function E$e(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function C$e(e,t){const r=ke.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,a,i){return this[n].call(this,t,o,a,i)},configurable:!0})})}let Kw=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function a(s,l,c){const u=h0(l);if(!u)throw new Error("header name must be a non-empty string");const p=ke.findKey(o,u);(!p||o[p]===void 0||c===!0||c===void 0&&o[p]!==!1)&&(o[p||l]=fy(s))}const i=(s,l)=>ke.forEach(s,(c,u)=>a(c,u,l));return ke.isPlainObject(t)||t instanceof this.constructor?i(t,r):ke.isString(t)&&(t=t.trim())&&!_$e(t)?i(w$e(t),r):t!=null&&a(r,t,n),this}get(t,r){if(t=h0(t),t){const n=ke.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return x$e(o);if(ke.isFunction(r))return r.call(this,o,n);if(ke.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=h0(t),t){const n=ke.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Sx(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function a(i){if(i=h0(i),i){const s=ke.findKey(n,i);s&&(!r||Sx(n,n[s],s,r))&&(delete n[s],o=!0)}}return ke.isArray(t)?t.forEach(a):a(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const a=r[n];(!t||Sx(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const r=this,n={};return ke.forEach(this,(o,a)=>{const i=ke.findKey(n,a);if(i){r[i]=fy(o),delete r[a];return}const s=t?E$e(a):String(a).trim();s!==a&&delete r[a],r[s]=fy(o),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return ke.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&ke.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[PA]=this[PA]={accessors:{}}).accessors,o=this.prototype;function a(i){const s=h0(i);n[s]||(C$e(o,i),n[s]=!0)}return ke.isArray(t)?t.forEach(a):a(t),this}};Kw.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ke.freezeMethods(Kw.prototype);ke.freezeMethods(Kw);const Di=Kw;function Tx(e,t){const r=this||HO,n=t||r,o=Di.from(n.headers);let a=n.data;return ke.forEach(e,function(s){a=s.call(r,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function gG(e){return!!(e&&e.__CANCEL__)}function F1(e,t,r){jt.call(this,e??"canceled",jt.ERR_CANCELED,t,r),this.name="CanceledError"}ke.inherits(F1,jt,{__CANCEL__:!0});function O$e(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new jt("Request failed with status code "+r.status,[jt.ERR_BAD_REQUEST,jt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const k$e=Va.isStandardBrowserEnv?function(){return{write:function(r,n,o,a,i,s){const l=[];l.push(r+"="+encodeURIComponent(n)),ke.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),ke.isString(a)&&l.push("path="+a),ke.isString(i)&&l.push("domain="+i),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function R$e(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function S$e(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function vG(e,t){return e&&!R$e(t)?S$e(e,t):t}const T$e=Va.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function o(a){let i=a;return t&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(i){const s=ke.isString(i)?o(i):i;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function P$e(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function M$e(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[a];i||(i=c),r[o]=l,n[o]=c;let p=a,h=0;for(;p!==o;)h+=r[p++],p=p%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i{const a=o.loaded,i=o.lengthComputable?o.total:void 0,s=a-r,l=n(s),c=a<=i;r=a;const u={loaded:a,total:i,progress:i?a/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&c?(i-a)/l:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const A$e=typeof XMLHttpRequest<"u",j$e=A$e&&function(e){return new Promise(function(r,n){let o=e.data;const a=Di.from(e.headers).normalize(),i=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}ke.isFormData(o)&&(Va.isStandardBrowserEnv||Va.isStandardBrowserWebWorkerEnv?a.setContentType(!1):a.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(v+":"+_))}const u=vG(e.baseURL,e.url);c.open(e.method.toUpperCase(),hG(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function p(){if(!c)return;const v=Di.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),w={data:!i||i==="text"||i==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:v,config:e,request:c};O$e(function(m){r(m),l()},function(m){n(m),l()},w),c=null}if("onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(p)},c.onabort=function(){c&&(n(new jt("Request aborted",jt.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new jt("Network Error",jt.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const w=e.transitional||pG;e.timeoutErrorMessage&&(_=e.timeoutErrorMessage),n(new jt(_,w.clarifyTimeoutError?jt.ETIMEDOUT:jt.ECONNABORTED,e,c)),c=null},Va.isStandardBrowserEnv){const v=(e.withCredentials||T$e(u))&&e.xsrfCookieName&&k$e.read(e.xsrfCookieName);v&&a.set(e.xsrfHeaderName,v)}o===void 0&&a.setContentType(null),"setRequestHeader"in c&&ke.forEach(a.toJSON(),function(_,w){c.setRequestHeader(w,_)}),ke.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),i&&i!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",MA(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",MA(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=v=>{c&&(n(!v||v.type?new F1(null,e,c):v),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const h=P$e(u);if(h&&Va.protocols.indexOf(h)===-1){n(new jt("Unsupported protocol "+h+":",jt.ERR_BAD_REQUEST,e));return}c.send(o||null)})},hy={http:o$e,xhr:j$e};ke.forEach(hy,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const I$e={getAdapter:e=>{e=ke.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;oe instanceof Di?e.toJSON():e;function Zd(e,t){t=t||{};const r={};function n(c,u,p){return ke.isPlainObject(c)&&ke.isPlainObject(u)?ke.merge.call({caseless:p},c,u):ke.isPlainObject(u)?ke.merge({},u):ke.isArray(u)?u.slice():u}function o(c,u,p){if(ke.isUndefined(u)){if(!ke.isUndefined(c))return n(void 0,c,p)}else return n(c,u,p)}function a(c,u){if(!ke.isUndefined(u))return n(void 0,u)}function i(c,u){if(ke.isUndefined(u)){if(!ke.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function s(c,u,p){if(p in t)return n(c,u);if(p in e)return n(void 0,c)}const l={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(c,u)=>o(jA(c),jA(u),!0)};return ke.forEach(Object.keys(Object.assign({},e,t)),function(u){const p=l[u]||o,h=p(e[u],t[u],u);ke.isUndefined(h)&&p!==s||(r[u]=h)}),r}const bG="1.4.0",UO={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{UO[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const IA={};UO.transitional=function(t,r,n){function o(a,i){return"[Axios v"+bG+"] Transitional option '"+a+"'"+i+(n?". "+n:"")}return(a,i,s)=>{if(t===!1)throw new jt(o(i," has been removed"+(r?" in "+r:"")),jt.ERR_DEPRECATED);return r&&!IA[i]&&(IA[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,i,s):!0}};function L$e(e,t,r){if(typeof e!="object")throw new jt("options must be an object",jt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const a=n[o],i=t[a];if(i){const s=e[a],l=s===void 0||i(s,a,e);if(l!==!0)throw new jt("option "+a+" must be "+l,jt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new jt("Unknown option "+a,jt.ERR_BAD_OPTION)}}const u9={assertOptions:L$e,validators:UO},gs=u9.validators;let I7=class{constructor(t){this.defaults=t,this.interceptors={request:new TA,response:new TA}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Zd(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:a}=r;n!==void 0&&u9.assertOptions(n,{silentJSONParsing:gs.transitional(gs.boolean),forcedJSONParsing:gs.transitional(gs.boolean),clarifyTimeoutError:gs.transitional(gs.boolean)},!1),o!=null&&(ke.isFunction(o)?r.paramsSerializer={serialize:o}:u9.assertOptions(o,{encode:gs.function,serialize:gs.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i;i=a&&ke.merge(a.common,a[r.method]),i&&ke.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),r.headers=Di.concat(i,a);const s=[];let l=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(r)===!1||(l=l&&w.synchronous,s.unshift(w.fulfilled,w.rejected))});const c=[];this.interceptors.response.forEach(function(w){c.push(w.fulfilled,w.rejected)});let u,p=0,h;if(!l){const _=[AA.bind(this),void 0];for(_.unshift.apply(_,s),_.push.apply(_,c),h=_.length,u=Promise.resolve(r);p{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](o);n._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(s=>{n.subscribe(s),a=s}).then(o);return i.cancel=function(){n.unsubscribe(a)},i},t(function(a,i,s){n.reason||(n.reason=new F1(a,i,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new yG(function(o){t=o}),cancel:t}}};const $$e=N$e;function D$e(e){return function(r){return e.apply(null,r)}}function F$e(e){return ke.isObject(e)&&e.isAxiosError===!0}const d9={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(d9).forEach(([e,t])=>{d9[t]=e});const z$e=d9;function wG(e){const t=new py(e),r=tG(py.prototype.request,t);return ke.extend(r,py.prototype,t,{allOwnKeys:!0}),ke.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return wG(Zd(e,o))},r}const Ur=wG(HO);Ur.Axios=py;Ur.CanceledError=F1;Ur.CancelToken=$$e;Ur.isCancel=gG;Ur.VERSION=bG;Ur.toFormData=qw;Ur.AxiosError=jt;Ur.Cancel=Ur.CanceledError;Ur.all=function(t){return Promise.all(t)};Ur.spread=D$e;Ur.isAxiosError=F$e;Ur.mergeConfig=Zd;Ur.AxiosHeaders=Di;Ur.formToJSON=e=>mG(ke.isHTMLForm(e)?new FormData(e):e);Ur.HttpStatusCode=z$e;Ur.default=Ur;const z1=Ur,{Axios:omt,AxiosError:amt,CanceledError:imt,isCancel:smt,CancelToken:lmt,VERSION:cmt,all:umt,Cancel:dmt,isAxiosError:Ja,spread:fmt,toFormData:hmt,AxiosHeaders:pmt,HttpStatusCode:mmt,formToJSON:gmt,mergeConfig:vmt}=z1,Ht={API_BASE_URL:"https://socioverse.online",CLIENT_BASE_URL:"https://socioverse.online",DEFAULT_IMG:"https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_1280.png",ADMIN_LOGIN_SVG:"https://res.cloudinary.com/dkxyfsxso/image/upload/v1702381015/socioverse%20stock/AdminLoginSvg_ain9jo.svg",AUTHENTICATION_SVG:"https://res.cloudinary.com/dkxyfsxso/image/upload/v1702381022/socioverse%20stock/AuthenticationSvg_iirmb2.svg",CHAT_SVG:"https://res.cloudinary.com/dkxyfsxso/image/upload/v1702381151/socioverse%20stock/ChatSvg_acpykg.svg",GOOGLE_LOGO_SVG:"https://res.cloudinary.com/dkxyfsxso/image/upload/v1702381161/socioverse%20stock/GoogleLogoSvg_atvkrt.svg",LOADER_SVG:"https://res.cloudinary.com/dkxyfsxso/image/upload/v1702381169/socioverse%20stock/Loader_dofs8c.svg",LOADER_PNG:"https://res.cloudinary.com/dkxyfsxso/image/upload/v1702381177/socioverse%20stock/LoaderPng_ahqjxq.png",LOGIN_ALERT_SVG:"https://res.cloudinary.com/dkxyfsxso/image/upload/v1702381181/socioverse%20stock/LoginAlertSvg_yx47iz.svg",NO_DATA_AVAILABLE_SVG:"https://res.cloudinary.com/dkxyfsxso/image/upload/v1702381193/socioverse%20stock/NoDataAvailable_jovfkq.svg",PROFILE_SVG:"https://res.cloudinary.com/dkxyfsxso/image/upload/v1702381205/socioverse%20stock/profileSvg_mwpb71.svg",SETTING_SVG:"https://res.cloudinary.com/dkxyfsxso/image/upload/v1702381215/socioverse%20stock/Settings_lv6rse.svg",ERROR_NOT_FOUND_SVG:"https://res.cloudinary.com/dkxyfsxso/image/upload/v1702381003/socioverse%20stock/404_nvavnv.svg"},rt={position:"top-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light"},B$e={coverPhoto:null,profilePhoto:null},V$e=$1({name:"image",initialState:B$e,reducers:{setCoverPhoto:(e,t)=>{e.coverPhoto=t.payload},setProfilePhoto:(e,t)=>{e.profilePhoto=t.payload}}}),H$e=V$e.reducer,U$e={description:null,image:null,hashtags:null,createdAt:null,updatedAt:null,hashtagSearch:null,hashtagSearchOn:!1,searchModeOn:!1,isSharedPost:!1,sharedPostId:null},xG=$1({name:"post",initialState:U$e,reducers:{setPost:(e,t)=>{e.description=t.payload.description,e.image=t.payload.image,e.hashtags=t.payload.hashtags,e.createdAt=t.payload.createdAt,e.updatedAt=t.payload.updatedAt},setTempPostImage:(e,t)=>{e.image=e.image?[...e.image,t.payload]:[t.payload]},deleteTempPostImage:(e,t)=>{var r;e.image=(r=e.image)==null?void 0:r.filter(n=>n!==t.payload)},resetTempPostImage:e=>{e.image=null},setHashtagSearch:(e,t)=>{e.hashtagSearch=t.payload,e.hashtagSearchOn=!0},resetHashtagSearch:e=>{e.hashtagSearch=null,e.hashtagSearchOn=!1},enableSearchMode:e=>{e.searchModeOn=!0},disableSearchMode:e=>{e.searchModeOn=!1},setIsSharedPost:(e,t)=>{e.isSharedPost=t.payload},setSharedPostId:(e,t)=>{e.sharedPostId=t.payload}}}),{setPost:bmt,setTempPostImage:ymt,deleteTempPostImage:wmt,resetTempPostImage:xmt,setHashtagSearch:_G,resetHashtagSearch:W$e,enableSearchMode:EG,disableSearchMode:CG,setIsSharedPost:_mt,setSharedPostId:Emt}=xG.actions,q$e=xG.reducer,G$e={accessToken:null,isAuthenticated:!1,searchTextForComments:"",searchTextForReplies:""},OG=$1({name:"admin",initialState:G$e,reducers:{setAdminCredentials:(e,t)=>{const{accessToken:r}=t.payload;e.accessToken=r,e.isAuthenticated=!0},adminLogout:e=>{e.isAuthenticated=!1,e.accessToken=null},setSearchTextForComments:(e,t)=>{e.searchTextForComments=t.payload},setSearchTextForReplies:(e,t)=>{e.searchTextForReplies=t.payload}}}),{setAdminCredentials:f9,adminLogout:K$e,setSearchTextForComments:Y$e,setSearchTextForReplies:X$e}=OG.actions,Z$e=OG.reducer,Q$e={selectedChat:null,chats:[],notification:[],fetchUserChatsAgain:!1,openVideoCall:!1,joinedVideoRoom:!1},kG=$1({name:"chat",initialState:Q$e,reducers:{setSelectedChat:(e,t)=>{e.selectedChat=t.payload},setChats:(e,t)=>{e.chats=t.payload},initializeNotification:(e,t)=>{e.notification=t.payload},setNotification:(e,t)=>{e.notification.some(r=>r._id===t.payload._id)||(e.notification=[t.payload,...e.notification])},setFetchUserChatsAgain:(e,t)=>{e.fetchUserChatsAgain=t.payload},deleteNotification:(e,t)=>{e.notification.some(r=>r._id===t.payload._id)&&(e.notification=e.notification.filter(r=>r._id!==t.payload._id))},setOpenVideoCall:(e,t)=>{e.openVideoCall=t.payload},setJoinVideoRoom:(e,t)=>{e.joinedVideoRoom=t.payload}}}),{setSelectedChat:RG,setChats:Cmt,setNotification:J$e,setFetchUserChatsAgain:eDe,deleteNotification:LA,initializeNotification:tDe,setOpenVideoCall:rDe,setJoinVideoRoom:nDe}=kG.actions,oDe=kG.reducer,xo=lNe({reducer:{auth:yNe,photo:H$e,post:q$e,admin:Z$e,chat:oDe}});function SG(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="number"&&!isNaN(e),Dc=e=>typeof e=="string",Xn=e=>typeof e=="function",my=e=>Dc(e)||Xn(e)?e:null,Mx=e=>g.isValidElement(e)||Dc(e)||Xn(e)||op(e);function aDe(e,t,r){r===void 0&&(r=300);const{scrollHeight:n,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=n+"px",o.transition=`all ${r}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,r)})})}function Yw(e){let{enter:t,exit:r,appendPosition:n=!1,collapse:o=!0,collapseDuration:a=300}=e;return function(i){let{children:s,position:l,preventExitTransition:c,done:u,nodeRef:p,isIn:h}=i;const v=n?`${t}--${l}`:t,_=n?`${r}--${l}`:r,w=g.useRef(0);return g.useLayoutEffect(()=>{const y=p.current,m=v.split(" "),f=b=>{b.target===p.current&&(y.dispatchEvent(new Event("d")),y.removeEventListener("animationend",f),y.removeEventListener("animationcancel",f),w.current===0&&b.type!=="animationcancel"&&y.classList.remove(...m))};y.classList.add(...m),y.addEventListener("animationend",f),y.addEventListener("animationcancel",f)},[]),g.useEffect(()=>{const y=p.current,m=()=>{y.removeEventListener("animationend",m),o?aDe(y,u,a):u()};h||(c?m():(w.current=1,y.className+=` ${_}`,y.addEventListener("animationend",m)))},[h]),De.createElement(De.Fragment,null,s)}}function NA(e,t){return e!=null?{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 $o={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 r=this.list.get(e).filter(n=>n!==t);return this.list.set(e,r),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 r=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(r)})}},Z5=e=>{let{theme:t,type:r,...n}=e;return De.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${r})`,...n})},Ax={info:function(e){return De.createElement(Z5,{...e},De.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 De.createElement(Z5,{...e},De.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 De.createElement(Z5,{...e},De.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 De.createElement(Z5,{...e},De.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 De.createElement("div",{className:"Toastify__spinner"})}};function iDe(e){const[,t]=g.useReducer(v=>v+1,0),[r,n]=g.useState([]),o=g.useRef(null),a=g.useRef(new Map).current,i=v=>r.indexOf(v)!==-1,s=g.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:i,getToast:v=>a.get(v)}).current;function l(v){let{containerId:_}=v;const{limit:w}=s.props;!w||_&&s.containerId!==_||(s.count-=s.queue.length,s.queue=[])}function c(v){n(_=>v==null?[]:_.filter(w=>w!==v))}function u(){const{toastContent:v,toastProps:_,staleId:w}=s.queue.shift();h(v,_,w)}function p(v,_){let{delay:w,staleId:y,...m}=_;if(!Mx(v)||function(P){return!o.current||s.props.enableMultiContainer&&P.containerId!==s.props.containerId||a.has(P.toastId)&&P.updateId==null}(m))return;const{toastId:f,updateId:b,data:d}=m,{props:x}=s,E=()=>c(f),C=b==null;C&&s.count++;const k={...x,style:x.toastStyle,key:s.toastKey++,...Object.fromEntries(Object.entries(m).filter(P=>{let[j,L]=P;return L!=null})),toastId:f,updateId:b,data:d,closeToast:E,isIn:!1,className:my(m.className||x.toastClassName),bodyClassName:my(m.bodyClassName||x.bodyClassName),progressClassName:my(m.progressClassName||x.progressClassName),autoClose:!m.isLoading&&(S=m.autoClose,R=x.autoClose,S===!1||op(S)&&S>0?S:R),deleteToast(){const P=NA(a.get(f),"removed");a.delete(f),$o.emit(4,P);const j=s.queue.length;if(s.count=f==null?s.count-s.displayedToast:s.count-1,s.count<0&&(s.count=0),j>0){const L=f==null?s.props.limit:1;if(j===1||L===1)s.displayedToast++,u();else{const D=L>j?j:L;s.displayedToast=D;for(let B=0;Bz in Ax)(L)&&(V=Ax[L](q))),V}(k),Xn(m.onOpen)&&(k.onOpen=m.onOpen),Xn(m.onClose)&&(k.onClose=m.onClose),k.closeButton=x.closeButton,m.closeButton===!1||Mx(m.closeButton)?k.closeButton=m.closeButton:m.closeButton===!0&&(k.closeButton=!Mx(x.closeButton)||x.closeButton);let T=v;g.isValidElement(v)&&!Dc(v.type)?T=g.cloneElement(v,{closeToast:E,toastProps:k,data:d}):Xn(v)&&(T=v({closeToast:E,toastProps:k,data:d})),x.limit&&x.limit>0&&s.count>x.limit&&C?s.queue.push({toastContent:T,toastProps:k,staleId:y}):op(w)?setTimeout(()=>{h(T,k,y)},w):h(T,k,y)}function h(v,_,w){const{toastId:y}=_;w&&a.delete(w);const m={content:v,props:_};a.set(y,m),n(f=>[...f,y].filter(b=>b!==w)),$o.emit(4,NA(m,m.props.updateId==null?"added":"updated"))}return g.useEffect(()=>(s.containerId=e.containerId,$o.cancelEmit(3).on(0,p).on(1,v=>o.current&&c(v)).on(5,l).emit(2,s),()=>{a.clear(),$o.emit(3,s)}),[]),g.useEffect(()=>{s.props=e,s.isToastActive=i,s.displayedToast=r.length}),{getToastToRender:function(v){const _=new Map,w=Array.from(a.values());return e.newestOnTop&&w.reverse(),w.forEach(y=>{const{position:m}=y.props;_.has(m)||_.set(m,[]),_.get(m).push(y)}),Array.from(_,y=>v(y[0],y[1]))},containerRef:o,isToastActive:i}}function $A(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function DA(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function sDe(e){const[t,r]=g.useState(!1),[n,o]=g.useState(!1),a=g.useRef(null),i=g.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=g.useRef(e),{autoClose:l,pauseOnHover:c,closeToast:u,onClick:p,closeOnClick:h}=e;function v(d){if(e.draggable){d.nativeEvent.type==="touchstart"&&d.nativeEvent.preventDefault(),i.didMove=!1,document.addEventListener("mousemove",m),document.addEventListener("mouseup",f),document.addEventListener("touchmove",m),document.addEventListener("touchend",f);const x=a.current;i.canCloseOnClick=!0,i.canDrag=!0,i.boundingRect=x.getBoundingClientRect(),x.style.transition="",i.x=$A(d.nativeEvent),i.y=DA(d.nativeEvent),e.draggableDirection==="x"?(i.start=i.x,i.removalDistance=x.offsetWidth*(e.draggablePercent/100)):(i.start=i.y,i.removalDistance=x.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function _(d){if(i.boundingRect){const{top:x,bottom:E,left:C,right:k}=i.boundingRect;d.nativeEvent.type!=="touchend"&&e.pauseOnHover&&i.x>=C&&i.x<=k&&i.y>=x&&i.y<=E?y():w()}}function w(){r(!0)}function y(){r(!1)}function m(d){const x=a.current;i.canDrag&&x&&(i.didMove=!0,t&&y(),i.x=$A(d),i.y=DA(d),i.delta=e.draggableDirection==="x"?i.x-i.start:i.y-i.start,i.start!==i.x&&(i.canCloseOnClick=!1),x.style.transform=`translate${e.draggableDirection}(${i.delta}px)`,x.style.opacity=""+(1-Math.abs(i.delta/i.removalDistance)))}function f(){document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",f);const d=a.current;if(i.canDrag&&i.didMove&&d){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance)return o(!0),void e.closeToast();d.style.transition="transform 0.2s, opacity 0.2s",d.style.transform=`translate${e.draggableDirection}(0)`,d.style.opacity="1"}}g.useEffect(()=>{s.current=e}),g.useEffect(()=>(a.current&&a.current.addEventListener("d",w,{once:!0}),Xn(e.onOpen)&&e.onOpen(g.isValidElement(e.children)&&e.children.props),()=>{const d=s.current;Xn(d.onClose)&&d.onClose(g.isValidElement(d.children)&&d.children.props)}),[]),g.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||y(),window.addEventListener("focus",w),window.addEventListener("blur",y)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",w),window.removeEventListener("blur",y))}),[e.pauseOnFocusLoss]);const b={onMouseDown:v,onTouchStart:v,onMouseUp:_,onTouchEnd:_};return l&&c&&(b.onMouseEnter=y,b.onMouseLeave=w),h&&(b.onClick=d=>{p&&p(d),i.canCloseOnClick&&u()}),{playToast:w,pauseToast:y,isRunning:t,preventExitTransition:n,toastRef:a,eventHandlers:b}}function TG(e){let{closeToast:t,theme:r,ariaLabel:n="close"}=e;return De.createElement("button",{className:`Toastify__close-button Toastify__close-button--${r}`,type:"button",onClick:o=>{o.stopPropagation(),t(o)},"aria-label":n},De.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},De.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 lDe(e){let{delay:t,isRunning:r,closeToast:n,type:o="default",hide:a,className:i,style:s,controlledProgress:l,progress:c,rtl:u,isIn:p,theme:h}=e;const v=a||l&&c===0,_={...s,animationDuration:`${t}ms`,animationPlayState:r?"running":"paused",opacity:v?0:1};l&&(_.transform=`scaleX(${c})`);const w=Ns("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${h}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),y=Xn(i)?i({rtl:u,type:o,defaultClassName:w}):Ns(w,i);return De.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:y,style:_,[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{p&&n()}})}const cDe=e=>{const{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:o}=sDe(e),{closeButton:a,children:i,autoClose:s,onClick:l,type:c,hideProgressBar:u,closeToast:p,transition:h,position:v,className:_,style:w,bodyClassName:y,bodyStyle:m,progressClassName:f,progressStyle:b,updateId:d,role:x,progress:E,rtl:C,toastId:k,deleteToast:S,isIn:R,isLoading:T,iconOut:P,closeOnClick:j,theme:L}=e,D=Ns("Toastify__toast",`Toastify__toast-theme--${L}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":C},{"Toastify__toast--close-on-click":j}),B=Xn(_)?_({rtl:C,position:v,type:c,defaultClassName:D}):Ns(D,_),V=!!E||!s,q={closeToast:p,type:c,theme:L};let z=null;return a===!1||(z=Xn(a)?a(q):g.isValidElement(a)?g.cloneElement(a,q):TG(q)),De.createElement(h,{isIn:R,done:S,position:v,preventExitTransition:r,nodeRef:n},De.createElement("div",{id:k,onClick:l,className:B,...o,style:w,ref:n},De.createElement("div",{...R&&{role:x},className:Xn(y)?y({type:c}):Ns("Toastify__toast-body",y),style:m},P!=null&&De.createElement("div",{className:Ns("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!T})},P),De.createElement("div",null,i)),z,De.createElement(lDe,{...d&&!V?{key:`pb-${d}`}:{},rtl:C,theme:L,delay:s,isRunning:t,isIn:R,closeToast:p,hide:u,type:c,style:b,className:f,controlledProgress:V,progress:E||0})))},Xw=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},uDe=Yw(Xw("bounce",!0));Yw(Xw("slide",!0));Yw(Xw("zoom"));Yw(Xw("flip"));const eo=g.forwardRef((e,t)=>{const{getToastToRender:r,containerRef:n,isToastActive:o}=iDe(e),{className:a,style:i,rtl:s,containerId:l}=e;function c(u){const p=Ns("Toastify__toast-container",`Toastify__toast-container--${u}`,{"Toastify__toast-container--rtl":s});return Xn(a)?a({position:u,rtl:s,defaultClassName:p}):Ns(p,my(a))}return g.useEffect(()=>{t&&(t.current=n.current)},[]),De.createElement("div",{ref:n,className:"Toastify",id:l},r((u,p)=>{const h=p.length?{...i}:{...i,pointerEvents:"none"};return De.createElement("div",{className:c(u),style:h,key:`container-${u}`},p.map((v,_)=>{let{content:w,props:y}=v;return De.createElement(cDe,{...y,isIn:o(y.toastId),style:{...y.style,"--nth":_+1,"--len":p.length},key:`toast-${y.key}`},w)}))}))});eo.displayName="ToastContainer",eo.defaultProps={position:"top-right",transition:uDe,autoClose:5e3,closeButton:TG,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let jx,nc=new Map,Nh=[],dDe=1;function PG(){return""+dDe++}function fDe(e){return e&&(Dc(e.toastId)||op(e.toastId))?e.toastId:PG()}function ap(e,t){return nc.size>0?$o.emit(0,e,t):Nh.push({content:e,options:t}),t.toastId}function L7(e,t){return{...t,type:t&&t.type||e,toastId:fDe(t)}}function Q5(e){return(t,r)=>ap(t,L7(e,r))}function Ee(e,t){return ap(e,L7("default",t))}Ee.loading=(e,t)=>ap(e,L7("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Ee.promise=function(e,t,r){let n,{pending:o,error:a,success:i}=t;o&&(n=Dc(o)?Ee.loading(o,r):Ee.loading(o.render,{...r,...o}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,p,h)=>{if(p==null)return void Ee.dismiss(n);const v={type:u,...s,...r,data:h},_=Dc(p)?{render:p}:p;return n?Ee.update(n,{...v,..._}):Ee(_.render,{...v,..._}),h},c=Xn(e)?e():e;return c.then(u=>l("success",i,u)).catch(u=>l("error",a,u)),c},Ee.success=Q5("success"),Ee.info=Q5("info"),Ee.error=Q5("error"),Ee.warning=Q5("warning"),Ee.warn=Ee.warning,Ee.dark=(e,t)=>ap(e,L7("default",{theme:"dark",...t})),Ee.dismiss=e=>{nc.size>0?$o.emit(1,e):Nh=Nh.filter(t=>e!=null&&t.options.toastId!==e)},Ee.clearWaitingQueue=function(e){return e===void 0&&(e={}),$o.emit(5,e)},Ee.isActive=e=>{let t=!1;return nc.forEach(r=>{r.isToastActive&&r.isToastActive(e)&&(t=!0)}),t},Ee.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const r=function(n,o){let{containerId:a}=o;const i=nc.get(a||jx);return i&&i.getToast(n)}(e,t);if(r){const{props:n,content:o}=r,a={delay:100,...n,...t,toastId:t.toastId||e,updateId:PG()};a.toastId!==e&&(a.staleId=e);const i=a.render||o;delete a.render,ap(i,a)}},0)},Ee.done=e=>{Ee.update(e,{progress:1})},Ee.onChange=e=>($o.on(4,e),()=>{$o.off(4,e)}),Ee.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"},Ee.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},$o.on(2,e=>{jx=e.containerId||e,nc.set(jx,e),Nh.forEach(t=>{$o.emit(0,t.content,t.options)}),Nh=[]}).on(3,e=>{nc.delete(e.containerId||e),nc.size===0&&$o.off(0).off(1).off(5)});const ot=z1.create({baseURL:Ht.API_BASE_URL,withCredentials:!0}),Zw=z1.create({baseURL:Ht.API_BASE_URL,withCredentials:!0});ot.interceptors.request.use(e=>{const{accessToken:t}=xo.getState().auth;return t&&(e.headers.authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ot.interceptors.response.use(e=>e,async e=>{const t=e.config;if(e.response&&e.response.status===401&&!t._retry)try{e.response.data.message==="User is blocked"&&(await h9(),Ee.dismiss(),Ee.error("Your account has been blocked. Please contact admin.",rt),xo.dispatch(s9()));const{accessToken:r}=await gDe();return xo.dispatch(Qp({accessToken:r})),t.headers.authorization=`Bearer ${r}`,ot(t)}catch(r){return Promise.reject(r)}return Promise.reject(e)});const $e={LOGIN_USER:"api/auth/login",SIGNUP_USER:"api/auth/signup",LOGIN_GOOGLE:"api/auth/google_auth",LOGOUT_USER:"api/auth/logout",SEND_OTP:"api/auth/send_otp",VERIFY_OTP:"api/auth/verify_otp",RESET_PASSWORD:"api/auth/resetPassword",REFRESH_TOKEN:"api/auth/refresh",USERNAME_AVAILABILITY:"api/auth/checkUsernameAvailability/",UPLOAD_COVER_PHOTO:"api/profile/uploadCoverPhoto",UPLOAD_PROFILE_PHOTO:"api/profile/uploadProfilePhoto",GET_USER_INFO:"api/profile/getUserInfo",GET_OTHER_USER_INFO:"api/profile/getOtherUserInfo",DELETE_COVER_PHOTO:"api/profile/deleteCoverPhoto",DELETE_PROFILE_PHOTO:"api/profile/deleteProfilePhoto",CHANGE_PASSWORD:"api/profile/changePassword",EDIT_PROFILE:"api/profile/editProfile",SEARCH_USERS:"api/profile/searchUsers",ADD_USERNAME:"api/profile/addUsername",CREATE_POST:"api/post/createPost",EDIT_POST:"api/post/editPost",GET_POSTS:"api/post/getPosts",GET_POST:"api/post/getPost",GET_POST_DETAILS:"api/post/getPostDetails",DELETE_POST:"api/post/deletePost",SEARCH_POSTS:"api/post/searchPosts",GET_USER_POSTS:"api/post/getUserPosts",GET_OTHER_USER_POSTS:"api/post/getOtherUserPosts",GET_USER_LIKED_POSTS:"api/post/getUserLikedPosts",GET_USER_SAVED_POSTS:"api/post/getUserSavedPosts",GET_LIKED_USERS:"api/post/getLikedUsers",LIKE_POST:"api/post/likePost",SAVE_POST:"api/post/savePost",REPORT_POST:"api/post/reportPost",ADD_COMMENT:"api/post/addComment",GET_COMMENTS:"api/post/getComments",EDIT_COMMENT:"api/post/editComment",DELETE_COMMENT:"api/post/deleteComment",DELETE_REPLY:"api/post/deleteReply",REPORT_COMMENT:"api/post/reportComment",REPORT_REPLY:"api/post/reportReply",LIKE_COMMENT:"api/post/likeComment",LIKE_REPLY:"api/post/likeReply",ADD_REPLY:"api/post/addReply",GET_REPLIES:"api/post/getReplies",FOLLOW_USER:"api/user/followUser",UNFOLLOW_USER:"api/user/unfollowUser",GET_REST_OF_USERS:"api/user/getRestOfUsers",GET_REST_OF_ALL_USERS:"api/user/getRestOfAllUsers",GET_FOLLOWERS:"api/user/getFollowers",GET_FOLLOWING:"api/user/getFollowing",GET_SUGGESTIONS:"api/user/getSuggestions",ADD_NOTIFICATION:"api/user/addNotification",DELETE_NOTIFICATION:"api/user/deleteNotification",ADMIN_LOGIN:"api/admin/login",REFRESH_ADMIN_TOKEN:"api/admin/refresh",GET_USERS:"api/admin/getUsers",GET_ALL_USERS_COUNT:"api/admin/getAllUsersCount",GET_USERS_COUNT_ON_SEARCH:"api/admin/getUsersCountOnSearch",GET_USERS_ON_SEARCH:"api/admin/getUsersOnSearch",BLOCK_USER:"api/admin/blockUser",UNBLOCK_USER:"api/admin/unblockUser",GET_ALL_POSTS:"api/admin/getAllPosts",GET_ALL_POSTS_COUNT:"api/admin/getAllPostsCount",GET_BLOCKED_USERS_COUNT:"api/admin/getBlockedUsersCount",GET_POSTS_COUNT_ON_SEARCH:"api/admin/getPostsCountOnSearch",GET_REPORTED_COMMENTS_COUNT_ON_SEARCH:"api/admin/getReportedCommentsCountOnSearch",GET_REPORTED_COMMENTS_ON_SEARCH:"api/admin/getReportedCommentsOnSearch",GET_REPORTED_REPLIES_COUNT_ON_SEARCH:"api/admin/getReportedRepliesCountOnSearch",GET_REPORTED_REPLIES_ON_SEARCH:"api/admin/getReportedRepliesOnSearch",GET_POSTS_ON_SEARCH:"api/admin/getPostsOnSearch",GET_ALL_REPORTED_COMMENTS_COUNT:"api/admin/getAllReportedCommentsCount",GET_ALL_REPORTED_REPLIES_COUNT:"api/admin/getAllReportedRepliesCount",BLOCK_POST:"api/admin/blockPost",UNBLOCK_POST:"api/admin/unblockPost",GET_REPORT_INFO:"api/admin/getReportInfo",GET_ALL_COMMENTS:"api/admin/getAllComments",GET_ALL_REPLIES:"api/admin/getAllReplies",GET_ALL_REPORTED_COMMENTS:"api/admin/getAllReportedComments",GET_ALL_REPORTED_REPLIES:"api/admin/getAllReportedReplies",GET_COMMENT_REPORTED_USERS:"api/admin/getCommentReportedUsers",BLOCK_COMMENT:"api/admin/blockComment",UNBLOCK_COMMENT:"api/admin/unblockComment",GET_REPLY_REPORTED_USERS:"api/admin/getReplyReportedUsers",BLOCK_REPLY:"api/admin/blockReply",UNBLOCK_REPLY:"api/admin/unblockReply",GET_MONTHLY_USER_SIGNUPS:"api/admin/getMonthlyUserSignups",GET_MONTHLY_POSTS:"api/admin/getMonthlyPosts",LOGOUT_ADMIN:"api/admin/logout",FETCH_OTHER_USER_CHAT:"api/chat/createOrAccessChat",FETCH_CHATS:"api/chat/fetchChats",CREATE_GROUP_CHAT:"api/chat/createGroup",UPDATE_GROUP:"api/chat/updateGroup",REMOVE_FROM_GROUP:"api/chat/removeFromGroup",GROUP_REMOVE:"api/chat/groupRemove",ADD_GROUP_DP:"api/chat/addGroupDp",SEND_MESSAGE:"api/message/sendMessage",SEND_MESSAGE_WITH_IMG:"api/message/sendMessageWithImg",GET_ALL_MESSAGES_FROM_CHAT:"api/message/getAllMessagesFromChat",FETCH_NOTIFICATIONS:"api/message/fetchNotifications"},hDe=async e=>(await Zw.post($e.LOGIN_USER,e)).data,pDe=async e=>(await Zw.post($e.SIGNUP_USER,e)).data,mDe=async e=>(await Zw.post($e.LOGIN_GOOGLE,e)).data,gDe=async()=>(await Zw.get($e.REFRESH_TOKEN,{withCredentials:!0})).data,h9=async()=>(await ot.delete($e.LOGOUT_USER)).data,MG=async(e,t)=>(await ot.post($e.SEND_OTP,{email:e,text:t})).data,AG=async(e,t,r)=>(await ot.post($e.VERIFY_OTP,{email:e,otp:t,text:r})).data,vDe=async({email:e,password:t})=>(await ot.post($e.RESET_PASSWORD,{email:e,password:t})).data;function Qw(e){return vt({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M923 283.6a260.04 260.04 0 0 0-56.9-82.8 264.4 264.4 0 0 0-84-55.5A265.34 265.34 0 0 0 679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 0 0-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9z"}}]})(e)}function Omt(e){return vt({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zM338 304c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm513.9 437.1a8.11 8.11 0 0 1-5.2 1.9H177.2c-4.4 0-8-3.6-8-8 0-1.9.7-3.7 1.9-5.2l170.3-202c2.8-3.4 7.9-3.8 11.3-1 .3.3.7.6 1 1l99.4 118 158.1-187.5c2.8-3.4 7.9-3.8 11.3-1 .3.3.7.6 1 1l229.6 271.6c2.6 3.3 2.2 8.4-1.2 11.2z"}}]})(e)}function B1(e){return vt({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 0 0-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z"}},{tag:"path",attr:{d:"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]})(e)}function bDe(e){return vt({tag:"svg",attr:{t:"1569682881658",viewBox:"0 0 1024 1024",version:"1.1"},child:[{tag:"defs",attr:{},child:[]},{tag:"path",attr:{d:"M573 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40zM293 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z"}},{tag:"path",attr:{d:"M894 345c-48.1-66-115.3-110.1-189-130v0.1c-17.1-19-36.4-36.5-58-52.1-163.7-119-393.5-82.7-513 81-96.3 133-92.2 311.9 6 439l0.8 132.6c0 3.2 0.5 6.4 1.5 9.4 5.3 16.9 23.3 26.2 40.1 20.9L309 806c33.5 11.9 68.1 18.7 102.5 20.6l-0.5 0.4c89.1 64.9 205.9 84.4 313 49l127.1 41.4c3.2 1 6.5 1.6 9.9 1.6 17.7 0 32-14.3 32-32V753c88.1-119.6 90.4-284.9 1-408zM323 735l-12-5-99 31-1-104-8-9c-84.6-103.2-90.2-251.9-11-361 96.4-132.2 281.2-161.4 413-66 132.2 96.1 161.5 280.6 66 412-80.1 109.9-223.5 150.5-348 102z m505-17l-8 10 1 104-98-33-12 5c-56 20.8-115.7 22.5-171 7l-0.2-0.1C613.7 788.2 680.7 742.2 729 676c76.4-105.3 88.8-237.6 44.4-350.4l0.6 0.4c23 16.5 44.1 37.1 62 62 72.6 99.6 68.5 235.2-8 330z"}},{tag:"path",attr:{d:"M433 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z"}}]})(e)}function Jw(e){return vt({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M923 283.6a260.04 260.04 0 0 0-56.9-82.8 264.4 264.4 0 0 0-84-55.5A265.34 265.34 0 0 0 679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 0 0-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z"}}]})(e)}function kmt(e){return vt({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]})(e)}function yDe(e){return vt({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M6 11.5c0-2.363 1.498-4.383 3.594-5.159 0.254-0.571 0.406-1.206 0.406-1.841 0-2.485 0-4.5-3-4.5s-3 2.015-3 4.5c0 1.548 0.898 3.095 2 3.716v0.825c-3.392 0.277-6 1.944-6 3.959h6.208c-0.135-0.477-0.208-0.98-0.208-1.5z"}},{tag:"path",attr:{d:"M11.5 7c-2.485 0-4.5 2.015-4.5 4.5s2.015 4.5 4.5 4.5c2.485 0 4.5-2.015 4.5-4.5s-2.015-4.5-4.5-4.5zM14 12h-5v-1h5v1z"}}]})(e)}function wDe(e){return vt({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15 9.5l-4.5 4.5-1.5-1.5-1 1 2.5 2.5 5.5-5.5z"}},{tag:"path",attr:{d:"M7 12h5v-1.799c-1.050-0.613-2.442-1.033-4-1.16v-0.825c1.102-0.621 2-2.168 2-3.716 0-2.485 0-4.5-3-4.5s-3 2.015-3 4.5c0 1.548 0.898 3.095 2 3.716v0.825c-3.392 0.277-6 1.944-6 3.959h7v-1z"}}]})(e)}function xDe(e){return vt({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.504 13.616l-3.79-3.223c-0.392-0.353-0.811-0.514-1.149-0.499 0.895-1.048 1.435-2.407 1.435-3.893 0-3.314-2.686-6-6-6s-6 2.686-6 6 2.686 6 6 6c1.486 0 2.845-0.54 3.893-1.435-0.016 0.338 0.146 0.757 0.499 1.149l3.223 3.79c0.552 0.613 1.453 0.665 2.003 0.115s0.498-1.452-0.115-2.003zM6 10c-2.209 0-4-1.791-4-4s1.791-4 4-4 4 1.791 4 4-1.791 4-4 4z"}}]})(e)}function Rmt(e){return vt({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M10.404 5.11l-1.015-1.014-5.075 5.074c-0.841 0.841-0.841 2.204 0 3.044s2.204 0.841 3.045 0l6.090-6.089c1.402-1.401 1.402-3.673 0-5.074s-3.674-1.402-5.075 0l-6.394 6.393c-0.005 0.005-0.010 0.009-0.014 0.013-1.955 1.955-1.955 5.123 0 7.077s5.123 1.954 7.078 0c0.004-0.004 0.008-0.009 0.013-0.014l0.001 0.001 4.365-4.364-1.015-1.014-4.365 4.363c-0.005 0.004-0.009 0.009-0.013 0.013-1.392 1.392-3.656 1.392-5.048 0s-1.392-3.655 0-5.047c0.005-0.005 0.009-0.009 0.014-0.013l-0.001-0.001 6.395-6.393c0.839-0.84 2.205-0.84 3.045 0s0.839 2.205 0 3.044l-6.090 6.089c-0.28 0.28-0.735 0.28-1.015 0s-0.28-0.735 0-1.014l5.075-5.075z"}}]})(e)}function jG(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.045 7.401c.378-.378.586-.88.586-1.414s-.208-1.036-.586-1.414l-1.586-1.586c-.378-.378-.88-.586-1.414-.586s-1.036.208-1.413.585L4 13.585V18h4.413L19.045 7.401zm-3-3 1.587 1.585-1.59 1.584-1.586-1.585 1.589-1.584zM6 16v-1.585l7.04-7.018 1.586 1.586L7.587 16H6zm-2 4h16v2H4z"}}]})(e)}function _De(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z"}},{tag:"path",attr:{d:"M11.412 8.586c.379.38.588.882.588 1.414h2a3.977 3.977 0 0 0-1.174-2.828c-1.514-1.512-4.139-1.512-5.652 0l1.412 1.416c.76-.758 2.07-.756 2.826-.002z"}}]})(e)}function IG(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M5.5 15a3.51 3.51 0 0 0 2.36-.93l6.26 3.58a3.06 3.06 0 0 0-.12.85 3.53 3.53 0 1 0 1.14-2.57l-6.26-3.58a2.74 2.74 0 0 0 .12-.76l6.15-3.52A3.49 3.49 0 1 0 14 5.5a3.35 3.35 0 0 0 .12.85L8.43 9.6A3.5 3.5 0 1 0 5.5 15zm12 2a1.5 1.5 0 1 1-1.5 1.5 1.5 1.5 0 0 1 1.5-1.5zm0-13A1.5 1.5 0 1 1 16 5.5 1.5 1.5 0 0 1 17.5 4zm-12 6A1.5 1.5 0 1 1 4 11.5 1.5 1.5 0 0 1 5.5 10z"}}]})(e)}function EDe(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 2H4c-1.103 0-2 .897-2 2v18l4-4h14c1.103 0 2-.897 2-2V4c0-1.103-.897-2-2-2zm-7 13h-2v-2h2v2zm0-4h-2V5h2v6z"}}]})(e)}function Smt(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 2H4c-1.103 0-2 .894-2 1.992v12.016C2 17.106 2.897 18 4 18h3v4l6.351-4H20c1.103 0 2-.894 2-1.992V3.992A1.998 1.998 0 0 0 20 2zm-6 11H7v-2h7v2zm3-4H7V7h10v2z"}}]})(e)}function Tmt(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4zM14 13h-3v3H9v-3H6v-2h3V8h2v3h3v2z"}}]})(e)}function Pmt(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}}]})(e)}function Mmt(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"}}]})(e)}function LG(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M17 3H7c-1.1 0-2 .9-2 2v16l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"}}]})(e)}function NG(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M17 3H7c-1.1 0-2 .9-2 2v16l7-3 7 3V5c0-1.1-.9-2-2-2z"}}]})(e)}function WO(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM19 14.9L14.9 19H9.1L5 14.9V9.1L9.1 5h5.8L19 9.1v5.8z"}},{tag:"circle",attr:{cx:"12",cy:"16",r:"1"}},{tag:"path",attr:{d:"M11 7h2v7h-2z"}}]})(e)}function Amt(e){return vt({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M388.8 896.4v-27.198c.6-2.2 1.6-4.2 2-6.4 8.8-57.2 56.4-102.4 112.199-106.2 62.4-4.4 115.2 31.199 132.4 89.199 2.2 7.6 3.8 15.6 5.8 23.4v27.2c-.6 1.8-1.6 3.399-1.8 5.399-8.6 52.8-46.6 93-98.6 104.4-4 .8-8 2-12 3h-27.2c-1.8-.6-3.6-1.6-5.4-1.8-52-8.4-91.599-45.4-103.6-96.8-1.2-5-2.6-9.6-3.8-14.2zm252.4-768.797l-.001 27.202c-.6 2.2-1.6 4.2-1.8 6.4-9 57.6-56.8 102.6-113.2 106.2-62.2 4-114.8-32-131.8-90.2-2.2-7.401-3.8-15-5.6-22.401v-27.2c.6-1.8 1.6-3.4 2-5.2 9.6-52 39.8-86 90.2-102.2 6.6-2.2 13.6-3.4 20.4-5.2h27.2c1.8.6 3.6 1.6 5.4 1.8 52.2 8.6 91.6 45.4 103.6 96.8 1.201 4.8 2.401 9.4 3.601 13.999zm-.001 370.801v27.2c-.6 2.2-1.6 4.2-2 6.4-9 57.4-58.6 103.6-114.6 106-63 2.8-116.4-35.2-131.4-93.8-1.6-6.2-3-12.4-4.4-18.6v-27.2c.6-2.2 1.6-4.2 2-6.4 8.8-57.4 58.6-103.601 114.6-106.2 63-3 116.4 35.2 131.4 93.8 1.6 6.4 3 12.6 4.4 18.8z"}}]})(e)}function qO(e){return vt({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M899.4 638.2h-27.198c-2.2-.6-4.2-1.6-6.4-2-57.2-8.8-102.4-56.4-106.2-112.199-4.401-62.4 31.199-115.2 89.199-132.4 7.6-2.2 15.6-3.8 23.399-5.8h27.2c1.8.6 3.4 1.6 5.4 1.8 52.8 8.6 93 46.6 104.4 98.6.8 4 2 8 3 12v27.2c-.6 1.8-1.6 3.6-1.8 5.4-8.4 52-45.4 91.599-96.801 103.6-5 1.2-9.6 2.6-14.2 3.8zM130.603 385.8l27.202.001c2.2.6 4.2 1.6 6.4 1.8 57.6 9 102.6 56.8 106.2 113.2 4 62.2-32 114.8-90.2 131.8-7.401 2.2-15 3.8-22.401 5.6h-27.2c-1.8-.6-3.4-1.6-5.2-2-52-9.6-86-39.8-102.2-90.2-2.2-6.6-3.4-13.6-5.2-20.4v-27.2c.6-1.8 1.6-3.6 1.8-5.4 8.6-52.2 45.4-91.6 96.8-103.6 4.8-1.201 9.4-2.401 13.999-3.601zm370.801.001h27.2c2.2.6 4.2 1.6 6.4 2 57.4 9 103.6 58.6 106 114.6 2.8 63-35.2 116.4-93.8 131.4-6.2 1.6-12.4 3-18.6 4.4h-27.2c-2.2-.6-4.2-1.6-6.4-2-57.4-8.8-103.601-58.6-106.2-114.6-3-63 35.2-116.4 93.8-131.4 6.4-1.6 12.6-3 18.8-4.4z"}}]})(e)}function CDe(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M15 4H5V20H19V8H15V4ZM3 2.9918C3 2.44405 3.44749 2 3.9985 2H16L20.9997 7L21 20.9925C21 21.5489 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918ZM12 11.5C10.6193 11.5 9.5 10.3807 9.5 9C9.5 7.61929 10.6193 6.5 12 6.5C13.3807 6.5 14.5 7.61929 14.5 9C14.5 10.3807 13.3807 11.5 12 11.5ZM7.52746 17C7.77619 14.75 9.68372 13 12 13C14.3163 13 16.2238 14.75 16.4725 17H7.52746Z"}}]})(e)}function GO(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M7 4V2H17V4H22V6H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V6H2V4H7ZM6 6V20H18V6H6ZM9 9H11V17H9V9ZM13 9H15V17H13V9Z"}}]})(e)}function ODe(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4 22C4 17.5817 7.58172 14 12 14C16.4183 14 20 17.5817 20 22H4ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13Z"}}]})(e)}function jmt(e){return vt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M14 14.252V22H4C4 17.5817 7.58172 14 12 14C12.6906 14 13.3608 14.0875 14 14.252ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13ZM19 16.5858L21.1213 14.4645L22.5355 15.8787L20.4142 18L22.5355 20.1213L21.1213 21.5355L19 19.4142L16.8787 21.5355L15.4645 20.1213L17.5858 18L15.4645 15.8787L16.8787 14.4645L19 16.5858Z"}}]})(e)}function kDe(e){return vt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"}}]})(e)}function RDe(e){return vt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M11 8h2V6h-2v2Z"}},{tag:"path",attr:{d:"M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm8.5.5a.5.5 0 0 0-1 0v7a.5.5 0 0 0 1 0v-7ZM2 5.5a.5.5 0 0 0 .5.5H6a.5.5 0 0 0 0-1H2.5a.5.5 0 0 0-.5.5ZM2.5 7a.5.5 0 0 0 0 1H6a.5.5 0 0 0 0-1H2.5ZM2 9.5a.5.5 0 0 0 .5.5H6a.5.5 0 0 0 0-1H2.5a.5.5 0 0 0-.5.5Zm8-4v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5Z"}}]})(e)}const KO=({onDelete:e,message:t})=>M.jsxs("div",{className:"flex items-start justify-between gap-5",children:[M.jsx(kDe,{className:"text-4xl"}),M.jsxs("div",{children:[M.jsx("p",{children:t}),M.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[M.jsx(ae.Button,{variant:"outlined",size:"sm",className:"rounded-full text-black border-black",onClick:()=>{Ee.dismiss()},children:"Cancel"}),M.jsx(ae.Button,{className:"rounded-full bg-socioverse-500",size:"sm",onClick:()=>{e()},children:"Ok"})]})]})]}),Imt=async e=>(await ot.post($e.CREATE_POST,e,{headers:{"Content-Type":"multipart/form-data"}})).data,Lmt=async e=>{const r=(e-1)*3;return(await ot.get(`${$e.GET_POSTS}?skip=${r}&limit=3`)).data},SDe=async e=>(await ot.delete(`${$e.DELETE_POST}/${e}`)).data,TDe=async e=>(await ot.get(`${$e.GET_POST_DETAILS}/${e}`)).data,PDe=async e=>(await ot.post(`${$e.ADD_COMMENT}?postId=${e.postId}&comment=${e.comment}`)).data,MDe=async e=>(await ot.post(`${$e.ADD_REPLY}?commentId=${e.commentId}&reply=${e.reply}`)).data,$G=async e=>(await ot.get(`${$e.GET_COMMENTS}/${e}`)).data,ADe=async e=>(await ot.get(`${$e.GET_REPLIES}/${e}`)).data,jDe=async e=>(await ot.post(`${$e.LIKE_POST}/${e}`)).data,IDe=async e=>(await ot.post(`${$e.SAVE_POST}/${e}`)).data,LDe=async(e,t)=>(await ot.post(`${$e.REPORT_POST}?label=${e}&postId=${t}`)).data,NDe=async(e,t)=>(await ot.patch(`${$e.EDIT_POST}/${e}`,t,{headers:{"Content-Type":"multipart/form-data"}})).data,$De=async(e,t)=>(await ot.put(`${$e.EDIT_COMMENT}/${e}`,{comment:t})).data,DDe=async e=>(await ot.delete(`${$e.DELETE_COMMENT}/${e}`)).data,FDe=async(e,t)=>(await ot.delete(`${$e.DELETE_REPLY}?replyId=${e}&commentId=${t}`)).data,zDe=async e=>(await ot.post(`${$e.REPORT_COMMENT}/${e}`)).data,BDe=async(e,t)=>(await ot.post(`${$e.REPORT_REPLY}?replyId=${e}&commentId=${t}`)).data,FA=async(e,t)=>{const n=(t-1)*3,o=encodeURIComponent(e);return(await ot.get(`${$e.SEARCH_POSTS}?searchQuery=${o}&skip=${n}&limit=3`)).data},zA=async(e,t)=>(await ot.post(`${$e.LIKE_COMMENT}`,{commentId:e,action:t})).data,BA=async(e,t,r)=>(await ot.post(`${$e.LIKE_REPLY}`,{replyId:e,commentId:t,action:r})).data,Nmt=async e=>{const r=(e-1)*3;return(await ot.get(`${$e.GET_USER_POSTS}?skip=${r}&limit=3`)).data},$mt=async(e,t)=>{const n=(t-1)*3;return(await ot.get(`${$e.GET_OTHER_USER_POSTS}/${e}?skip=${n}&limit=3`)).data},Dmt=async e=>{const r=(e-1)*3;return(await ot.get(`${$e.GET_USER_LIKED_POSTS}?skip=${r}&limit=3`)).data},Fmt=async e=>{const r=(e-1)*3;return(await ot.get(`${$e.GET_USER_SAVED_POSTS}?skip=${r}&limit=3`)).data},DG=async e=>(await ot.get(`${$e.GET_LIKED_USERS}/${e}`)).data;function VDe(e,t){t===void 0&&(t={});var r=t.insertAt;if(!(!e||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var HDe=`.react-input-emoji--container { - color: #4b4b4b; - text-rendering: optimizeLegibility; - background-color: #fff; - border: 1px solid #fff; - border-radius: 21px; - margin: 5px 10px; - box-sizing: border-box; - flex: 1 1 auto; - font-size: 15px; - font-family: sans-serif; - font-weight: 400; - line-height: 20px; - min-height: 20px; - min-width: 0; - outline: none; - width: inherit; - will-change: width; - vertical-align: baseline; - border: 1px solid #eaeaea; - margin-right: 0; -} - -.react-input-emoji--wrapper { - display: flex; - overflow: hidden; - flex: 1; - position: relative; - padding-right: 0; - vertical-align: baseline; - outline: none; - margin: 0; - padding: 0; - border: 0; -} - -.react-input-emoji--input { - font-weight: 400; - max-height: 100px; - min-height: 20px; - outline: none; - overflow-x: hidden; - overflow-y: auto; - position: relative; - white-space: pre-wrap; - word-wrap: break-word; - z-index: 1; - width: 100%; - user-select: text; - padding: 9px 12px 11px; - text-align: left; -} - -.react-input-emoji--input img { - vertical-align: middle; - width: 18px !important; - height: 18px !important; - display: inline !important; - margin-left: 1px; - margin-right: 1px; -} - -.react-input-emoji--overlay { - position: fixed; - width: 100%; - height: 100%; - top: 0; - left: 0; - z-index: 9; -} - -.react-input-emoji--placeholder { - color: #a0a0a0; - pointer-events: none; - position: absolute; - user-select: none; - z-index: 2; - left: 16px; - top: 0; - bottom: 0; - display: flex; - align-items: center; - width: calc(100% - 22px); -} - -.react-input-emoji--button { - position: relative; - display: block; - text-align: center; - padding: 0 10px; - overflow: hidden; - transition: color 0.1s ease-out; - margin: 0; - box-shadow: none; - background: none; - border: none; - outline: none; - cursor: pointer; - flex-shrink: 0; -} - -.react-input-emoji--button svg { - fill: #858585; -} - -.react-input-emoji--button__show svg { - fill: #128b7e; -} - -.react-emoji { - display: flex; - align-items: center; - position: relative; - width: 100%; -} - -.react-emoji-picker--container { - position: absolute; - top: 0; - width: 100%; -} - -.react-emoji-picker--wrapper { - position: absolute; - bottom: 0; - right: 0; - height: 435px; - width: 352px; - overflow: hidden; - z-index: 10; -} - -.react-emoji-picker { - position: absolute; - top: 0; - left: 0; - animation: slidein 0.1s ease-in-out; -} - -.react-emoji-picker__show { - top: 0; -} - -.react-input-emoji--mention--container { - position: absolute; - top: 0; - left: 0; - width: 100%; - z-index: 10; -} - -.react-input-emoji--mention--list { - background-color: #fafafa; - border: 1px solid #eaeaea; - border-radius: 4px; - margin: 0; - padding: 0; - list-style: none; - display: flex; - gap: 5px; - flex-direction: column; - position: absolute; - bottom: 0; - width: 100%; - left: 0; -} - -.react-input-emoji--mention--item { - display: flex; - align-items: center; - gap: 10px; - padding: 5px 10px; - background-color: transparent; - width: 100%; - margin: 0; - border: 0; -} - -.react-input-emoji--mention--item__selected { - background-color: #eeeeee; -} - -.react-input-emoji--mention--item--img { - width: 34px; - height: 34px; - border-radius: 50%; -} - -.react-input-emoji--mention--item--name { - font-size: 16px; - color: #333; -} - -.react-input-emoji--mention--item--name__selected { - color: green; -} - -.react-input-emoji--mention--text { - color: #039be5; -} - -.react-input-emoji--mention--loading { - background-color: #fafafa; - border: 1px solid #eaeaea; - border-radius: 4px; - display: flex; - align-items: center; - justify-content: center; - padding: 10px 0; - position: absolute; - bottom: 0; - left: 0; - width: 100%; -} - -.react-input-emoji--mention--loading--spinner, -.react-input-emoji--mention--loading--spinner::after { - border-radius: 50%; - width: 10em; - height: 10em; -} - -.react-input-emoji--mention--loading--spinner { - margin: 1px auto; - font-size: 2px; - position: relative; - text-indent: -9999em; - border-top: 1.1em solid rgba(0, 0, 0, 0.1); - border-right: 1.1em solid rgba(0, 0, 0, 0.1); - border-bottom: 1.1em solid rgba(0, 0, 0, 0.1); - border-left: 1.1em solid rgba(0, 0, 0, 0.4); - transform: translateZ(0); - animation: load8 1.1s infinite linear; -} - -@keyframes load8 { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} - -@keyframes slidein { - from { - opacity: 0; - } - - to { - opacity: 1; - } -} -`;VDe(HDe);function UDe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,a,i,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}function VA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function HA(e){for(var t=1;t=0;--z){var F=this.tryEntries[z],$=F.completion;if(F.tryLoc==="root")return q("end");if(F.tryLoc<=this.prev){var W=n.call(F,"catchLoc"),G=n.call(F,"finallyLoc");if(W&&G){if(this.prev=0;--q){var z=this.tryEntries[q];if(z.tryLoc<=this.prev&&n.call(z,"finallyLoc")&&this.prev=0;--V){var q=this.tryEntries[V];if(q.finallyLoc===B)return this.complete(q.completion,q.afterLoc),j(q),y}},catch:function(B){for(var V=this.tryEntries.length-1;V>=0;--V){var q=this.tryEntries[V];if(q.tryLoc===B){var z=q.completion;if(z.type==="throw"){var F=z.arg;j(q)}return F}}throw new Error("illegal catch attempt")},delegateYield:function(B,V,q){return this.delegate={iterator:D(B),resultName:V,nextLoc:q},this.method==="next"&&(this.arg=e),y}},t}function UA(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,o)}function WA(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(l){UA(a,n,o,i,s,"next",l)}function s(l){UA(a,n,o,i,s,"throw",l)}i(void 0)})}}function WDe(e,t,r){return t=eFe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qDe(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a=0)&&(r[o]=e[o]);return r}function GDe(e,t){if(e==null)return{};var r=qDe(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Fi(e,t){return YDe(e)||UDe(e,t)||zG(e,t)||QDe()}function FG(e){return KDe(e)||XDe(e)||zG(e)||ZDe()}function KDe(e){if(Array.isArray(e))return p9(e)}function YDe(e){if(Array.isArray(e))return e}function XDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zG(e,t){if(e){if(typeof e=="string")return p9(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p9(e,t)}}function p9(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r span > span'));if(!n)return qA(e.native);var o=VG(n.style.cssText,'"',"'");return HG(o,e.native)}function HG(e,t){return'')}function qA(e){return''.concat(e,"")}function ip(e){var t=document.createElement("div");t.innerHTML=e;var r=Array.prototype.slice.call(t.querySelectorAll("img"));return r.forEach(function(n){t.innerHTML=t.innerHTML.replace(n.outerHTML,n.dataset.emoji)}),t.innerHTML}function oFe(e){var t,r;if(window.getSelection){if(t=window.getSelection(),t===null)return;if(t.getRangeAt&&t.rangeCount){r=t.getRangeAt(0),r.deleteContents();var n=document.createElement("div");n.innerHTML=e;for(var o=document.createDocumentFragment(),a,i;a=n.firstChild;)i=o.appendChild(a);r.insertNode(o),i&&(r=r.cloneRange(),r.setStartAfter(i),r.collapse(!0),t.removeAllRanges(),t.addRange(r))}}}function GA(e){var t=e.text,r=e.html,n=t.length,o=(r.match(//gi,"[BR]"),r=t.replace(/<[^>]+>/g,""),n=r.replace(/\[BR\]/gi,"
");return n}function UG(e){var t=g.useRef([]),r=g.useRef(""),n=g.useCallback(function(a){t.current.push(a)},[]),o=g.useCallback(function(a){var i=t.current.reduce(function(s,l){return l(s)},a);return i=sFe(i,e),r.current=i,i},[]);return{addSanitizeFn:n,sanitize:o,sanitizedTextRef:r}}function sFe(e,t){var r=document.createElement("div");r.innerHTML=e;var n;return t?n=iFe(r):n=r.innerText||"",n=n.replace(/\n/gi,""),n}function lFe(e){var t=e.ref,r=e.textInputRef,n=e.setValue,o=e.emitChange,a=UG(!1),i=a.sanitize,s=a.sanitizedTextRef;g.useImperativeHandle(t,function(){return{get value(){return s.current},set value(l){n(l)},focus:function(){r.current!==null&&r.current.focus()},blur:function(){r.current!==null&&i(r.current.html),o()}}})}function cFe(e,t,r){var n=g.useRef(null),o=g.useRef(r),a=g.useCallback(function(){if(e.current!==null){var s=n.current,l=e.current.size;(!s||s.width!==l.width||s.height!==l.height)&&typeof t=="function"&&t(l),n.current=l}},[t,e]),i=g.useCallback(function(s){typeof o.current=="function"&&o.current(s),typeof t=="function"&&a()},[a,t]);return g.useEffect(function(){e.current&&a()},[a,e]),i}var uFe=["placeholder","style","tabIndex","className","onChange"],dFe=function(t,r){var n=t.placeholder,o=t.style,a=t.tabIndex,i=t.className,s=t.onChange,l=GDe(t,uFe);g.useImperativeHandle(r,function(){return{appendContent:function(w){u.current&&u.current.focus(),oFe(w),u.current&&u.current.focus(),u.current&&c.current&&ip(u.current.innerHTML)===""?c.current.style.visibility="visible":c.current&&(c.current.style.visibility="hidden"),u.current&&typeof s=="function"&&s(u.current.innerHTML)},set html(_){if(u.current&&(u.current.innerHTML=_),c.current){var w=ip(_);w===""?c.current.style.visibility="visible":c.current.style.visibility="hidden"}typeof s=="function"&&u.current&&s(u.current.innerHTML)},get html(){return u.current?u.current.innerHTML:""},get text(){return u.current?u.current.innerText:""},get size(){return u.current?{width:u.current.offsetWidth,height:u.current.offsetHeight}:{width:0,height:0}},focus:function(){u.current&&u.current.focus()}}});var c=g.useRef(null),u=g.useRef(null);function p(_){if(_.key==="Enter"&&(_.shiftKey===!0||_.ctrlKey===!0)&&l.shouldReturn&&(_.preventDefault(),u.current)){u.current.innerHTML="".concat(u.current.innerHTML,"

"),aFe(u);return}_.key==="Enter"?l.onEnter(_):_.key==="ArrowUp"?l.onArrowUp(_):_.key==="ArrowDown"?l.onArrowDown(_):_.key.length===1&&c.current&&(c.current.style.visibility="hidden"),l.onKeyDown(_)}function h(){l.onFocus()}function v(_){l.onKeyUp(_);var w=u.current;if(c.current&&w){var y=ip(w.innerHTML);y===""?c.current.style.visibility="visible":c.current.style.visibility="hidden"}typeof s=="function"&&u.current&&s(u.current.innerHTML)}return De.createElement("div",{className:"react-input-emoji--container",style:o},De.createElement("div",{className:"react-input-emoji--wrapper",onClick:h},De.createElement("div",{ref:c,className:"react-input-emoji--placeholder"},n),De.createElement("div",{ref:u,onKeyDown:p,onKeyUp:v,tabIndex:a,contentEditable:!0,className:"react-input-emoji--input".concat(i?" ".concat(i):""),onBlur:l.onBlur,onCopy:l.onCopy,onPaste:l.onPaste,"data-testid":"react-input-emoji--input"})))},fFe=g.forwardRef(dFe);function KA(e){var t=e.showPicker,r=e.toggleShowPicker,n=e.buttonElement,o=e.buttonRef,a=g.useRef(null),i=g.useState(!1),s=Fi(i,2),l=s[0],c=s[1];return g.useEffect(function(){var u,p,h,v;((u=o==null||(p=o.current)===null||p===void 0||(p=p.childNodes)===null||p===void 0?void 0:p.length)!==null&&u!==void 0?u:0)>2?(a.current.appendChild(o.current.childNodes[0]),c(!0)):((h=n==null||(v=n.childNodes)===null||v===void 0?void 0:v.length)!==null&&h!==void 0?h:0)>2&&(a.current.appendChild(n==null?void 0:n.childNodes[0]),c(!0))},[n==null?void 0:n.childNodes]),De.createElement("button",{ref:a,type:"button",className:"react-input-emoji--button".concat(t?" react-input-emoji--button__show":""),onClick:r},!l&&De.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",className:"react-input-emoji--button--icon"},De.createElement("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),De.createElement("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})))}function WG(e){return e&&e.__esModule?e.default:e}function ia(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var e4,st,qG,sp,GG,YA,N7={},KG=[],hFe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function $s(e,t){for(var r in t)e[r]=t[r];return e}function YG(e){var t=e.parentNode;t&&t.removeChild(e)}function m9(e,t,r){var n,o,a,i={};for(a in t)a=="key"?n=t[a]:a=="ref"?o=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?e4.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return gy(e,i,n,o,null)}function gy(e,t,r,n,o){var a={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++qG};return o==null&&st.vnode!=null&&st.vnode(a),a}function fi(){return{current:null}}function Qd(e){return e.children}function Ga(e,t){this.props=e,this.context=t}function Jd(e,t){if(t==null)return e.__?Jd(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t0?gy(v.type,v.props,v.key,null,v.__v):v)!=null){if(v.__=r,v.__b=r.__b+1,(h=m[u])===null||h&&v.key==h.key&&v.type===h.type)m[u]=void 0;else for(p=0;p{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!e)return()=>!1;const t=25,r=20,n=Math.floor(t/2);return e.font=n+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=r*2,e.canvas.height=t,o=>{e.clearRect(0,0,r*2,t),e.fillStyle="#FF0000",e.fillText(o,0,22),e.fillStyle="#0000FF",e.fillText(o,r,22);const a=e.getImageData(0,0,r,t).data,i=a.length;let s=0;for(;s=i)return!1;const l=r+s/4%r,c=Math.floor(s/4/r),u=e.getImageData(l,c,1,1).data;return!(a[s]!==u[0]||a[s+2]!==u[2]||e.measureText(o).width>=r)}})();var ej={latestVersion:xFe,noCountryFlags:_Fe};const g9=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let an=null;function CFe(e){an||(an=nl.get("frequently")||{});const t=e.id||e;t&&(an[t]||(an[t]=0),an[t]+=1,nl.set("last",t),nl.set("frequently",an))}function OFe({maxFrequentRows:e,perLine:t}){if(!e)return[];an||(an=nl.get("frequently"));let r=[];if(!an){an={};for(let a in g9.slice(0,t)){const i=g9[a];an[i]=t-a,r.push(i)}return r}const n=e*t,o=nl.get("last");for(let a in an)r.push(a);if(r.sort((a,i)=>{const s=an[i],l=an[a];return s==l?a.localeCompare(i):s-l}),r.length>n){const a=r.slice(n);r=r.slice(0,n);for(let i of a)i!=o&&delete an[i];o&&r.indexOf(o)==-1&&(delete an[r[r.length-1]],r.splice(-1,1,o)),nl.set("frequently",an)}return r}var aK={add:CFe,get:OFe,DEFAULTS:g9},iK={};iK=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var Ei={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:14,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","kr","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let gn=null,Et=null;const Lx={};async function tj(e){if(Lx[e])return Lx[e];const r=await(await fetch(e)).json();return Lx[e]=r,r}let Nx=null,sK=null,lK=!1;function t4(e,{caller:t}={}){return Nx||(Nx=new Promise(r=>{sK=r})),e?kFe(e):t&&!lK&&console.warn(`\`${t}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),Nx}async function kFe(e){lK=!0;let{emojiVersion:t,set:r,locale:n}=e;if(t||(t=Ei.emojiVersion.value),r||(r=Ei.set.value),n||(n=Ei.locale.value),Et)Et.categories=Et.categories.filter(l=>!l.name);else{Et=(typeof e.data=="function"?await e.data():e.data)||await tj(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${t}/${r}.json`),Et.emoticons={},Et.natives={},Et.categories.unshift({id:"frequent",emojis:[]});for(const l in Et.aliases){const c=Et.aliases[l],u=Et.emojis[c];u&&(u.aliases||(u.aliases=[]),u.aliases.push(l))}Et.originalCategories=Et.categories}if(gn=(typeof e.i18n=="function"?await e.i18n():e.i18n)||(n=="en"?WG(iK):await tj(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${n}.json`)),e.custom)for(let l in e.custom){l=parseInt(l);const c=e.custom[l],u=e.custom[l-1];if(!(!c.emojis||!c.emojis.length)){c.id||(c.id=`custom_${l+1}`),c.name||(c.name=gn.categories.custom),u&&!c.icon&&(c.target=u.target||u),Et.categories.push(c);for(const p of c.emojis)Et.emojis[p.id]=p}}e.categories&&(Et.categories=Et.originalCategories.filter(l=>e.categories.indexOf(l.id)!=-1).sort((l,c)=>{const u=e.categories.indexOf(l.id),p=e.categories.indexOf(c.id);return u-p}));let o=null,a=null;r=="native"&&(o=ej.latestVersion(),a=e.noCountryFlags||ej.noCountryFlags());let i=Et.categories.length,s=!1;for(;i--;){const l=Et.categories[i];if(l.id=="frequent"){let{maxFrequentRows:p,perLine:h}=e;p=p>=0?p:Ei.maxFrequentRows.value,h||(h=Ei.perLine.value),l.emojis=aK.get({maxFrequentRows:p,perLine:h})}if(!l.emojis||!l.emojis.length){Et.categories.splice(i,1);continue}const{categoryIcons:c}=e;if(c){const p=c[l.id];p&&!l.icon&&(l.icon=p)}let u=l.emojis.length;for(;u--;){const p=l.emojis[u],h=p.id?p:Et.emojis[p],v=()=>{l.emojis.splice(u,1)};if(!h||e.exceptEmojis&&e.exceptEmojis.includes(h.id)){v();continue}if(o&&h.version>o){v();continue}if(a&&l.id=="flags"&&!MFe.includes(h.id)){v();continue}if(!h.search){if(s=!0,h.search=","+[[h.id,!1],[h.name,!0],[h.keywords,!1],[h.emoticons,!1]].map(([w,y])=>{if(w)return(Array.isArray(w)?w:[w]).map(m=>(y?m.split(/[-|_|\s]+/):[m]).map(f=>f.toLowerCase())).flat()}).flat().filter(w=>w&&w.trim()).join(","),h.emoticons)for(const w of h.emoticons)Et.emoticons[w]||(Et.emoticons[w]=h.id);let _=0;for(const w of h.skins){if(!w)continue;_++;const{native:y}=w;y&&(Et.natives[y]=h.id,h.search+=`,${y}`);const m=_==1?"":`:skin-tone-${_}:`;w.shortcodes=`:${h.id}:${m}`}}}}s&&Ed.reset(),sK()}function cK(e,t,r){e||(e={});const n={};for(let o in t)n[o]=uK(o,e,t,r);return n}function uK(e,t,r,n){const o=r[e];let a=n&&n.getAttribute(e)||(t[e]!=null&&t[e]!=null?t[e]:null);return o&&(a!=null&&o.value&&typeof o.value!=typeof a&&(typeof o.value=="boolean"?a=a!="false":a=o.value.constructor(a)),o.transform&&a&&(a=o.transform(a)),(a==null||o.choices&&o.choices.indexOf(a)==-1)&&(a=o.value)),a}const RFe=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let v9=null;function SFe(e){return e.id?e:Et.emojis[e]||Et.emojis[Et.aliases[e]]||Et.emojis[Et.natives[e]]}function TFe(){v9=null}async function PFe(e,{maxResults:t,caller:r}={}){if(!e||!e.trim().length)return null;t||(t=90),await t4(null,{caller:r||"SearchIndex.search"});const n=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((s,l,c)=>s.trim()&&c.indexOf(s)==l);if(!n.length)return;let o=v9||(v9=Object.values(Et.emojis)),a,i;for(const s of n){if(!o.length)break;a=[],i={};for(const l of o){if(!l.search)continue;const c=l.search.indexOf(`,${s}`);c!=-1&&(a.push(l),i[l.id]||(i[l.id]=0),i[l.id]+=l.id==s?0:c+1)}o=a}return a.length<2||(a.sort((s,l)=>{const c=i[s.id],u=i[l.id];return c==u?s.id.localeCompare(l.id):c-u}),a.length>t&&(a=a.slice(0,t))),a}var Ed={search:PFe,get:SFe,reset:TFe,SHORTCODES_REGEX:RFe};const MFe=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function AFe(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((r,n)=>r==t[n])}async function jFe(e=1){for(let t in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function IFe(e,{skinIndex:t=0}={}){const r=e.skins[t]||(()=>(t=0,e.skins[t]))(),n={id:e.id,name:e.name,native:r.native,unified:r.unified,keywords:e.keywords,shortcodes:r.shortcodes||e.shortcodes};return e.skins.length>1&&(n.skin=t+1),r.src&&(n.src=r.src),e.aliases&&e.aliases.length&&(n.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(n.emoticons=e.emoticons),n}const LFe={activity:{outline:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Pe("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Pe("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:Pe("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Pe("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Pe("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Pe("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Pe("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Pe("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),Pe("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Pe("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Pe("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),Pe("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:Pe("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Pe("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),Pe("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:Pe("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Pe("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),Pe("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Pe("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Pe("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),Pe("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Pe("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Pe("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Pe("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},NFe={loupe:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Pe("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:Pe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Pe("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})};var z7={categories:LFe,search:NFe};function b9(e){let{id:t,skin:r,emoji:n}=e;if(e.shortcodes){const s=e.shortcodes.match(Ed.SHORTCODES_REGEX);s&&(t=s[1],s[2]&&(r=s[2]))}if(n||(n=Ed.get(t||e.native)),!n)return e.fallback;const o=n.skins[r-1]||n.skins[0],a=o.src||(e.set!="native"&&!e.spritesheet?typeof e.getImageURL=="function"?e.getImageURL(e.set,o.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/64/${o.unified}.png`:void 0),i=typeof e.getSpritesheetURL=="function"?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/sheets-256/64.png`;return Pe("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:a?Pe("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:o.native||o.shortcodes,src:a}):e.set=="native"?Pe("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:o.native}):Pe("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${i})`,backgroundSize:`${100*Et.sheet.cols}% ${100*Et.sheet.rows}%`,backgroundPosition:`${100/(Et.sheet.cols-1)*o.x}% ${100/(Et.sheet.rows-1)*o.y}%`}})})}const $Fe=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class dK extends $Fe{static get observedAttributes(){return Object.keys(this.Props)}update(t={}){for(let r in t)this.attributeChangedCallback(r,null,t[r])}attributeChangedCallback(t,r,n){if(!this.component)return;const o=uK(t,{[t]:n},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[t]:o}):(this.component.props[t]=o,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(t={}){if(super(),this.props=t,t.parent||t.ref){let r=null;const n=t.parent||(r=t.ref&&t.ref.current);r&&(r.innerHTML=""),n&&n.appendChild(this)}}}class DFe extends dK{setShadow(){this.attachShadow({mode:"open"})}injectStyles(t){if(!t)return;const r=document.createElement("style");r.textContent=t,this.shadowRoot.insertBefore(r,this.shadowRoot.firstChild)}constructor(t,{styles:r}={}){super(t),this.setShadow(),this.injectStyles(r)}}var fK={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:Ei.set,skin:Ei.skin};class hK extends dK{async connectedCallback(){const t=cK(this.props,fK,this);t.element=this,t.ref=r=>{this.component=r},await t4(),!this.disconnected&&nK(Pe(b9,{...t}),this)}constructor(t){super(t)}}ia(hK,"Props",fK);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",hK);var rj,y9=[],nj=st.__b,oj=st.__r,aj=st.diffed,ij=st.__c,sj=st.unmount;function FFe(){var e;for(y9.sort(function(t,r){return t.__v.__b-r.__v.__b});e=y9.pop();)if(e.__P)try{e.__H.__h.forEach(vy),e.__H.__h.forEach(w9),e.__H.__h=[]}catch(t){e.__H.__h=[],st.__e(t,e.__v)}}st.__b=function(e){nj&&nj(e)},st.__r=function(e){oj&&oj(e);var t=e.__c.__H;t&&(t.__h.forEach(vy),t.__h.forEach(w9),t.__h=[])},st.diffed=function(e){aj&&aj(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(y9.push(t)!==1&&rj===st.requestAnimationFrame||((rj=st.requestAnimationFrame)||function(r){var n,o=function(){clearTimeout(a),lj&&cancelAnimationFrame(n),setTimeout(r)},a=setTimeout(o,100);lj&&(n=requestAnimationFrame(o))})(FFe))},st.__c=function(e,t){t.some(function(r){try{r.__h.forEach(vy),r.__h=r.__h.filter(function(n){return!n.__||w9(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],st.__e(n,r.__v)}}),ij&&ij(e,t)},st.unmount=function(e){sj&&sj(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{vy(n)}catch(o){t=o}}),t&&st.__e(t,r.__v))};var lj=typeof requestAnimationFrame=="function";function vy(e){var t=e.__c;typeof t=="function"&&(e.__c=void 0,t())}function w9(e){e.__c=e.__()}function zFe(e,t){for(var r in t)e[r]=t[r];return e}function cj(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function B7(e){this.props=e}(B7.prototype=new Ga).isPureReactComponent=!0,B7.prototype.shouldComponentUpdate=function(e,t){return cj(this.props,e)||cj(this.state,t)};var uj=st.__b;st.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),uj&&uj(e)};var BFe=st.__e;st.__e=function(e,t,r){if(e.then){for(var n,o=t;o=o.__;)if((n=o.__c)&&n.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),n.__c(e,t)}BFe(e,t,r)};var dj=st.unmount;function $x(){this.__u=0,this.t=null,this.__b=null}function pK(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function J5(){this.u=null,this.o=null}st.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),dj&&dj(e)},($x.prototype=new Ga).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=pK(n.__v),a=!1,i=function(){a||(a=!0,r.__R=null,o?o(s):s())};r.__R=i;var s=function(){if(!--n.__u){if(n.state.__e){var c=n.state.__e;n.__v.__k[0]=function p(h,v,_){return h&&(h.__v=null,h.__k=h.__k&&h.__k.map(function(w){return p(w,v,_)}),h.__c&&h.__c.__P===v&&(h.__e&&_.insertBefore(h.__e,h.__d),h.__c.__e=!0,h.__c.__P=_)),h}(c,c.__c.__P,c.__c.__O)}var u;for(n.setState({__e:n.__b=null});u=n.t.pop();)u.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__e:n.__b=n.__v.__k[0]}),e.then(i,i)},$x.prototype.componentWillUnmount=function(){this.t=[]},$x.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function a(i,s,l){return i&&(i.__c&&i.__c.__H&&(i.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),i.__c.__H=null),(i=zFe({},i)).__c!=null&&(i.__c.__P===l&&(i.__c.__P=s),i.__c=null),i.__k=i.__k&&i.__k.map(function(c){return a(c,s,l)})),i}(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__e&&m9(Qd,null,e.fallback);return o&&(o.__h=null),[m9(Qd,null,t.__e?null:e.children),o]};var fj=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]{const o=r.name||gn.categories[r.id],a=!this.props.unfocused&&r.id==this.state.categoryId;return a&&(t=n),Pe("button",{"aria-label":o,"aria-selected":a||void 0,title:o,type:"button",class:"flex flex-grow flex-center",onMouseDown:i=>i.preventDefault(),onClick:()=>{this.props.onClick({category:r,i:n})},children:this.renderIcon(r)})}),Pe("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:t==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${t*100}%)`:`translateX(${t*100}%)`}})]})})}constructor(){super(),this.categories=Et.categories.filter(t=>!t.target),this.state={categoryId:this.categories[0].id}}}class ZFe extends B7{shouldComponentUpdate(t){for(let r in t)if(r!="children"&&t[r]!=this.props[r])return!0;return!1}render(){return this.props.children}}const em={rowsPerRender:10};class QFe extends Ga{getInitialState(t=this.props){return{skin:nl.get("skin")||t.skin,theme:this.initTheme(t.theme)}}componentWillMount(){this.dir=gn.rtl?"rtl":"ltr",this.refs={menu:fi(),navigation:fi(),scroll:fi(),search:fi(),searchInput:fi(),skinToneButton:fi(),skinToneRadio:fi()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:t}=this.refs;t.current&&t.current.focus()}}componentWillReceiveProps(t){this.nextState||(this.nextState={});for(const r in t)this.nextState[r]=t[r];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let r=!1;for(const o in this.nextState)this.props[o]=this.nextState[o],(o==="custom"||o==="categories")&&(r=!0);delete this.nextState;const n=this.getInitialState();if(r)return this.reset(n);this.setState(n)})}componentWillUnmount(){this.unregister()}async reset(t={}){await t4(this.props),this.initGrid(),this.unobserve(),this.setState(t,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){document.removeEventListener("click",this.handleClickOutside),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:t=[]}={}){Array.isArray(t)||(t=[t]);for(const r of this.observers)t.includes(r)||r.disconnect();this.observers=[].concat(t)}initGrid(){const{categories:t}=Et;this.refs.categories=new Map;const r=Et.categories.map(o=>o.id).join(",");this.navKey&&this.navKey!=r&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=r,this.grid=[],this.grid.setsize=0;const n=(o,a)=>{const i=[];i.__categoryId=a.id,i.__index=o.length,this.grid.push(i);const s=this.grid.length-1,l=s%em.rowsPerRender?{}:fi();return l.index=s,l.posinset=this.grid.setsize+1,o.push(l),i};for(let o of t){const a=[];let i=n(a,o);for(let s of o.emojis)i.length==this.getPerLine()&&(i=n(a,o)),this.grid.setsize+=1,i.push(s);this.refs.categories.set(o.id,{root:fi(),rows:a})}}initTheme(t){if(t!="auto")return t;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addListener(()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})})}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(t=this.props){if(!t.dynamicWidth)return;const{element:r,emojiButtonSize:n}=t,o=()=>{const{width:i}=r.getBoundingClientRect();return Math.floor(i/n)},a=new ResizeObserver(()=>{this.unobserve({except:a}),this.setState({perLine:o()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return a.observe(r),this.observers.push(a),o()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([t,r]){const n=this.state.searchResults||this.grid,o=n[t]&&n[t][r];if(o)return Ed.get(o)}observeCategories(){const t=this.refs.navigation.current;if(!t)return;const r=new Map,n=i=>{i!=t.state.categoryId&&t.setState({categoryId:i})},o={root:this.refs.scroll.current,threshold:[0,1]},a=new IntersectionObserver(i=>{for(const l of i){const c=l.target.dataset.id;r.set(c,l.intersectionRatio)}const s=[...r];for(const[l,c]of s)if(c){n(l);break}},o);for(const{root:i}of this.refs.categories.values())a.observe(i.current);this.observers.push(a)}observeRows(){const t={...this.state.visibleRows},r=new IntersectionObserver(n=>{for(const o of n){const a=parseInt(o.target.dataset.index);o.isIntersecting?t[a]=!0:delete t[a]}this.setState({visibleRows:t})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(em.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*em.rowsPerRender}px`});for(const{rows:n}of this.refs.categories.values())for(const o of n)o.current&&r.observe(o.current);this.observers.push(r)}preventDefault(t){t.preventDefault()}unfocusSearch(){const t=this.refs.searchInput.current;t&&t.blur()}navigate({e:t,input:r,left:n,right:o,up:a,down:i}){const s=this.state.searchResults||this.grid;if(!s.length)return;let[l,c]=this.state.pos;const u=(()=>{if(l==0&&c==0&&!t.repeat&&(n||a))return null;if(l==-1)return!t.repeat&&(o||i)&&r.selectionStart==r.value.length?[0,0]:null;if(n||o){let p=s[l];const h=n?-1:1;if(c+=h,!p[c]){if(l+=h,p=s[l],!p)return l=n?0:s.length-1,c=n?0:s[l].length-1,[l,c];c=n?p.length-1:0}return[l,c]}if(a||i){l+=a?-1:1;const p=s[l];return p?(p[c]||(c=p.length-1),[l,c]):(l=a?0:s.length-1,c=a?0:s[l].length-1,[l,c])}})();if(u)t.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:u,keyboard:!0},()=>{this.scrollTo({row:u[0]})})}scrollTo({categoryId:t,row:r}){const n=this.state.searchResults||this.grid;if(!n.length)return;const o=this.refs.scroll.current,a=o.getBoundingClientRect();let i=0;if(r>=0&&(t=n[r].__categoryId),t&&(i=(this.refs[t]||this.refs.categories.get(t).root).current.getBoundingClientRect().top-(a.top-o.scrollTop)+1),r>=0)if(!r)i=0;else{const s=n[r].__index,l=i+s*this.props.emojiButtonSize,c=l+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(lo.scrollTop+a.height)i=c-a.height;else return}this.ignoreMouse(),o.scrollTop=i}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(t){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:t||[-1,-1],keyboard:!1})}handleEmojiClick({e:t,emoji:r,pos:n}){if(this.props.onEmojiSelect&&(!r&&n&&(r=this.getEmojiByPos(n)),r)){const o=IFe(r,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&aK.add(o,this.props),this.props.onEmojiSelect(o,t)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(t){this.setState({tempSkin:t})}handleSkinClick(t){this.ignoreMouse(),this.closeSkins(),this.setState({skin:t,tempSkin:null}),nl.set("skin",t)}renderNav(){return Pe(XFe,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const t=this.getEmojiByPos(this.state.pos),r=this.state.searchResults&&!this.state.searchResults.length;return Pe("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[Pe("div",{class:"flex flex-middle flex-grow",children:[Pe("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:Pe(b9,{emoji:t,id:r?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),Pe("div",{class:`margin-${this.dir[0]}`,children:t||r?Pe("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Pe("div",{class:"preview-title ellipsis",children:t?t.name:gn.search_no_results_1}),Pe("div",{class:"preview-subtitle ellipsis color-c",children:t?t.skins[0].shortcodes:gn.search_no_results_2})]}):Pe("div",{class:"preview-placeholder color-c",children:gn.pick})})]}),!t&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(t,{pos:r,posinset:n,grid:o}){const a=this.props.emojiButtonSize,i=this.state.tempSkin||this.state.skin,l=(t.skins[i-1]||t.skins[0]).native,c=AFe(this.state.pos,r),u=r.concat(t.id).join("");return Pe(ZFe,{selected:c,skin:i,size:a,children:Pe("button",{"aria-label":l,"aria-selected":c||void 0,"aria-posinset":n,"aria-setsize":o.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?t.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:p=>this.handleEmojiClick({e:p,emoji:t}),onMouseEnter:()=>this.handleEmojiOver(r),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[Pe("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(n-1)%this.props.emojiButtonColors.length]:void 0}}),Pe(b9,{emoji:t,set:this.props.set,size:this.props.emojiSize,skin:i,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},u)}renderSearch(){const t=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return Pe("div",{children:[Pe("div",{class:"spacer"}),Pe("div",{class:"flex flex-middle",children:[Pe("div",{class:"search relative flex-grow",children:[Pe("input",{type:"search",ref:this.refs.searchInput,placeholder:gn.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),Pe("span",{class:"icon loupe flex",children:z7.search.loupe}),this.state.searchResults&&Pe("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:z7.search.delete})]}),t&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:t}=this.state;return t?Pe("div",{class:"category",ref:this.refs.search,children:[Pe("div",{class:`sticky padding-small align-${this.dir[0]}`,children:gn.categories.search}),Pe("div",{children:t.length?t.map((r,n)=>Pe("div",{class:"flex",children:r.map((o,a)=>this.renderEmojiButton(o,{pos:[n,a],posinset:n*this.props.perLine+a+1,grid:t}))})):Pe("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&Pe("a",{onClick:this.props.onAddCustomEmoji,children:gn.add_custom})})})]}):null}renderCategories(){const{categories:t}=Et,r=!!this.state.searchResults,n=this.getPerLine();return Pe("div",{style:{visibility:r?"hidden":void 0,display:r?"none":void 0,height:"100%"},children:t.map(o=>{const{root:a,rows:i}=this.refs.categories.get(o.id);return Pe("div",{"data-id":o.target?o.target.id:o.id,class:"category",ref:a,children:[Pe("div",{class:`sticky padding-small align-${this.dir[0]}`,children:o.name||gn.categories[o.id]}),Pe("div",{class:"relative",style:{height:i.length*this.props.emojiButtonSize},children:i.map((s,l)=>{const c=s.index-s.index%em.rowsPerRender,u=this.state.visibleRows[c],p="current"in s?s:void 0;if(!u&&!p)return null;const h=l*n,v=h+n,_=o.emojis.slice(h,v);return _.length{if(!w)return Pe("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const m=Ed.get(w);return this.renderEmojiButton(m,{pos:[s.index,y],posinset:s.posinset+y,grid:this.grid})})},s.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:Pe("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:Pe("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":gn.skins.choose,title:gn.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:Pe("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const t=this.getEmojiByPos(this.state.pos),r=t?t.name:"";return Pe("div",{"aria-live":"polite",class:"sr-only",children:r})}renderSkins(){const r=this.refs.skinToneButton.current.getBoundingClientRect(),n=this.base.getBoundingClientRect(),o={};return this.dir=="ltr"?o.right=n.right-r.right-3:o.left=r.left-n.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?o.bottom=n.bottom-r.top+6:(o.top=r.bottom-n.top+3,o.bottom="auto"),Pe("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":gn.skins.choose,class:"menu hidden","data-position":o.top?"top":"bottom",style:o,children:[...Array(6).keys()].map(a=>{const i=a+1,s=this.state.skin==i;return Pe("div",{children:[Pe("input",{type:"radio",name:"skin-tone",value:i,"aria-label":gn.skins[i],ref:s?this.refs.skinToneRadio:null,defaultChecked:s,onChange:()=>this.handleSkinMouseOver(i),onKeyDown:l=>{(l.code=="Enter"||l.code=="Space"||l.code=="Tab")&&(l.preventDefault(),this.handleSkinClick(i))}}),Pe("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(i),onMouseEnter:()=>this.handleSkinMouseOver(i),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[Pe("span",{class:`skin-tone skin-tone-${i}`}),Pe("span",{class:"margin-small-lr",children:gn.skins[i]})]})]})})})}render(){const t=this.props.perLine*this.props.emojiButtonSize;return Pe("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${t}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&Pe("div",{class:"padding-lr",children:this.renderSearch()}),Pe("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:Pe("div",{style:{width:this.props.dynamicWidth?"100%":t,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(t){super(),ia(this,"handleClickOutside",r=>{const{element:n}=this.props;r.target!=n&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(r))}),ia(this,"handleBaseClick",r=>{this.state.showSkins&&(r.target.closest(".menu")||(r.preventDefault(),r.stopImmediatePropagation(),this.closeSkins()))}),ia(this,"handleBaseKeydown",r=>{this.state.showSkins&&r.key=="Escape"&&(r.preventDefault(),r.stopImmediatePropagation(),this.closeSkins())}),ia(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),ia(this,"handleSearchInput",async()=>{const r=this.refs.searchInput.current;if(!r)return;const{value:n}=r,o=await Ed.search(n),a=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!o)return this.setState({searchResults:o,pos:[-1,-1]},a);const i=r.selectionStart==r.value.length?[0,0]:[-1,-1],s=[];s.setsize=o.length;let l=null;for(let c of o)(!s.length||l.length==this.getPerLine())&&(l=[],l.__categoryId="search",l.__index=s.length,s.push(l)),l.push(c);this.ignoreMouse(),this.setState({searchResults:s,pos:i},a)}),ia(this,"handleSearchKeyDown",r=>{const n=r.currentTarget;switch(r.stopImmediatePropagation(),r.key){case"ArrowLeft":this.navigate({e:r,input:n,left:!0});break;case"ArrowRight":this.navigate({e:r,input:n,right:!0});break;case"ArrowUp":this.navigate({e:r,input:n,up:!0});break;case"ArrowDown":this.navigate({e:r,input:n,down:!0});break;case"Enter":r.preventDefault(),this.handleEmojiClick({e:r,pos:this.state.pos});break;case"Escape":r.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),ia(this,"clearSearch",()=>{const r=this.refs.searchInput.current;r&&(r.value="",r.focus(),this.handleSearchInput())}),ia(this,"handleCategoryClick",({category:r,i:n})=>{this.scrollTo(n==0?{row:-1}:{categoryId:r.id})}),ia(this,"openSkins",r=>{const{currentTarget:n}=r,o=n.getBoundingClientRect();this.setState({showSkins:o},async()=>{await jFe(2);const a=this.refs.menu.current;a&&(a.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(t),visibleRows:{0:!0},...this.getInitialState(t)}}}class XO extends DFe{async connectedCallback(){const t=cK(this.props,Ei,this);t.element=this,t.ref=r=>{this.component=r},await t4(t),!this.disconnected&&nK(Pe(QFe,{...t}),this.shadowRoot)}constructor(t){super(t,{styles:WG(mK)})}}ia(XO,"Props",Ei);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",XO);var mK={};mK=`:host { - width: min-content; - height: 435px; - min-height: 230px; - border-radius: var(--border-radius); - box-shadow: var(--shadow); - --border-radius: 10px; - --category-icon-size: 18px; - --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; - --font-size: 15px; - --preview-placeholder-size: 21px; - --preview-title-size: 1.1em; - --preview-subtitle-size: .9em; - --shadow-color: 0deg 0% 0%; - --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14); - display: flex; -} - -[data-theme="light"] { - --em-rgb-color: var(--rgb-color, 34, 36, 39); - --em-rgb-accent: var(--rgb-accent, 34, 102, 237); - --em-rgb-background: var(--rgb-background, 255, 255, 255); - --em-rgb-input: var(--rgb-input, 255, 255, 255); - --em-color-border: var(--color-border, rgba(0, 0, 0, .05)); - --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1)); -} - -[data-theme="dark"] { - --em-rgb-color: var(--rgb-color, 222, 222, 221); - --em-rgb-accent: var(--rgb-accent, 58, 130, 247); - --em-rgb-background: var(--rgb-background, 21, 22, 23); - --em-rgb-input: var(--rgb-input, 0, 0, 0); - --em-color-border: var(--color-border, rgba(255, 255, 255, .1)); - --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2)); -} - -#root { - --color-a: rgb(var(--em-rgb-color)); - --color-b: rgba(var(--em-rgb-color), .65); - --color-c: rgba(var(--em-rgb-color), .45); - --padding: 12px; - --padding-small: calc(var(--padding) / 2); - --sidebar-width: 16px; - --duration: 225ms; - --duration-fast: 125ms; - --duration-instant: 50ms; - --easing: cubic-bezier(.4, 0, .2, 1); - width: 100%; - text-align: left; - border-radius: var(--border-radius); - background-color: rgb(var(--em-rgb-background)); - position: relative; -} - -@media (prefers-reduced-motion) { - #root { - --duration: 0; - --duration-fast: 0; - --duration-instant: 0; - } -} - -#root[data-menu] button { - cursor: auto; -} - -#root[data-menu] .menu button { - cursor: pointer; -} - -:host, #root, input, button { - color: rgb(var(--em-rgb-color)); - font-family: var(--font-family); - font-size: var(--font-size); - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - line-height: normal; -} - -*, :before, :after { - box-sizing: border-box; - min-width: 0; - margin: 0; - padding: 0; -} - -.relative { - position: relative; -} - -.flex { - display: flex; -} - -.flex-auto { - flex: none; -} - -.flex-center { - justify-content: center; -} - -.flex-column { - flex-direction: column; -} - -.flex-grow { - flex: auto; -} - -.flex-middle { - align-items: center; -} - -.flex-wrap { - flex-wrap: wrap; -} - -.padding { - padding: var(--padding); -} - -.padding-t { - padding-top: var(--padding); -} - -.padding-lr { - padding-left: var(--padding); - padding-right: var(--padding); -} - -.padding-r { - padding-right: var(--padding); -} - -.padding-small { - padding: var(--padding-small); -} - -.padding-small-b { - padding-bottom: var(--padding-small); -} - -.padding-small-lr { - padding-left: var(--padding-small); - padding-right: var(--padding-small); -} - -.margin { - margin: var(--padding); -} - -.margin-r { - margin-right: var(--padding); -} - -.margin-l { - margin-left: var(--padding); -} - -.margin-small-l { - margin-left: var(--padding-small); -} - -.margin-small-lr { - margin-left: var(--padding-small); - margin-right: var(--padding-small); -} - -.align-l { - text-align: left; -} - -.align-r { - text-align: right; -} - -.color-a { - color: var(--color-a); -} - -.color-b { - color: var(--color-b); -} - -.color-c { - color: var(--color-c); -} - -.ellipsis { - white-space: nowrap; - max-width: 100%; - width: auto; - text-overflow: ellipsis; - overflow: hidden; -} - -.sr-only { - width: 1px; - height: 1px; - position: absolute; - top: auto; - left: -10000px; - overflow: hidden; -} - -a { - cursor: pointer; - color: rgb(var(--em-rgb-accent)); -} - -a:hover { - text-decoration: underline; -} - -.spacer { - height: 10px; -} - -[dir="rtl"] .scroll { - padding-left: 0; - padding-right: var(--padding); -} - -.scroll { - padding-right: 0; - overflow-x: hidden; - overflow-y: auto; -} - -.scroll::-webkit-scrollbar { - width: var(--sidebar-width); - height: var(--sidebar-width); -} - -.scroll::-webkit-scrollbar-track { - border: 0; -} - -.scroll::-webkit-scrollbar-button { - width: 0; - height: 0; - display: none; -} - -.scroll::-webkit-scrollbar-corner { - background-color: rgba(0, 0, 0, 0); -} - -.scroll::-webkit-scrollbar-thumb { - min-height: 20%; - min-height: 65px; - border: 4px solid rgb(var(--em-rgb-background)); - border-radius: 8px; -} - -.scroll::-webkit-scrollbar-thumb:hover { - background-color: var(--em-color-border-over) !important; -} - -.scroll:hover::-webkit-scrollbar-thumb { - background-color: var(--em-color-border); -} - -.sticky { - z-index: 1; - background-color: rgba(var(--em-rgb-background), .9); - -webkit-backdrop-filter: blur(4px); - backdrop-filter: blur(4px); - font-weight: 500; - position: sticky; - top: -1px; -} - -[dir="rtl"] .search input[type="search"] { - padding: 10px 2.2em 10px 2em; -} - -[dir="rtl"] .search .loupe { - left: auto; - right: .7em; -} - -[dir="rtl"] .search .delete { - left: .7em; - right: auto; -} - -.search { - z-index: 2; - position: relative; -} - -.search input, .search button { - font-size: calc(var(--font-size) - 1px); -} - -.search input[type="search"] { - width: 100%; - background-color: var(--em-color-border); - transition-duration: var(--duration); - transition-property: background-color, box-shadow; - transition-timing-function: var(--easing); - border: 0; - border-radius: 10px; - outline: 0; - padding: 10px 2em 10px 2.2em; - display: block; -} - -.search input[type="search"]::-ms-input-placeholder { - color: inherit; - opacity: .6; -} - -.search input[type="search"]::placeholder { - color: inherit; - opacity: .6; -} - -.search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration { - -webkit-appearance: none; - -ms-appearance: none; - appearance: none; -} - -.search input[type="search"]:focus { - background-color: rgb(var(--em-rgb-input)); - box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2); -} - -.search .icon { - z-index: 1; - color: rgba(var(--em-rgb-color), .7); - position: absolute; - top: 50%; - transform: translateY(-50%); -} - -.search .loupe { - pointer-events: none; - left: .7em; -} - -.search .delete { - right: .7em; -} - -svg { - fill: currentColor; - width: 1em; - height: 1em; -} - -button { - -webkit-appearance: none; - -ms-appearance: none; - appearance: none; - cursor: pointer; - color: currentColor; - background-color: rgba(0, 0, 0, 0); - border: 0; -} - -#nav { - z-index: 2; - padding-top: 12px; - padding-bottom: 12px; - padding-right: var(--sidebar-width); - position: relative; -} - -#nav button { - color: var(--color-b); - transition: color var(--duration) var(--easing); -} - -#nav button:hover { - color: var(--color-a); -} - -#nav svg, #nav img { - width: var(--category-icon-size); - height: var(--category-icon-size); -} - -#nav[dir="rtl"] .bar { - left: auto; - right: 0; -} - -#nav .bar { - width: 100%; - height: 3px; - background-color: rgb(var(--em-rgb-accent)); - transition: transform var(--duration) var(--easing); - border-radius: 3px 3px 0 0; - position: absolute; - bottom: -12px; - left: 0; -} - -#nav button[aria-selected] { - color: rgb(var(--em-rgb-accent)); -} - -#preview { - z-index: 2; - padding: calc(var(--padding) + 4px) var(--padding); - padding-right: var(--sidebar-width); - position: relative; -} - -#preview .preview-placeholder { - font-size: var(--preview-placeholder-size); -} - -#preview .preview-title { - font-size: var(--preview-title-size); -} - -#preview .preview-subtitle { - font-size: var(--preview-subtitle-size); -} - -#nav:before, #preview:before { - content: ""; - height: 2px; - position: absolute; - left: 0; - right: 0; -} - -#nav[data-position="top"]:before, #preview[data-position="top"]:before { - background: linear-gradient(to bottom, var(--em-color-border), transparent); - top: 100%; -} - -#nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before { - background: linear-gradient(to top, var(--em-color-border), transparent); - bottom: 100%; -} - -.category:last-child { - min-height: calc(100% + 1px); -} - -.category button { - font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif; - position: relative; -} - -.category button > * { - position: relative; -} - -.category button .background { - opacity: 0; - background-color: var(--em-color-border); - transition: opacity var(--duration-fast) var(--easing) var(--duration-instant); - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; -} - -.category button:hover .background { - transition-duration: var(--duration-instant); - transition-delay: 0s; -} - -.category button[aria-selected] .background { - opacity: 1; -} - -.category button[data-keyboard] .background { - transition: none; -} - -.row { - width: 100%; - position: absolute; - top: 0; - left: 0; -} - -.skin-tone-button { - border: 1px solid rgba(0, 0, 0, 0); - border-radius: 100%; -} - -.skin-tone-button:hover { - border-color: var(--em-color-border); -} - -.skin-tone-button:active .skin-tone { - transform: scale(.85) !important; -} - -.skin-tone-button .skin-tone { - transition: transform var(--duration) var(--easing); -} - -.skin-tone-button[aria-selected] { - background-color: var(--em-color-border); - border-top-color: rgba(0, 0, 0, .05); - border-bottom-color: rgba(0, 0, 0, 0); - border-left-width: 0; - border-right-width: 0; -} - -.skin-tone-button[aria-selected] .skin-tone { - transform: scale(.9); -} - -.menu { - z-index: 2; - white-space: nowrap; - border: 1px solid var(--em-color-border); - background-color: rgba(var(--em-rgb-background), .9); - -webkit-backdrop-filter: blur(4px); - backdrop-filter: blur(4px); - transition-property: opacity, transform; - transition-duration: var(--duration); - transition-timing-function: var(--easing); - border-radius: 10px; - padding: 4px; - position: absolute; - box-shadow: 1px 1px 5px rgba(0, 0, 0, .05); -} - -.menu.hidden { - opacity: 0; -} - -.menu[data-position="bottom"] { - transform-origin: 100% 100%; -} - -.menu[data-position="bottom"].hidden { - transform: scale(.9)rotate(-3deg)translateY(5%); -} - -.menu[data-position="top"] { - transform-origin: 100% 0; -} - -.menu[data-position="top"].hidden { - transform: scale(.9)rotate(3deg)translateY(-5%); -} - -.menu input[type="radio"] { - clip: rect(0 0 0 0); - width: 1px; - height: 1px; - border: 0; - margin: 0; - padding: 0; - position: absolute; - overflow: hidden; -} - -.menu input[type="radio"]:checked + .option { - box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent)); -} - -.option { - width: 100%; - border-radius: 6px; - padding: 4px 6px; -} - -.option:hover { - color: #fff; - background-color: rgb(var(--em-rgb-accent)); -} - -.skin-tone { - width: 16px; - height: 16px; - border-radius: 100%; - display: inline-block; - position: relative; - overflow: hidden; -} - -.skin-tone:after { - content: ""; - mix-blend-mode: overlay; - background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0)); - border: 1px solid rgba(0, 0, 0, .8); - border-radius: 100%; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff; -} - -.skin-tone-1 { - background-color: #ffc93a; -} - -.skin-tone-2 { - background-color: #ffdab7; -} - -.skin-tone-3 { - background-color: #e7b98f; -} - -.skin-tone-4 { - background-color: #c88c61; -} - -.skin-tone-5 { - background-color: #a46134; -} - -.skin-tone-6 { - background-color: #5d4437; -} - -[data-index] { - justify-content: space-between; -} - -[data-emoji-set="twitter"] .skin-tone:after { - box-shadow: none; - border-color: rgba(0, 0, 0, .5); -} - -[data-emoji-set="twitter"] .skin-tone-1 { - background-color: #fade72; -} - -[data-emoji-set="twitter"] .skin-tone-2 { - background-color: #f3dfd0; -} - -[data-emoji-set="twitter"] .skin-tone-3 { - background-color: #eed3a8; -} - -[data-emoji-set="twitter"] .skin-tone-4 { - background-color: #cfad8d; -} - -[data-emoji-set="twitter"] .skin-tone-5 { - background-color: #a8805d; -} - -[data-emoji-set="twitter"] .skin-tone-6 { - background-color: #765542; -} - -[data-emoji-set="google"] .skin-tone:after { - box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4); -} - -[data-emoji-set="google"] .skin-tone-1 { - background-color: #f5c748; -} - -[data-emoji-set="google"] .skin-tone-2 { - background-color: #f1d5aa; -} - -[data-emoji-set="google"] .skin-tone-3 { - background-color: #d4b48d; -} - -[data-emoji-set="google"] .skin-tone-4 { - background-color: #aa876b; -} - -[data-emoji-set="google"] .skin-tone-5 { - background-color: #916544; -} - -[data-emoji-set="google"] .skin-tone-6 { - background-color: #61493f; -} - -[data-emoji-set="facebook"] .skin-tone:after { - border-color: rgba(0, 0, 0, .4); - box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff; -} - -[data-emoji-set="facebook"] .skin-tone-1 { - background-color: #f5c748; -} - -[data-emoji-set="facebook"] .skin-tone-2 { - background-color: #f1d5aa; -} - -[data-emoji-set="facebook"] .skin-tone-3 { - background-color: #d4b48d; -} - -[data-emoji-set="facebook"] .skin-tone-4 { - background-color: #aa876b; -} - -[data-emoji-set="facebook"] .skin-tone-5 { - background-color: #916544; -} - -[data-emoji-set="facebook"] .skin-tone-6 { - background-color: #61493f; -} - -`;function JFe(e){const t=g.useRef(null),r=g.useRef(null);return r.current&&r.current.update(e),g.useEffect(()=>(r.current=new XO({...e,ref:t}),()=>{r.current=null}),[]),De.createElement("div",{ref:t})}function eze(e){var t=e.theme,r=e.onSelectEmoji,n=e.disableRecent,o=e.customEmojis,a=e.language,i=g.useMemo(function(){var l=[];return n||l.push("frequent"),l=[].concat(FG(l),["people","nature","foods","activity","places","objects","symbols","flags"]),l},[n]),s=g.useMemo(function(){if(a)return require("@emoji-mart/data/i18n/".concat(a??"en",".json"))},[a]);return De.createElement(JFe,{data:void 0,theme:t,previewPosition:"none",onEmojiSelect:r,custom:o,categories:i,set:"apple",i18n:s})}var tze=g.memo(eze);function vj(e){var t=e.showPicker,r=e.theme,n=e.handleSelectEmoji,o=e.disableRecent,a=e.customEmojis,i=e.position,s=e.language;return De.createElement("div",{className:"react-emoji-picker--container"},t&&De.createElement("div",{className:"react-emoji-picker--wrapper",onClick:function(c){return c.stopPropagation()},style:i==="below"?{top:"40px"}:{}},De.createElement("div",{className:"react-emoji-picker"},De.createElement(tze,{theme:r,onSelectEmoji:n,disableRecent:o,customEmojis:a,language:s}))))}var rze=435,nze=function(t){var r=t.theme,n=t.keepOpened,o=t.disableRecent,a=t.customEmojis,i=t.addSanitizeFn,s=t.addPolluteFn,l=t.appendContent,c=t.buttonElement,u=t.buttonRef,p=t.language,h=g.useState(!1),v=Fi(h,2),_=v[0],w=v[1],y=g.useState(),m=Fi(y,2),f=m[0],b=m[1],d=g.useState(),x=Fi(d,2),E=x[0],C=x[1];g.useEffect(function(){i(ip)},[i]),g.useEffect(function(){s(BG)},[s]),g.useEffect(function(){function T(P){var j=P.target;j.classList.contains("react-input-emoji--button")||j.classList.contains("react-input-emoji--button--icon")||w(!1)}return document.addEventListener("click",T),function(){document.removeEventListener("click",T)}},[]);function k(T){T.stopPropagation(),T.preventDefault(),C(S(T)),w(function(P){return!P})}function S(T){var P=T.currentTarget,j=P.getBoundingClientRect(),L=rze;return j.top>=L?"above":"below"}function R(T){l(nFe(T)),n||w(function(P){return!P})}return g.useEffect(function(){var T;u!=null&&(T=u.current)!==null&&T!==void 0&&T.style?(u.current.style.position="relative",b(u.current)):c!=null&&c.style&&(c.style.position="relative",b(c))},[u,c]),f?pae.createPortal(De.createElement(De.Fragment,null,De.createElement(vj,{showPicker:_,theme:r,handleSelectEmoji:R,disableRecent:o,customEmojis:a,position:E,language:p}),De.createElement(KA,{showPicker:_,toggleShowPicker:k,buttonElement:f,buttonRef:u})),f):De.createElement(De.Fragment,null,De.createElement(vj,{showPicker:_,theme:r,handleSelectEmoji:R,disableRecent:o,customEmojis:a,position:E,language:p}),De.createElement(KA,{showPicker:_,toggleShowPicker:k}))};function oze(){var e=gK();if(!e)return null;var t=e.text.substring(e.begin,e.end);return t||null}function aze(){var e=gK();e&&e.element.deleteData(e.begin,e.end-e.begin)}function gK(){var e=x9();if(!e)return null;var t=e.element,r=e.caretOffset,n=t.textContent,o=n.lastIndexOf("@");return o===-1||o>=r||o!==0&&n[o-1]!==" "?null:{begin:o,end:r,text:n,element:t}}function x9(){var e=ize();if(e===null)return null;var t=0;if(typeof window.getSelection<"u"){var r=window.getSelection().getRangeAt(0),n=r.cloneRange();n.selectNodeContents(e),n.setEnd(r.endContainer,r.endOffset),t=n.toString().length}else if(typeof document.selection<"u"&&document.selection.type!="Control"){var o=document.selection.createRange(),a=document.body.createTextRange();a.moveToElementText(e),a.setEndPoint("EndToEnd",o),t=a.text.length}return{element:e,caretOffset:t}}function ize(){var e=document.getSelection().anchorNode;return(e==null?void 0:e.nodeType)==3?e:null}function sze(e){var t,r=g.useState(!1),n=Fi(r,2),o=n[0],a=n[1],i=g.useState([]),s=Fi(i,2),l=s[0],c=s[1],u=g.useState(null),p=Fi(u,2),h=p[0],v=p[1],_=g.useCallback(function(){aze(),c([])},[]),w=g.useCallback(WA($h().mark(function f(){var b,d;return $h().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(b=oze(),v(b),b!==null){E.next=6;break}c([]),E.next=12;break;case 6:return a(!0),E.next=9,e(b);case 9:d=E.sent,a(!1),c(d);case 12:case"end":return E.stop()}},f)})),[e]),y=g.useCallback(function(f){return(t=t||WA($h().mark(function b(d){var x,E;return $h().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:if(typeof e=="function"){k.next=2;break}return k.abrupt("return");case 2:d.key==="Backspace"&&(x=x9())!==null&&x!==void 0&&x.element.parentElement.hasAttribute("data-mention-id")?(E=x9(),E.element.parentElement.remove()):["ArrowUp","ArrowDown","Esc","Escape"].includes(d.key)||w();case 3:case"end":return k.stop()}},b)}))).apply(this,arguments)},[w,e]),m=g.useCallback(function(){w()},[w]);return{mentionSearchText:h,mentionUsers:l,onKeyUp:y,onFocus:m,onSelectUser:_,loading:o}}var lze=function(t,r){var n=t.users,o=t.mentionSearchText,a=t.onSelect,i=t.addEventListener,s=g.useState(0),l=Fi(s,2),c=l[0],u=l[1];g.useImperativeHandle(r,function(){return{prevUser:function(){u(function(w){return w===0?0:w-1})},nextUser:function(){u(function(w){return w===n.length-1?n.length-1:w+1})}}}),g.useEffect(function(){u(0)},[n]);function p(_,w){return''.concat(_,"").concat(w)}var h=g.useMemo(function(){var _=o?o.substring(1).toLocaleLowerCase():"";return n.map(function(w){var y=w.name;if(o&&o.length>1)if(w.name.toLowerCase().startsWith(_))y=p(w.name.substring(0,_.length),w.name.substring(_.length));else{var m=w.name.split(" ");y=m.map(function(f){return f.toLocaleLowerCase().startsWith(_)?p(f.substring(0,_.length),f.substring(_.length)):f}).join(" ")}return HA(HA({},w),{},{nameHtml:y})})},[o,n]);function v(_){return function(w){w.stopPropagation(),w.preventDefault(),a(_)}}return g.useEffect(function(){var _=i("enter",function(w){w.stopPropagation(),w.preventDefault(),a(h[c])});return function(){_()}},[i,a,c,h]),De.createElement("ul",{className:"react-input-emoji--mention--list","data-testid":"mention-user-list"},h.map(function(_,w){return De.createElement("li",{key:_.id},De.createElement("button",{type:"button",onClick:v(_),className:"react-input-emoji--mention--item".concat(c===w?" react-input-emoji--mention--item__selected":""),onMouseOver:function(){return u(w)}},De.createElement("img",{className:"react-input-emoji--mention--item--img",src:_.image}),De.createElement("div",{className:"react-input-emoji--mention--item--name",dangerouslySetInnerHTML:{__html:_.nameHtml}})))}))},cze=g.forwardRef(lze),uze=function(t){var r=t.searchMention,n=t.addEventListener,o=t.appendContent,a=t.addSanitizeFn,i=g.useRef(null),s=g.useState(!1),l=Fi(s,2),c=l[0],u=l[1],p=sze(r),h=p.mentionSearchText,v=p.mentionUsers,_=p.loading,w=p.onKeyUp,y=p.onFocus,m=p.onSelectUser;g.useEffect(function(){a(function(b){var d=document.createElement("div");d.innerHTML=b;var x=Array.prototype.slice.call(d.querySelectorAll(".react-input-emoji--mention--text"));return x.forEach(function(E){d.innerHTML=d.innerHTML.replace(E.outerHTML,"@[".concat(E.dataset.mentionName,"](userId:").concat(E.dataset.mentionId,")"))}),d.innerHTML})},[a]),g.useEffect(function(){u(v.length>0)},[v]),g.useEffect(function(){function b(){u(!1)}return document.addEventListener("click",b),function(){document.removeEventListener("click",b)}},[]),g.useEffect(function(){var b=n("keyUp",w);return function(){b()}},[n,w]),g.useEffect(function(){function b(x){switch(x.key){case"Esc":case"Escape":u(!1);break}}var d=n("keyDown",b);return function(){d()}},[n]),g.useEffect(function(){var b=n("focus",y);return function(){b()}},[n,y]),g.useEffect(function(){if(c){var b=n("arrowUp",function(x){x.stopPropagation(),x.preventDefault(),i.current.prevUser()}),d=n("arrowDown",function(x){x.stopPropagation(),x.preventDefault(),i.current.nextUser()});return function(){b(),d()}}},[n,c]);function f(b){m(),o('@').concat(b.name," "))}return De.createElement(De.Fragment,null,_?De.createElement("div",{className:"react-input-emoji--mention--container"},De.createElement("div",{className:"react-input-emoji--mention--loading"},De.createElement("div",{className:"react-input-emoji--mention--loading--spinner"},"Loading..."))):c&&De.createElement("div",{className:"react-input-emoji--mention--container",onClick:function(d){return d.stopPropagation()}},De.createElement(cze,{ref:i,mentionSearchText:h,users:v,onSelect:f,addEventListener:n})))};function Ul(){var e=[];return{subscribe:function(r){return e.push(r),function(){e=e.filter(function(n){return n!==r})}},publish:function(r){e.forEach(function(n){return n(r)})},get currentListerners(){return e}}}function dze(){var e=g.useMemo(function(){return{keyDown:Ul(),keyUp:Ul(),arrowUp:Ul(),arrowDown:Ul(),enter:Ul(),focus:Ul(),blur:Ul()}},[]),t=g.useCallback(function(r,n){return e[r].subscribe(n)},[e]);return{addEventListener:t,listeners:e}}function fze(){var e=g.useRef([]),t=g.useCallback(function(n){e.current.push(n)},[]),r=g.useCallback(function(n){var o=e.current.reduce(function(a,i){return i(a)},n);return o},[]);return{addPolluteFn:t,pollute:r}}function hze(e,t){var r=e.onChange,n=e.onEnter,o=e.shouldReturn,a=e.onResize,i=e.onClick,s=e.onFocus,l=e.onBlur,c=e.onKeyDown,u=e.theme,p=e.cleanOnEnter,h=e.placeholder,v=e.maxLength,_=e.keepOpened,w=e.inputClass,y=e.disableRecent,m=e.tabIndex,f=e.value,b=e.customEmojis,d=e.language,x=e.searchMention,E=e.buttonElement,C=e.buttonRef,k=e.borderRadius,S=e.borderColor,R=e.fontSize,T=e.fontFamily,P=g.useRef(null),j=dze(),L=j.addEventListener,D=j.listeners,B=UG(e.shouldReturn),V=B.addSanitizeFn,q=B.sanitize,z=B.sanitizedTextRef,F=fze(),$=F.addPolluteFn,W=F.pollute,G=g.useCallback(function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";P.current!==null&&(P.current.html=BG(ie),z.current=ie)},[z]),Q=g.useCallback(function(ie){G(ie)},[G]),Z=cFe(P,a,r);lFe({ref:t,setValue:Q,textInputRef:P,emitChange:Z}),g.useEffect(function(){z.current!==f&&Q(f)},[z,Q,f]),g.useEffect(function(){function ie(ye){if(typeof v<"u"&&ye.key!=="Backspace"&&P.current!==null&&GA(P.current)>=v&&ye.preventDefault(),ye.key==="Enter"&&P.current){ye.preventDefault();var Ce=q(P.current.html);return Z(z.current),typeof n=="function"&&D.enter.currentListerners.length===0&&n(Ce),p&&D.enter.currentListerners.length===0&&G(""),typeof c=="function"&&c(ye.nativeEvent),!1}return typeof c=="function"&&c(ye.nativeEvent),!0}var ce=L("keyDown",ie);return function(){ce()}},[L,p,Z,D.enter.currentListerners.length,v,n,c,q,z,G]),g.useEffect(function(){function ie(){typeof i=="function"&&i(),typeof s=="function"&&s()}var ce=L("focus",ie);return function(){ce()}},[L,i,s]),g.useEffect(function(){function ie(){typeof l=="function"&&l()}var ce=L("blur",ie);return function(){ce()}},[L,l]);function U(ie){q(ie),f!==z.current&&Z(z.current)}function J(ie){typeof v<"u"&&P.current!==null&&GA(P.current)>=v||P.current!==null&&P.current.appendContent(ie)}function oe(ie){var ce=window.getSelection();if(ce!==null){var ye="";if(ce.anchorNode&&ce.anchorNode.nodeType===Node.ELEMENT_NODE)ye=ce.anchorNode.innerHTML;else if(ce.anchorNode&&ce.anchorNode.nodeType===Node.TEXT_NODE){var Ce;ye=(Ce=ce.anchorNode.textContent)!==null&&Ce!==void 0?Ce:""}var Se=ip(ye);ie.clipboardData.setData("text",Se),ie.preventDefault()}}function ee(ie){ie.preventDefault();var ce;ie.clipboardData&&(ce=ie.clipboardData.getData("text/plain"),ce=W(ce),document.execCommand("insertHTML",!1,ce))}return De.createElement("div",{className:"react-emoji"},De.createElement(uze,{searchMention:x,addEventListener:L,appendContent:J,addSanitizeFn:V}),De.createElement(fFe,{ref:P,onCopy:oe,onPaste:ee,shouldReturn:o,onBlur:D.blur.publish,onFocus:D.focus.publish,onArrowUp:D.arrowUp.publish,onArrowDown:D.arrowDown.publish,onKeyUp:D.keyUp.publish,onKeyDown:D.keyDown.publish,onEnter:D.enter.publish,placeholder:h,style:{borderRadius:k,borderColor:S,fontSize:R,fontFamily:T},tabIndex:m,className:w,onChange:U}),De.createElement(nze,{theme:u,keepOpened:_,disableRecent:y,customEmojis:b,addSanitizeFn:V,addPolluteFn:$,appendContent:J,buttonElement:E,buttonRef:C,language:d}))}var vK=g.forwardRef(hze);vK.defaultProps={theme:"auto",height:30,placeholder:"Type a message",borderRadius:21,borderColor:"#EAEAEA",fontSize:15,fontFamily:"sans-serif",tabIndex:0,shouldReturn:!1,customEmojis:[],language:void 0};//! moment.js -//! version : 2.29.4 -//! authors : Tim Wood, Iskren Chernev, Moment.js contributors -//! license : MIT -//! momentjs.com -var bK;function Fe(){return bK.apply(null,arguments)}function pze(e){bK=e}function Ca(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function _c(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Ft(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ZO(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Ft(e,t))return!1;return!0}function Hn(e){return e===void 0}function Yi(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function V1(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function yK(e,t){var r=[],n,o=e.length;for(n=0;n>>0,n;for(n=0;n0)for(r=0;r=0;return(a?r?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}var tk=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,tm=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Fx={},Cd={};function nt(e,t,r,n){var o=n;typeof n=="string"&&(o=function(){return this[n]()}),e&&(Cd[e]=o),t&&(Cd[t[0]]=function(){return ei(o.apply(this,arguments),t[1],t[2])}),r&&(Cd[r]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function yze(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function wze(e){var t=e.match(tk),r,n;for(r=0,n=t.length;r=0&&tm.test(e);)e=e.replace(tm,n),tm.lastIndex=0,r-=1;return e}var xze={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function _ze(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(tk).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var Eze="Invalid date";function Cze(){return this._invalidDate}var Oze="%d",kze=/\d{1,2}/;function Rze(e){return this._ordinal.replace("%d",e)}var Sze={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Tze(e,t,r,n){var o=this._relativeTime[r];return li(o)?o(e,t,r,n):o.replace(/%d/i,e)}function Pze(e,t){var r=this._relativeTime[e>0?"future":"past"];return li(r)?r(t):r.replace(/%s/i,t)}var lp={};function On(e,t){var r=e.toLowerCase();lp[r]=lp[r+"s"]=lp[t]=e}function Jo(e){return typeof e=="string"?lp[e]||lp[e.toLowerCase()]:void 0}function rk(e){var t={},r,n;for(n in e)Ft(e,n)&&(r=Jo(n),r&&(t[r]=e[n]));return t}var EK={};function kn(e,t){EK[e]=t}function Mze(e){var t=[],r;for(r in e)Ft(e,r)&&t.push({unit:r,priority:EK[r]});return t.sort(function(n,o){return n.priority-o.priority}),t}function n4(e){return e%4===0&&e%100!==0||e%400===0}function zo(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function xt(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=zo(t)),r}function Ef(e,t){return function(r){return r!=null?(CK(this,e,r),Fe.updateOffset(this,t),this):V7(this,e)}}function V7(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function CK(e,t,r){e.isValid()&&!isNaN(r)&&(t==="FullYear"&&n4(e.year())&&e.month()===1&&e.date()===29?(r=xt(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),c4(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}function Aze(e){return e=Jo(e),li(this[e])?this[e]():this}function jze(e,t){if(typeof e=="object"){e=rk(e);var r=Mze(e),n,o=r.length;for(n=0;n68?1900:2e3)};var IK=Ef("FullYear",!0);function Qze(){return n4(this.year())}function Jze(e,t,r,n,o,a,i){var s;return e<100&&e>=0?(s=new Date(e+400,t,r,n,o,a,i),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,o,a,i),s}function e1(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function U7(e,t,r){var n=7+t-r,o=(7+e1(e,0,n).getUTCDay()-t)%7;return-o+n-1}function LK(e,t,r,n,o){var a=(7+r-n)%7,i=U7(e,n,o),s=1+7*(t-1)+a+i,l,c;return s<=0?(l=e-1,c=cp(l)+s):s>cp(e)?(l=e+1,c=s-cp(e)):(l=e,c=s),{year:l,dayOfYear:c}}function t1(e,t,r){var n=U7(e.year(),t,r),o=Math.floor((e.dayOfYear()-n-1)/7)+1,a,i;return o<1?(i=e.year()-1,a=o+zi(i,t,r)):o>zi(e.year(),t,r)?(a=o-zi(e.year(),t,r),i=e.year()+1):(i=e.year(),a=o),{week:a,year:i}}function zi(e,t,r){var n=U7(e,t,r),o=U7(e+1,t,r);return(cp(e)-n+o)/7}nt("w",["ww",2],"wo","week");nt("W",["WW",2],"Wo","isoWeek");On("week","w");On("isoWeek","W");kn("week",5);kn("isoWeek",5);He("w",ur);He("ww",ur,ko);He("W",ur);He("WW",ur,ko);W1(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=xt(e)});function eBe(e){return t1(e,this._week.dow,this._week.doy).week}var tBe={dow:0,doy:6};function rBe(){return this._week.dow}function nBe(){return this._week.doy}function oBe(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function aBe(e){var t=t1(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}nt("d",0,"do","day");nt("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});nt("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});nt("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});nt("e",0,0,"weekday");nt("E",0,0,"isoWeekday");On("day","d");On("weekday","e");On("isoWeekday","E");kn("day",11);kn("weekday",11);kn("isoWeekday",11);He("d",ur);He("e",ur);He("E",ur);He("dd",function(e,t){return t.weekdaysMinRegex(e)});He("ddd",function(e,t){return t.weekdaysShortRegex(e)});He("dddd",function(e,t){return t.weekdaysRegex(e)});W1(["dd","ddd","dddd"],function(e,t,r,n){var o=r._locale.weekdaysParse(e,n,r._strict);o!=null?t.d=o:gt(r).invalidWeekday=e});W1(["d","e","E"],function(e,t,r,n){t[n]=xt(e)});function iBe(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function sBe(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ak(e,t){return e.slice(t,7).concat(e.slice(0,t))}var lBe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),NK="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),cBe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),uBe=U1,dBe=U1,fBe=U1;function hBe(e,t){var r=Ca(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?ak(r,this._week.dow):e?r[e.day()]:r}function pBe(e){return e===!0?ak(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function mBe(e){return e===!0?ak(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function gBe(e,t,r){var n,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=si([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return r?t==="dddd"?(o=Tr.call(this._weekdaysParse,i),o!==-1?o:null):t==="ddd"?(o=Tr.call(this._shortWeekdaysParse,i),o!==-1?o:null):(o=Tr.call(this._minWeekdaysParse,i),o!==-1?o:null):t==="dddd"?(o=Tr.call(this._weekdaysParse,i),o!==-1||(o=Tr.call(this._shortWeekdaysParse,i),o!==-1)?o:(o=Tr.call(this._minWeekdaysParse,i),o!==-1?o:null)):t==="ddd"?(o=Tr.call(this._shortWeekdaysParse,i),o!==-1||(o=Tr.call(this._weekdaysParse,i),o!==-1)?o:(o=Tr.call(this._minWeekdaysParse,i),o!==-1?o:null)):(o=Tr.call(this._minWeekdaysParse,i),o!==-1||(o=Tr.call(this._weekdaysParse,i),o!==-1)?o:(o=Tr.call(this._shortWeekdaysParse,i),o!==-1?o:null))}function vBe(e,t,r){var n,o,a;if(this._weekdaysParseExact)return gBe.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=si([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function bBe(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=iBe(e,this.localeData()),this.add(e-t,"d")):t}function yBe(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function wBe(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=sBe(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function xBe(e){return this._weekdaysParseExact?(Ft(this,"_weekdaysRegex")||ik.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Ft(this,"_weekdaysRegex")||(this._weekdaysRegex=uBe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function _Be(e){return this._weekdaysParseExact?(Ft(this,"_weekdaysRegex")||ik.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ft(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=dBe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function EBe(e){return this._weekdaysParseExact?(Ft(this,"_weekdaysRegex")||ik.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ft(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=fBe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ik(){function e(u,p){return p.length-u.length}var t=[],r=[],n=[],o=[],a,i,s,l,c;for(a=0;a<7;a++)i=si([2e3,1]).day(a),s=co(this.weekdaysMin(i,"")),l=co(this.weekdaysShort(i,"")),c=co(this.weekdays(i,"")),t.push(s),r.push(l),n.push(c),o.push(s),o.push(l),o.push(c);t.sort(e),r.sort(e),n.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function sk(){return this.hours()%12||12}function CBe(){return this.hours()||24}nt("H",["HH",2],0,"hour");nt("h",["hh",2],0,sk);nt("k",["kk",2],0,CBe);nt("hmm",0,0,function(){return""+sk.apply(this)+ei(this.minutes(),2)});nt("hmmss",0,0,function(){return""+sk.apply(this)+ei(this.minutes(),2)+ei(this.seconds(),2)});nt("Hmm",0,0,function(){return""+this.hours()+ei(this.minutes(),2)});nt("Hmmss",0,0,function(){return""+this.hours()+ei(this.minutes(),2)+ei(this.seconds(),2)});function $K(e,t){nt(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}$K("a",!0);$K("A",!1);On("hour","h");kn("hour",13);function DK(e,t){return t._meridiemParse}He("a",DK);He("A",DK);He("H",ur);He("h",ur);He("k",ur);He("HH",ur,ko);He("hh",ur,ko);He("kk",ur,ko);He("hmm",RK);He("hmmss",SK);He("Hmm",RK);He("Hmmss",SK);Xt(["H","HH"],Vr);Xt(["k","kk"],function(e,t,r){var n=xt(e);t[Vr]=n===24?0:n});Xt(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});Xt(["h","hh"],function(e,t,r){t[Vr]=xt(e),gt(r).bigHour=!0});Xt("hmm",function(e,t,r){var n=e.length-2;t[Vr]=xt(e.substr(0,n)),t[ga]=xt(e.substr(n)),gt(r).bigHour=!0});Xt("hmmss",function(e,t,r){var n=e.length-4,o=e.length-2;t[Vr]=xt(e.substr(0,n)),t[ga]=xt(e.substr(n,2)),t[Si]=xt(e.substr(o)),gt(r).bigHour=!0});Xt("Hmm",function(e,t,r){var n=e.length-2;t[Vr]=xt(e.substr(0,n)),t[ga]=xt(e.substr(n))});Xt("Hmmss",function(e,t,r){var n=e.length-4,o=e.length-2;t[Vr]=xt(e.substr(0,n)),t[ga]=xt(e.substr(n,2)),t[Si]=xt(e.substr(o))});function OBe(e){return(e+"").toLowerCase().charAt(0)==="p"}var kBe=/[ap]\.?m?\.?/i,RBe=Ef("Hours",!0);function SBe(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var FK={calendar:vze,longDateFormat:xze,invalidDate:Eze,ordinal:Oze,dayOfMonthOrdinalParse:kze,relativeTime:Sze,months:Vze,monthsShort:TK,week:tBe,weekdays:lBe,weekdaysMin:cBe,weekdaysShort:NK,meridiemParse:kBe},hr={},p0={},r1;function TBe(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r0;){if(o=u4(a.slice(0,r).join("-")),o)return o;if(n&&n.length>=r&&TBe(a,n)>=r-1)break;r--}t++}return r1}function MBe(e){return e.match("^[^/\\\\]*$")!=null}function u4(e){var t=null,r;if(hr[e]===void 0&&typeof module<"u"&&module&&module.exports&&MBe(e))try{t=r1._abbr,r=require,r("./locale/"+e),ol(t)}catch{hr[e]=null}return hr[e]}function ol(e,t){var r;return e&&(Hn(t)?r=ts(e):r=lk(e,t),r?r1=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),r1._abbr}function lk(e,t){if(t!==null){var r,n=FK;if(t.abbr=e,hr[e]!=null)xK("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=hr[e]._config;else if(t.parentLocale!=null)if(hr[t.parentLocale]!=null)n=hr[t.parentLocale]._config;else if(r=u4(t.parentLocale),r!=null)n=r._config;else return p0[t.parentLocale]||(p0[t.parentLocale]=[]),p0[t.parentLocale].push({name:e,config:t}),null;return hr[e]=new ek(E9(n,t)),p0[e]&&p0[e].forEach(function(o){lk(o.name,o.config)}),ol(e),hr[e]}else return delete hr[e],null}function ABe(e,t){if(t!=null){var r,n,o=FK;hr[e]!=null&&hr[e].parentLocale!=null?hr[e].set(E9(hr[e]._config,t)):(n=u4(e),n!=null&&(o=n._config),t=E9(o,t),n==null&&(t.abbr=e),r=new ek(t),r.parentLocale=hr[e],hr[e]=r),ol(e)}else hr[e]!=null&&(hr[e].parentLocale!=null?(hr[e]=hr[e].parentLocale,e===ol()&&ol(e)):hr[e]!=null&&delete hr[e]);return hr[e]}function ts(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return r1;if(!Ca(e)){if(t=u4(e),t)return t;e=[e]}return PBe(e)}function jBe(){return C9(hr)}function ck(e){var t,r=e._a;return r&>(e).overflow===-2&&(t=r[Ri]<0||r[Ri]>11?Ri:r[Ba]<1||r[Ba]>c4(r[xn],r[Ri])?Ba:r[Vr]<0||r[Vr]>24||r[Vr]===24&&(r[ga]!==0||r[Si]!==0||r[mc]!==0)?Vr:r[ga]<0||r[ga]>59?ga:r[Si]<0||r[Si]>59?Si:r[mc]<0||r[mc]>999?mc:-1,gt(e)._overflowDayOfYear&&(tBa)&&(t=Ba),gt(e)._overflowWeeks&&t===-1&&(t=Fze),gt(e)._overflowWeekday&&t===-1&&(t=zze),gt(e).overflow=t),e}var IBe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,LBe=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,NBe=/Z|[+-]\d\d(?::?\d\d)?/,rm=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],zx=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],$Be=/^\/?Date\((-?\d+)/i,DBe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,FBe={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function zK(e){var t,r,n=e._i,o=IBe.exec(n)||LBe.exec(n),a,i,s,l,c=rm.length,u=zx.length;if(o){for(gt(e).iso=!0,t=0,r=c;tcp(i)||e._dayOfYear===0)&&(gt(e)._overflowDayOfYear=!0),r=e1(i,0,e._dayOfYear),e._a[Ri]=r.getUTCMonth(),e._a[Ba]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=o[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Vr]===24&&e._a[ga]===0&&e._a[Si]===0&&e._a[mc]===0&&(e._nextDay=!0,e._a[Vr]=0),e._d=(e._useUTC?e1:Jze).apply(null,n),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Vr]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(gt(e).weekdayMismatch=!0)}}function GBe(e){var t,r,n,o,a,i,s,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,i=4,r=Lu(t.GG,e._a[xn],t1(lr(),1,4).year),n=Lu(t.W,1),o=Lu(t.E,1),(o<1||o>7)&&(l=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,c=t1(lr(),a,i),r=Lu(t.gg,e._a[xn],c.year),n=Lu(t.w,c.week),t.d!=null?(o=t.d,(o<0||o>6)&&(l=!0)):t.e!=null?(o=t.e+a,(t.e<0||t.e>6)&&(l=!0)):o=a),n<1||n>zi(r,a,i)?gt(e)._overflowWeeks=!0:l!=null?gt(e)._overflowWeekday=!0:(s=LK(r,n,o,a,i),e._a[xn]=s.year,e._dayOfYear=s.dayOfYear)}Fe.ISO_8601=function(){};Fe.RFC_2822=function(){};function dk(e){if(e._f===Fe.ISO_8601){zK(e);return}if(e._f===Fe.RFC_2822){BK(e);return}e._a=[],gt(e).empty=!0;var t=""+e._i,r,n,o,a,i,s=t.length,l=0,c,u;for(o=_K(e._f,e._locale).match(tk)||[],u=o.length,r=0;r0&>(e).unusedInput.push(i),t=t.slice(t.indexOf(n)+n.length),l+=n.length),Cd[a]?(n?gt(e).empty=!1:gt(e).unusedTokens.push(a),Dze(a,n,e)):e._strict&&!n&>(e).unusedTokens.push(a);gt(e).charsLeftOver=s-l,t.length>0&>(e).unusedInput.push(t),e._a[Vr]<=12&>(e).bigHour===!0&&e._a[Vr]>0&&(gt(e).bigHour=void 0),gt(e).parsedDateParts=e._a.slice(0),gt(e).meridiem=e._meridiem,e._a[Vr]=KBe(e._locale,e._a[Vr],e._meridiem),c=gt(e).era,c!==null&&(e._a[xn]=e._locale.erasConvertYear(c,e._a[xn])),uk(e),ck(e)}function KBe(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function YBe(e){var t,r,n,o,a,i,s=!1,l=e._f.length;if(l===0){gt(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;othis?this:e:r4()});function UK(e,t){var r,n;if(t.length===1&&Ca(t[0])&&(t=t[0]),!t.length)return lr();for(r=t[0],n=1;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function gVe(){if(!Hn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return JO(e,this),e=VK(e),e._a?(t=e._isUTC?si(e._a):lr(e._a),this._isDSTShifted=this.isValid()&&sVe(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function vVe(){return this.isValid()?!this._isUTC:!1}function bVe(){return this.isValid()?this._isUTC:!1}function qK(){return this.isValid()?this._isUTC&&this._offset===0:!1}var yVe=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,wVe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ra(e,t){var r=e,n=null,o,a,i;return yy(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:Yi(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=yVe.exec(e))?(o=n[1]==="-"?-1:1,r={y:0,d:xt(n[Ba])*o,h:xt(n[Vr])*o,m:xt(n[ga])*o,s:xt(n[Si])*o,ms:xt(k9(n[mc]*1e3))*o}):(n=wVe.exec(e))?(o=n[1]==="-"?-1:1,r={y:Wl(n[2],o),M:Wl(n[3],o),w:Wl(n[4],o),d:Wl(n[5],o),h:Wl(n[6],o),m:Wl(n[7],o),s:Wl(n[8],o)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(i=xVe(lr(r.from),lr(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),a=new d4(r),yy(e)&&Ft(e,"_locale")&&(a._locale=e._locale),yy(e)&&Ft(e,"_isValid")&&(a._isValid=e._isValid),a}Ra.fn=d4.prototype;Ra.invalid=iVe;function Wl(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function xj(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function xVe(e,t){var r;return e.isValid()&&t.isValid()?(t=hk(t,e),e.isBefore(t)?r=xj(e,t):(r=xj(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function GK(e,t){return function(r,n){var o,a;return n!==null&&!isNaN(+n)&&(xK(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=r,r=n,n=a),o=Ra(r,n),KK(this,o,e),this}}function KK(e,t,r,n){var o=t._milliseconds,a=k9(t._days),i=k9(t._months);e.isValid()&&(n=n??!0,i&&MK(e,V7(e,"Month")+i*r),a&&CK(e,"Date",V7(e,"Date")+a*r),o&&e._d.setTime(e._d.valueOf()+o*r),n&&Fe.updateOffset(e,a||i))}var _Ve=GK(1,"add"),EVe=GK(-1,"subtract");function YK(e){return typeof e=="string"||e instanceof String}function CVe(e){return Oa(e)||V1(e)||YK(e)||Yi(e)||kVe(e)||OVe(e)||e===null||e===void 0}function OVe(e){var t=_c(e)&&!ZO(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,a,i=n.length;for(o=0;or.valueOf():r.valueOf()9999?by(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):li(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",by(r,"Z")):by(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function zVe(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,o,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(r+n+o+a)}function BVe(e){e||(e=this.isUtc()?Fe.defaultFormatUtc:Fe.defaultFormat);var t=by(this,e);return this.localeData().postformat(t)}function VVe(e,t){return this.isValid()&&(Oa(e)&&e.isValid()||lr(e).isValid())?Ra({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function HVe(e){return this.from(lr(),e)}function UVe(e,t){return this.isValid()&&(Oa(e)&&e.isValid()||lr(e).isValid())?Ra({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function WVe(e){return this.to(lr(),e)}function XK(e){var t;return e===void 0?this._locale._abbr:(t=ts(e),t!=null&&(this._locale=t),this)}var ZK=Qo("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function QK(){return this._locale}var W7=1e3,Od=60*W7,q7=60*Od,JK=(365*400+97)*24*q7;function kd(e,t){return(e%t+t)%t}function eY(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-JK:new Date(e,t,r).valueOf()}function tY(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-JK:Date.UTC(e,t,r)}function qVe(e){var t,r;if(e=Jo(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?tY:eY,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=kd(t+(this._isUTC?0:this.utcOffset()*Od),q7);break;case"minute":t=this._d.valueOf(),t-=kd(t,Od);break;case"second":t=this._d.valueOf(),t-=kd(t,W7);break}return this._d.setTime(t),Fe.updateOffset(this,!0),this}function GVe(e){var t,r;if(e=Jo(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?tY:eY,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=q7-kd(t+(this._isUTC?0:this.utcOffset()*Od),q7)-1;break;case"minute":t=this._d.valueOf(),t+=Od-kd(t,Od)-1;break;case"second":t=this._d.valueOf(),t+=W7-kd(t,W7)-1;break}return this._d.setTime(t),Fe.updateOffset(this,!0),this}function KVe(){return this._d.valueOf()-(this._offset||0)*6e4}function YVe(){return Math.floor(this.valueOf()/1e3)}function XVe(){return new Date(this.valueOf())}function ZVe(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function QVe(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function JVe(){return this.isValid()?this.toISOString():null}function eHe(){return QO(this)}function tHe(){return Ds({},gt(this))}function rHe(){return gt(this).overflow}function nHe(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}nt("N",0,0,"eraAbbr");nt("NN",0,0,"eraAbbr");nt("NNN",0,0,"eraAbbr");nt("NNNN",0,0,"eraName");nt("NNNNN",0,0,"eraNarrow");nt("y",["y",1],"yo","eraYear");nt("y",["yy",2],0,"eraYear");nt("y",["yyy",3],0,"eraYear");nt("y",["yyyy",4],0,"eraYear");He("N",pk);He("NN",pk);He("NNN",pk);He("NNNN",pHe);He("NNNNN",mHe);Xt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var o=r._locale.erasParse(e,n,r._strict);o?gt(r).era=o:gt(r).invalidEra=e});He("y",Cf);He("yy",Cf);He("yyy",Cf);He("yyyy",Cf);He("yo",gHe);Xt(["y","yy","yyy","yyyy"],xn);Xt(["yo"],function(e,t,r,n){var o;r._locale._eraYearOrdinalRegex&&(o=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[xn]=r._locale.eraYearOrdinalParse(e,o):t[xn]=parseInt(e,10)});function oHe(e,t){var r,n,o,a=this._eras||ts("en")._eras;for(r=0,n=a.length;r=0)return a[n]}function iHe(e,t){var r=e.since<=e.until?1:-1;return t===void 0?Fe(e.since).year():Fe(e.since).year()+(t-e.offset)*r}function sHe(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;ea&&(t=a),EHe.call(this,e,t,r,n,o))}function EHe(e,t,r,n,o){var a=LK(e,t,r,n,o),i=e1(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}nt("Q",0,"Qo","quarter");On("quarter","Q");kn("quarter",7);He("Q",OK);Xt("Q",function(e,t){t[Ri]=(xt(e)-1)*3});function CHe(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}nt("D",["DD",2],"Do","date");On("date","D");kn("date",9);He("D",ur);He("DD",ur,ko);He("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});Xt(["D","DD"],Ba);Xt("Do",function(e,t){t[Ba]=xt(e.match(ur)[0])});var nY=Ef("Date",!0);nt("DDD",["DDDD",3],"DDDo","dayOfYear");On("dayOfYear","DDD");kn("dayOfYear",4);He("DDD",a4);He("DDDD",kK);Xt(["DDD","DDDD"],function(e,t,r){r._dayOfYear=xt(e)});function OHe(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}nt("m",["mm",2],0,"minute");On("minute","m");kn("minute",14);He("m",ur);He("mm",ur,ko);Xt(["m","mm"],ga);var kHe=Ef("Minutes",!1);nt("s",["ss",2],0,"second");On("second","s");kn("second",15);He("s",ur);He("ss",ur,ko);Xt(["s","ss"],Si);var RHe=Ef("Seconds",!1);nt("S",0,0,function(){return~~(this.millisecond()/100)});nt(0,["SS",2],0,function(){return~~(this.millisecond()/10)});nt(0,["SSS",3],0,"millisecond");nt(0,["SSSS",4],0,function(){return this.millisecond()*10});nt(0,["SSSSS",5],0,function(){return this.millisecond()*100});nt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});nt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});nt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});nt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});On("millisecond","ms");kn("millisecond",16);He("S",a4,OK);He("SS",a4,ko);He("SSS",a4,kK);var Fs,oY;for(Fs="SSSS";Fs.length<=9;Fs+="S")He(Fs,Cf);function SHe(e,t){t[mc]=xt(("0."+e)*1e3)}for(Fs="S";Fs.length<=9;Fs+="S")Xt(Fs,SHe);oY=Ef("Milliseconds",!1);nt("z",0,0,"zoneAbbr");nt("zz",0,0,"zoneName");function THe(){return this._isUTC?"UTC":""}function PHe(){return this._isUTC?"Coordinated Universal Time":""}var Le=H1.prototype;Le.add=_Ve;Le.calendar=TVe;Le.clone=PVe;Le.diff=$Ve;Le.endOf=GVe;Le.format=BVe;Le.from=VVe;Le.fromNow=HVe;Le.to=UVe;Le.toNow=WVe;Le.get=Aze;Le.invalidAt=rHe;Le.isAfter=MVe;Le.isBefore=AVe;Le.isBetween=jVe;Le.isSame=IVe;Le.isSameOrAfter=LVe;Le.isSameOrBefore=NVe;Le.isValid=eHe;Le.lang=ZK;Le.locale=XK;Le.localeData=QK;Le.max=eVe;Le.min=JBe;Le.parsingFlags=tHe;Le.set=jze;Le.startOf=qVe;Le.subtract=EVe;Le.toArray=ZVe;Le.toObject=QVe;Le.toDate=XVe;Le.toISOString=FVe;Le.inspect=zVe;typeof Symbol<"u"&&Symbol.for!=null&&(Le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Le.toJSON=JVe;Le.toString=DVe;Le.unix=YVe;Le.valueOf=KVe;Le.creationData=nHe;Le.eraName=sHe;Le.eraNarrow=lHe;Le.eraAbbr=cHe;Le.eraYear=uHe;Le.year=IK;Le.isLeapYear=Qze;Le.weekYear=vHe;Le.isoWeekYear=bHe;Le.quarter=Le.quarters=CHe;Le.month=AK;Le.daysInMonth=Yze;Le.week=Le.weeks=oBe;Le.isoWeek=Le.isoWeeks=aBe;Le.weeksInYear=xHe;Le.weeksInWeekYear=_He;Le.isoWeeksInYear=yHe;Le.isoWeeksInISOWeekYear=wHe;Le.date=nY;Le.day=Le.days=bBe;Le.weekday=yBe;Le.isoWeekday=wBe;Le.dayOfYear=OHe;Le.hour=Le.hours=RBe;Le.minute=Le.minutes=kHe;Le.second=Le.seconds=RHe;Le.millisecond=Le.milliseconds=oY;Le.utcOffset=cVe;Le.utc=dVe;Le.local=fVe;Le.parseZone=hVe;Le.hasAlignedHourOffset=pVe;Le.isDST=mVe;Le.isLocal=vVe;Le.isUtcOffset=bVe;Le.isUtc=qK;Le.isUTC=qK;Le.zoneAbbr=THe;Le.zoneName=PHe;Le.dates=Qo("dates accessor is deprecated. Use date instead.",nY);Le.months=Qo("months accessor is deprecated. Use month instead",AK);Le.years=Qo("years accessor is deprecated. Use year instead",IK);Le.zone=Qo("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",uVe);Le.isDSTShifted=Qo("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",gVe);function MHe(e){return lr(e*1e3)}function AHe(){return lr.apply(null,arguments).parseZone()}function aY(e){return e}var zt=ek.prototype;zt.calendar=bze;zt.longDateFormat=_ze;zt.invalidDate=Cze;zt.ordinal=Rze;zt.preparse=aY;zt.postformat=aY;zt.relativeTime=Tze;zt.pastFuture=Pze;zt.set=gze;zt.eras=oHe;zt.erasParse=aHe;zt.erasConvertYear=iHe;zt.erasAbbrRegex=fHe;zt.erasNameRegex=dHe;zt.erasNarrowRegex=hHe;zt.months=Wze;zt.monthsShort=qze;zt.monthsParse=Kze;zt.monthsRegex=Zze;zt.monthsShortRegex=Xze;zt.week=eBe;zt.firstDayOfYear=nBe;zt.firstDayOfWeek=rBe;zt.weekdays=hBe;zt.weekdaysMin=mBe;zt.weekdaysShort=pBe;zt.weekdaysParse=vBe;zt.weekdaysRegex=xBe;zt.weekdaysShortRegex=_Be;zt.weekdaysMinRegex=EBe;zt.isPM=OBe;zt.meridiem=SBe;function G7(e,t,r,n){var o=ts(),a=si().set(n,t);return o[r](a,e)}function iY(e,t,r){if(Yi(e)&&(t=e,e=void 0),e=e||"",t!=null)return G7(e,t,r,"month");var n,o=[];for(n=0;n<12;n++)o[n]=G7(e,n,r,"month");return o}function gk(e,t,r,n){typeof e=="boolean"?(Yi(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,Yi(t)&&(r=t,t=void 0),t=t||"");var o=ts(),a=e?o._week.dow:0,i,s=[];if(r!=null)return G7(t,(r+a)%7,n,"day");for(i=0;i<7;i++)s[i]=G7(t,(i+a)%7,n,"day");return s}function jHe(e,t){return iY(e,t,"months")}function IHe(e,t){return iY(e,t,"monthsShort")}function LHe(e,t,r){return gk(e,t,r,"weekdays")}function NHe(e,t,r){return gk(e,t,r,"weekdaysShort")}function $He(e,t,r){return gk(e,t,r,"weekdaysMin")}ol("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=xt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});Fe.lang=Qo("moment.lang is deprecated. Use moment.locale instead.",ol);Fe.langData=Qo("moment.langData is deprecated. Use moment.localeData instead.",ts);var hi=Math.abs;function DHe(){var e=this._data;return this._milliseconds=hi(this._milliseconds),this._days=hi(this._days),this._months=hi(this._months),e.milliseconds=hi(e.milliseconds),e.seconds=hi(e.seconds),e.minutes=hi(e.minutes),e.hours=hi(e.hours),e.months=hi(e.months),e.years=hi(e.years),this}function sY(e,t,r,n){var o=Ra(t,r);return e._milliseconds+=n*o._milliseconds,e._days+=n*o._days,e._months+=n*o._months,e._bubble()}function FHe(e,t){return sY(this,e,t,1)}function zHe(e,t){return sY(this,e,t,-1)}function _j(e){return e<0?Math.floor(e):Math.ceil(e)}function BHe(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,o,a,i,s,l;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=_j(S9(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,o=zo(e/1e3),n.seconds=o%60,a=zo(o/60),n.minutes=a%60,i=zo(a/60),n.hours=i%24,t+=zo(i/24),l=zo(lY(t)),r+=l,t-=_j(S9(l)),s=zo(r/12),r%=12,n.days=t,n.months=r,n.years=s,this}function lY(e){return e*4800/146097}function S9(e){return e*146097/4800}function VHe(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=Jo(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+lY(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(S9(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function HHe(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+xt(this._months/12)*31536e6:NaN}function rs(e){return function(){return this.as(e)}}var UHe=rs("ms"),WHe=rs("s"),qHe=rs("m"),GHe=rs("h"),KHe=rs("d"),YHe=rs("w"),XHe=rs("M"),ZHe=rs("Q"),QHe=rs("y");function JHe(){return Ra(this)}function eUe(e){return e=Jo(e),this.isValid()?this[e+"s"]():NaN}function tu(e){return function(){return this.isValid()?this._data[e]:NaN}}var tUe=tu("milliseconds"),rUe=tu("seconds"),nUe=tu("minutes"),oUe=tu("hours"),aUe=tu("days"),iUe=tu("months"),sUe=tu("years");function lUe(){return zo(this.days()/7)}var yi=Math.round,td={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function cUe(e,t,r,n,o){return o.relativeTime(t||1,!!r,e,n)}function uUe(e,t,r,n){var o=Ra(e).abs(),a=yi(o.as("s")),i=yi(o.as("m")),s=yi(o.as("h")),l=yi(o.as("d")),c=yi(o.as("M")),u=yi(o.as("w")),p=yi(o.as("y")),h=a<=r.ss&&["s",a]||a0,h[4]=n,cUe.apply(null,h)}function dUe(e){return e===void 0?yi:typeof e=="function"?(yi=e,!0):!1}function fUe(e,t){return td[e]===void 0?!1:t===void 0?td[e]:(td[e]=t,e==="s"&&(td.ss=t-1),!0)}function hUe(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=td,o,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},td,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),o=this.localeData(),a=uUe(this,!r,n,o),r&&(a=o.pastFuture(+this,a)),o.postformat(a)}var Bx=Math.abs;function wu(e){return(e>0)-(e<0)||+e}function h4(){if(!this.isValid())return this.localeData().invalidDate();var e=Bx(this._milliseconds)/1e3,t=Bx(this._days),r=Bx(this._months),n,o,a,i,s=this.asSeconds(),l,c,u,p;return s?(n=zo(e/60),o=zo(n/60),e%=60,n%=60,a=zo(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=s<0?"-":"",c=wu(this._months)!==wu(s)?"-":"",u=wu(this._days)!==wu(s)?"-":"",p=wu(this._milliseconds)!==wu(s)?"-":"",l+"P"+(a?c+a+"Y":"")+(r?c+r+"M":"")+(t?u+t+"D":"")+(o||n||e?"T":"")+(o?p+o+"H":"")+(n?p+n+"M":"")+(e?p+i+"S":"")):"P0D"}var Tt=d4.prototype;Tt.isValid=aVe;Tt.abs=DHe;Tt.add=FHe;Tt.subtract=zHe;Tt.as=VHe;Tt.asMilliseconds=UHe;Tt.asSeconds=WHe;Tt.asMinutes=qHe;Tt.asHours=GHe;Tt.asDays=KHe;Tt.asWeeks=YHe;Tt.asMonths=XHe;Tt.asQuarters=ZHe;Tt.asYears=QHe;Tt.valueOf=HHe;Tt._bubble=BHe;Tt.clone=JHe;Tt.get=eUe;Tt.milliseconds=tUe;Tt.seconds=rUe;Tt.minutes=nUe;Tt.hours=oUe;Tt.days=aUe;Tt.weeks=lUe;Tt.months=iUe;Tt.years=sUe;Tt.humanize=hUe;Tt.toISOString=h4;Tt.toString=h4;Tt.toJSON=h4;Tt.locale=XK;Tt.localeData=QK;Tt.toIsoString=Qo("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",h4);Tt.lang=ZK;nt("X",0,0,"unix");nt("x",0,0,"valueOf");He("x",s4);He("X",Lze);Xt("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});Xt("x",function(e,t,r){r._d=new Date(xt(e))});//! moment.js -Fe.version="2.29.4";pze(lr);Fe.fn=Le;Fe.min=tVe;Fe.max=rVe;Fe.now=nVe;Fe.utc=si;Fe.unix=MHe;Fe.months=jHe;Fe.isDate=V1;Fe.locale=ol;Fe.invalid=r4;Fe.duration=Ra;Fe.isMoment=Oa;Fe.weekdays=LHe;Fe.parseZone=AHe;Fe.localeData=ts;Fe.isDuration=yy;Fe.monthsShort=IHe;Fe.weekdaysMin=$He;Fe.defineLocale=lk;Fe.updateLocale=ABe;Fe.locales=jBe;Fe.weekdaysShort=NHe;Fe.normalizeUnits=Jo;Fe.relativeTimeRounding=dUe;Fe.relativeTimeThreshold=fUe;Fe.calendarFormat=SVe;Fe.prototype=Le;Fe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const cY=({likedUsers:e,openLikedUsersDialog:t,handleOpenLikedUsersDialog:r})=>M.jsxs(ae.Dialog,{open:t,size:"xs",handler:r,animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[M.jsx(ae.DialogHeader,{children:M.jsxs("div",{className:"flex justify-between items-center w-full",children:[M.jsx("h1",{className:"text-xl font-semibold",children:"Liked by"}),M.jsx("div",{children:M.jsx(B1,{className:"text-3xl cursor-pointer",onClick:r})})]})}),M.jsx(ae.DialogBody,{className:"flex flex-col gap-4 lg:mx-4 lg:my-0 m-2 max-h-[20.5rem] overflow-y-scroll",children:M.jsx("div",{className:"flex flex-col gap-2 ",children:e.length>0?e.map(n=>M.jsx("div",{className:"flex p-2 items-center justify-between transition duration-100 ease-in-out hover:shadow-md hover:scale-105 hover:rounded-lg",children:M.jsx(sn,{to:`/profile/${n._id}`,children:M.jsxs("div",{className:"mt-3 flex items-center space-x-2",children:[M.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:n.dp?n.dp:Ht.DEFAULT_IMG,alt:"user dp"}),M.jsxs("span",{className:"flex flex-col",children:[M.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:n==null?void 0:n.name}),M.jsx("span",{className:"text-[11px] font-medium text-gray-500",children:n.username?`@${n.username}`:"@ -"})]})]})})},n._id)):M.jsx("div",{className:"flex justify-center items-center",children:M.jsx("em",{className:"text-lg font-light",children:"No likes yet"})})})}),M.jsx(ae.DialogFooter,{children:void 0})]});var pUe=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var p=Ej[t.format]||Ej.default;window.clipboardData.setData(p,e)}else u.clipboardData.clearData(),u.clipboardData.setData(t.format,e);t.onCopy&&(u.preventDefault(),t.onCopy(u.clipboardData))}),document.body.appendChild(s),a.selectNodeContents(s),i.addRange(a);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){r&&console.error("unable to copy using execCommand: ",u),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(p){r&&console.error("unable to copy using clipboardData: ",p),r&&console.error("falling back to prompt"),n=vUe("message"in t?t.message:gUe),window.prompt(n,e)}}finally{i&&(typeof i.removeRange=="function"?i.removeRange(a):i.removeAllRanges()),s&&document.body.removeChild(s),o()}return l}var yUe=bUe;const uY=El(yUe),wUe=({commentPopupOpen:e,handleCommentPopupOpen:t,postDetails:r,likesArray:n,savedPostsArray:o,setCommentsLength:a,isLiked:i,handleLike:s,isSaved:l,handleSavePost:c})=>{var Q,Z;const u=ro(),[p,h]=g.useState(!1),[v,_]=g.useState(null),[w,y]=g.useState([]),[m,f]=g.useState(!1),[b,d]=g.useState(null),[x,E]=g.useState(null),[C,k]=g.useState(!1),[S,R]=g.useState(null),[T,P]=g.useState(null),[j,L]=g.useState(null),D=(Q=xo.getState().auth.user)==null?void 0:Q._id,[B,V]=g.useState([]),[q,z]=g.useState(!1),F=()=>z(!q);g.useEffect(()=>{r&&$(r._id)},[r]);async function $(U){const J=await $G(U);J.status==="success"&&y(J.comments)}g.useEffect(()=>{p&&r?(console.log("comment to be replied: ",b),console.log("tagged user name: ",v)):(_(null),d(null))},[p,r]),g.useEffect(()=>{m&&($(r==null?void 0:r._id),f(!1))},[m,r]),g.useEffect(()=>{a(w.length)},[w.length]),g.useEffect(()=>{if(S){const U=w.findIndex(J=>J._id===S._id);if(U!==-1){const J=[...w];J[U]=S,y(J)}R(null)}},[w,S]),g.useEffect(()=>{if(T){const U=w.findIndex(J=>J._id===T);if(U!==-1){const J=[...w];J.splice(U,1),y(J)}P(null)}},[w,T]);const W=U=>{u(_G(U)),t()},G=async U=>{const J=await DG(U);V(J.users)};return M.jsxs(M.Fragment,{children:[M.jsxs(ae.Dialog,{open:e,size:"lg",handler:t,dismiss:{enabled:!1},animate:{mount:{scale:1,y:0},unmount:{scale:.9,y:-100}},children:[M.jsx(eo,{}),M.jsxs(ae.DialogBody,{children:[M.jsx(ae.DialogHeader,{className:"p-0",children:M.jsxs("div",{className:"flex justify-between items-center w-full",children:[M.jsx("div",{className:"flex items-center justify-between gap-5 transition-transform duration-300 mx-1 px-2 pb-3 rounded-lg cursor-pointer hover:bg-gray-200 hover:scale-105",children:r&&M.jsx(sn,{to:`/profile/${r.userId}`,children:M.jsxs("div",{className:"mt-3 flex items-center space-x-2",children:[r!=null&&r.user.dp?M.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:r==null?void 0:r.user.dp,alt:"Profile Picture"}):M.jsx("img",{className:"inline-block h-12 w-12 rounded-full",src:r!=null&&r.user.dp?r==null?void 0:r.user.dp:Ht.DEFAULT_IMG,alt:"Profile Picture"}),M.jsxs("span",{className:"flex flex-col",children:[M.jsx("span",{className:"text-[14px] font-bold text-gray-900",children:r.user.name}),M.jsxs("span",{className:"text-[11px] font-bold text-green-500",children:["@",r.user.username]})]})]})})}),M.jsx("div",{children:M.jsx(B1,{className:"text-3xl cursor-pointer",onClick:t})})]})}),M.jsx("section",{children:M.jsxs("div",{className:"flex gap-8 items-start justify-start",children:[M.jsx("div",{className:"relative hidden md:flex w-1/2 pl-4 pb-5",children:M.jsx("div",{className:"flex flex-col w-full h-full items-start gap-2",children:M.jsx("div",{className:"w-full rounded-lg border shadow-lg",children:M.jsxs("div",{className:" flex flex-col justify-center w-full h-fit rounded-t-lg p-3 gap-3",children:[M.jsxs("div",{className:"px-4",children:[M.jsx("div",{className:"mt-2 text-sm text-gray-600",dangerouslySetInnerHTML:{__html:r==null?void 0:r.description}}),M.jsx("div",{className:"mt-4 mb-2",children:(Z=r==null?void 0:r.hashtagsArray)==null?void 0:Z.map((U,J)=>M.jsx("span",{className:`mb-2 mr-2 inline-block rounded-full bg-gray-100 px-3 py-1 text-[10px] font-semibold transition ease-in-out duration-150 - text-gray-900 cursor-pointer hover:scale-105 hover:text-gray-100 hover:bg-gray-900`,onClick:()=>W(U),children:U},J))})]}),(r==null?void 0:r.image)&&(r==null?void 0:r.image.length)>0&&M.jsx("div",{className:"flex items-center justify-self-center px-1 w-full h-64",children:r.image.length>1?M.jsx(ae.Carousel,{className:"w-full h-full",navigation:({setActiveIndex:U,activeIndex:J,length:oe})=>M.jsx("div",{className:"absolute bottom-4 left-2/4 z-50 flex -translate-x-2/4 gap-2",children:new Array(oe).fill("").map((ee,ie)=>M.jsx("span",{className:`block h-1 cursor-pointer rounded-2xl transition-all content-[''] ${J===ie?"w-8 bg-white":"w-4 bg-white/50"}`,onClick:()=>U(ie)},ie))}),children:r==null?void 0:r.image.map((U,J)=>M.jsx("img",{src:U,alt:"post-image",className:"h-full w-full object-cover rounded-lg"},J))}):M.jsx("img",{src:r.image[0],alt:"Laptop",className:"h-full w-full rounded-lg object-cover"})}),M.jsxs("div",{className:"flex items-center justify-between px-2 text-black",children:[M.jsxs("div",{className:"flex items-center justify-start gap-4",children:[n.includes(D)||i?M.jsx(Qw,{className:"text-2xl cursor-pointer text-socioverse-500 transition ease-in-out duration-150 hover:text-red-500 hover:scale-105",onClick:s}):M.jsx(Jw,{className:"text-2xl cursor-pointer hover:text-socioverse-500 hover:scale-105 transition ease-in-out duration-150",onClick:s}),M.jsx(IG,{className:"text-2xl cursor-pointer",onClick:()=>{Ee.dismiss(),r&&uY(`${Ht.CLIENT_BASE_URL}/share/${r._id}`),Ee.success("Copied link to the clipboard",{...rt,closeButton:!1})}})]}),o&&o.includes(D)||l?M.jsx(NG,{className:"text-2xl cursor-pointer text-black hover:scale-105 transition ease-in-out duration-150",onClick:c}):M.jsx(LG,{className:"text-2xl cursor-pointer hover:scale-105 transition ease-in-out duration-150 ",onClick:c})]}),M.jsxs("div",{className:"flex items-center justify-between w-full",children:[M.jsxs("div",{className:"flex items-center justify-start gap-4 px-2",children:[M.jsxs("span",{className:"text-[12px] font-medium text-gray-500 cursor-pointer",onClick:()=>{r&&G(r._id),z(!0)},children:[n.length," likes"]}),M.jsxs("span",{className:"text-[12px] font-medium text-gray-500",children:[w.length," comments"]})]}),M.jsxs("span",{className:"text-[12px] font-medium text-gray-500",children:[Fe(r==null?void 0:r.createdAt).startOf("minutes").fromNow(),(r==null?void 0:r.createdAt)!==(r==null?void 0:r.updatedAt)&&" ( Edited )"]})]})]})})})}),M.jsx("div",{className:"flex w-full md:w-1/2 h-[32rem] md:pr-4 md:pb-5",children:M.jsxs("div",{className:"flex flex-col w-full h-full items-start border-2 rounded-lg shadow-lg",children:[M.jsx("div",{className:"h-full w-full overflow-y-scroll no-scrollbar",children:w.length?w.map(U=>M.jsx(_Ue,{onReply:p,setOnReply:h,commentData:U,commentToBeReplied:b,setCommentToBeReplied:d,setTaggedUser:_,editCommentMode:C,setEditComment:E,setDeleteCommentId:P,newlyAddedReply:j,setNewlyAddedReply:L},U._id)):M.jsx("div",{className:"flex items-center justify-center h-full",children:M.jsx("div",{className:"flex flex-col items-center justify-center",children:M.jsx("p",{children:"No comments yet..."})})})}),M.jsx("div",{className:"h-fit w-full p-2 md:p-4 border-t-2",children:r&&M.jsx(xUe,{postId:r._id,onReply:p,setOnReply:h,taggedUser:v,setNewCommentStatus:f,commentToBeReplied:b,setCommentToBeReplied:d,editComment:x,setEditComment:E,editCommentMode:C,setEditCommentMode:k,setNewlyUpdatedComment:R,setNewlyAddedReply:L})})]})})]})})]})]}),M.jsx(cY,{likedUsers:B,openLikedUsersDialog:q,handleOpenLikedUsersDialog:F})]})};function xUe({postId:e,onReply:t,setOnReply:r,taggedUser:n,setNewCommentStatus:o,commentToBeReplied:a,setCommentToBeReplied:i,editComment:s,setEditComment:l,editCommentMode:c,setEditCommentMode:u,setNewlyUpdatedComment:p,setNewlyAddedReply:h}){const[v,_]=g.useState(""),[w,y]=g.useState(null),m=g.useRef(null);g.useEffect(()=>{var b;t&&n?((b=m.current)==null||b.focus(),_(`@${n} `),u(!1)):(_(""),i(null))},[t,n]),g.useEffect(()=>{var b;s&&(u(!0),_(s.comment),y(s._id),(b=m.current)==null||b.focus(),l(null),r(!1))},[s,l,u]);const f=async b=>{if(b.length>0){const d={postId:e,comment:b};if(t&&a){const E=MDe({commentId:a,reply:b});Ee.promise(E,{pending:"Replying to the comment...",success:"Comment added successfully!",error:"Error adding comment!"}),(await E).status==="success"&&i(null),h((await E).reply),r(!1)}else if(c){const x=$De(w,b);Ee.promise(x,{pending:"Making Changes...",success:"Successfully Edited the comment!",error:"Error making changes!"}),(await x).status==="success"&&(p((await x).editedComment),u(!1))}else{const x=PDe(d);Ee.promise(x,{pending:"Adding comment...",success:"Comment added successfully!",error:"Error adding comment!"}),(await x).status==="success"&&o(!0)}}};return M.jsxs(M.Fragment,{children:[M.jsx(vK,{ref:m,value:v,onChange:_,cleanOnEnter:!0,onEnter:f,placeholder:"Add a comment...",theme:"auto",fontSize:14,fontFamily:"sans-serif",keepOpened:!0,searchMention:async b=>["no user"].filter(d=>d.includes(b))}),t?M.jsx(ae.Button,{variant:"text",size:"sm",className:"text-xs text-socioverse-500 mr-10 float-right",onClick:()=>r(!1),children:"Cancel Reply"}):c?M.jsx(ae.Button,{variant:"text",size:"sm",className:"text-xs text-socioverse-500 mr-10 float-right",onClick:()=>u(!1),children:"Cancel Edit"}):""]})}function _Ue({onReply:e,commentToBeReplied:t,setCommentToBeReplied:r,setOnReply:n,commentData:o,setTaggedUser:a,editCommentMode:i,setEditComment:s,setDeleteCommentId:l,newlyAddedReply:c,setNewlyAddedReply:u}){var W,G,Q,Z,U,J,oe;const p=(W=xo.getState().auth.user)==null?void 0:W._id,[h,v]=g.useState(o.likes),[_,w]=g.useState(!1),[y,m]=g.useState(!1),[f,b]=g.useState([]),[d,x]=g.useState(!1),[E,C]=g.useState(null),[k,S]=g.useState(null),[R,T]=g.useState(!1),[P,j]=g.useState(null),L=()=>{x(!d)};g.useEffect(()=>{o&&v(o.likes),o&&o.likes.includes(p)?w(!0):w(!1)},[o,p]),g.useEffect(()=>{c&&(b(ee=>[c,...ee]),u(null))},[c,u]),g.useEffect(()=>{y?D():b([])},[y]),g.useEffect(()=>{i||C(null)},[i]),g.useEffect(()=>{if(P){const ee=f.findIndex(ie=>ie._id===P);if(ee!==-1){const ie=[...f];ie.splice(ee,1),b(ie)}l(null)}},[f,P,l]);async function D(){const ee=await ADe(o._id);ee.status==="success"&&b(ee.replies)}const B=(ee,ie,ce,ye,Ce)=>{n(Se=>!Se),r(ee),S(ye),T(Ce),ie?a(ie):ce&&a(ce)},V=()=>{s(o),C(o._id)},q=()=>{Ee.dismiss(),Ee(M.jsx(KO,{onDelete:z,message:"Are you sure you want to delete this Comment?"}),{...rt,closeButton:!1})},z=async()=>{const ee=DDe(o._id);Ee.promise(ee,{pending:"Deleting Comment...",success:"Comment deleted successfully!",error:"Error deleting comment!"}),(await ee).status==="success"&&l(o._id)},F=async()=>{Ee.dismiss();const ee=zDe(o._id);Ee.promise(ee,{pending:"Reporting Comment...",success:"Comment reported successfully!",error:"Error reporting comment!"})},$=async()=>{Ee.dismiss(),_?(await zA(o._id,"dislike")).status==="success"?(w(!1),v(ie=>ie.filter(ce=>ce!==p))):Ee.error("Error occured",rt):(await zA(o._id,"like")).status==="success"?(w(!0),v(ie=>[...ie,p])):Ee.error("Error occured",rt)};return M.jsx("div",{className:po("rounded-xl flex flex-col border m-3"),children:M.jsxs("div",{className:"transition-transform duration-300 rounded-lg cursor-pointer w-full",children:[M.jsxs("div",{className:po("space-x-2 flex items-start p-1 md:p-4 rounded-lg shadow-lg",{"bg-blue-gray-50":e&&!R&&t===o._id||i&&E===o._id},{"bg-white":!e&&!i}),children:[o&&M.jsx(sn,{to:`/profile/${(G=o.user)==null?void 0:G._id}`,children:(Q=o.user)!=null&&Q.dp?M.jsx("img",{className:"inline-block h-8 w-8 md:h-10 md:w-10 rounded-full",src:(Z=o.user)==null?void 0:Z.dp,alt:"user dp"}):M.jsx("img",{className:"inline-block h-8 w-8 md:h-10 md:w-10 rounded-full",src:Ht.DEFAULT_IMG,alt:"user dp"})}),M.jsxs("div",{className:"w-full",children:[M.jsxs("div",{className:"flex justify-between items-center",children:[o&&M.jsx(sn,{to:`/profile/${(U=o.user)==null?void 0:U._id}`,children:M.jsx("span",{className:"text-xs md:text-sm font-bold text-gray-900",children:(J=o.user)==null?void 0:J.name})}),M.jsxs("div",{className:"group inline-block relative",children:[M.jsx(ae.Button,{color:"blue-gray",size:"sm",variant:"text",className:"focus:outline-none",onClick:L,children:M.jsx(qO,{className:"text-sm transition duration-150 ease-in-out hover:scale-105"})}),d&&M.jsx("div",{className:`${d?"block":"hidden"} absolute right-0 w-36 rounded-md z-10`,children:M.jsx("div",{className:`${d?"block":"hidden"} absolute right-0 mt-1 w-full bg-white border border-blue-gray-300/20 shadow-lg rounded-md z-10`,children:((oe=o.user)==null?void 0:oe._id)===p?M.jsxs(M.Fragment,{children:[M.jsxs("button",{className:"flex items-center w-full pl-5 py-[0.6rem] text-blue-gray-700 hover:bg-blue-100/50 hover:text-blue-gray-800 text-left",onClick:()=>{V(),x(!1)},children:[M.jsx(jG,{className:"mr-2 text-lg"}),M.jsx("p",{className:"text-sm",children:"Edit"})]}),M.jsxs("button",{className:"flex items-center w-full pl-5 py-[0.6rem] text-blue-gray-700 hover:bg-blue-100/50 hover:text-blue-gray-800 text-left",onClick:()=>{q(),x(!1)},children:[M.jsx(GO,{className:"mr-2 text-md"}),M.jsx("p",{className:"text-sm",children:"Delete"})]})]}):M.jsxs("button",{className:"flex items-center w-full pl-5 py-[0.6rem] text-blue-gray-700 hover:bg-blue-100/50 hover:text-blue-gray-800 text-left",onClick:()=>{F(),x(!1)},children:[M.jsx(WO,{className:"mr-2 text-lg"}),M.jsx("p",{className:"text-sm",children:"Report"})]})})})]})]}),M.jsxs("span",{className:"flex-1",children:[M.jsx("p",{className:"text-xs md:text-sm text-gray-600",children:o.comment}),M.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500 mt-4",children:[M.jsxs("div",{className:"flex gap-5",children:[h.includes(p)?M.jsxs("button",{onClick:$,className:"flex gap-1 items-center",children:[M.jsx("p",{className:"text-[0.6rem] md:text-xs font-bold",children:h.length}),M.jsx(Qw,{className:"text-sm md:text-md cursor-pointer text-socioverse-500 hover:scale-105"})]}):M.jsxs("button",{onClick:$,className:"flex gap-1 items-center",children:[M.jsx("p",{className:"text-[0.6rem] md:text-xs font-bold",children:h.length}),M.jsx(Jw,{className:"text-sm md:text-md cursor-pointer hover:text-socioverse-500"})]}),M.jsx("button",{className:"text-[0.6rem] md:text-xs font-bold",onClick:()=>{var ee,ie;return o.user&&B(o._id,(ee=o.user)==null?void 0:ee.name,null,(ie=o.user)==null?void 0:ie._id,!1)},children:"Reply"}),M.jsxs("button",{className:"text-[0.6rem] md:text-xs font-bold",onClick:()=>m(ee=>!ee),children:["Replies ",f.length||o.replies.length]})]}),M.jsxs("p",{className:"text-[0.6rem] md:text-xs",children:[Fe(o.createdAt).startOf("minutes").fromNow(),o.createdAt!==o.updatedAt&&" ( Edited )"]})]})]})]})]}),y&&f.length>0&&M.jsx("div",{className:"mt-5 flex flex-col gap-4",children:f.map(ee=>M.jsx(EUe,{userId:p,reply:ee,commentId:o._id,handleOnReply:B,onReply:e,fromId:k,setDeleteReplyId:j},ee._id))})]})})}const EUe=({userId:e,reply:t,commentId:r,handleOnReply:n,onReply:o,fromId:a,setDeleteReplyId:i})=>{var f,b,d,x;const[s,l]=g.useState(t.likes),[c,u]=g.useState(!1),[p,h]=g.useState(!1),v=()=>{h(!p)};g.useEffect(()=>{t&&l(t.likes),t&&t.likes.includes(e)?u(!0):u(!1)},[t,e]);const _=async()=>{Ee.dismiss(),c?(await BA(t._id,r,"dislike")).status==="success"?(u(!1),l(C=>C.filter(k=>k!==e))):Ee.error("Error occured",rt):(await BA(t._id,r,"like")).status==="success"?(u(!0),l(C=>[...C,e])):Ee.error("Error occured",rt)},w=()=>{Ee.dismiss(),Ee(M.jsx(KO,{onDelete:y,message:"Are you sure you want to delete this reply comment?"}),{...rt,closeButton:!1})},y=async()=>{const E=FDe(t._id,r);Ee.promise(E,{pending:"Deleting Reply...",success:"Reply deleted successfully!",error:"Error deleting reply!"}),(await E).status==="success"&&i(t._id)},m=()=>{Ee.dismiss();const E=BDe(t._id,r);Ee.promise(E,{pending:"Reporting Reply...",success:"Reply reported successfully!",error:"Error reporting reply!"})};return M.jsx(M.Fragment,{children:M.jsx("div",{className:" pl-10 pr-2",children:M.jsxs("div",{className:po("space-x-2 p-1 md:p-4 rounded-lg shadow-lg border flex items-start",{"bg-blue-gray-50":o&&a===t._id},{"bg-white":!o}),children:[t&&M.jsx(sn,{to:`/profile/${t.userId}`,children:(f=t.user)!=null&&f.dp?M.jsx("img",{className:"inline-block h-8 w-8 md:h-10 md:w-10 rounded-full",src:(b=t.user)==null?void 0:b.dp,alt:"Profile Picture"}):M.jsx("img",{className:"inline-block h-8 w-8 md:h-10 md:w-10 rounded-full",src:Ht.DEFAULT_IMG,alt:"Profile Picture"})}),M.jsxs("div",{className:"w-full",children:[M.jsxs("div",{className:"flex justify-between items-center",children:[t&&M.jsx(sn,{to:`/profile/${t.userId}`,children:M.jsx("span",{className:"text-xs md:text-sm font-bold text-gray-900",children:(d=t.user)==null?void 0:d.name})}),M.jsxs("div",{className:"group inline-block relative",children:[M.jsx(ae.Button,{color:"blue-gray",size:"sm",variant:"text",className:"focus:outline-none",onClick:v,children:M.jsx(qO,{className:"text-sm transition duration-150 ease-in-out hover:scale-105"})}),p&&M.jsx("div",{className:`${p?"block":"hidden"} absolute right-0 w-36 rounded-md z-10`,children:M.jsx("div",{className:`${p?"block":"hidden"} absolute right-0 mt-1 w-full bg-white border border-blue-gray-300/20 shadow-lg rounded-md z-10`,children:((x=t.user)==null?void 0:x._id)===e?M.jsxs("button",{className:"flex items-center w-full pl-5 py-[0.6rem] text-blue-gray-700 hover:bg-blue-100/50 hover:text-blue-gray-800 text-left",onClick:()=>{w(),h(!1)},children:[M.jsx(GO,{className:"mr-2 text-md"}),M.jsx("p",{className:"text-sm",children:"Delete"})]}):M.jsxs("button",{className:"flex items-center w-full pl-5 py-[0.6rem] text-blue-gray-700 hover:bg-blue-100/50 hover:text-blue-gray-800 text-left",onClick:()=>{m(),h(!1)},children:[M.jsx(WO,{className:"mr-2 text-lg"}),M.jsx("p",{className:"text-sm",children:"Report"})]})})})]})]}),M.jsxs("span",{className:"flex-1",children:[M.jsx("p",{className:"text-xs md:text-sm text-gray-600",children:t.reply}),M.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500 mt-4",children:[M.jsxs("div",{className:"flex gap-5",children:[s.includes(e)?M.jsxs("button",{onClick:_,className:"flex gap-1 items-center",children:[M.jsx("p",{className:"text-[0.6rem] md:text-xs font-bold",children:s.length}),M.jsx(Qw,{className:"text-sm md:text-md cursor-pointer text-socioverse-500 hover:scale-105"})]}):M.jsxs("button",{onClick:_,className:"flex gap-1 items-center",children:[M.jsx("p",{className:"text-[0.6rem] md:text-xs font-bold",children:s.length}),M.jsx(Jw,{className:"text-sm md:text-md cursor-pointer hover:text-socioverse-500"})]}),M.jsx("button",{className:"text-[0.6rem] md:text-xs font-bold",onClick:()=>{var E;t.user&&n(r,null,(E=t.user)==null?void 0:E.name,t._id,!0)},children:"Reply"})]}),M.jsx("p",{className:"text-[0.6rem] md:text-xs",children:Fe(t.createdAt).startOf("minutes").fromNow()})]})]})]})]})})})};function CUe(){this.__data__=[],this.size=0}var OUe=CUe;function kUe(e,t){return e===t||e!==e&&t!==t}var dY=kUe,RUe=dY;function SUe(e,t){for(var r=e.length;r--;)if(RUe(e[r][0],t))return r;return-1}var p4=SUe,TUe=p4,PUe=Array.prototype,MUe=PUe.splice;function AUe(e){var t=this.__data__,r=TUe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():MUe.call(t,r,1),--this.size,!0}var jUe=AUe,IUe=p4;function LUe(e){var t=this.__data__,r=IUe(t,e);return r<0?void 0:t[r][1]}var NUe=LUe,$Ue=p4;function DUe(e){return $Ue(this.__data__,e)>-1}var FUe=DUe,zUe=p4;function BUe(e,t){var r=this.__data__,n=zUe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var VUe=BUe,HUe=OUe,UUe=jUe,WUe=NUe,qUe=FUe,GUe=VUe;function Of(e){var t=-1,r=e==null?0:e.length;for(this.clear();++ts))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var p=-1,h=!0,v=r&jGe?new TGe:void 0;for(a.set(e,t),a.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=HKe}var xY=UKe,WKe=g4,qKe=xY,GKe=y4,KKe="[object Arguments]",YKe="[object Array]",XKe="[object Boolean]",ZKe="[object Date]",QKe="[object Error]",JKe="[object Function]",eYe="[object Map]",tYe="[object Number]",rYe="[object Object]",nYe="[object RegExp]",oYe="[object Set]",aYe="[object String]",iYe="[object WeakMap]",sYe="[object ArrayBuffer]",lYe="[object DataView]",cYe="[object Float32Array]",uYe="[object Float64Array]",dYe="[object Int8Array]",fYe="[object Int16Array]",hYe="[object Int32Array]",pYe="[object Uint8Array]",mYe="[object Uint8ClampedArray]",gYe="[object Uint16Array]",vYe="[object Uint32Array]",ar={};ar[cYe]=ar[uYe]=ar[dYe]=ar[fYe]=ar[hYe]=ar[pYe]=ar[mYe]=ar[gYe]=ar[vYe]=!0;ar[KKe]=ar[YKe]=ar[sYe]=ar[XKe]=ar[lYe]=ar[ZKe]=ar[QKe]=ar[JKe]=ar[eYe]=ar[tYe]=ar[rYe]=ar[nYe]=ar[oYe]=ar[aYe]=ar[iYe]=!1;function bYe(e){return GKe(e)&&qKe(e.length)&&!!ar[WKe(e)]}var yYe=bYe;function wYe(e){return function(t){return e(t)}}var xYe=wYe,X7={exports:{}};X7.exports;(function(e,t){var r=fY,n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===n,i=a&&r.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||i&&i.binding&&i.binding("util")}catch{}}();e.exports=s})(X7,X7.exports);var _Ye=X7.exports,EYe=yYe,CYe=xYe,Lj=_Ye,Nj=Lj&&Lj.isTypedArray,OYe=Nj?CYe(Nj):EYe,_Y=OYe,kYe=OKe,RYe=NKe,SYe=yk,TYe=wY,PYe=VKe,MYe=_Y,AYe=Object.prototype,jYe=AYe.hasOwnProperty;function IYe(e,t){var r=SYe(e),n=!r&&RYe(e),o=!r&&!n&&TYe(e),a=!r&&!n&&!o&&MYe(e),i=r||n||o||a,s=i?kYe(e.length,String):[],l=s.length;for(var c in e)(t||jYe.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||PYe(c,l)))&&s.push(c);return s}var LYe=IYe,NYe=Object.prototype;function $Ye(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||NYe;return e===r}var DYe=$Ye;function FYe(e,t){return function(r){return e(t(r))}}var zYe=FYe,BYe=zYe,VYe=BYe(Object.keys,Object),HYe=VYe,UYe=DYe,WYe=HYe,qYe=Object.prototype,GYe=qYe.hasOwnProperty;function KYe(e){if(!UYe(e))return WYe(e);var t=[];for(var r in Object(e))GYe.call(e,r)&&r!="constructor"&&t.push(r);return t}var YYe=KYe,XYe=mY,ZYe=xY;function QYe(e){return e!=null&&ZYe(e.length)&&!XYe(e)}var JYe=QYe,eXe=LYe,tXe=YYe,rXe=JYe;function nXe(e){return rXe(e)?eXe(e):tXe(e)}var oXe=nXe,aXe=hKe,iXe=EKe,sXe=oXe;function lXe(e){return aXe(e,sXe,iXe)}var cXe=lXe,$j=cXe,uXe=1,dXe=Object.prototype,fXe=dXe.hasOwnProperty;function hXe(e,t,r,n,o,a){var i=r&uXe,s=$j(e),l=s.length,c=$j(t),u=c.length;if(l!=u&&!i)return!1;for(var p=l;p--;){var h=s[p];if(!(i?h in t:fXe.call(t,h)))return!1}var v=a.get(e),_=a.get(t);if(v&&_)return v==t&&_==e;var w=!0;a.set(e,t),a.set(t,e);for(var y=i;++p1)return y.map(function(d){return w(d)});var f=y[0];if(typeof f.blotName!="string"&&typeof f.attrName!="string")throw new i("Invalid definition");if(f.blotName==="abstract")throw new i("Cannot register abstract class");if(u[f.blotName||f.attrName]=f,typeof f.keyName=="string")s[f.keyName]=f;else if(f.className!=null&&(l[f.className]=f),f.tagName!=null){Array.isArray(f.tagName)?f.tagName=f.tagName.map(function(d){return d.toUpperCase()}):f.tagName=f.tagName.toUpperCase();var b=Array.isArray(f.tagName)?f.tagName:[f.tagName];b.forEach(function(d){(c[d]==null||f.className==null)&&(c[d]=f)})}return f}n.register=w},function(r,n,o){var a=o(51),i=o(11),s=o(3),l=o(20),c=String.fromCharCode(0),u=function(p){Array.isArray(p)?this.ops=p:p!=null&&Array.isArray(p.ops)?this.ops=p.ops:this.ops=[]};u.prototype.insert=function(p,h){var v={};return p.length===0?this:(v.insert=p,h!=null&&typeof h=="object"&&Object.keys(h).length>0&&(v.attributes=h),this.push(v))},u.prototype.delete=function(p){return p<=0?this:this.push({delete:p})},u.prototype.retain=function(p,h){if(p<=0)return this;var v={retain:p};return h!=null&&typeof h=="object"&&Object.keys(h).length>0&&(v.attributes=h),this.push(v)},u.prototype.push=function(p){var h=this.ops.length,v=this.ops[h-1];if(p=s(!0,{},p),typeof v=="object"){if(typeof p.delete=="number"&&typeof v.delete=="number")return this.ops[h-1]={delete:v.delete+p.delete},this;if(typeof v.delete=="number"&&p.insert!=null&&(h-=1,v=this.ops[h-1],typeof v!="object"))return this.ops.unshift(p),this;if(i(p.attributes,v.attributes)){if(typeof p.insert=="string"&&typeof v.insert=="string")return this.ops[h-1]={insert:v.insert+p.insert},typeof p.attributes=="object"&&(this.ops[h-1].attributes=p.attributes),this;if(typeof p.retain=="number"&&typeof v.retain=="number")return this.ops[h-1]={retain:v.retain+p.retain},typeof p.attributes=="object"&&(this.ops[h-1].attributes=p.attributes),this}}return h===this.ops.length?this.ops.push(p):this.ops.splice(h,0,p),this},u.prototype.chop=function(){var p=this.ops[this.ops.length-1];return p&&p.retain&&!p.attributes&&this.ops.pop(),this},u.prototype.filter=function(p){return this.ops.filter(p)},u.prototype.forEach=function(p){this.ops.forEach(p)},u.prototype.map=function(p){return this.ops.map(p)},u.prototype.partition=function(p){var h=[],v=[];return this.forEach(function(_){var w=p(_)?h:v;w.push(_)}),[h,v]},u.prototype.reduce=function(p,h){return this.ops.reduce(p,h)},u.prototype.changeLength=function(){return this.reduce(function(p,h){return h.insert?p+l.length(h):h.delete?p-h.delete:p},0)},u.prototype.length=function(){return this.reduce(function(p,h){return p+l.length(h)},0)},u.prototype.slice=function(p,h){p=p||0,typeof h!="number"&&(h=1/0);for(var v=[],_=l.iterator(this.ops),w=0;w0&&v.next(w.retain-y)}for(var m=new u(_);h.hasNext()||v.hasNext();)if(v.peekType()==="insert")m.push(v.next());else if(h.peekType()==="delete")m.push(h.next());else{var f=Math.min(h.peekLength(),v.peekLength()),b=h.next(f),d=v.next(f);if(typeof d.retain=="number"){var x={};typeof b.retain=="number"?x.retain=f:x.insert=b.insert;var E=l.attributes.compose(b.attributes,d.attributes,typeof b.retain=="number");if(E&&(x.attributes=E),m.push(x),!v.hasNext()&&i(m.ops[m.ops.length-1],x)){var C=new u(h.rest());return m.concat(C).chop()}}else typeof d.delete=="number"&&typeof b.retain=="number"&&m.push(d)}return m.chop()},u.prototype.concat=function(p){var h=new u(this.ops.slice());return p.ops.length>0&&(h.push(p.ops[0]),h.ops=h.ops.concat(p.ops.slice(1))),h},u.prototype.diff=function(p,h){if(this.ops===p.ops)return new u;var v=[this,p].map(function(f){return f.map(function(b){if(b.insert!=null)return typeof b.insert=="string"?b.insert:c;var d=f===p?"on":"with";throw new Error("diff() called "+d+" non-document")}).join("")}),_=new u,w=a(v[0],v[1],h),y=l.iterator(this.ops),m=l.iterator(p.ops);return w.forEach(function(f){for(var b=f[1].length;b>0;){var d=0;switch(f[0]){case a.INSERT:d=Math.min(m.peekLength(),b),_.push(m.next(d));break;case a.DELETE:d=Math.min(b,y.peekLength()),y.next(d),_.delete(d);break;case a.EQUAL:d=Math.min(y.peekLength(),m.peekLength(),b);var x=y.next(d),E=m.next(d);i(x.insert,E.insert)?_.retain(d,l.attributes.diff(x.attributes,E.attributes)):_.push(E).delete(d);break}b-=d}}),_.chop()},u.prototype.eachLine=function(p,h){h=h||` -`;for(var v=l.iterator(this.ops),_=new u,w=0;v.hasNext();){if(v.peekType()!=="insert")return;var y=v.peek(),m=l.length(y)-v.peekLength(),f=typeof y.insert=="string"?y.insert.indexOf(h,m)-m:-1;if(f<0)_.push(v.next());else if(f>0)_.push(v.next(f));else{if(p(_,v.next(1).attributes||{},w)===!1)return;w+=1,_=new u}}_.length()>0&&p(_,{},w)},u.prototype.transform=function(p,h){if(h=!!h,typeof p=="number")return this.transformPosition(p,h);for(var v=l.iterator(this.ops),_=l.iterator(p.ops),w=new u;v.hasNext()||_.hasNext();)if(v.peekType()==="insert"&&(h||_.peekType()!=="insert"))w.retain(l.length(v.next()));else if(_.peekType()==="insert")w.push(_.next());else{var y=Math.min(v.peekLength(),_.peekLength()),m=v.next(y),f=_.next(y);if(m.delete)continue;f.delete?w.push(f):w.retain(y,l.attributes.transform(m.attributes,f.attributes,h))}return w.chop()},u.prototype.transformPosition=function(p,h){h=!!h;for(var v=l.iterator(this.ops),_=0;v.hasNext()&&_<=p;){var w=v.peekLength(),y=v.peekType();if(v.next(),y==="delete"){p-=Math.min(w,p-_);continue}else y==="insert"&&(_"u"||o.call(v,y)},u=function(v,_){i&&_.name==="__proto__"?i(v,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):v[_.name]=_.newValue},p=function(v,_){if(_==="__proto__")if(o.call(v,_)){if(s)return s(v,_).value}else return;return v[_]};r.exports=function h(){var v,_,w,y,m,f,b=arguments[0],d=1,x=arguments.length,E=!1;for(typeof b=="boolean"&&(E=b,b=arguments[1]||{},d=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});d0&&(L1&&arguments[1]!==void 0?arguments[1]:!1;if(D&&(L===0||L>=this.length()-C)){var B=this.clone();return L===0?(this.parent.insertBefore(B,this),this):(this.parent.insertBefore(B,this.next),B)}else{var V=i(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"split",this).call(this,L,D);return this.cache={},V}}}]),P}(h.default.Block);S.blotName="block",S.tagName="P",S.defaultChild="break",S.allowedChildren=[y.default,h.default.Embed,f.default];function R(T){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return T==null||(typeof T.formats=="function"&&(P=(0,l.default)(P,T.formats())),T.parent==null||T.parent.blotName=="scroll"||T.parent.statics.scope!==T.statics.scope)?P:R(T.parent,P)}n.bubbleFormats=R,n.BlockEmbed=k,n.default=S},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},i=function(){function z(F,$){var W=[],G=!0,Q=!1,Z=void 0;try{for(var U=F[Symbol.iterator](),J;!(G=(J=U.next()).done)&&(W.push(J.value),!($&&W.length===$));G=!0);}catch(oe){Q=!0,Z=oe}finally{try{!G&&U.return&&U.return()}finally{if(Q)throw Z}}return W}return function(F,$){if(Array.isArray(F))return F;if(Symbol.iterator in Object(F))return z(F,$);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function z(F,$){for(var W=0;W<$.length;W++){var G=$[W];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(F,G.key,G)}}return function(F,$,W){return $&&z(F.prototype,$),W&&z(F,W),F}}();o(50);var l=o(2),c=R(l),u=o(14),p=R(u),h=o(8),v=R(h),_=o(9),w=R(_),y=o(0),m=R(y),f=o(15),b=R(f),d=o(3),x=R(d),E=o(10),C=R(E),k=o(34),S=R(k);function R(z){return z&&z.__esModule?z:{default:z}}function T(z,F,$){return F in z?Object.defineProperty(z,F,{value:$,enumerable:!0,configurable:!0,writable:!0}):z[F]=$,z}function P(z,F){if(!(z instanceof F))throw new TypeError("Cannot call a class as a function")}var j=(0,C.default)("quill"),L=function(){s(z,null,[{key:"debug",value:function($){$===!0&&($="log"),C.default.level($)}},{key:"find",value:function($){return $.__quill||m.default.find($)}},{key:"import",value:function($){return this.imports[$]==null&&j.error("Cannot import "+$+". Are you sure it was registered?"),this.imports[$]}},{key:"register",value:function($,W){var G=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof $!="string"){var Z=$.attrName||$.blotName;typeof Z=="string"?this.register("formats/"+Z,$,W):Object.keys($).forEach(function(U){G.register(U,$[U],W)})}else this.imports[$]!=null&&!Q&&j.warn("Overwriting "+$+" with",W),this.imports[$]=W,($.startsWith("blots/")||$.startsWith("formats/"))&&W.blotName!=="abstract"?m.default.register(W):$.startsWith("modules")&&typeof W.register=="function"&&W.register()}}]);function z(F){var $=this,W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(P(this,z),this.options=D(F,W),this.container=this.options.container,this.container==null)return j.error("Invalid Quill container",F);this.options.debug&&z.debug(this.options.debug);var G=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new v.default,this.scroll=m.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new p.default(this.scroll),this.selection=new b.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(v.default.events.EDITOR_CHANGE,function(Z){Z===v.default.events.TEXT_CHANGE&&$.root.classList.toggle("ql-blank",$.editor.isBlank())}),this.emitter.on(v.default.events.SCROLL_UPDATE,function(Z,U){var J=$.selection.lastRange,oe=J&&J.length===0?J.index:void 0;B.call($,function(){return $.editor.update(null,U,oe)},Z)});var Q=this.clipboard.convert(`
`+G+"


");this.setContents(Q),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return s(z,[{key:"addContainer",value:function($){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof $=="string"){var G=$;$=document.createElement("div"),$.classList.add(G)}return this.container.insertBefore($,W),$}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function($,W,G){var Q=this,Z=V($,W,G),U=i(Z,4);return $=U[0],W=U[1],G=U[3],B.call(this,function(){return Q.editor.deleteText($,W)},G,$,-1*W)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable($),this.container.classList.toggle("ql-disabled",!$)}},{key:"focus",value:function(){var $=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=$,this.scrollIntoView()}},{key:"format",value:function($,W){var G=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;return B.call(this,function(){var Z=G.getSelection(!0),U=new c.default;if(Z==null)return U;if(m.default.query($,m.default.Scope.BLOCK))U=G.editor.formatLine(Z.index,Z.length,T({},$,W));else{if(Z.length===0)return G.selection.format($,W),U;U=G.editor.formatText(Z.index,Z.length,T({},$,W))}return G.setSelection(Z,v.default.sources.SILENT),U},Q)}},{key:"formatLine",value:function($,W,G,Q,Z){var U=this,J=void 0,oe=V($,W,G,Q,Z),ee=i(oe,4);return $=ee[0],W=ee[1],J=ee[2],Z=ee[3],B.call(this,function(){return U.editor.formatLine($,W,J)},Z,$,0)}},{key:"formatText",value:function($,W,G,Q,Z){var U=this,J=void 0,oe=V($,W,G,Q,Z),ee=i(oe,4);return $=ee[0],W=ee[1],J=ee[2],Z=ee[3],B.call(this,function(){return U.editor.formatText($,W,J)},Z,$,0)}},{key:"getBounds",value:function($){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=void 0;typeof $=="number"?G=this.selection.getBounds($,W):G=this.selection.getBounds($.index,$.length);var Q=this.container.getBoundingClientRect();return{bottom:G.bottom-Q.top,height:G.height,left:G.left-Q.left,right:G.right-Q.left,top:G.top-Q.top,width:G.width}}},{key:"getContents",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-$,G=V($,W),Q=i(G,2);return $=Q[0],W=Q[1],this.editor.getContents($,W)}},{key:"getFormat",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof $=="number"?this.editor.getFormat($,W):this.editor.getFormat($.index,$.length)}},{key:"getIndex",value:function($){return $.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function($){return this.scroll.leaf($)}},{key:"getLine",value:function($){return this.scroll.line($)}},{key:"getLines",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof $!="number"?this.scroll.lines($.index,$.length):this.scroll.lines($,W)}},{key:"getModule",value:function($){return this.theme.modules[$]}},{key:"getSelection",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return $&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-$,G=V($,W),Q=i(G,2);return $=Q[0],W=Q[1],this.editor.getText($,W)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function($,W,G){var Q=this,Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:z.sources.API;return B.call(this,function(){return Q.editor.insertEmbed($,W,G)},Z,$)}},{key:"insertText",value:function($,W,G,Q,Z){var U=this,J=void 0,oe=V($,0,G,Q,Z),ee=i(oe,4);return $=ee[0],J=ee[2],Z=ee[3],B.call(this,function(){return U.editor.insertText($,W,J)},Z,$,W.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function($,W,G){this.clipboard.dangerouslyPasteHTML($,W,G)}},{key:"removeFormat",value:function($,W,G){var Q=this,Z=V($,W,G),U=i(Z,4);return $=U[0],W=U[1],G=U[3],B.call(this,function(){return Q.editor.removeFormat($,W)},G,$)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function($){var W=this,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return B.call(this,function(){$=new c.default($);var Q=W.getLength(),Z=W.editor.deleteText(0,Q),U=W.editor.applyDelta($),J=U.ops[U.ops.length-1];J!=null&&typeof J.insert=="string"&&J.insert[J.insert.length-1]===` -`&&(W.editor.deleteText(W.getLength()-1,1),U.delete(1));var oe=Z.compose(U);return oe},G)}},{key:"setSelection",value:function($,W,G){if($==null)this.selection.setRange(null,W||z.sources.API);else{var Q=V($,W,G),Z=i(Q,4);$=Z[0],W=Z[1],G=Z[3],this.selection.setRange(new f.Range($,W),G),G!==v.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function($){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API,G=new c.default().insert($);return this.setContents(G,W)}},{key:"update",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.default.sources.USER,W=this.scroll.update($);return this.selection.update($),W}},{key:"updateContents",value:function($){var W=this,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return B.call(this,function(){return $=new c.default($),W.editor.applyDelta($,G)},G,!0)}}]),z}();L.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},L.events=v.default.events,L.sources=v.default.sources,L.version="1.3.7",L.imports={delta:c.default,parchment:m.default,"core/module":w.default,"core/theme":S.default};function D(z,F){if(F=(0,x.default)(!0,{container:z,modules:{clipboard:!0,keyboard:!0,history:!0}},F),!F.theme||F.theme===L.DEFAULTS.theme)F.theme=S.default;else if(F.theme=L.import("themes/"+F.theme),F.theme==null)throw new Error("Invalid theme "+F.theme+". Did you register it?");var $=(0,x.default)(!0,{},F.theme.DEFAULTS);[$,F].forEach(function(Q){Q.modules=Q.modules||{},Object.keys(Q.modules).forEach(function(Z){Q.modules[Z]===!0&&(Q.modules[Z]={})})});var W=Object.keys($.modules).concat(Object.keys(F.modules)),G=W.reduce(function(Q,Z){var U=L.import("modules/"+Z);return U==null?j.error("Cannot load "+Z+" module. Are you sure you registered it?"):Q[Z]=U.DEFAULTS||{},Q},{});return F.modules!=null&&F.modules.toolbar&&F.modules.toolbar.constructor!==Object&&(F.modules.toolbar={container:F.modules.toolbar}),F=(0,x.default)(!0,{},L.DEFAULTS,{modules:G},$,F),["bounds","container","scrollingContainer"].forEach(function(Q){typeof F[Q]=="string"&&(F[Q]=document.querySelector(F[Q]))}),F.modules=Object.keys(F.modules).reduce(function(Q,Z){return F.modules[Z]&&(Q[Z]=F.modules[Z]),Q},{}),F}function B(z,F,$,W){if(this.options.strict&&!this.isEnabled()&&F===v.default.sources.USER)return new c.default;var G=$==null?null:this.getSelection(),Q=this.editor.delta,Z=z();if(G!=null&&($===!0&&($=G.index),W==null?G=q(G,Z,F):W!==0&&(G=q(G,$,W,F)),this.setSelection(G,v.default.sources.SILENT)),Z.length()>0){var U,J=[v.default.events.TEXT_CHANGE,Z,Q,F];if((U=this.emitter).emit.apply(U,[v.default.events.EDITOR_CHANGE].concat(J)),F!==v.default.sources.SILENT){var oe;(oe=this.emitter).emit.apply(oe,J)}}return Z}function V(z,F,$,W,G){var Q={};return typeof z.index=="number"&&typeof z.length=="number"?typeof F!="number"?(G=W,W=$,$=F,F=z.length,z=z.index):(F=z.length,z=z.index):typeof F!="number"&&(G=W,W=$,$=F,F=0),(typeof $>"u"?"undefined":a($))==="object"?(Q=$,G=W):typeof $=="string"&&(W!=null?Q[$]=W:G=$),G=G||v.default.sources.API,[z,F,Q,G]}function q(z,F,$,W){if(z==null)return null;var G=void 0,Q=void 0;if(F instanceof c.default){var Z=[z.index,z.index+z.length].map(function(ee){return F.transformPosition(ee,W!==v.default.sources.USER)}),U=i(Z,2);G=U[0],Q=U[1]}else{var J=[z.index,z.index+z.length].map(function(ee){return ee=0?ee+$:Math.max(F,ee+$)}),oe=i(J,2);G=oe[0],Q=oe[1]}return new f.Range(G,Q-G)}n.expandConfig=D,n.overload=V,n.default=L},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(m,f){for(var b=0;b0){var d=this.parent.isolate(this.offset(),this.length());this.moveChildren(d),d.wrap(this)}}}],[{key:"compare",value:function(b,d){var x=m.order.indexOf(b),E=m.order.indexOf(d);return x>=0||E>=0?x-E:b===d?0:b1?E-1:0),k=1;k1&&arguments[1]!==void 0?arguments[1]:{};a(this,s),this.quill=l,this.options=c};i.DEFAULTS={},n.default=i},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=["error","warn","log","info"],i="warn";function s(c){if(a.indexOf(c)<=a.indexOf(i)){for(var u,p=arguments.length,h=Array(p>1?p-1:0),v=1;v0&&typeof h[0]!="number")}function p(h,v,_){var w,y;if(c(h)||c(v)||h.prototype!==v.prototype)return!1;if(s(h))return s(v)?(h=a.call(h),v=a.call(v),l(h,v,_)):!1;if(u(h)){if(!u(v)||h.length!==v.length)return!1;for(w=0;w=0;w--)if(m[w]!=f[w])return!1;for(w=m.length-1;w>=0;w--)if(y=m[w],!l(h[y],v[y],_))return!1;return typeof h==typeof v}},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=o(1),i=function(){function s(l,c,u){u===void 0&&(u={}),this.attrName=l,this.keyName=c;var p=a.Scope.TYPE&a.Scope.ATTRIBUTE;u.scope!=null?this.scope=u.scope&a.Scope.LEVEL|p:this.scope=a.Scope.ATTRIBUTE,u.whitelist!=null&&(this.whitelist=u.whitelist)}return s.keys=function(l){return[].map.call(l.attributes,function(c){return c.name})},s.prototype.add=function(l,c){return this.canAdd(l,c)?(l.setAttribute(this.keyName,c),!0):!1},s.prototype.canAdd=function(l,c){var u=a.query(l,a.Scope.BLOT&(this.scope|a.Scope.TYPE));return u==null?!1:this.whitelist==null?!0:typeof c=="string"?this.whitelist.indexOf(c.replace(/["']/g,""))>-1:this.whitelist.indexOf(c)>-1},s.prototype.remove=function(l){l.removeAttribute(this.keyName)},s.prototype.value=function(l){var c=l.getAttribute(this.keyName);return this.canAdd(l,c)&&c?c:""},s}();n.default=i},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var a=function(){function k(S,R){var T=[],P=!0,j=!1,L=void 0;try{for(var D=S[Symbol.iterator](),B;!(P=(B=D.next()).done)&&(T.push(B.value),!(R&&T.length===R));P=!0);}catch(V){j=!0,L=V}finally{try{!P&&D.return&&D.return()}finally{if(j)throw L}}return T}return function(S,R){if(Array.isArray(S))return S;if(Symbol.iterator in Object(S))return k(S,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function k(S,R){for(var T=0;T=T+P)){var B=this.newlineIndex(T,!0)+1,V=D-B+1,q=this.isolate(B,V),z=q.next;q.format(j,L),z instanceof S&&z.formatAt(0,T-B+P-V,j,L)}}}},{key:"insertAt",value:function(T,P,j){if(j==null){var L=this.descendant(m.default,T),D=a(L,2),B=D[0],V=D[1];B.insertAt(V,P)}}},{key:"length",value:function(){var T=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` -`)?T:T+1}},{key:"newlineIndex",value:function(T){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(P)return this.domNode.textContent.slice(0,T).lastIndexOf(` -`);var j=this.domNode.textContent.slice(T).indexOf(` -`);return j>-1?T+j:-1}},{key:"optimize",value:function(T){this.domNode.textContent.endsWith(` -`)||this.appendChild(p.default.create("text",` -`)),s(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,T);var P=this.next;P!=null&&P.prev===this&&P.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===P.statics.formats(P.domNode)&&(P.optimize(T),P.moveChildren(this),P.remove())}},{key:"replace",value:function(T){s(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replace",this).call(this,T),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(P){var j=p.default.find(P);j==null?P.parentNode.removeChild(P):j instanceof p.default.Embed?j.remove():j.unwrap()})}}],[{key:"create",value:function(T){var P=s(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,T);return P.setAttribute("spellcheck",!1),P}},{key:"formats",value:function(){return!0}}]),S}(v.default);C.blotName="code-block",C.tagName="PRE",C.TAB=" ",n.Code=E,n.default=C},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},i=function(){function z(F,$){var W=[],G=!0,Q=!1,Z=void 0;try{for(var U=F[Symbol.iterator](),J;!(G=(J=U.next()).done)&&(W.push(J.value),!($&&W.length===$));G=!0);}catch(oe){Q=!0,Z=oe}finally{try{!G&&U.return&&U.return()}finally{if(Q)throw Z}}return W}return function(F,$){if(Array.isArray(F))return F;if(Symbol.iterator in Object(F))return z(F,$);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function z(F,$){for(var W=0;W<$.length;W++){var G=$[W];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(F,G.key,G)}}return function(F,$,W){return $&&z(F.prototype,$),W&&z(F,W),F}}(),l=o(2),c=P(l),u=o(20),p=P(u),h=o(0),v=P(h),_=o(13),w=P(_),y=o(24),m=P(y),f=o(4),b=P(f),d=o(16),x=P(d),E=o(21),C=P(E),k=o(11),S=P(k),R=o(3),T=P(R);function P(z){return z&&z.__esModule?z:{default:z}}function j(z,F,$){return F in z?Object.defineProperty(z,F,{value:$,enumerable:!0,configurable:!0,writable:!0}):z[F]=$,z}function L(z,F){if(!(z instanceof F))throw new TypeError("Cannot call a class as a function")}var D=/^[ -~]*$/,B=function(){function z(F){L(this,z),this.scroll=F,this.delta=this.getDelta()}return s(z,[{key:"applyDelta",value:function($){var W=this,G=!1;this.scroll.update();var Q=this.scroll.length();return this.scroll.batchStart(),$=q($),$.reduce(function(Z,U){var J=U.retain||U.delete||U.insert.length||1,oe=U.attributes||{};if(U.insert!=null){if(typeof U.insert=="string"){var ee=U.insert;ee.endsWith(` -`)&&G&&(G=!1,ee=ee.slice(0,-1)),Z>=Q&&!ee.endsWith(` -`)&&(G=!0),W.scroll.insertAt(Z,ee);var ie=W.scroll.line(Z),ce=i(ie,2),ye=ce[0],Ce=ce[1],Se=(0,T.default)({},(0,f.bubbleFormats)(ye));if(ye instanceof b.default){var Re=ye.descendant(v.default.Leaf,Ce),Te=i(Re,1),je=Te[0];Se=(0,T.default)(Se,(0,f.bubbleFormats)(je))}oe=p.default.attributes.diff(Se,oe)||{}}else if(a(U.insert)==="object"){var pe=Object.keys(U.insert)[0];if(pe==null)return Z;W.scroll.insertAt(Z,pe,U.insert[pe])}Q+=J}return Object.keys(oe).forEach(function(ve){W.scroll.formatAt(Z,J,ve,oe[ve])}),Z+J},0),$.reduce(function(Z,U){return typeof U.delete=="number"?(W.scroll.deleteAt(Z,U.delete),Z):Z+(U.retain||U.insert.length||1)},0),this.scroll.batchEnd(),this.update($)}},{key:"deleteText",value:function($,W){return this.scroll.deleteAt($,W),this.update(new c.default().retain($).delete(W))}},{key:"formatLine",value:function($,W){var G=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(Q).forEach(function(Z){if(!(G.scroll.whitelist!=null&&!G.scroll.whitelist[Z])){var U=G.scroll.lines($,Math.max(W,1)),J=W;U.forEach(function(oe){var ee=oe.length();if(!(oe instanceof w.default))oe.format(Z,Q[Z]);else{var ie=$-oe.offset(G.scroll),ce=oe.newlineIndex(ie+J)-ie+1;oe.formatAt(ie,ce,Z,Q[Z])}J-=ee})}}),this.scroll.optimize(),this.update(new c.default().retain($).retain(W,(0,C.default)(Q)))}},{key:"formatText",value:function($,W){var G=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(Q).forEach(function(Z){G.scroll.formatAt($,W,Z,Q[Z])}),this.update(new c.default().retain($).retain(W,(0,C.default)(Q)))}},{key:"getContents",value:function($,W){return this.delta.slice($,$+W)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function($,W){return $.concat(W.delta())},new c.default)}},{key:"getFormat",value:function($){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=[],Q=[];W===0?this.scroll.path($).forEach(function(U){var J=i(U,1),oe=J[0];oe instanceof b.default?G.push(oe):oe instanceof v.default.Leaf&&Q.push(oe)}):(G=this.scroll.lines($,W),Q=this.scroll.descendants(v.default.Leaf,$,W));var Z=[G,Q].map(function(U){if(U.length===0)return{};for(var J=(0,f.bubbleFormats)(U.shift());Object.keys(J).length>0;){var oe=U.shift();if(oe==null)return J;J=V((0,f.bubbleFormats)(oe),J)}return J});return T.default.apply(T.default,Z)}},{key:"getText",value:function($,W){return this.getContents($,W).filter(function(G){return typeof G.insert=="string"}).map(function(G){return G.insert}).join("")}},{key:"insertEmbed",value:function($,W,G){return this.scroll.insertAt($,W,G),this.update(new c.default().retain($).insert(j({},W,G)))}},{key:"insertText",value:function($,W){var G=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return W=W.replace(/\r\n/g,` -`).replace(/\r/g,` -`),this.scroll.insertAt($,W),Object.keys(Q).forEach(function(Z){G.scroll.formatAt($,W.length,Z,Q[Z])}),this.update(new c.default().retain($).insert(W,(0,C.default)(Q)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var $=this.scroll.children.head;return $.statics.blotName!==b.default.blotName||$.children.length>1?!1:$.children.head instanceof x.default}},{key:"removeFormat",value:function($,W){var G=this.getText($,W),Q=this.scroll.line($+W),Z=i(Q,2),U=Z[0],J=Z[1],oe=0,ee=new c.default;U!=null&&(U instanceof w.default?oe=U.newlineIndex(J)-J+1:oe=U.length()-J,ee=U.delta().slice(J,J+oe-1).insert(` -`));var ie=this.getContents($,W+oe),ce=ie.diff(new c.default().insert(G).concat(ee)),ye=new c.default().retain($).concat(ce);return this.applyDelta(ye)}},{key:"update",value:function($){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Q=this.delta;if(W.length===1&&W[0].type==="characterData"&&W[0].target.data.match(D)&&v.default.find(W[0].target)){var Z=v.default.find(W[0].target),U=(0,f.bubbleFormats)(Z),J=Z.offset(this.scroll),oe=W[0].oldValue.replace(m.default.CONTENTS,""),ee=new c.default().insert(oe),ie=new c.default().insert(Z.value()),ce=new c.default().retain(J).concat(ee.diff(ie,G));$=ce.reduce(function(ye,Ce){return Ce.insert?ye.insert(Ce.insert,U):ye.push(Ce)},new c.default),this.delta=Q.compose($)}else this.delta=this.getDelta(),(!$||!(0,S.default)(Q.compose($),this.delta))&&($=Q.diff(this.delta,G));return $}}]),z}();function V(z,F){return Object.keys(F).reduce(function($,W){return z[W]==null||(F[W]===z[W]?$[W]=F[W]:Array.isArray(F[W])?F[W].indexOf(z[W])<0&&($[W]=F[W].concat([z[W]])):$[W]=[F[W],z[W]]),$},{})}function q(z){return z.reduce(function(F,$){if($.insert===1){var W=(0,C.default)($.attributes);return delete W.image,F.insert({image:$.attributes.image},W)}if($.attributes!=null&&($.attributes.list===!0||$.attributes.bullet===!0)&&($=(0,C.default)($),$.attributes.list?$.attributes.list="ordered":($.attributes.list="bullet",delete $.attributes.bullet)),typeof $.insert=="string"){var G=$.insert.replace(/\r\n/g,` -`).replace(/\r/g,` -`);return F.insert(G,$.attributes)}return F.push($)},new c.default)}n.default=B},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var a=function(){function k(S,R){var T=[],P=!0,j=!1,L=void 0;try{for(var D=S[Symbol.iterator](),B;!(P=(B=D.next()).done)&&(T.push(B.value),!(R&&T.length===R));P=!0);}catch(V){j=!0,L=V}finally{try{!P&&D.return&&D.return()}finally{if(j)throw L}}return T}return function(S,R){if(Array.isArray(S))return S;if(Symbol.iterator in Object(S))return k(S,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function k(S,R){for(var T=0;T1&&arguments[1]!==void 0?arguments[1]:0;b(this,k),this.index=S,this.length=R},E=function(){function k(S,R){var T=this;b(this,k),this.emitter=R,this.scroll=S,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=l.default.create("cursor",this),this.lastRange=this.savedRange=new x(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){T.mouseDown||setTimeout(T.update.bind(T,_.default.sources.USER),1)}),this.emitter.on(_.default.events.EDITOR_CHANGE,function(P,j){P===_.default.events.TEXT_CHANGE&&j.length()>0&&T.update(_.default.sources.SILENT)}),this.emitter.on(_.default.events.SCROLL_BEFORE_UPDATE,function(){if(T.hasFocus()){var P=T.getNativeRange();P!=null&&P.start.node!==T.cursor.textNode&&T.emitter.once(_.default.events.SCROLL_UPDATE,function(){try{T.setNativeRange(P.start.node,P.start.offset,P.end.node,P.end.offset)}catch{}})}}),this.emitter.on(_.default.events.SCROLL_OPTIMIZE,function(P,j){if(j.range){var L=j.range,D=L.startNode,B=L.startOffset,V=L.endNode,q=L.endOffset;T.setNativeRange(D,B,V,q)}}),this.update(_.default.sources.SILENT)}return i(k,[{key:"handleComposition",value:function(){var R=this;this.root.addEventListener("compositionstart",function(){R.composing=!0}),this.root.addEventListener("compositionend",function(){if(R.composing=!1,R.cursor.parent){var T=R.cursor.restore();if(!T)return;setTimeout(function(){R.setNativeRange(T.startNode,T.startOffset,T.endNode,T.endOffset)},1)}})}},{key:"handleDragging",value:function(){var R=this;this.emitter.listenDOM("mousedown",document.body,function(){R.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){R.mouseDown=!1,R.update(_.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(R,T){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[R])){this.scroll.update();var P=this.getNativeRange();if(!(P==null||!P.native.collapsed||l.default.query(R,l.default.Scope.BLOCK))){if(P.start.node!==this.cursor.textNode){var j=l.default.find(P.start.node,!1);if(j==null)return;if(j instanceof l.default.Leaf){var L=j.split(P.start.offset);j.parent.insertBefore(this.cursor,L)}else j.insertBefore(this.cursor,P.start.node);this.cursor.attach()}this.cursor.format(R,T),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(R){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,P=this.scroll.length();R=Math.min(R,P-1),T=Math.min(R+T,P-1)-R;var j=void 0,L=this.scroll.leaf(R),D=a(L,2),B=D[0],V=D[1];if(B==null)return null;var q=B.position(V,!0),z=a(q,2);j=z[0],V=z[1];var F=document.createRange();if(T>0){F.setStart(j,V);var $=this.scroll.leaf(R+T),W=a($,2);if(B=W[0],V=W[1],B==null)return null;var G=B.position(V,!0),Q=a(G,2);return j=Q[0],V=Q[1],F.setEnd(j,V),F.getBoundingClientRect()}else{var Z="left",U=void 0;return j instanceof Text?(V0&&(Z="right")),{bottom:U.top+U.height,height:U.height,left:U[Z],right:U[Z],top:U.top,width:0}}}},{key:"getNativeRange",value:function(){var R=document.getSelection();if(R==null||R.rangeCount<=0)return null;var T=R.getRangeAt(0);if(T==null)return null;var P=this.normalizeNative(T);return d.info("getNativeRange",P),P}},{key:"getRange",value:function(){var R=this.getNativeRange();if(R==null)return[null,null];var T=this.normalizedToRange(R);return[T,R]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(R){var T=this,P=[[R.start.node,R.start.offset]];R.native.collapsed||P.push([R.end.node,R.end.offset]);var j=P.map(function(B){var V=a(B,2),q=V[0],z=V[1],F=l.default.find(q,!0),$=F.offset(T.scroll);return z===0?$:F instanceof l.default.Container?$+F.length():$+F.index(q,z)}),L=Math.min(Math.max.apply(Math,f(j)),this.scroll.length()-1),D=Math.min.apply(Math,[L].concat(f(j)));return new x(D,L-D)}},{key:"normalizeNative",value:function(R){if(!C(this.root,R.startContainer)||!R.collapsed&&!C(this.root,R.endContainer))return null;var T={start:{node:R.startContainer,offset:R.startOffset},end:{node:R.endContainer,offset:R.endOffset},native:R};return[T.start,T.end].forEach(function(P){for(var j=P.node,L=P.offset;!(j instanceof Text)&&j.childNodes.length>0;)if(j.childNodes.length>L)j=j.childNodes[L],L=0;else if(j.childNodes.length===L)j=j.lastChild,L=j instanceof Text?j.data.length:j.childNodes.length+1;else break;P.node=j,P.offset=L}),T}},{key:"rangeToNative",value:function(R){var T=this,P=R.collapsed?[R.index]:[R.index,R.index+R.length],j=[],L=this.scroll.length();return P.forEach(function(D,B){D=Math.min(L-1,D);var V=void 0,q=T.scroll.leaf(D),z=a(q,2),F=z[0],$=z[1],W=F.position($,B!==0),G=a(W,2);V=G[0],$=G[1],j.push(V,$)}),j.length<2&&(j=j.concat(j)),j}},{key:"scrollIntoView",value:function(R){var T=this.lastRange;if(T!=null){var P=this.getBounds(T.index,T.length);if(P!=null){var j=this.scroll.length()-1,L=this.scroll.line(Math.min(T.index,j)),D=a(L,1),B=D[0],V=B;if(T.length>0){var q=this.scroll.line(Math.min(T.index+T.length,j)),z=a(q,1);V=z[0]}if(!(B==null||V==null)){var F=R.getBoundingClientRect();P.topF.bottom&&(R.scrollTop+=P.bottom-F.bottom)}}}}},{key:"setNativeRange",value:function(R,T){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:R,j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:T,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(d.info("setNativeRange",R,T,P,j),!(R!=null&&(this.root.parentNode==null||R.parentNode==null||P.parentNode==null))){var D=document.getSelection();if(D!=null)if(R!=null){this.hasFocus()||this.root.focus();var B=(this.getNativeRange()||{}).native;if(B==null||L||R!==B.startContainer||T!==B.startOffset||P!==B.endContainer||j!==B.endOffset){R.tagName=="BR"&&(T=[].indexOf.call(R.parentNode.childNodes,R),R=R.parentNode),P.tagName=="BR"&&(j=[].indexOf.call(P.parentNode.childNodes,P),P=P.parentNode);var V=document.createRange();V.setStart(R,T),V.setEnd(P,j),D.removeAllRanges(),D.addRange(V)}}else D.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(R){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_.default.sources.API;if(typeof T=="string"&&(P=T,T=!1),d.info("setRange",R),R!=null){var j=this.rangeToNative(R);this.setNativeRange.apply(this,f(j).concat([T]))}else this.setNativeRange(null);this.update(P)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_.default.sources.USER,T=this.lastRange,P=this.getRange(),j=a(P,2),L=j[0],D=j[1];if(this.lastRange=L,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,h.default)(T,this.lastRange)){var B;!this.composing&&D!=null&&D.native.collapsed&&D.start.node!==this.cursor.textNode&&this.cursor.restore();var V=[_.default.events.SELECTION_CHANGE,(0,u.default)(this.lastRange),(0,u.default)(T),R];if((B=this.emitter).emit.apply(B,[_.default.events.EDITOR_CHANGE].concat(V)),R!==_.default.sources.SILENT){var q;(q=this.emitter).emit.apply(q,V)}}}}]),k}();function C(k,S){try{S.parentNode}catch{return!1}return S instanceof Text&&(S=S.parentNode),k.contains(S)}n.Range=x,n.default=E},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function _(w,y){for(var m=0;m0&&(v+=1),[this.parent.domNode,v]},u.prototype.value=function(){var p;return p={},p[this.statics.blotName]=this.statics.value(this.domNode)||!0,p},u.scope=s.Scope.INLINE_BLOT,u}(i.default);n.default=l},function(r,n,o){var a=o(11),i=o(3),s={attributes:{compose:function(c,u,p){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});var h=i(!0,{},u);p||(h=Object.keys(h).reduce(function(_,w){return h[w]!=null&&(_[w]=h[w]),_},{}));for(var v in c)c[v]!==void 0&&u[v]===void 0&&(h[v]=c[v]);return Object.keys(h).length>0?h:void 0},diff:function(c,u){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});var p=Object.keys(c).concat(Object.keys(u)).reduce(function(h,v){return a(c[v],u[v])||(h[v]=u[v]===void 0?null:u[v]),h},{});return Object.keys(p).length>0?p:void 0},transform:function(c,u,p){if(typeof c!="object")return u;if(typeof u=="object"){if(!p)return u;var h=Object.keys(u).reduce(function(v,_){return c[_]===void 0&&(v[_]=u[_]),v},{});return Object.keys(h).length>0?h:void 0}}},iterator:function(c){return new l(c)},length:function(c){return typeof c.delete=="number"?c.delete:typeof c.retain=="number"?c.retain:typeof c.insert=="string"?c.insert.length:1}};function l(c){this.ops=c,this.index=0,this.offset=0}l.prototype.hasNext=function(){return this.peekLength()<1/0},l.prototype.next=function(c){c||(c=1/0);var u=this.ops[this.index];if(u){var p=this.offset,h=s.length(u);if(c>=h-p?(c=h-p,this.index+=1,this.offset=0):this.offset+=c,typeof u.delete=="number")return{delete:c};var v={};return u.attributes&&(v.attributes=u.attributes),typeof u.retain=="number"?v.retain=c:typeof u.insert=="string"?v.insert=u.insert.substr(p,c):v.insert=u.insert,v}else return{retain:1/0}},l.prototype.peek=function(){return this.ops[this.index]},l.prototype.peekLength=function(){return this.ops[this.index]?s.length(this.ops[this.index])-this.offset:1/0},l.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},l.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var c=this.offset,u=this.index,p=this.next(),h=this.ops.slice(this.index);return this.offset=c,this.index=u,[p].concat(h)}else return[]},r.exports=s},function(r,n){var o=function(){function a(w,y){return y!=null&&w instanceof y}var i;try{i=Map}catch{i=function(){}}var s;try{s=Set}catch{s=function(){}}var l;try{l=Promise}catch{l=function(){}}function c(w,y,m,f,b){typeof y=="object"&&(m=y.depth,f=y.prototype,b=y.includeNonEnumerable,y=y.circular);var d=[],x=[],E=typeof Buffer<"u";typeof y>"u"&&(y=!0),typeof m>"u"&&(m=1/0);function C(k,S){if(k===null)return null;if(S===0)return k;var R,T;if(typeof k!="object")return k;if(a(k,i))R=new i;else if(a(k,s))R=new s;else if(a(k,l))R=new l(function(F,$){k.then(function(W){F(C(W,S-1))},function(W){$(C(W,S-1))})});else if(c.__isArray(k))R=[];else if(c.__isRegExp(k))R=new RegExp(k.source,_(k)),k.lastIndex&&(R.lastIndex=k.lastIndex);else if(c.__isDate(k))R=new Date(k.getTime());else{if(E&&Buffer.isBuffer(k))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(k.length):R=new Buffer(k.length),k.copy(R),R;a(k,Error)?R=Object.create(k):typeof f>"u"?(T=Object.getPrototypeOf(k),R=Object.create(T)):(R=Object.create(f),T=f)}if(y){var P=d.indexOf(k);if(P!=-1)return x[P];d.push(k),x.push(R)}a(k,i)&&k.forEach(function(F,$){var W=C($,S-1),G=C(F,S-1);R.set(W,G)}),a(k,s)&&k.forEach(function(F){var $=C(F,S-1);R.add($)});for(var j in k){var L;T&&(L=Object.getOwnPropertyDescriptor(T,j)),!(L&&L.set==null)&&(R[j]=C(k[j],S-1))}if(Object.getOwnPropertySymbols)for(var D=Object.getOwnPropertySymbols(k),j=0;j0){if(V instanceof h.BlockEmbed||$ instanceof h.BlockEmbed){this.optimize();return}if(V instanceof m.default){var W=V.newlineIndex(V.length(),!0);if(W>-1&&(V=V.split(W+1),V===$)){this.optimize();return}}else if($ instanceof m.default){var G=$.newlineIndex(0);G>-1&&$.split(G+1)}var Q=$.children.head instanceof w.default?null:$.children.head;V.moveChildren($,Q),V.remove()}this.optimize()}},{key:"enable",value:function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",j)}},{key:"formatAt",value:function(j,L,D,B){this.whitelist!=null&&!this.whitelist[D]||(s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"formatAt",this).call(this,j,L,D,B),this.optimize())}},{key:"insertAt",value:function(j,L,D){if(!(D!=null&&this.whitelist!=null&&!this.whitelist[L])){if(j>=this.length())if(D==null||c.default.query(L,c.default.Scope.BLOCK)==null){var B=c.default.create(this.statics.defaultChild);this.appendChild(B),D==null&&L.endsWith(` -`)&&(L=L.slice(0,-1)),B.insertAt(0,L,D)}else{var V=c.default.create(L,D);this.appendChild(V)}else s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"insertAt",this).call(this,j,L,D);this.optimize()}}},{key:"insertBefore",value:function(j,L){if(j.statics.scope===c.default.Scope.INLINE_BLOT){var D=c.default.create(this.statics.defaultChild);D.appendChild(j),j=D}s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"insertBefore",this).call(this,j,L)}},{key:"leaf",value:function(j){return this.path(j).pop()||[null,-1]}},{key:"line",value:function(j){return j===this.length()?this.line(j-1):this.descendant(k,j)}},{key:"lines",value:function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,D=function B(V,q,z){var F=[],$=z;return V.children.forEachAt(q,z,function(W,G,Q){k(W)?F.push(W):W instanceof c.default.Container&&(F=F.concat(B(W,G,$))),$-=Q}),F};return D(this,j,L)}},{key:"optimize",value:function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"optimize",this).call(this,j,L),j.length>0&&this.emitter.emit(p.default.events.SCROLL_OPTIMIZE,j,L))}},{key:"path",value:function(j){return s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"path",this).call(this,j).slice(1)}},{key:"update",value:function(j){if(this.batch!==!0){var L=p.default.sources.USER;typeof j=="string"&&(L=j),Array.isArray(j)||(j=this.observer.takeRecords()),j.length>0&&this.emitter.emit(p.default.events.SCROLL_BEFORE_UPDATE,L,j),s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"update",this).call(this,j.concat([])),j.length>0&&this.emitter.emit(p.default.events.SCROLL_UPDATE,L,j)}}}]),T}(c.default.Scroll);S.blotName="scroll",S.className="ql-editor",S.tagName="DIV",S.defaultChild="block",S.allowedChildren=[v.default,h.BlockEmbed,b.default],n.default=S},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},i=function(){function U(J,oe){var ee=[],ie=!0,ce=!1,ye=void 0;try{for(var Ce=J[Symbol.iterator](),Se;!(ie=(Se=Ce.next()).done)&&(ee.push(Se.value),!(oe&&ee.length===oe));ie=!0);}catch(Re){ce=!0,ye=Re}finally{try{!ie&&Ce.return&&Ce.return()}finally{if(ce)throw ye}}return ee}return function(J,oe){if(Array.isArray(J))return J;if(Symbol.iterator in Object(J))return U(J,oe);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function U(J,oe){for(var ee=0;ee1&&arguments[1]!==void 0?arguments[1]:{},ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ye=Z(ee);if(ye==null||ye.key==null)return D.warn("Attempted to add invalid keyboard binding",ye);typeof ie=="function"&&(ie={handler:ie}),typeof ce=="function"&&(ce={handler:ce}),ye=(0,v.default)(ye,ie,ce),this.bindings[ye.key]=this.bindings[ye.key]||[],this.bindings[ye.key].push(ye)}},{key:"listen",value:function(){var ee=this;this.quill.root.addEventListener("keydown",function(ie){if(!ie.defaultPrevented){var ce=ie.which||ie.keyCode,ye=(ee.bindings[ce]||[]).filter(function(Rt){return J.match(ie,Rt)});if(ye.length!==0){var Ce=ee.quill.getSelection();if(!(Ce==null||!ee.quill.hasFocus())){var Se=ee.quill.getLine(Ce.index),Re=i(Se,2),Te=Re[0],je=Re[1],pe=ee.quill.getLeaf(Ce.index),ve=i(pe,2),Oe=ve[0],Ae=ve[1],se=Ce.length===0?[Oe,Ae]:ee.quill.getLeaf(Ce.index+Ce.length),we=i(se,2),xe=we[0],_e=we[1],ze=Oe instanceof b.default.Text?Oe.value().slice(0,Ae):"",et=xe instanceof b.default.Text?xe.value().slice(_e):"",We={collapsed:Ce.length===0,empty:Ce.length===0&&Te.length()<=1,format:ee.quill.getFormat(Ce),offset:je,prefix:ze,suffix:et},Ar=ye.some(function(Rt){if(Rt.collapsed!=null&&Rt.collapsed!==We.collapsed||Rt.empty!=null&&Rt.empty!==We.empty||Rt.offset!=null&&Rt.offset!==We.offset)return!1;if(Array.isArray(Rt.format)){if(Rt.format.every(function(Pt){return We.format[Pt]==null}))return!1}else if(a(Rt.format)==="object"&&!Object.keys(Rt.format).every(function(Pt){return Rt.format[Pt]===!0?We.format[Pt]!=null:Rt.format[Pt]===!1?We.format[Pt]==null:(0,p.default)(Rt.format[Pt],We.format[Pt])}))return!1;return Rt.prefix!=null&&!Rt.prefix.test(We.prefix)||Rt.suffix!=null&&!Rt.suffix.test(We.suffix)?!1:Rt.handler.call(ee,Ce,We)!==!0});Ar&&ie.preventDefault()}}}})}}]),J}(S.default);V.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},V.DEFAULTS={bindings:{bold:Q("bold"),italic:Q("italic"),underline:Q("underline"),indent:{key:V.keys.TAB,format:["blockquote","indent","list"],handler:function(J,oe){if(oe.collapsed&&oe.offset!==0)return!0;this.quill.format("indent","+1",x.default.sources.USER)}},outdent:{key:V.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(J,oe){if(oe.collapsed&&oe.offset!==0)return!0;this.quill.format("indent","-1",x.default.sources.USER)}},"outdent backspace":{key:V.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(J,oe){oe.format.indent!=null?this.quill.format("indent","-1",x.default.sources.USER):oe.format.list!=null&&this.quill.format("list",!1,x.default.sources.USER)}},"indent code-block":G(!0),"outdent code-block":G(!1),"remove tab":{key:V.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(J){this.quill.deleteText(J.index-1,1,x.default.sources.USER)}},tab:{key:V.keys.TAB,handler:function(J){this.quill.history.cutoff();var oe=new w.default().retain(J.index).delete(J.length).insert(" ");this.quill.updateContents(oe,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(J.index+1,x.default.sources.SILENT)}},"list empty enter":{key:V.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(J,oe){this.quill.format("list",!1,x.default.sources.USER),oe.format.indent&&this.quill.format("indent",!1,x.default.sources.USER)}},"checklist enter":{key:V.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(J){var oe=this.quill.getLine(J.index),ee=i(oe,2),ie=ee[0],ce=ee[1],ye=(0,v.default)({},ie.formats(),{list:"checked"}),Ce=new w.default().retain(J.index).insert(` -`,ye).retain(ie.length()-ce-1).retain(1,{list:"unchecked"});this.quill.updateContents(Ce,x.default.sources.USER),this.quill.setSelection(J.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:V.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(J,oe){var ee=this.quill.getLine(J.index),ie=i(ee,2),ce=ie[0],ye=ie[1],Ce=new w.default().retain(J.index).insert(` -`,oe.format).retain(ce.length()-ye-1).retain(1,{header:null});this.quill.updateContents(Ce,x.default.sources.USER),this.quill.setSelection(J.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(J,oe){var ee=oe.prefix.length,ie=this.quill.getLine(J.index),ce=i(ie,2),ye=ce[0],Ce=ce[1];if(Ce>ee)return!0;var Se=void 0;switch(oe.prefix.trim()){case"[]":case"[ ]":Se="unchecked";break;case"[x]":Se="checked";break;case"-":case"*":Se="bullet";break;default:Se="ordered"}this.quill.insertText(J.index," ",x.default.sources.USER),this.quill.history.cutoff();var Re=new w.default().retain(J.index-Ce).delete(ee+1).retain(ye.length()-2-Ce).retain(1,{list:Se});this.quill.updateContents(Re,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(J.index-ee,x.default.sources.SILENT)}},"code exit":{key:V.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(J){var oe=this.quill.getLine(J.index),ee=i(oe,2),ie=ee[0],ce=ee[1],ye=new w.default().retain(J.index+ie.length()-ce-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ye,x.default.sources.USER)}},"embed left":q(V.keys.LEFT,!1),"embed left shift":q(V.keys.LEFT,!0),"embed right":q(V.keys.RIGHT,!1),"embed right shift":q(V.keys.RIGHT,!0)}};function q(U,J){var oe,ee=U===V.keys.LEFT?"prefix":"suffix";return oe={key:U,shiftKey:J,altKey:null},T(oe,ee,/^$/),T(oe,"handler",function(ce){var ye=ce.index;U===V.keys.RIGHT&&(ye+=ce.length+1);var Ce=this.quill.getLeaf(ye),Se=i(Ce,1),Re=Se[0];return Re instanceof b.default.Embed?(U===V.keys.LEFT?J?this.quill.setSelection(ce.index-1,ce.length+1,x.default.sources.USER):this.quill.setSelection(ce.index-1,x.default.sources.USER):J?this.quill.setSelection(ce.index,ce.length+1,x.default.sources.USER):this.quill.setSelection(ce.index+ce.length+1,x.default.sources.USER),!1):!0}),oe}function z(U,J){if(!(U.index===0||this.quill.getLength()<=1)){var oe=this.quill.getLine(U.index),ee=i(oe,1),ie=ee[0],ce={};if(J.offset===0){var ye=this.quill.getLine(U.index-1),Ce=i(ye,1),Se=Ce[0];if(Se!=null&&Se.length()>1){var Re=ie.formats(),Te=this.quill.getFormat(U.index-1,1);ce=m.default.attributes.diff(Re,Te)||{}}}var je=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(J.prefix)?2:1;this.quill.deleteText(U.index-je,je,x.default.sources.USER),Object.keys(ce).length>0&&this.quill.formatLine(U.index-je,je,ce,x.default.sources.USER),this.quill.focus()}}function F(U,J){var oe=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(J.suffix)?2:1;if(!(U.index>=this.quill.getLength()-oe)){var ee={},ie=0,ce=this.quill.getLine(U.index),ye=i(ce,1),Ce=ye[0];if(J.offset>=Ce.length()-1){var Se=this.quill.getLine(U.index+1),Re=i(Se,1),Te=Re[0];if(Te){var je=Ce.formats(),pe=this.quill.getFormat(U.index,1);ee=m.default.attributes.diff(je,pe)||{},ie=Te.length()}}this.quill.deleteText(U.index,oe,x.default.sources.USER),Object.keys(ee).length>0&&this.quill.formatLine(U.index+ie-1,oe,ee,x.default.sources.USER)}}function $(U){var J=this.quill.getLines(U),oe={};if(J.length>1){var ee=J[0].formats(),ie=J[J.length-1].formats();oe=m.default.attributes.diff(ie,ee)||{}}this.quill.deleteText(U,x.default.sources.USER),Object.keys(oe).length>0&&this.quill.formatLine(U.index,1,oe,x.default.sources.USER),this.quill.setSelection(U.index,x.default.sources.SILENT),this.quill.focus()}function W(U,J){var oe=this;U.length>0&&this.quill.scroll.deleteAt(U.index,U.length);var ee=Object.keys(J.format).reduce(function(ie,ce){return b.default.query(ce,b.default.Scope.BLOCK)&&!Array.isArray(J.format[ce])&&(ie[ce]=J.format[ce]),ie},{});this.quill.insertText(U.index,` -`,ee,x.default.sources.USER),this.quill.setSelection(U.index+1,x.default.sources.SILENT),this.quill.focus(),Object.keys(J.format).forEach(function(ie){ee[ie]==null&&(Array.isArray(J.format[ie])||ie!=="link"&&oe.quill.format(ie,J.format[ie],x.default.sources.USER))})}function G(U){return{key:V.keys.TAB,shiftKey:!U,format:{"code-block":!0},handler:function(oe){var ee=b.default.query("code-block"),ie=oe.index,ce=oe.length,ye=this.quill.scroll.descendant(ee,ie),Ce=i(ye,2),Se=Ce[0],Re=Ce[1];if(Se!=null){var Te=this.quill.getIndex(Se),je=Se.newlineIndex(Re,!0)+1,pe=Se.newlineIndex(Te+Re+ce),ve=Se.domNode.textContent.slice(je,pe).split(` -`);Re=0,ve.forEach(function(Oe,Ae){U?(Se.insertAt(je+Re,ee.TAB),Re+=ee.TAB.length,Ae===0?ie+=ee.TAB.length:ce+=ee.TAB.length):Oe.startsWith(ee.TAB)&&(Se.deleteAt(je+Re,ee.TAB.length),Re-=ee.TAB.length,Ae===0?ie-=ee.TAB.length:ce-=ee.TAB.length),Re+=Oe.length+1}),this.quill.update(x.default.sources.USER),this.quill.setSelection(ie,ce,x.default.sources.SILENT)}}}}function Q(U){return{key:U[0].toUpperCase(),shortKey:!0,handler:function(oe,ee){this.quill.format(U,!ee.format[U],x.default.sources.USER)}}}function Z(U){if(typeof U=="string"||typeof U=="number")return Z({key:U});if((typeof U>"u"?"undefined":a(U))==="object"&&(U=(0,c.default)(U,!1)),typeof U.key=="string")if(V.keys[U.key.toUpperCase()]!=null)U.key=V.keys[U.key.toUpperCase()];else if(U.key.length===1)U.key=U.key.toUpperCase().charCodeAt(0);else return null;return U.shortKey&&(U[B]=U.shortKey,delete U.shortKey),U}n.default=V,n.SHORTKEY=B},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function m(f,b){var d=[],x=!0,E=!1,C=void 0;try{for(var k=f[Symbol.iterator](),S;!(x=(S=k.next()).done)&&(d.push(S.value),!(b&&d.length===b));x=!0);}catch(R){E=!0,C=R}finally{try{!x&&k.return&&k.return()}finally{if(E)throw C}}return d}return function(f,b){if(Array.isArray(f))return f;if(Symbol.iterator in Object(f))return m(f,b);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function m(f,b,d){f===null&&(f=Function.prototype);var x=Object.getOwnPropertyDescriptor(f,b);if(x===void 0){var E=Object.getPrototypeOf(f);return E===null?void 0:m(E,b,d)}else{if("value"in x)return x.value;var C=x.get;return C===void 0?void 0:C.call(d)}},s=function(){function m(f,b){for(var d=0;d-1}n.default=v,n.sanitize=_},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},i=function(){function y(m,f){for(var b=0;b1&&arguments[1]!==void 0?arguments[1]:!1,d=this.container.querySelector(".ql-selected");if(f!==d&&(d!=null&&d.classList.remove("ql-selected"),f!=null&&(f.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(f.parentNode.children,f),f.hasAttribute("data-value")?this.label.setAttribute("data-value",f.getAttribute("data-value")):this.label.removeAttribute("data-value"),f.hasAttribute("data-label")?this.label.setAttribute("data-label",f.getAttribute("data-label")):this.label.removeAttribute("data-label"),b))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":a(Event))==="object"){var x=document.createEvent("Event");x.initEvent("change",!0,!0),this.select.dispatchEvent(x)}this.close()}}},{key:"update",value:function(){var f=void 0;if(this.select.selectedIndex>-1){var b=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];f=this.select.options[this.select.selectedIndex],this.selectItem(b)}else this.selectItem(null);var d=f!=null&&f!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",d)}}]),y}();n.default=w},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=o(0),i=D(a),s=o(5),l=D(s),c=o(4),u=D(c),p=o(16),h=D(p),v=o(25),_=D(v),w=o(24),y=D(w),m=o(35),f=D(m),b=o(6),d=D(b),x=o(22),E=D(x),C=o(7),k=D(C),S=o(55),R=D(S),T=o(42),P=D(T),j=o(23),L=D(j);function D(B){return B&&B.__esModule?B:{default:B}}l.default.register({"blots/block":u.default,"blots/block/embed":c.BlockEmbed,"blots/break":h.default,"blots/container":_.default,"blots/cursor":y.default,"blots/embed":f.default,"blots/inline":d.default,"blots/scroll":E.default,"blots/text":k.default,"modules/clipboard":R.default,"modules/history":P.default,"modules/keyboard":L.default}),i.default.register(u.default,h.default,y.default,d.default,E.default,k.default),n.default=l.default},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=o(1),i=function(){function s(l){this.domNode=l,this.domNode[a.DATA_KEY]={blot:this}}return Object.defineProperty(s.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),s.create=function(l){if(this.tagName==null)throw new a.ParchmentError("Blot definition missing tagName");var c;return Array.isArray(this.tagName)?(typeof l=="string"&&(l=l.toUpperCase(),parseInt(l).toString()===l&&(l=parseInt(l))),typeof l=="number"?c=document.createElement(this.tagName[l-1]):this.tagName.indexOf(l)>-1?c=document.createElement(l):c=document.createElement(this.tagName[0])):c=document.createElement(this.tagName),this.className&&c.classList.add(this.className),c},s.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},s.prototype.clone=function(){var l=this.domNode.cloneNode(!1);return a.create(l)},s.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[a.DATA_KEY]},s.prototype.deleteAt=function(l,c){var u=this.isolate(l,c);u.remove()},s.prototype.formatAt=function(l,c,u,p){var h=this.isolate(l,c);if(a.query(u,a.Scope.BLOT)!=null&&p)h.wrap(u,p);else if(a.query(u,a.Scope.ATTRIBUTE)!=null){var v=a.create(this.statics.scope);h.wrap(v),v.format(u,p)}},s.prototype.insertAt=function(l,c,u){var p=u==null?a.create("text",c):a.create(c,u),h=this.split(l);this.parent.insertBefore(p,h)},s.prototype.insertInto=function(l,c){c===void 0&&(c=null),this.parent!=null&&this.parent.children.remove(this);var u=null;l.children.insertBefore(this,c),c!=null&&(u=c.domNode),(this.domNode.parentNode!=l.domNode||this.domNode.nextSibling!=u)&&l.domNode.insertBefore(this.domNode,u),this.parent=l,this.attach()},s.prototype.isolate=function(l,c){var u=this.split(l);return u.split(c),u},s.prototype.length=function(){return 1},s.prototype.offset=function(l){return l===void 0&&(l=this.parent),this.parent==null||this==l?0:this.parent.children.offset(this)+this.parent.offset(l)},s.prototype.optimize=function(l){this.domNode[a.DATA_KEY]!=null&&delete this.domNode[a.DATA_KEY].mutations},s.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},s.prototype.replace=function(l){l.parent!=null&&(l.parent.insertBefore(this,l.next),l.remove())},s.prototype.replaceWith=function(l,c){var u=typeof l=="string"?a.create(l,c):l;return u.replace(this),u},s.prototype.split=function(l,c){return l===0?this:this.next},s.prototype.update=function(l,c){},s.prototype.wrap=function(l,c){var u=typeof l=="string"?a.create(l,c):l;return this.parent!=null&&this.parent.insertBefore(u,this.next),u.appendChild(this),u},s.blotName="abstract",s}();n.default=i},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=o(12),i=o(32),s=o(33),l=o(1),c=function(){function u(p){this.attributes={},this.domNode=p,this.build()}return u.prototype.attribute=function(p,h){h?p.add(this.domNode,h)&&(p.value(this.domNode)!=null?this.attributes[p.attrName]=p:delete this.attributes[p.attrName]):(p.remove(this.domNode),delete this.attributes[p.attrName])},u.prototype.build=function(){var p=this;this.attributes={};var h=a.default.keys(this.domNode),v=i.default.keys(this.domNode),_=s.default.keys(this.domNode);h.concat(v).concat(_).forEach(function(w){var y=l.query(w,l.Scope.ATTRIBUTE);y instanceof a.default&&(p.attributes[y.attrName]=y)})},u.prototype.copy=function(p){var h=this;Object.keys(this.attributes).forEach(function(v){var _=h.attributes[v].value(h.domNode);p.format(v,_)})},u.prototype.move=function(p){var h=this;this.copy(p),Object.keys(this.attributes).forEach(function(v){h.attributes[v].remove(h.domNode)}),this.attributes={}},u.prototype.values=function(){var p=this;return Object.keys(this.attributes).reduce(function(h,v){return h[v]=p.attributes[v].value(p.domNode),h},{})},u}();n.default=c},function(r,n,o){var a=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,p){u.__proto__=p}||function(u,p){for(var h in p)p.hasOwnProperty(h)&&(u[h]=p[h])};return function(u,p){c(u,p);function h(){this.constructor=u}u.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}}();Object.defineProperty(n,"__esModule",{value:!0});var i=o(12);function s(c,u){var p=c.getAttribute("class")||"";return p.split(/\s+/).filter(function(h){return h.indexOf(u+"-")===0})}var l=function(c){a(u,c);function u(){return c!==null&&c.apply(this,arguments)||this}return u.keys=function(p){return(p.getAttribute("class")||"").split(/\s+/).map(function(h){return h.split("-").slice(0,-1).join("-")})},u.prototype.add=function(p,h){return this.canAdd(p,h)?(this.remove(p),p.classList.add(this.keyName+"-"+h),!0):!1},u.prototype.remove=function(p){var h=s(p,this.keyName);h.forEach(function(v){p.classList.remove(v)}),p.classList.length===0&&p.removeAttribute("class")},u.prototype.value=function(p){var h=s(p,this.keyName)[0]||"",v=h.slice(this.keyName.length+1);return this.canAdd(p,v)?v:""},u}(i.default);n.default=l},function(r,n,o){var a=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,p){u.__proto__=p}||function(u,p){for(var h in p)p.hasOwnProperty(h)&&(u[h]=p[h])};return function(u,p){c(u,p);function h(){this.constructor=u}u.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}}();Object.defineProperty(n,"__esModule",{value:!0});var i=o(12);function s(c){var u=c.split("-"),p=u.slice(1).map(function(h){return h[0].toUpperCase()+h.slice(1)}).join("");return u[0]+p}var l=function(c){a(u,c);function u(){return c!==null&&c.apply(this,arguments)||this}return u.keys=function(p){return(p.getAttribute("style")||"").split(";").map(function(h){var v=h.split(":");return v[0].trim()})},u.prototype.add=function(p,h){return this.canAdd(p,h)?(p.style[s(this.keyName)]=h,!0):!1},u.prototype.remove=function(p){p.style[s(this.keyName)]="",p.getAttribute("style")||p.removeAttribute("style")},u.prototype.value=function(p){var h=p.style[s(this.keyName)];return this.canAdd(p,h)?h:""},u}(i.default);n.default=l},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function l(c,u){for(var p=0;pS&&this.stack.undo.length>0){var R=this.stack.undo.pop();k=k.compose(R.undo),E=R.redo.compose(E)}else this.lastRecorded=S;this.stack.undo.push({redo:E,undo:k}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(E){this.stack.undo.forEach(function(C){C.undo=E.transform(C.undo,!0),C.redo=E.transform(C.redo,!0)}),this.stack.redo.forEach(function(C){C.undo=E.transform(C.undo,!0),C.redo=E.transform(C.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),d}(p.default);y.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(b){var d=b.ops[b.ops.length-1];return d==null?!1:d.insert!=null?typeof d.insert=="string"&&d.insert.endsWith(` -`):d.attributes!=null?Object.keys(d.attributes).some(function(x){return s.default.query(x,s.default.Scope.BLOCK)!=null}):!1}function f(b){var d=b.reduce(function(E,C){return E+=C.delete||0,E},0),x=b.length()-d;return m(b)&&(x-=1),x}n.default=y,n.getLastChangeIndex=f},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var a=function(){function W(G,Q){for(var Z=0;Z0&&arguments[0]!==void 0?arguments[0]:"link",U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),U!=null?this.textbox.value=U:Z!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+Z)||""),this.root.setAttribute("data-mode",Z)}},{key:"restoreFocus",value:function(){var Z=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=Z}},{key:"save",value:function(){var Z=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var U=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",Z,h.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",Z,h.default.sources.USER)),this.quill.root.scrollTop=U;break}case"video":Z=F(Z);case"formula":{if(!Z)break;var J=this.quill.getSelection(!0);if(J!=null){var oe=J.index+J.length;this.quill.insertEmbed(oe,this.root.getAttribute("data-mode"),Z,h.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(oe+1," ",h.default.sources.USER),this.quill.setSelection(oe+2,h.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),G}(k.default);function F(W){var G=W.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||W.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return G?(G[1]||"https")+"://www.youtube.com/embed/"+G[2]+"?showinfo=0":(G=W.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(G[1]||"https")+"://player.vimeo.com/video/"+G[2]+"/":W}function $(W,G){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;G.forEach(function(Z){var U=document.createElement("option");Z===Q?U.setAttribute("selected","selected"):U.setAttribute("value",Z),W.appendChild(U)})}n.BaseTooltip=z,n.default=q},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function i(){this.head=this.tail=null,this.length=0}return i.prototype.append=function(){for(var s=[],l=0;l1&&this.append.apply(this,s.slice(1))},i.prototype.contains=function(s){for(var l,c=this.iterator();l=c();)if(l===s)return!0;return!1},i.prototype.insertBefore=function(s,l){s&&(s.next=l,l!=null?(s.prev=l.prev,l.prev!=null&&(l.prev.next=s),l.prev=s,l===this.head&&(this.head=s)):this.tail!=null?(this.tail.next=s,s.prev=this.tail,this.tail=s):(s.prev=null,this.head=this.tail=s),this.length+=1)},i.prototype.offset=function(s){for(var l=0,c=this.head;c!=null;){if(c===s)return l;l+=c.length(),c=c.next}return-1},i.prototype.remove=function(s){this.contains(s)&&(s.prev!=null&&(s.prev.next=s.next),s.next!=null&&(s.next.prev=s.prev),s===this.head&&(this.head=s.next),s===this.tail&&(this.tail=s.prev),this.length-=1)},i.prototype.iterator=function(s){return s===void 0&&(s=this.head),function(){var l=s;return s!=null&&(s=s.next),l}},i.prototype.find=function(s,l){l===void 0&&(l=!1);for(var c,u=this.iterator();c=u();){var p=c.length();if(s_?c(v,s-_,Math.min(l,_+y-s)):c(v,0,Math.min(y,s+l-_)),_+=y}},i.prototype.map=function(s){return this.reduce(function(l,c){return l.push(s(c)),l},[])},i.prototype.reduce=function(s,l){for(var c,u=this.iterator();c=u();)l=s(l,c);return l},i}();n.default=a},function(r,n,o){var a=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,v){h.__proto__=v}||function(h,v){for(var _ in v)v.hasOwnProperty(_)&&(h[_]=v[_])};return function(h,v){p(h,v);function _(){this.constructor=h}h.prototype=v===null?Object.create(v):(_.prototype=v.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var i=o(17),s=o(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},c=100,u=function(p){a(h,p);function h(v){var _=p.call(this,v)||this;return _.scroll=_,_.observer=new MutationObserver(function(w){_.update(w)}),_.observer.observe(_.domNode,l),_.attach(),_}return h.prototype.detach=function(){p.prototype.detach.call(this),this.observer.disconnect()},h.prototype.deleteAt=function(v,_){this.update(),v===0&&_===this.length()?this.children.forEach(function(w){w.remove()}):p.prototype.deleteAt.call(this,v,_)},h.prototype.formatAt=function(v,_,w,y){this.update(),p.prototype.formatAt.call(this,v,_,w,y)},h.prototype.insertAt=function(v,_,w){this.update(),p.prototype.insertAt.call(this,v,_,w)},h.prototype.optimize=function(v,_){var w=this;v===void 0&&(v=[]),_===void 0&&(_={}),p.prototype.optimize.call(this,_);for(var y=[].slice.call(this.observer.takeRecords());y.length>0;)v.push(y.pop());for(var m=function(x,E){E===void 0&&(E=!0),!(x==null||x===w)&&x.domNode.parentNode!=null&&(x.domNode[s.DATA_KEY].mutations==null&&(x.domNode[s.DATA_KEY].mutations=[]),E&&m(x.parent))},f=function(x){x.domNode[s.DATA_KEY]==null||x.domNode[s.DATA_KEY].mutations==null||(x instanceof i.default&&x.children.forEach(f),x.optimize(_))},b=v,d=0;b.length>0;d+=1){if(d>=c)throw new Error("[Parchment] Maximum optimize iterations reached");for(b.forEach(function(x){var E=s.find(x.target,!0);E!=null&&(E.domNode===x.target&&(x.type==="childList"?(m(s.find(x.previousSibling,!1)),[].forEach.call(x.addedNodes,function(C){var k=s.find(C,!1);m(k,!1),k instanceof i.default&&k.children.forEach(function(S){m(S,!1)})})):x.type==="attributes"&&m(E.prev)),m(E))}),this.children.forEach(f),b=[].slice.call(this.observer.takeRecords()),y=b.slice();y.length>0;)v.push(y.pop())}},h.prototype.update=function(v,_){var w=this;_===void 0&&(_={}),v=v||this.observer.takeRecords(),v.map(function(y){var m=s.find(y.target,!0);return m==null?null:m.domNode[s.DATA_KEY].mutations==null?(m.domNode[s.DATA_KEY].mutations=[y],m):(m.domNode[s.DATA_KEY].mutations.push(y),null)}).forEach(function(y){y==null||y===w||y.domNode[s.DATA_KEY]==null||y.update(y.domNode[s.DATA_KEY].mutations||[],_)}),this.domNode[s.DATA_KEY].mutations!=null&&p.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,_),this.optimize(v,_)},h.blotName="scroll",h.defaultChild="block",h.scope=s.Scope.BLOCK_BLOT,h.tagName="DIV",h}(i.default);n.default=u},function(r,n,o){var a=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var v in h)h.hasOwnProperty(v)&&(p[v]=h[v])};return function(p,h){u(p,h);function v(){this.constructor=p}p.prototype=h===null?Object.create(h):(v.prototype=h.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var i=o(18),s=o(1);function l(u,p){if(Object.keys(u).length!==Object.keys(p).length)return!1;for(var h in u)if(u[h]!==p[h])return!1;return!0}var c=function(u){a(p,u);function p(){return u!==null&&u.apply(this,arguments)||this}return p.formats=function(h){if(h.tagName!==p.tagName)return u.formats.call(this,h)},p.prototype.format=function(h,v){var _=this;h===this.statics.blotName&&!v?(this.children.forEach(function(w){w instanceof i.default||(w=w.wrap(p.blotName,!0)),_.attributes.copy(w)}),this.unwrap()):u.prototype.format.call(this,h,v)},p.prototype.formatAt=function(h,v,_,w){if(this.formats()[_]!=null||s.query(_,s.Scope.ATTRIBUTE)){var y=this.isolate(h,v);y.format(_,w)}else u.prototype.formatAt.call(this,h,v,_,w)},p.prototype.optimize=function(h){u.prototype.optimize.call(this,h);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var _=this.next;_ instanceof p&&_.prev===this&&l(v,_.formats())&&(_.moveChildren(this),_.remove())},p.blotName="inline",p.scope=s.Scope.INLINE_BLOT,p.tagName="SPAN",p}(i.default);n.default=c},function(r,n,o){var a=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,p){u.__proto__=p}||function(u,p){for(var h in p)p.hasOwnProperty(h)&&(u[h]=p[h])};return function(u,p){c(u,p);function h(){this.constructor=u}u.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}}();Object.defineProperty(n,"__esModule",{value:!0});var i=o(18),s=o(1),l=function(c){a(u,c);function u(){return c!==null&&c.apply(this,arguments)||this}return u.formats=function(p){var h=s.query(u.blotName).tagName;if(p.tagName!==h)return c.formats.call(this,p)},u.prototype.format=function(p,h){s.query(p,s.Scope.BLOCK)!=null&&(p===this.statics.blotName&&!h?this.replaceWith(u.blotName):c.prototype.format.call(this,p,h))},u.prototype.formatAt=function(p,h,v,_){s.query(v,s.Scope.BLOCK)!=null?this.format(v,_):c.prototype.formatAt.call(this,p,h,v,_)},u.prototype.insertAt=function(p,h,v){if(v==null||s.query(h,s.Scope.INLINE)!=null)c.prototype.insertAt.call(this,p,h,v);else{var _=this.split(p),w=s.create(h,v);_.parent.insertBefore(w,_)}},u.prototype.update=function(p,h){navigator.userAgent.match(/Trident/)?this.build():c.prototype.update.call(this,p,h)},u.blotName="block",u.scope=s.Scope.BLOCK_BLOT,u.tagName="P",u}(i.default);n.default=l},function(r,n,o){var a=this&&this.__extends||function(){var l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var p in u)u.hasOwnProperty(p)&&(c[p]=u[p])};return function(c,u){l(c,u);function p(){this.constructor=c}c.prototype=u===null?Object.create(u):(p.prototype=u.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var i=o(19),s=function(l){a(c,l);function c(){return l!==null&&l.apply(this,arguments)||this}return c.formats=function(u){},c.prototype.format=function(u,p){l.prototype.formatAt.call(this,0,this.length(),u,p)},c.prototype.formatAt=function(u,p,h,v){u===0&&p===this.length()?this.format(h,v):l.prototype.formatAt.call(this,u,p,h,v)},c.prototype.formats=function(){return this.statics.formats(this.domNode)},c}(i.default);n.default=s},function(r,n,o){var a=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,p){u.__proto__=p}||function(u,p){for(var h in p)p.hasOwnProperty(h)&&(u[h]=p[h])};return function(u,p){c(u,p);function h(){this.constructor=u}u.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}}();Object.defineProperty(n,"__esModule",{value:!0});var i=o(19),s=o(1),l=function(c){a(u,c);function u(p){var h=c.call(this,p)||this;return h.text=h.statics.value(h.domNode),h}return u.create=function(p){return document.createTextNode(p)},u.value=function(p){var h=p.data;return h.normalize&&(h=h.normalize()),h},u.prototype.deleteAt=function(p,h){this.domNode.data=this.text=this.text.slice(0,p)+this.text.slice(p+h)},u.prototype.index=function(p,h){return this.domNode===p?h:-1},u.prototype.insertAt=function(p,h,v){v==null?(this.text=this.text.slice(0,p)+h+this.text.slice(p),this.domNode.data=this.text):c.prototype.insertAt.call(this,p,h,v)},u.prototype.length=function(){return this.text.length},u.prototype.optimize=function(p){c.prototype.optimize.call(this,p),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof u&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},u.prototype.position=function(p,h){return[this.domNode,p]},u.prototype.split=function(p,h){if(h===void 0&&(h=!1),!h){if(p===0)return this;if(p===this.length())return this.next}var v=s.create(this.domNode.splitText(p));return this.parent.insertBefore(v,this.next),this.text=this.statics.value(this.domNode),v},u.prototype.update=function(p,h){var v=this;p.some(function(_){return _.type==="characterData"&&_.target===v.domNode})&&(this.text=this.statics.value(this.domNode))},u.prototype.value=function(){return this.text},u.blotName="text",u.scope=s.Scope.INLINE_BLOT,u}(i.default);n.default=l},function(r,n,o){var a=document.createElement("div");if(a.classList.toggle("test-class",!1),a.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(s,l){return arguments.length>1&&!this.contains(s)==!l?l:i.call(this,s)}}String.prototype.startsWith||(String.prototype.startsWith=function(s,l){return l=l||0,this.substr(l,s.length)===s}),String.prototype.endsWith||(String.prototype.endsWith=function(s,l){var c=this.toString();(typeof l!="number"||!isFinite(l)||Math.floor(l)!==l||l>c.length)&&(l=c.length),l-=s.length;var u=c.indexOf(s,l);return u!==-1&&u===l}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(l){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof l!="function")throw new TypeError("predicate must be a function");for(var c=Object(this),u=c.length>>>0,p=arguments[1],h,v=0;vx.length?d:x,k=d.length>x.length?x:d,S=C.indexOf(k);if(S!=-1)return E=[[a,C.substring(0,S)],[i,k],[a,C.substring(S+k.length)]],d.length>x.length&&(E[0][0]=E[2][0]=o),E;if(k.length==1)return[[o,d],[a,x]];var R=v(d,x);if(R){var T=R[0],P=R[1],j=R[2],L=R[3],D=R[4],B=s(T,j),V=s(P,L);return B.concat([[i,D]],V)}return c(d,x)}function c(d,x){for(var E=d.length,C=x.length,k=Math.ceil((E+C)/2),S=k,R=2*k,T=new Array(R),P=new Array(R),j=0;jE)V+=2;else if(Q>C)B+=2;else if(D){var Z=S+L-$;if(Z>=0&&Z=U)return u(d,x,G,Q)}}}for(var J=-F+q;J<=F-z;J+=2){var Z=S+J,U;J==-F||J!=F&&P[Z-1]E)z+=2;else if(oe>C)q+=2;else if(!D){var W=S+L-J;if(W>=0&&W=U)return u(d,x,G,Q)}}}}return[[o,d],[a,x]]}function u(d,x,E,C){var k=d.substring(0,E),S=x.substring(0,C),R=d.substring(E),T=x.substring(C),P=s(k,S),j=s(R,T);return P.concat(j)}function p(d,x){if(!d||!x||d.charAt(0)!=x.charAt(0))return 0;for(var E=0,C=Math.min(d.length,x.length),k=C,S=0;Ex.length?d:x,C=d.length>x.length?x:d;if(E.length<4||C.length*2=V.length?[G,Q,Z,U,W]:null}var S=k(E,C,Math.ceil(E.length/4)),R=k(E,C,Math.ceil(E.length/2)),T;if(!S&&!R)return null;R?S?T=S[4].length>R[4].length?S:R:T=R:T=S;var P,j,L,D;d.length>x.length?(P=T[0],j=T[1],L=T[2],D=T[3]):(L=T[0],D=T[1],P=T[2],j=T[3]);var B=T[4];return[P,j,L,D,B]}function _(d){d.push([i,""]);for(var x=0,E=0,C=0,k="",S="",R;x1?(E!==0&&C!==0&&(R=p(S,k),R!==0&&(x-E-C>0&&d[x-E-C-1][0]==i?d[x-E-C-1][1]+=S.substring(0,R):(d.splice(0,0,[i,S.substring(0,R)]),x++),S=S.substring(R),k=k.substring(R)),R=h(S,k),R!==0&&(d[x][1]=S.substring(S.length-R)+d[x][1],S=S.substring(0,S.length-R),k=k.substring(0,k.length-R))),E===0?d.splice(x-C,E+C,[a,S]):C===0?d.splice(x-E,E+C,[o,k]):d.splice(x-E-C,E+C,[o,k],[a,S]),x=x-E-C+(E?1:0)+(C?1:0)+1):x!==0&&d[x-1][0]==i?(d[x-1][1]+=d[x][1],d.splice(x,1)):x++,C=0,E=0,k="",S="";break}d[d.length-1][1]===""&&d.pop();var T=!1;for(x=1;x0&&C.splice(k+2,0,[R[0],T]),b(C,k,3)}else return d}function f(d){for(var x=!1,E=function(R){return R.charCodeAt(0)>=56320&&R.charCodeAt(0)<=57343},C=function(R){return R.charCodeAt(R.length-1)>=55296&&R.charCodeAt(R.length-1)<=56319},k=2;k0&&S.push(d[k]);return S}function b(d,x,E){for(var C=x+E-1;C>=0&&C>=x-1;C--)if(C+1\r?\n +\<"),this.convert();var se=this.quill.getFormat(this.quill.selection.savedRange.index);if(se[C.default.blotName]){var we=this.container.innerText;return this.container.innerHTML="",new p.default().insert(we,j({},C.default.blotName,se[C.default.blotName]))}var xe=this.prepareMatching(),_e=i(xe,2),ze=_e[0],et=_e[1],We=J(this.container,ze,et);return Z(We,` -`)&&We.ops[We.ops.length-1].attributes==null&&(We=We.compose(new p.default().retain(We.length()-1).delete(1))),V.log("convert",this.container.innerHTML,We),this.container.innerHTML="",We}},{key:"dangerouslyPasteHTML",value:function(Ae,se){var we=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.default.sources.API;if(typeof Ae=="string")this.quill.setContents(this.convert(Ae),se),this.quill.setSelection(0,w.default.sources.SILENT);else{var xe=this.convert(se);this.quill.updateContents(new p.default().retain(Ae).concat(xe),we),this.quill.setSelection(Ae+xe.length(),w.default.sources.SILENT)}}},{key:"onPaste",value:function(Ae){var se=this;if(!(Ae.defaultPrevented||!this.quill.isEnabled())){var we=this.quill.getSelection(),xe=new p.default().retain(we.index),_e=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(w.default.sources.SILENT),setTimeout(function(){xe=xe.concat(se.convert()).delete(we.length),se.quill.updateContents(xe,w.default.sources.USER),se.quill.setSelection(xe.length()-we.length,w.default.sources.SILENT),se.quill.scrollingContainer.scrollTop=_e,se.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Ae=this,se=[],we=[];return this.matchers.forEach(function(xe){var _e=i(xe,2),ze=_e[0],et=_e[1];switch(ze){case Node.TEXT_NODE:we.push(et);break;case Node.ELEMENT_NODE:se.push(et);break;default:[].forEach.call(Ae.container.querySelectorAll(ze),function(We){We[q]=We[q]||[],We[q].push(et)});break}}),[se,we]}}]),ve}(b.default);W.DEFAULTS={matchers:[],matchVisual:!0};function G(pe,ve,Oe){return(typeof ve>"u"?"undefined":a(ve))==="object"?Object.keys(ve).reduce(function(Ae,se){return G(Ae,se,ve[se])},pe):pe.reduce(function(Ae,se){return se.attributes&&se.attributes[ve]?Ae.push(se):Ae.insert(se.insert,(0,c.default)({},j({},ve,Oe),se.attributes))},new p.default)}function Q(pe){if(pe.nodeType!==Node.ELEMENT_NODE)return{};var ve="__ql-computed-style";return pe[ve]||(pe[ve]=window.getComputedStyle(pe))}function Z(pe,ve){for(var Oe="",Ae=pe.ops.length-1;Ae>=0&&Oe.length-1}function J(pe,ve,Oe){return pe.nodeType===pe.TEXT_NODE?Oe.reduce(function(Ae,se){return se(pe,Ae)},new p.default):pe.nodeType===pe.ELEMENT_NODE?[].reduce.call(pe.childNodes||[],function(Ae,se){var we=J(se,ve,Oe);return se.nodeType===pe.ELEMENT_NODE&&(we=ve.reduce(function(xe,_e){return _e(se,xe)},we),we=(se[q]||[]).reduce(function(xe,_e){return _e(se,xe)},we)),Ae.concat(we)},new p.default):new p.default}function oe(pe,ve,Oe){return G(Oe,pe,!0)}function ee(pe,ve){var Oe=v.default.Attributor.Attribute.keys(pe),Ae=v.default.Attributor.Class.keys(pe),se=v.default.Attributor.Style.keys(pe),we={};return Oe.concat(Ae).concat(se).forEach(function(xe){var _e=v.default.query(xe,v.default.Scope.ATTRIBUTE);_e!=null&&(we[_e.attrName]=_e.value(pe),we[_e.attrName])||(_e=F[xe],_e!=null&&(_e.attrName===xe||_e.keyName===xe)&&(we[_e.attrName]=_e.value(pe)||void 0),_e=$[xe],_e!=null&&(_e.attrName===xe||_e.keyName===xe)&&(_e=$[xe],we[_e.attrName]=_e.value(pe)||void 0))}),Object.keys(we).length>0&&(ve=G(ve,we)),ve}function ie(pe,ve){var Oe=v.default.query(pe);if(Oe==null)return ve;if(Oe.prototype instanceof v.default.Embed){var Ae={},se=Oe.value(pe);se!=null&&(Ae[Oe.blotName]=se,ve=new p.default().insert(Ae,Oe.formats(pe)))}else typeof Oe.formats=="function"&&(ve=G(ve,Oe.blotName,Oe.formats(pe)));return ve}function ce(pe,ve){return Z(ve,` -`)||ve.insert(` -`),ve}function ye(){return new p.default}function Ce(pe,ve){var Oe=v.default.query(pe);if(Oe==null||Oe.blotName!=="list-item"||!Z(ve,` -`))return ve;for(var Ae=-1,se=pe.parentNode;!se.classList.contains("ql-clipboard");)(v.default.query(se)||{}).blotName==="list"&&(Ae+=1),se=se.parentNode;return Ae<=0?ve:ve.compose(new p.default().retain(ve.length()-1).retain(1,{indent:Ae}))}function Se(pe,ve){return Z(ve,` -`)||(U(pe)||ve.length()>0&&pe.nextSibling&&U(pe.nextSibling))&&ve.insert(` -`),ve}function Re(pe,ve){if(U(pe)&&pe.nextElementSibling!=null&&!Z(ve,` - -`)){var Oe=pe.offsetHeight+parseFloat(Q(pe).marginTop)+parseFloat(Q(pe).marginBottom);pe.nextElementSibling.offsetTop>pe.offsetTop+Oe*1.5&&ve.insert(` -`)}return ve}function Te(pe,ve){var Oe={},Ae=pe.style||{};return Ae.fontStyle&&Q(pe).fontStyle==="italic"&&(Oe.italic=!0),Ae.fontWeight&&(Q(pe).fontWeight.startsWith("bold")||parseInt(Q(pe).fontWeight)>=700)&&(Oe.bold=!0),Object.keys(Oe).length>0&&(ve=G(ve,Oe)),parseFloat(Ae.textIndent||0)>0&&(ve=new p.default().insert(" ").concat(ve)),ve}function je(pe,ve){var Oe=pe.data;if(pe.parentNode.tagName==="O:P")return ve.insert(Oe.trim());if(Oe.trim().length===0&&pe.parentNode.classList.contains("ql-clipboard"))return ve;if(!Q(pe.parentNode).whiteSpace.startsWith("pre")){var Ae=function(we,xe){return xe=xe.replace(/[^\u00a0]/g,""),xe.length<1&&we?" ":xe};Oe=Oe.replace(/\r\n/g," ").replace(/\n/g," "),Oe=Oe.replace(/\s\s+/g,Ae.bind(Ae,!0)),(pe.previousSibling==null&&U(pe.parentNode)||pe.previousSibling!=null&&U(pe.previousSibling))&&(Oe=Oe.replace(/^\s+/,Ae.bind(Ae,!1))),(pe.nextSibling==null&&U(pe.parentNode)||pe.nextSibling!=null&&U(pe.nextSibling))&&(Oe=Oe.replace(/\s+$/,Ae.bind(Ae,!1)))}return ve.insert(Oe)}n.default=W,n.matchAttributor=ee,n.matchBlot=ie,n.matchNewline=Se,n.matchSpacing=Re,n.matchText=je},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function _(w,y){for(var m=0;m '},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function _(w,y){for(var m=0;mv.right&&(w=v.right-_.right,this.root.style.left=p+w+"px"),_.leftv.bottom){var y=_.bottom-_.top,m=u.bottom-u.top+y;this.root.style.top=h-m+"px",this.root.classList.add("ql-flip")}return w}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),l}();n.default=s},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function R(T,P){var j=[],L=!0,D=!1,B=void 0;try{for(var V=T[Symbol.iterator](),q;!(L=(q=V.next()).done)&&(j.push(q.value),!(P&&j.length===P));L=!0);}catch(z){D=!0,B=z}finally{try{!L&&V.return&&V.return()}finally{if(D)throw B}}return j}return function(T,P){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return R(T,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function R(T,P,j){T===null&&(T=Function.prototype);var L=Object.getOwnPropertyDescriptor(T,P);if(L===void 0){var D=Object.getPrototypeOf(T);return D===null?void 0:R(D,P,j)}else{if("value"in L)return L.value;var B=L.get;return B===void 0?void 0:B.call(j)}},s=function(){function R(T,P){for(var j=0;j','','',''].join(""),n.default=k},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=o(29),i=se(a),s=o(36),l=o(38),c=o(64),u=o(65),p=se(u),h=o(66),v=se(h),_=o(67),w=se(_),y=o(37),m=o(26),f=o(39),b=o(40),d=o(56),x=se(d),E=o(68),C=se(E),k=o(27),S=se(k),R=o(69),T=se(R),P=o(70),j=se(P),L=o(71),D=se(L),B=o(72),V=se(B),q=o(73),z=se(q),F=o(13),$=se(F),W=o(74),G=se(W),Q=o(75),Z=se(Q),U=o(57),J=se(U),oe=o(41),ee=se(oe),ie=o(28),ce=se(ie),ye=o(59),Ce=se(ye),Se=o(60),Re=se(Se),Te=o(61),je=se(Te),pe=o(108),ve=se(pe),Oe=o(62),Ae=se(Oe);function se(we){return we&&we.__esModule?we:{default:we}}i.default.register({"attributors/attribute/direction":l.DirectionAttribute,"attributors/class/align":s.AlignClass,"attributors/class/background":y.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":l.DirectionClass,"attributors/class/font":f.FontClass,"attributors/class/size":b.SizeClass,"attributors/style/align":s.AlignStyle,"attributors/style/background":y.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":l.DirectionStyle,"attributors/style/font":f.FontStyle,"attributors/style/size":b.SizeStyle},!0),i.default.register({"formats/align":s.AlignClass,"formats/direction":l.DirectionClass,"formats/indent":c.IndentClass,"formats/background":y.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":f.FontClass,"formats/size":b.SizeClass,"formats/blockquote":p.default,"formats/code-block":$.default,"formats/header":v.default,"formats/list":w.default,"formats/bold":x.default,"formats/code":F.Code,"formats/italic":C.default,"formats/link":S.default,"formats/script":T.default,"formats/strike":j.default,"formats/underline":D.default,"formats/image":V.default,"formats/video":z.default,"formats/list/item":_.ListItem,"modules/formula":G.default,"modules/syntax":Z.default,"modules/toolbar":J.default,"themes/bubble":ve.default,"themes/snow":Ae.default,"ui/icons":ee.default,"ui/picker":ce.default,"ui/icon-picker":Re.default,"ui/color-picker":Ce.default,"ui/tooltip":je.default},!0),n.default=i.default},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var a=function(){function w(y,m){for(var f=0;f0&&this.children.tail.format(C,k)}},{key:"formats",value:function(){return _({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(C,k){if(C instanceof f)i(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,C,k);else{var S=k==null?this.length():k.offset(this),R=this.split(S);R.parent.insertBefore(C,R)}}},{key:"optimize",value:function(C){i(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,C);var k=this.next;k!=null&&k.prev===this&&k.statics.blotName===this.statics.blotName&&k.domNode.tagName===this.domNode.tagName&&k.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(k.moveChildren(this),k.remove())}},{key:"replace",value:function(C){if(C.statics.blotName!==this.statics.blotName){var k=l.default.create(this.statics.defaultChild);C.moveChildren(k),this.appendChild(k)}i(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,C)}}]),x}(h.default);b.blotName="list",b.scope=l.default.Scope.BLOCK_BLOT,b.tagName=["OL","UL"],b.defaultChild="list-item",b.allowedChildren=[f],n.ListItem=f,n.default=b},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=o(56),i=s(a);function s(h){return h&&h.__esModule?h:{default:h}}function l(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}function c(h,v){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:h}function u(h,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);h.prototype=Object.create(v&&v.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(h,v):h.__proto__=v)}var p=function(h){u(v,h);function v(){return l(this,v),c(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(i.default);p.blotName="italic",p.tagName=["EM","I"],n.default=p},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function _(w,y){for(var m=0;m-1?d?this.domNode.setAttribute(b,d):this.domNode.removeAttribute(b):i(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,b,d)}}],[{key:"create",value:function(b){var d=i(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,b);return typeof b=="string"&&d.setAttribute("src",this.sanitize(b)),d}},{key:"formats",value:function(b){return _.reduce(function(d,x){return b.hasAttribute(x)&&(d[x]=b.getAttribute(x)),d},{})}},{key:"match",value:function(b){return/\.(jpe?g|gif|png)$/.test(b)||/^data:image\/.+;base64/.test(b)}},{key:"sanitize",value:function(b){return(0,c.sanitize)(b,["http","https","data"])?b:"//:0"}},{key:"value",value:function(b){return b.getAttribute("src")}}]),m}(l.default.Embed);w.blotName="image",w.tagName="IMG",n.default=w},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(m,f){for(var b=0;b-1?d?this.domNode.setAttribute(b,d):this.domNode.removeAttribute(b):i(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,b,d)}}],[{key:"create",value:function(b){var d=i(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,b);return d.setAttribute("frameborder","0"),d.setAttribute("allowfullscreen",!0),d.setAttribute("src",this.sanitize(b)),d}},{key:"formats",value:function(b){return _.reduce(function(d,x){return b.hasAttribute(x)&&(d[x]=b.getAttribute(x)),d},{})}},{key:"sanitize",value:function(b){return c.default.sanitize(b)}},{key:"value",value:function(b){return b.getAttribute("src")}}]),m}(s.BlockEmbed);w.blotName="video",w.className="ql-video",w.tagName="IFRAME",n.default=w},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var a=function(){function b(d,x){for(var E=0;E0||this.cachedText==null)&&(this.domNode.innerHTML=S(R),this.domNode.normalize(),this.attach()),this.cachedText=R)}}]),C}(_.default);b.className="ql-syntax";var d=new l.default.Attributor.Class("token","hljs",{scope:l.default.Scope.INLINE}),x=function(E){f(C,E),a(C,null,[{key:"register",value:function(){u.default.register(d,!0),u.default.register(b,!0)}}]);function C(k,S){y(this,C);var R=m(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,k,S));if(typeof R.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var T=null;return R.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(T),T=setTimeout(function(){R.highlight(),T=null},R.options.interval)}),R.highlight(),R}return a(C,[{key:"highlight",value:function(){var S=this;if(!this.quill.selection.composing){this.quill.update(u.default.sources.USER);var R=this.quill.getSelection();this.quill.scroll.descendants(b).forEach(function(T){T.highlight(S.options.highlight)}),this.quill.update(u.default.sources.SILENT),R!=null&&this.quill.setSelection(R,u.default.sources.SILENT)}}}]),C}(h.default);x.DEFAULTS={highlight:function(){return window.hljs==null?null:function(E){var C=window.hljs.highlightAuto(E);return C.value}}(),interval:1e3},n.CodeBlock=b,n.CodeToken=d,n.default=x},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n){r.exports=' '},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var a=function C(k,S,R){k===null&&(k=Function.prototype);var T=Object.getOwnPropertyDescriptor(k,S);if(T===void 0){var P=Object.getPrototypeOf(k);return P===null?void 0:C(P,S,R)}else{if("value"in T)return T.value;var j=T.get;return j===void 0?void 0:j.call(R)}},i=function(){function C(k,S){for(var R=0;R0&&D===u.default.sources.USER){T.show(),T.root.style.left="0px",T.root.style.width="",T.root.style.width=T.root.offsetWidth+"px";var B=T.quill.getLines(j.index,j.length);if(B.length===1)T.position(T.quill.getBounds(j));else{var V=B[B.length-1],q=T.quill.getIndex(V),z=Math.min(V.length()-1,j.index+j.length-q),F=T.quill.getBounds(new v.Range(q,z));T.position(F)}}else document.activeElement!==T.textbox&&T.quill.hasFocus()&&T.hide()}),T}return i(k,[{key:"listen",value:function(){var R=this;a(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){R.root.classList.remove("ql-editing")}),this.quill.on(u.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!R.root.classList.contains("ql-hidden")){var T=R.quill.getSelection();T!=null&&R.position(R.quill.getBounds(T))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(R){var T=a(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"position",this).call(this,R),P=this.root.querySelector(".ql-tooltip-arrow");if(P.style.marginLeft="",T===0)return T;P.style.marginLeft=-1*T-P.offsetWidth/2+"px"}}]),k}(p.BaseTooltip);E.TEMPLATE=['','
','','',"
"].join(""),n.BubbleTooltip=E,n.default=x},function(r,n,o){r.exports=o(63)}]).default})})(OY);var ZXe=OY.exports,QXe=fo&&fo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var a in o)o.hasOwnProperty(a)&&(n[a]=o[a])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Z7=fo&&fo.__assign||function(){return Z7=Object.assign||function(e){for(var t,r=1,n=arguments.length;r1)throw new Error("The Quill editing area can only be composed of a single React element.");if(ja.default.Children.count(r.children)){var o=ja.default.Children.only(r.children);if(((n=o)===null||n===void 0?void 0:n.type)==="textarea")throw new Error("Quill does not support editing on a