react-pro-messenger 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.umd.js +14 -15
- package/dist/index.umd.js.map +1 -1
- package/dist/react-pro-messenger.css +1 -0
- package/package.json +9 -8
- package/dist/index.css +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
(function(re,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","framer-motion"],x):(re=typeof globalThis<"u"?globalThis:re||self,x(re.ReactProMessenger={},re.React,re.framerMotion))})(this,function(re,x,he){"use strict";var Mt=Object.defineProperty;var Nt=(re,x,he)=>x in re?Mt(re,x,{enumerable:!0,configurable:!0,writable:!0,value:he}):re[x]=he;var ve=(re,x,he)=>Nt(re,typeof x!="symbol"?x+"":x,he);var Qe=document.createElement("style");Qe.textContent=`/*! tailwindcss v4.0.6 | MIT License | https://tailwindcss.com */@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-serif:ui-serif,Georgia,Cambria,"Times New Roman",Times,serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(.971 .013 17.38);--color-red-100:oklch(.936 .032 17.717);--color-red-200:oklch(.885 .062 18.334);--color-red-300:oklch(.808 .114 19.571);--color-red-400:oklch(.704 .191 22.216);--color-red-500:oklch(.637 .237 25.331);--color-red-600:oklch(.577 .245 27.325);--color-red-700:oklch(.505 .213 27.518);--color-red-800:oklch(.444 .177 26.899);--color-red-900:oklch(.396 .141 25.723);--color-red-950:oklch(.258 .092 26.042);--color-orange-50:oklch(.98 .016 73.684);--color-orange-100:oklch(.954 .038 75.164);--color-orange-200:oklch(.901 .076 70.697);--color-orange-300:oklch(.837 .128 66.29);--color-orange-400:oklch(.75 .183 55.934);--color-orange-500:oklch(.705 .213 47.604);--color-orange-600:oklch(.646 .222 41.116);--color-orange-700:oklch(.553 .195 38.402);--color-orange-800:oklch(.47 .157 37.304);--color-orange-900:oklch(.408 .123 38.172);--color-orange-950:oklch(.266 .079 36.259);--color-amber-50:oklch(.987 .022 95.277);--color-amber-100:oklch(.962 .059 95.617);--color-amber-200:oklch(.924 .12 95.746);--color-amber-300:oklch(.879 .169 91.605);--color-amber-400:oklch(.828 .189 84.429);--color-amber-500:oklch(.769 .188 70.08);--color-amber-600:oklch(.666 .179 58.318);--color-amber-700:oklch(.555 .163 48.998);--color-amber-800:oklch(.473 .137 46.201);--color-amber-900:oklch(.414 .112 45.904);--color-amber-950:oklch(.279 .077 45.635);--color-yellow-50:oklch(.987 .026 102.212);--color-yellow-100:oklch(.973 .071 103.193);--color-yellow-200:oklch(.945 .129 101.54);--color-yellow-300:oklch(.905 .182 98.111);--color-yellow-400:oklch(.852 .199 91.936);--color-yellow-500:oklch(.795 .184 86.047);--color-yellow-600:oklch(.681 .162 75.834);--color-yellow-700:oklch(.554 .135 66.442);--color-yellow-800:oklch(.476 .114 61.907);--color-yellow-900:oklch(.421 .095 57.708);--color-yellow-950:oklch(.286 .066 53.813);--color-lime-50:oklch(.986 .031 120.757);--color-lime-100:oklch(.967 .067 122.328);--color-lime-200:oklch(.938 .127 124.321);--color-lime-300:oklch(.897 .196 126.665);--color-lime-400:oklch(.841 .238 128.85);--color-lime-500:oklch(.768 .233 130.85);--color-lime-600:oklch(.648 .2 131.684);--color-lime-700:oklch(.532 .157 131.589);--color-lime-800:oklch(.453 .124 130.933);--color-lime-900:oklch(.405 .101 131.063);--color-lime-950:oklch(.274 .072 132.109);--color-green-50:oklch(.982 .018 155.826);--color-green-100:oklch(.962 .044 156.743);--color-green-200:oklch(.925 .084 155.995);--color-green-300:oklch(.871 .15 154.449);--color-green-400:oklch(.792 .209 151.711);--color-green-500:oklch(.723 .219 149.579);--color-green-600:oklch(.627 .194 149.214);--color-green-700:oklch(.527 .154 150.069);--color-green-800:oklch(.448 .119 151.328);--color-green-900:oklch(.393 .095 152.535);--color-green-950:oklch(.266 .065 152.934);--color-emerald-50:oklch(.979 .021 166.113);--color-emerald-100:oklch(.95 .052 163.051);--color-emerald-200:oklch(.905 .093 164.15);--color-emerald-300:oklch(.845 .143 164.978);--color-emerald-400:oklch(.765 .177 163.223);--color-emerald-500:oklch(.696 .17 162.48);--color-emerald-600:oklch(.596 .145 163.225);--color-emerald-700:oklch(.508 .118 165.612);--color-emerald-800:oklch(.432 .095 166.913);--color-emerald-900:oklch(.378 .077 168.94);--color-emerald-950:oklch(.262 .051 172.552);--color-teal-50:oklch(.984 .014 180.72);--color-teal-100:oklch(.953 .051 180.801);--color-teal-200:oklch(.91 .096 180.426);--color-teal-300:oklch(.855 .138 181.071);--color-teal-400:oklch(.777 .152 181.912);--color-teal-500:oklch(.704 .14 182.503);--color-teal-600:oklch(.6 .118 184.704);--color-teal-700:oklch(.511 .096 186.391);--color-teal-800:oklch(.437 .078 188.216);--color-teal-900:oklch(.386 .063 188.416);--color-teal-950:oklch(.277 .046 192.524);--color-cyan-50:oklch(.984 .019 200.873);--color-cyan-100:oklch(.956 .045 203.388);--color-cyan-200:oklch(.917 .08 205.041);--color-cyan-300:oklch(.865 .127 207.078);--color-cyan-400:oklch(.789 .154 211.53);--color-cyan-500:oklch(.715 .143 215.221);--color-cyan-600:oklch(.609 .126 221.723);--color-cyan-700:oklch(.52 .105 223.128);--color-cyan-800:oklch(.45 .085 224.283);--color-cyan-900:oklch(.398 .07 227.392);--color-cyan-950:oklch(.302 .056 229.695);--color-sky-50:oklch(.977 .013 236.62);--color-sky-100:oklch(.951 .026 236.824);--color-sky-200:oklch(.901 .058 230.902);--color-sky-300:oklch(.828 .111 230.318);--color-sky-400:oklch(.746 .16 232.661);--color-sky-500:oklch(.685 .169 237.323);--color-sky-600:oklch(.588 .158 241.966);--color-sky-700:oklch(.5 .134 242.749);--color-sky-800:oklch(.443 .11 240.79);--color-sky-900:oklch(.391 .09 240.876);--color-sky-950:oklch(.293 .066 243.157);--color-blue-50:oklch(.97 .014 254.604);--color-blue-100:oklch(.932 .032 255.585);--color-blue-200:oklch(.882 .059 254.128);--color-blue-300:oklch(.809 .105 251.813);--color-blue-400:oklch(.707 .165 254.624);--color-blue-500:oklch(.623 .214 259.815);--color-blue-600:oklch(.546 .245 262.881);--color-blue-700:oklch(.488 .243 264.376);--color-blue-800:oklch(.424 .199 265.638);--color-blue-900:oklch(.379 .146 265.522);--color-blue-950:oklch(.282 .091 267.935);--color-indigo-50:oklch(.962 .018 272.314);--color-indigo-100:oklch(.93 .034 272.788);--color-indigo-200:oklch(.87 .065 274.039);--color-indigo-300:oklch(.785 .115 274.713);--color-indigo-400:oklch(.673 .182 276.935);--color-indigo-500:oklch(.585 .233 277.117);--color-indigo-600:oklch(.511 .262 276.966);--color-indigo-700:oklch(.457 .24 277.023);--color-indigo-800:oklch(.398 .195 277.366);--color-indigo-900:oklch(.359 .144 278.697);--color-indigo-950:oklch(.257 .09 281.288);--color-violet-50:oklch(.969 .016 293.756);--color-violet-100:oklch(.943 .029 294.588);--color-violet-200:oklch(.894 .057 293.283);--color-violet-300:oklch(.811 .111 293.571);--color-violet-400:oklch(.702 .183 293.541);--color-violet-500:oklch(.606 .25 292.717);--color-violet-600:oklch(.541 .281 293.009);--color-violet-700:oklch(.491 .27 292.581);--color-violet-800:oklch(.432 .232 292.759);--color-violet-900:oklch(.38 .189 293.745);--color-violet-950:oklch(.283 .141 291.089);--color-purple-50:oklch(.977 .014 308.299);--color-purple-100:oklch(.946 .033 307.174);--color-purple-200:oklch(.902 .063 306.703);--color-purple-300:oklch(.827 .119 306.383);--color-purple-400:oklch(.714 .203 305.504);--color-purple-500:oklch(.627 .265 303.9);--color-purple-600:oklch(.558 .288 302.321);--color-purple-700:oklch(.496 .265 301.924);--color-purple-800:oklch(.438 .218 303.724);--color-purple-900:oklch(.381 .176 304.987);--color-purple-950:oklch(.291 .149 302.717);--color-fuchsia-50:oklch(.977 .017 320.058);--color-fuchsia-100:oklch(.952 .037 318.852);--color-fuchsia-200:oklch(.903 .076 319.62);--color-fuchsia-300:oklch(.833 .145 321.434);--color-fuchsia-400:oklch(.74 .238 322.16);--color-fuchsia-500:oklch(.667 .295 322.15);--color-fuchsia-600:oklch(.591 .293 322.896);--color-fuchsia-700:oklch(.518 .253 323.949);--color-fuchsia-800:oklch(.452 .211 324.591);--color-fuchsia-900:oklch(.401 .17 325.612);--color-fuchsia-950:oklch(.293 .136 325.661);--color-pink-50:oklch(.971 .014 343.198);--color-pink-100:oklch(.948 .028 342.258);--color-pink-200:oklch(.899 .061 343.231);--color-pink-300:oklch(.823 .12 346.018);--color-pink-400:oklch(.718 .202 349.761);--color-pink-500:oklch(.656 .241 354.308);--color-pink-600:oklch(.592 .249 .584);--color-pink-700:oklch(.525 .223 3.958);--color-pink-800:oklch(.459 .187 3.815);--color-pink-900:oklch(.408 .153 2.432);--color-pink-950:oklch(.284 .109 3.907);--color-rose-50:oklch(.969 .015 12.422);--color-rose-100:oklch(.941 .03 12.58);--color-rose-200:oklch(.892 .058 10.001);--color-rose-300:oklch(.81 .117 11.638);--color-rose-400:oklch(.712 .194 13.428);--color-rose-500:oklch(.645 .246 16.439);--color-rose-600:oklch(.586 .253 17.585);--color-rose-700:oklch(.514 .222 16.935);--color-rose-800:oklch(.455 .188 13.697);--color-rose-900:oklch(.41 .159 10.272);--color-rose-950:oklch(.271 .105 12.094);--color-slate-50:oklch(.984 .003 247.858);--color-slate-100:oklch(.968 .007 247.896);--color-slate-200:oklch(.929 .013 255.508);--color-slate-300:oklch(.869 .022 252.894);--color-slate-400:oklch(.704 .04 256.788);--color-slate-500:oklch(.554 .046 257.417);--color-slate-600:oklch(.446 .043 257.281);--color-slate-700:oklch(.372 .044 257.287);--color-slate-800:oklch(.279 .041 260.031);--color-slate-900:oklch(.208 .042 265.755);--color-slate-950:oklch(.129 .042 264.695);--color-gray-50:oklch(.985 .002 247.839);--color-gray-100:oklch(.967 .003 264.542);--color-gray-200:oklch(.928 .006 264.531);--color-gray-300:oklch(.872 .01 258.338);--color-gray-400:oklch(.707 .022 261.325);--color-gray-500:oklch(.551 .027 264.364);--color-gray-600:oklch(.446 .03 256.802);--color-gray-700:oklch(.373 .034 259.733);--color-gray-800:oklch(.278 .033 256.848);--color-gray-900:oklch(.21 .034 264.665);--color-gray-950:oklch(.13 .028 261.692);--color-zinc-50:oklch(.985 0 0);--color-zinc-100:oklch(.967 .001 286.375);--color-zinc-200:oklch(.92 .004 286.32);--color-zinc-300:oklch(.871 .006 286.286);--color-zinc-400:oklch(.705 .015 286.067);--color-zinc-500:oklch(.552 .016 285.938);--color-zinc-600:oklch(.442 .017 285.786);--color-zinc-700:oklch(.37 .013 285.805);--color-zinc-800:oklch(.274 .006 286.033);--color-zinc-900:oklch(.21 .006 285.885);--color-zinc-950:oklch(.141 .005 285.823);--color-neutral-50:oklch(.985 0 0);--color-neutral-100:oklch(.97 0 0);--color-neutral-200:oklch(.922 0 0);--color-neutral-300:oklch(.87 0 0);--color-neutral-400:oklch(.708 0 0);--color-neutral-500:oklch(.556 0 0);--color-neutral-600:oklch(.439 0 0);--color-neutral-700:oklch(.371 0 0);--color-neutral-800:oklch(.269 0 0);--color-neutral-900:oklch(.205 0 0);--color-neutral-950:oklch(.145 0 0);--color-stone-50:oklch(.985 .001 106.423);--color-stone-100:oklch(.97 .001 106.424);--color-stone-200:oklch(.923 .003 48.717);--color-stone-300:oklch(.869 .005 56.366);--color-stone-400:oklch(.709 .01 56.259);--color-stone-500:oklch(.553 .013 58.071);--color-stone-600:oklch(.444 .011 73.639);--color-stone-700:oklch(.374 .01 67.558);--color-stone-800:oklch(.268 .007 34.298);--color-stone-900:oklch(.216 .006 56.043);--color-stone-950:oklch(.147 .004 49.25);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-2xs:18rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--shadow-2xs:0 1px #0000000d;--shadow-xs:0 1px 2px 0 #0000000d;--shadow-sm:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--shadow-md:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--shadow-xl:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--shadow-2xl:0 25px 50px -12px #00000040;--inset-shadow-2xs:inset 0 1px #0000000d;--inset-shadow-xs:inset 0 1px 1px #0000000d;--inset-shadow-sm:inset 0 2px 4px #0000000d;--drop-shadow-xs:0 1px 1px #0000000d;--drop-shadow-sm:0 1px 2px #00000026;--drop-shadow-md:0 3px 3px #0000001f;--drop-shadow-lg:0 4px 4px #00000026;--drop-shadow-xl:0 9px 7px #0000001a;--drop-shadow-2xl:0 25px 25px #00000026;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--blur-3xl:64px;--perspective-dramatic:100px;--perspective-near:300px;--perspective-normal:500px;--perspective-midrange:800px;--perspective-distant:1200px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:color-mix(in oklab,currentColor 50%,transparent)}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.top-0{top:calc(var(--spacing)*0)}.top-1{top:calc(var(--spacing)*1)}.top-5{top:calc(var(--spacing)*5)}.top-\\[11px\\]{top:11px}.-right-2{right:calc(var(--spacing)*-2)}.-right-\\[11\\.4px\\]{right:-11.4px}.right-0{right:calc(var(--spacing)*0)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing)*-2)}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.ms-3{margin-inline-start:calc(var(--spacing)*3)}.mt-1{margin-top:calc(var(--spacing)*1)}.mr-3{margin-right:calc(var(--spacing)*3)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.ml-2{margin-left:calc(var(--spacing)*2)}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-full{max-height:100%}.w-3{width:calc(var(--spacing)*3)}.w-3\\/4{width:75%}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-12{width:calc(var(--spacing)*12)}.w-42{width:calc(var(--spacing)*42)}.w-\\[90\\%\\]{width:90%}.w-fit{width:fit-content}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3\\/4{max-width:75%}.max-w-sm{max-width:var(--container-sm)}.flex-1{flex:1}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.scale-x-\\[-1\\]{--tw-scale-x:-1;scale:var(--tw-scale-x)var(--tw-scale-y)}.-rotate-180{rotate:-180deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.self-end{align-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-tl-3xl{border-top-left-radius:var(--radius-3xl)}.rounded-tr-2xl{border-top-right-radius:var(--radius-2xl)}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-bl-3xl{border-bottom-left-radius:var(--radius-3xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-950{border-color:var(--color-green-950)}.bg-\\[rgb\\(0\\,0\\,0\\,0\\.6\\)\\]{background-color:#0009}.bg-blue-200{background-color:var(--color-blue-200)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-700{background-color:var(--color-blue-700)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-green-200{background-color:var(--color-green-200)}.bg-green-500{background-color:var(--color-green-500)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.\\!bg-cover{background-size:cover!important}.fill-blue-200{fill:var(--color-blue-200)}.fill-gray-200{fill:var(--color-gray-200)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.pt-5{padding-top:calc(var(--spacing)*5)}.pr-4{padding-right:calc(var(--spacing)*4)}.pr-\\[22px\\]{padding-right:22px}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-16{padding-bottom:calc(var(--spacing)*16)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-\\[1\\.5px\\]{padding-left:1.5px}.text-center{text-align:center}.text-left{text-align:left}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-black{color:var(--color-black)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-orange-400{color:var(--color-orange-400)}.text-orange-700{color:var(--color-orange-700)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-white{color:var(--color-white)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-discrete{transition-behavior:allow-discrete}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-blue-800:hover{background-color:var(--color-blue-800)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\\:bg-gray-600:hover{background-color:var(--color-gray-600)}.hover\\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\\:text-blue-700:hover{color:var(--color-blue-700)}.hover\\:text-gray-700:hover{color:var(--color-gray-700)}.hover\\:text-gray-900:hover{color:var(--color-gray-900)}.hover\\:underline:hover{text-decoration-line:underline}}.focus\\:z-10:focus{z-index:10}.focus\\:ring-4:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-300:focus{--tw-ring-color:var(--color-blue-300)}.focus\\:ring-gray-100:focus{--tw-ring-color:var(--color-gray-100)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}@media (width>=48rem){.md\\:inset-0{inset:calc(var(--spacing)*0)}.md\\:max-w-\\[400px\\]{max-width:400px}.md\\:p-5{padding:calc(var(--spacing)*5)}}@media (prefers-color-scheme:dark){.dark\\:border-gray-600{border-color:var(--color-gray-600)}.dark\\:bg-blue-600{background-color:var(--color-blue-600)}.dark\\:bg-gray-700{background-color:var(--color-gray-700)}.dark\\:bg-gray-800{background-color:var(--color-gray-800)}.dark\\:text-gray-400{color:var(--color-gray-400)}.dark\\:text-white{color:var(--color-white)}@media (hover:hover){.dark\\:hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.dark\\:hover\\:bg-gray-700:hover{background-color:var(--color-gray-700)}.dark\\:hover\\:text-white:hover{color:var(--color-white)}}.dark\\:focus\\:ring-blue-800:focus{--tw-ring-color:var(--color-blue-800)}.dark\\:focus\\:ring-gray-700:focus{--tw-ring-color:var(--color-gray-700)}}.\\[\\&\\>g\\>path\\]\\:fill-blue-200>g>path{fill:var(--color-blue-200)}.\\[\\&\\>g\\>path\\]\\:fill-green-200>g>path{fill:var(--color-green-200)}}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:#ffffff80;border-radius:4px}::-webkit-scrollbar-button{display:none}*{scrollbar-width:thin;scrollbar-color:#57575780 transparent}.rows-wrapper .bubble-tail{width:11px;height:20px;fill:var(--surface-color);transform:scaleX(calc(var(--reflect)*-1));bottom:-1px;position:absolute;inset-inline-end:-8.4px}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Qe);class Se{constructor({id:c,text:n,createdDate:t,attachment:i,attachmentType:a,user:g,isRightSided:y,symbols:h}){ve(this,"id","0");ve(this,"text","");ve(this,"createdDate","");ve(this,"attachment","");ve(this,"attachmentType");ve(this,"user",{id:""});ve(this,"isRightSided",!1);ve(this,"symbols");this.id=c,this.text=n,this.createdDate=t,this.attachment=i,this.attachmentType=a,this.user=g,this.isRightSided=y,this.symbols=h}}function Pr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var _e={exports:{}},je={};/**
|
|
1
|
+
(function(re,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","framer-motion"],m):(re=typeof globalThis<"u"?globalThis:re||self,m(re.ReactProMessenger={},re.React,re.framerMotion))})(this,function(re,m,pe){"use strict";var Lt=Object.defineProperty;var Nt=(re,m,pe)=>m in re?Lt(re,m,{enumerable:!0,configurable:!0,writable:!0,value:pe}):re[m]=pe;var ye=(re,m,pe)=>Nt(re,typeof m!="symbol"?m+"":m,pe);class Oe{constructor({id:l,text:o,createdDate:t,attachment:a,attachmentType:i,user:h,isRightSided:g,symbols:p}){ye(this,"id","0");ye(this,"text","");ye(this,"createdDate","");ye(this,"attachment","");ye(this,"attachmentType");ye(this,"user",{id:""});ye(this,"isRightSided",!1);ye(this,"symbols");this.id=l,this.text=o,this.createdDate=t,this.attachment=a,this.attachmentType=i,this.user=h,this.isRightSided=g,this.symbols=p}}function Rr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var _e={exports:{}},je={};/**
|
|
3
2
|
* @license React
|
|
4
3
|
* react-jsx-runtime.production.min.js
|
|
5
4
|
*
|
|
@@ -7,7 +6,7 @@
|
|
|
7
6
|
*
|
|
8
7
|
* This source code is licensed under the MIT license found in the
|
|
9
8
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var
|
|
9
|
+
*/var Qe;function kr(){if(Qe)return je;Qe=1;var r=m,l=Symbol.for("react.element"),o=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function h(g,p,x){var y,b={},P=null,F=null;x!==void 0&&(P=""+x),p.key!==void 0&&(P=""+p.key),p.ref!==void 0&&(F=p.ref);for(y in p)t.call(p,y)&&!i.hasOwnProperty(y)&&(b[y]=p[y]);if(g&&g.defaultProps)for(y in p=g.defaultProps,p)b[y]===void 0&&(b[y]=p[y]);return{$$typeof:l,type:g,key:P,ref:F,props:b,_owner:a.current}}return je.Fragment=o,je.jsx=h,je.jsxs=h,je}var Ee={};/**
|
|
11
10
|
* @license React
|
|
12
11
|
* react-jsx-runtime.development.js
|
|
13
12
|
*
|
|
@@ -15,37 +14,37 @@
|
|
|
15
14
|
*
|
|
16
15
|
* This source code is licensed under the MIT license found in the
|
|
17
16
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var
|
|
19
|
-
`+
|
|
20
|
-
`),
|
|
21
|
-
`),X=L.length-1,G=
|
|
22
|
-
`+L[X].replace(" at new "," at ");return e.displayName&&
|
|
17
|
+
*/var er;function Lr(){return er||(er=1,process.env.NODE_ENV!=="production"&&function(){var r=m,l=Symbol.for("react.element"),o=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),g=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),H=Symbol.iterator,N="@@iterator";function B(e){if(e===null||typeof e!="object")return null;var u=H&&e[H]||e[N];return typeof u=="function"?u:null}var U=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function z(e){{for(var u=arguments.length,v=new Array(u>1?u-1:0),w=1;w<u;w++)v[w-1]=arguments[w];E("error",e,v)}}function E(e,u,v){{var w=U.ReactDebugCurrentFrame,V=w.getStackAddendum();V!==""&&(u+="%s",v=v.concat([V]));var q=v.map(function($){return String($)});q.unshift("Warning: "+u),Function.prototype.apply.call(console[e],console,q)}}var Z=!1,c=!1,J=!1,ne=!1,K=!1,se;se=Symbol.for("react.module.reference");function ve(e){return!!(typeof e=="string"||typeof e=="function"||e===t||e===i||K||e===a||e===x||e===y||ne||e===F||Z||c||J||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===b||e.$$typeof===h||e.$$typeof===g||e.$$typeof===p||e.$$typeof===se||e.getModuleId!==void 0))}function he(e,u,v){var w=e.displayName;if(w)return w;var V=u.displayName||u.name||"";return V!==""?v+"("+V+")":v}function fe(e){return e.displayName||"Context"}function ee(e){if(e==null)return null;if(typeof e.tag=="number"&&z("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case t:return"Fragment";case o:return"Portal";case i:return"Profiler";case a:return"StrictMode";case x:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case g:var u=e;return fe(u)+".Consumer";case h:var v=e;return fe(v._context)+".Provider";case p:return he(e,e.render,"ForwardRef");case b:var w=e.displayName||null;return w!==null?w:ee(e.type)||"Memo";case P:{var V=e,q=V._payload,$=V._init;try{return ee($(q))}catch{return null}}}return null}var Q=Object.assign,de=0,_,I,M,oe,s,f,C;function j(){}j.__reactDisabledLog=!0;function T(){{if(de===0){_=console.log,I=console.info,M=console.warn,oe=console.error,s=console.group,f=console.groupCollapsed,C=console.groupEnd;var e={configurable:!0,enumerable:!0,value:j,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}de++}}function D(){{if(de--,de===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Q({},e,{value:_}),info:Q({},e,{value:I}),warn:Q({},e,{value:M}),error:Q({},e,{value:oe}),group:Q({},e,{value:s}),groupCollapsed:Q({},e,{value:f}),groupEnd:Q({},e,{value:C})})}de<0&&z("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var S=U.ReactCurrentDispatcher,O;function R(e,u,v){{if(O===void 0)try{throw Error()}catch(V){var w=V.stack.trim().match(/\n( *(at )?)/);O=w&&w[1]||""}return`
|
|
18
|
+
`+O+e}}var A=!1,k;{var ie=typeof WeakMap=="function"?WeakMap:Map;k=new ie}function d(e,u){if(!e||A)return"";{var v=k.get(e);if(v!==void 0)return v}var w;A=!0;var V=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var q;q=S.current,S.current=null,T();try{if(u){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(le){w=le}Reflect.construct(e,[],$)}else{try{$.call()}catch(le){w=le}e.call($.prototype)}}else{try{throw Error()}catch(le){w=le}e()}}catch(le){if(le&&w&&typeof le.stack=="string"){for(var L=le.stack.split(`
|
|
19
|
+
`),ae=w.stack.split(`
|
|
20
|
+
`),X=L.length-1,G=ae.length-1;X>=1&&G>=0&&L[X]!==ae[G];)G--;for(;X>=1&&G>=0;X--,G--)if(L[X]!==ae[G]){if(X!==1||G!==1)do if(X--,G--,G<0||L[X]!==ae[G]){var ce=`
|
|
21
|
+
`+L[X].replace(" at new "," at ");return e.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",e.displayName)),typeof e=="function"&&k.set(e,ce),ce}while(X>=1&&G>=0);break}}}finally{A=!1,S.current=q,D(),Error.prepareStackTrace=V}var Ce=e?e.displayName||e.name:"",be=Ce?R(Ce):"";return typeof e=="function"&&k.set(e,be),be}function ue(e,u,v){return d(e,!1)}function xe(e){var u=e.prototype;return!!(u&&u.isReactComponent)}function me(e,u,v){if(e==null)return"";if(typeof e=="function")return d(e,xe(e));if(typeof e=="string")return R(e);switch(e){case x:return R("Suspense");case y:return R("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return ue(e.render);case b:return me(e.type,u,v);case P:{var w=e,V=w._payload,q=w._init;try{return me(q(V),u,v)}catch{}}}return""}var Se=Object.prototype.hasOwnProperty,yr={},gr=U.ReactDebugCurrentFrame;function ke(e){if(e){var u=e._owner,v=me(e.type,e._source,u?u.type:null);gr.setExtraStackFrame(v)}else gr.setExtraStackFrame(null)}function ct(e,u,v,w,V){{var q=Function.call.bind(Se);for(var $ in e)if(q(e,$)){var L=void 0;try{if(typeof e[$]!="function"){var ae=Error((w||"React class")+": "+v+" type `"+$+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[$]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ae.name="Invariant Violation",ae}L=e[$](u,$,w,v,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(X){L=X}L&&!(L instanceof Error)&&(ke(V),z("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",w||"React class",v,$,typeof L),ke(null)),L instanceof Error&&!(L.message in yr)&&(yr[L.message]=!0,ke(V),z("Failed %s type: %s",v,L.message),ke(null))}}}var ft=Array.isArray;function Je(e){return ft(e)}function dt(e){{var u=typeof Symbol=="function"&&Symbol.toStringTag,v=u&&e[Symbol.toStringTag]||e.constructor.name||"Object";return v}}function pt(e){try{return mr(e),!1}catch{return!0}}function mr(e){return""+e}function br(e){if(pt(e))return z("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",dt(e)),mr(e)}var xr=U.ReactCurrentOwner,vt={key:!0,ref:!0,__self:!0,__source:!0},wr,Cr;function ht(e){if(Se.call(e,"ref")){var u=Object.getOwnPropertyDescriptor(e,"ref").get;if(u&&u.isReactWarning)return!1}return e.ref!==void 0}function yt(e){if(Se.call(e,"key")){var u=Object.getOwnPropertyDescriptor(e,"key").get;if(u&&u.isReactWarning)return!1}return e.key!==void 0}function gt(e,u){typeof e.ref=="string"&&xr.current}function mt(e,u){{var v=function(){wr||(wr=!0,z("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};v.isReactWarning=!0,Object.defineProperty(e,"key",{get:v,configurable:!0})}}function bt(e,u){{var v=function(){Cr||(Cr=!0,z("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};v.isReactWarning=!0,Object.defineProperty(e,"ref",{get:v,configurable:!0})}}var xt=function(e,u,v,w,V,q,$){var L={$$typeof:l,type:e,key:u,ref:v,props:$,_owner:q};return L._store={},Object.defineProperty(L._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(L,"_self",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.defineProperty(L,"_source",{configurable:!1,enumerable:!1,writable:!1,value:V}),Object.freeze&&(Object.freeze(L.props),Object.freeze(L)),L};function wt(e,u,v,w,V){{var q,$={},L=null,ae=null;v!==void 0&&(br(v),L=""+v),yt(u)&&(br(u.key),L=""+u.key),ht(u)&&(ae=u.ref,gt(u,V));for(q in u)Se.call(u,q)&&!vt.hasOwnProperty(q)&&($[q]=u[q]);if(e&&e.defaultProps){var X=e.defaultProps;for(q in X)$[q]===void 0&&($[q]=X[q])}if(L||ae){var G=typeof e=="function"?e.displayName||e.name||"Unknown":e;L&&mt($,G),ae&&bt($,G)}return xt(e,L,ae,V,w,xr.current,$)}}var He=U.ReactCurrentOwner,jr=U.ReactDebugCurrentFrame;function we(e){if(e){var u=e._owner,v=me(e.type,e._source,u?u.type:null);jr.setExtraStackFrame(v)}else jr.setExtraStackFrame(null)}var Ke;Ke=!1;function Xe(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function Er(){{if(He.current){var e=ee(He.current.type);if(e)return`
|
|
23
22
|
|
|
24
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function Ct(e){return""}var Tr={};function jt(e){{var u=Er();if(!u){var v=typeof e=="string"?e:e.displayName||e.name;v&&(u=`
|
|
25
24
|
|
|
26
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+v+">.")}return u}}function Sr(e,u){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var v=jt(u);if(Tr[v])return;Tr[v]=!0;var w="";e&&e._owner&&e._owner!==He.current&&(w=" It was passed a child from "+ee(e._owner.type)+"."),we(e),z('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',v,w),we(null)}}function Or(e,u){{if(typeof e!="object")return;if(Je(e))for(var v=0;v<e.length;v++){var w=e[v];Xe(w)&&Sr(w,u)}else if(Xe(e))e._store&&(e._store.validated=!0);else if(e){var V=B(e);if(typeof V=="function"&&V!==e.entries)for(var q=V.call(e),$;!($=q.next()).done;)Xe($.value)&&Sr($.value,u)}}}function Et(e){{var u=e.type;if(u==null||typeof u=="string")return;var v;if(typeof u=="function")v=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===p||u.$$typeof===b))v=u.propTypes;else return;if(v){var w=ee(u);ct(v,e.props,"prop",w,e)}else if(u.PropTypes!==void 0&&!Ke){Ke=!0;var V=ee(u);z("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",V||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&z("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Tt(e){{for(var u=Object.keys(e.props),v=0;v<u.length;v++){var w=u[v];if(w!=="children"&&w!=="key"){we(e),z("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",w),we(null);break}}e.ref!==null&&(we(e),z("Invalid attribute `ref` supplied to `React.Fragment`."),we(null))}}var _r={};function Pr(e,u,v,w,V,q){{var $=ve(e);if(!$){var L="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(L+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ae=Ct();ae?L+=ae:L+=Er();var X;e===null?X="null":Je(e)?X="array":e!==void 0&&e.$$typeof===l?(X="<"+(ee(e.type)||"Unknown")+" />",L=" Did you accidentally export a JSX literal instead of a component?"):X=typeof e,z("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",X,L)}var G=wt(e,u,v,V,q);if(G==null)return G;if($){var ce=u.children;if(ce!==void 0)if(w)if(Je(ce)){for(var Ce=0;Ce<ce.length;Ce++)Or(ce[Ce],e);Object.freeze&&Object.freeze(ce)}else z("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Or(ce,e)}if(Se.call(u,"key")){var be=ee(e),le=Object.keys(u).filter(function(kt){return kt!=="key"}),Ge=le.length>0?"{key: someKey, "+le.join(": ..., ")+": ...}":"{key: someKey}";if(!_r[be+Ge]){var Rt=le.length>0?"{"+le.join(": ..., ")+": ...}":"{}";z(`A props object containing a "key" prop is being spread into JSX:
|
|
27
26
|
let props = %s;
|
|
28
27
|
<%s {...props} />
|
|
29
28
|
React keys must be passed directly to JSX without using spread:
|
|
30
29
|
let props = %s;
|
|
31
|
-
<%s key={someKey} {...props} />`,Ge,be,Pt,be),Or[be+Ge]=!0}}return e===t?Tt(G):Et(G),G}}function St(e,s,p){return Rr(e,s,p,!0)}function _t(e,s,p){return Rr(e,s,p,!1)}var Ot=_t,Rt=St;Ce.Fragment=t,Ce.jsx=Ot,Ce.jsxs=Rt}()),Ce}var tr;function Nr(){return tr||(tr=1,process.env.NODE_ENV==="production"?_e.exports=Lr():_e.exports=Mr()),_e.exports}var o=Nr();const Ir=({isOpen:r,onClose:c,onConfirm:n,header:t,question:i})=>r?o.jsx("div",{id:"default-modal",tabIndex:-1,"aria-hidden":"true",className:"fixed top-0 right-0 left-0 z-10 w-full md:inset-0 h-full max-h-full overflow-y-auto overflow-x-hidden flex justify-center items-center bg-[rgb(0,0,0,0.6)]",children:o.jsx("div",{className:"relative p-4 w-full max-w-2xl max-h-full",children:o.jsxs("div",{className:"relative bg-white rounded-lg shadow-sm dark:bg-gray-700",children:[o.jsxs("div",{className:"flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600 border-gray-200",children:[o.jsxs("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:[t," "]}),o.jsxs("button",{type:"button",className:"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 inline-flex justify-center items-center",onClick:c,children:[o.jsx("svg",{className:"w-3 h-3","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14",children:o.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})}),o.jsx("span",{className:"sr-only",children:"Close modal"})]})]}),o.jsx("div",{className:"p-4 md:p-5 space-y-4",children:o.jsxs("p",{className:"text-base leading-relaxed text-gray-500 dark:text-gray-400",children:[i," "]})}),o.jsxs("div",{className:"flex items-center p-4 md:p-5 border-t border-gray-200 rounded-b dark:border-gray-600",children:[o.jsx("button",{onClick:()=>{n(),c()},type:"button",className:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",children:"Yes "}),o.jsx("button",{onClick:c,type:"button",className:"py-2.5 px-5 ms-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700",children:"Cancel"})]})]})})}):null,zr=({items:r,isVisible:c,position:n,messageId:t,isCurrentUserMessage:i})=>o.jsx(he.AnimatePresence,{children:c&&o.jsx(he.motion.div,{initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-10},transition:{duration:.2,ease:"easeOut"},className:"absolute z-20 bg-white shadow-lg rounded-md p-2 px-1 w-42",style:{top:n.y,left:n.x},children:r.map((a,g)=>a!=null&&a.onlyCurrentUserMessage&&!i?null:o.jsxs("button",{className:"cursor-pointer flex items-center gap-2 w-full rounded-md text-left px-2 py-1 hover:bg-gray-200",onClick:()=>a.onClick(t),children:[x.cloneElement(a.icon,{className:"text-black",size:18})," ",o.jsx("span",{className:"ml-2 text-black",children:a.name})]},g))})}),$r=()=>o.jsx("svg",{width:"21",height:"22",viewBox:"0 0 21 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M9.77169 2.74358C12.1132 0.399998 15.9121 0.399998 18.2553 2.74314C20.5384 5.02621 20.5969 8.69142 18.4309 11.0454L18.2428 11.2427L9.44273 20.0409L9.40616 20.0712C7.94492 21.3879 5.69092 21.3432 4.28355 19.9358C2.96453 18.6168 2.84241 16.5541 3.9172 15.0974C3.94054 15.0521 3.96879 15.0083 4.002 14.9672L4.05556 14.9075L4.14247 14.8198L4.28355 14.6719L4.28647 14.6748L11.7222 7.22047C11.9881 6.95385 12.4047 6.92909 12.6986 7.14656L12.7829 7.21906C13.0495 7.48497 13.0742 7.9016 12.8568 8.19551L12.7843 8.27972L5.18966 15.8928C4.47202 16.7684 4.5219 18.0627 5.3393 18.8801C6.16836 19.7091 7.48801 19.7486 8.3638 18.9985L17.1965 10.1681C18.952 8.41041 18.952 5.56116 17.1946 3.8038C15.4922 2.10136 12.765 2.04816 10.9986 3.6442L10.8307 3.8038L10.8181 3.81812L1.28179 13.3544C0.988902 13.6473 0.514028 13.6473 0.221135 13.3544C-0.0451319 13.0882 -0.0693378 12.6715 0.148517 12.3779L0.221135 12.2938L9.77001 2.74314L9.77169 2.74358Z",fill:"#8A8A8A"})}),Dr=()=>o.jsx("svg",{width:"14",height:"20",viewBox:"0 0 14 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M13.25 9C13.6297 9 13.9435 9.28215 13.9932 9.64823L14 9.75V10.25C14 13.8094 11.245 16.7254 7.75098 16.9817L7.75 19.25C7.75 19.6642 7.41421 20 7 20C6.6203 20 6.30651 19.7178 6.25685 19.3518L6.25 19.25L6.25002 16.9818C2.83323 16.7316 0.122835 13.938 0.00406027 10.4863L0 10.25V9.75C0 9.33579 0.335786 9 0.75 9C1.1297 9 1.44349 9.28215 1.49315 9.64823L1.5 9.75V10.25C1.5 13.077 3.73445 15.3821 6.5336 15.4956L6.75 15.5H7.25C10.077 15.5 12.3821 13.2656 12.4956 10.4664L12.5 10.25V9.75C12.5 9.33579 12.8358 9 13.25 9ZM7 0C9.20914 0 11 1.79086 11 4V10C11 12.2091 9.20914 14 7 14C4.79086 14 3 12.2091 3 10V4C3 1.79086 4.79086 0 7 0ZM7 1.5C5.61929 1.5 4.5 2.61929 4.5 4V10C4.5 11.3807 5.61929 12.5 7 12.5C8.38071 12.5 9.5 11.3807 9.5 10V4C9.5 2.61929 8.38071 1.5 7 1.5Z",fill:"#fff"})}),or=()=>o.jsx("svg",{width:"17",height:"17",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M10.8147 10.1974L3.28344 11.4526C3.10705 11.482 2.95979 11.6034 2.89723 11.7709L0.299335 18.7283C0.0506615 19.3678 0.720085 19.9778 1.33375 19.671L19.3337 10.671C19.8865 10.3946 19.8865 9.60573 19.3337 9.32933L1.33375 0.329334C0.720085 0.0225017 0.0506615 0.632543 0.299335 1.27199L2.89723 8.22938C2.95979 8.39691 3.10705 8.51827 3.28344 8.54767L10.8147 9.80287C10.9236 9.82103 10.9972 9.92408 10.9791 10.033C10.965 10.1173 10.899 10.1834 10.8147 10.1974Z",fill:"#fff"})}),Le=r=>o.jsx("svg",{width:"17px",height:"22px",viewBox:"0 0 9 20",...r,children:o.jsxs("g",{fill:"none",children:[o.jsx("path",{className:"background",fill:"#ffffff",d:"M8,1 L9,1 L9,20 L8,20 L8,18 C7.807,15.161 7.124,12.233 5.950,9.218 C5.046,6.893 3.504,4.733 1.325,2.738 L1.325,2.738 C0.917,2.365 0.89,1.732 1.263,1.325 C1.452,1.118 1.72,1 2,1 L8,1 Z"}),o.jsx("path",{className:" fill-gray-200",d:"M9,1 L2,1 C1.72,1 1.452,1.118 1.263,1.325 C0.89,1.732 0.917,2.365 1.325,2.738 C3.504,4.733 5.046,6.893 5.95,9.218 C7.124,12.233 7.807,15.161 8,18 L8,20 L9,20 L9,1 Z M2,0 L9,0 L9,20 L7,20 L7,20 L7.002,18.068 C6.816,15.333 6.156,12.504 5.018,9.58 C4.172,7.406 2.72,5.371 0.649,3.475 C-0.165,2.729 -0.221,1.464 0.525,0.649 C0.904,0.236 1.439,0 2,0 Z"}),o.jsx("path",{className:"border_2x",d:"M9,1 L2,1 C1.72,1 1.452,1.118 1.263,1.325 C0.89,1.732 0.917,2.365 1.325,2.738 C3.504,4.733 5.046,6.893 5.95,9.218 C7.124,12.233 7.807,15.161 8,18 L8,20 L9,20 L9,1 Z M2,0.5 L9,0.5 L9,20 L7.5,20 L7.5,20 L7.501,18.034 C7.312,15.247 6.64,12.369 5.484,9.399 C4.609,7.15 3.112,5.052 0.987,3.106 C0.376,2.547 0.334,1.598 0.894,0.987 C1.178,0.677 1.579,0.5 2,0.5 Z"}),o.jsx("path",{className:"border_3x",d:"M9,1 L2,1 C1.72,1 1.452,1.118 1.263,1.325 C0.89,1.732 0.917,2.365 1.325,2.738 C3.504,4.733 5.046,6.893 5.95,9.218 C7.124,12.233 7.807,15.161 8,18 L8,20 L9,20 L9,1 Z M2,0.667 L9,0.667 L9,20 L7.667,20 L7.667,20 L7.668,18.023 C7.477,15.218 6.802,12.324 5.64,9.338 C4.755,7.064 3.243,4.946 1.1,2.983 C0.557,2.486 0.52,1.643 1.017,1.1 C1.269,0.824 1.626,0.667 2,0.667 Z"})]})}),Ar=({onSendMessage:r,onSendVoice:c,onFileSend:n,dynamicSymbolAssignments:t})=>{const[i,a]=x.useState(""),[g,y]=x.useState(!1),[h,m]=x.useState(0),[v,b]=x.useState(null),[O,A]=x.useState(null),[H,M]=x.useState(0),B=x.useRef(null),U=x.useRef([]),V=x.useRef(null),C=x.useRef(null),Z=x.useRef(null),[u,J]=x.useState(!1),oe=_=>{const N=_.target.value;a(N);const I=N.match(/(\S+)$/);if(I){const ne=I[0];if(v){const l=I[0].split(v)[1];A(l)}t!=null&&t.some(l=>l.symbol===ne)&&b(ne)}else b(null)},K=(_,N)=>{a(I=>I+N+" "),b(null),C.current.focus()},le=()=>{i.trim()!==""&&(r(i),a(""),b(null))},pe=async()=>{y(!0),m(0),U.current=[],V.current=setInterval(()=>{m(I=>I+1)},1e3);const _=await navigator.mediaDevices.getUserMedia({audio:!0}),N=new MediaRecorder(_);B.current=N,N.ondataavailable=I=>{I.data.size>0&&U.current.push(I.data)},N.onstop=()=>{clearInterval(V.current);const I=new Blob(U.current,{type:"audio/mp3"}),ne=URL.createObjectURL(I);c(ne),y(!1)},N.start()},ge=()=>{var _;(_=B.current)==null||_.stop()},de=()=>{var _;(_=Z.current)==null||_.click()},ee=_=>{var I;const N=(I=_.target.files)==null?void 0:I[0];N&&n(N)},Q=_=>{const N=Math.floor(_/60),I=_%60;return`${N.toString().padStart(2,"0")}:${I.toString().padStart(2,"0")}`},fe=_=>{const{scrollTop:N,scrollHeight:I,clientHeight:ne}=_.currentTarget;if(N>H){if(N+ne>=I-1){const d=t==null?void 0:t.find(k=>k.symbol===v);d&&(d!=null&&d.updatePageNumber)&&(J(!0),d==null||d.updatePageNumber(d.pagNumber+1),M(N),setTimeout(()=>{J(!1)},500))}}else M(N)};return o.jsxs("div",{className:"absolute bottom-0 w-full flex items-center p-2 pr-4 z-10",children:[g?o.jsxs("div",{className:"w-full flex justify-between items-center bg-white p-2 pl-4 h-11 rounded-3xl ",children:[o.jsx("span",{className:"text-blue-400 font-bold flex-1",children:Q(h)}),o.jsx("button",{className:"cursor-pointer p-2 flex justify-center items-center bg-green-500 text-white rounded-full",onClick:ge,children:o.jsx(or,{})})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"w-[90%] relative ",children:[o.jsx("div",{onClick:de,className:"cursor-pointer absolute right-4 top-[11px]",children:o.jsx($r,{})}),o.jsx("input",{type:"file",ref:Z,style:{display:"none"},onChange:ee}),o.jsx("input",{type:"text",ref:C,className:"w-full bg-white flex-1 p-2 pl-4 border border-gray-300 outline-none rounded-tl-3xl rounded-tr-2xl rounded-bl-3xl ",placeholder:"Type a message...",value:i,onChange:oe,onKeyDown:_=>{_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),le())}}),o.jsx(Le,{className:"rotate-180 absolute -right-[11.4px] top-5"})]}),o.jsx("button",{className:"flex items-center justify-center cursor-pointer w-9 h-9 ml-2 p-2 bg-blue-500 text-white rounded-full hover:bg-blue-600 transition",onClick:i?le:pe,children:i?o.jsx(or,{}):o.jsx(Dr,{})})]}),v&&o.jsxs("div",{className:"absolute bottom-full left-0 w-full bg-white shadow-xl rounded-lg border border-gray-200 p-4 z-50 max-h-60 overflow-y-auto",onScroll:fe,children:[o.jsxs("div",{className:"flex justify-between items-center border-b pb-2 mb-2",children:[o.jsxs("h3",{className:"text-lg font-semibold text-gray-800",children:["Select an item for"," ",o.jsx("span",{className:"text-blue-500",children:v})]}),o.jsx("button",{className:"text-gray-500 hover:text-gray-700",onClick:()=>b(null),children:"✕"})]}),o.jsxs("div",{className:"space-y-2",children:[t?t.filter(_=>_.symbol===v).map(_=>{var ne;const{component:N,lists:I}=_;return N?O?(ne=I==null?void 0:I.filter(l=>l==null?void 0:l.name.includes(O)))==null?void 0:ne.map((l,d)=>o.jsx("div",{className:"hover:bg-gray-100 rounded-md p-2 cursor-pointer",children:o.jsx(N,{listsProps:l,onClick:(k,j)=>K(k,j)})},d)):I==null?void 0:I.map((l,d)=>o.jsx("div",{className:"hover:bg-gray-100 rounded-md p-2 cursor-pointer",children:o.jsx(N,{listsProps:l,onClick:(k,j)=>K(k,j)})},d)):null}):null,o.jsx("div",{className:"h-8",children:u&&"Loading more items..."})]})]})]})};var ye=(r=>(r[r.File=0]="File",r[r.Voice=1]="Voice",r[r.Video=2]="Video",r[r.Image=3]="Image",r))(ye||{});const nr=({fileName:r,fileSize:c,format:n,src:t})=>{const i=()=>({rar:o.jsx("p",{className:"p-2 text-green-500 font-bold",children:n}),zip:o.jsx("p",{className:"p-2 text-blue-500 font-bold",children:n}),pdf:o.jsx("p",{className:"p-2 text-red-500 font-bold",children:n}),doc:o.jsx("p",{className:"p-2 text-blue-400 font-bold",children:n}),vid:o.jsx("p",{className:"p-2 text-orange-400 font-bold",children:n}),"":o.jsx("p",{className:"p-2 text-black font-bold",children:n})})[n||""],a=g=>g>1048576?(g/1048576).toFixed(1)+" MB":(g/1024).toFixed(1)+" KB";return o.jsxs("div",{className:"flex items-center rounded-lg",children:[o.jsx("div",{className:"mr-3 relative border border-green-950 rounded-md p-3",children:i()}),o.jsxs("div",{className:"flex flex-col flex-grow",children:[o.jsx("a",{href:t,download:r,className:"text-gray-900 font-medium hover:underline",children:r}),o.jsx("span",{className:"text-gray-600 text-sm",children:a(c)})]}),o.jsx("a",{href:t,download:r,className:"ml-2 bg-green-500 text-white px-2 py-1 text-sm rounded hover:bg-green-600",children:"Download"})]})},Fr=r=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-play",...r,children:o.jsx("polygon",{points:"6 3 20 12 6 21 6 3"})}),Wr=r=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-pause",...r,children:[o.jsx("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"}),o.jsx("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"})]});let Ee=null;const Yr=({src:r,className:c})=>{const[n,t]=x.useState(!1),[i,a]=x.useState(0),g=x.useRef(null);x.useEffect(()=>{const h=g.current;if(!h)return;const m=()=>{a(h.currentTime/h.duration*100)},v=()=>t(!0),b=()=>t(!1),O=()=>{t(!1),a(0)};return h.addEventListener("timeupdate",m),h.addEventListener("play",v),h.addEventListener("pause",b),h.addEventListener("ended",O),()=>{h.removeEventListener("timeupdate",m),h.removeEventListener("play",v),h.removeEventListener("pause",b),h.removeEventListener("ended",O)}},[]);const y=()=>{const h=g.current;h&&(n?h.pause():(Ee&&Ee!==h&&(Ee.pause(),Ee.currentTime=0),h.play(),Ee=h))};return o.jsxs("div",{className:`flex items-center gap-2 py-2 pl-1 text-white rounded-xl w-full max-w-sm ${c}`,children:[o.jsx("button",{className:"w-9 h-9 cursor-pointer flex items-center justify-center pl-[1.5px] bg-gray-700 rounded-full hover:bg-gray-600",onClick:y,children:n?o.jsx(Wr,{}):o.jsx(Fr,{})}),o.jsx("div",{className:"relative flex-1 h-2 bg-gray-700 rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-blue-500 transition-all",style:{width:`${i}%`}})}),o.jsx("audio",{ref:g,src:r})]})},Vr=({attachment:r,attachmentType:c})=>{if(r)return c===ye.Voice?o.jsx("div",{className:"w-full",children:o.jsx(Yr,{src:r})}):c===ye.Image?o.jsx("div",{className:"w-full",children:o.jsx("img",{src:r})}):c===ye.File?o.jsx("div",{className:"w-full mt-1",children:o.jsx(nr,{fileName:"productivity",fileSize:23e3,format:"rar",src:r})}):c===ye.Video?o.jsx("div",{className:"w-full mt-1",children:o.jsx(nr,{fileName:"productivity",fileSize:23e3,format:"rar",src:r})}):null},Ur=({message:r,showUserProfile:c,handleContextMenu:n,media:t})=>{var i,a,g,y,h;return o.jsxs(o.Fragment,{children:[c?o.jsx("img",{src:r.user.profileImageUrl,className:"w-12 h-12 bg-gray-300 rounded-full"}):null,o.jsxs(he.motion.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},transition:{duration:.3},onContextMenu:m=>n(m,r),className:`relative ${t?"w-3/4":"w-fit max-w-3/4"}flex flex-col gap-1 md:max-w-[400px] p-2 pt-5 rounded-lg bg-green-200`,children:[o.jsx("span",{className:"absolute top-1 text-xs text-orange-700",children:(i=r.user)!=null&&i.fullName&&((g=(a=r.user)==null?void 0:a.fullName)==null?void 0:g.length)>16?(y=r.user)==null?void 0:y.firstName:(h=r.user)==null?void 0:h.fullName}),t||null,o.jsx("span",{children:r.text}),o.jsx("div",{className:"w-full flex gap- items-center justify-end",children:o.jsx("span",{className:"text-[10px]",children:new Date(r.createdDate).toLocaleTimeString().split(":")[0]+":"+new Date(r.createdDate).toLocaleTimeString().split(":")[1]})}),o.jsx(Le,{className:"fill-blue-200 -rotate-180 scale-x-[-1] transition-discrete absolute -left-2 bottom-0 [&>g>path]:fill-green-200"})]})]})},qr=()=>o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o.jsx("path",{d:"M11.6619 4.6478C11.8358 4.83691 11.8272 5.1347 11.6427 5.31294L4.36284 12.3463C4.14493 12.5568 3.80285 12.5503 3.59268 12.3317L1.13205 9.77168C0.954124 9.58658 0.956276 9.28866 1.13686 9.10628C1.31743 8.92389 1.60806 8.9261 1.78598 9.1112L3.99455 11.4089L11.013 4.62812C11.1975 4.44988 11.488 4.4587 11.6619 4.6478Z",fill:"gray"}),o.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.8759 4.64963C15.0492 4.83921 15.0399 5.13698 14.8549 5.31471L7.51066 12.3726C7.32572 12.5503 7.03524 12.5407 6.86185 12.3511C6.68847 12.1616 6.69784 11.8638 6.88278 11.6861L14.227 4.62818C14.412 4.45045 14.7025 4.46005 14.8759 4.64963Z",fill:"gray"})]}),Br=({handleContextMenu:r,media:c,message:n})=>o.jsxs(he.motion.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},transition:{duration:.3},onContextMenu:t=>r(t,n),className:`relative self-end ${c?"w-3/4":"max-w-3/4"} flex flex-col justify-center md:max-w-[400px] p-2 rounded-lg bg-blue-200`,children:[c||null,o.jsx("span",{children:n.text}),o.jsxs("div",{className:"w-full flex gap-1 items-center justify-end",children:[o.jsx("span",{className:"text-[10px]",children:new Date(n.createdDate).toLocaleTimeString().split(":")[0]+":"+new Date(n.createdDate).toLocaleTimeString().split(":")[1]}),o.jsx(qr,{})]}),o.jsx(Le,{className:"fill-blue-200 rotate-180 absolute -right-2 bottom-0 [&>g>path]:fill-blue-200"})]});var Oe={exports:{}},Re={exports:{}},F={};/** @license React v16.13.1
|
|
30
|
+
<%s key={someKey} {...props} />`,Ge,be,Rt,be),_r[be+Ge]=!0}}return e===t?Tt(G):Et(G),G}}function St(e,u,v){return Pr(e,u,v,!0)}function Ot(e,u,v){return Pr(e,u,v,!1)}var _t=Ot,Pt=St;Ee.Fragment=t,Ee.jsx=_t,Ee.jsxs=Pt}()),Ee}var rr;function Nr(){return rr||(rr=1,process.env.NODE_ENV==="production"?_e.exports=kr():_e.exports=Lr()),_e.exports}var n=Nr();const Ir=({isOpen:r,onClose:l,onConfirm:o,header:t,question:a})=>r?n.jsx("div",{id:"default-modal",tabIndex:-1,"aria-hidden":"true",className:"fixed top-0 right-0 left-0 z-10 w-full md:inset-0 h-full max-h-full overflow-y-auto overflow-x-hidden flex justify-center items-center bg-[rgb(0,0,0,0.6)]",children:n.jsx("div",{className:"relative p-4 w-full max-w-2xl max-h-full",children:n.jsxs("div",{className:"relative bg-white rounded-lg shadow-sm dark:bg-gray-700",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600 border-gray-200",children:[n.jsxs("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:[t," "]}),n.jsxs("button",{type:"button",className:"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 inline-flex justify-center items-center",onClick:l,children:[n.jsx("svg",{className:"w-3 h-3","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14",children:n.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})}),n.jsx("span",{className:"sr-only",children:"Close modal"})]})]}),n.jsx("div",{className:"p-4 md:p-5 space-y-4",children:n.jsxs("p",{className:"text-base leading-relaxed text-gray-500 dark:text-gray-400",children:[a," "]})}),n.jsxs("div",{className:"flex items-center p-4 md:p-5 border-t border-gray-200 rounded-b dark:border-gray-600",children:[n.jsx("button",{onClick:()=>{o(),l()},type:"button",className:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",children:"Yes "}),n.jsx("button",{onClick:l,type:"button",className:"py-2.5 px-5 ms-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700",children:"Cancel"})]})]})})}):null,Mr=({items:r,isVisible:l,position:o,messageId:t,isCurrentUserMessage:a})=>n.jsx(pe.AnimatePresence,{children:l&&n.jsx(pe.motion.div,{initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-10},transition:{duration:.2,ease:"easeOut"},className:"absolute z-20 bg-white shadow-lg rounded-md p-2 px-1 w-42",style:{top:o.y,left:o.x},children:r.map((i,h)=>i!=null&&i.onlyCurrentUserMessage&&!a?null:n.jsxs("button",{className:"cursor-pointer flex items-center gap-2 w-full rounded-md text-left px-2 py-1 hover:bg-gray-200",onClick:()=>i.onClick(t),children:[m.cloneElement(i.icon,{className:"text-black",size:18})," ",n.jsx("span",{className:"ml-2 text-black",children:i.name})]},h))})}),Dr=()=>n.jsx("svg",{width:"21",height:"22",viewBox:"0 0 21 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M9.77169 2.74358C12.1132 0.399998 15.9121 0.399998 18.2553 2.74314C20.5384 5.02621 20.5969 8.69142 18.4309 11.0454L18.2428 11.2427L9.44273 20.0409L9.40616 20.0712C7.94492 21.3879 5.69092 21.3432 4.28355 19.9358C2.96453 18.6168 2.84241 16.5541 3.9172 15.0974C3.94054 15.0521 3.96879 15.0083 4.002 14.9672L4.05556 14.9075L4.14247 14.8198L4.28355 14.6719L4.28647 14.6748L11.7222 7.22047C11.9881 6.95385 12.4047 6.92909 12.6986 7.14656L12.7829 7.21906C13.0495 7.48497 13.0742 7.9016 12.8568 8.19551L12.7843 8.27972L5.18966 15.8928C4.47202 16.7684 4.5219 18.0627 5.3393 18.8801C6.16836 19.7091 7.48801 19.7486 8.3638 18.9985L17.1965 10.1681C18.952 8.41041 18.952 5.56116 17.1946 3.8038C15.4922 2.10136 12.765 2.04816 10.9986 3.6442L10.8307 3.8038L10.8181 3.81812L1.28179 13.3544C0.988902 13.6473 0.514028 13.6473 0.221135 13.3544C-0.0451319 13.0882 -0.0693378 12.6715 0.148517 12.3779L0.221135 12.2938L9.77001 2.74314L9.77169 2.74358Z",fill:"#8A8A8A"})}),$r=()=>n.jsx("svg",{width:"14",height:"20",viewBox:"0 0 14 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M13.25 9C13.6297 9 13.9435 9.28215 13.9932 9.64823L14 9.75V10.25C14 13.8094 11.245 16.7254 7.75098 16.9817L7.75 19.25C7.75 19.6642 7.41421 20 7 20C6.6203 20 6.30651 19.7178 6.25685 19.3518L6.25 19.25L6.25002 16.9818C2.83323 16.7316 0.122835 13.938 0.00406027 10.4863L0 10.25V9.75C0 9.33579 0.335786 9 0.75 9C1.1297 9 1.44349 9.28215 1.49315 9.64823L1.5 9.75V10.25C1.5 13.077 3.73445 15.3821 6.5336 15.4956L6.75 15.5H7.25C10.077 15.5 12.3821 13.2656 12.4956 10.4664L12.5 10.25V9.75C12.5 9.33579 12.8358 9 13.25 9ZM7 0C9.20914 0 11 1.79086 11 4V10C11 12.2091 9.20914 14 7 14C4.79086 14 3 12.2091 3 10V4C3 1.79086 4.79086 0 7 0ZM7 1.5C5.61929 1.5 4.5 2.61929 4.5 4V10C4.5 11.3807 5.61929 12.5 7 12.5C8.38071 12.5 9.5 11.3807 9.5 10V4C9.5 2.61929 8.38071 1.5 7 1.5Z",fill:"#fff"})}),tr=()=>n.jsx("svg",{width:"17",height:"17",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M10.8147 10.1974L3.28344 11.4526C3.10705 11.482 2.95979 11.6034 2.89723 11.7709L0.299335 18.7283C0.0506615 19.3678 0.720085 19.9778 1.33375 19.671L19.3337 10.671C19.8865 10.3946 19.8865 9.60573 19.3337 9.32933L1.33375 0.329334C0.720085 0.0225017 0.0506615 0.632543 0.299335 1.27199L2.89723 8.22938C2.95979 8.39691 3.10705 8.51827 3.28344 8.54767L10.8147 9.80287C10.9236 9.82103 10.9972 9.92408 10.9791 10.033C10.965 10.1173 10.899 10.1834 10.8147 10.1974Z",fill:"#fff"})}),Le=r=>n.jsx("svg",{width:"17px",height:"22px",viewBox:"0 0 9 20",...r,children:n.jsxs("g",{fill:"none",children:[n.jsx("path",{className:"background",fill:"#ffffff",d:"M8,1 L9,1 L9,20 L8,20 L8,18 C7.807,15.161 7.124,12.233 5.950,9.218 C5.046,6.893 3.504,4.733 1.325,2.738 L1.325,2.738 C0.917,2.365 0.89,1.732 1.263,1.325 C1.452,1.118 1.72,1 2,1 L8,1 Z"}),n.jsx("path",{className:" fill-gray-200",d:"M9,1 L2,1 C1.72,1 1.452,1.118 1.263,1.325 C0.89,1.732 0.917,2.365 1.325,2.738 C3.504,4.733 5.046,6.893 5.95,9.218 C7.124,12.233 7.807,15.161 8,18 L8,20 L9,20 L9,1 Z M2,0 L9,0 L9,20 L7,20 L7,20 L7.002,18.068 C6.816,15.333 6.156,12.504 5.018,9.58 C4.172,7.406 2.72,5.371 0.649,3.475 C-0.165,2.729 -0.221,1.464 0.525,0.649 C0.904,0.236 1.439,0 2,0 Z"}),n.jsx("path",{className:"border_2x",d:"M9,1 L2,1 C1.72,1 1.452,1.118 1.263,1.325 C0.89,1.732 0.917,2.365 1.325,2.738 C3.504,4.733 5.046,6.893 5.95,9.218 C7.124,12.233 7.807,15.161 8,18 L8,20 L9,20 L9,1 Z M2,0.5 L9,0.5 L9,20 L7.5,20 L7.5,20 L7.501,18.034 C7.312,15.247 6.64,12.369 5.484,9.399 C4.609,7.15 3.112,5.052 0.987,3.106 C0.376,2.547 0.334,1.598 0.894,0.987 C1.178,0.677 1.579,0.5 2,0.5 Z"}),n.jsx("path",{className:"border_3x",d:"M9,1 L2,1 C1.72,1 1.452,1.118 1.263,1.325 C0.89,1.732 0.917,2.365 1.325,2.738 C3.504,4.733 5.046,6.893 5.95,9.218 C7.124,12.233 7.807,15.161 8,18 L8,20 L9,20 L9,1 Z M2,0.667 L9,0.667 L9,20 L7.667,20 L7.667,20 L7.668,18.023 C7.477,15.218 6.802,12.324 5.64,9.338 C4.755,7.064 3.243,4.946 1.1,2.983 C0.557,2.486 0.52,1.643 1.017,1.1 C1.269,0.824 1.626,0.667 2,0.667 Z"})]})}),Ar=({onSendMessage:r,onSendVoice:l,onFileSend:o,dynamicSymbolAssignments:t})=>{const[a,i]=m.useState(""),[h,g]=m.useState(!1),[p,x]=m.useState(0),[y,b]=m.useState(null),[P,F]=m.useState(null),[H,N]=m.useState(0),B=m.useRef(null),U=m.useRef([]),z=m.useRef(null),E=m.useRef(null),Z=m.useRef(null),[c,J]=m.useState(!1),ne=_=>{const I=_.target.value;i(I);const M=I.match(/(\S+)$/);if(M){const oe=M[0];if(y){const s=M[0].split(y)[1];F(s)}t!=null&&t.some(s=>s.symbol===oe)&&b(oe)}else b(null)},K=(_,I)=>{i(M=>M+I+" "),b(null),E.current.focus()},se=()=>{a.trim()!==""&&(r(a),i(""),b(null))},ve=async()=>{g(!0),x(0),U.current=[],z.current=setInterval(()=>{x(M=>M+1)},1e3);const _=await navigator.mediaDevices.getUserMedia({audio:!0}),I=new MediaRecorder(_);B.current=I,I.ondataavailable=M=>{M.data.size>0&&U.current.push(M.data)},I.onstop=()=>{clearInterval(z.current);const M=new Blob(U.current,{type:"audio/mp3"}),oe=URL.createObjectURL(M);l(oe),g(!1)},I.start()},he=()=>{var _;(_=B.current)==null||_.stop()},fe=()=>{var _;(_=Z.current)==null||_.click()},ee=_=>{var M;const I=(M=_.target.files)==null?void 0:M[0];I&&o(I)},Q=_=>{const I=Math.floor(_/60),M=_%60;return`${I.toString().padStart(2,"0")}:${M.toString().padStart(2,"0")}`},de=_=>{const{scrollTop:I,scrollHeight:M,clientHeight:oe}=_.currentTarget;if(I>H){if(I+oe>=M-1){const f=t==null?void 0:t.find(C=>C.symbol===y);f&&(f!=null&&f.updatePageNumber)&&(J(!0),f==null||f.updatePageNumber(f.pagNumber+1),N(I),setTimeout(()=>{J(!1)},500))}}else N(I)};return n.jsxs("div",{className:"absolute bottom-0 w-full flex items-center p-2 pr-4 z-10",children:[h?n.jsxs("div",{className:"w-full flex justify-between items-center bg-white p-2 pl-4 h-11 rounded-3xl ",children:[n.jsx("span",{className:"text-blue-400 font-bold flex-1",children:Q(p)}),n.jsx("button",{className:"cursor-pointer p-2 flex justify-center items-center bg-green-500 text-white rounded-full",onClick:he,children:n.jsx(tr,{})})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"w-[90%] relative ",children:[n.jsx("div",{onClick:fe,className:"cursor-pointer absolute right-4 top-[11px]",children:n.jsx(Dr,{})}),n.jsx("input",{type:"file",ref:Z,style:{display:"none"},onChange:ee}),n.jsx("input",{type:"text",ref:E,className:"w-full bg-white flex-1 p-2 pl-4 border border-gray-300 outline-none rounded-tl-3xl rounded-tr-2xl rounded-bl-3xl ",placeholder:"Type a message...",value:a,onChange:ne,onKeyDown:_=>{_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),se())}}),n.jsx(Le,{className:"rotate-180 absolute -right-[11.4px] top-5"})]}),n.jsx("button",{className:"flex items-center justify-center cursor-pointer w-9 h-9 ml-2 p-2 bg-blue-500 text-white rounded-full hover:bg-blue-600 transition",onClick:a?se:ve,children:a?n.jsx(tr,{}):n.jsx($r,{})})]}),y&&n.jsxs("div",{className:"absolute bottom-full left-0 w-full bg-white shadow-xl rounded-lg border border-gray-200 p-4 z-50 max-h-60 overflow-y-auto",onScroll:de,children:[n.jsxs("div",{className:"flex justify-between items-center border-b pb-2 mb-2",children:[n.jsxs("h3",{className:"text-lg font-semibold text-gray-800",children:["Select an item for"," ",n.jsx("span",{className:"text-blue-500",children:y})]}),n.jsx("button",{className:"text-gray-500 hover:text-gray-700",onClick:()=>b(null),children:"✕"})]}),n.jsxs("div",{className:"space-y-2",children:[t?t.filter(_=>_.symbol===y).map(_=>{var oe;const{component:I,lists:M}=_;return I?P?(oe=M==null?void 0:M.filter(s=>s==null?void 0:s.name.includes(P)))==null?void 0:oe.map((s,f)=>n.jsx("div",{className:"hover:bg-gray-100 rounded-md p-2 cursor-pointer",children:n.jsx(I,{listsProps:s,onClick:(C,j)=>K(C,j)})},f)):M==null?void 0:M.map((s,f)=>n.jsx("div",{className:"hover:bg-gray-100 rounded-md p-2 cursor-pointer",children:n.jsx(I,{listsProps:s,onClick:(C,j)=>K(C,j)})},f)):null}):null,n.jsx("div",{className:"h-8",children:c&&"Loading more items..."})]})]})]})};var ge=(r=>(r[r.File=0]="File",r[r.Voice=1]="Voice",r[r.Video=2]="Video",r[r.Image=3]="Image",r))(ge||{});const nr=({fileName:r,fileSize:l,format:o,src:t})=>{const a=()=>({rar:n.jsx("p",{className:"p-2 text-green-500 font-bold",children:o}),zip:n.jsx("p",{className:"p-2 text-blue-500 font-bold",children:o}),pdf:n.jsx("p",{className:"p-2 text-red-500 font-bold",children:o}),doc:n.jsx("p",{className:"p-2 text-blue-400 font-bold",children:o}),vid:n.jsx("p",{className:"p-2 text-orange-400 font-bold",children:o}),"":n.jsx("p",{className:"p-2 text-black font-bold",children:o})})[o||""],i=h=>h>1048576?(h/1048576).toFixed(1)+" MB":(h/1024).toFixed(1)+" KB";return n.jsxs("div",{className:"flex items-center rounded-lg",children:[n.jsx("div",{className:"mr-3 relative border border-green-950 rounded-md p-3",children:a()}),n.jsxs("div",{className:"flex flex-col flex-grow",children:[n.jsx("a",{href:t,download:r,className:"text-gray-900 font-medium hover:underline",children:r}),n.jsx("span",{className:"text-gray-600 text-sm",children:i(l)})]}),n.jsx("a",{href:t,download:r,className:"ml-2 bg-green-500 text-white px-2 py-1 text-sm rounded hover:bg-green-600",children:"Download"})]})},Fr=r=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-play",...r,children:n.jsx("polygon",{points:"6 3 20 12 6 21 6 3"})}),Wr=r=>n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-pause",...r,children:[n.jsx("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"}),n.jsx("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"})]});let Te=null;const Yr=({src:r,className:l})=>{const[o,t]=m.useState(!1),[a,i]=m.useState(0),h=m.useRef(null);m.useEffect(()=>{const p=h.current;if(!p)return;const x=()=>{i(p.currentTime/p.duration*100)},y=()=>t(!0),b=()=>t(!1),P=()=>{t(!1),i(0)};return p.addEventListener("timeupdate",x),p.addEventListener("play",y),p.addEventListener("pause",b),p.addEventListener("ended",P),()=>{p.removeEventListener("timeupdate",x),p.removeEventListener("play",y),p.removeEventListener("pause",b),p.removeEventListener("ended",P)}},[]);const g=()=>{const p=h.current;p&&(o?p.pause():(Te&&Te!==p&&(Te.pause(),Te.currentTime=0),p.play(),Te=p))};return n.jsxs("div",{className:`flex items-center gap-2 py-2 pl-1 text-white rounded-xl w-full max-w-sm ${l}`,children:[n.jsx("button",{className:"w-9 h-9 cursor-pointer flex items-center justify-center pl-[1.5px] bg-gray-700 rounded-full hover:bg-gray-600",onClick:g,children:o?n.jsx(Wr,{}):n.jsx(Fr,{})}),n.jsx("div",{className:"relative flex-1 h-2 bg-gray-700 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full bg-blue-500 transition-all",style:{width:`${a}%`}})}),n.jsx("audio",{ref:h,src:r})]})},Vr=({attachment:r,attachmentType:l})=>{if(r)return l===ge.Voice?n.jsx("div",{className:"w-full",children:n.jsx(Yr,{src:r})}):l===ge.Image?n.jsx("div",{className:"w-full",children:n.jsx("img",{src:r})}):l===ge.File?n.jsx("div",{className:"w-full mt-1",children:n.jsx(nr,{fileName:"productivity",fileSize:23e3,format:"rar",src:r})}):l===ge.Video?n.jsx("div",{className:"w-full mt-1",children:n.jsx(nr,{fileName:"productivity",fileSize:23e3,format:"rar",src:r})}):null},zr=({message:r,showUserProfile:l,handleContextMenu:o,media:t})=>{var a,i,h,g,p;return n.jsxs(n.Fragment,{children:[l?n.jsx("img",{src:r.user.profileImageUrl,className:"w-12 h-12 bg-gray-300 rounded-full"}):null,n.jsxs(pe.motion.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},transition:{duration:.3},onContextMenu:x=>o(x,r),className:`relative ${t?"w-3/4":"w-fit max-w-3/4"}flex flex-col gap-1 md:max-w-[400px] p-2 pt-5 rounded-lg bg-green-200`,children:[n.jsx("span",{className:"absolute top-1 text-xs text-orange-700",children:(a=r.user)!=null&&a.fullName&&((h=(i=r.user)==null?void 0:i.fullName)==null?void 0:h.length)>16?(g=r.user)==null?void 0:g.firstName:(p=r.user)==null?void 0:p.fullName}),t||null,n.jsx("span",{children:r.text}),n.jsx("div",{className:"w-full flex gap- items-center justify-end",children:n.jsx("span",{className:"text-[10px]",children:new Date(r.createdDate).toLocaleTimeString().split(":")[0]+":"+new Date(r.createdDate).toLocaleTimeString().split(":")[1]})}),n.jsx(Le,{className:"fill-blue-200 -rotate-180 scale-x-[-1] transition-discrete absolute -left-2 bottom-0 [&>g>path]:fill-green-200"})]})]})},Ur=()=>n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{d:"M11.6619 4.6478C11.8358 4.83691 11.8272 5.1347 11.6427 5.31294L4.36284 12.3463C4.14493 12.5568 3.80285 12.5503 3.59268 12.3317L1.13205 9.77168C0.954124 9.58658 0.956276 9.28866 1.13686 9.10628C1.31743 8.92389 1.60806 8.9261 1.78598 9.1112L3.99455 11.4089L11.013 4.62812C11.1975 4.44988 11.488 4.4587 11.6619 4.6478Z",fill:"gray"}),n.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.8759 4.64963C15.0492 4.83921 15.0399 5.13698 14.8549 5.31471L7.51066 12.3726C7.32572 12.5503 7.03524 12.5407 6.86185 12.3511C6.68847 12.1616 6.69784 11.8638 6.88278 11.6861L14.227 4.62818C14.412 4.45045 14.7025 4.46005 14.8759 4.64963Z",fill:"gray"})]}),qr=({handleContextMenu:r,media:l,message:o})=>n.jsxs(pe.motion.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},transition:{duration:.3},onContextMenu:t=>r(t,o),className:`relative self-end ${l?"w-3/4":"max-w-3/4"} flex flex-col justify-center md:max-w-[400px] p-2 rounded-lg bg-blue-200`,children:[l||null,n.jsx("span",{children:o.text}),n.jsxs("div",{className:"w-full flex gap-1 items-center justify-end",children:[n.jsx("span",{className:"text-[10px]",children:new Date(o.createdDate).toLocaleTimeString().split(":")[0]+":"+new Date(o.createdDate).toLocaleTimeString().split(":")[1]}),n.jsx(Ur,{})]}),n.jsx(Le,{className:"fill-blue-200 rotate-180 absolute -right-2 bottom-0 [&>g>path]:fill-blue-200"})]});var Pe={exports:{}},Re={exports:{}},W={};/** @license React v16.13.1
|
|
32
31
|
* react-is.production.min.js
|
|
33
32
|
*
|
|
34
33
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
35
34
|
*
|
|
36
35
|
* This source code is licensed under the MIT license found in the
|
|
37
36
|
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var
|
|
37
|
+
*/var or;function Br(){if(or)return W;or=1;var r=typeof Symbol=="function"&&Symbol.for,l=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,t=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,i=r?Symbol.for("react.profiler"):60114,h=r?Symbol.for("react.provider"):60109,g=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,x=r?Symbol.for("react.concurrent_mode"):60111,y=r?Symbol.for("react.forward_ref"):60112,b=r?Symbol.for("react.suspense"):60113,P=r?Symbol.for("react.suspense_list"):60120,F=r?Symbol.for("react.memo"):60115,H=r?Symbol.for("react.lazy"):60116,N=r?Symbol.for("react.block"):60121,B=r?Symbol.for("react.fundamental"):60117,U=r?Symbol.for("react.responder"):60118,z=r?Symbol.for("react.scope"):60119;function E(c){if(typeof c=="object"&&c!==null){var J=c.$$typeof;switch(J){case l:switch(c=c.type,c){case p:case x:case t:case i:case a:case b:return c;default:switch(c=c&&c.$$typeof,c){case g:case y:case H:case F:case h:return c;default:return J}}case o:return J}}}function Z(c){return E(c)===x}return W.AsyncMode=p,W.ConcurrentMode=x,W.ContextConsumer=g,W.ContextProvider=h,W.Element=l,W.ForwardRef=y,W.Fragment=t,W.Lazy=H,W.Memo=F,W.Portal=o,W.Profiler=i,W.StrictMode=a,W.Suspense=b,W.isAsyncMode=function(c){return Z(c)||E(c)===p},W.isConcurrentMode=Z,W.isContextConsumer=function(c){return E(c)===g},W.isContextProvider=function(c){return E(c)===h},W.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===l},W.isForwardRef=function(c){return E(c)===y},W.isFragment=function(c){return E(c)===t},W.isLazy=function(c){return E(c)===H},W.isMemo=function(c){return E(c)===F},W.isPortal=function(c){return E(c)===o},W.isProfiler=function(c){return E(c)===i},W.isStrictMode=function(c){return E(c)===a},W.isSuspense=function(c){return E(c)===b},W.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===t||c===x||c===i||c===a||c===b||c===P||typeof c=="object"&&c!==null&&(c.$$typeof===H||c.$$typeof===F||c.$$typeof===h||c.$$typeof===g||c.$$typeof===y||c.$$typeof===B||c.$$typeof===U||c.$$typeof===z||c.$$typeof===N)},W.typeOf=E,W}var Y={};/** @license React v16.13.1
|
|
39
38
|
* react-is.development.js
|
|
40
39
|
*
|
|
41
40
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
42
41
|
*
|
|
43
42
|
* This source code is licensed under the MIT license found in the
|
|
44
43
|
* LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/var ir;function
|
|
44
|
+
*/var ir;function Zr(){return ir||(ir=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,l=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,t=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,i=r?Symbol.for("react.profiler"):60114,h=r?Symbol.for("react.provider"):60109,g=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,x=r?Symbol.for("react.concurrent_mode"):60111,y=r?Symbol.for("react.forward_ref"):60112,b=r?Symbol.for("react.suspense"):60113,P=r?Symbol.for("react.suspense_list"):60120,F=r?Symbol.for("react.memo"):60115,H=r?Symbol.for("react.lazy"):60116,N=r?Symbol.for("react.block"):60121,B=r?Symbol.for("react.fundamental"):60117,U=r?Symbol.for("react.responder"):60118,z=r?Symbol.for("react.scope"):60119;function E(d){return typeof d=="string"||typeof d=="function"||d===t||d===x||d===i||d===a||d===b||d===P||typeof d=="object"&&d!==null&&(d.$$typeof===H||d.$$typeof===F||d.$$typeof===h||d.$$typeof===g||d.$$typeof===y||d.$$typeof===B||d.$$typeof===U||d.$$typeof===z||d.$$typeof===N)}function Z(d){if(typeof d=="object"&&d!==null){var ue=d.$$typeof;switch(ue){case l:var xe=d.type;switch(xe){case p:case x:case t:case i:case a:case b:return xe;default:var me=xe&&xe.$$typeof;switch(me){case g:case y:case H:case F:case h:return me;default:return ue}}case o:return ue}}}var c=p,J=x,ne=g,K=h,se=l,ve=y,he=t,fe=H,ee=F,Q=o,de=i,_=a,I=b,M=!1;function oe(d){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),s(d)||Z(d)===p}function s(d){return Z(d)===x}function f(d){return Z(d)===g}function C(d){return Z(d)===h}function j(d){return typeof d=="object"&&d!==null&&d.$$typeof===l}function T(d){return Z(d)===y}function D(d){return Z(d)===t}function S(d){return Z(d)===H}function O(d){return Z(d)===F}function R(d){return Z(d)===o}function A(d){return Z(d)===i}function k(d){return Z(d)===a}function ie(d){return Z(d)===b}Y.AsyncMode=c,Y.ConcurrentMode=J,Y.ContextConsumer=ne,Y.ContextProvider=K,Y.Element=se,Y.ForwardRef=ve,Y.Fragment=he,Y.Lazy=fe,Y.Memo=ee,Y.Portal=Q,Y.Profiler=de,Y.StrictMode=_,Y.Suspense=I,Y.isAsyncMode=oe,Y.isConcurrentMode=s,Y.isContextConsumer=f,Y.isContextProvider=C,Y.isElement=j,Y.isForwardRef=T,Y.isFragment=D,Y.isLazy=S,Y.isMemo=O,Y.isPortal=R,Y.isProfiler=A,Y.isStrictMode=k,Y.isSuspense=ie,Y.isValidElementType=E,Y.typeOf=Z}()),Y}var ar;function sr(){return ar||(ar=1,process.env.NODE_ENV==="production"?Re.exports=Br():Re.exports=Zr()),Re.exports}/*
|
|
46
45
|
object-assign
|
|
47
46
|
(c) Sindre Sorhus
|
|
48
47
|
@license MIT
|
|
49
|
-
*/var
|
|
50
|
-
Valid keys: `+JSON.stringify(Object.keys(l),null," "));var f=ae(S,P,E,z,T+"."+P,n);if(f)return f}return null}return B(d)}function Q(l){switch(typeof l){case"number":case"string":case"undefined":return!0;case"boolean":return!l;case"object":if(Array.isArray(l))return l.every(Q);if(l===null||y(l))return!0;var d=b(l);if(d){var k=d.call(l),j;if(d!==l.entries){for(;!(j=k.next()).done;)if(!Q(j.value))return!1}else for(;!(j=k.next()).done;){var E=j.value;if(E&&!Q(E[1]))return!1}}else return!1;return!0;default:return!1}}function fe(l,d){return l==="symbol"?!0:d?d["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&d instanceof Symbol:!1}function _(l){var d=typeof l;return Array.isArray(l)?"array":l instanceof RegExp?"object":fe(d,l)?"symbol":d}function N(l){if(typeof l>"u"||l===null)return""+l;var d=_(l);if(d==="object"){if(l instanceof Date)return"date";if(l instanceof RegExp)return"regexp"}return d}function I(l){var d=N(l);switch(d){case"array":case"object":return"an "+d;case"boolean":case"date":case"regexp":return"a "+d;default:return d}}function ne(l){return!l.constructor||!l.constructor.name?O:l.constructor.name}return A.checkPropTypes=i,A.resetWarningCache=i.resetWarningCache,A.PropTypes=A,A},De}var Ae,gr;function Gr(){if(gr)return Ae;gr=1;var r=Ie();function c(){}function n(){}return n.resetWarningCache=c,Ae=function(){function t(g,y,h,m,v,b){if(b!==r){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}}t.isRequired=t;function i(){return t}var a={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:i,element:t,elementType:t,instanceOf:i,node:t,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:c};return a.PropTypes=a,a},Ae}var vr;function Qr(){if(vr)return Oe.exports;if(vr=1,process.env.NODE_ENV!=="production"){var r=cr(),c=!0;Oe.exports=Xr()(r.isElement,c)}else Oe.exports=Gr()();return Oe.exports}var et=Qr();const te=Pr(et);function Fe(){return Fe=Object.assign||function(r){for(var c=1;c<arguments.length;c++){var n=arguments[c];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},Fe.apply(this,arguments)}function rt(r,c){if(r==null)return{};var n=tt(r,c),t,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(i=0;i<a.length;i++)t=a[i],!(c.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function tt(r,c){if(r==null)return{};var n={},t=Object.keys(r),i,a;for(a=0;a<t.length;a++)i=t[a],!(c.indexOf(i)>=0)&&(n[i]=r[i]);return n}var We=x.forwardRef(function(r,c){var n=r.color,t=n===void 0?"currentColor":n,i=r.size,a=i===void 0?24:i,g=rt(r,["color","size"]);return x.createElement("svg",Fe({ref:c,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},g),x.createElement("polyline",{points:"20 6 9 17 4 12"}))});We.propTypes={color:te.string,size:te.oneOfType([te.string,te.number])},We.displayName="Check";function Ye(){return Ye=Object.assign||function(r){for(var c=1;c<arguments.length;c++){var n=arguments[c];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},Ye.apply(this,arguments)}function ot(r,c){if(r==null)return{};var n=nt(r,c),t,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(i=0;i<a.length;i++)t=a[i],!(c.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function nt(r,c){if(r==null)return{};var n={},t=Object.keys(r),i,a;for(a=0;a<t.length;a++)i=t[a],!(c.indexOf(i)>=0)&&(n[i]=r[i]);return n}var Ve=x.forwardRef(function(r,c){var n=r.color,t=n===void 0?"currentColor":n,i=r.size,a=i===void 0?24:i,g=ot(r,["color","size"]);return x.createElement("svg",Ye({ref:c,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},g),x.createElement("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),x.createElement("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}))});Ve.propTypes={color:te.string,size:te.oneOfType([te.string,te.number])},Ve.displayName="Copy";function Ue(){return Ue=Object.assign||function(r){for(var c=1;c<arguments.length;c++){var n=arguments[c];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},Ue.apply(this,arguments)}function at(r,c){if(r==null)return{};var n=it(r,c),t,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(i=0;i<a.length;i++)t=a[i],!(c.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function it(r,c){if(r==null)return{};var n={},t=Object.keys(r),i,a;for(a=0;a<t.length;a++)i=t[a],!(c.indexOf(i)>=0)&&(n[i]=r[i]);return n}var qe=x.forwardRef(function(r,c){var n=r.color,t=n===void 0?"currentColor":n,i=r.size,a=i===void 0?24:i,g=at(r,["color","size"]);return x.createElement("svg",Ue({ref:c,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},g),x.createElement("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x.createElement("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"}))});qe.propTypes={color:te.string,size:te.oneOfType([te.string,te.number])},qe.displayName="Edit";function Be(){return Be=Object.assign||function(r){for(var c=1;c<arguments.length;c++){var n=arguments[c];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},Be.apply(this,arguments)}function lt(r,c){if(r==null)return{};var n=ct(r,c),t,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(i=0;i<a.length;i++)t=a[i],!(c.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function ct(r,c){if(r==null)return{};var n={},t=Object.keys(r),i,a;for(a=0;a<t.length;a++)i=t[a],!(c.indexOf(i)>=0)&&(n[i]=r[i]);return n}var Ze=x.forwardRef(function(r,c){var n=r.color,t=n===void 0?"currentColor":n,i=r.size,a=i===void 0?24:i,g=lt(r,["color","size"]);return x.createElement("svg",Be({ref:c,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},g),x.createElement("polyline",{points:"3 6 5 6 21 6"}),x.createElement("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}))});Ze.propTypes={color:te.string,size:te.oneOfType([te.string,te.number])},Ze.displayName="Trash";const st=({user:r,messages:c,updateMessages:n,onMessageSent:t,onEditMessage:i,onDeleteMessage:a})=>{const g=x.useRef(null),[y,h]=x.useState(!1),[m,v]=x.useState(null),[b,O]=x.useState(null),A=()=>{setTimeout(()=>{g.current&&(g.current.scrollTop=g.current.scrollHeight)},100)},H=(u,J)=>{if(u.preventDefault(),!g.current)return;const oe=g.current.getBoundingClientRect();O({x:u.clientX-oe.left,y:u.clientY-oe.top,message:J})},M=()=>{O(null)},B=u=>{const J=new Se({id:new Date().toString(),text:u,user:r,isRightSided:!0,createdDate:new Date().toString()});n([...c,J]),t(J),A()},U=u=>{const J=new Se({id:new Date().toString(),text:"",attachment:u,attachmentType:ye.Voice,user:r,isRightSided:!0,createdDate:new Date().toString()});n([...c,J]),t(J),A()},V=u=>{const J=URL.createObjectURL(u),oe=new Se({id:new Date().toString(),text:"",attachment:J,attachmentType:ye.File,user:r,isRightSided:!0,createdDate:new Date().toString()});n([...c,oe]),t(oe),A()};return{handleDeleteConfirmation:()=>{m&&(a(m),v(null)),h(!1)},handleCloseContextMenu:M,contextMenuItems:[{name:"Edit",icon:o.jsx(qe,{className:"text-gray-600"}),onlyCurrentUserMessage:!0,onClick:u=>{console.log("Edit clicked"),M(),i(u)}},{name:"Delete",icon:o.jsx(Ze,{className:"text-red-600"}),onlyCurrentUserMessage:!0,onClick:u=>{v(u),h(!0),M()}},{name:"Select",icon:o.jsx(We,{className:"text-green-600"}),onClick:()=>{console.log("Select clicked"),M()}},{name:"Copy",icon:o.jsx(Ve,{className:"text-blue-600"}),onClick:()=>{console.log("Copy clicked"),M()}}],handleSendFile:V,handleSendVoice:U,handleSendMessage:B,handleContextMenu:H,isModalOpen:y,contextMenu:b,chatRef:g,setIsModalOpen:h}},ut=({width:r="400px",height:c="600px",className:n,style:t,messages:i,user:a,updateMessages:g,onMessageSent:y,onDeleteMessage:h,onEditMessage:m,dynamicSymbolAssignments:v})=>{var J,oe;const{handleDeleteConfirmation:b,handleCloseContextMenu:O,handleSendFile:A,handleSendVoice:H,handleSendMessage:M,handleContextMenu:B,contextMenuItems:U,isModalOpen:V,contextMenu:C,chatRef:Z,setIsModalOpen:u}=st({user:a,messages:i,updateMessages:g,onMessageSent:y,onEditMessage:m,onDeleteMessage:h});return o.jsxs("div",{className:`flex flex-col !bg-cover ${n}`,style:{width:r,height:c,background:"url(./chat-bg-1.jpg)",...t},onClick:O,children:[o.jsx("div",{ref:Z,className:`flex flex-col gap-2 flex-1 p-3 pb-16 ${C?"overflow-hidden pr-[22px]":"overflow-y-scroll"}`,children:o.jsx(he.AnimatePresence,{children:i.map((K,le)=>{var de,ee,Q;const pe=K!=null&&K.attachment?o.jsx(Vr,{attachment:K.attachment,attachmentType:K==null?void 0:K.attachmentType},le):null;if(K.isRightSided)return o.jsx(Br,{media:pe,handleContextMenu:B,message:K},le);const ge=((ee=(de=i[le-1])==null?void 0:de.user)==null?void 0:ee.id)!==((Q=K==null?void 0:K.user)==null?void 0:Q.id);return o.jsx(Ur,{showUserProfile:ge,media:pe,handleContextMenu:B,message:K},le)})})}),o.jsx(Ir,{isOpen:V,onClose:()=>u(!1),onConfirm:b,header:"Confirm Delete",question:"Are you sure you want to delete this message?"}),C&&((J=C==null?void 0:C.message)!=null&&J.id)?o.jsx(zr,{items:U,isVisible:!!C,messageId:String(C==null?void 0:C.message.id),isCurrentUserMessage:((oe=C==null?void 0:C.message)==null?void 0:oe.user.id)===a.id,position:{x:C==null?void 0:C.x,y:C==null?void 0:C.y}}):null,o.jsx(Ar,{onSendVoice:H,onSendMessage:M,onFileSend:A,dynamicSymbolAssignments:v})]})};re.AttachmentTypeEnum=ye,re.Chat=ut,re.MessageEntity=Se,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
|
|
48
|
+
*/var Ne,lr;function Jr(){if(lr)return Ne;lr=1;var r=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function t(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var h={},g=0;g<10;g++)h["_"+String.fromCharCode(g)]=g;var p=Object.getOwnPropertyNames(h).map(function(y){return h[y]});if(p.join("")!=="0123456789")return!1;var x={};return"abcdefghijklmnopqrst".split("").forEach(function(y){x[y]=y}),Object.keys(Object.assign({},x)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ne=a()?Object.assign:function(i,h){for(var g,p=t(i),x,y=1;y<arguments.length;y++){g=Object(arguments[y]);for(var b in g)l.call(g,b)&&(p[b]=g[b]);if(r){x=r(g);for(var P=0;P<x.length;P++)o.call(g,x[P])&&(p[x[P]]=g[x[P]])}}return p},Ne}var Ie,ur;function Me(){if(ur)return Ie;ur=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ie=r,Ie}var De,cr;function fr(){return cr||(cr=1,De=Function.call.bind(Object.prototype.hasOwnProperty)),De}var $e,dr;function Hr(){if(dr)return $e;dr=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var l=Me(),o={},t=fr();r=function(i){var h="Warning: "+i;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}}}function a(i,h,g,p,x){if(process.env.NODE_ENV!=="production"){for(var y in i)if(t(i,y)){var b;try{if(typeof i[y]!="function"){var P=Error((p||"React class")+": "+g+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw P.name="Invariant Violation",P}b=i[y](h,y,p,g,null,l)}catch(H){b=H}if(b&&!(b instanceof Error)&&r((p||"React class")+": type specification of "+g+" `"+y+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof b+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),b instanceof Error&&!(b.message in o)){o[b.message]=!0;var F=x?x():"";r("Failed "+g+" type: "+b.message+(F??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(o={})},$e=a,$e}var Ae,pr;function Kr(){if(pr)return Ae;pr=1;var r=sr(),l=Jr(),o=Me(),t=fr(),a=Hr(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(g){var p="Warning: "+g;typeof console<"u"&&console.error(p);try{throw new Error(p)}catch{}});function h(){return null}return Ae=function(g,p){var x=typeof Symbol=="function"&&Symbol.iterator,y="@@iterator";function b(s){var f=s&&(x&&s[x]||s[y]);if(typeof f=="function")return f}var P="<<anonymous>>",F={array:U("array"),bigint:U("bigint"),bool:U("boolean"),func:U("function"),number:U("number"),object:U("object"),string:U("string"),symbol:U("symbol"),any:z(),arrayOf:E,element:Z(),elementType:c(),instanceOf:J,node:ve(),objectOf:K,oneOf:ne,oneOfType:se,shape:fe,exact:ee};function H(s,f){return s===f?s!==0||1/s===1/f:s!==s&&f!==f}function N(s,f){this.message=s,this.data=f&&typeof f=="object"?f:{},this.stack=""}N.prototype=Error.prototype;function B(s){if(process.env.NODE_ENV!=="production")var f={},C=0;function j(D,S,O,R,A,k,ie){if(R=R||P,k=k||O,ie!==o){if(p){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ue=R+":"+O;!f[ue]&&C<3&&(i("You are manually calling a React.PropTypes validation function for the `"+k+"` prop on `"+R+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),f[ue]=!0,C++)}}return S[O]==null?D?S[O]===null?new N("The "+A+" `"+k+"` is marked as required "+("in `"+R+"`, but its value is `null`.")):new N("The "+A+" `"+k+"` is marked as required in "+("`"+R+"`, but its value is `undefined`.")):null:s(S,O,R,A,k)}var T=j.bind(null,!1);return T.isRequired=j.bind(null,!0),T}function U(s){function f(C,j,T,D,S,O){var R=C[j],A=_(R);if(A!==s){var k=I(R);return new N("Invalid "+D+" `"+S+"` of type "+("`"+k+"` supplied to `"+T+"`, expected ")+("`"+s+"`."),{expectedType:s})}return null}return B(f)}function z(){return B(h)}function E(s){function f(C,j,T,D,S){if(typeof s!="function")return new N("Property `"+S+"` of component `"+T+"` has invalid PropType notation inside arrayOf.");var O=C[j];if(!Array.isArray(O)){var R=_(O);return new N("Invalid "+D+" `"+S+"` of type "+("`"+R+"` supplied to `"+T+"`, expected an array."))}for(var A=0;A<O.length;A++){var k=s(O,A,T,D,S+"["+A+"]",o);if(k instanceof Error)return k}return null}return B(f)}function Z(){function s(f,C,j,T,D){var S=f[C];if(!g(S)){var O=_(S);return new N("Invalid "+T+" `"+D+"` of type "+("`"+O+"` supplied to `"+j+"`, expected a single ReactElement."))}return null}return B(s)}function c(){function s(f,C,j,T,D){var S=f[C];if(!r.isValidElementType(S)){var O=_(S);return new N("Invalid "+T+" `"+D+"` of type "+("`"+O+"` supplied to `"+j+"`, expected a single ReactElement type."))}return null}return B(s)}function J(s){function f(C,j,T,D,S){if(!(C[j]instanceof s)){var O=s.name||P,R=oe(C[j]);return new N("Invalid "+D+" `"+S+"` of type "+("`"+R+"` supplied to `"+T+"`, expected ")+("instance of `"+O+"`."))}return null}return B(f)}function ne(s){if(!Array.isArray(s))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),h;function f(C,j,T,D,S){for(var O=C[j],R=0;R<s.length;R++)if(H(O,s[R]))return null;var A=JSON.stringify(s,function(ie,d){var ue=I(d);return ue==="symbol"?String(d):d});return new N("Invalid "+D+" `"+S+"` of value `"+String(O)+"` "+("supplied to `"+T+"`, expected one of "+A+"."))}return B(f)}function K(s){function f(C,j,T,D,S){if(typeof s!="function")return new N("Property `"+S+"` of component `"+T+"` has invalid PropType notation inside objectOf.");var O=C[j],R=_(O);if(R!=="object")return new N("Invalid "+D+" `"+S+"` of type "+("`"+R+"` supplied to `"+T+"`, expected an object."));for(var A in O)if(t(O,A)){var k=s(O,A,T,D,S+"."+A,o);if(k instanceof Error)return k}return null}return B(f)}function se(s){if(!Array.isArray(s))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),h;for(var f=0;f<s.length;f++){var C=s[f];if(typeof C!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(C)+" at index "+f+"."),h}function j(T,D,S,O,R){for(var A=[],k=0;k<s.length;k++){var ie=s[k],d=ie(T,D,S,O,R,o);if(d==null)return null;d.data&&t(d.data,"expectedType")&&A.push(d.data.expectedType)}var ue=A.length>0?", expected one of type ["+A.join(", ")+"]":"";return new N("Invalid "+O+" `"+R+"` supplied to "+("`"+S+"`"+ue+"."))}return B(j)}function ve(){function s(f,C,j,T,D){return Q(f[C])?null:new N("Invalid "+T+" `"+D+"` supplied to "+("`"+j+"`, expected a ReactNode."))}return B(s)}function he(s,f,C,j,T){return new N((s||"React class")+": "+f+" type `"+C+"."+j+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+T+"`.")}function fe(s){function f(C,j,T,D,S){var O=C[j],R=_(O);if(R!=="object")return new N("Invalid "+D+" `"+S+"` of type `"+R+"` "+("supplied to `"+T+"`, expected `object`."));for(var A in s){var k=s[A];if(typeof k!="function")return he(T,D,S,A,I(k));var ie=k(O,A,T,D,S+"."+A,o);if(ie)return ie}return null}return B(f)}function ee(s){function f(C,j,T,D,S){var O=C[j],R=_(O);if(R!=="object")return new N("Invalid "+D+" `"+S+"` of type `"+R+"` "+("supplied to `"+T+"`, expected `object`."));var A=l({},C[j],s);for(var k in A){var ie=s[k];if(t(s,k)&&typeof ie!="function")return he(T,D,S,k,I(ie));if(!ie)return new N("Invalid "+D+" `"+S+"` key `"+k+"` supplied to `"+T+"`.\nBad object: "+JSON.stringify(C[j],null," ")+`
|
|
49
|
+
Valid keys: `+JSON.stringify(Object.keys(s),null," "));var d=ie(O,k,T,D,S+"."+k,o);if(d)return d}return null}return B(f)}function Q(s){switch(typeof s){case"number":case"string":case"undefined":return!0;case"boolean":return!s;case"object":if(Array.isArray(s))return s.every(Q);if(s===null||g(s))return!0;var f=b(s);if(f){var C=f.call(s),j;if(f!==s.entries){for(;!(j=C.next()).done;)if(!Q(j.value))return!1}else for(;!(j=C.next()).done;){var T=j.value;if(T&&!Q(T[1]))return!1}}else return!1;return!0;default:return!1}}function de(s,f){return s==="symbol"?!0:f?f["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&f instanceof Symbol:!1}function _(s){var f=typeof s;return Array.isArray(s)?"array":s instanceof RegExp?"object":de(f,s)?"symbol":f}function I(s){if(typeof s>"u"||s===null)return""+s;var f=_(s);if(f==="object"){if(s instanceof Date)return"date";if(s instanceof RegExp)return"regexp"}return f}function M(s){var f=I(s);switch(f){case"array":case"object":return"an "+f;case"boolean":case"date":case"regexp":return"a "+f;default:return f}}function oe(s){return!s.constructor||!s.constructor.name?P:s.constructor.name}return F.checkPropTypes=a,F.resetWarningCache=a.resetWarningCache,F.PropTypes=F,F},Ae}var Fe,vr;function Xr(){if(vr)return Fe;vr=1;var r=Me();function l(){}function o(){}return o.resetWarningCache=l,Fe=function(){function t(h,g,p,x,y,b){if(b!==r){var P=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw P.name="Invariant Violation",P}}t.isRequired=t;function a(){return t}var i={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:a,element:t,elementType:t,instanceOf:a,node:t,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:o,resetWarningCache:l};return i.PropTypes=i,i},Fe}var hr;function Gr(){if(hr)return Pe.exports;if(hr=1,process.env.NODE_ENV!=="production"){var r=sr(),l=!0;Pe.exports=Kr()(r.isElement,l)}else Pe.exports=Xr()();return Pe.exports}var Qr=Gr();const te=Rr(Qr);function We(){return We=Object.assign||function(r){for(var l=1;l<arguments.length;l++){var o=arguments[l];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r},We.apply(this,arguments)}function et(r,l){if(r==null)return{};var o=rt(r,l),t,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(a=0;a<i.length;a++)t=i[a],!(l.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}function rt(r,l){if(r==null)return{};var o={},t=Object.keys(r),a,i;for(i=0;i<t.length;i++)a=t[i],!(l.indexOf(a)>=0)&&(o[a]=r[a]);return o}var Ye=m.forwardRef(function(r,l){var o=r.color,t=o===void 0?"currentColor":o,a=r.size,i=a===void 0?24:a,h=et(r,["color","size"]);return m.createElement("svg",We({ref:l,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},h),m.createElement("polyline",{points:"20 6 9 17 4 12"}))});Ye.propTypes={color:te.string,size:te.oneOfType([te.string,te.number])},Ye.displayName="Check";function Ve(){return Ve=Object.assign||function(r){for(var l=1;l<arguments.length;l++){var o=arguments[l];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r},Ve.apply(this,arguments)}function tt(r,l){if(r==null)return{};var o=nt(r,l),t,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(a=0;a<i.length;a++)t=i[a],!(l.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}function nt(r,l){if(r==null)return{};var o={},t=Object.keys(r),a,i;for(i=0;i<t.length;i++)a=t[i],!(l.indexOf(a)>=0)&&(o[a]=r[a]);return o}var ze=m.forwardRef(function(r,l){var o=r.color,t=o===void 0?"currentColor":o,a=r.size,i=a===void 0?24:a,h=tt(r,["color","size"]);return m.createElement("svg",Ve({ref:l,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},h),m.createElement("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),m.createElement("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}))});ze.propTypes={color:te.string,size:te.oneOfType([te.string,te.number])},ze.displayName="Copy";function Ue(){return Ue=Object.assign||function(r){for(var l=1;l<arguments.length;l++){var o=arguments[l];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r},Ue.apply(this,arguments)}function ot(r,l){if(r==null)return{};var o=it(r,l),t,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(a=0;a<i.length;a++)t=i[a],!(l.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}function it(r,l){if(r==null)return{};var o={},t=Object.keys(r),a,i;for(i=0;i<t.length;i++)a=t[i],!(l.indexOf(a)>=0)&&(o[a]=r[a]);return o}var qe=m.forwardRef(function(r,l){var o=r.color,t=o===void 0?"currentColor":o,a=r.size,i=a===void 0?24:a,h=ot(r,["color","size"]);return m.createElement("svg",Ue({ref:l,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},h),m.createElement("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),m.createElement("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"}))});qe.propTypes={color:te.string,size:te.oneOfType([te.string,te.number])},qe.displayName="Edit";function Be(){return Be=Object.assign||function(r){for(var l=1;l<arguments.length;l++){var o=arguments[l];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r},Be.apply(this,arguments)}function at(r,l){if(r==null)return{};var o=st(r,l),t,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(a=0;a<i.length;a++)t=i[a],!(l.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}function st(r,l){if(r==null)return{};var o={},t=Object.keys(r),a,i;for(i=0;i<t.length;i++)a=t[i],!(l.indexOf(a)>=0)&&(o[a]=r[a]);return o}var Ze=m.forwardRef(function(r,l){var o=r.color,t=o===void 0?"currentColor":o,a=r.size,i=a===void 0?24:a,h=at(r,["color","size"]);return m.createElement("svg",Be({ref:l,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},h),m.createElement("polyline",{points:"3 6 5 6 21 6"}),m.createElement("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}))});Ze.propTypes={color:te.string,size:te.oneOfType([te.string,te.number])},Ze.displayName="Trash";const lt=({user:r,messages:l,updateMessages:o,onMessageSent:t,onEditMessage:a,onDeleteMessage:i})=>{const h=m.useRef(null),[g,p]=m.useState(!1),[x,y]=m.useState(null),[b,P]=m.useState(null),F=()=>{setTimeout(()=>{h.current&&(h.current.scrollTop=h.current.scrollHeight)},100)},H=(c,J)=>{if(c.preventDefault(),!h.current)return;const ne=h.current.getBoundingClientRect();P({x:c.clientX-ne.left,y:c.clientY-ne.top,message:J})},N=()=>{P(null)},B=c=>{const J=new Oe({id:new Date().toString(),text:c,user:r,isRightSided:!0,createdDate:new Date().toString()});o([...l,J]),t(J),F()},U=c=>{const J=new Oe({id:new Date().toString(),text:"",attachment:c,attachmentType:ge.Voice,user:r,isRightSided:!0,createdDate:new Date().toString()});o([...l,J]),t(J),F()},z=c=>{const J=URL.createObjectURL(c),ne=new Oe({id:new Date().toString(),text:"",attachment:J,attachmentType:ge.File,user:r,isRightSided:!0,createdDate:new Date().toString()});o([...l,ne]),t(ne),F()};return{handleDeleteConfirmation:()=>{x&&(i(x),y(null)),p(!1)},handleCloseContextMenu:N,contextMenuItems:[{name:"Edit",icon:n.jsx(qe,{className:"text-gray-600"}),onlyCurrentUserMessage:!0,onClick:c=>{console.log("Edit clicked"),N(),a(c)}},{name:"Delete",icon:n.jsx(Ze,{className:"text-red-600"}),onlyCurrentUserMessage:!0,onClick:c=>{y(c),p(!0),N()}},{name:"Select",icon:n.jsx(Ye,{className:"text-green-600"}),onClick:()=>{console.log("Select clicked"),N()}},{name:"Copy",icon:n.jsx(ze,{className:"text-blue-600"}),onClick:()=>{console.log("Copy clicked"),N()}}],handleSendFile:z,handleSendVoice:U,handleSendMessage:B,handleContextMenu:H,isModalOpen:g,contextMenu:b,chatRef:h,setIsModalOpen:p}},ut=({width:r="400px",height:l="600px",className:o,style:t,messages:a,user:i,updateMessages:h,onMessageSent:g,onDeleteMessage:p,onEditMessage:x,dynamicSymbolAssignments:y})=>{var J,ne;const{handleDeleteConfirmation:b,handleCloseContextMenu:P,handleSendFile:F,handleSendVoice:H,handleSendMessage:N,handleContextMenu:B,contextMenuItems:U,isModalOpen:z,contextMenu:E,chatRef:Z,setIsModalOpen:c}=lt({user:i,messages:a,updateMessages:h,onMessageSent:g,onEditMessage:x,onDeleteMessage:p});return n.jsxs("div",{className:`flex flex-col !bg-cover ${o}`,style:{width:r,height:l,background:"url(./chat-bg-1.jpg)",...t},onClick:P,children:[n.jsx("div",{ref:Z,className:`flex flex-col gap-2 flex-1 p-3 pb-16 ${E?"overflow-hidden pr-[22px]":"overflow-y-scroll"}`,children:n.jsx(pe.AnimatePresence,{children:a.map((K,se)=>{var fe,ee,Q;const ve=K!=null&&K.attachment?n.jsx(Vr,{attachment:K.attachment,attachmentType:K==null?void 0:K.attachmentType},se):null;if(K.isRightSided)return n.jsx(qr,{media:ve,handleContextMenu:B,message:K},se);const he=((ee=(fe=a[se-1])==null?void 0:fe.user)==null?void 0:ee.id)!==((Q=K==null?void 0:K.user)==null?void 0:Q.id);return n.jsx(zr,{showUserProfile:he,media:ve,handleContextMenu:B,message:K},se)})})}),n.jsx(Ir,{isOpen:z,onClose:()=>c(!1),onConfirm:b,header:"Confirm Delete",question:"Are you sure you want to delete this message?"}),E&&((J=E==null?void 0:E.message)!=null&&J.id)?n.jsx(Mr,{items:U,isVisible:!!E,messageId:String(E==null?void 0:E.message.id),isCurrentUserMessage:((ne=E==null?void 0:E.message)==null?void 0:ne.user.id)===i.id,position:{x:E==null?void 0:E.x,y:E==null?void 0:E.y}}):null,n.jsx(Ar,{onSendVoice:H,onSendMessage:N,onFileSend:F,dynamicSymbolAssignments:y})]})};re.AttachmentTypeEnum=ge,re.Chat=ut,re.MessageEntity=Oe,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
|
|
51
50
|
//# sourceMappingURL=index.umd.js.map
|