@connectycube/react-ui-kit 0.0.20 → 0.1.0

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.
Files changed (69) hide show
  1. package/README.md +31 -4
  2. package/configs/dependencies.json +19 -4
  3. package/configs/imports.json +7 -2
  4. package/dist/index.cjs +1 -1
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/types/components/attachment.d.ts +5 -6
  9. package/dist/types/components/attachment.d.ts.map +1 -1
  10. package/dist/types/components/chat-bubble.d.ts +32 -0
  11. package/dist/types/components/chat-bubble.d.ts.map +1 -0
  12. package/dist/types/components/chat-input.d.ts +27 -0
  13. package/dist/types/components/chat-input.d.ts.map +1 -0
  14. package/dist/types/components/chat-list.d.ts +30 -0
  15. package/dist/types/components/chat-list.d.ts.map +1 -0
  16. package/dist/types/components/checkbox.d.ts +11 -0
  17. package/dist/types/components/checkbox.d.ts.map +1 -0
  18. package/dist/types/components/dialogs-list.d.ts +14 -0
  19. package/dist/types/components/dialogs-list.d.ts.map +1 -0
  20. package/dist/types/components/file-picker.d.ts +1 -1
  21. package/dist/types/components/file-picker.d.ts.map +1 -1
  22. package/dist/types/components/placeholder-text.d.ts.map +1 -1
  23. package/dist/types/components/quick-actions.d.ts +14 -0
  24. package/dist/types/components/quick-actions.d.ts.map +1 -0
  25. package/dist/types/components/status-call.d.ts +8 -0
  26. package/dist/types/components/status-call.d.ts.map +1 -0
  27. package/dist/types/index.d.ts +7 -2
  28. package/dist/types/index.d.ts.map +1 -1
  29. package/gen/components/attachment.jsx +6 -6
  30. package/gen/components/button.jsx +1 -1
  31. package/gen/components/{chat-message.jsx → chat-bubble.jsx} +69 -48
  32. package/gen/components/chat-input.jsx +152 -0
  33. package/gen/components/chat-list.jsx +151 -0
  34. package/gen/components/checkbox.jsx +30 -0
  35. package/gen/components/dialog-item.jsx +1 -1
  36. package/gen/components/dialogs-list.jsx +73 -0
  37. package/gen/components/dismiss-layer.jsx +1 -1
  38. package/gen/components/file-picker.jsx +2 -2
  39. package/gen/components/placeholder-text.jsx +5 -1
  40. package/gen/components/quick-actions.jsx +62 -0
  41. package/gen/components/search.jsx +1 -1
  42. package/gen/components/status-call.jsx +18 -0
  43. package/gen/components/stream-view.jsx +8 -8
  44. package/gen/index.js +14 -2
  45. package/package.json +11 -8
  46. package/src/components/attachment.tsx +16 -14
  47. package/src/components/button.tsx +1 -1
  48. package/src/components/chat-bubble.tsx +176 -0
  49. package/src/components/chat-input.tsx +172 -0
  50. package/src/components/chat-list.tsx +164 -0
  51. package/src/components/checkbox.tsx +40 -0
  52. package/src/components/connectycube-ui/chat-input.tsx +174 -0
  53. package/src/components/dialog-item.tsx +1 -1
  54. package/src/components/dialogs-list.tsx +84 -0
  55. package/src/components/dismiss-layer.tsx +1 -1
  56. package/src/components/file-picker.tsx +3 -3
  57. package/src/components/placeholder-text.tsx +5 -1
  58. package/src/components/quick-actions.tsx +74 -0
  59. package/src/components/search.tsx +1 -1
  60. package/src/components/status-call.tsx +23 -0
  61. package/src/components/stream-view.tsx +8 -8
  62. package/src/index.ts +17 -2
  63. package/dist/types/components/call-message.d.ts +0 -17
  64. package/dist/types/components/call-message.d.ts.map +0 -1
  65. package/dist/types/components/chat-message.d.ts +0 -30
  66. package/dist/types/components/chat-message.d.ts.map +0 -1
  67. package/gen/components/call-message.jsx +0 -62
  68. package/src/components/call-message.tsx +0 -75
  69. package/src/components/chat-message.tsx +0 -138
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{forwardRef as a,memo as n,useRef as r,useState as i,useImperativeHandle as o,useMemo as s,useEffect as l,createElement as c,useCallback as d}from"react";import*as u from"@radix-ui/react-alert-dialog";import{Slot as m}from"@radix-ui/react-slot";import{cva as f}from"class-variance-authority";import{clsx as h}from"clsx";import{twMerge as g}from"tailwind-merge";import{LoaderCircle as p,Loader as v,FileXCorner as b,File as y,Phone as w,PhoneIncoming as N,PhoneOutgoing as x,PhoneMissed as P,Globe as k,Ban as M,CheckCheck as W,Check as z,Clock as S,Users as C,Paperclip as G,FilePlusCorner as D,Search as T,X as E,Minimize as j,Maximize as A,PictureInPicture2 as F}from"lucide-react";import*as L from"@radix-ui/react-avatar";import{formatDistanceToNow as I,format as $,isToday as X,differenceInCalendarDays as B}from"date-fns";import{useInView as O}from"react-intersection-observer";import _ from"linkify-react";import{Root as V}from"@radix-ui/react-label";import*as q from"@radix-ui/react-tooltip";import*as H from"@radix-ui/react-switch";function R(...e){return g(h(e))}function Y(e=8){return(Date.now()/Math.random()).toString(36).replace(".","").slice(0,e)}function J(e){return"string"==typeof e&&e.length>0?`${e[0]?.toUpperCase()}${e.slice(1)}`:""}const U=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});const Q=a(function({asChild:t=!1,variant:a,size:n,className:r,...i},o){return e(t?m:"button",{ref:o,...i,className:R(U({variant:a,size:n,className:r}),"transition-all ease-in-out duration-300")})});Q.displayName="Button";const K=a(function({title:a="",description:n="",cancelTitle:r="Cancel",actionTitle:i="Confirm",onCancel:o=()=>{},onConfirm:s=()=>{},rootProps:l,triggerElement:c,triggerProps:d,portalProps:m,overlayProps:f,contentProps:h,headerProps:g,titleProps:p,descriptionProps:v,footerProps:b,cancelProps:y,cancelButtonProps:w,actionProps:N,actionButtonProps:x,...P},k){return e("div",{ref:k,...P,children:t(u.Root,{...l,children:[e(u.Trigger,{asChild:!0,...d,children:c}),t(u.Portal,{...m,children:[e(u.Overlay,{...f,className:R("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",f?.className)}),t(u.Content,{...h,className:R("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2em)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",h?.className),children:[t("div",{...g,className:R("flex flex-col gap-2 text-center sm:text-left",g?.className),children:[e(u.Title,{...p,className:R("text-lg font-semibold",p?.className),children:a}),e(u.Description,{...v,className:R("text-muted-foreground text-sm",v?.className),children:n})]}),t("div",{...b,className:R("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",b?.className),children:[e(u.Cancel,{...y,onClick:o,children:e(Q,{variant:"outline",...w,children:r})}),e(u.Action,{...N,onClick:s,children:e(Q,{...x,children:i})})]})]})]})]})})});function Z({loading:t=!1,layout:a="flow",type:n="default",...r}){if(!t)return null;const i=e("circle"===n?p:v,{strokeWidth:2.5,...r,className:R("animate-spin text-ring","flow"===a&&"mx-auto",r?.className)});switch(a){case"absolute":return e("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",children:i});case"centered":return e("div",{className:"flex items-center justify-center size-full",children:i});case"overlay":return e("div",{className:"flex items-center justify-center size-full absolute bg-muted/50",children:i});default:return i}}K.displayName="AlertDialog",Z.displayName="Spinner";const ee=a(function({url:a,pending:n=!1,children:r,...i},o){return t("a",{ref:o,target:"_blank",rel:"noopener noreferrer",...i,href:a,className:R("group relative min-h-8 min-w-8 w-full flex items-center justify-center rounded-md overflow-hidden bg-ring/10 hover:bg-ring/20 transition-color duration-300 ease-out cursor-pointer",i?.className),children:[r,e(Z,{loading:n,layout:"overlay"})]})});ee.displayName="AttachmentLink";const te=a(function({uid:a,url:n,pending:r=!1,containerProps:i,...o},s){const l=`attachment_audio_${a||Y()}`;return t("div",{...i,className:R("relative min-h-8 min-w-8 w-full rounded-md overflow-hidden",i?.className),children:[e("audio",{ref:s,src:n,id:l,controls:!0,...o}),e(Z,{loading:r,layout:"overlay"})]})});const ae=a(function({uid:a,url:n,maxSize:s=360,pending:l=!1,onReady:c=()=>{},containerProps:d,...u},m){const f=`attachment_video_${a||Y()}`,h=`${s}px`,g=r(null),[p,v]=i({maxHeight:h,maxWidth:h});return o(m,()=>g.current,[]),t("div",{...d,className:R("relative min-h-20 w-full rounded-md overflow-hidden",d?.className),children:[e("video",{id:f,ref:g,src:n,controls:!0,preload:"metadata",style:p,...u,onCanPlay:e=>{const t=g.current;if(t){const{videoWidth:a,videoHeight:n}=t,r=a/n||1,i=r<1?h:`${Math.round(s/r)}px`,o=r<1?`${Math.round(s*r)}px`:h;v({height:i,width:o,maxHeight:i,maxWidth:o}),u.onCanPlay?.(e),c()}},className:R("size-full",u?.className)}),e(Z,{loading:l,layout:"overlay"})]})});ae.displayName="AttachmentVideo";const ne=a(function({uid:t,url:a,pending:n=!1,onReady:r=()=>{},linkProps:i,...o},s){const l=`attachment_image_${t||Y()}`;return e(ee,{href:a,pending:n,...i,children:e("img",{ref:s,src:a,id:l,alt:"attachment",...o,className:R("rounded-md object-cover min-h-8 min-w-8 max-h-[360px] group-hover:scale-102 transition-transform duration-300 ease-out",o?.className),onLoad:e=>{o.onLoad?.(e),r()}})})});function re({url:a,name:n,pending:r=!1,iconElement:i,linkProps:o,...s}){const l=`attachment_file_${s.id||Y()}`;return t(ee,{href:a,pending:r,...o,className:R("flex-row gap-1.5 p-2 hover:shadow",o?.className),children:[i||e(y,{id:l,...s,className:R("size-5 shrink-0 text-foreground/80 group-hover:text-foreground duration-300 ease-out",s?.className)}),n&&e("span",{className:"font-medium line-clamp-1 break-all text-foreground/80 group-hover:text-foreground duration-300 ease-out",children:n})]})}function ie({name:a="Unknown file",pending:n=!1,iconElement:r,containerProps:i,...o}){const s=`attachment_failed_${o.id||Y()}`;return t("div",{...i,className:R("relative min-h-8 min-w-8 w-full flex flex-row items-center justify-center gap-2 px-2 bg-red-600/10 rounded-md overflow-hidden",i?.className),children:[r||e(b,{id:s,...o,className:R("size-6 shrink-0 text-red-600",o?.className)}),e("span",{className:"font-medium line-clamp-1 break-all text-red-600",children:a}),e(Z,{loading:n,layout:"overlay"})]})}ne.displayName="AttachmentImage",re.displayName="AttachmentFile",ie.displayName="AttachmentFailed";const oe=n(function({mimeType:t,...a}){const[n=""]=t?.split("/")||[];if(!a.url)return e(ie,{...a});switch(n){case"image":return e(ne,{...a});case"video":return e(ae,{...a});case"audio":return e(te,{...a});default:return e(re,{name:t,...a})}});function se({status:t,...a}){switch(t){case"available":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...a,className:R("rounded-full size-4.5 text-green-600 bg-white",a?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"})});case"busy":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...a,className:R("rounded-full size-4.5 text-red-600 bg-white",a?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M4.5 7.5a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1z"})});case"away":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...a,className:R("rounded-full size-4.5 text-yellow-500 bg-white",a?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z"})});case"unknown":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...a,className:R("rounded-full size-4.5 text-gray-500 bg-white",a?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247m2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z"})});default:return null}}function le({badge:a=!0,status:n,label:r,badgeProps:i,labelProps:o,...s}){const l=J(r||n);return t("div",{...s,className:R("flex items-center gap-2",s?.className),children:[a&&e(se,{status:n,...i}),e("span",{...o,children:l})]})}oe.displayName="Attachment",se.displayName="PresenceBadge",le.displayName="Presence";const ce=n(a(function({src:a,name:n="NA",fallbackIconElement:r,online:i,presence:o,className:s,onlineProps:l,presenceProps:c,imageProps:d,fallbackProps:u,...m},f){const h=function(e){const t=e?.trim().split(/\s+/).filter(Boolean)??[];return(t.length>1?`${t[0]?.[0]}${t[1]?.[0]}`:t[0]?.slice(0,2)??"NA").toUpperCase()}(n);return t(L.Root,{ref:f,...m,className:R("relative flex size-8 shrink-0 rounded-full",s),children:[e(L.Image,{...d,src:a,className:R("aspect-square size-full rounded-full overflow-hidden object-cover",d?.className)}),e(L.Fallback,{...u,className:R("bg-muted size-full rounded-full flex items-center justify-center",u?.className),children:r||h}),i&&e("div",{...l,className:R("absolute top-0 right-0 rounded-full border-2 bg-green-600 border-green-200 size-3.5",l?.className)}),e(se,{status:o,...c,className:R("absolute bottom-0 right-0",c?.className)})]})}));ce.displayName="Avatar";const de=f("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});const ue=a(function({className:t,variant:a,asChild:n=!1,...r},i){return e(n?m:"span",{ref:i,...r,className:R(de({variant:a}),t)})});function me(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}function fe(e){return(t,a)=>{let n;if("formatting"===(a?.context?String(a.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,r=a?.width?String(a.width):t;n=e.formattingValues[r]||e.formattingValues[t]}else{const t=e.defaultWidth,r=a?.width?String(a.width):e.defaultWidth;n=e.values[r]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function he(e){return(t,a={})=>{const n=a.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(r);if(!i)return null;const o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a;return}(s,e=>e.test(o)):function(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a;return}(s,e=>e.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=a.valueCallback?a.valueCallback(c):c;return{value:c,rest:t.slice(o.length)}}}function ge(e){return(t,a={})=>{const n=t.match(e.matchPattern);if(!n)return null;const r=n[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=a.valueCallback?a.valueCallback(o):o;return{value:o,rest:t.slice(r.length)}}}ue.displayName="Badge";const pe=Symbol.for("constructDateFrom");function ve(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&pe in e?e[pe](t):e instanceof Date?new e.constructor(t):new Date(t)}let be={};function ye(){return be}function we(e,t){return ve(t||e,e)}function Ne(e,t){const a=ye(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,r=we(e,t?.in),i=r.getDay(),o=(i<n?7:0)+i-n;return r.setDate(r.getDate()-o),r.setHours(0,0,0,0),r}function xe(e,t,a){const[n,r]=function(e,...t){const a=ve.bind(null,e||t.find(e=>"object"==typeof e));return t.map(a)}(a?.in,e,t);return+Ne(n,a)===+Ne(r,a)}const Pe={lessThanXSeconds:{one:"λιγότερο από ένα δευτερόλεπτο",other:"λιγότερο από {{count}} δευτερόλεπτα"},xSeconds:{one:"1 δευτερόλεπτο",other:"{{count}} δευτερόλεπτα"},halfAMinute:"μισό λεπτό",lessThanXMinutes:{one:"λιγότερο από ένα λεπτό",other:"λιγότερο από {{count}} λεπτά"},xMinutes:{one:"1 λεπτό",other:"{{count}} λεπτά"},aboutXHours:{one:"περίπου 1 ώρα",other:"περίπου {{count}} ώρες"},xHours:{one:"1 ώρα",other:"{{count}} ώρες"},xDays:{one:"1 ημέρα",other:"{{count}} ημέρες"},aboutXWeeks:{one:"περίπου 1 εβδομάδα",other:"περίπου {{count}} εβδομάδες"},xWeeks:{one:"1 εβδομάδα",other:"{{count}} εβδομάδες"},aboutXMonths:{one:"περίπου 1 μήνας",other:"περίπου {{count}} μήνες"},xMonths:{one:"1 μήνας",other:"{{count}} μήνες"},aboutXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"},xYears:{one:"1 χρόνο",other:"{{count}} χρόνια"},overXYears:{one:"πάνω από 1 χρόνο",other:"πάνω από {{count}} χρόνια"},almostXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"}},ke={date:me({formats:{full:"EEEE, d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"d/M/yy"},defaultWidth:"full"}),time:me({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:me({formats:{full:"{{date}} - {{time}}",long:"{{date}} - {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Me={lastWeek:e=>6===e.getDay()?"'το προηγούμενο' eeee 'στις' p":"'την προηγούμενη' eeee 'στις' p",yesterday:"'χθες στις' p",today:"'σήμερα στις' p",tomorrow:"'αύριο στις' p",nextWeek:"eeee 'στις' p",other:"P"},We={code:"el",formatDistance:(e,t,a)=>{let n;const r=Pe[e];return n="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",String(t)),a?.addSuffix?a.comparison&&a.comparison>0?"σε "+n:n+" πριν":n},formatLong:ke,formatRelative:(e,t)=>{const a=Me[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>{const a=Number(e),n=t?.unit;let r;return r="year"===n||"month"===n?"ος":"week"===n||"dayOfYear"===n||"day"===n||"hour"===n||"date"===n?"η":"ο",a+r},era:fe({values:{narrow:["πΧ","μΧ"],abbreviated:["π.Χ.","μ.Χ."],wide:["προ Χριστού","μετά Χριστόν"]},defaultWidth:"wide"}),quarter:fe({values:{narrow:["1","2","3","4"],abbreviated:["Τ1","Τ2","Τ3","Τ4"],wide:["1ο τρίμηνο","2ο τρίμηνο","3ο τρίμηνο","4ο τρίμηνο"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:fe({values:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ"],wide:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"]},defaultWidth:"wide",formattingValues:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],wide:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"]},defaultFormattingWidth:"wide"}),day:fe({values:{narrow:["Κ","Δ","T","Τ","Π","Π","Σ"],short:["Κυ","Δε","Τρ","Τε","Πέ","Πα","Σά"],abbreviated:["Κυρ","Δευ","Τρί","Τετ","Πέμ","Παρ","Σάβ"],wide:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},defaultWidth:"wide"}),dayPeriod:fe({values:{narrow:{am:"πμ",pm:"μμ",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},abbreviated:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},wide:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"}},defaultWidth:"wide"})},match:{ordinalNumber:ge({matchPattern:/^(\d+)(ος|η|ο)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:he({matchPatterns:{narrow:/^(πΧ|μΧ)/i,abbreviated:/^(π\.?\s?χ\.?|π\.?\s?κ\.?\s?χ\.?|μ\.?\s?χ\.?|κ\.?\s?χ\.?)/i,wide:/^(προ Χριστο(ύ|υ)|πριν απ(ό|ο) την Κοιν(ή|η) Χρονολογ(ί|ι)α|μετ(ά|α) Χριστ(ό|ο)ν|Κοιν(ή|η) Χρονολογ(ί|ι)α)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^π/i,/^(μ|κ)/i]},defaultParseWidth:"any"}),quarter:he({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^τ[1234]/i,wide:/^[1234]ο? τρ(ί|ι)μηνο/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:he({matchPatterns:{narrow:/^[ιφμαμιιασονδ]/i,abbreviated:/^(ιαν|φεβ|μ[άα]ρ|απρ|μ[άα][ιΐ]|ιο[ύυ]ν|ιο[ύυ]λ|α[ύυ]γ|σεπ|οκτ|νο[έε]|δεκ)/i,wide:/^(μ[άα][ιΐ]|α[ύυ]γο[υύ]στ)(ος|ου)|(ιανου[άα]ρ|φεβρου[άα]ρ|μ[άα]ρτ|απρ[ίι]λ|ιο[ύυ]ν|ιο[ύυ]λ|σεπτ[έε]μβρ|οκτ[ώω]βρ|νο[έε]μβρ|δεκ[έε]μβρ)(ιος|ίου)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ι/i,/^φ/i,/^μ/i,/^α/i,/^μ/i,/^ι/i,/^ι/i,/^α/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i],any:[/^ια/i,/^φ/i,/^μ[άα]ρ/i,/^απ/i,/^μ[άα][ιΐ]/i,/^ιο[ύυ]ν/i,/^ιο[ύυ]λ/i,/^α[ύυ]/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i]},defaultParseWidth:"any"}),day:he({matchPatterns:{narrow:/^[κδτπσ]/i,short:/^(κυ|δε|τρ|τε|π[εέ]|π[αά]|σ[αά])/i,abbreviated:/^(κυρ|δευ|τρι|τετ|πεμ|παρ|σαβ)/i,wide:/^(κυριακ(ή|η)|δευτ(έ|ε)ρα|τρ(ί|ι)τη|τετ(ά|α)ρτη|π(έ|ε)μπτη|παρασκευ(ή|η)|σ(ά|α)ββατο)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^κ/i,/^δ/i,/^τ/i,/^τ/i,/^π/i,/^π/i,/^σ/i],any:[/^κ/i,/^δ/i,/^τρ/i,/^τε/i,/^π[εέ]/i,/^π[αά]/i,/^σ/i]},defaultParseWidth:"any"}),dayPeriod:he({matchPatterns:{narrow:/^(πμ|μμ|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i,any:/^([πμ]\.?\s?μ\.?|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^πμ|π\.\s?μ\./i,pm:/^μμ|μ\.\s?μ\./i,midnight:/^μεσάν/i,noon:/^μεσημ(έ|ε)/i,morning:/πρω(ί|ι)/i,afternoon:/απ(ό|ο)γευμα/i,evening:/βρ(ά|α)δυ/i,night:/ν(ύ|υ)χτα/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},ze={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Se={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ce={ordinalNumber:(e,t)=>{const a=Number(e),n=a%100;if(n>20||n<10)switch(n%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},era:fe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:fe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:fe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:fe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:fe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},Ge={ordinalNumber:ge({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:he({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:he({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:he({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:he({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:he({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},De={code:"en-US",formatDistance:(e,t,a)=>{let n;const r=ze[e];return n="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),a?.addSuffix?a.comparison&&a.comparison>0?"in "+n:n+" ago":n},formatLong:{date:me({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:me({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:me({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:(e,t,a,n)=>Se[e],localize:Ce,match:Ge,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Te(e,t){if(void 0!==e.one&&1===t)return e.one;const a=t%10,n=t%100;return 1===a&&11!==n?e.singularNominative.replace("{{count}}",String(t)):a>=2&&a<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function Ee(e){return(t,a)=>a&&a.addSuffix?a.comparison&&a.comparison>0?e.future?Te(e.future,t):"за "+Te(e.regular,t):e.past?Te(e.past,t):Te(e.regular,t)+" тому":Te(e.regular,t)}const je={lessThanXSeconds:Ee({regular:{one:"менше секунди",singularNominative:"менше {{count}} секунди",singularGenitive:"менше {{count}} секунд",pluralGenitive:"менше {{count}} секунд"},future:{one:"менше, ніж за секунду",singularNominative:"менше, ніж за {{count}} секунду",singularGenitive:"менше, ніж за {{count}} секунди",pluralGenitive:"менше, ніж за {{count}} секунд"}}),xSeconds:Ee({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунди",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду тому",singularGenitive:"{{count}} секунди тому",pluralGenitive:"{{count}} секунд тому"},future:{singularNominative:"за {{count}} секунду",singularGenitive:"за {{count}} секунди",pluralGenitive:"за {{count}} секунд"}}),halfAMinute:(e,t)=>t&&t.addSuffix?t.comparison&&t.comparison>0?"за півхвилини":"півхвилини тому":"півхвилини",lessThanXMinutes:Ee({regular:{one:"менше хвилини",singularNominative:"менше {{count}} хвилини",singularGenitive:"менше {{count}} хвилин",pluralGenitive:"менше {{count}} хвилин"},future:{one:"менше, ніж за хвилину",singularNominative:"менше, ніж за {{count}} хвилину",singularGenitive:"менше, ніж за {{count}} хвилини",pluralGenitive:"менше, ніж за {{count}} хвилин"}}),xMinutes:Ee({regular:{singularNominative:"{{count}} хвилина",singularGenitive:"{{count}} хвилини",pluralGenitive:"{{count}} хвилин"},past:{singularNominative:"{{count}} хвилину тому",singularGenitive:"{{count}} хвилини тому",pluralGenitive:"{{count}} хвилин тому"},future:{singularNominative:"за {{count}} хвилину",singularGenitive:"за {{count}} хвилини",pluralGenitive:"за {{count}} хвилин"}}),aboutXHours:Ee({regular:{singularNominative:"близько {{count}} години",singularGenitive:"близько {{count}} годин",pluralGenitive:"близько {{count}} годин"},future:{singularNominative:"приблизно за {{count}} годину",singularGenitive:"приблизно за {{count}} години",pluralGenitive:"приблизно за {{count}} годин"}}),xHours:Ee({regular:{singularNominative:"{{count}} годину",singularGenitive:"{{count}} години",pluralGenitive:"{{count}} годин"}}),xDays:Ee({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} днi",pluralGenitive:"{{count}} днів"}}),aboutXWeeks:Ee({regular:{singularNominative:"близько {{count}} тижня",singularGenitive:"близько {{count}} тижнів",pluralGenitive:"близько {{count}} тижнів"},future:{singularNominative:"приблизно за {{count}} тиждень",singularGenitive:"приблизно за {{count}} тижні",pluralGenitive:"приблизно за {{count}} тижнів"}}),xWeeks:Ee({regular:{singularNominative:"{{count}} тиждень",singularGenitive:"{{count}} тижні",pluralGenitive:"{{count}} тижнів"}}),aboutXMonths:Ee({regular:{singularNominative:"близько {{count}} місяця",singularGenitive:"близько {{count}} місяців",pluralGenitive:"близько {{count}} місяців"},future:{singularNominative:"приблизно за {{count}} місяць",singularGenitive:"приблизно за {{count}} місяці",pluralGenitive:"приблизно за {{count}} місяців"}}),xMonths:Ee({regular:{singularNominative:"{{count}} місяць",singularGenitive:"{{count}} місяці",pluralGenitive:"{{count}} місяців"}}),aboutXYears:Ee({regular:{singularNominative:"близько {{count}} року",singularGenitive:"близько {{count}} років",pluralGenitive:"близько {{count}} років"},future:{singularNominative:"приблизно за {{count}} рік",singularGenitive:"приблизно за {{count}} роки",pluralGenitive:"приблизно за {{count}} років"}}),xYears:Ee({regular:{singularNominative:"{{count}} рік",singularGenitive:"{{count}} роки",pluralGenitive:"{{count}} років"}}),overXYears:Ee({regular:{singularNominative:"більше {{count}} року",singularGenitive:"більше {{count}} років",pluralGenitive:"більше {{count}} років"},future:{singularNominative:"більше, ніж за {{count}} рік",singularGenitive:"більше, ніж за {{count}} роки",pluralGenitive:"більше, ніж за {{count}} років"}}),almostXYears:Ee({regular:{singularNominative:"майже {{count}} рік",singularGenitive:"майже {{count}} роки",pluralGenitive:"майже {{count}} років"},future:{singularNominative:"майже за {{count}} рік",singularGenitive:"майже за {{count}} роки",pluralGenitive:"майже за {{count}} років"}})},Ae={date:me({formats:{full:"EEEE, do MMMM y 'р.'",long:"do MMMM y 'р.'",medium:"d MMM y 'р.'",short:"dd.MM.y"},defaultWidth:"full"}),time:me({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:me({formats:{full:"{{date}} 'о' {{time}}",long:"{{date}} 'о' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Fe=["неділю","понеділок","вівторок","середу","четвер","п’ятницю","суботу"];function Le(e){return"'у "+Fe[e]+" о' p"}const Ie={lastWeek:(e,t,a)=>{const n=we(e),r=n.getDay();return xe(n,t,a)?Le(r):function(e){const t=Fe[e];switch(e){case 0:case 3:case 5:case 6:return"'у минулу "+t+" о' p";case 1:case 2:case 4:return"'у минулий "+t+" о' p"}}(r)},yesterday:"'вчора о' p",today:"'сьогодні о' p",tomorrow:"'завтра о' p",nextWeek:(e,t,a)=>{const n=we(e),r=n.getDay();return xe(n,t,a)?Le(r):function(e){const t=Fe[e];switch(e){case 0:case 3:case 5:case 6:return"'у наступну "+t+" о' p";case 1:case 2:case 4:return"'у наступний "+t+" о' p"}}(r)},other:"P"},$e={code:"uk",formatDistance:(e,t,a)=>(a=a||{},je[e](t,a)),formatLong:Ae,formatRelative:(e,t,a,n)=>{const r=Ie[e];return"function"==typeof r?r(t,a,n):r},localize:{ordinalNumber:(e,t)=>{const a=String(t?.unit),n=Number(e);let r;return r="date"===a?3===n||23===n?"-є":"-е":"minute"===a||"second"===a||"hour"===a?"-а":"-й",n+r},era:fe({values:{narrow:["до н.е.","н.е."],abbreviated:["до н. е.","н. е."],wide:["до нашої ери","нашої ери"]},defaultWidth:"wide"}),quarter:fe({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:fe({values:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"]},defaultFormattingWidth:"wide"}),day:fe({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вів","сер","чтв","птн","суб"],wide:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"]},defaultWidth:"wide"}),dayPeriod:fe({values:{narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранок",afternoon:"день",evening:"вечір",night:"ніч"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:ge({matchPattern:/^(\d+)(-?(е|й|є|а|я))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:he({matchPatterns:{narrow:/^((до )?н\.?\s?е\.?)/i,abbreviated:/^((до )?н\.?\s?е\.?)/i,wide:/^(до нашої ери|нашої ери|наша ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:he({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[иі]?й?)? кв.?/i,wide:/^[1234](-?[иі]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:he({matchPatterns:{narrow:/^[слбктчвжг]/i,abbreviated:/^(січ|лют|бер(ез)?|квіт|трав|черв|лип|серп|вер(ес)?|жовт|лис(топ)?|груд)\.?/i,wide:/^(січень|січня|лютий|лютого|березень|березня|квітень|квітня|травень|травня|червня|червень|липень|липня|серпень|серпня|вересень|вересня|жовтень|жовтня|листопад[а]?|грудень|грудня)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^с/i,/^л/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^л/i,/^с/i,/^в/i,/^ж/i,/^л/i,/^г/i],any:[/^сі/i,/^лю/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^лип/i,/^се/i,/^в/i,/^ж/i,/^лис/i,/^г/i]},defaultParseWidth:"any"}),day:he({matchPatterns:{narrow:/^[нпвсч]/i,short:/^(нд|пн|вт|ср|чт|пт|сб)\.?/i,abbreviated:/^(нед|пон|вів|сер|че?тв|птн?|суб)\.?/i,wide:/^(неділ[яі]|понеділ[ок][ка]|вівтор[ок][ка]|серед[аи]|четвер(га)?|п\W*?ятниц[яі]|субот[аи])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[он]/i,/^в/i,/^с[ер]/i,/^ч/i,/^п\W*?[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:he({matchPatterns:{narrow:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,abbreviated:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,wide:/^([дп]п|північ|полудень|ранок|ранку|день|дня|вечір|вечора|ніч|ночі)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^півн/i,noon:/^пол/i,morning:/^р/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Xe={en:De,el:We,ua:$e};function Be(e,t="en",a=!1){const n=Xe[t]??De;if(a)return I(e,{locale:n,addSuffix:!0});return X(e)?$(e,"p",{locale:n}):(e=>{const t=B(new Date,e);return t>=0&&t<=6})(e)?$(e,"eeee",{locale:n}):$(e,"P",{locale:n})}const Oe=n(a(function({date:t,language:a,distanceToNow:n,...r},i){return t?e("span",{ref:i,...r,className:R("text-xs text-muted-foreground",r?.className),children:Be(t,a,n)}):null}));function _e(e){const t=Math.floor(e/3600),a=Math.floor(e%3600/60),n=e%60,r=e=>String(e).padStart(2,"0");return t>0?`${t}:${r(a)}:${r(n)}`:`${r(a)}:${r(n)}`}Oe.displayName="FormattedDate";const Ve=n(a(function({signal:a,info:n,duration:r=0,fromMe:i=!1,isLast:o=!1,iconElement:s,iconProps:l,infoProps:c,formattedDateProps:d,...u},m){const f="hungUp"===a?w:i?"reject"===a?N:x:P;return t("div",{ref:m,...u,className:R("flex items-center justify-center gap-2 rounded-full w-fit bg-ring/20 mx-auto px-3 py-1.5",o?"my-2":"mt-2",u?.className),children:[s||e(f,{...l,className:R("size-4","hungUp"===a?"text-green-500":"text-red-500",l?.className)}),e("span",{...c,className:R("text-sm mb-px",c?.className),children:`${n}${r?` - ${_e(r)}`:""}`}),e(Oe,{distanceToNow:!0,...d})]})}));Ve.displayName="CallMessage";const qe={target:"_blank",rel:"noopener noreferrer"},He=["w-full","w-3/4","w-1/2"];const Re=n(a(function({text:t,pending:a=!1,onReady:n=()=>{},linkifyProps:i,skeletonContainerProps:o,skeletonLineProps:d,skeletonLinesClassNames:u=He,...m},f){const h=r(a),g=s(()=>({...qe,...i,className:R("text-blue-500 hover:text-blue-600 hover:underline",i?.className)}),[i]);return l(()=>{h.current&&!a&&n(),h.current=a},[a,n]),a?e("div",{...o,className:R("flex items-start flex-col size-full",o?.className),children:u.map((e,t)=>c("span",{...d,key:`${e}_${t}`,className:R("bg-muted-foreground animate-pulse rounded-md my-1 h-4",d?.className,e)}))}):e("p",{ref:f,...m,className:R("wrap-break-word text-base",m?.className),children:e(_,{options:g,children:t})})}));Re.displayName="LinkifyText";const Ye=e=>{if(0===e.length)return e;const t=document.createElement("div");return t.innerHTML=e,t.textContent.trim()};const Je=n(a(function({thin:a=!1,title:n="",description:r="",icon:o,iconFallbackElement:s,image:l,onReady:c=()=>{},titleContainerProps:u,iconProps:m,iconFallbackProps:f,titleProps:h,descriptionProps:g,imageContainerProps:p,imageProps:v,...b},y){const[w,N]=i(o),[x,P]=i(l),M=d(e=>{v?.onLoad?.(e),c()},[c,v]),W=d(e=>{m?.onError?.(e),N(void 0)},[m]),z=d(e=>{v?.onError?.(e),P(void 0)},[v]);return t("a",{ref:y,target:"_blank",rel:"noopener noreferrer",...b,className:R("transition-color duration-300 ease-out","grid items-start gap-2 p-2 mt-1 overflow-hidden rounded border-l-4 border-l-ring bg-white hover:bg-ring/20",a?"grid-cols-3":"grid-cols-1",b?.className),children:[t("div",{...u,className:R("flex items-start gap-2",a?"col-span-3":"col-span-1",u?.className),children:[w?e("img",{alt:"icon",src:w,...m,onError:W,className:R("size-5",m?.className)}):s||e(k,{...f,className:R("size-5",f?.className)}),e("span",{...h,className:R("text-sm font-bold",a?"line-clamp-1":"line-clamp-2",h?.className),children:Ye(n)})]}),r&&e("span",{...g,className:R("text-sm line-clamp-5",a?x?"col-span-2":"col-span-3":"col-span-1",g?.className),children:Ye(r)}),x&&e("div",{...p,className:R("flex items-center justify-center",p?.className),children:e("img",{alt:"banner",src:x,...v,onLoad:M,onError:z,className:R("rounded max-w-full object-contain",a?"max-h-25":"max-h-60",v?.className)})})]})}));Je.displayName="LinkPreview";const Ue=({status:t,...a})=>{switch(t){case"wait":return e(S,{...a,className:R("text-gray-500 size-4",a?.className)});case"sent":return e(z,{...a,className:R("text-gray-500 size-4",a?.className)});case"read":return e(W,{...a,className:R("text-gray-500 size-4",a?.className)});case"lost":return e(M,{...a,className:R("text-red-500 size-4",a?.className)});default:return null}};Ue.displayName="StatusSent";const Qe=n(a(function({isLast:a,fromMe:n,sameSenderAbove:i,title:s,senderName:c,senderAvatar:u,attachmentElement:m,linkifyTextElement:f,linkPreviewElement:h,onView:g=()=>{},avatarProps:p,bubbleProps:v,titleProps:b,formattedDateProps:y,statusSentProps:w,attachmentProps:N,linkifyTextProps:x,linkPreviewProps:P,children:k,...M},W){const[z,S]=O(),C=r(null),G=d(e=>{C.current=e,z(e)},[z]),D=Boolean((p||u)&&!i),T=Boolean((p||u)&&i),E=T||Boolean(n&&i);return l(()=>{S&&g()},[S,g]),o(W,()=>C.current,[]),t("div",{ref:G,...M,className:R("flex relative text-left whitespace-pre-wrap",n?"self-end flex-row-reverse ml-12":"self-start mr-12",a&&"mb-2",E?"mt-1":"mt-2",S&&"view",M?.className),children:[D&&e(ce,{name:c,src:u,imageProps:{className:"bg-ring/30"},fallbackProps:{className:"bg-ring/30"},...p,className:R("mt-1 mr-1",p?.className)}),t("div",{className:R("relative flex flex-col min-w-42 max-w-120 rounded-xl px-2 pt-2 pb-6",n?"bg-blue-200":"bg-gray-200",T&&"ml-9",v?.className),children:[(s||c)&&e("span",{...b,className:R("font-semibold",s&&"mb-1 py-1.5 text-xs text-muted-foreground italic border-b",b?.className),children:s||c}),k,m||(N?e(oe,{...N}):null),f||(x?e(Re,{...x}):null),h||(P?e(Je,{...P}):null),t("div",{className:"absolute bottom-1 right-2 flex items-center gap-1 italic",children:[e(Oe,{distanceToNow:!0,...y}),e(Ue,{...w})]})]})]})}));const Ke=n(a(function({index:a=-1,isPrivateDialog:n,selected:r,onSelect:i=()=>{},name:o,photo:s,userOnline:l,userPresence:c,hasGroupIcon:d,lastSentStatus:u,lastSentDate:m,lastSenderName:f,lastMessage:h,typingStatusText:g,draft:p,draftLabel:v="Draft",unreadCount:b=0,language:y="en",divider:w="bottom",avatarProps:N,contentProps:x,headerProps:P,headerLeftProps:k,groupIconProps:M,nameProps:W,headerRightProps:z,statusSentIconProps:S,formattedDateProps:G,footerProps:D,lastMessageProps:T,draftLabelProps:E,lastSenderNameProps:j,unreadBadgeProps:A,dividerProps:F,...L},I){const $=s||N?.src,X=o||N?.name,B=!!n&&(l||N?.online),O=n?c||N?.presence:void 0,_="top"===w||"both"===w&&0===a,V="bottom"===w||"both"===w;return t("div",{ref:I,...L,onClick:i,className:R("flex items-start gap-2 px-2 flex-1 cursor-pointer","transition-colors duration-200 ease-linear",""+(r?"border-l-[0.25em] pl-1 border-l-ring bg-ring/20":"hover:bg-ring/5"),L?.className),children:[e(ce,{src:$,name:X,online:B,presence:O,...N,className:R("size-13 my-2 "+(s?"bg-ring/10":"bg-ring/30"),N?.className)}),t("div",{...x,className:R("relative self-stretch flex-1 flex-col text-foreground",x?.className),children:[t("div",{...P,className:R("flex items-center justify-between gap-1",P?.className),children:[t("div",{...k,className:R("flex items-center gap-1",k?.className),children:[!n&&d&&e(C,{...M,className:R("text-muted-foreground size-4 min-w-4",M?.className)}),e("span",{...W,className:R("font-medium text-left line-clamp-1",W?.className),children:o})]}),t("div",{...z,className:R("flex items-center gap-1",z?.className),children:[e(Ue,{status:u,...S}),e(Oe,{date:m,language:y,...G})]})]}),t("div",{...D,className:R("flex items-start justify-between gap-1",D?.className),children:[e("span",{...T,className:R("text-sm text-left text-muted-foreground break-all line-clamp-2",T?.className),children:g||t("span",p?{children:[e("span",{...E,className:R("text-red-500 font-medium",E?.className),children:`${v}: `}),p]}:{children:[f&&e("span",{...j,className:R("font-semibold",j?.className),children:`${f}: `}),h]})}),b>0&&e(ue,{...A,className:R("bg-ring text-background text-xs rounded-full p-1 h-6 min-w-6 mt-0.5",A?.className),children:b})]}),_&&e("div",{...F,className:R("absolute -top-px left-0 right-0 border-t",F?.className)}),V&&e("div",{className:"absolute bottom-0 left-0 right-0 border-b"})]})]})}));Ke.displayName="DialogItem";const Ze=a(function({active:t,onDismiss:a,disableClickOutside:n=!1,disableEscKeyPress:i=!1,disabled:s,...c},u){const m=r(null);o(u,()=>m.current,[]);const f=d(e=>{!n&&t&&e.target===m.current&&a()},[n,t,a]),h=d(e=>{!i&&t&&"Escape"===e.key&&a()},[i,t,a]);return l(()=>{if(!i&&t)return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[i,t,h]),s||!t?null:e("div",{ref:m,"aria-hidden":!0,...c,onClick:f,onTouchStart:f,className:R("fixed top-0 left-0 size-full bg-black/20",c?.className)})});Ze.displayName="DismissLayer";const et=a(function({...t},a){return e(V,{ref:a,...t,className:R("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t?.className)})});et.displayName="Label";const tt=(e,t,a,n,r)=>{const i=Array.from(e||[]).filter(Boolean);if(0===i.length)return;const o=((e,t)=>{if(0===e.length)return!1;const a="string"==typeof t?t.split(/\s*,\s*|\s+/).map(e=>e.toLowerCase().trim()):null;return null!==a&&0!==a.length&&e.every(e=>{const{type:t,size:n}=e;if("string"!=typeof t||"number"!=typeof n||n<=0||0===t.length)return!1;const r=t.toLowerCase(),[i,o]=r.split("/");return a.some(e=>e.startsWith("*")||e===r||i&&e.endsWith("/*")&&e.startsWith(i)||e.startsWith(".")&&e.slice(1)===o)})})(i,t);o?n(a?i:i[0]?[i[0]]:[]):r()};const at=a(function({onSelectFile:a=()=>{},onInvalidFile:n=()=>{},multiple:r=!1,accept:i="*/*",iconElement:o,labelProps:s,iconProps:l,...c},d){return t(et,{...s,htmlFor:"file-uploader",className:R("group p-2 rounded-full hover:bg-ring/10 transition-all duration-200 ease-in-out cursor-pointer",s?.className),children:[o||e(G,{...l,className:R("text-foreground group-hover:scale-110 transition-all duration-200 ease-in-out",l?.className)}),e("input",{ref:d,id:"file-uploader",type:"file",multiple:r,accept:i,onChange:e=>{tt(e.currentTarget.files,i,r,a,n),e.currentTarget.value=""},...c,className:R("hidden",c?.className)})]})});at.displayName="FilePickerInput";const nt=a(function({onSelectFile:a=()=>{},onInvalidFile:n=()=>{},multiple:r=!1,accept:o="*/*",children:s,iconElement:l,placeholder:c,dropZoneProps:d,placeholderContainerProps:u,iconProps:m,placeholderProps:f,...h},g){const[p,v]=i(!1),b=e=>{e.preventDefault(),e.stopPropagation()};return t("div",{ref:g,onDragEnter:e=>{b(e),e.dataTransfer.items&&e.dataTransfer.items.length>0&&v(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||v(!1)},onDragOver:b,...h,className:R("relative size-full min-h-0",h?.className),children:[s,e("div",{onDrop:e=>{b(e),v(!1),tt(e.dataTransfer.files,o,r,a,n),e.dataTransfer.clearData()},...d,className:R("absolute top-0 left-0 size-full","flex items-center justify-center","transition-all duration-300 ease-out","border-2 border-dashed border-ring bg-ring/25 rounded-md",p?"opacity-100 pointer-events-auto visible scale-100":"opacity-0 pointer-events-none invisible scale-98",d?.className),children:t("div",{...u,className:R("bg-muted flex flex-row items-center gap-2 rounded-full py-2 px-4 transition-all",p?"scale-100":"scale-90",u?.className),children:[l||e(D,{absoluteStrokeWidth:!0,...m,className:R("text-ring size-6",m?.className)}),e("span",{...f,className:R("text-ring text-md font-bold",f?.className),children:c||"Drop files here"})]})})]})});nt.displayName="FilePickerDropzone";const rt=a(function(t,a){return e("input",{ref:a,...t,className:R("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t?.className)})});rt.displayName="Input";const it=a(function({title:t,titles:a=[],rowProps:n,...r},i){const o="string"==typeof t?[t,...a]:a;return e("div",{ref:i,...r,className:R("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",r?.className),children:o.map((t,a)=>e("div",{...n,className:R("text-center",n?.className),children:t},`placeholder-text-${a}`))})});it.displayName="PlaceholderText";const ot=a(function({onSearch:a=()=>{},onCancel:n=()=>{},hasSearchIcon:r=!0,hasCancelIcon:o=!0,searchIconProps:s,cancelIconProps:l,containerProps:c,...d},u){const[m,f]=i("");return t("div",{...c,className:R("group relative",c?.className),children:[r&&e(T,{...s,className:R("absolute top-1/2 left-2 transform -translate-y-1/2 size-5 text-muted-foreground group-focus-within:text-ring",s?.className)}),e(rt,{ref:u,name:"search",placeholder:d?.placeholder||"Search...",value:m,onChange:e=>{const t=e.target.value;f(t),a(t.toLowerCase())},...d,className:R("placeholder:text-muted-foreground focus-visible:ring-ring/50 focus-visible:ring flex",r?"pl-10":"pl-3",o?"pr-10":"pr-3",d?.className)}),o&&e(E,{onClick:()=>{f(""),n()},...l,className:R("absolute top-1/2 right-2 transform -translate-y-1/2 size-5 text-muted-foreground cursor-pointer hover:text-ring transition-all duration-300 ease-in-out",m.length>0?"opacity-100 scale-100":"opacity-0 scale-75 pointer-events-none",l?.className)})]})});ot.displayName="Search";const st=a(function({status:a="unknown",statusColorConfig:n={unknown:"bg-gray-500 border-gray-600"},statusProps:r,tooltipProviderProps:i,tooltipProps:o,tooltipTriggerProps:s,tooltipPortalProps:l,tooltipContentProps:c,tooltipArrowProps:d,tooltip:u,disabled:m,className:f,...h},g){return m?null:e("div",{ref:g,...h,className:R("absolute top-0 left-0",f),children:e(q.Provider,{...i,children:t(q.Root,{...o,children:[e(q.Trigger,{asChild:!0,...s,children:e("div",{...r,className:R("rounded-full size-4 border border-primary-foreground",n[a],r?.className)})}),e(q.Portal,{...l,children:t(q.Content,{...c,className:R("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",c?.className),children:[e("span",{children:u||a||"unknown"}),e(q.Arrow,{...d,className:R("bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]",d?.className)})]})})]})})})});st.displayName="StatusIndicator";const lt=a(function({id:t,stream:a,mirror:n,className:i,muted:c,...d},u){const m=r(null),f=s(()=>t??`stream-${Y()}`,[t]),h="boolean"==typeof c&&c,g=n?"scale-x-[-1]":"";return o(u,()=>m.current),l(()=>{if(m.current&&a){m.current.srcObject=a;const e=()=>{try{m.current?.play()}catch(e){console.error("Error playing video:",e)}};m.current.onloadedmetadata=()=>{queueMicrotask(e)}}},[a]),a?e("video",{ref:m,id:f,autoPlay:!0,playsInline:!0,muted:h,...d,className:R("size-full object-contain",g,i)}):null});lt.displayName="StreamView";const ct=a(function({muted:t,mirror:a,...n},r){return e(lt,{ref:r,muted:"boolean"!=typeof t||t,mirror:"boolean"!=typeof a||a,...n})});ct.displayName="LocalStreamView";const dt=a(function({muted:t,mirror:a,...n},r){return e(lt,{ref:r,muted:"boolean"==typeof t&&t,mirror:"boolean"==typeof a&&a,...n})});dt.displayName="RemoteStreamView";const ut=a(function({element:a,pipElement:n,navElement:s,hideIconElement:c,showIconElement:u,fullscreenButtonProps:m,fullscreenButtonIconProps:f,pipProps:h,pipButtonProps:g,pipButtonIconProps:p,...v},b){const y=r(null),[w,N]=i(!1),[x,P]=i(!1),k=d(async()=>{const e=y.current;if(e)try{document.fullscreenElement?(await document.exitFullscreen(),N(!1),P(!1)):(await e.requestFullscreen(),N(!0),P(!0))}catch(e){console.error("Fullscreen error:",e)}},[]),M=d(()=>{n&&P(e=>!e)},[n]);return o(b,()=>Object.assign(y.current,{isFullscreen:w,isPictureInPicture:x,toggleFullscreen:k,togglePictureInPicture:M}),[w,x,k,M]),l(()=>{const e=()=>{N(!!document.fullscreenElement),P(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),t("div",{ref:y,...v,className:R("relative flex items-center justify-center size-full",v?.className),children:[a,e("button",{onClick:k,...m,className:R("absolute top-2 right-2 p-1 rounded-md bg-black/50 text-white hover:bg-black/80 z-10 shadow-xs shadow-white/25",m?.className),children:w?c||e(j,{...f}):u||e(A,{...f})}),t("div",{className:"absolute size-full p-2 flex flex-col justify-end items-center",children:[w&&n&&t("div",{className:"relative size-full flex items-end justify-end",children:[x&&e("div",{...h,className:R("max-w-1/4 max-h-1/4 aspect-4/3 overflow-hidden rounded-md shadow-md shadow-white/25",h?.className),children:n}),e("button",{onClick:M,...g,className:R("absolute bottom-2 right-2 p-1 rounded-md bg-black/50 text-white hover:bg-black/80 z-10 shadow-xs shadow-white/25",g?.className),children:e(F,{...p})})]}),w&&s]})]})});function mt(t){return e(H.Root,{...t,className:R("peer data-[state=checked]:bg-ring data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15em] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring disabled:cursor-not-allowed disabled:opacity-50",t?.className),children:e(H.Thumb,{className:R("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}ut.displayName="FullscreenStreamView";export{K as AlertDialog,oe as Attachment,te as AttachmentAudio,ie as AttachmentFailed,re as AttachmentFile,ne as AttachmentImage,ee as AttachmentLink,ae as AttachmentVideo,ce as Avatar,ue as Badge,Q as Button,Ve as CallMessage,Qe as ChatMessage,Ke as DialogItem,Ze as DismissLayer,nt as FilePickerDropzone,at as FilePickerInput,Oe as FormattedDate,ut as FullscreenStreamView,rt as Input,et as Label,Je as LinkPreview,Re as LinkifyText,ct as LocalStreamView,it as PlaceholderText,le as Presence,se as PresenceBadge,dt as RemoteStreamView,ot as Search,Z as Spinner,st as StatusIndicator,Ue as StatusSent,lt as StreamView,mt as Switch,J as capitalize,R as cn,Y as getRandomString};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{forwardRef as a,memo as n,useRef as r,useState as i,useImperativeHandle as o,useCallback as s,useEffect as l,useMemo as c,createElement as d}from"react";import*as u from"@radix-ui/react-alert-dialog";import{Slot as m}from"@radix-ui/react-slot";import{cva as f}from"class-variance-authority";import{clsx as h}from"clsx";import{twMerge as g}from"tailwind-merge";import{LoaderCircle as p,Loader as v,FileXCorner as b,File as y,Ban as N,CheckCheck as w,Check as x,Clock as P,SendHorizontal as k,Paperclip as M,FilePlusCorner as W,CheckIcon as z,Users as S,Globe as C,Search as G,X as D,Phone as T,PhoneOutgoing as E,PhoneIncoming as A,PhoneMissed as j,Minimize as L,Maximize as F,PictureInPicture2 as I}from"lucide-react";import*as R from"@radix-ui/react-avatar";import{useInView as B}from"react-intersection-observer";import{formatDistanceToNow as X,format as q,isToday as _,differenceInCalendarDays as H}from"date-fns";import O from"react-textarea-autosize";import{Root as $}from"@radix-ui/react-label";import{Virtualizer as V,VList as Y}from"virtua";import*as J from"@radix-ui/react-checkbox";import U from"linkify-react";import*as Q from"@radix-ui/react-tooltip";import*as K from"@radix-ui/react-switch";function Z(...e){return g(h(e))}function ee(e=8){return(Date.now()/Math.random()).toString(36).replace(".","").slice(0,e)}function te(e){return"string"==typeof e&&e.length>0?`${e[0]?.toUpperCase()}${e.slice(1)}`:""}const ae=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});const ne=a(function({asChild:t=!1,variant:a,size:n,className:r,...i},o){return e(t?m:"button",{ref:o,...i,className:Z(ae({variant:a,size:n,className:r}),"transition-all ease-out duration-300")})});ne.displayName="Button";const re=a(function({title:a="",description:n="",cancelTitle:r="Cancel",actionTitle:i="Confirm",onCancel:o=()=>{},onConfirm:s=()=>{},rootProps:l,triggerElement:c,triggerProps:d,portalProps:m,overlayProps:f,contentProps:h,headerProps:g,titleProps:p,descriptionProps:v,footerProps:b,cancelProps:y,cancelButtonProps:N,actionProps:w,actionButtonProps:x,...P},k){return e("div",{ref:k,...P,children:t(u.Root,{...l,children:[e(u.Trigger,{asChild:!0,...d,children:c}),t(u.Portal,{...m,children:[e(u.Overlay,{...f,className:Z("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",f?.className)}),t(u.Content,{...h,className:Z("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2em)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",h?.className),children:[t("div",{...g,className:Z("flex flex-col gap-2 text-center sm:text-left",g?.className),children:[e(u.Title,{...p,className:Z("text-lg font-semibold",p?.className),children:a}),e(u.Description,{...v,className:Z("text-muted-foreground text-sm",v?.className),children:n})]}),t("div",{...b,className:Z("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",b?.className),children:[e(u.Cancel,{...y,onClick:o,children:e(ne,{variant:"outline",...N,children:r})}),e(u.Action,{...w,onClick:s,children:e(ne,{...x,children:i})})]})]})]})]})})});function ie({loading:t=!1,layout:a="flow",type:n="default",...r}){if(!t)return null;const i=e("circle"===n?p:v,{strokeWidth:2.5,...r,className:Z("animate-spin text-ring","flow"===a&&"mx-auto",r?.className)});switch(a){case"absolute":return e("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",children:i});case"centered":return e("div",{className:"flex items-center justify-center size-full",children:i});case"overlay":return e("div",{className:"flex items-center justify-center size-full absolute bg-muted/50",children:i});default:return i}}re.displayName="AlertDialog",ie.displayName="Spinner";const oe=a(function({url:a,pending:n=!1,children:r,...i},o){return t("a",{ref:o,target:"_blank",rel:"noopener noreferrer",...i,href:a,className:Z("group relative min-h-8 min-w-8 w-full flex items-center justify-center rounded-md overflow-hidden bg-ring/10 hover:bg-ring/20 transition-color duration-300 ease-out cursor-pointer",i?.className),children:[r,e(ie,{loading:n,layout:"overlay"})]})});oe.displayName="AttachmentLink";const se=a(function({uid:a,url:n,pending:r=!1,containerProps:i,...o},s){const l=`attachment_audio_${a||ee()}`;return t("div",{...i,className:Z("relative min-h-8 min-w-8 w-full rounded-md overflow-hidden",i?.className),children:[e("audio",{ref:s,src:n,id:l,controls:!0,...o}),e(ie,{loading:r,layout:"overlay"})]})});const le=a(function({uid:a,url:n,maxSize:s=360,pending:l=!1,onReady:c=()=>{},containerProps:d,...u},m){const f=`attachment_video_${a||ee()}`,h=`${s}px`,g=r(null),[p,v]=i({maxHeight:h,maxWidth:h});return o(m,()=>g.current||{},[]),t("div",{...d,className:Z("relative min-h-20 w-full rounded-md overflow-hidden",d?.className),children:[e("video",{id:f,ref:g,src:n,controls:!0,preload:"metadata",style:p,...u,onCanPlay:e=>{const t=g.current;if(t){const{videoWidth:a,videoHeight:n}=t,r=a/n||1,i=r<1?h:`${Math.round(s/r)}px`,o=r<1?`${Math.round(s*r)}px`:h;v({height:i,width:o,maxHeight:i,maxWidth:o}),u.onCanPlay?.(e),c()}},className:Z("size-full",u?.className)}),e(ie,{loading:l,layout:"overlay"})]})});le.displayName="AttachmentVideo";const ce=a(function({uid:t,url:a,pending:n=!1,onReady:r=()=>{},linkProps:i,...o},s){const l=`attachment_image_${t||ee()}`;return e(oe,{href:a,pending:n,...i,children:e("img",{ref:s,src:a,id:l,alt:"attachment",...o,className:Z("rounded-md object-cover min-h-8 min-w-8 max-h-[360px] group-hover:scale-102 transition-transform duration-300 ease-out",o?.className),onLoad:e=>{o.onLoad?.(e),r()}})})});function de({url:a,name:n,pending:r=!1,iconElement:i,linkProps:o,...s}){const l=`attachment_file_${s.id||ee()}`;return t(oe,{href:a,pending:r,...o,className:Z("flex-row gap-1.5 p-2 hover:shadow",o?.className),children:[i||e(y,{id:l,...s,className:Z("size-5 shrink-0 text-foreground/80 group-hover:text-foreground duration-300 ease-out",s?.className)}),n&&e("span",{className:"font-medium line-clamp-1 break-all text-foreground/80 group-hover:text-foreground duration-300 ease-out",children:n})]})}function ue({name:a="Unknown file",pending:n=!1,iconElement:r,containerProps:i,...o}){const s=`attachment_failed_${o.id||ee()}`;return t("div",{...i,className:Z("relative min-h-8 min-w-8 w-full flex flex-row items-center justify-center gap-2 px-2 bg-red-600/10 rounded-md overflow-hidden",i?.className),children:[r||e(b,{id:s,...o,className:Z("size-6 shrink-0 text-red-600",o?.className)}),e("span",{className:"font-medium line-clamp-1 break-all text-red-600",children:a}),e(ie,{loading:n,layout:"overlay"})]})}ce.displayName="AttachmentImage",de.displayName="AttachmentFile",ue.displayName="AttachmentFailed";const me=n(function({mimeType:t,onReady:a=()=>{},containerProps:n={},linkProps:r={},...i}){const[o=""]=t?.split("/")||[];if(!i.url)return e(ue,{...i});switch(o){case"image":return e(ce,{onReady:a,linkProps:r,...i});case"video":return e(le,{onReady:a,containerProps:n,...i});case"audio":return e(se,{containerProps:n,...i});default:return e(de,{name:t,containerProps:n,...i})}});function fe({status:t,...a}){switch(t){case"available":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...a,className:Z("rounded-full size-4.5 text-green-600 bg-white",a?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"})});case"busy":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...a,className:Z("rounded-full size-4.5 text-red-600 bg-white",a?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M4.5 7.5a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1z"})});case"away":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...a,className:Z("rounded-full size-4.5 text-yellow-500 bg-white",a?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z"})});case"unknown":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...a,className:Z("rounded-full size-4.5 text-gray-500 bg-white",a?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247m2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z"})});default:return null}}function he({badge:a=!0,status:n,label:r,badgeProps:i,labelProps:o,...s}){const l=te(r||n);return t("div",{...s,className:Z("flex items-center gap-2",s?.className),children:[a&&e(fe,{status:n,...i}),e("span",{...o,children:l})]})}me.displayName="Attachment",fe.displayName="PresenceBadge",he.displayName="Presence";const ge=n(a(function({src:a,name:n="NA",fallbackIconElement:r,online:i,presence:o,className:s,onlineProps:l,presenceProps:c,imageProps:d,fallbackProps:u,...m},f){const h=function(e){const t=e?.trim().split(/\s+/).filter(Boolean)??[];return(t.length>1?`${t[0]?.[0]}${t[1]?.[0]}`:t[0]?.slice(0,2)??"NA").toUpperCase()}(n);return t(R.Root,{ref:f,...m,className:Z("relative flex size-8 shrink-0 rounded-full",s),children:[e(R.Image,{...d,src:a,className:Z("aspect-square size-full rounded-full overflow-hidden object-cover",d?.className)}),e(R.Fallback,{...u,className:Z("bg-muted size-full rounded-full flex items-center justify-center",u?.className),children:r||h}),i&&e("div",{...l,className:Z("absolute top-0 right-0 rounded-full border-2 bg-green-600 border-green-200 size-3.5",l?.className)}),e(fe,{status:o,...c,className:Z("absolute bottom-0 right-0",c?.className)})]})}));ge.displayName="Avatar";const pe=f("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});const ve=a(function({className:t,variant:a,asChild:n=!1,...r},i){return e(n?m:"span",{ref:i,...r,className:Z(pe({variant:a}),t)})});function be(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}function ye(e){return(t,a)=>{let n;if("formatting"===(a?.context?String(a.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,r=a?.width?String(a.width):t;n=e.formattingValues[r]||e.formattingValues[t]}else{const t=e.defaultWidth,r=a?.width?String(a.width):e.defaultWidth;n=e.values[r]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function Ne(e){return(t,a={})=>{const n=a.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(r);if(!i)return null;const o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a;return}(s,e=>e.test(o)):function(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a;return}(s,e=>e.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=a.valueCallback?a.valueCallback(c):c;return{value:c,rest:t.slice(o.length)}}}function we(e){return(t,a={})=>{const n=t.match(e.matchPattern);if(!n)return null;const r=n[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=a.valueCallback?a.valueCallback(o):o;return{value:o,rest:t.slice(r.length)}}}ve.displayName="Badge";const xe=Symbol.for("constructDateFrom");function Pe(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&xe in e?e[xe](t):e instanceof Date?new e.constructor(t):new Date(t)}let ke={};function Me(){return ke}function We(e,t){return Pe(t||e,e)}function ze(e,t){const a=Me(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,r=We(e,t?.in),i=r.getDay(),o=(i<n?7:0)+i-n;return r.setDate(r.getDate()-o),r.setHours(0,0,0,0),r}function Se(e,t,a){const[n,r]=function(e,...t){const a=Pe.bind(null,e||t.find(e=>"object"==typeof e));return t.map(a)}(a?.in,e,t);return+ze(n,a)===+ze(r,a)}const Ce={lessThanXSeconds:{one:"λιγότερο από ένα δευτερόλεπτο",other:"λιγότερο από {{count}} δευτερόλεπτα"},xSeconds:{one:"1 δευτερόλεπτο",other:"{{count}} δευτερόλεπτα"},halfAMinute:"μισό λεπτό",lessThanXMinutes:{one:"λιγότερο από ένα λεπτό",other:"λιγότερο από {{count}} λεπτά"},xMinutes:{one:"1 λεπτό",other:"{{count}} λεπτά"},aboutXHours:{one:"περίπου 1 ώρα",other:"περίπου {{count}} ώρες"},xHours:{one:"1 ώρα",other:"{{count}} ώρες"},xDays:{one:"1 ημέρα",other:"{{count}} ημέρες"},aboutXWeeks:{one:"περίπου 1 εβδομάδα",other:"περίπου {{count}} εβδομάδες"},xWeeks:{one:"1 εβδομάδα",other:"{{count}} εβδομάδες"},aboutXMonths:{one:"περίπου 1 μήνας",other:"περίπου {{count}} μήνες"},xMonths:{one:"1 μήνας",other:"{{count}} μήνες"},aboutXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"},xYears:{one:"1 χρόνο",other:"{{count}} χρόνια"},overXYears:{one:"πάνω από 1 χρόνο",other:"πάνω από {{count}} χρόνια"},almostXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"}},Ge={date:be({formats:{full:"EEEE, d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"d/M/yy"},defaultWidth:"full"}),time:be({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:be({formats:{full:"{{date}} - {{time}}",long:"{{date}} - {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},De={lastWeek:e=>6===e.getDay()?"'το προηγούμενο' eeee 'στις' p":"'την προηγούμενη' eeee 'στις' p",yesterday:"'χθες στις' p",today:"'σήμερα στις' p",tomorrow:"'αύριο στις' p",nextWeek:"eeee 'στις' p",other:"P"},Te={code:"el",formatDistance:(e,t,a)=>{let n;const r=Ce[e];return n="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",String(t)),a?.addSuffix?a.comparison&&a.comparison>0?"σε "+n:n+" πριν":n},formatLong:Ge,formatRelative:(e,t)=>{const a=De[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>{const a=Number(e),n=t?.unit;let r;return r="year"===n||"month"===n?"ος":"week"===n||"dayOfYear"===n||"day"===n||"hour"===n||"date"===n?"η":"ο",a+r},era:ye({values:{narrow:["πΧ","μΧ"],abbreviated:["π.Χ.","μ.Χ."],wide:["προ Χριστού","μετά Χριστόν"]},defaultWidth:"wide"}),quarter:ye({values:{narrow:["1","2","3","4"],abbreviated:["Τ1","Τ2","Τ3","Τ4"],wide:["1ο τρίμηνο","2ο τρίμηνο","3ο τρίμηνο","4ο τρίμηνο"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:ye({values:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ"],wide:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"]},defaultWidth:"wide",formattingValues:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],wide:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"]},defaultFormattingWidth:"wide"}),day:ye({values:{narrow:["Κ","Δ","T","Τ","Π","Π","Σ"],short:["Κυ","Δε","Τρ","Τε","Πέ","Πα","Σά"],abbreviated:["Κυρ","Δευ","Τρί","Τετ","Πέμ","Παρ","Σάβ"],wide:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},defaultWidth:"wide"}),dayPeriod:ye({values:{narrow:{am:"πμ",pm:"μμ",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},abbreviated:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},wide:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"}},defaultWidth:"wide"})},match:{ordinalNumber:we({matchPattern:/^(\d+)(ος|η|ο)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Ne({matchPatterns:{narrow:/^(πΧ|μΧ)/i,abbreviated:/^(π\.?\s?χ\.?|π\.?\s?κ\.?\s?χ\.?|μ\.?\s?χ\.?|κ\.?\s?χ\.?)/i,wide:/^(προ Χριστο(ύ|υ)|πριν απ(ό|ο) την Κοιν(ή|η) Χρονολογ(ί|ι)α|μετ(ά|α) Χριστ(ό|ο)ν|Κοιν(ή|η) Χρονολογ(ί|ι)α)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^π/i,/^(μ|κ)/i]},defaultParseWidth:"any"}),quarter:Ne({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^τ[1234]/i,wide:/^[1234]ο? τρ(ί|ι)μηνο/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ne({matchPatterns:{narrow:/^[ιφμαμιιασονδ]/i,abbreviated:/^(ιαν|φεβ|μ[άα]ρ|απρ|μ[άα][ιΐ]|ιο[ύυ]ν|ιο[ύυ]λ|α[ύυ]γ|σεπ|οκτ|νο[έε]|δεκ)/i,wide:/^(μ[άα][ιΐ]|α[ύυ]γο[υύ]στ)(ος|ου)|(ιανου[άα]ρ|φεβρου[άα]ρ|μ[άα]ρτ|απρ[ίι]λ|ιο[ύυ]ν|ιο[ύυ]λ|σεπτ[έε]μβρ|οκτ[ώω]βρ|νο[έε]μβρ|δεκ[έε]μβρ)(ιος|ίου)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ι/i,/^φ/i,/^μ/i,/^α/i,/^μ/i,/^ι/i,/^ι/i,/^α/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i],any:[/^ια/i,/^φ/i,/^μ[άα]ρ/i,/^απ/i,/^μ[άα][ιΐ]/i,/^ιο[ύυ]ν/i,/^ιο[ύυ]λ/i,/^α[ύυ]/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i]},defaultParseWidth:"any"}),day:Ne({matchPatterns:{narrow:/^[κδτπσ]/i,short:/^(κυ|δε|τρ|τε|π[εέ]|π[αά]|σ[αά])/i,abbreviated:/^(κυρ|δευ|τρι|τετ|πεμ|παρ|σαβ)/i,wide:/^(κυριακ(ή|η)|δευτ(έ|ε)ρα|τρ(ί|ι)τη|τετ(ά|α)ρτη|π(έ|ε)μπτη|παρασκευ(ή|η)|σ(ά|α)ββατο)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^κ/i,/^δ/i,/^τ/i,/^τ/i,/^π/i,/^π/i,/^σ/i],any:[/^κ/i,/^δ/i,/^τρ/i,/^τε/i,/^π[εέ]/i,/^π[αά]/i,/^σ/i]},defaultParseWidth:"any"}),dayPeriod:Ne({matchPatterns:{narrow:/^(πμ|μμ|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i,any:/^([πμ]\.?\s?μ\.?|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^πμ|π\.\s?μ\./i,pm:/^μμ|μ\.\s?μ\./i,midnight:/^μεσάν/i,noon:/^μεσημ(έ|ε)/i,morning:/πρω(ί|ι)/i,afternoon:/απ(ό|ο)γευμα/i,evening:/βρ(ά|α)δυ/i,night:/ν(ύ|υ)χτα/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Ee={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ae={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},je={ordinalNumber:(e,t)=>{const a=Number(e),n=a%100;if(n>20||n<10)switch(n%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},era:ye({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ye({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:ye({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ye({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ye({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},Le={ordinalNumber:we({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Ne({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Ne({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ne({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Ne({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Ne({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},Fe={code:"en-US",formatDistance:(e,t,a)=>{let n;const r=Ee[e];return n="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),a?.addSuffix?a.comparison&&a.comparison>0?"in "+n:n+" ago":n},formatLong:{date:be({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:be({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:be({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:(e,t,a,n)=>Ae[e],localize:je,match:Le,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ie(e,t){if(void 0!==e.one&&1===t)return e.one;const a=t%10,n=t%100;return 1===a&&11!==n?e.singularNominative.replace("{{count}}",String(t)):a>=2&&a<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function Re(e){return(t,a)=>a&&a.addSuffix?a.comparison&&a.comparison>0?e.future?Ie(e.future,t):"за "+Ie(e.regular,t):e.past?Ie(e.past,t):Ie(e.regular,t)+" тому":Ie(e.regular,t)}const Be={lessThanXSeconds:Re({regular:{one:"менше секунди",singularNominative:"менше {{count}} секунди",singularGenitive:"менше {{count}} секунд",pluralGenitive:"менше {{count}} секунд"},future:{one:"менше, ніж за секунду",singularNominative:"менше, ніж за {{count}} секунду",singularGenitive:"менше, ніж за {{count}} секунди",pluralGenitive:"менше, ніж за {{count}} секунд"}}),xSeconds:Re({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунди",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду тому",singularGenitive:"{{count}} секунди тому",pluralGenitive:"{{count}} секунд тому"},future:{singularNominative:"за {{count}} секунду",singularGenitive:"за {{count}} секунди",pluralGenitive:"за {{count}} секунд"}}),halfAMinute:(e,t)=>t&&t.addSuffix?t.comparison&&t.comparison>0?"за півхвилини":"півхвилини тому":"півхвилини",lessThanXMinutes:Re({regular:{one:"менше хвилини",singularNominative:"менше {{count}} хвилини",singularGenitive:"менше {{count}} хвилин",pluralGenitive:"менше {{count}} хвилин"},future:{one:"менше, ніж за хвилину",singularNominative:"менше, ніж за {{count}} хвилину",singularGenitive:"менше, ніж за {{count}} хвилини",pluralGenitive:"менше, ніж за {{count}} хвилин"}}),xMinutes:Re({regular:{singularNominative:"{{count}} хвилина",singularGenitive:"{{count}} хвилини",pluralGenitive:"{{count}} хвилин"},past:{singularNominative:"{{count}} хвилину тому",singularGenitive:"{{count}} хвилини тому",pluralGenitive:"{{count}} хвилин тому"},future:{singularNominative:"за {{count}} хвилину",singularGenitive:"за {{count}} хвилини",pluralGenitive:"за {{count}} хвилин"}}),aboutXHours:Re({regular:{singularNominative:"близько {{count}} години",singularGenitive:"близько {{count}} годин",pluralGenitive:"близько {{count}} годин"},future:{singularNominative:"приблизно за {{count}} годину",singularGenitive:"приблизно за {{count}} години",pluralGenitive:"приблизно за {{count}} годин"}}),xHours:Re({regular:{singularNominative:"{{count}} годину",singularGenitive:"{{count}} години",pluralGenitive:"{{count}} годин"}}),xDays:Re({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} днi",pluralGenitive:"{{count}} днів"}}),aboutXWeeks:Re({regular:{singularNominative:"близько {{count}} тижня",singularGenitive:"близько {{count}} тижнів",pluralGenitive:"близько {{count}} тижнів"},future:{singularNominative:"приблизно за {{count}} тиждень",singularGenitive:"приблизно за {{count}} тижні",pluralGenitive:"приблизно за {{count}} тижнів"}}),xWeeks:Re({regular:{singularNominative:"{{count}} тиждень",singularGenitive:"{{count}} тижні",pluralGenitive:"{{count}} тижнів"}}),aboutXMonths:Re({regular:{singularNominative:"близько {{count}} місяця",singularGenitive:"близько {{count}} місяців",pluralGenitive:"близько {{count}} місяців"},future:{singularNominative:"приблизно за {{count}} місяць",singularGenitive:"приблизно за {{count}} місяці",pluralGenitive:"приблизно за {{count}} місяців"}}),xMonths:Re({regular:{singularNominative:"{{count}} місяць",singularGenitive:"{{count}} місяці",pluralGenitive:"{{count}} місяців"}}),aboutXYears:Re({regular:{singularNominative:"близько {{count}} року",singularGenitive:"близько {{count}} років",pluralGenitive:"близько {{count}} років"},future:{singularNominative:"приблизно за {{count}} рік",singularGenitive:"приблизно за {{count}} роки",pluralGenitive:"приблизно за {{count}} років"}}),xYears:Re({regular:{singularNominative:"{{count}} рік",singularGenitive:"{{count}} роки",pluralGenitive:"{{count}} років"}}),overXYears:Re({regular:{singularNominative:"більше {{count}} року",singularGenitive:"більше {{count}} років",pluralGenitive:"більше {{count}} років"},future:{singularNominative:"більше, ніж за {{count}} рік",singularGenitive:"більше, ніж за {{count}} роки",pluralGenitive:"більше, ніж за {{count}} років"}}),almostXYears:Re({regular:{singularNominative:"майже {{count}} рік",singularGenitive:"майже {{count}} роки",pluralGenitive:"майже {{count}} років"},future:{singularNominative:"майже за {{count}} рік",singularGenitive:"майже за {{count}} роки",pluralGenitive:"майже за {{count}} років"}})},Xe={date:be({formats:{full:"EEEE, do MMMM y 'р.'",long:"do MMMM y 'р.'",medium:"d MMM y 'р.'",short:"dd.MM.y"},defaultWidth:"full"}),time:be({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:be({formats:{full:"{{date}} 'о' {{time}}",long:"{{date}} 'о' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},qe=["неділю","понеділок","вівторок","середу","четвер","п’ятницю","суботу"];function _e(e){return"'у "+qe[e]+" о' p"}const He={lastWeek:(e,t,a)=>{const n=We(e),r=n.getDay();return Se(n,t,a)?_e(r):function(e){const t=qe[e];switch(e){case 0:case 3:case 5:case 6:return"'у минулу "+t+" о' p";case 1:case 2:case 4:return"'у минулий "+t+" о' p"}}(r)},yesterday:"'вчора о' p",today:"'сьогодні о' p",tomorrow:"'завтра о' p",nextWeek:(e,t,a)=>{const n=We(e),r=n.getDay();return Se(n,t,a)?_e(r):function(e){const t=qe[e];switch(e){case 0:case 3:case 5:case 6:return"'у наступну "+t+" о' p";case 1:case 2:case 4:return"'у наступний "+t+" о' p"}}(r)},other:"P"},Oe={code:"uk",formatDistance:(e,t,a)=>(a=a||{},Be[e](t,a)),formatLong:Xe,formatRelative:(e,t,a,n)=>{const r=He[e];return"function"==typeof r?r(t,a,n):r},localize:{ordinalNumber:(e,t)=>{const a=String(t?.unit),n=Number(e);let r;return r="date"===a?3===n||23===n?"-є":"-е":"minute"===a||"second"===a||"hour"===a?"-а":"-й",n+r},era:ye({values:{narrow:["до н.е.","н.е."],abbreviated:["до н. е.","н. е."],wide:["до нашої ери","нашої ери"]},defaultWidth:"wide"}),quarter:ye({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:ye({values:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"]},defaultFormattingWidth:"wide"}),day:ye({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вів","сер","чтв","птн","суб"],wide:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"]},defaultWidth:"wide"}),dayPeriod:ye({values:{narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранок",afternoon:"день",evening:"вечір",night:"ніч"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:we({matchPattern:/^(\d+)(-?(е|й|є|а|я))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Ne({matchPatterns:{narrow:/^((до )?н\.?\s?е\.?)/i,abbreviated:/^((до )?н\.?\s?е\.?)/i,wide:/^(до нашої ери|нашої ери|наша ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:Ne({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[иі]?й?)? кв.?/i,wide:/^[1234](-?[иі]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ne({matchPatterns:{narrow:/^[слбктчвжг]/i,abbreviated:/^(січ|лют|бер(ез)?|квіт|трав|черв|лип|серп|вер(ес)?|жовт|лис(топ)?|груд)\.?/i,wide:/^(січень|січня|лютий|лютого|березень|березня|квітень|квітня|травень|травня|червня|червень|липень|липня|серпень|серпня|вересень|вересня|жовтень|жовтня|листопад[а]?|грудень|грудня)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^с/i,/^л/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^л/i,/^с/i,/^в/i,/^ж/i,/^л/i,/^г/i],any:[/^сі/i,/^лю/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^лип/i,/^се/i,/^в/i,/^ж/i,/^лис/i,/^г/i]},defaultParseWidth:"any"}),day:Ne({matchPatterns:{narrow:/^[нпвсч]/i,short:/^(нд|пн|вт|ср|чт|пт|сб)\.?/i,abbreviated:/^(нед|пон|вів|сер|че?тв|птн?|суб)\.?/i,wide:/^(неділ[яі]|понеділ[ок][ка]|вівтор[ок][ка]|серед[аи]|четвер(га)?|п\W*?ятниц[яі]|субот[аи])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[он]/i,/^в/i,/^с[ер]/i,/^ч/i,/^п\W*?[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:Ne({matchPatterns:{narrow:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,abbreviated:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,wide:/^([дп]п|північ|полудень|ранок|ранку|день|дня|вечір|вечора|ніч|ночі)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^півн/i,noon:/^пол/i,morning:/^р/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},$e={en:Fe,el:Te,ua:Oe};function Ve(e,t="en",a=!1){const n=$e[t]??Fe;if(a)return X(e,{locale:n,addSuffix:!0});return _(e)?q(e,"p",{locale:n}):(e=>{const t=H(new Date,e);return t>=0&&t<=6})(e)?q(e,"eeee",{locale:n}):q(e,"P",{locale:n})}const Ye=n(a(function({date:t,language:a,distanceToNow:n,...r},i){return t?e("span",{ref:i,...r,className:Z("text-xs text-muted-foreground",r?.className),children:Ve(t,a,n)}):null}));Ye.displayName="FormattedDate";const Je=({status:t,...a})=>{switch(t){case"wait":return e(P,{...a,className:Z("text-gray-500 size-4",a?.className)});case"sent":return e(x,{...a,className:Z("text-gray-500 size-4",a?.className)});case"read":return e(w,{...a,className:Z("text-gray-500 size-4",a?.className)});case"lost":return e(N,{...a,className:Z("text-red-500 size-4",a?.className)});default:return null}};Je.displayName="StatusSent";const Ue=a(function({onView:t=()=>{},isLast:a,children:n,...i},c){const[d,u]=B(),m=r(null),f=s(e=>{m.current=e,d(e)},[d]);return l(()=>{u&&t()},[u,t]),o(c,()=>m.current||{},[]),e("div",{ref:f,...i,className:Z("mt-2",a&&"mb-2",u&&"view",i?.className),children:n})});const Qe=n(a(function({fromMe:a,sameSenderAbove:n,title:r,senderName:i,senderAvatar:o,date:s=new Date,language:l="en",statusSent:c,avatarProps:d,bubbleProps:u,titleProps:m,formattedDateProps:f,statusSentProps:h,children:g,...p},v){const b=Boolean((d||o)&&!n),y=Boolean((d||o)&&n);return t(Ue,{ref:v,...p,className:Z("flex relative text-left whitespace-pre-wrap",a?"self-end flex-row-reverse ml-12":"self-start mr-12",n&&"mt-1"),children:[b&&e(ge,{name:i,src:o,imageProps:{className:"bg-blue-200"},fallbackProps:{className:"bg-blue-200"},...d,className:Z("mt-1 mr-1",d?.className)}),t("div",{className:Z("relative flex flex-col min-w-42 max-w-120 rounded-xl px-2 pt-2 pb-6 shadow-sm",a?"bg-gray-200":"bg-blue-200",y&&"ml-9",u?.className),children:[(r||i)&&e("span",{...m,className:Z("font-semibold",r&&"mb-1 py-1.5 text-xs text-muted-foreground italic border-b",m?.className),children:r||i}),g,t("div",{className:"absolute bottom-1 right-2 flex items-center gap-1 italic",children:[e(Ye,{date:s,language:l,distanceToNow:!0,...f}),e(Je,{status:c,...h})]})]})]})}));Qe.displayName="ChatBubbleMessage";const Ke=n(a(function({info:a="",iconElement:n,date:r=new Date,language:i="en",infoProps:o,formattedDateProps:s,...l},c){return t(Ue,{ref:c,...l,className:Z("flex items-center justify-center gap-2 rounded-full w-fit bg-ring/20 mx-auto px-3 py-1.5 mt-2"),children:[n,e("span",{...o,className:Z("text-sm mb-px",o?.className),children:a}),e(Ye,{date:r,language:i,distanceToNow:!0,...s})]})}));Ke.displayName="ChatBubbleInfo";const Ze=a(function({...t},a){return e($,{ref:a,...t,className:Z("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t?.className)})});Ze.displayName="Label";const et=a(function({onSend:t=()=>{},iconElement:a,iconProps:n,...r},i){return e(Ze,{ref:i,...r,onClick:t,className:Z("group rounded-full py-2 pl-2.5 pr-1.5 cursor-pointer bg-ring/90 hover:bg-ring",r?.className),children:a||e(k,{...n,className:Z("text-background group-hover:scale-110 transition-all duration-200 ease-out",n?.className)})})});et.displayName="ChatInputSend";const tt=a(function({pending:a=!1,draft:n,onSend:s=()=>{},onDraft:c=()=>{},onTyping:d=()=>{},onHeightGrow:u=()=>{},hideChatInputSend:m=!1,chatInputSendProps:f,containerProps:h,children:g,...p},v){const[b,y]=i(),N=r(null),w=r(0),x=r(!1),P=r(void 0),k=()=>{x.current=!1,d(!1),P.current&&(clearTimeout(P.current),P.current=void 0)},M=async()=>{k(),"string"==typeof b&&b.length>0&&(s(b.trim()),y(""),N.current?.focus())};return l(()=>{const e=N.current;return k(),queueMicrotask(()=>y(n)),e?.focus(),()=>{c(e?.value)}},[p.key]),o(v,()=>N.current||{},[]),t("div",{...h,className:Z("flex items-end gap-2",h?.className),children:[e(O,{name:"textarea-autosize",ref:N,autoFocus:!0,minRows:1,maxRows:8,...p,value:b,onChange:e=>{const{data:t}=e.nativeEvent;y(e.target.value),!x.current&&"string"==typeof t&&t.length>0&&(x.current=!0,d(!0)),clearTimeout(P.current),P.current=setTimeout(k,5e3)},onKeyDown:e=>{"Enter"===e.key&&!1===e.shiftKey&&(e.preventDefault(),p.onKeyDown?.(e),M())},onHeightChange:(e,t)=>{if(e||t){if(e!==w.current){const a=e>w.current?t.rowHeight:-t.rowHeight;u({height:e,shift:a})}w.current=e}},className:Z("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-11 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","resize-none py-2.5",a&&"pointer-events-none bg-muted-foreground border-ring ring-ring/50 animate-pulse",p?.className)}),!m&&e(et,{onSend:M,...f}),g]})});tt.displayName="ChatInput";const at=(e,t,a,n,r)=>{const i=Array.from(e||[]).filter(Boolean);if(0===i.length)return;const o=((e,t)=>{if(0===e.length)return!1;const a="string"==typeof t?t.split(/\s*,\s*|\s+/).map(e=>e.toLowerCase().trim()):null;return null!==a&&0!==a.length&&e.every(e=>{const{type:t,size:n}=e;if("string"!=typeof t||"number"!=typeof n||n<=0||0===t.length)return!1;const r=t.toLowerCase(),[i,o]=r.split("/");return a.some(e=>e.startsWith("*")||e===r||i&&e.endsWith("/*")&&e.startsWith(i)||e.startsWith(".")&&e.slice(1)===o)})})(i,t);o?n(a?i:i[0]?[i[0]]:[]):r()};const nt=a(function({onSelectFile:a=()=>{},onInvalidFile:n=()=>{},multiple:r=!1,accept:i="*/*",iconElement:o,labelProps:s,iconProps:l,...c},d){return t(Ze,{...s,htmlFor:"file-uploader",className:Z("group p-2 rounded-full hover:bg-ring/10 transition-all duration-200 ease-out cursor-pointer",s?.className),children:[o||e(M,{...l,className:Z("text-foreground group-hover:scale-110 transition-all duration-200 ease-out",l?.className)}),e("input",{ref:d,id:"file-uploader",type:"file",multiple:r,accept:i,onChange:e=>{at(e.currentTarget.files,i,r,a,n),e.currentTarget.value=""},...c,className:Z("hidden",c?.className)})]})});nt.displayName="FilePickerInput";const rt=a(function({onSelectFile:a=()=>{},onInvalidFile:n=()=>{},multiple:r=!1,accept:o="*/*",children:s,iconElement:l,placeholder:c,dropZoneProps:d,placeholderContainerProps:u,iconProps:m,placeholderProps:f,...h},g){const[p,v]=i(!1),b=e=>{e.preventDefault(),e.stopPropagation()};return t("div",{ref:g,onDragEnter:e=>{b(e),e.dataTransfer.items&&e.dataTransfer.items.length>0&&v(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||v(!1)},onDragOver:b,...h,className:Z("relative size-full min-h-0",h?.className),children:[s,e("div",{onDrop:e=>{b(e),v(!1),at(e.dataTransfer.files,o,r,a,n),e.dataTransfer.clearData()},...d,className:Z("absolute top-0 left-0 size-full","flex items-center justify-center","transition-all duration-300 ease-out","border-2 border-dashed border-ring bg-ring/25 rounded-md",p?"opacity-100 pointer-events-auto visible scale-100":"opacity-0 pointer-events-none invisible scale-98",d?.className),children:t("div",{...u,className:Z("bg-muted flex flex-row items-center gap-2 rounded-full py-2 px-4 transition-all",p?"scale-100":"scale-90",u?.className),children:[l||e(W,{absoluteStrokeWidth:!0,...m,className:Z("text-ring size-6",m?.className)}),e("span",{...f,className:Z("text-ring text-md font-bold",f?.className),children:c||"Drop files here"})]})})]})});rt.displayName="FilePickerDropzone";const it=a(function({title:a,description:n,actions:r=[],onAction:i=()=>{},containerProps:o,titleProps:s,descriptionProps:l,actionProps:c,...d},u){return r.length?t("div",{ref:u,...o,className:Z("flex flex-col h-full overflow-y-auto py-2",o?.className),children:[e("div",{className:"grow"}),t("div",{...d,className:Z("grid gap-2 m-4",d?.className),children:[a&&e("h2",{...s,className:Z("font-medium text-foreground text-lg",s?.className),children:a}),n&&e("span",{...l,className:Z("text-sm text-muted-foreground mb-4",l?.className),children:n}),r.map((t,a)=>e("div",{...c,className:Z("w-full border p-2 rounded-md wrap-break-word cursor-pointer overflow-hidden text-ellipsis bg-ring/5 hover:bg-ring/20 transition-colors duration-200 ease-out",c?.className),onClick:()=>i(t),children:t},a))]})]}):null});function ot({children:t,...a}){return e("div",{...a,className:Z("relative size-full min-h-0",a?.className),children:t})}it.displayName="QuickActions";const st=a(function({key:a,loading:n=!1,textareaMeasurement:c,offsetToReach:d=200,onScrollStartReached:u,onScrollEndReached:m,onListReset:f,onListCreate:h,onListGrow:g,enableFilePickerDropzone:p=!0,containerProps:v,filePickerDropzoneProps:b,quickActionsProps:y,children:N,quickActionsVisible:w,minItemsCount:x=1,...P},k){const M=p?rt:ot,W=p?b:v,z=Array.isArray(N)?N.length:Array.isArray(P.data)?P.data.length:0,S=r(0),C=r(void 0),[G,D]=i(!1),[T,E]=i(!1),A=r(null),j=()=>{queueMicrotask(()=>{E(!0),queueMicrotask(()=>E(!1))})},L=s((e=!1)=>{A.current&&(e||A.current.scrollSize-A.current.scrollOffset<2*A.current.viewportSize)&&queueMicrotask(()=>A.current?.scrollToIndex(z-1,{align:"start"}))},[z]);return l(()=>{a!==C.current&&(j(),f?.(C.current,a),C.current=a,S.current=0)},[a,f]),l(()=>{0===S.current&&z>0&&(j(),h?.(),S.current=z,L(!0)),z>S.current&&(g?.(),S.current=z,G&&queueMicrotask(()=>D(!1)),L())},[z,G,h,g,L]),l(()=>{A.current?.scrollBy(c.shift)},[c]),o(k,()=>({...A.current||{},scrollToBottom:L}),[L]),T?null:x>=z?w?e(it,{...y}):e(ie,{loading:!0,layout:"centered"}):t(M,{...W,children:[e(ie,{loading:n,className:"my-5"}),t("div",{className:"flex flex-col h-full overflow-y-auto px-2",children:[e("div",{className:"grow"}),e(V,{ref:A,onScroll:async e=>{P.onScroll?.(e),A.current&&("function"==typeof u&&e<d&&(D(!0),u()),"function"==typeof m&&A.current.viewportSize+e+d>A.current.scrollSize&&m())},shift:G,...P,children:N})]})]})});st.displayName="ChatList";const lt=a(function({iconElement:t,iconProps:a,indicatorProps:n,...r},i){return e(J.Root,{ref:i,...r,className:Z("peer border-input dark:bg-input/30 data-[state=checked]:bg-ring data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-ring data-[state=checked]:border-ring focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r?.className),children:e(J.Indicator,{...n,className:Z("flex items-center justify-center text-current transition-none",n?.className),children:t||e(z,{...a,className:Z("size-3.5",a?.className)})})})});lt.displayName="Checkbox";const ct=n(a(function({index:a=-1,isPrivateDialog:n,selected:r,onSelect:i=()=>{},name:o,photo:s,userOnline:l,userPresence:c,hasGroupIcon:d,lastSentStatus:u,lastSentDate:m,lastSenderName:f,lastMessage:h,typingStatusText:g,draft:p,draftLabel:v="Draft",unreadCount:b=0,language:y="en",divider:N="bottom",avatarProps:w,contentProps:x,headerProps:P,headerLeftProps:k,groupIconProps:M,nameProps:W,headerRightProps:z,statusSentIconProps:C,formattedDateProps:G,footerProps:D,lastMessageProps:T,draftLabelProps:E,lastSenderNameProps:A,unreadBadgeProps:j,dividerProps:L,...F},I){const R=s||w?.src,B=o||w?.name,X=!!n&&(l||w?.online),q=n?c||w?.presence:void 0,_="top"===N||"both"===N&&0===a,H="bottom"===N||"both"===N;return t("div",{ref:I,...F,onClick:i,className:Z("flex items-start gap-2 px-2 flex-1 cursor-pointer","transition-colors duration-200 ease-out",""+(r?"border-l-[0.25em] pl-1 border-l-ring bg-ring/20":"hover:bg-ring/5"),F?.className),children:[e(ge,{src:R,name:B,online:X,presence:q,...w,className:Z("size-13 my-2 "+(s?"bg-ring/10":"bg-ring/30"),w?.className)}),t("div",{...x,className:Z("relative self-stretch flex-1 flex-col text-foreground",x?.className),children:[t("div",{...P,className:Z("flex items-center justify-between gap-1",P?.className),children:[t("div",{...k,className:Z("flex items-center gap-1",k?.className),children:[!n&&d&&e(S,{...M,className:Z("text-muted-foreground size-4 min-w-4",M?.className)}),e("span",{...W,className:Z("font-medium text-left line-clamp-1",W?.className),children:o})]}),t("div",{...z,className:Z("flex items-center gap-1",z?.className),children:[e(Je,{status:u,...C}),e(Ye,{date:m,language:y,...G})]})]}),t("div",{...D,className:Z("flex items-start justify-between gap-1",D?.className),children:[e("span",{...T,className:Z("text-sm text-left text-muted-foreground break-all line-clamp-2",T?.className),children:g||t("span",p?{children:[e("span",{...E,className:Z("text-red-500 font-medium",E?.className),children:`${v}: `}),p]}:{children:[f&&e("span",{...A,className:Z("font-semibold",A?.className),children:`${f}: `}),h]})}),b>0&&e(ve,{...j,className:Z("bg-ring text-background text-xs rounded-full p-1 h-6 min-w-6 mt-0.5",j?.className),children:b})]}),_&&e("div",{...L,className:Z("absolute -top-px left-0 right-0 border-t",L?.className)}),H&&e("div",{className:"absolute bottom-0 left-0 right-0 border-b"})]})]})}));ct.displayName="DialogItem";const dt=a(function({title:t,titles:a=[],rowProps:n,...r},i){const o="string"==typeof t?[t,...a]:a;return e("div",{ref:i,...r,className:Z("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",r?.className),children:o.map((t,a)=>e("div",{...n,className:Z("text-center text-muted-foreground",n?.className),children:t},`placeholder-text-${a}`))})});dt.displayName="PlaceholderText";const ut=()=>t("div",{className:"flex flex-row gap-2 mx-2 border-b",children:[e("div",{className:"size-13 my-2 rounded-full bg-muted animate-pulse"}),t("div",{className:"flex-1 text-muted",children:[t("div",{className:"flex flex-row items-center justify-between h-6",children:[e("div",{className:"w-2/3 h-4 rounded-full bg-muted animate-pulse"}),e("div",{className:"w-1/6 h-3.5 rounded-full bg-muted animate-pulse"})]}),t("div",{className:"flex flex-col items-start justify-around h-10",children:[e("div",{className:"w-7/8 h-3.5 rounded-full bg-muted animate-pulse"}),e("div",{className:"w-5/6 h-3.5 rounded-full bg-muted animate-pulse"})]})]})]});const mt=a(function({children:t,pending:a,pendingListLength:n=5,offsetToReach:i=50,placeholderVisible:s,placeholderTitles:l=["No dialogs yet.","Start a conversation!"],onScrollStartReached:c,onScrollEndReached:d,...u},m){const f=r(null),h=Array.from({length:n}).map((t,a)=>e(ut,{},`pending_dialog_item_${a}`));return o(m,()=>f.current||{},[]),s?e(dt,{titles:l,className:"text-base text-muted"}):e(Y,{ref:f,onScroll:async e=>{u.onScroll?.(e),f.current&&("function"==typeof c&&e<i&&c(),"function"==typeof d&&f.current.viewportSize+e+i>f.current.scrollSize&&d())},className:"size-full overflow-y-scroll",...u,children:a?h:t})});mt.displayName="DialogsList";const ft=a(function({active:t,onDismiss:a,disableClickOutside:n=!1,disableEscKeyPress:i=!1,disabled:c,...d},u){const m=r(null);o(u,()=>m.current||{},[]);const f=s(e=>{!n&&t&&e.target===m.current&&a()},[n,t,a]),h=s(e=>{!i&&t&&"Escape"===e.key&&a()},[i,t,a]);return l(()=>{if(!i&&t)return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[i,t,h]),c||!t?null:e("div",{ref:m,"aria-hidden":!0,...d,onClick:f,onTouchStart:f,className:Z("fixed top-0 left-0 size-full bg-black/20",d?.className)})});ft.displayName="DismissLayer";const ht=a(function(t,a){return e("input",{ref:a,...t,className:Z("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t?.className)})});ht.displayName="Input";const gt=e=>{if(0===e.length)return e;const t=document.createElement("div");return t.innerHTML=e,t.textContent.trim()};const pt=n(a(function({thin:a=!1,title:n="",description:r="",icon:o,iconFallbackElement:l,image:c,onReady:d=()=>{},titleContainerProps:u,iconProps:m,iconFallbackProps:f,titleProps:h,descriptionProps:g,imageContainerProps:p,imageProps:v,...b},y){const[N,w]=i(o),[x,P]=i(c),k=s(e=>{v?.onLoad?.(e),d()},[d,v]),M=s(e=>{m?.onError?.(e),w(void 0)},[m]),W=s(e=>{v?.onError?.(e),P(void 0)},[v]);return t("a",{ref:y,target:"_blank",rel:"noopener noreferrer",...b,className:Z("transition-color duration-300 ease-out","grid items-start gap-2 p-2 mt-1 overflow-hidden rounded border-l-4 border-l-ring bg-white hover:bg-ring/20",a?"grid-cols-3":"grid-cols-1",b?.className),children:[t("div",{...u,className:Z("flex items-start gap-2",a?"col-span-3":"col-span-1",u?.className),children:[N?e("img",{alt:"icon",src:N,...m,onError:M,className:Z("size-5",m?.className)}):l||e(C,{...f,className:Z("size-5",f?.className)}),e("span",{...h,className:Z("text-sm font-bold",a?"line-clamp-1":"line-clamp-2",h?.className),children:gt(n)})]}),r&&e("span",{...g,className:Z("text-sm line-clamp-5",a?x?"col-span-2":"col-span-3":"col-span-1",g?.className),children:gt(r)}),x&&e("div",{...p,className:Z("flex items-center justify-center",p?.className),children:e("img",{alt:"banner",src:x,...v,onLoad:k,onError:W,className:Z("rounded max-w-full object-contain",a?"max-h-25":"max-h-60",v?.className)})})]})}));pt.displayName="LinkPreview";const vt={target:"_blank",rel:"noopener noreferrer"},bt=["w-full","w-3/4","w-1/2"];const yt=n(a(function({text:t,pending:a=!1,onReady:n=()=>{},linkifyProps:i,skeletonContainerProps:o,skeletonLineProps:s,skeletonLinesClassNames:u=bt,...m},f){const h=r(a),g=c(()=>({...vt,...i,className:Z("text-blue-500 hover:text-blue-600 hover:underline",i?.className)}),[i]);return l(()=>{h.current&&!a&&n(),h.current=a},[a,n]),a?e("div",{...o,className:Z("flex items-start flex-col size-full",o?.className),children:u.map((e,t)=>d("span",{...s,key:`${e}_${t}`,className:Z("bg-muted-foreground animate-pulse rounded-md my-1 h-4",s?.className,e)}))}):e("p",{ref:f,...m,className:Z("wrap-break-word text-base",m?.className),children:e(U,{options:g,children:t})})}));yt.displayName="LinkifyText";const Nt=a(function({onSearch:a=()=>{},onCancel:n=()=>{},hasSearchIcon:r=!0,hasCancelIcon:o=!0,searchIconProps:s,cancelIconProps:l,containerProps:c,...d},u){const[m,f]=i("");return t("div",{...c,className:Z("group relative",c?.className),children:[r&&e(G,{...s,className:Z("absolute top-1/2 left-2 transform -translate-y-1/2 size-5 text-muted-foreground group-focus-within:text-ring",s?.className)}),e(ht,{ref:u,name:"search",placeholder:d?.placeholder||"Search...",value:m,onChange:e=>{const t=e.target.value;f(t),a(t.toLowerCase())},...d,className:Z("placeholder:text-muted-foreground focus-visible:ring-ring/50 focus-visible:ring flex",r?"pl-10":"pl-3",o?"pr-10":"pr-3",d?.className)}),o&&e(D,{onClick:()=>{f(""),n()},...l,className:Z("absolute top-1/2 right-2 transform -translate-y-1/2 size-5 text-muted-foreground cursor-pointer hover:text-ring transition-all duration-300 ease-out",m.length>0?"opacity-100 scale-100":"opacity-0 scale-75 pointer-events-none",l?.className)})]})});Nt.displayName="Search";const wt=({fromMe:t,status:a,...n})=>e("hungUp"===a?T:t?E:"reject"===a?A:j,{...n,className:Z("size-4","hungUp"===a?"text-green-500":"text-red-500",n?.className)});wt.displayName="StatusCall";const xt=a(function({status:a="unknown",statusColorConfig:n={unknown:"bg-gray-500 border-gray-600"},statusProps:r,tooltipProviderProps:i,tooltipProps:o,tooltipTriggerProps:s,tooltipPortalProps:l,tooltipContentProps:c,tooltipArrowProps:d,tooltip:u,disabled:m,className:f,...h},g){return m?null:e("div",{ref:g,...h,className:Z("absolute top-0 left-0",f),children:e(Q.Provider,{...i,children:t(Q.Root,{...o,children:[e(Q.Trigger,{asChild:!0,...s,children:e("div",{...r,className:Z("rounded-full size-4 border border-primary-foreground",n[a],r?.className)})}),e(Q.Portal,{...l,children:t(Q.Content,{...c,className:Z("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",c?.className),children:[e("span",{children:u||a||"unknown"}),e(Q.Arrow,{...d,className:Z("bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]",d?.className)})]})})]})})})});xt.displayName="StatusIndicator";const Pt=a(function({id:t,stream:a,mirror:n,className:i,muted:s,...d},u){const m=r(null),f=c(()=>t??`stream-${ee()}`,[t]),h="boolean"==typeof s&&s,g=n?"scale-x-[-1]":"";return o(u,()=>m.current||{},[]),l(()=>{if(m.current&&a){m.current.srcObject=a;const e=()=>{try{m.current?.play()}catch(e){console.error("Error playing video:",e)}};m.current.onloadedmetadata=()=>{queueMicrotask(e)}}},[a]),a?e("video",{ref:m,id:f,autoPlay:!0,playsInline:!0,muted:h,...d,className:Z("size-full object-contain",g,i)}):null});Pt.displayName="StreamView";const kt=a(function({muted:t,mirror:a,...n},r){return e(Pt,{ref:r,muted:"boolean"!=typeof t||t,mirror:"boolean"!=typeof a||a,...n})});kt.displayName="LocalStreamView";const Mt=a(function({muted:t,mirror:a,...n},r){return e(Pt,{ref:r,muted:"boolean"==typeof t&&t,mirror:"boolean"==typeof a&&a,...n})});Mt.displayName="RemoteStreamView";const Wt=a(function({element:a,pipElement:n,navElement:c,hideIconElement:d,showIconElement:u,fullscreenButtonProps:m,fullscreenButtonIconProps:f,pipProps:h,pipButtonProps:g,pipButtonIconProps:p,...v},b){const y=r(null),[N,w]=i(!1),[x,P]=i(!1),k=s(async()=>{const e=y.current;if(e)try{document.fullscreenElement?(await document.exitFullscreen(),w(!1),P(!1)):(await e.requestFullscreen(),w(!0),P(!0))}catch(e){console.error("Fullscreen error:",e)}},[]),M=s(()=>{n&&P(e=>!e)},[n]);return o(b,()=>({...y.current||{},isFullscreen:N,isPictureInPicture:x,toggleFullscreen:k,togglePictureInPicture:M}),[N,x,k,M]),l(()=>{const e=()=>{w(!!document.fullscreenElement),P(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),t("div",{ref:y,...v,className:Z("relative flex items-center justify-center size-full",v?.className),children:[a,e("button",{onClick:k,...m,className:Z("absolute top-2 right-2 p-1 rounded-md bg-black/50 text-white hover:bg-black/80 z-10 shadow-xs shadow-white/25",m?.className),children:N?d||e(L,{...f}):u||e(F,{...f})}),t("div",{className:"absolute size-full p-2 flex flex-col justify-end items-center",children:[N&&n&&t("div",{className:"relative size-full flex items-end justify-end",children:[x&&e("div",{...h,className:Z("max-w-1/4 max-h-1/4 aspect-4/3 overflow-hidden rounded-md shadow-md shadow-white/25",h?.className),children:n}),e("button",{onClick:M,...g,className:Z("absolute bottom-2 right-2 p-1 rounded-md bg-black/50 text-white hover:bg-black/80 z-10 shadow-xs shadow-white/25",g?.className),children:e(I,{...p})})]}),N&&c]})]})});function zt(t){return e(K.Root,{...t,className:Z("peer data-[state=checked]:bg-ring data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15em] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring disabled:cursor-not-allowed disabled:opacity-50",t?.className),children:e(K.Thumb,{className:Z("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}Wt.displayName="FullscreenStreamView";export{re as AlertDialog,me as Attachment,se as AttachmentAudio,ue as AttachmentFailed,de as AttachmentFile,ce as AttachmentImage,oe as AttachmentLink,le as AttachmentVideo,ge as Avatar,ve as Badge,ne as Button,Ke as ChatBubbleInfo,Qe as ChatBubbleMessage,tt as ChatInput,st as ChatList,lt as Checkbox,ct as DialogItem,mt as DialogsList,ft as DismissLayer,rt as FilePickerDropzone,nt as FilePickerInput,Ye as FormattedDate,Wt as FullscreenStreamView,ht as Input,Ze as Label,pt as LinkPreview,yt as LinkifyText,kt as LocalStreamView,dt as PlaceholderText,he as Presence,fe as PresenceBadge,it as QuickActions,Mt as RemoteStreamView,Nt as Search,ie as Spinner,wt as StatusCall,xt as StatusIndicator,Je as StatusSent,Pt as StreamView,zt as Switch,te as capitalize,Z as cn,ee as getRandomString};
2
2
  //# sourceMappingURL=index.js.map